
var calendarDefault='mm/dd/yyyy';function update_location_hotel_count(){locationId=$F('destinationlocationid');if($('hotel-count-holder')&&(locationId!='')&&(locationId>0)){var d=new Date();startTime=d.getTime();new Ajax.Request('search?fn=check_location_hotel_count',{asynchronous:true,evalScripts:true,onSuccess:function(transport){var hotelCount=transport.responseText;$('hotel-count-holder').innerHTML='<p class="spinner"><img src="/images/loading.gif"/></p>';if(hotelCount){setTimeout("update_location_hotel_count_div('"+transport.responseText+"');",800);}},postBody:'locationid='+$F('destinationlocationid')});}}
function update_location_hotel_count_div(hotelCount){if(hotelCount==666){hotelCount=665;}
if(hotelCount>1){$('hotel-count-holder').innerHTML='<p>Ready to search <em>'+hotelCount+'<br/>hotels</em> in and around<br/>your destination.</p>';}else if(hotelCount==1){$('hotel-count-holder').innerHTML='<p>Ready to search <em>'+hotelCount+'<br/>hotel</em> in and around<br/>your destination.</p>';}else if(hotelCount==0){$('hotel-count-holder').innerHTML='<p>Argh! We have no<br/>hotels at that destination.<br/>Try a city nearby.</p>';}}
function reset_location_hotel_count_div(){$('hotel-count-holder').innerHTML='<p>Searching 30+ travel<br/>sites to find you the<br/>best hotel deals.</p>';}
var submitdone=false;var highlighterrordone=false;var searchDefaultBgcolor;var searchDefaultBgimage;var searchDefaultBorder;function submit_search_form_check(){if(submitdone){returnvalue=true;}
else{returnvalue=false;}
return returnvalue;}
function reset_destination(){$('destination').style.backgroundColor=searchDefaultBgcolor;$('destination').style.backgroundImage=searchDefaultBgimage;$('destination').style.border=searchDefaultBorder;}
function submit_search_form(){submitdone=true;var noerror=submit_search_form_check();if(noerror){document.searchform.submit();}}