var hotelindateArray=new Array();var hotelindateMap=new Hash();var hoteloutdateArray=new Array();var hoteloutdateMap=new Hash();var hotelinDateManager=null;var hotelouDateManager=null;function initHotelSearch(){hotelinDateManager=new DateManager({months:$("hotelindate_mon"),days:$("hotelindate_day"),hidden:$("hotelindate"),after:new Date(),afterOffset:landLeadTime});hotelinDateManager.addDisabledDates(null,landStartDate);hoteloutDateManager=new DateManager({months:$("hoteloutdate_mon"),days:$("hoteloutdate_day"),hidden:$("hoteloutdate"),after:hotelinDateManager,afterOffset:1});hoteloutDateManager.addDisabledDates(null,landStartDate);$("hotelSearch").show()}Event.observe(window,"load",initHotelSearch);function hotelDateChange(){}function hotelValidate(){var h=new Array();if($("hotelLocation")){var a=$F("hotelLocation");if(a=="NULL"){h[h.length]=errorMessage(ERR_HOTEL_SELECT_RESORT)}}var g=$F("hotelindate");var f=$F("hoteloutdate");if(formatDate(createDate(g),dateFormat_api)!=g){h[h.length]=errorMessage(ERR_HOTEL_DATE_INVALID,{type:"checkin"})}if(formatDate(createDate(f),dateFormat_api)!=f){h[h.length]=errorMessage(ERR_HOTEL_DATE_INVALID,{type:"checkout"})}var c=formatDate(addToDate(new Date(),1),dateFormat_api);if(f<=g){h[h.length]=errorMessage(ERR_HOTEL_RETURN_BEFORE_DEPARTURE)}if(g<c){h[h.length]=errorMessage(ERR_HOTEL_DATE_HISTORIC)}var d=$("fs_paxTypes_hotel").select("select.paxType");var b=0;for(var e=0;e<d.length;e++){b+=parseFloat($F(d[e]))}if(b==0){h[h.length]=errorMessage(ERR_HOTEL_NO_PAX)}else{if(b>9){h[h.length]=errorMessage(ERR_HOTEL_TOO_MANY_PAX)}}if(h.length>0){alert(h.join("\n"));return false}else{return true}}function submitHotelSearch(){return hotelValidate()};
