// POP-UP JavaScript Document it is requring Overlib

function CallOnLoad(myframe)
{
    myframe.height = 300;
    myframe.width = 300;
    mydiv = document.getElementById('diviswaiting');
    mydiv.style.visibility='hidden';
    mydiv.style.height='0px';
    mydiv.style.width='0px';
    mydiv.style.position='absolute';
}
function ShowPopupSelectDate(result)
{
var HotelDetailsFrame = document.getElementById('HotelDetails');
if (HotelDetailsFrame == null)
{}
else
 {
	HotelDetailsFrame.style.display="none";
	HotelDetailsFrame.height=0;
	HotelDetailsFrame.width=0;
	HotelDetailsFrame.src="";
	}
	
  var DlinkEs = escape(result);
    var result1 = "enterdetails.asp?DLinkEs=" + DlinkEs;
  //var result1 = DlinkEs;

 showingDetails = true;
    
    var url = "<table width='100%' border='0' cellspacing='0' cellpadding='0'><tr><td class='affwfrmleftbrd'>&nbsp;</td><td class='affwfrmtmid'><img src='cms/hotels/images/spacer.gif' alt='' width='18' height='18' border='0' /></td><td class='affwfrmrightbrd'>&nbsp;</td></tr><tr><td class='affwfrmleftcor'><img src='cms/hotels/images/spacer.gif' alt='' width='18' height='18' border='0' /></td><td style='background-color:#ffffff;'><div style='float:left; display:inline;'><a href='javascript:return closeGreyBgToAll();' onclick='javascript:return closeGreyBgToAll();' style='cursor:pointer' text='Close'><img src='cms/hotels/images/back.gif' border='0' alt='Back' /></a></div><div style='float:right; display:inline; padding:0px;'><a href='javascript:return closeGreyBgToAll();' onclick='javascript:return closeGreyBgToAll();' style='cursor:pointer' text='Close'><img src='cms/hotels/images/close.gif' border='0' alt='Close' /></a></div><div id='diviswaiting' align='center' style='height=300;width=300'><table height='300' width='300'><tr><td align='center' valign='middle'><table class='htlplswait' cellpadding='3' cellspacing='3' width='200'><tr><td align='center' valign='middle'><img id='imgAnimated' src='cms/hotels/images/loading_animation.gif' /><br />Loading please wait...</td></tr></table></td></tr></table></div>      <iframe name='HotelDetails' id='HotelDetails' frameborder='0' width='0' onload='CallOnLoad(this);' height='0'scrolling='auto' src='"+result1+"'></iframe>      </div></td><td class='affwfrmrightcor'>&nbsp;</td></tr><tr><td class='affwfrmbleftbrd'><img src='cms/hotels/images/spacer.gif' alt='' width='18' height='18' border='0' /></td><td class='affwfrmbmid'>&nbsp;</td><td class='affwfrmbrightbrd'><img src='cms/hotels/images/spacer.gif' alt='' width='18' height='18' border='0' /></td></tr></table>";
    
	var overlibIsLoading = overlib(url,STICKY,CENTERPOPUP,OPACITY,0,EXCLUSIVE,FOLLOWSCROLL,CLOSECLICK,WIDTH, 300, VAUTO, HAUTO,BGCLASS,'infodivbg', FGCLASS,'infodivbg');
	if (!overlibIsLoading)
	    displayGreyBg();
}



 var viewportwidth;
 var viewportheight;
 
 // the more standards compliant browsers (mozilla/netscape/opera/IE7) use window.innerWidth and window.innerHeight
 
 if (typeof window.innerWidth != 'undefined')
 {
      viewportwidth = window.innerWidth,
      viewportheight = window.innerHeight
 }
 
// IE6 in standards compliant mode (i.e. with a valid doctype as the first line in the document)

 else if (typeof document.documentElement != 'undefined'
     && typeof document.documentElement.clientWidth !=
     'undefined' && document.documentElement.clientWidth != 0)
 {
       viewportwidth = document.documentElement.clientWidth,
       viewportheight = document.documentElement.clientHeight
 }
 
 // older versions of IE
 
 else
 {
       viewportwidth = document.getElementsByTagName('body')[0].clientWidth,
       viewportheight = document.getElementsByTagName('body')[0].clientHeight
 }

function displayGreyBg()
{

	var greyBgToAll = document.getElementById('greyBgToAll');
	var greyBgToAllInnerTbl = document.getElementById('greyBgToAllInnerTbl');
	greyBgToAll.style.display="block";
	greyBgToAll.style.width = "5000px";
	greyBgToAll.style.height = "5000px";
	greyBgToAllInnerTbl.style.width = viewportwidth + "px";
	greyBgToAllInnerTbl.style.height = viewportheight + "px";
	var disableScrollBr = document.body;
	disableScrollBr.style.overflow = "hidden";
	var disableScrollBr2= document.documentElement;
	disableScrollBr2.style.overflow = "hidden";

}

function closeGreyBgToAll()
{
	var HotelDetailsFrame = document.getElementById('HotelDetails');
	HotelDetailsFrame.style.display="none";
	HotelDetailsFrame.height=0;
	HotelDetailsFrame.width=0;
	HotelDetailsFrame.src="";
	HotelDetailsFrame.style.top="1000px";
	HotelDetailsFrame.style.left="1000px";

	var greyBgToAll = document.getElementById('greyBgToAll');
	var greyBgToAllInnerTbl = document.getElementById('greyBgToAllInnerTbl');
	greyBgToAll.style.display="none";
	greyBgToAll.style.width = "0px";
	greyBgToAll.style.height = "0px";
	greyBgToAllInnerTbl.style.width = "0px";
	greyBgToAllInnerTbl.style.height = "0px";
	var disableScrollBr = document.body;
	disableScrollBr.style.overflow = "auto";
	var disableScrollBr2= document.documentElement;
	disableScrollBr2.style.overflow = "auto";
	return cClick();
}

document.write("<div id='greyBgToAll' align='center' style='display: none; width: 100%; position: absolute; height: 100%;' onclick='javascript:return closeGreyBgToAll();'><table id='greyBgToAllInnerTbl' style='width:100%; height:100%;' border='0' cellpadding='0' cellspacing='0'><tr><td>&nbsp;</td></tr></table></div>");

