var IE=document.all?true:false;var mapViewwindow;var loadimages=new Array();function showpopup(){document.getElementById("detailspopup").style.display="";var a='<div class="mainblock" style="z-index:1003;"><table width="190" border="0" cellspacing="0" cellpadding="0"><tr><td></td><td colspan="2" class="topbg"><table width="180" border="0" align="right" cellpadding="0" cellspacing="0"><tr><td width="15">&nbsp;</td><td width="151" class="number">Booking Details </td><td width="24"><a href=javascript:closepopup();><img src="/images/xhotelv2/closesign.gif" border="0" width="14" height="25" /></a></td></tr></table></td></tr><tr><td width="21" align="right" valign="top" style="padding-top:30px"><img src="/images/xhotelv2/popuparrow.gif" width="20" height="25" /></td><td width="6" style="background-color:#ffffff;"><img src="/images/xhotelv2/leftline.gif" width="1" height="131" /></td><td width="185" class="leftright"><form name="hotelDetails" method="get" style="margin:0px;"><table width="100%" height="131" border="0" align="left" cellpadding="0" cellspacing="0" style="background-color:#ffffff;"><tr><td width="35%" class="bodytext">Check-in</td><td align="left" width="14%"><select id="chiDate" name="chiDate" size="1"><option value="">dd</option><option value="01">01</option><option value="02">02</option><option value="03">03</option><option value="04">04</option><option value="05">05</option><option value="06">06</option><option value="07">07</option><option value="08">08</option><option value="09">09</option><option value="10">10</option><option value="11">11</option><option value="12">12</option><option value="13">13</option><option value="14">14</option><option value="15">15</option><option value="16">16</option><option value="17">17</option><option value="18">18</option><option value="19">19</option><option value="20">20</option><option value="21">21</option><option value="22">22</option><option value="23">23</option><option value="24">24</option><option value="25">25</option><option value="26">26</option><option value="27">27</option><option value="28">28</option><option value="29">29</option><option value="30">30</option><option value="31">31</option></select></td><td align="left"><select id="chiMonthYear" name="chiMonthYear"><option value="">mm/yy</option><option value="03/2008">March 08</option><option value="04/2008">April 08</option><option value="05/2008">May 08</option><option value="06/2008">June 08</option><option value="07/2008">July 08</option><option value="03/2008">Mar 08</option><option value="04/2008">Apr 08</option><option value="05/2008">May 08</option><option value="08/2008">Aug 08</option><option value="09/2008">Sept 08</option><option value="10/2008">Oct 08</option><option value="11/2008">Nov 08</option><option value="10/2008">Oct 08</option><option value="10/2008">Nov 08</option><option value="11/2008">Dec 08</option><option value="12/2008">Sep 08</option></select></td></tr><tr><td class="bodytext">Check-out</td><td align="left" width="14%"><select id="choDate" name="choDate" size="1"><option value="">dd</option><option value="01">01</option><option value="02">02</option><option value="03">03</option><option value="04">04</option><option value="05">05</option><option value="06">06</option><option value="07">07</option><option value="08">08</option><option value="09">09</option><option value="10">10</option><option value="11">11</option><option value="12">12</option><option value="13">13</option><option value="14">14</option><option value="15">15</option><option value="16">16</option><option value="17">17</option><option value="18">18</option><option value="19">19</option><option value="20">20</option><option value="21">21</option><option value="22">22</option><option value="23">23</option><option value="24">24</option><option value="25">25</option><option value="26">26</option><option value="27">27</option><option value="28">28</option><option value="29">29</option><option value="30">30</option><option value="31">31</option></select></td><td align="left"><select id="choMonthYear" name="choMonthYear"><option value="">mm/yy</option><option value="10/2007">Oct 07</option><option value="11/2007">Nov 07</option><option value="12/2007">Dec 07</option><option value="01/2008">Jan 08</option><option value="02/2008">Feb 08</option><option value="03/2008">Mar 08</option><option value="04/2008">Apr 08</option><option value="05/2008">May 08</option><option value="06/2008">Jun 08</option><option value="07/2008">Jul 08</option><option value="08/2008">Aug 08</option><option value="09/2008">Sep 08</option><option value="10/2008">Oct 08</option><option value="10/2008">Nov 08</option><option value="11/2008">Dec 08</option><option value="12/2008">Sep 08</option></select></td></tr></form><tr><td colspan="3" align="center" class="findflight"><input type="image" src="/images/xhotelv2/findhotel.gif" id="hotelform" onclick=go_detail("hotelDetails"); /></td></tr></table></td></tr><tr><td colspan="3" valign="top"><img src="/images/xhotelv2/bottomline.gif" width="211" height="5" /></td></tr></table></div>';document.getElementById("detailspopup").innerHTML=a;document.getElementById("detailspopup").style.top=(tempY-250)+"px";document.getElementById("detailspopup").style.left=(tempX-230)+"px"}function closepopup(){document.getElementById("HADT").style.display="";document.getElementById("HCHD").style.display="";document.getElementById("HRM").style.display="";document.getElementById("HPR").style.display="";document.getElementById("HHN").style.display="";document.getElementById("HHT").style.display=""}function go_detail(d,c,b){var e=document.getElementById(c).value;var a=document.getElementById(b).value;var f=isValidpopup(d,e,a);if(f==true){}else{return false}}function openhoteldetails(){document.getElementById("overeffect").style.display="";document.getElementById("hoteldetailspopup").style.display=""}function hoteldetailsmenu(b,a){setContinueBookingButton(a);for(i=1;i<=7;i++){if(document.getElementById("hoteldetail"+i)){document.getElementById("hoteldetail"+i).className="";document.getElementById("detail"+i).style.display="none"}}document.getElementById(b).className="onmenu";document.getElementById(a).style.display="";if(a=="detail5"){hotel_details_map()}}function ShowSection(b){setContinueBookingButton(b);var a=new Array("detail1","detail2","detail3","detail4","detail5","detail6","detail7");for(i=0;i<a.length;i++){if(document.getElementById(a[i])){if(b==a[i]){document.getElementById(a[i]).style.display="block";if(a[i]=="detail5"){hotel_details_map()}}else{document.getElementById(a[i]).style.display="none"}}}}function setImage(c,b){var g=new Array("d001img","d002img","d003img","d004img","d005img","d006img","d007img");var f=new Array("t001","t002","t003","t004","t005","t006","t007");var h=new Array("about_hotel_on","rate_details_on","photo_gallery_on","destination_guide_on","map_on","user_review_on","videos_on");var e=new Array("about_hotel_off","rate_details_off","photo_gallery_off","destination_guide_off","map_off","user_review_off","videos_off");var a=g.length;for(var d=0;d<a;d++){if(document.getElementById(g[d])&&document.getElementById(f[d])){if(g[d]==c&&f[d]==b){document.getElementById(g[d]).src="/images/xhotelv2/"+h[d]+".gif";document.getElementById(f[d]).className="offborder"}else{document.getElementById(g[d]).src="/images/xhotelv2/"+e[d]+".gif";document.getElementById(f[d]).className="onborder"}}}}function findcity(){hideselect();document.documentElement.style.overflow="";document.getElementById("overeffect_findcity").style.display="";cities_beginning_with("A");document.getElementById("findcitycontainer").style.display=""}function closefindcity(){showselect();document.getElementById("overeffect_findcity").style.display="none";document.getElementById("findcitycontainer").style.display="none"}function GetXmlHttpObject(){var a=null;if(window.XMLHttpRequest){try{a=new XMLHttpRequest()}catch(b){a=false}}else{if(window.ActiveXObject){try{a=new ActiveXObject("Microsoft.XMLHTTP")}catch(b){a=false}}}return a}function validate_city_name(b){var a="0123456789^*$/\\-_=%@!~`;:#&+|{[]}";for(i=0;i<b.length;i++){var d=b.charAt(i);if(a.indexOf(d)!=-1){return 0}else{continue}}return 1}function preloadimages(){for(i=0;i<preloadimages.arguments.length;i++){loadimages[i]=new Image();loadimages[i].src=preloadimages.arguments[i]}}preloadimages("/images/xhotelv2/city_markup/mumbai-bullet.gif","/images/xhotelv2/city_markup/chennai-bullet.gif","/images/xhotelv2/city_markup/goa-bullet.gif","/images/xhotelv2/city_markup/bangalore-bullet.gif","/images/xhotelv2/city_markup/delhi-bullet.gif","/images/xhotelv2/city_markup/jaipur-bullet.gif","/images/xhotelv2/city_markup/kolkata-bullet.gif","/images/xhotelv2/city_markup/hyderabad-bullet.gif");function hoteldesp(a,b){document.getElementById("hoteldesppopup").style.display="";document.getElementById("hotelName").innerHTML=a;document.getElementById("hotelDescription").innerHTML=unescape(b)}function hoteldespclose(){document.getElementById("hoteldesppopup").style.display="none"}function advanceSearch(a){a=document.getElementById(a);if(a.style.display=="none"){a.style.display="block";document.getElementById("plus").style.display="none";document.getElementById("minus").style.display=""}else{a.style.display="none";document.getElementById("plus").style.display="";document.getElementById("minus").style.display="none"}}function hideselect(){document.body.className="hideselectbox";if(IE){document.documentElement.style.overflow="hidden"}}function showselect(){document.body.className="";if(IE){document.documentElement.style.overflow=""}if(document.getElementById("adzonediv")){document.getElementById("adzonediv").style.display=""}}function display_yatra_rating(c,d){var k;var h;var f="";var l=false;var m="";switch(d){case"blue":var b='"/images/xhotelv2/star_yellow_half.gif" border="0" ';var g='"/images/xhotelv2/star_yellow.gif" border="0" ';var j='"/images/xhotelv2/star_grey.gif" border="0" ';break;case"orange":var b='"/images/xhotelv2/star_yellow_half.gif" border="0" ';var g='"/images/xhotelv2/star_yellow.gif" border="0" ';var j='"/images/xhotelv2/star_grey.gif" border="0" ';break}if(c=="NA"||c==null||c==""||c=="N/A"||c=="na"||c=="undef"){f="Not Rated";return f}var c=c.toString();var a=c.split(".");k=a[0];if(a[1]){h=5-a[0]-1;m+="<img src="+b+" alt='Govt Rating - "+c+"' title='Govt Rating - "+c+"' />";l=true}else{h=5-a[0]}for(var e=0;e<k;e++){f+="<img src="+g+" alt='Govt Rating - "+c+"' title='Govt Rating - "+c+"' />"}if(l){f+=m}return f}function displayTab(a){switch(a){case"About Hotel":ShowSection("detail1");setImage("d001img","t001");break;case"Destination Guide":ShowSection("detail2");setImage("d004img","t004");break;case"Rate Details":ShowSection("detail3");setImage("d002img","t002");break;case"User Reviews":ShowSection("detail4");setImage("d006img","t006");break;case"Map":ShowSection("detail5");setImage("d005img","t005");break;case"Photos":ShowSection("detail6");setImage("d003img","t003");break;case"Videos":ShowSection("detail7");setImage("d007img","t007");break}}function setContinueBookingButton(a){if(document.getElementById("hotelnameheaderight")){if(a=="detail3"){document.getElementById("hotelnameheaderight").innerHTML='<img src="/images/xhotelv2/spacer.gif" border="0" height="1" />'}else{document.getElementById("hotelnameheaderight").innerHTML="<a href=\"javascript:ShowSection('detail3');setImage('d002img','t002');\"><img src=\"/images/xhotelv2/btn_book_now.gif\" border=\"0\"/></a>"}}}function open_hoteldetails_popup(m,b,k,h){var p="hotelDetailPopUp_"+Math.random();if(m!=""){var j="";var o=document.forms[""+m].hotel_code.value;var l=document.forms[""+m].cidate.value;var f=document.forms[""+m].codate.value;var a=document.forms[""+m].room.value;if(document.getElementById("city_name")){j=document.forms[""+m].city_name.value}var c="/Hotelv2/waitpages/waitpage_hoteldetailsV2.html?queryXdist=true&hotel_code="+o;c=c+"&city="+j+"&cidate="+l+"&codate="+f+"&room="+a+"&tabName="+h+"&hotelDhtmlWindowObj="+p;var n=0;var e=0;var d=0;var g=0;n=document.forms[""+m].adt1.value;g=document.forms[""+m].chdroom1.value;if(g>0){e=document.forms[""+m].adt1_chdage1.value;d=document.forms[""+m].adt1_chdage2.value}c=c+"&adt1="+n+"&chdroom1="+g;if(e>0){c=c+"&adt1_chdage1="+e}if(d>0){c=c+"&adt1_chdage2="+d}c=c+"&random="+Math.random();if(m=="popupform1"){closessh()}else{if(m=="popupform2"){closessh_c()}else{if(m=="popupform3"){close_chform()}else{if(m=="videotourform"){close_vtform()}}}}}else{var c="/Hotelv2/waitpages/waitpage_hoteldetailsV2.html?queryXdist=false&hotelId="+k+"&searchId="+b+"&pageName=userReview";c=c+"&tabName="+h+"&random="+Math.random()}hotelDetailsWindow=dhtmlmodal.open(p,"iframe",c,"Yatra Hotels","width=814,height=550,left=200,center=1,resize=0,scrolling=0");hideselect();if(document.getElementById("adzonediv")){document.getElementById("adzonediv").style.display="none"}hotelDetailsWindow.onclose=function(){dhtmlmodal.veilstack--;parent.document.getElementById("interVeil").style.display="none";parent.document.getElementById("interVeil").style.visibility="hidden";return true};return false}function SetupAdultChildDiv(b){var d=document.getElementById("NumberOfRooms_Numbers");if(d.options[d.selectedIndex].text>1){document.getElementById("Room1Lable").style.display="block"}else{document.getElementById("Room1Lable").style.display="none"}var c=new Array(4);c[0]=document.getElementById("Child1_Numbers");c[1]=document.getElementById("Child2_Numbers");c[2]=document.getElementById("Child3_Numbers");c[3]=document.getElementById("Child4_Numbers");for(var a=1;a<=4;a++){if(a<=d.options[d.selectedIndex].text){ResetValuesHotel(b);document.getElementById("AdultChildDiv"+a).style.display="block";SetupChildAges(c[a-1],a)}else{document.getElementById("AdultChildDiv"+a).style.display="none";document.getElementById("ChildAgesControlDiv"+a).style.display="none"}}document.getElementById("ChildAgeMessage").style.display="none";for(var a=1;a<=4;a++){if(c[a-1].selectedIndex>0&&document.getElementById("AdultChildDiv"+a).style.display=="block"){document.getElementById("ChildAgeMessage").style.display="block"}}}function ResetValuesHotel(a){var b=document.getElementById("NumberOfRooms_Numbers");if(a=="hotelform"){if(b.options[b.selectedIndex].text==1){document.hotelform.chdroom2.value="0";document.hotelform.chdroom3.value="0";document.hotelform.chdroom4.value="0";document.hotelform.adt2.value="1";document.hotelform.adt3.value="1";document.hotelform.adt4.value="1";document.hotelform.adt2_chdage1.value="";document.hotelform.adt2_chdage2.value="";document.hotelform.adt3_chdage1.value="";document.hotelform.adt3_chdage2.value="";document.hotelform.adt4_chdage1.value="";document.hotelform.adt4_chdage2.value=""}if(b.options[b.selectedIndex].text==2){document.hotelform.chdroom3.value="0";document.hotelform.chdroom4.value="0";document.hotelform.adt3.value="1";document.hotelform.adt4.value="1";document.hotelform.adt3_chdage1.value="";document.hotelform.adt3_chdage2.value="";document.hotelform.adt4_chdage1.value="";document.hotelform.adt4_chdage2.value=""}if(b.options[b.selectedIndex].text==3){document.hotelform.chdroom4.value="0";document.hotelform.adt4.value="1";document.hotelform.adt4_chdage1.value="";document.hotelform.adt4_chdage2.value=""}}else{if(a=="modifysearchform"){if(b.options[b.selectedIndex].text==1){document.modifysearchform.chdroom2.value="0";document.modifysearchform.chdroom3.value="0";document.modifysearchform.chdroom4.value="0";document.modifysearchform.adt2.value="1";document.modifysearchform.adt3.value="1";document.modifysearchform.adt4.value="1";document.modifysearchform.adt2_chdage1.value="";document.modifysearchform.adt2_chdage2.value="";document.modifysearchform.adt3_chdage1.value="";document.modifysearchform.adt3_chdage2.value="";document.modifysearchform.adt4_chdage1.value="";document.modifysearchform.adt4_chdage2.value=""}if(b.options[b.selectedIndex].text==2){document.modifysearchform.chdroom3.value="0";document.modifysearchform.chdroom4.value="0";document.modifysearchform.adt3.value="1";document.modifysearchform.adt4.value="1";document.modifysearchform.adt3_chdage1.value="";document.modifysearchform.adt3_chdage2.value="";document.modifysearchform.adt4_chdage1.value="";document.modifysearchform.adt4_chdage2.value=""}if(b.options[b.selectedIndex].text==3){document.modifysearchform.chdroom4.value="0";document.modifysearchform.adt4.value="1";document.modifysearchform.adt4_chdage1.value="";document.modifysearchform.adt4_chdage2.value=""}}}}function SetupChildAges(b,d){for(var a=1;a<=2;a++){if(a<=b.options[b.selectedIndex].text){document.getElementById("ChildAge"+d+""+a).style.display="block"}else{document.getElementById("ChildAge"+d+""+a).style.display="none"}}if(b.options[b.selectedIndex].text>0){document.getElementById("ChildAgesControlDiv"+d).style.display="block"}else{document.getElementById("ChildAgesControlDiv"+d).style.display="none"}var c=new Array(4);c[0]=document.getElementById("Child1_Numbers");c[1]=document.getElementById("Child2_Numbers");c[2]=document.getElementById("Child3_Numbers");c[3]=document.getElementById("Child4_Numbers");document.getElementById("ChildAgeMessage").style.display="none";for(var a=1;a<=4;a++){if(c[a-1].selectedIndex>0&&document.getElementById("AdultChildDiv"+a).style.display=="block"){document.getElementById("ChildAgeMessage").style.display="block"}}}function shod(){document.getElementById("Child1_Numbers").style.display="none";document.getElementById("Child2_Numbers").style.display="none";document.getElementById("Child3_Numbers").style.display="none";document.getElementById("Adult1_Numbers").style.display="none"}function shodpopup(){document.getElementById("Child1_Popup").style.display="none";document.getElementById("Child1_PopupCY").style.display="none";document.getElementById("Child1_PopupMap").style.display="none";document.getElementById("Child2_PopupMap").style.display="none";document.getElementById("Child3_PopupMap").style.display="none";document.getElementById("Child4_PopupMap").style.display="none"}function shodpopupbestbusstays(){document.getElementById("NumberOfRooms_PopupCY").style.display="none";document.getElementById("Adult1_PopupCY").style.display="none";document.getElementById("PopupCYChildAgesControlDiv1").style.display="none"}function uppercase_firstletter(b){var c=b.split(" ");var a="";for(i=0;i<c.length;i++){firstChar=c[i].substring(0,1);remainChar=c[i].substring(1);firstChar=firstChar.toUpperCase();remainChar=remainChar.toLowerCase();a+=firstChar+remainChar+" "}return a.substring(0,a.length-1)}function goback(){history.go(-1)}function Trim(a){while(""+a.charAt(0)==" "){a=a.substring(1,a.length)}while(""+a.charAt(a.length-1)==" "){a=a.substring(0,a.length-1)}while(""+a.charCodeAt(0)==13||""+a.charCodeAt(0)==10){a=a.substring(1,a.length)}while(""+a.charCodeAt(a.length-1)==13||""+a.charCodeAt(a.length-1)==10){a=a.substring(0,a.length-1)}return a}function open_mapview_popup(s){if(s!=""){var w=document.forms[""+s].cidate.value;var r=document.forms[""+s].codate.value;var v=document.forms[""+s].room.value;var m=document.forms[""+s].city_name.value;var f,e,c,a,n,l,k,h;var u,t,j,g;var d,b,q,p;var o="CityMap_"+Math.random();url="/Hotelv2/waitpages/waitpage_mapviewpopupV2.html?randomid="+Math.random()+"&cityname="+m;url=url+"&cidate="+w+"&codate="+r+"&room="+v+"&hotelDhtmlWindowObj="+o;f=document.forms[""+s].adt1.value;n=document.forms[""+s].chdroom1.value;if(n>0){u=document.forms[""+s].adt1_chdage1.value;t=document.forms[""+s].adt1_chdage2.value}e=document.forms[""+s].adt2.value;l=document.forms[""+s].chdroom2.value;if(l>0){j=document.forms[""+s].adt2_chdage1.value;g=document.forms[""+s].adt2_chdage2.value}c=document.forms[""+s].adt3.value;k=document.forms[""+s].chdroom3.value;if(k>0){d=document.forms[""+s].adt3_chdage1.value;b=document.forms[""+s].adt3_chdage2.value}a=document.forms[""+s].adt4.value;h=document.forms[""+s].chdroom4.value;if(h>0){q=document.forms[""+s].adt4_chdage1.value;p=document.forms[""+s].adt4_chdage2.value}url=url+"&adt1="+f+"&chdroom1="+n+"&adt1_chdage1="+u+"&adt1_chdage2="+t;if(v>1){url=url+"&adt2="+e+"&chdroom2="+l+"&adt2_chdage1="+j+"&adt2_chdage2="+g}if(v>2){url=url+"&adt3="+c+"&chdroom3="+k+"&adt3_chdage1="+d+"&adt3_chdage2="+b}if(v>3){url=url+"&adt4="+a+"&chdroom4="+h+"&adt4_chdage1="+q+"&adt4_chdage2="+p}closessh_map();mapviewWindow=dhtmlmodal.open(o,"iframe",url,"Yatra Hotels","width=810,height=530,left=200,center=1,resize=0,scrolling=0");hideselect();if(document.getElementById("adzonediv")){document.getElementById("adzonediv").style.display="none"}}return false}function rating_info(){window.open("/HOTEL/hotel/govtratings.html","popup","scrollbars=0,width=370,height=160,top=150,left=400")}function show_circle(){hideselect();document.getElementById("overeffect").style.display="";document.getElementById("flashdiv").style.display=""}function getTop(a){if("string"==typeof a){a=document.getElementById(a)}var b=0;while(a!=null){b+=a.offsetTop;a=a.offsetParent}return b}function getLeft(b){if("string"==typeof b){b=document.getElementById(b)}var a=0;while(b!=null){a+=b.offsetLeft;b=b.offsetParent}return a}function fullnameClick(b,d,a){var c=document.getElementById("fullroomName");c.style.display="block";c.style.top=getTop(d)+260+"px";document.getElementById("fullroomName").innerHTML=uppercase_firstletter(a)}function fullnameCloseOut(){document.getElementById("fullroomName").style.display="none"}function user_review_rating(e,a){e=Math.round(e);var d="";switch(a){case"yellow":var f='"/images/xhotelv2/yellow_star_on.gif" border="0" ';var c='"/images/xhotelv2/yellow_star_off.gif" border="0" ';break;case"green":var f='"/images/xhotelv2/green_star_on.gif" border="0" ';var c='"/images/xhotelv2/green_star_off.gif" border="0" ';break}for(var b=0;b<e;b++){d+="<img src="+f+" border='0' />"}for(var b=e;b<5;b++){d+="<img src="+c+" border='0' />"}return d}function partial_pay(){window.open("/YT/components/partial_payment_popup.html","popup","scrollbars=1,width=600,height=550,left=100,top=50")}function showAgeBlock(b,a){var a=document.forms[""+a];if(b<1){window.document.getElementById("cha1").style.display="none";window.document.getElementById("cha2").style.display="none";window.document.getElementById("ChildAgeMessage").style.display="none";a.adt1_chdage1.value="";a.adt1_chdage2.value=""}if(b==1){window.document.getElementById("cha1").style.display="block";window.document.getElementById("ChildAgeMessage").style.display="block";window.document.getElementById("cha2").style.display="none";a.adt1_chdage2.value=""}if(b==2){window.document.getElementById("cha1").style.display="block";window.document.getElementById("cha2").style.display="block";if(window.document.getElementById("ChildAgeMessage").style.display="none"){window.document.getElementById("ChildAgeMessage").style.display="block"}}}function closeCal(){if(document.getElementById("YTContainer").style.display==""||document.getElementById("YTContainer").style.display=="block"){document.getElementById("YTContainer").style.display="none"}};