var arrPrice=new Array();var bizActionMode=null;var hotelId=null;var iResultCnt=null;var sIsRefresh=null;var fidelioRates=null;var iSaveHotelSize=null;var contextName;var sSoldOutText="Sold Out";window.name="hResultWindow";function hotelDetail(R,H,K,S,E,M,I,C,G,L,O,F,P,D,N,A,J,B,Q){if(Q==null){Q=""}else{contextName=Q}if(D=="PACKAGE"){bizMode="GET_DETAIL_PACKAGE";document.hotelmasterlist.action=Q+"offlinebookinghoteldetail.do?tabHighLighter=packages"}else{bizMode="GET_DETAIL";document.hotelmasterlist.action=Q+"offlinebookinghoteldetail.do?tabHighLighter=hotels"}document.hotelmasterlist.BIZ_ACTION_MODE.value=bizMode;document.hotelmasterlist.supplier.value=H;document.hotelmasterlist.id.value=K;document.hotelmasterlist.hotelcode.value=R;document.hotelmasterlist.provider.value=S;document.hotelmasterlist.tabName.value=A;document.hotelmasterlist.iResultCnt.value=P;document.hotelmasterlist.isSaved.value=B;document.hotelmasterlist.submit()}function hotelDetailMap(A){var B=window.open(A);B.focus()}function weatherDetails(A){var B=window.open(A);B.focus()}function hotelDetailPrint(I,L,S,F,N,J,C,H,M,P,G,Q,D,O,A,K,B,R){if(R==null){R=""}else{contextName=R}var E=window.open(R+"offlinebookinghoteldetail.do?BIZ_ACTION_MODE=GET_DETAIL_PRINT&fromdate="+H+"&todate="+M+"&supplier="+I+"&id="+L+"&provider="+S+"&citycode="+C+"&iResultCnt="+Q+"&isSaved="+B,"Print");E.focus()}function sendEmail(A,C,E,J,I,K,D,B,F){if(F==null){F=""}else{contextName=F}var G=A+C+"/"+E+"/"+J;var K=K+", "+D+", "+B;var H=window.open(F+"sendEmail.screen?&feedurl="+G+"&hotelname="+I+"&addr="+K+"&cityname="+D+"","Email");H.focus()}function saveHotel(A,E,C){if(C==null){C=""}else{contextName=C}hotelId=A;iResultCnt=E;bizActionMode="SAVE_HOTEL";var D="GET";var B=true;xmlHttp=GetXmlHttpObject();if(xmlHttp==null){alert(ajaxmessage)}else{action=C+"formupdate";paramString="BIZ_ACTION="+bizActionMode+"&hotelid="+hotelId+"&iResultCnt="+iResultCnt+"&save=Y";ConnectServer(action,D,B,paramString,ajaxResponseHandler)}}function removeHotel(A,F,D,C){if(C==null){C=""}else{contextName=C}hotelId=A;iResultCnt=F;sIsRefresh=D;bizActionMode="REMOVE_HOTEL";var E="GET";var B=true;xmlHttp=null;xmlHttp=GetXmlHttpObject();if(xmlHttp==null){alert(ajaxmessage)}else{action=C+"formupdate";paramString="BIZ_ACTION="+bizActionMode+"&hotelid="+hotelId+"&iResultCnt="+iResultCnt+"&save=N";ConnectServer(action,E,B,paramString,ajaxResponseHandler)}}function ajaxResponseHandler(){try{if(xmlHttp.readyState==4&&xmlHttp.status==200){if("SAVE_HOTEL"==bizActionMode){var A=document.getElementById("save"+iResultCnt);A.innerHTML="Remove";A.setAttribute("href","javascript:removeHotel('"+hotelId+"','"+iResultCnt+"','N','"+contextName+"');");var D=document.getElementById("SavedHotels");D.innerHTML='| <a class="hyLink1" href="'+contextName+'viewsavedhotels.do?BIZ_ACTION_MODE=VIEW_SAVED_HOTEL&tabHighLighter=hotels">View Saved Hotels</a>'}if("REMOVE_HOTEL"==bizActionMode){if(sIsRefresh=="N"){var A=document.getElementById("save"+iResultCnt);A.innerHTML="Save";A.setAttribute("href","javascript:saveHotel('"+hotelId+"','"+iResultCnt+"','"+contextName+"');");var B=xmlHttp.responseText;if(B==0){var D=document.getElementById("SavedHotels");D.innerHTML=""}}else{document.viewsavedhotels.submit()}}}}catch(C){alert("ERORR!!!!  ::: "+C)}}function hotelReviews(A,B,M,L,D,O,H,G,C,K,N,J,F,E){var I=window.open("offlinebookinghoteldetail.do?BIZ_ACTION_MODE=GET_REVIEWS&supplier="+A+"&id="+B+"&provider="+M+"&currency="+L+"&hoteltype="+D+"&hotelstar="+O+"&adults="+K+"&fromdate="+G+"&todate="+C+"&citycode="+H+"&canPolicy="+N+"&hotelname="+J+"&city="+F+"&country="+E,"Reviews");I.focus()}function viewMore(A,B,K,J,D,N,F,E,C,I,L,M,G){if(G==null){G=""}else{contextName=G}var H=window.open(G+"offlinebookinghoteldetail.do?BIZ_ACTION_MODE=VIEW_MORE&supplier="+A+"&id="+B+"&provider="+K+"&currency="+J+"&hoteltype="+D+"&hotelstar="+N+"&adults="+I+"&fromdate="+E+"&todate="+C+"&citycode="+F+"&canPolicy="+L+"&hotelBeanCnt="+M,"","scrollbars=yes,resizable=yes,width=550,height=450");H.focus()}function viewCandid(A,B,N,M,D,Q,H,G,C,L,O,P,K,F,E,I){if(I==null){I=""}else{contextName=I}var J=window.open(I+"offlinebookinghoteldetail.do?BIZ_ACTION_MODE=VIEW_CANDID&supplier="+A+"&id="+B+"&provider="+N+"&currency="+M+"&hoteltype="+D+"&hotelstar="+Q+"&adults="+L+"&fromdate="+G+"&todate="+C+"&citycode="+H+"&canPolicy="+O+"&hotelBeanCnt="+P+"&hotelname="+K+"&city="+F+"&country="+E,"Candid");J.focus()}function funMorOffer(C,A){var B=document.getElementById("moreoffer"+C+A);B.style.visibility=B.style.visibility=="visible"?"hidden":"visible";B.style.display=B.style.display==""?"none":""}function otherroomtype(E,D,F,A){var C=0;while(true){if(document.getElementById("roomTypeTr_"+F+"_"+C)==null&&document.getElementById("roomTypeTrWeek0_"+F+"_"+C)==null){break}if(document.getElementById("roomTypeTr_"+F+"_"+C)!=null){if("N"==document.getElementById("visibleTr_"+F+"_"+0).value){document.getElementById("roomTypeTr_"+F+"_"+C).style.visibility="visible";document.getElementById("roomTypeTr_"+F+"_"+C).style.display="";if(document.getElementById("roomTypeTr2_"+F+"_"+C)!=null){document.getElementById("roomTypeTr2_"+F+"_"+C).style.visibility="visible";document.getElementById("roomTypeTr2_"+F+"_"+C).style.display=""}if(document.getElementById("roomTypeTr5_"+F+"_"+C)!=null){document.getElementById("roomTypeTr5_"+F+"_"+C).style.visibility="visible";document.getElementById("roomTypeTr5_"+F+"_"+C).style.display=""}if(document.getElementById("roomTypeTr_book_"+F+"_"+C)!=null){document.getElementById("roomTypeTr_book_"+F+"_"+C).style.visibility="visible";document.getElementById("roomTypeTr_book_"+F+"_"+C).style.display=""}if(document.getElementById("lasttr_"+F+"_"+C)!=null){var B=document.getElementById("lasttr_"+F+"_"+C);B.style.visibility="visible";B.style.display=""}}else{if(C!=0){document.getElementById("roomTypeTr_"+F+"_"+C).style.visibility="hidden";document.getElementById("roomTypeTr_"+F+"_"+C).style.display="none";if(document.getElementById("roomTypeTr2_"+F+"_"+C)!=null){document.getElementById("roomTypeTr2_"+F+"_"+C).style.visibility="hidden";document.getElementById("roomTypeTr2_"+F+"_"+C).style.display="none"}if(document.getElementById("roomTypeTr5_"+F+"_"+C)!=null){document.getElementById("roomTypeTr5_"+F+"_"+C).style.visibility="hidden";document.getElementById("roomTypeTr5_"+F+"_"+C).style.display="none"}if(document.getElementById("roomTypeTr_book_"+F+"_"+C)!=null){document.getElementById("roomTypeTr_book_"+F+"_"+C).style.visibility="hidden";document.getElementById("roomTypeTr_book_"+F+"_"+C).style.display="none"}if(document.getElementById("lasttr_"+F+"_"+C)!=null){var B=document.getElementById("lasttr_"+F+"_"+C);B.style.visibility="hidden";B.style.display="none"}}}}else{if(document.getElementById("roomTypeTrWeek0_"+F+"_"+C)!=null){if("N"==document.getElementById("visibleTr_"+F+"_"+0).value){w=0;while(document.getElementById("roomTypeTrWeek"+w+"_"+F+"_"+C)){document.getElementById("roomTypeTrWeek"+w+"_"+F+"_"+C).style.visibility="visible";document.getElementById("roomTypeTrWeek"+w+"_"+F+"_"+C).style.display="";w++}if(document.getElementById("roomTypeTr2_"+F+"_"+C)!=null){document.getElementById("roomTypeTr2_"+F+"_"+C).style.visibility="visible";document.getElementById("roomTypeTr2_"+F+"_"+C).style.display=""}if(document.getElementById("roomTypeTr5_"+F+"_"+C)!=null){document.getElementById("roomTypeTr5_"+F+"_"+C).style.visibility="visible";document.getElementById("roomTypeTr5_"+F+"_"+C).style.display=""}if(document.getElementById("roomTypeTr_book_"+F+"_"+C)!=null){document.getElementById("roomTypeTr_book_"+F+"_"+C).style.visibility="visible";document.getElementById("roomTypeTr_book_"+F+"_"+C).style.display=""}if(document.getElementById("lasttr_"+F+"_"+C)!=null){var B=document.getElementById("lasttr_"+F+"_"+C);B.style.visibility="visible";B.style.display=""}}else{if(C!=0){w=0;while(document.getElementById("roomTypeTrWeek"+w+"_"+F+"_"+C)){document.getElementById("roomTypeTrWeek"+w+"_"+F+"_"+C).style.visibility="hidden";document.getElementById("roomTypeTrWeek"+w+"_"+F+"_"+C).style.display="none";w++}if(document.getElementById("roomTypeTr2_"+F+"_"+C)!=null){document.getElementById("roomTypeTr2_"+F+"_"+C).style.visibility="hidden";document.getElementById("roomTypeTr2_"+F+"_"+C).style.display="none"}if(document.getElementById("roomTypeTr5_"+F+"_"+C)!=null){document.getElementById("roomTypeTr5_"+F+"_"+C).style.visibility="hidden";document.getElementById("roomTypeTr5_"+F+"_"+C).style.display="none"}if(document.getElementById("roomTypeTr_book_"+F+"_"+C)!=null){document.getElementById("roomTypeTr_book_"+F+"_"+C).style.visibility="hidden";document.getElementById("roomTypeTr_book_"+F+"_"+C).style.display="none"}if(document.getElementById("lasttr_"+F+"_"+C)!=null){var B=document.getElementById("lasttr_"+F+"_"+C);B.style.visibility="hidden";B.style.display="none"}}}}}C++}if(document.getElementById("visibleTr_"+F+"_"+0).value=="Y"){document.getElementById("visibleTr_"+F+"_"+0).value="N"}else{document.getElementById("visibleTr_"+F+"_"+0).value="Y"}}function checkFidelioAvailRates(A,F){if(F==null){F=""}else{contextName=F}var C=null;var H=null;var E=null;if(document.getElementById("FIDELIO_RS_COUNT"+A)!=null){H=document.getElementById("FIDELIO_RS_COUNT"+A).value}if(document.getElementById("FIDELIO_RM_COUNT"+A)!=null){E=document.getElementById("FIDELIO_RM_COUNT"+A).value}try{if(document.getElementById("FIDELIO_RS_COUNT"+A)!=null&&document.getElementById("FIDELIO_RM_COUNT"+A)!=null&&document.getElementById("FIDELIO_RS_COUNT"+A).value>=0&&document.getElementById("FIDELIO_RM_COUNT"+A).value>=0){var G="GET";var B=true;xmlHttp=GetXmlHttpObject();bizActionMode="CHECK_AVAILABILITY_GEN";if(xmlHttp==null){alert(ajaxmessage)}else{action=F+"micros/checkavailability.ajax";paramString="BIZ_ACTION_MODE="+bizActionMode+"&iResultCount="+H+"&iRoomCount="+E;document.getElementById("populateFunc"+H).style.visibility="hidden";document.getElementById("populateFunc"+H).style.display="none";document.getElementById("populateFunc1"+H).style.visibility="visible";document.getElementById("populateFunc1"+H).style.display="block";hideAllRoomType(hotelCount);if(G=="POST"){xmlHttp.open(G,action,B);xmlHttp.setRequestHeader("Content-Type","application/x-www-form-urlencoded");xmlHttp.send(paramString)}else{xmlHttp.open(G,action+"?"+paramString,B);xmlHttp.send(null)}xmlHttp.onreadystatechange=function(){if(xmlHttp.readyState==4){var N=false;var T=xmlHttp.responseText;C=T.parseJSON();var Q=document.getElementById("lowestavgrate"+H);if(Q!=null){Q.innerHTML=""}if(C!=null){var P="";if(document.getElementById("FIDELIO"+A)!=null){P=document.getElementById("FIDELIO"+A).value}var R=P.split("#");var K="";var L=0;for(var O=0;O<R.length;O++){if(R[O]!=null||R[O]!=""){var S=R[O];S=S.replace(/^[\s]+/,"").replace(/[\s]+$/,"").replace(/[\s]{2,}/," ");var J=C[S];if(J!=null){if(document.getElementById(A+S)!=null){document.getElementById(A+S).style.visibility="visible";document.getElementById(A+S).style.display="";N=true}if(L==0||L>parseFloat(J.bookableRate)){K=J.currency;L=parseFloat(J.bookableRate)}}}}if(K!=null&&K!=""&&L>0){if(Q!=null&&Q.innerHTML==null||Q.innerHTML==""){var I=K+"<br/>"+L.toFixed(2);Q.innerHTML=I}}if(!N){if(document.getElementById("ONLY_FIDELIO"+A)!=null&&document.getElementById("ONLY_FIDELIO"+A).value=="true"){var M="Rates Not Available For Hotel at the Moment for the Search Conditions Specified";document.getElementById("row"+hotelCount).innerHTML="";if(document.getElementById("ErrorDesc"+hotelCount)!=null&&document.getElementById("ErrorDesc"+hotelCount).innerHTML!=null){M=document.getElementById("ErrorDesc"+hotelCount).innerHTML}document.getElementById("row"+hotelCount).innerHTML='<table width="100%" border="0" cellspacing="0" cellpadding="0" id="mainratetable"><tr><td align="left" valign="top"><br><table width="100%" border="0" cellpadding="0" cellspacing="0" align="center" class="ratetable"><tr><td align="center" valign="middle" height="30"><span id="ErrorSpan_'+hotelCount+'" class="commentinfotext"><strong>'+M+"</strong></span></td></tr></table><br></td></tr></table><br>";showAllRoomType(hotelCount,hotelId,false,dexcrate,0,false,hotelId);document.getElementById("pegsratetext"+hotelCount).innerHTML="";document.getElementById("pegsratetext"+hotelCount).innerHTML="";document.getElementById("lowestavgrate"+hotelCount).innerHTML=sSoldOutText}}}else{if(document.getElementById("ONLY_FIDELIO"+A)!=null&&document.getElementById("ONLY_FIDELIO"+A).value=="true"){var M="Rates Not Available For Hotel at the Moment for the Search Conditions Specified";document.getElementById("row"+hotelCount).innerHTML="";if(document.getElementById("ErrorDesc"+hotelCount)!=null&&document.getElementById("ErrorDesc"+hotelCount).innerHTML!=null){M=document.getElementById("ErrorDesc"+hotelCount).innerHTML}document.getElementById("row"+hotelCount).innerHTML='<table width="100%" border="0" cellspacing="0" cellpadding="0" id="mainratetable"><tr><td align="left" valign="top"><br><table width="100%" border="0" cellpadding="0" cellspacing="0" align="center" class="ratetable"><tr><td align="center" valign="middle" height="30"><span id="ErrorSpan_'+hotelCount+'" class="commentinfotext"><strong>'+M+"</strong></span></td></tr></table><br></td></tr></table><br>";showAllRoomType(hotelCount,hotelId,false,dexcrate,0,false,hotelId);document.getElementById("pegsratetext"+hotelCount).innerHTML="";document.getElementById("pegsratetext"+hotelCount).innerHTML="";document.getElementById("lowestavgrate"+hotelCount).innerHTML=sSoldOutText}}document.getElementById("populateFunc"+H).style.visibility="visible";document.getElementById("populateFunc"+H).style.display="block";document.getElementById("populateFunc1"+H).style.visibility="hidden";document.getElementById("populateFunc1"+H).style.display="none"}document.getElementById("row"+hotelCount).style.visibility="visible";document.getElementById("row"+hotelCount).style.display=""}}}else{document.getElementById("row"+hotelCount).style.visibility="visible";document.getElementById("row"+hotelCount).style.display=""}}catch(D){alert("Error in Checking availability ::::::::::: "+D)}finally{return true}}function bookHotel(H,F,B,E,D){if(D==null){D=""}else{contextName=D}form=document.getElementById("hotelmasterlistform");if(document.getElementById("isFidelioRate_"+H+"_"+F)!=null){if(document.getElementById("isFidelioRate_"+H+"_"+F).value=="Y"){try{var G="GET";var A=true;xmlHttp=GetXmlHttpObject();bizActionMode="CHECK_AVAILABILITY";if(xmlHttp==null){alert(ajaxmessage)}else{action=D+"micros/checkavailability.ajax";paramString="BIZ_ACTION_MODE="+bizActionMode+"&iResultCount="+H+"&sSearchType="+E+"&iRoomCount="+F;if(G=="POST"){xmlHttp.open(G,action,A);xmlHttp.setRequestHeader("Content-Type","application/x-www-form-urlencoded");xmlHttp.send(paramString)}else{xmlHttp.open(G,action+"?"+paramString,A);xmlHttp.send(null)}xmlHttp.onreadystatechange=function(){if(xmlHttp.readyState==4){if(xmlHttp.responseText=="true"){form.action=B+"addhotelcart.do?tabHighLighter="+E;form.BIZ_ACTION_MODE.value="GET_INTO_CART";form.iSelectedResultCount.value=H;form.iSelectedRoomCount.value=F;form.submit()}else{alert("Currrently Rate unavailable")}}}}}catch(C){alert("Error in Checking availability ::::::::::: "+C)}}}else{form.action=B+"addhotelcart.do?tabHighLighter="+E;form.BIZ_ACTION_MODE.value="GET_INTO_CART";form.iSelectedResultCount.value=H;form.iSelectedRoomCount.value=F;form.submit()}}function bookHotelByRadioButton(R,G,E,Q){if(Q==null){Q=""}else{contextName=Q}try{var J=-1;var N=0;while(true){elementId="radiohotel_"+R+"_"+N;if(document.getElementById(elementId)){if(document.getElementById(elementId).checked){J=document.getElementById(elementId).value;break}}else{break}N++}if(J==-1){alert("Please select a rate to book")}else{if(document.getElementById("progressRowhot")){document.getElementById("progressRowhot").style.visibility="hidden";document.getElementById("progressRowhot").style.display="none"}if(document.getElementById("progressbookhot")){document.getElementById("progressbookhot").style.visibility="visible";document.getElementById("progressbookhot").style.display="";var P=document.getElementById("roomtype_"+R+"_"+N).innerHTML;document.getElementById("roomtype1").innerHTML=P;var L=document.getElementById("city").value;L=L.substring(0,L.lastIndexOf("-"));L=L.replace(/^\s+|\s+$/g,"");var C=document.getElementById("country").value;C=C.substring(0,C.lastIndexOf("-"));document.getElementById("searchlocation1").innerHTML=L+",&nbsp;"+C;var H=document.getElementById("hotelTitle_"+R).innerHTML;document.getElementById("hotelname1").innerHTML=H;var D=document.getElementById("depDate_id").value;var B=document.getElementById("leaveDate").value;var M=document.getElementById("DateDisplayFormat").value;if(E=="packages"){document.getElementById("roomtext").innerHTML="Rate per night :&nbsp;"}if(M=="MM/DD/YYYY"){var K=document.getElementById("depDate_id").value.split("/");D=K[1]+"/"+K[0]+"/"+K[2];var A=document.getElementById("leaveDate").value.split("/");B=A[1]+"/"+A[0]+"/"+A[2]}var F="";var I="";if(document.getElementById("dispamt_"+R+"_"+N)){F=document.getElementById("dispamt_"+R+"_"+N).innerHTML}if(document.getElementById("dispbookamt_"+R+"_"+N)){I=document.getElementById("dispbookamt_"+R+"_"+N).innerHTML}document.getElementById("roomrate1").innerHTML=F+"&nbsp;"+I;document.getElementById("checkin1").innerHTML=D;document.getElementById("checkout1").innerHTML=B;document.getElementById("documentBody").style.visibility="hidden";document.getElementById("documentBody").style.display="none"}if(J>-1){bookHotel(R,J,G,E,Q)}}}catch(O){alert(O)}}function showAllRoomType(F,E,A,D,C,H,B,G){if(A&&E!=0&&H){populateAllRoomType(F,D,"PEGASUS_RATES_CALL",E,C,H,B,G)}else{if(A=="false"){hotelCount=F;checkFidelioAvailRates(B,G)}else{document.getElementById("row"+F).style.visibility="visible";document.getElementById("row"+F).style.display=""}}}function hideAllRoomType(A){document.getElementById("row"+A).style.visibility="hidden";document.getElementById("row"+A).style.display="none"}function cancelPolicy(C,B){var A=window.open("getcancelpolicydetail.do?BIZ_ACTION_MODE=GET_CANCEL_POLICY_FOR_SUPPLIER&supplierId="+C+"&cancelId="+B,"cancelPolicy","scrollbars=no,resizable=yes,width=610,height=150");A.focus()}function childPolicy(C,B){var A=window.open("getchildpolicydetail.do?BIZ_ACTION_MODE=VIEW_CHILD_POLICY_DTL&supplierId="+C+"&policyId="+B,"childPolicy","scrollbars=yes,resizable=yes,width=400,height=150");A.focus()}function apiCancellation(B,C,M,K,E,P,G,F,D,J,N,O,H,L,A){var I=window.open("getcancelpolicydetail.do?BIZ_ACTION_MODE=GET_CANCEL_POLICY_FOR_API&supplier="+B+"&id="+C+"&provider="+M+"&currency="+K+"&hoteltype="+E+"&hotelstar="+P+"&adults="+J+"&fromdate="+F+"&todate="+D+"&citycode="+G+"&canPolicy="+N+"&hotelName="+O+"&supplierLoginId="+H+"&tariffBeanId="+L+"&tariffDtlId="+A,"apiCancellation","scrollbars=no,resizable=yes,width=610,height=150");I.focus()}function gettermsDOM(){var A=window.open("http://www.InstaTravel.com/cms/index.php?link=home&page=static&CM_Page_ID=7","gettermsDOM","scrollbars=yes,resizable=yes,width=750,height=650");A.focus()}function gettermsINT(){var A=window.open("http://www.InstaTravel.com/cms/index.php?link=home&page=static&CM_Page_ID=8","gettermsINT","scrollbars=yes,resizable=yes,width=750,height=650");A.focus()}function faredetail(A){A.action="faredetail.screen";A.target="foobar:width={615},height={320},scrollbars=yes";createTarget(A);A.submit()}function createTarget(form){_target=form.target;_colon=_target.indexOf(":");if(_colon!=-1){form.target=_target.substring(0,_colon);form.args=_target.substring(_colon+1)}else{if(typeof (form.args)=="undefined"){form.args=""}}if(form.args.indexOf("{")!=-1){_args=form.args.split("{");form.args=_args[0];for(var i=1;i<_args.length;i++){_args[i]=_args[i].split("}");form.args+=eval(_args[i][0])+_args[i][1]}}form.args=form.args.replace(/ /g,"");_win=window.open("",form.target,form.args);if(typeof (focus)=="function"){_win.focus()}return true}function getInclusion(A){A.action="hotelinclusion.screen";A.target="foobar:width={800},height={400},scrollbars";createTarget(A);A.submit()}function getTheDetails(B,A){detailMailInfo=window.open("","detailMailInfo","toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=1,width=630,height=550,left= 0,top = 0");B.target="detailMailInfo";B.BIZ_ACTION_MODE.value="EMAIL_HOTEL";B.action="emailhoteldetails.do?formIndex="+A;B.submit()}function getMap(A){var B=window.open(A,"Map","scrollbars=yes,resizable=yes,width=600,height=400");B.focus()}function getPegasusPricingDt(C,A,B,D){C.BIZ_ACTION_MODE.value="VIEW_PRICING_PEGASUS";C.action="pegasusdetailpricing.do?formIndex="+A+"&formCount="+B+"&IsPegasus="+D;C.submit()}var bizActionMode;var hotelCount;var viewRateImgPath="images/hotel_search_files/advenced_search_viewrates.gif";var ajaxProgressImgPath="images/viewrates.gif";var hotelId;var dexcrate;var ratecount;function populateAllRoomType1(B,D,G,A,C,F,A,E){populateAllRoomType(B,D,G,A,C,F,A,E)}function populateAllRoomType(D,B,K,J,G,E,J,F){if(F==null){F=""}else{contextName=F}try{var A="GET";var I=true;if(xmlHttp!=null){try{xmlHttp=null;document.getElementById("populateFunc"+D).style.visibility="visible";document.getElementById("populateFunc"+D).style.display="block";document.getElementById("populateFunc1"+D).style.visibility="hidden";document.getElementById("populateFunc1"+D).style.display="none"}catch(H){alert("Error in connecting to Server")}}hotelCount=D;hotelId=J;dexcrate=B;ratecount=G;xmlHttp=GetXmlHttpObject();if(xmlHttp==null){alert(ajaxmessage)}else{if(E){document.getElementById("populateFunc1"+hotelCount).style.visibility="visible";document.getElementById("populateFunc1"+hotelCount).style.display="block";document.getElementById("populateFunc"+hotelCount).style.visibility="hidden";document.getElementById("populateFunc"+hotelCount).style.display="none";hideAllRoomType(hotelCount);var C="";if(document.getElementById("budget")!=null){C=document.getElementById("budget").value}switchCurrency="<%=EnvVariables.APPLICATION_CURRENCY%>";if(document.getElementById("switchcurrency")){switchCurrency=document.getElementById("switchcurrency").value}action=F+"ratepopulate.ajax";paramString="BIZ_ACTION_MODE="+K+"&hotelCnt="+D+"&exchRate="+B+"&budget="+C+"&whitelabelcurrency="+switchCurrency+"&hotelId="+J+"&iRateCount="+G;ConnectServer(action,A,I,paramString)}}}catch(H){}finally{}}function processResponse(){try{if(xmlHttp.readyState==4&&xmlHttp.status==200){var B=xmlHttp.responseText;document.getElementById("populateFunc"+hotelCount).style.visibility="visible";document.getElementById("populateFunc"+hotelCount).style.display="block";document.getElementById("populateFunc1"+hotelCount).style.visibility="hidden";document.getElementById("populateFunc1"+hotelCount).style.display="none";if(B==null||B.indexOf("FAILURE",0)>-1||B==""){var A="Rates Not Available For Hotel at the Moment for the Search Conditions Specified";document.getElementById("row"+hotelCount).innerHTML=B;if(document.getElementById("ErrorDesc"+hotelCount)!=null&&document.getElementById("ErrorDesc"+hotelCount).innerHTML!=null){A=document.getElementById("ErrorDesc"+hotelCount).innerHTML}document.getElementById("row"+hotelCount).innerHTML='<table width="100%" border="0" cellspacing="0" cellpadding="0" id="mainratetable"><tr><td align="left" valign="top"><br><table width="100%" border="0" cellpadding="0" cellspacing="0" align="center" id="ratetable"><tr><td align="center" valign="middle" height="30"><span id="ErrorSpan_'+hotelCount+'" class="commentinfotext"><strong>'+A+"</strong></span></td></tr></table><br></td></tr></table><br>";showAllRoomType(hotelCount,hotelId,false,dexcrate,0,false,hotelId,contextName);document.getElementById("pegsratetext"+hotelCount).innerHTML="Lowest available rate<br/>(per room, per night)<br/>";document.getElementById("lowestavgrate"+hotelCount).innerHTML=sSoldOutText}else{checkFidelioAvailRates(hotelId,contextName);document.getElementById("row"+hotelCount).innerHTML=B;document.getElementById("populateFunc"+hotelCount).href="javascript:showAllRoomType('"+hotelCount+"','"+hotelId+"',false,'"+dexcrate+"','"+0+"',false,'"+hotelId+"','"+contextName+"');";document.getElementById("pegsratetext"+hotelCount).innerHTML="Lowest available rate<br/>(per room, per night)<br/>";var D=document.getElementById("MinRateSpan"+hotelCount).value;if(D==null||D.indexOf("NA")>-1){D=sSoldOutText}document.getElementById("lowestavgrate"+hotelCount).innerHTML=D}}}catch(C){}}function doFilter(I,B,E,D,O,F,J,H,C){if(H==null){H=""}else{contextName=H}var A="GET";var L="";var M=true;if(C){L=H+"pages/service/packages/offlinebooking/search_included_pages/packagesearchresult.jsp?"}else{L=H+"pages/service/hotel/offlinebooking/search_included_pages/hotelsearchresult.jsp?"}URL=L+"sliderFilter="+J+"&fromNo="+O+"&toNo="+F+"&sliderMinPrice="+I+"&sliderMaxPrice="+B+"&sliderStarStart="+E+"&sliderStarEnd="+D+"&whitelabelcurrency="+document.getElementById("switchcurrency").value;try{var G=document.getElementById("searchResultDiv");var N=document.getElementById("ajaxsearchprogress");if(xmlHttp!=null){try{xmlHttp.abort();N.style.visibility="hidden";N.style.display="none";G.style.visibility="visible";G.style.display=""}catch(K){}}xmlHttp=GetXmlHttpObject();if(xmlHttp){G.style.visibility="hidden";G.style.display="none";N.style.visibility="visible";N.style.display="";document.pageForm.fromNo.value=O;document.pageForm.toNo.value=F;document.pageForm.sliderMinPrice.value=I;document.pageForm.sliderMaxPrice.value=B;document.pageForm.sliderStarStart.value=E;document.pageForm.sliderStarEnd.value=D;xmlHttp.open(A,URL,M);xmlHttp.onreadystatechange=showResultInDiv;xmlHttp.send(null)}}catch(K){}}function doPagination(G,I,C,D,B){if(D==null){D=""}else{contextName=D}if("FIRST"==G){document.pageForm.fromNo.value=0;document.pageForm.toNo.value=I}else{if("PREV"==G){document.pageForm.fromNo.value=parseInt(document.pageForm.fromNo.value)-parseInt(I,10);document.pageForm.toNo.value=parseInt(document.pageForm.toNo.value)-parseInt(I,10)}else{if("NEXT"==G){document.pageForm.fromNo.value=parseInt(document.pageForm.fromNo.value)+parseInt(I);document.pageForm.toNo.value=parseInt(document.pageForm.toNo.value)+parseInt(I)}else{if("LAST"==G){document.pageForm.fromNo.value=(parseInt(C,10))*parseInt(I,10);document.pageForm.toNo.value=(parseInt(C,10)+1)*parseInt(I,10)}}}}var A="GET";var F="";var H=true;if(B){F=D+"pages/service/packages/offlinebooking/search_included_pages/packagesearchresult.jsp?"}else{F=D+"pages/service/hotel/offlinebooking/search_included_pages/hotelsearchresult.jsp?"}URL=F+"fromNo="+document.pageForm.fromNo.value+"&toNo="+document.pageForm.toNo.value+"&whitelabelcurrency="+document.getElementById("switchcurrency").value;try{if(xmlHttp!=null){try{xmlHttp.abort()}catch(E){}}xmlHttp=GetXmlHttpObject();if(xmlHttp){xmlHttp.open(A,URL,H);xmlHttp.onreadystatechange=showResultInDiv;xmlHttp.send(null)}}catch(E){}}function doSort(D,E,B){if(E==null){E=""}else{contextName=E}document.pageForm.radioFindBy.value=D;var A="GET";var G="";var H=true;if(B){G=E+"pages/service/packages/offlinebooking/search_included_pages/packagesearchresult.jsp?"}else{G=E+"pages/service/hotel/offlinebooking/search_included_pages/hotelsearchresult.jsp?"}URL=G+"radioFindBy="+D+"&whitelabelcurrency="+document.getElementById("switchcurrency").value;try{var C=document.getElementById("searchResultDiv");var I=document.getElementById("ajaxsearchprogress");if(xmlHttp!=null){try{xmlHttp.abort();I.style.visibility="hidden";I.style.display="none";C.style.visibility="visible";C.style.display=""}catch(F){}}xmlHttp=GetXmlHttpObject();if(xmlHttp){C.style.visibility="hidden";C.style.display="none";I.style.visibility="visible";I.style.display="";xmlHttp.open(A,URL,H);xmlHttp.onreadystatechange=showResultInDiv;xmlHttp.send(null)}}catch(F){}}function searchHotelByName(J,B,K,E,C){if(E==null){E=""}else{contextName=E}var A="GET";var H=true;if(C){sURL=E+"pages/service/packages/offlinebooking/search_included_pages/packagesearchresult.jsp?"}else{sURL=E+"pages/service/hotel/offlinebooking/search_included_pages/hotelsearchresult.jsp?"}URL=sURL+"searchHotelByName="+J+"&whitelabelcurrency="+document.getElementById("switchcurrency").value;try{document.pageForm.fromNo.value="0";document.pageForm.toNo.value="10"}catch(G){}try{var D=document.getElementById("searchResultDiv");var I=document.getElementById("ajaxsearchprogress");if(xmlHttp!=null){try{xmlHttp.abort();I.style.visibility="hidden";I.style.display="none";D.style.visibility="visible";D.style.display=""}catch(F){}}xmlHttp=GetXmlHttpObject();if(xmlHttp){D.style.visibility="hidden";D.style.display="none";I.style.visibility="visible";I.style.display="";xmlHttp.open(A,URL,H);xmlHttp.onreadystatechange=showResultInDiv;xmlHttp.send(null)}}catch(F){}}function showResultInDiv(){try{if(xmlHttp.readyState==4&&xmlHttp.status==200){var B=document.getElementById("searchResultDiv");var A=document.getElementById("ajaxsearchprogress");B.innerHTML=xmlHttp.responseText;document.getElementById("pageInfoTop").innerHTML=document.getElementById("sPageInfo").value;document.getElementById("pageInfoBottom").innerHTML=document.getElementById("sPageInfo").value;document.getElementById("pageLinkTop").innerHTML=document.getElementById("sPageLink").value;document.getElementById("pageLinkBottom").innerHTML=document.getElementById("sPageLink").value;document.getElementById("hotelListStartFocus").focus();A.style.visibility="hidden";A.style.display="none";B.style.visibility="visible";B.style.display=""}}catch(C){alert(C)}}function showHideAdvancedSearchDiv(){if(document.getElementById("advancedsearchDiv").style.visibility=="visible"){document.getElementById("advancedsearchDiv").style.visibility="hidden";document.getElementById("advancedsearchDiv").style.display="none"}else{document.getElementById("advancedsearchDiv").style.visibility="visible";document.getElementById("advancedsearchDiv").style.display=""}}function switchClientDisplayCurrency(E,C){var F="GET";var A=true;if(C){sURL=E+"pages/service/packages/offlinebooking/search_included_pages/packagesearchresult.jsp?"}else{sURL=E+"pages/service/hotel/offlinebooking/search_included_pages/hotelsearchresult.jsp?"}URL=sURL+"fromNo="+document.pageForm.fromNo.value+"&toNo="+document.pageForm.toNo.value+"&whitelabelcurrency="+document.getElementById("switchcurrency").value;var D=document.getElementById("searchResultDiv");var B=document.getElementById("ajaxsearchprogress");xmlHttp=GetXmlHttpObject();if(xmlHttp){D.style.visibility="hidden";D.style.display="none";B.style.visibility="visible";B.style.display="";xmlHttp.open(F,URL,A);xmlHttp.onreadystatechange=showResultInDiv;xmlHttp.send(null);setWhiteLabelCurrency(document.getElementById("switchcurrency").value)}}function setWhiteLabelCurrency(A){document.pageForm.whitelabelcurrency.value=A;document.frmCompare.whitelabelcurrency.value=A;document.hotelmasterlist.whitelabelcurrency.value=A}function displayStar(C,B){try{for(var A=0;A<7;A++){if(A>=C-1&&A<B){document.getElementById("imgstar"+A).setAttribute("src","images/hotel_search_files/starrating_fill.gif")}else{document.getElementById("imgstar"+A).setAttribute("src","images/hotel_search_files/starrating_blank.gif")}}}catch(D){alert(D)}}function isEnter(C,B){var A;if(window.event){A=window.event.keyCode}else{if(C){A=C.which}else{return false}}if(A==13){searchHotelByName(document.getElementById("searchHotelName").value,"","",B)}else{return false}}function showFidelioRates(A){}function checkIsAvail(A){if(fidelioRates!=null){if(fidelioRates.sKey!=null){return true}else{return false}}}function GiveNoNights(){var B;var A;NoOfNights=0;B=document.getElementById("Dday").value+"/"+document.getElementById("Dmon").value+"/"+document.getElementById("Dyear").value;A=document.getElementById("Lday").value+"/"+document.getElementById("Lmon").value+"/"+document.getElementById("Lyear").value;document.getElementById("depDate").value=B;diffDate(B,A)}function diffDate(H,G){depDateSet=new Date();var F=H.split("/");var D="20"+F[2];var E=F[1]-1;var B=F[0];depDateSet.setFullYear(D,E,B);var F=G.split("/");var D="20"+F[2];var E=F[1]-1;var B=F[0];var C=new Date(D,E,B);var A=1000*60*60*24;if(C<depDateSet){alert("Check out Date cannot be smaller than the Check in Date");document.hotelsearch.elements.noofnights.value=0}else{document.hotelsearch.elements.noofnights.value=Math.ceil((C.getTime()-depDateSet.getTime())/(A))}}function validateDate(D,C){var A=C;tdate=new Date();if(document.hotelsearch.domint.value=="domestic"){tdate.setDate(tdate.getDate()+3)}else{tdate.setDate(tdate.getDate()+7)}var E=tdate.getMonth()+1;if(E<10){E="0"+E}var H=tdate.getDate();var G=takeYear(tdate);var I=document.getElementById(D+"day").value;var B=document.getElementById(D+"mon").value;var F=document.getElementById(D+"year").value;if(D=="D"){if(F==G){if(B>E){}if(B<E){A=true}if(B==E){if(I<H){A=true}}}else{if(F<G){A=true}}}if(A){alert("Invalid Check in date")}return A}function takeYear(A){x=A.getYear();var B=x%100;B+=(B<38)?2000:1900;B=B.toString();B=B.substring(2,4);return B}function validateVal(){var A=false;var B=validateDate("D",false);if(!B){GiveNoNights()}if(document.hotelsearch.elements.noofnights.value>0&&!B){A=true}return A}function BackToSearch(){document.hotelsearch.action="offlinebookinghotelsearchview.do";document.hotelsearch.BIZ_ACTION_MODE.value="HOTEL_SEARCH_VIEW";document.hotelsearch.submit()}function getCityList(){document.hotelsearch.action="offlinebookinghotelsearchview.do";document.hotelsearch.BIZ_ACTION_MODE.value="HOTEL_SEARCH_VIEW_CITY";document.hotelsearch.submit()}function submitsearch(A){document.hotelsearch.action="offlinebookinghotelsearchresult.do";document.hotelsearch.BIZ_ACTION_MODE.value="HOTEL_SEARCH_LIST";document.hotelsearch.submit()}function showHide(){document.getElementById("search").style.visibility=(document.getElementById("search").style.visibility=="visible")?"hidden":"visible";document.getElementById("search").style.display=(document.getElementById("search").style.display=="none")?"":"none"}function fnGetCity(A){if(A=="domestic"){document.getElementById("inter").className="";document.getElementById("dom").className="boldFont"}if(A=="international"){document.getElementById("inter").className="boldFont";document.getElementById("dom").className=""}document.hotelsearch.action="hotelsearchchangecountryview.do";document.hotelsearch.BIZ_ACTION_MODE.value="HOTEL_SEARCH_IN_CHANGE_COUNTRY";document.hotelsearch.submit()}function showhide(E,A){try{var B=parseInt(A,10);var D=0;if(document.getElementById("mydiv"+B)){while(true){D++;if(document.getElementById("mydiv"+D)){if(D<=B){document.getElementById("mydiv"+D).style.visibility="visible";document.getElementById("mydiv"+D).style.display=""}else{document.getElementById("mydiv"+D).style.visibility="hidden";document.getElementById("mydiv"+D).style.display="none"}}else{break}}}}catch(C){}}function showage(C,B){if(parseInt(C)>0){document.getElementById("schildage"+B).style.visibility="visible";document.getElementById("schildage"+B).style.display="";for(var A=1;A<=parseInt(C);A++){document.getElementById("childagevalue"+B+A).style.visibility="visible";document.getElementById("childAge"+B+A).style.visibility="visible";document.getElementById("childAge"+B+A).style.display=""}}else{document.getElementById("schildage"+B).style.visibility="hidden";document.getElementById("schildage"+B).style.display="none"}for(var A=parseInt(C)+1;;A++){if(!document.getElementById("childagevalue"+B+A)||!document.getElementById("childAge"+B+A)){break}document.getElementById("childagevalue"+B+A).style.visibility="hidden";document.getElementById("childAge"+B+A).style.visibility="hidden";document.getElementById("childAge"+B+A).style.display="none"}}function showhidechild(F,H,B){var G=H.substring(H.length-1);var E=H.substring(0,3);var C=H.substring(4,5);var D=0;if(G!="C"){document.getElementById("adult"+B).value=G;document.getElementById("adult"+B).selected=true}if("C"==G){document.getElementById("schild"+B).style.visibility="visible";document.getElementById("schild"+B).style.display="";document.getElementById("childvalue"+B).style.visibility="visible";document.getElementById("childvalue"+B).style.display="";document.getElementById("extra"+B).style.visibility="visible";document.getElementById("extra"+B).style.display="";document.getElementById("extravalue"+B).style.visibility="visible";document.getElementById("extravalue"+B).style.display="";if(E=="DBL"){document.getElementById("adult"+B).value=2;document.getElementById("adult"+B).selected=true}if(E=="TRP"){document.getElementById("adult"+B).value=3;document.getElementById("adult"+B).selected=true}if(E=="QUD"){document.getElementById("adult"+B).value=4;document.getElementById("adult"+B).selected=true}document.getElementById("child"+B).value=C;document.getElementById("child"+B).selected=true;D=C;showage(C,B)}else{document.getElementById("schildage"+B).style.visibility="hidden";document.getElementById("schildage"+B).style.display="none";document.getElementById("showtextschildage"+B).style.visibility="hidden";document.getElementById("showtextschildage"+B).style.display="none";for(var A=2;A>=parseInt(D)+1;A--){document.getElementById("childagevalue"+B+A).style.visibility="hidden";document.getElementById("childagevalue"+B+A).style.display="none";document.getElementById("childAge"+B+A).style.visibility="hidden";document.getElementById("childAge"+B+A).style.display="none"}document.getElementById("schild"+B).style.visibility="hidden";document.getElementById("schild"+B).style.display="none";document.getElementById("childvalue"+B).style.visibility="hidden";document.getElementById("childvalue"+B).style.display="none";document.getElementById("extra"+B).style.visibility="hidden";document.getElementById("extra"+B).style.display="none";document.getElementById("extravalue"+B).style.visibility="hidden";document.getElementById("extravalue"+B).style.display="none"}}function checkValue(){var C=document.hotelsearch.elements.noofnights.value;var B="";var A="N";if(!isNumber(parseInt(C,10))){B="\n ::Check the value for NoOfNights \n Please enter a proper INTEGER value";A="Y"}if(isNegative(C)){B=B+"\n ::Negative Values are not allowed";A="Y"}if(A=="N"){changeDepdate(C)}else{alert("Error!!\n"+B);B=""}}function changeDepdate(I){var D=new Date();var H=document.hotelsearch.elements.depDate.value;var A=H.split("/");var E="20"+A[2];var C=A[1]-1;var F=parseInt(A[0],10)+parseInt(I);D.setFullYear(E,C,F);var B=D.getDate();var E=D.getFullYear();var C=D.getMonth()+1;var G=B+"/"+C+"/"+E;document.hotelsearch.elements.leaveDate.value=G}function diffDate(){var A=document.hotelsearch.elements.depDate.value;var E=document.hotelsearch.elements.leaveDate.value;depDateSet=new Date();var B=A.split("/");var H="20"+B[2];var F=B[1]-1;var I=B[0];depDateSet.setFullYear(H,F,I);var B=E.split("/");var H="20"+B[2];var F=B[1]-1;var I=B[0];var G=new Date(H,F,I);var C=1000*60*60*24;iNoOfNights=Math.ceil((G.getTime()-depDateSet.getTime())/(C));if(isNaN(iNoOfNights)||iNoOfNights<0){iNoOfNights=0}document.hotelsearch.elements.noofnights.value=iNoOfNights;var D="";if(Math.ceil((G.getTime()-depDateSet.getTime())/(C))>1){D="nights"}else{D="night"}document.getElementById("nite").style.visibility="visible";document.getElementById("nite").style.display="";document.getElementById("nite").innerHTML=D}function isNumber(A){return typeof A=="number"&&isFinite(A)}function isNegative(A){if((parseInt(A,10))<0){return true}return false}function submitval(Z,D){var Y="";error=true;if(document.getElementById("country").value==""){Y=Y+"Please fill in suitable country in 'country' field\n";error=false}if(document.getElementById("depDate_id").value==""||document.getElementById("depDate_id").value=="dd/mm/yy"){Y=Y+"Please fill in suitable date in 'check in date' field\n";error=false}if(document.getElementById("night_id").value==0){Y=Y+"No of Nights cannot be empty\n";error=false}if(document.getElementById("rooms").value==0){Y=Y+"No of Rooms cannot be zero\n";error=false}var E=0;var H=parseInt(document.getElementById("rooms").value);if(E>=10){error=false;Y=Y+"The maximum number of passengers allowed is 9\n"}if(error==false){alert("Following fields requires correction:\n"+Y)}else{if(document.getElementById("progressRowhot")){document.getElementById("progressRowhot").style.visibility="visible";document.getElementById("progressRowhot").style.display="";var U=document.getElementById("city").value;U=U.substring(0,U.lastIndexOf("-"));U=U.replace(/^\s+|\s+$/g,"");var G=document.getElementById("country").value;G=G.substring(0,G.lastIndexOf("-"));document.getElementById("location2").innerHTML=U+",&nbsp;"+G;document.getElementById("nites2").innerHTML=document.getElementById("night_id").value;document.getElementById("norooms2").innerHTML=document.getElementById("rooms").value;var N=document.getElementById("hotelName").value;if(N==""){N="Any"}document.getElementById("searchhotelname2").innerHTML=N;var I=document.getElementById("whitelabelcurrency").value;var L=document.getElementById("budget").selectedIndex;var C=document.getElementById("budget").options[L].innerHTML;if(C==""||C=="Any"){I=""}document.getElementById("pricerange2").innerHTML=C;document.getElementById("pricecurrency2").innerHTML=I;var M=document.getElementsByName("filterHotelStarRating");var X="";if((M[0].checked&&M[1].checked&&M[2].checked)||(!M[0].checked&&!M[1].checked&&!M[2].checked)){X+="All"}else{for(var W=0;W<M.length;W++){if(M[W].checked){if(W==0){X+="5"}if(W==1){if(X.length>=1){X+=",4"}else{X+="4"}}if(W==2){if(X.length>=1){X+=",3"}else{X+="3"}}}}if(M[2].checked){X+=" Star & below"}else{X+=" Star"}}var K=document.getElementById("depDate_id").value;var F=document.getElementById("leaveDate").value;var V=document.getElementById("DateDisplayFormat").value;if(V=="MM/DD/YYYY"){var R=document.getElementById("depDate_id").value.split("/");K=R[1]+"/"+R[0]+"/"+R[2];var B=document.getElementById("leaveDate").value.split("/");F=B[1]+"/"+B[0]+"/"+B[2]}var a=document.getElementById("rooms").value;var P="";for(var S=0;S<a;S++){var T=S+1;var A=document.getElementById("adult"+T).value;var Q=document.getElementById("child"+T).value;var J="";var O="";if(A>1){J="s"}if(Q>1){O="&nbsp;Children"}else{if(Q==1){O="&nbsp;Child"}}if(Q<=0){P+="<strong>Room "+T+":</strong>&nbsp;"+A+"&nbsp;Adult"+J+"<br/><br/>"}else{P+="<strong>Room "+T+":</strong>&nbsp;"+A+"&nbsp;Adult"+J+","+Q+O+"<br/><br/>"}}document.getElementById("roominfo2").innerHTML=P;document.getElementById("chkin2").innerHTML=K;document.getElementById("chkout2").innerHTML=F;document.getElementById("starating2").innerHTML=X;document.getElementById("documentBody").style.visibility="hidden";document.getElementById("documentBody").style.display="none"}if(document.getElementById("package")){if(document.getElementById("package").value=="Y"){document.hotelsearch.action=D+"offlinebookinghotelsearchresult.do?productType=HOT&tabHighLighter=packages";document.hotelsearch.BIZ_ACTION_MODE.value="PACKAGE_SEARCH_LIST"}else{document.hotelsearch.action=D+"offlinebookinghotelsearchresult.do?productType=HOT&tabHighLighter=hotels";document.hotelsearch.BIZ_ACTION_MODE.value="HOTEL_SEARCH_LIST"}}else{document.hotelsearch.action=D+"offlinebookinghotelsearchresult.do?productType=HOT&tabHighLighter=hotels";document.hotelsearch.BIZ_ACTION_MODE.value="HOTEL_SEARCH_LIST"}if(document.getElementById("cbDomInt")!=null&&document.getElementById("cbDomInt").checked==true){cbNationality=document.getElementById("cbDomInt").value;document.getElementById("select").value=cbNationality}document.hotelsearch.submit()}}function startNewSearch(B){var A;if(document.getElementById("isShortHomeName").value=="true"){document.hotelsearch.action=B+"main.do?BIZ_ACTION_MODE=ADVANCED_SEARCH&tabHighLighter=hotels"}else{if(document.getElementById("package")){if(document.getElementById("package").value=="Y"){document.hotelsearch.action=B+"main.do?BIZ_ACTION_MODE=SEARCHPACKAGE&tabHighLighter=packages"}else{document.hotelsearch.action=B+"main.do?BIZ_ACTION_MODE=&productType=HOT&hotels=hotels"}}else{document.hotelsearch.action=B+"main.do?BIZ_ACTION_MODE=&productType=HOT&hotels=hotels"}}document.hotelsearch.submit()}objClickedDateComponent=null;previousValueOfClickedDateComponent=null;function startGuessingDate(B){document.hotelsearch.elements.leaveDate.value="-";objClickedDateComponent=B;previousValueOfClickedDateComponent=B.value;var A=document.getElementById("leaveDate");if(A!=null&&A.value!=""){runTillUserChangesDate()}}function startGuessingDate2(B){document.hotelsearch.elements.depDate.value="-";objClickedDateComponent=B;previousValueOfClickedDateComponent=B.value;var A=document.getElementById("depDate_id");if(A!=null&&A.value!=""){runTillUserChangesDate()}}function runTillUserChangesDate(){var A=objClickedDateComponent.value;if(previousValueOfClickedDateComponent==A){setTimeout("runTillUserChangesDate()",50)}else{javascript:diffDate()}}function isEnter(C){var A;if(window.event){A=window.event.keyCode}else{if(C){A=C.which}else{return false}}if(A==13){var B="";error=true;if(document.getElementById("country").value==""){B=B+"Please fill in suitable country in 'country' field\n";error=false}if(document.getElementById("depDate_id").value==""||document.getElementById("depDate_id").value=="dd/mm/yy"){B=B+"Please fill in suitable date in 'check in date' field\n";error=false}if(document.getElementById("night_id").value==0){B=B+"No of Nights cannot be empty\n";error=false}if(document.getElementById("rooms").value==0){B=B+"No of Rooms cannot be zero\n";error=false}var E=0;var D=parseInt(document.getElementById("rooms").value);if(E>=10){error=false;B=B+"The maximum number of passengers allowed is 9\n"}if(error==false){alert("Following fields requires correction:\n"+B)}else{if(document.getElementById("progressRowhot")){document.getElementById("progressRowhot").style.visibility="visible";document.getElementById("progressRowhot").style.display="";document.getElementById("documentBody").style.visibility="hidden";document.getElementById("documentBody").style.display="none"}document.hotelsearch.action="offlinebookinghotelsearchresult.do?productType=HOT&tabHighLighter=hotels";document.hotelsearch.BIZ_ACTION_MODE.value="HOTEL_SEARCH_LIST";if(document.getElementById("cbDomInt")!=null&&document.getElementById("cbDomInt").checked==true){cbNationality=document.getElementById("cbDomInt").value;document.getElementById("select").value=cbNationality}document.hotelsearch.submit()}}else{return false}}var calWin;var iMonthVal=36;var IE=document.all?true:false;var ajaxmessage="AJAX Call can not be made......Browser does not support HTTP Request";var xmlHttp;function newCal(C){if(C=="depart"){var B=document.getElementById("calimage2")}else{var B=document.getElementById("calimage1")}var A=elementPosition(B);mouseX=parseInt(A.x,10);mouseY=parseInt(A.y,10);if(IE){calWin=window.open("cal.screen?src="+C,"Calendar","location=no,menubar=no,toolbar=no,status=no,resize=yes,width=200,height=155,left="+mouseX+",top="+mouseY)}else{calWin=window.open("cal.screen?src="+C,"Calendar","location=no,menubar=no,toolbar=no,status=no,resize=yes,width=265,height=155,left="+mouseX+",top="+mouseY)}}function elementPosition(B){var C=0,A=0;if(B.offsetParent){if(IE){C=B.offsetLeft;A=B.offsetTop+110}else{C=B.offsetLeft;A=B.offsetTop+175}while(B=B.offsetParent){C+=B.offsetLeft;A+=B.offsetTop}}return{x:C,y:A}}function set_dates(){var G="";var B="";var F=document.hotelsearch.start_mon.options[document.hotelsearch.start_mon.options.selectedIndex].value;var C=document.hotelsearch.start_date.options[document.hotelsearch.start_date.options.selectedIndex].value;var A=document.hotelsearch.end_mon.options[document.hotelsearch.end_mon.options.selectedIndex].value;var J=document.hotelsearch.end_date.options[document.hotelsearch.end_date.options.selectedIndex].value;var I=F.substring(0,F.indexOf("_"));var H=F.substring(F.indexOf("_")+1);if(parseInt(I)<10){I="0"+I}var E=A.substring(0,A.indexOf("_"));var D=A.substring(A.indexOf("_")+1);if(parseInt(E)<10){E="0"+E}document.hotelsearch.depDate.value=C+"/"+I+"/"+H;document.hotelsearch.leaveDate.value=J+"/"+E+"/"+D;document.hotelsearch.submit()}var disp_mon=new Array("Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec");var curr_date=new Date();var curr_mon=curr_date.getMonth();var curr_year=curr_date.getFullYear();var current_date=curr_date.getDate();function MM_openBrWindow(C,A,B){window.open(C,A,B)}function getdatediff(){var P=new Date();var B=document.hotelsearch.startmonth.options[document.hotelsearch.startmonth.options.selectedIndex].value;var K=document.hotelsearch.startdate.options[document.hotelsearch.startdate.options.selectedIndex].value;var H=document.hotelsearch.endmonth.options[document.hotelsearch.endmonth.options.selectedIndex].value;var M=document.hotelsearch.enddate.options[document.hotelsearch.enddate.options.selectedIndex].value;var O=B.substring(0,B.indexOf("_"));var S=B.substring(B.indexOf("_")+1);if(parseInt(O)<10){O="0"+O}var N=H.substring(0,H.indexOf("_"));var R=H.substring(H.indexOf("_")+1);if(parseInt(N)<10){N="0"+N}document.hotelsearch.depDate.value=K+"/"+O+"/"+S;document.hotelsearch.leaveDate.value=M+"/"+N+"/"+R;P=new Date(P.getYear()+1900,P.getMonth(),P.getDate());var D=new Date(S,O-1,K);var A=new Date(R,N-1,M);var F=1000*60*60*24;var J=(Math.ceil((D.getTime()-P.getTime())/(F)));var I=(Math.ceil((A.getTime()-P.getTime())/(F)));var E=I-J;if(E>0){document.hotelsearch.noofnights.value=I-J;document.getElementById("label_night_id").innerHTML=I-J;if(E==1){document.getElementById("nite").innerHTML="<label>night</label>"}else{document.getElementById("nite").innerHTML="<label>nights</label>"}}else{A.setTime(D.getTime()+F);var G=D.getDate();var Q=(D.getMonth()+1)+"_"+D.getFullYear();var C=A.getDate();var L=(A.getMonth()+1)+"_"+A.getFullYear();if(parseInt(G)<10){G="0"+G}if(parseInt(C)<10){C="0"+C}document.hotelsearch.startmonth.value=Q;document.hotelsearch.startdate.value=G;document.hotelsearch.endmonth.value=L;document.hotelsearch.enddate.value=C;getdatediff()}document.getElementById("nite").style.visibility="visible";document.getElementById("nite").style.display=""}function adjustpricerange(D){var F="POST";var B=true;try{var A="pages/service/hotel/ajax/currencytopricerangeconverter.jsp";var E="whitelabelcurrency="+document.getElementById("whitelabelcurrency").value;if(xmlHttp!=null){try{xmlHttp=null}catch(C){alert("Error :::::::: "+C)}}xmlHttp=GetXmlHttpObject();if(xmlHttp){xmlHttp.open(F,A,B);xmlHttp.setRequestHeader("Content-Type","application/x-www-form-urlencoded");xmlHttp.onreadystatechange=adjustPriceRangeCombo;xmlHttp.send(E)}}catch(C){}}function adjustPriceRangeCombo(){try{if(xmlHttp.readyState==4&&xmlHttp.status==200){var D=xmlHttp.responseText;var C=D.parseJSON();var A=document.getElementById("budget");A.options.length=0;A.options[0]=new Option("Any","");if(C!=null&&C.length>0){for(iCnt=0;iCnt<C.length;iCnt++){var B=iCnt+1;A.options[B]=new Option(C[iCnt].WLPriceRange,C[iCnt].basePriceRange)}}}}catch(E){}}function isEnter(B,D){var A;if(window.event){A=window.event.keyCode}else{if(D){A=D.which}else{return false}}if(A==13){var C="";error=true;if(document.getElementById("depDate_id").value==""||document.getElementById("depDate_id").value=="dd/mm/yy"){C=C+"Please fill in suitable date in 'check in date' field\n";error=false}if(document.getElementById("night_id").value==0){C=C+"No of Nights cannot be empty\n";error=false}if(document.getElementById("rooms").value==0){C=C+"No of Rooms cannot be zero\n";error=false}var F=0;var E=parseInt(document.getElementById("rooms").value);if(F>=10){error=false;C=C+"The maximum number of passengers allowed is 9\n"}if(error==false){alert("Following fields requires correction:\n"+C)}else{if(document.getElementById("progressRowhot")){document.getElementById("progressRowhot").style.visibility="visible";document.getElementById("progressRowhot").style.display="";document.getElementById("documentBody").style.visibility="hidden";document.getElementById("documentBody").style.display="none"}document.hotelsearch.action=B+"offlinebookinghotelsearchresult.do?productType=HOT&tabHighLighter=hotels";document.hotelsearch.BIZ_ACTION_MODE.value="HOTEL_SEARCH_LIST";if(document.getElementById("cbDomInt")!=null&&document.getElementById("cbDomInt").checked==true){cbNationality=document.getElementById("cbDomInt").value;document.getElementById("select").value=cbNationality}document.hotelsearch.submit()}}else{return false}}var sJasonString;var sJasonStringAJAX;var sTodayDt;var sTodayMth;var sTodayYr;function displayDiv(E){C=0;while(document.getElementById("tabDiv"+C)){if(C==E){document.getElementById("tabDiv"+C).style.visibility="visible";document.getElementById("tabDiv"+C).style.display="block"}else{document.getElementById("tabDiv"+C).style.visibility="hidden";document.getElementById("tabDiv"+C).style.display="none"}C++}if(E==4){javascript:Hashtable();hashtable_clear();var A=sJasonString.parseJSON();for(var C=0;C<A.length;C++){hashtable_put(A[C]._sDate,A[C]._sDisplayAmount);var I="allocation"+A[C]._sDate;hashtable_put(I,A[C].isAllocationAvailable);if("Y"==A[C].isAllocationAvailable){var F="allocQty_"+A[C]._sDate;hashtable_put(F,A[C].roomsAvailable)}}hashtable_put("sTodayDate",sTodayDt);hashtable_put("sTodayMonth",sTodayMth);hashtable_put("sTodayYear",sTodayYr);var H=2+parseInt(sTodayMth,10);var D=sTodayYr;if(H==13){H="1";D=1+parseInt(sTodayYr,10)}var J=1+parseInt(sTodayMth,10);var G=sTodayYr;if(H==13){H="1";D=1+parseInt(sTodayYr,10)}var B="01-"+J+"-"+G;javascript:show_calendar1("","01-"+J+"-"+G);javascript:show_calendar2("","01-"+H+"-"+D)}}var xmlHttp;var bizActionMode;var iOption;var FstCalMonth;var ScdCalMonth;function getDayRates(C,A,F){iOption=F;FstCalMonth=C;ScdCalMonth=A;bizActionMode="GET_DAY_RATES";var G="GET";var B=true;xmlHttp=GetXmlHttpObject();if(xmlHttp==null){alert(ajaxmessage)}else{action="ratepopulate.ajax";paramString="BIZ_ACTION_MODE=GET_DAY_RATES&FirstCalMonth="+formatdate(dt2dtstr2(str2dt2(C)))+"&SecondCalMonth="+formatdate(dt2dtstr2(str2dt2(A)))+"&iSglQty="+document.getElementById("iSglQty").value+"&iTwnQty="+document.getElementById("iTwnQty").value+"&iDblQty="+document.getElementById("iDblQty").value+"&iTrpQty="+document.getElementById("iTrpQty").value+"&iQudQty="+document.getElementById("iQudQty").value+"&sHotelId="+document.getElementById("sHotelId").value+"&sSupplierId="+document.getElementById("sSupplierId").value+"&iTariffBeanCnt="+document.getElementById("iTariffBeanCnt").value+"&clientId="+document.getElementById("clientId").value+"&whitelabelcurrency="+document.hotelmasterlist.whitelabelcurrency.value;xmlHttp.onreadystatechange=processResponse2;xmlHttp.open(G,action+"?"+paramString,B);xmlHttp.send(null);var E=document.getElementById("delayDiv");var D=document.getElementById("dataDiv");if(E!=null&&D!=null){E.style.visibility="visible";E.style.display="block"}}}function formatdate(C){var D=new Array;D=C.split("-");var A=D[0];if(A.length==1){A="0"+A}var E=D[1];if(E.length==1){E="0"+E}var B=E+"/"+A+"/"+D[2].substring(2);return B}function processResponse2(){try{if(xmlHttp.readyState==4&&xmlHttp.status==200){if("GET_DAY_RATES"==bizActionMode){sJasonStringAJAX=xmlHttp.responseText;javascript:Hashtable();hashtable_clear();if(""==sJasonStringAJAX){}else{var G=sJasonStringAJAX.parseJSON();for(var E=0;E<G.length;E++){hashtable_put(G[E]._sDate,G[E]._sDisplayAmount);var D="allocation"+G[E]._sDate;hashtable_put(D,G[E].isAllocationAvailable);if("Y"==G[E].isAllocationAvailable){var C="allocQty_"+G[E]._sDate;hashtable_put(C,G[E].roomsAvailable)}if(E==(G.length-1)){document.getElementById("MinAmount").innerHTML="Room Rates from "+G[E]._sMinAmount}}}hashtable_put("sTodayDate",sTodayDt);hashtable_put("sTodayMonth",sTodayMth);hashtable_put("sTodayYear",sTodayYr);setDisplayMonth(iOption,FstCalMonth,"FirstCal");setDisplayMonth(iOption,ScdCalMonth,"SecondCal");var B=document.getElementById("delayDiv");var A=document.getElementById("dataDiv");if(B!=null&&A!=null){B.style.visibility="hidden";B.style.display="block"}}}}catch(F){alert("An Error Has Occured !!!!!!!...."+F)}}function showHotelRateRuleInfo(E,A,B,D){var C=window.open(D+"getratedtlinfo.do?BIZ_ACTION_MODE=GET_RATE_RULE_INFO&tariffBeanCnt="+E+"&tariffBeanDtlCnt="+A+"&hidSupplierId="+B,"Raterules","scrollbars=yes,resizable=yes,width=700,height=300");C.focus()}function shownext(B){var E=document.getElementById("imagesize").value;document.getElementById("icount").value=B;var A=document.getElementById("nextButton"+B);for(var D=0;D<E;D++){var C=document.getElementById("image"+D);if(D==B){C.style.visibility="visible";C.style.display=""}else{C.style.visibility="hidden";C.style.display="none"}}}function showprev(B){var E=document.getElementById("imagesize").value;document.getElementById("icount").value=B;var A=document.getElementById("nextButton"+B);for(var D=0;D<E;D++){var C=document.getElementById("image"+D);if(D==B){C.style.visibility="visible";C.style.display=""}else{C.style.visibility="hidden";C.style.display="none"}}}function doPaginationImage(B){var C=parseInt(document.getElementById("imagesize").value);var A=0;if("NEXT"==B){document.getElementById("icount").value=parseInt(document.getElementById("icount").value)+1;A=parseInt(document.getElementById("icount").value);if(A==C-1){document.getElementById("nextButton").style.visibility="hidden";document.getElementById("nextButton").style.display="none"}document.getElementById("prevButton").style.visibility="visible";document.getElementById("prevButton").style.display=""}if("PREV"==B){document.getElementById("icount").value=parseInt(document.getElementById("icount").value)-1;A=parseInt(document.getElementById("icount").value);if(A<=0){document.getElementById("prevButton").style.visibility="hidden";document.getElementById("prevButton").style.display="none"}document.getElementById("nextButton").style.visibility="visible";document.getElementById("nextButton").style.display=""}for(var F=0;F<C;F++){var E=document.getElementById("image"+F);var D=A;if(F==D){E.style.visibility="visible";E.style.display=""}else{E.style.visibility="hidden";E.style.display="none"}}}function refresh(){if(document.getElementById("image"+0)!=null){var A=document.getElementById("image"+0);A.style.visibility="visible";A.style.display=""}document.getElementById("prevButton").style.visibility="hidden";document.getElementById("prevButton").style.display="none"}function goBackToHotelResults(B,D){try{var F=document.hotelmasterlist;if(D=="Y"){F.action="packagetariffdetail.screen"}else{F.action="hoteltariffdetail.screen"}var C=Math.floor(B/10)*10;var A=Math.ceil(B/10)*10;if(C==A){A+=10}F.fromNo.value=C;F.toNo.value=A;F.submit()}catch(E){alert(E)}}function goBackToHotelResultsFeeds(A){try{var C=document.hotelmasterlist;C.action=A;C.submit()}catch(B){alert(B)}}var divFocus=false;var clseLnkId="";function tooltip_getleft(B){var A=B.offsetLeft;B=B.offsetParent;while(B){A+=B.offsetLeft;B=B.offsetParent}return A}function tooltip_gettop(B){var A=B.offsetTop;B=B.offsetParent;while(B){A+=B.offsetTop;B=B.offsetParent}return A}function moveDivFocus(A){if(divFocus){document.getElementById(A).focus()}divFocus=false}function focusLink(A){document.getElementById(A).focus();divFocus=true}function hidetooltip(A){if(!divFocus){document.getElementById(A).style.display="none"}if(divFocus){document.getElementById(clseLnkId).focus()}}function forcehidetooltip(A){divFocus=false;document.getElementById(A).style.display="none"}function displaytooltip(A,B,C){clseLnkId=C;t=document.getElementById(A);if(B){m=B}else{m=document.getElementById(B)}t.style.left=tooltip_getleft(m)+"px";t.style.top=tooltip_gettop(m)+"px";document.getElementById(A).style.display="inline";document.getElementById(A).focus();document.getElementById(C).focus()};