var b_stopBit=0; // Setting to enable Date Increments var b_overide=0; //Overide for Survey Popup s_userAgent=window.navigator.userAgent;KON=(s_userAgent.indexOf("KHTML")>-1)?1:0;isMac=(navigator.userAgent.indexOf("Mac")>-1)?1:0;isIE=(navigator.userAgent.indexOf("MSIE")>-1)?1:0;isMacIE=(isMac&&isIE)?1:0;navTimer=null;currentNav=0;var b_loaded=0; function cbSetUpnav(){ a_nav=document.cbNav.nav; if(!a_nav.length)o_nav=document.cbNav.nav; else for(i=0;i-1) a_dateinput=s_dateinput.split("/") return a_dateinput;} function maintainState(o_input){ if(!b_loaded)return false; a_bit=o_input.id.split("_"); s_bit=a_bit[1]; for(i=0;i < document.cbNav.nav.length;i++){ a_formbit=document.cbNav.nav[i].value.split("form"); s_formbit=a_formbit[1]; o_formelement=document.getElementById(s_formbit+"_"+s_bit); if(eval("document."+document.cbNav.nav[i].value)&&o_formelement!=o_input){ if(o_formelement&&o_formelement!=o_input&&o_input.type!="radio"){ if(o_formelement.type=="select-one"&&o_formelement.type==o_input.type){ for(var j=o_formelement.length-1;j>-1;j--){ if(o_formelement.options[j].text==o_input.options[o_input.selectedIndex].text){ o_formelement.options[j].selected=true;break;}} }else if(o_formelement.type==o_input.type)o_formelement.value=o_input.value; }else{ a_input = eval("document."+document.cbNav.nav[i].value+"."+o_input.name); if(a_input) for(j=0;j < a_input.length;j++)if(a_input[j]!=o_input&&a_input[j].value==o_input.value)a_input[j].checked="checked";}}}} function populateDate(){ var m_names=new Array("","January","February","March","April","May","June","July","August","September","October","November","December"); var o_todays_date=new Date; var a_currentYear=o_todays_date.getFullYear(); var a_currentMonth=o_todays_date.getMonth(); var s_form_options=new String(); var s_monthRange=6; for (i=0;i'+m_names[eval(o_todays_date.getMonth()+1)]+'-'+o_todays_date.getFullYear()+' '; o_todays_date.setMonth(o_todays_date.getMonth()+1); }document.write(s_form_options);} function childAges(o_select,s_div){ o_div=document.getElementById(s_div); if(o_select.selectedIndex!=0){ if(s_div=="cbFOchildages")document.getElementById("cbFOpromo").style.display="none"; if(s_div=="cbFHchildages")document.getElementById("cbFHpromo").style.display="none"; a_children=o_div.getElementsByTagName("div"); o_div.style.display="block"; for(i=0;i0){ o_dl=o_input.parentNode.parentNode; a_dd=o_dl.getElementsByTagName("dd"); for(i=0;i-1){ s_fiveplusrooms="/HotelPlanner?"; s_fiveplusrooms+="Checkin="+o_form.leavingDate.value; s_fiveplusrooms+="&Checkout="+o_form.returningDate.value; switch(o_form.cityCountryCode.options[o_form.cityCountryCode.selectedIndex].value.toLowerCase()){ case "us": case "ca": if(o_form.city.value !== ""){s_fiveplusrooms+="&City="+escape(o_form.city.value);} else {s_fiveplusrooms+="&City=";} if(o_form.city.value !== "" && o_form.state.options[o_form.state.selectedIndex].value !== "") {s_fiveplusrooms += ",%20";} if(o_form.state.options[o_form.state.selectedIndex].value != ""){s_fiveplusrooms+=o_form.state.options[o_form.state.selectedIndex].value;} break; default: if(o_form.city.value !== ""){s_fiveplusrooms+="&City="+escape(o_form.city.value);} else {s_fiveplusrooms+="&City=";} if(o_form.city.value && o_form.cityCountryCode.options[o_form.cityCountryCode.selectedIndex].value !== "") {s_fiveplusrooms += ",%20";} if(o_form.cityCountryCode.options[o_form.cityCountryCode.selectedIndex].value !== "") {s_fiveplusrooms += o_form.cityCountryCode.options[o_form.cityCountryCode.selectedIndex].value.substr(0,2);} } s_fiveplusrooms+="&Rooms=5"; window.open(s_fiveplusrooms,null,'width=954,height=730,resizable=yes,scrollbars=yes,toolbar=yes,location=yes,directories=yes,status=yes,menubar=yes,copyhistory=yes'); }else{ var __toDate=document.getElementById("HO_todate"); var __fromDate=document.getElementById("HO_fromdate"); b_form=((__toDate.value=="mm/dd/yyyy"||__toDate.value=="")&&(__fromDate.value=="mm/dd/yyyy"||__fromDate.value==""))?checkform(o_form,1,2,3,9):checkform(o_form,1,2,3,8,9);}} return b_form;} function LinkSubmitHotelGroups(o_form){ fiveplusrooms_url="/HotelPlanner?" fiveplusrooms_url+="Checkin="+o_form.leavingDate.value; fiveplusrooms_url+="&Checkout="+o_form.returningDate.value; switch(o_form.cityCountryCode.options[o_form.cityCountryCode.selectedIndex].value.toLowerCase()){ case "us": case "ca": if(o_form.city.value !== ""){fiveplusrooms_url+="&City="+escape(o_form.city.value);} else {fiveplusrooms_url+="&City=";} if(o_form.city.value !== "" && o_form.state.options[o_form.state.selectedIndex].value !== "") {fiveplusrooms_url += ",%20"} if(o_form.state.options[o_form.state.selectedIndex].value != ""){fiveplusrooms_url+=o_form.state.options[o_form.state.selectedIndex].value;} break; default: if(o_form.city.value !== ""){fiveplusrooms_url+="&City="+escape(o_form.city.value);} else {fiveplusrooms_url+="&City=";} if(o_form.city.value && o_form.cityCountryCode.options[o_form.cityCountryCode.selectedIndex].value !== "") {fiveplusrooms_url += ",%20";} if(o_form.cityCountryCode.options[o_form.cityCountryCode.selectedIndex].value !== "") {fiveplusrooms_url += o_form.cityCountryCode.options[o_form.cityCountryCode.selectedIndex].value.substr(0,2);} } fiveplusrooms_url+="&Rooms=5"; window.open(fiveplusrooms_url,null,'width=954,height=730,resizable=yes,scrollbars=yes,toolbar=yes,location=yes,directories=yes,status=yes,menubar=yes,copyhistory=yes');} function carPUDO(o_select){ sPfx=o_select.id.split("_"); sPrefix=sPfx[0].toLowerCase(); switch(o_select.options[o_select.selectedIndex].value){ case "pu_air": if(document.getElementById(sPrefix+"_airport"))document.getElementById(sPrefix+"_airport").style.display="block"; if(document.getElementById(sPrefix+"_nearaddress"))document.getElementById(sPrefix+"_nearaddress").style.display="none"; if(document.getElementById(sPrefix+"_nearplace"))document.getElementById(sPrefix+"_nearplace").style.display="none"; break;case "pu_addr": document.getElementById(sPrefix+"_airport").style.display="none"; document.getElementById(sPrefix+"_nearaddress").style.display="block"; document.getElementById(sPrefix+"_nearplace").style.display="none"; break;case "pu_poi": document.getElementById(sPrefix+"_airport").style.display="none"; document.getElementById(sPrefix+"_nearaddress").style.display="none"; document.getElementById(sPrefix+"_nearplace").style.display="block"; break;default: window.location=o_select.options[o_select.selectedIndex].value;}} function checkCar(o_form){ o_select=document.getElementById("FCO_pickupoption"); switch(o_select.options[o_select.selectedIndex].value){ case "pu_poi":b_checkCar = checkform(o_form,2,3,8);break; case "pu_addr":b_checkCar = checkform(o_form,8);break; default:b_checkCar = checkform(o_form,1,2,3,8);} s_popFlag='1'; loadPopOrNot(b_checkCar,s_popFlag,o_form); return b_checkCar;} function chkForMatch(){ if((document.getElementById("CO_to").value.toUpperCase()==document.getElementById("CO_do").value.toUpperCase())&&document.getElementById("FCO_dropoffoption").value=='do_air'){ document.getElementById("CO_do").value=''; document.getElementById("FCO_dropoffoption").options[document.getElementById("FCO_dropoffoption").selectedIndex].value=''; return true;} return true;} function adjDate(o_form){ if(b_stopBit==0){ var a_selectedForm; var o_todays_date=new Date; var a_currentYear=o_todays_date.getFullYear(); if(o_form){a_selectedForm=o_form.name;}else{a_selectedForm=getCBform();} var a_formPrefix=a_selectedForm.substring(4); var a_fromVal=document.getElementById(a_formPrefix+"_fromdate").value; var a_fromMonth=document.getElementById(a_formPrefix+"_frommonth").selectedIndex; var cmonth=o_todays_date.getMonth(); var fmonth; if(typeof(a_fromVal)!='undefined'){ var monthOnly=a_fromVal.substr(0,2); fmonth = parseInt(monthOnly); }else{fmonth = cmonth;} if(typeof(a_fromMonth)!='undefined'){fmonth=parseInt(a_fromMonth);}else{fmonth=cmonth;} if(fmontho_days[a_fromMonth]){ document.getElementById(a_formPrefix+"_fromdate").options[eval(o_days[a_fromMonth]-1)].selected=true; var a_fromVal=document.getElementById(a_formPrefix+"_fromdate").value;} var o_selectedDate=new Date(a_currentYear,a_fromMonth,a_fromVal); var o_toDate=o_selectedDate.setDate(o_selectedDate.getDate()+a_dateDiff); document.getElementById(a_formPrefix+"_tomonth").options[o_selectedDate.getMonth()].selected=true; document.getElementById(a_formPrefix+"_todate").options[(o_selectedDate.getDate()-1)].selected=true; maintainState(document.getElementById(a_formPrefix+"_tomonth")); maintainState(document.getElementById(a_formPrefix+"_todate")); maintainState(document.getElementById(a_formPrefix+"_fromdate")); maintainState(document.getElementById(a_formPrefix+"_frommonth")); var a_fromMonth; var a_fromVal; var a_currentYear; var selectedDate;}} function SetCookie(cookieName,cookieValue,nDays){ var today=new Date(); var expire=new Date(); if(nDays==null||nDays==0){nDays=1;} expire.setTime(today.getTime()+ 24*60*60*1000*nDays); document.cookie=cookieName+"="+escape(cookieValue)+";expires="+expire.toGMTString();} function GetCookie(Name){ var search=Name+"=" var returnvalue=""; if(document.cookie.length>0){ offset=document.cookie.indexOf(search); if(offset!=-1){ offset+=search.length; end=document.cookie.indexOf(";",offset); if(end==-1){end = document.cookie.length;} returnvalue=unescape(document.cookie.substring(offset,end));}} return returnvalue;} function formCtrl(o_form){ s_formName=o_form.name; var b_submit=false; var s_popFlag='0'; switch (s_formName){ case 'formCO':o_select=document.getElementById("FCO_pickupoption"); switch(o_select.options[o_select.selectedIndex].value){ case "pu_poi":b_submit=checkform(o_form,2,3,8);break; case "pu_addr":b_submit=checkform(o_form,8);break; default:b_submit=checkform(o_form,1,2,3,8);} s_popFlag='1';break; case 'formair':b_submit=checkform(document.formair,1,2,3,4,5,8); if(!b_submit&&document.getElementById("FHbutton"))document.getElementById("FHbutton").disabled=false; s_popFlag='1';break; case 'formFO': case 'formFRT': case 'formFMD':b_submit=checkform(o_form,1,2,3,4,5,6); s_popFlag='0';break; case 'formFH':b_submit=checkform(o_form,1,2,3,4,8,9); s_popFlag='1';break; case 'formHOgbl': case 'formHOus':b_submit=checkform(o_form,1,2,3,6); s_popFlag='1';break; case 'formFOW':b_submit=checkform(o_form,1,2,3,4,5); s_popFlag='0';break; case 'formHCX':o_select=document.getElementById("HCX_pickupoption"); if(o_select){switch(o_select.options[o_select.selectedIndex].value){ case "pu_poi":b_submit=checkform(o_form,2,3,6);break; case "pu_addr":b_submit=checkform(o_form,6);break; default:b_submit=checkform(o_form,1,2,3,6);} }else{b_submit=checkform(o_form,1,2,3,5,8,9);} s_popFlag='1';break; case 'formHO': if(document.getElementById('ts-hotels').checked == true) { populateField('TS_HO_destlist','HO_to'); } b_submit=cb_hosubmit(o_form); s_popFlag='1';break; case 'formact':b_submit=checkform(o_form,8); s_popFlag='0';break;} loadPopOrNot(b_submit,s_popFlag,o_form); return b_submit;} function getElementByValue(ElementCollection, Value){var i, Element; for(i=0;i0&&i-1;i--){var a_nb2=a_args[i].split("|");var o_block=document.getElementById(a_nb2[0]);var o_img=document.getElementById(a_nb2[1]);switch(a_nb2[2]){case "flip":switch(o_img.src.indexOf("show")){case -1:o_img.src=o_img.src.replace("hide","show");o_block.style.display="none";break;default:o_img.src=o_img.src.replace("show","hide");o_block.style.display=a_nb2[3];}break;default:o_img.src=(a_nb2[2]!="none")?o_img.src.replace("show","hide"):o_img.src.replace("hide","show");o_block.style.display=a_nb2[2];}}} function chkAll(s_parent,o_chkbox){ o_chk=document.getElementById(s_parent); a_chk=o_chk.getElementsByTagName("input"); if(o_chkbox!=a_chk[0])a_chk[0].checked=false; else for(i=1;i0;i--){var __date=new Date(_iyear,_imonth,i);if(_imonth==__date.getMonth())break;} return __date.getDate();} function validSelectDate(sMonth,sDate){ var dVSD=new Date(); var aDateVSD=[dVSD.getMonth(),dVSD.getFullYear()]; var oMonth=document.getElementById(sMonth); var oDate=document.getElementById(sDate); if(oMonth.selectedIndex