function ok(id){if(document.all(id).style.display == "none"){document.all(id).style.display="block";}else{document.all(id).style.display="none";}} 

function onImg(iName,str) {
  if(pageNow != iName){
	if(typeof(document.images[iName]) != 'undefined'){
	    document.images[iName].src = str;
	}
  }
}
function Wopen(url,w,h,n) {
	var winName = n;
	var Width   = 'width='   + w;
	var Height  = ',height=' + h;
	var Left    = ',left='   + ((screen.width - w) / 2);
	var Top     = ',top='    + ((screen.height- h) / 2);
	var Option = ',status=1,menubar=0,scrollbars=0,resizable=0';
	var features = Width + Height + Left + Top + Option;
	winName = window.open(url,winName,features);
	if (window.focus) {
		winName.focus();
	}
}



function WopenScroll(url,w,h,n) {
	var winName = n;
	var Width   = 'width='   + w;
	var Height  = ',height=' + h;
	var Left    = ',left='   + ((screen.width - w) / 2);
	var Top     = ',top='    + ((screen.height- h) / 2);
	var Option = ',status=1,menubar=0,scrollbars=1,resizable=0';
	var features = Width + Height + Left + Top + Option;
	winName = window.open(url,winName,features);
	if (window.focus) {
		winName.focus();
	}
}



function ld() {WOP('policy.html','new','scrollbars=yes,width=295,height=350');}

if (document.layers){ document.all=document.layers; }
if ((!document.all) && (document.getElementById)){ document.all=document.getElementById; }
document.localall=document.all;

function messOn() {document.localall('message').style.display = 'block';}


//pulldown
function tree(t_name) {
	var disp = document.all(t_name).style.display;
	if(disp != "none" || disp == "") {
		document.all(t_name).style.display = "none";
		}
	else {document.all(t_name).style.display = "block";}
}


//menu
function onMenu(key){

  var menus = new Array(
 "top"
,"information"
,"system"
,"rule"
,"aboutreservation"
,"aboutwaiting"
,"reservationform"
,"cancelingpolicy"
,"faq"
,"secret"
,"ladyslist"
,"ladysshift"
,"enquete"
,"event"
,"merumaga"
,"blog"
,"bbs"
,"recruit"
,"mobile"
,"hotelguide"
,"contact"
,"vipclubmembers"
,"v2vipclubmembers"
);

  //key
  var btkey = "m_" + key;
  if(pageNow == btkey){
    return;
  }
  if(typeof(document[btkey]) == 'undefined'){
		alert(' ');
    return;
  }

  //on button
  document[btkey].src = "./img/menu/" + key + "_.gif";
  pageNow = btkey;
  for(var i=0;i<menus.length;i++){
		if(menus[i] == pageNow){
			continue;
		}
    onImg("m_" + menus[i], "./img/menu/" + menus[i] + ".gif");
  }
}

function onParentMenu(key){
  if(typeof(parent) == 'undefined'){
    return;
  }
  if(typeof(parent.menu) == 'undefined'){
    return;
  }
  parent.menu.onMenu(key);
}




/* flash enbed */

function writeFlash(swf_url, width, height, version, menu, loop)
{
	document.write('<OBJECT classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"');
	document.write(' codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=' + version + ',0,0,0" ');
	document.write(' WIDTH=' + width + ' HEIGHT=' + height + '>');
	document.write('<PARAM NAME=movie VALUE="'+ swf_url +'"><PARAM NAME=menu VALUE="'+ menu +'"><PARAM NAME=loop VALUE="'+ loop +'"><PARAM NAME=quality VALUE=high>'); 
	document.write('<EMBED src="' + swf_url + '" loop=true wmode=opaque quality=high');
	document.write(' swLiveConnect=FALSE WIDTH=' + width + ' HEIGHT=' + height);
	document.write(' TYPE="application/x-shockwave-flash" PLUGINSPAGE="https://www.macromedia.com/go/getflashplayer">');
	document.write('</NOEMBED>');
	document.write('</EMBED>');
	document.write('</OBJECT>');
}