
window.onresize=resetDocHeight;function resetDocHeight()
{docId=document.getElementById('allroomdeals_content');var ifmcntdoc=docId.offsetHeight;var height=getHeight(ifmcntdoc);if(height!=null&&!isNaN(height))
{docId.style.height=height.toString()+"px";}}
function getHeight(docId)
{var height=null;var scrollHeight;var offsetHeight;if(docId.height)
{height=docId.height;}
else if(docId.body)
{if(docId.body.scrollHeight)
{scrollHeight=docId.body.scrollHeight;height=scrollHeight;}
if(docId.body.offsetHeight)
{offsetHeight=docId.body.offsetHeight;height=offsetHeight;}
if(scrollHeight&&offsetHeight)
{height=Math.max(scrollHeight,offsetHeight);}}
if(height!=null&&!isNaN(height))height+=10;return height;}
function hideandshow(hide1,hide2,show1,show2,HeadShow,headhide1,headhide2)
{changecss(hide1,'display','none');changecss(hide2,'display','none');changecss(show1,'display','');changecss(show2,'display','');changecss(HeadShow,'display','');changecss(headhide1,'display','none');changecss(headhide2,'display','none');}
function changecss(myclass,element,value)
{var CSSRules;if(document.all){CSSRules='rules';}else if(document.getElementById){CSSRules='cssRules';}for(var i=0;i<document.styleSheets[0][CSSRules].length;i++){if(document.styleSheets[0][CSSRules][i].selectorText==myclass){document.styleSheets[0][CSSRules][i].style[element]=value;}}}
function tdhideandshow(hide1,hide2,show1,show2,headshow,headhide1,headhide2){$(hide1).hide();$(hide2).hide();$(show1).show();$(show2).show();$(headshow).show();$(headhide1).hide();$(headhide2).hide();}function convertCheckinDate2rmIndex(formobj)
{var checkinobj=formobj.checkin;var indateobj=StrDMY2DateOBJ(checkinobj.value);var ind=indateobj.getDate();var inm=indateobj.getMonth();var today=new Date();var numDaysMth=getNumberDays(today);var today27=plusDate(27,today);if(fixMonth(today.getMonth())==fixMonth(today27.getMonth()))
{var i=ind-today.getDate();}else
{if(fixMonth(inm)==fixMonth(today.getMonth()))
{var i=ind-today.getDate();}else
{var i=(numDaysMth-today.getDate())+ind}}
return i;}
function convertCheckinDate2rmIndex2(formobj)
{var checkinobj=formobj.checkin;var indateobj=StrDMY2DateOBJ(checkinobj.value);var ind=indateobj.getDate();var inm=indateobj.getMonth();var today=indateobj;var numDaysMth=getNumberDays(today);var today27=plusDate(27,today);if(fixMonth(today.getMonth())==fixMonth(today27.getMonth()))
{var i=ind-today.getDate();}else
{if(fixMonth(inm)==fixMonth(today.getMonth()))
{var i=ind-today.getDate();}else
{var i=(numDaysMth-today.getDate())+ind}}
return i;}
var xmlhttp
function GetXmlHttpObject()
{if(window.XMLHttpRequest)
{return new XMLHttpRequest();}
if(window.ActiveXObject)
{return new ActiveXObject("Microsoft.XMLHTTP");}
return null;}
function showPopularDeals(CHECKINDATE,STAYDAYS,MAXPRICE,OFFSET,iHotelId,sCountry)
{xmlhttp=GetXmlHttpObject();if(xmlhttp==null)
{alert("Your browser does not support XMLHTTP!");return;}
document.getElementById("allroomdeals_content").innerHTML='<p align="center" style="margin:10px;padding:10px;"><img src="/images/loading.gif"></p>'
var url="/SearchHotelRooms1.asp";url=url+"?iHotelId="+iHotelId;url=url+"&sCountry="+sCountry;url=url+"&checkindate="+CHECKINDATE;url=url+"&staydays="+STAYDAYS;url=url+"&maxprice="+MAXPRICE;url=url+"&offset="+OFFSET;xmlhttp.onreadystatechange=stateChanged;xmlhttp.open("GET",url,true);xmlhttp.send(null);}
function showPopularDeals2(CHECKINDATE,STAYDAYS,MAXPRICE,OFFSET,iHotelId,sCountry)
{xmlhttp=GetXmlHttpObject();if(xmlhttp==null)
{alert("Your browser does not support XMLHTTP!");return;}
document.getElementById("allroomdeals_content").innerHTML='<p align="center" style="margin:10px;padding:10px;"><img src="/images/loading.gif"></p>'
var url="/SearchHotelRooms2.asp";url=url+"?iHotelId="+iHotelId;url=url+"&sCountry="+sCountry;url=url+"&checkindate="+CHECKINDATE;url=url+"&staydays="+STAYDAYS;url=url+"&maxprice="+MAXPRICE;url=url+"&offset="+OFFSET;xmlhttp.onreadystatechange=stateChanged;xmlhttp.open("GET",url,true);xmlhttp.send(null);}
function stateChanged()
{if(xmlhttp.readyState==4)
{document.getElementById("allroomdeals_content").innerHTML=xmlhttp.responseText;var wkj=OFFSET+1;
if((wkj<=7)&&(wkj>=1)){tdhideandshow('.wk3','.wk4','.wk1','.wk2','.top1','.top2','.top3');};
if((wkj<=14)&&(wkj>=7)){tdhideandshow('.wk3','.wk4','.wk1','.wk2','.top1','.top2','.top3');};
if((wkj<=21)&&(wkj>=14)){tdhideandshow('.wk1','.wk4','.wk2','.wk3','.top2','.top1','.top3');};
if((wkj<=28)&&(wkj>=21)){tdhideandshow('.wk1','.wk2','.wk3','.wk4','.top3','.top1','.top2');};$(function () {$("span").tooltip({ track: true, showURL: false, fixPNG: true, extraClass: "incls", top:8, left:2});$("code").tooltip({ track: true, delay: 0, showURL: false, fixPNG: true, extraClass: "ttbg", top: -10, left: 5 });$("a.next7dt").tooltip({ track: true, delay: 0, showURL: false, showBody: " - ", extraClass: "next7dt" });});}}function getRmDesc(iGuest,sAdverRoomDesc,sExtraGuest,sBedding)
{var RmDesc='';var RmDesc='<table width="450"><tr><td><font style="font-size: 10pt; color: #0000cd;font-family:Arial;">'+RmDesc
if(iGuest>0)
{RmDesc=RmDesc+sAdverRoomDesc+'<ul>'
if(sExtraGuest.length>0)
{RmDesc=RmDesc+'<li>Details - '
if(iGuest==1)
{RmDesc=RmDesc+'Rate is for 1 person. '}
else
{RmDesc=RmDesc+'Rate is for '+iGuest.toString()+' people. '}
RmDesc=RmDesc+sExtraGuest+'</li>'}
if(sBedding.length>0)
{RmDesc=RmDesc+'<li>Bedding - '+sBedding+'</li>'}
RmDesc=RmDesc+'</ul>'}
else
{RmDesc=RmDesc+sAdverRoomDesc}
RmDesc=RmDesc+'</font></td></tr></table>'
return RmDesc}
