function wOpenRogo() {
  window.open('rogo.html','rogo','scrollbars=yes,resizable=yes,width=420,height=380');
}

function wOpenSoshiki() {
  window.open('organization.html','soshiki','scrollbars=yes,resizable=yes,width=600,height=600');
}

function wOpenGyoseki() {
  window.open('ir.html','gyoseki','scrollbars=yes,resizable=yes,menubar=yes,width=680,height=600');
}

function wOpenPrivacy() {
  window.open('privacy.html','privacy','scrollbars=yes,resizable=yes,menubar=yes,width=680,height=600');
}

function wOpenStaff(n) {
  window.open(n,'staff','scrollbars=yes,resizable=yes,width=680,height=600');
}

function iWinOpen(n,ww,hh) {
window.open(n,"syosai","status=0,resizable=yes,scrollbars=yes,width=" +ww+" ,height=" +hh)
}

function menuArray(){

	SubMenu = new Array;
	SubMenu[1] = 'subglobal1';
	SubMenu[2] = 'subglobal2';
	SubMenu[3] = 'subglobal3';
	
}

function onSubMenu(n){
	
	os      = getOs();
	browser = getBName();
	
	menuArray();
	
	showMenu = SubMenu[n];
	
	if((os == "MacOS")&&(browser == "Explorer")){
		}else{
			if(document.getElementById){
				
				if(n==1){
					document.getElementById(showMenu).style.visibility ='hidden';
					SubMenu.splice(n,1);
					}else{
						document.getElementById(showMenu).style.visibility ='visible';
						SubMenu.splice(n,1);
						}
				
				for(n=1; n<SubMenu.length; n++){// nは1番から。
					hideMenu = SubMenu[n];
					document.getElementById(hideMenu).style.visibility ='hidden';
					
				}
			}
		}
}

function getOs(){
    var uAgent  = navigator.userAgent.toUpperCase();
		
    if (uAgent.indexOf("MAC") >= 0) {
			return "MacOS";
		}
    if (uAgent.indexOf("WIN") >= 0) {
			return "Windows";
		}
    if (uAgent.indexOf("X11") >= 0) {
			return "UNIX";
		}
    return "";
}

function getBName(){
    var aName  = navigator.appName.toUpperCase();
    var uName = navigator.userAgent.toUpperCase();
		
    if (uName.indexOf("SAFARI") >= 0) {
			return "Safari";
		}
    if (uName.indexOf("OPERA") >= 0) {
			return "Opera";
		}
    if (aName.indexOf("NETSCAPE") >= 0) {
			return "Netscape";
		}
    if (aName.indexOf("MICROSOFT") >= 0) {
			return "Explorer";
		}
    return "";
}