// JavaScript Document
function BuildHTML(id){
	var html="";
	html+="<table width='422' border='0' align='center' cellpadding='0' cellspacing='0'>";
	html+="<tr><td width='5' background='/images/msgbox_04.gif'><img src='/images/msgbox_01.gif' width='5' height='26'></td>";
	html+="<td width='406' valign='middle' background='/images/msgbox_04.gif' align='left'><img src='/images/msgbox_02.gif'>&nbsp;<strong>友情提醒</strong></td>";
	html+="<td width='11'><img src='/images/msgbox_07.gif' width='11' height='26' alt=''></td>";
	html+="</tr><tr bgcolor='#FBFEFF'>";
	html+="<td width='5' class='msgboxmain_left'>&nbsp;</td>";
	html+="<td><table width='94%' height='100' border='0' align='right' cellpadding='0' cellspacing='0'>";
	html+="<tr><td width='42'><img src='/images/msgbox_14.gif' alt=''></td>";
	html+="<td width='338' align='left'>&nbsp; &nbsp;您还尚未登录！<br />&nbsp; &nbsp;若继续预定，则本次操作将不能获得相应游B！</td>";
	html+="</tr></table></td>";
	html+="<td class='msgboxmain_right'>&nbsp;</td>";
	html+="</tr><tr bgcolor='#EEF2F6'>";
	html+="<td width='5' height='42' class='msgboxmain_left'>&nbsp;</td>";
	html+=" <td><table width='242' height='20' border='0' align='right' cellpadding='0' cellspacing='0'>";
	html+="<tr><td width='14'>&nbsp;</td>";
	html+="<td width='65'><a href='Book.aspx?ID="+id+"'><img src='/images/btn_Retry.gif' width='65' height='20' border='0' alt='继续预定'></a></td>";
	html+="<td width='14'>&nbsp;</td>";
	html+="<td width='65'><a href='javascript:void(0)' onclick='javascript:ShowLoginForm();'><img src='/images/btn_login.gif' width='65' height='20' border='0' alt='注册后预定'></a></td>";
	html+="<td width='14'>&nbsp;</td>";
	html+="<td width='65'><a href='javascript:MsgBox_Close()'><img src='/images/btn_cannel.gif' width='65' height='20' border='0' alt='我再看看'></a></td>";
	html+="<td width='14'>&nbsp;</td></tr></table></td>";
	html+="<td class='msgboxmain_right'>&nbsp;</td>";
	html+="</tr><tr bgcolor='#EEF2F6'>";
	html+="<td colspan='3' background='/images/msgbox_foot.gif' bgcolor='#EEF2F6' height='5'></td>";
	html+=" </tr></table>";
	return html;
}
function CreateDIV(id){
	var objname="MsgBoxDIV";
	if($(objname)==null)
	{
   var objdiv = document.createElement("DIV");
   
   objdiv.id = objname;
   objdiv.style.top = 200;
   objdiv.style.left = 300;
   
   objdiv.style.visibility = 'visible';
   objdiv.innerHTML=BuildHTML(id);
   document.body.appendChild(objdiv);
	}
	else
	{
		$(objname).style.visibility = 'visible';
   }

}
function MsgBox_Close()
{
	document.getElementById("MsgBoxDIV").style.visibility="hidden";
	window.onresize=null;
	window.onscroll=null;
}   
function  scall(){   
  document.getElementById("MsgBoxDIV").style.top=document.documentElement.scrollTop+(document.documentElement.clientHeight-$("MsgBoxDIV").offsetHeight)/2   
  document.getElementById("MsgBoxDIV").style.left=document.documentElement.scrollLeft+(document.documentElement.clientWidth-$("MsgBoxDIV").offsetWidth)/2;   
}   
function Book(id){
		if(GetCookie("UserName")==null){
             CreateDIV(id);
			 window.onresize=scall;
			 window.onscroll=scall;
			 return false;
        }
        return true;
}
function Lock(islock){
	if(islock)
	{
		Mask();
		CreateDIV(0);
		$("MsgBoxDIV").innerHTML=BuildLock();
		
		//window.onresize=scall;
		//window.onscroll=scall;
	}
}
function BuildLock()
{
	var html="";
	html+="<a href='/newline/'><img src='../images/LockLine.gif' border=0></a>";
	return html;
}
function Mask()
{
	var objname="Mask"
	var objdiv = document.createElement("DIV");
   
   objdiv.id = objname;
   objdiv.style.position="absolute";
   objdiv.style.visibility = 'visible';
   document.body.appendChild(objdiv);
   document.body.scroll="no";
}
	