//Roll Over
function MM_preloadImages() { //v3.0
	//Window Focus
	window.focus();
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

//Pull Down Menu
function MM_showHideLayers() { //v6.0
	var i,p,v,obj,args=MM_showHideLayers.arguments;
	for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) {
		v=args[i+2];
		if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v=='hide')?'hidden':v; }
		obj.visibility=v;
	}
}

function KeepSubMenu(Pos){
	clearTimeout(oTimer);
	MM_showHideLayers('menu'+Pos,'','show');
	var obj=MM_findObj('menu'+Pos);
	if (obj.style) { obj=obj.style;}
	obj.top='87px';
}

//var yp,ichi,nLoop,nTimer;
var ichi,nLoop,nTimer,nowNavi=0;
function ShowNewSub(Sname){
	if(nowNavi == Sname){
		KeepSubMenu(Sname);
	} else {
		if(Sname==0){
			MM_showHideLayers('menu1','','hide','menu2','','hide','menu3','','hide');
		} else if(Sname==1){
			MM_showHideLayers('menu1','','show','menu2','','hide','menu3','','hide');
		} else if(Sname==2){
			MM_showHideLayers('menu1','','hide','menu2','','show','menu3','','hide');
		} else {
			MM_showHideLayers('menu1','','hide','menu2','','hide','menu3','','hide');
		}
		if(Sname==1){
			nLoop=-42;
		} else {
			nLoop=0;
		}
		MoveSub();
		clearTimeout(oTimer);
		nowNavi=Sname;
	}
}

function MoveSub(){
	if(nLoop>40){
		clearTimeout(nTimer);
		return;
	}
	ichi = 43 + nLoop;
	var i;
	for(i=1;i<3;i++){
		var obj=MM_findObj('menu'+i);
		if (obj.style) { obj=obj.style;}
		obj.top=ichi+'px';
	}
	//nLoop++;
	nLoop=nLoop+2;
	nTimer=setTimeout("MoveSub()",0);
}

var oTimer;
function OutSub(){
	oTimer=setTimeout("ShowNewSub(0)",300);
}

//SubMenu
function SubMenuSrc(d){
	//d...hierarchy
	var Pass;
	if(d==1 || d==''){
		Pass = '';
	} else if(d==2){
		Pass = '../';
	} else if(d==3){
		Pass = '../../';
	} else if(d==4){
		Pass = '../../../';
	}

//HTML source
	document.write(
//01_news
'<div id="menu1">',
'<div><a href="'+Pass+'01_shop/shop.html" onMouseOver="MM_swapImage(\'sub21\',\'\',\''+Pass+'images/global_navi/sub_21_on.gif\',1);KeepSubMenu(1);" onMouseOut="MM_swapImgRestore();OutSub();"><img src="'+Pass+'images/global_navi/sub_21.gif" width="164" height="20" border="0" name="sub21" alt="Shops"></a></div>',
'<div><a href="'+Pass+'01_shop/restaurant.html" onMouseOver="MM_swapImage(\'sub22\',\'\',\''+Pass+'images/global_navi/sub_22_on.gif\',1);KeepSubMenu(1);" onMouseOut="MM_swapImgRestore();OutSub();"><img src="'+Pass+'images/global_navi/sub_22.gif" width="164" height="20" border="0" name="sub22" alt="Restaurants"></a></div>',
'</div>',
//02_info
'<div id="menu2">',
'<div><a href="'+Pass+'02_about/info.html" onMouseOver="MM_swapImage(\'sub31\',\'\',\''+Pass+'images/global_navi/sub_31_on.gif\',1);KeepSubMenu(2);" onMouseOut="MM_swapImgRestore();OutSub();"><img src="'+Pass+'images/global_navi/sub_31.gif" width="164" height="20" border="0" name="sub31" alt="Information"></a></div>',
'<div><a href="'+Pass+'02_about/concept.html" onMouseOver="MM_swapImage(\'sub32\',\'\',\''+Pass+'images/global_navi/sub_32_on.gif\',1);KeepSubMenu(2);" onMouseOut="MM_swapImgRestore();OutSub();"><img src="'+Pass+'images/global_navi/sub_32.gif" width="164" height="20" border="0" name="sub32" alt="Concept"></a></div>',
'<div><a href="'+Pass+'02_about/facilities.html" onMouseOver="MM_swapImage(\'sub33\',\'\',\''+Pass+'images/global_navi/sub_33_on.gif\',1);KeepSubMenu(2);" onMouseOut="MM_swapImgRestore();OutSub();"><img src="'+Pass+'images/global_navi/sub_33.gif" width="164" height="20" border="0" name="sub33" alt="Facilities"></a></div>',
'</div>');
}


//WinOpen Popwin
function WinOpen(wLink){
	window.open(wLink,'new','resizable=1,scrollbars=1,menubar=0,directories=0,status=0,location=0,width=530');
}

function popwin(Link,haba,takasa){
	window.open(Link,'subwin','resizable=0,scrollbars=1,width='+haba+',height='+takasa);
}

function newWin(url, w, h){
	window.open(url,'newwindow', 'toolbar=1,location=1,directories=1,status=1,menubar=1,scrollbars=1,resizable=1');
}


