var portalName="IVac"; var servletUrl="http://www4.secure-reservation.com/servlet/"; var logoUrl="http://www4.secure-reservation.com/html/" ; var pageCentered="Y"; var progressBar="Y" var progressLeft=280; var progressTop=310; var myToday=new Date(); var currentYY=myToday.getFullYear(); var nav=navigator.appName; var myindate = (new Date()); var myoutdate = new Date(); myindate = new Date(myindate.setDate(myindate.getDate()+1)); myoutdate = new Date(myoutdate.setDate(myoutdate.getDate()+2)); var inmm = myindate.getMonth(); var indd = myindate.getDate(); var inyy = myindate.getFullYear(); var outmm = myoutdate.getMonth(); var outdd = myoutdate.getDate(); var outyy = myoutdate.getFullYear(); var afflogoURL = logoUrl+portalName+"/AffiliateImages/en/"; function RG_set_default_date(){ document.RGfrm1.afftCode.value=RG_AFF_CODE; document.RGfrm1.AffiliateMainPage.value=RG_AFF_MAIN_URL; assignHotelFilterBy(); if (document.RGfrm1.MultiCity.value=="N") { document.RGfrm1.cmbCity.value=RG_CITY_CODE; document.RGfrm1.hotelCode.value=RG_HOTEL_CODE; } else { RG_Cities(); } with (document.RGfrm1){ cmbCheckInYear.options.length=0; cmbCheckOutYear.options.length=0; for (var rt=0; rt<5; rt++){ //if (rt!=4){//commented bandu 10_april cmbCheckInYear.options[rt]=new Option(myToday.getFullYear()+rt,myToday.getFullYear()+rt); //} cmbCheckOutYear.options[rt]=new Option(myToday.getFullYear()+rt,myToday.getFullYear()+rt); } cmbCheckInMonth.selectedIndex = inmm; cmbCheckInYear.selectedIndex = inyy-currentYY; cmbCheckOutMonth.selectedIndex = outmm; cmbCheckOutYear.selectedIndex = outyy-currentYY; cmbNoOfNights.selectedIndex = 0; } document.images["inday"].src="bookengine/RG_dd"+(myindate.getDay())+".gif"; document.images["outday"].src="bookengine/RG_dd"+(myoutdate.getDay())+".gif"; setMonthDays("In"); setMonthDays("Out"); document.RGfrm1.cmbCheckInDate.selectedIndex = indd-1; document.RGfrm1.cmbCheckOutDate.selectedIndex = outdd-1; } function setCheckOut(){ tmpInDate = new Date(document.RGfrm1.cmbCheckInYear.options[document.RGfrm1.cmbCheckInYear.selectedIndex].value,document.RGfrm1.cmbCheckInMonth.options[document.RGfrm1.cmbCheckInMonth.selectedIndex].value,document.RGfrm1.cmbCheckInDate.options[document.RGfrm1.cmbCheckInDate.selectedIndex].value,0,0,0,0); document.images["inday"].src="bookengine/RG_dd"+(tmpInDate.getDay())+".gif"; noDays = Number(document.RGfrm1.cmbNoOfNights.options[document.RGfrm1.cmbNoOfNights.selectedIndex].value); tmpOutDate = new Date(tmpInDate.setDate(tmpInDate.getDate()+noDays)); document.RGfrm1.cmbCheckOutMonth.selectedIndex = tmpOutDate.getMonth(); document.RGfrm1.cmbCheckOutYear.selectedIndex = tmpOutDate.getFullYear()-currentYY; setMonthDays("Out"); document.RGfrm1.cmbCheckOutDate.selectedIndex = tmpOutDate.getDate()-1; document.images["outday"].src="bookengine/RG_dd"+(tmpOutDate.getDay())+".gif"; } function setNights(){ tmpInDate = new Date(document.RGfrm1.cmbCheckInYear.options[document.RGfrm1.cmbCheckInYear.selectedIndex].value,document.RGfrm1.cmbCheckInMonth.options[document.RGfrm1.cmbCheckInMonth.selectedIndex].value,document.RGfrm1.cmbCheckInDate.options[document.RGfrm1.cmbCheckInDate.selectedIndex].value,0,0,0,0); tmpOutDate = new Date(document.RGfrm1.cmbCheckOutYear.options[document.RGfrm1.cmbCheckOutYear.selectedIndex].value,document.RGfrm1.cmbCheckOutMonth.options[document.RGfrm1.cmbCheckOutMonth.selectedIndex].value,document.RGfrm1.cmbCheckOutDate.options[document.RGfrm1.cmbCheckOutDate.selectedIndex].value,0,0,0,0); dateDifference = get_deference(tmpInDate,tmpOutDate); document.images["outday"].src="bookengine/RG_dd"+(tmpOutDate.getDay())+".gif"; if (dateDifference<1 || dateDifference>15){ return; } document.RGfrm1.cmbNoOfNights.selectedIndex = dateDifference-1; } function maxdate(mm,yy){ if (mm==1){ if(yy%4==0){return 29;}else{return 28;} }else if (mm==0 || mm==2 || mm==4 || mm==6 || mm==7 || mm==9 || mm==11){ return 31;}else{return 30;} } function setMonthDays(name){ tmpmm = document.RGfrm1.elements["cmbCheck"+name+"Month"].options[document.RGfrm1.elements["cmbCheck"+name+"Month"].selectedIndex].value; tmpyy = document.RGfrm1.elements["cmbCheck"+name+"Year"].options[document.RGfrm1.elements["cmbCheck"+name+"Year"].selectedIndex].value; maxdays = maxdate(tmpmm,tmpyy); selectedInd=document.RGfrm1.elements["cmbCheck"+name+"Date"].selectedIndex; document.RGfrm1.elements["cmbCheck"+name+"Date"].options.length=28; toAdd=maxdays-28; for (a=0; a86400000){ alert("Check in date can not be less than the system date"); RG_set_default_date(); return; } if (noNights!=dateDifference){ alert("Number of nights cannot be greater than "+document.RGfrm1.cmbNoOfNights.options.length+" days "); RG_set_default_date(); return; } noOfRooms = document.RGfrm1.cmbNoOfRooms.selectedIndex+1; noOfAdults = document.RGfrm1.cmbNoOfAdults.selectedIndex+1; if(noOfRooms>noOfAdults){ alert("Number of adults is greater then the maximum no of adults for the rooms selected!"); return; } if (document.RGfrm1.MultiCity.value=="Y") { if (document.RGfrm1.cmbCity.selectedIndex==0){ alert("Please Select a City"); return; }else{ document.RGfrm1.selCity.value = document.RGfrm1.cmbCity.options[document.RGfrm1.cmbCity.selectedIndex].value; } } if (progressBar=="Y" && navigator.userAgent.indexOf("Firefox")==-1){ op_win(); } document.RGfrm1.action = servletUrl+portalName+".ResevationSearch"; document.RGfrm1.submit(); } function get_deference(ind,oud){ ind_d = ind.getDate(); ind_m = ind.getMonth(); ind_y = ind.getYear(); oud_d = oud.getDate(); oud_m = oud.getMonth(); oud_y = oud.getYear(); ret_val=0; if (ind_y==oud_y){ if (ind_m==oud_m){ ret_val=oud_d-ind_d; }else{ ret_val=(maxdate(ind_m,ind_y)-ind_d)+oud_d } }else{ if (ind_m==11 && oud_m==0){ ret_val=(maxdate(ind_m,ind_y)-ind_d)+oud_d } } return ret_val; } var sWith=screen.width; var toadd= 0; if (sWith>800 && pageCentered=="Y"){ toadd = (sWith-800)/2; } function op_win(){ if (nav=="Netscape"){ if (navigator.userAgent.indexOf("Netscape/7")>-1){ document.getElementById("progress").style.left=progressLeft+toadd; document.getElementById("progress").style.top=progressTop; document.getElementById("progress").style.visibility="visible"; }else{ document.layers["progress"].left=progressLeft+toadd; document.layers["progress"].top=progressTop+toadd; document.layers["progress"].visibility="show"; } }else{ document.all["progress"].style.left=progressLeft+toadd; document.all["progress"].style.top=progressTop; document.all["progress"].style.visibility="visible"; } } function hide_progress(){ if (progressBar!="Y"){ return; } if (nav=="Netscape"){ if (navigator.userAgent.indexOf("Netscape/7")>-1){ document.getElementById("progress").style.visibility="hidden"; }else{ document.layers["progress"].visibility="hide"; } }else{ document.all["progress"].style.visibility="hidden"; } } var top_loc=""+document.location+""; var top_str=top_loc.substring(top_loc.indexOf(".html?")+6,top_loc.length); var value_arr = top_str.split("&"); function assignHotelFilterBy(){ var v='ALL',v2='-'; document.RGfrm1.hotelFilterBy.value=RG_HOTEL_FILTER_BY; document.RGfrm1.hotelRoomTypeCode.value=RG_HOTEL_ROOM_CODE; document.RGfrm1.hotelBedTypeCode.value=RG_HOTEL_BED_CODE; document.RGfrm1.hotelRateplanCode.value=RG_HOTEL_RPLAN_CODE; document.RGfrm1.RG_package.value=RG_PACKAGE; for (var i=0;i< value_arr.length;i++){ v=value_arr[i]; if(v=='ROOM' || v=='BED' || v=='RPLAN' || v=='PKG' ){ v2=value_arr[i+1]; if(v!='PKG') document.RGfrm1.hotelFilterBy.value=v ; if(v=='ROOM'){ document.RGfrm1.hotelRoomTypeCode.value=v2; }else if(v=='BED'){ document.RGfrm1.hotelBedTypeCode.value=v2; }else if(v=='RPLAN'){ document.RGfrm1.hotelRateplanCode.value=v2; }else if(v=='PKG'){ document.RGfrm1.RG_package.value=v2; } } // alert(value_arr[i]); } } function getPackage(){ var v='',v2=RG_PACKAGE; for (var i=0;i"; }else{ tmpstr="
"; } tmpstr=tmpstr+""+ ""+ ""+ ""+ "
"+ ""+ ""+ ""+ "
"+ ""+ ""+ ""+ ""+ ""+ ""+ ""+ ""+ ""+ ""+ ""+ ""+ "
"; if (navigator.appName=="Netscape" && navigator.userAgent.indexOf("Netscape/7")==-1){ tmpstr=tmpstr+"Please wait one moment ..."; }else if (navigator.appName=="Netscape" && navigator.userAgent.indexOf("Netscape/7")>-1){ tmpstr=tmpstr+"Please wait one moment ...   "; }else{ tmpstr=tmpstr+"
Please wait one moment ...   
"; } tmpstr=tmpstr+"
We are checking and retrieving program rates and availability
"; if (navigator.appName=="Netscape" && navigator.userAgent.indexOf("Netscape/7")==-1){ tmpstr=tmpstr+""; }else{ tmpstr=tmpstr+"
"; } if (progressBar=="Y" && navigator.userAgent.indexOf("Firefox")==-1){ document.write(tmpstr); }