function getEle(i){return document.getElementById(i);}function setHidden(hdn,ele){var _hdn=getEle(hdn),_ele=getEle(ele);if(_hdn!==null&&_ele!==null&&_ele.length>0){_hdn.value=_ele.value;}}function SelfPostback(){getEle("frmHome").submit();}function fetchUserInputOnPostback(){setHidden("hdnCountryCd","cmbCountry");setHidden("hdnRegionInfo","cmbRegion");setHidden("hdnAreaInfo","cmbArea");setHidden("hdnResortInfo","cmbResort");setHidden("hdnRadius","cmbRadius");setHidden("hdnPartyComp","cmbSleeps");setHidden("hdnDur","hdnDur");}function countryOnChage(){var countryClickInd=getEle("hdnCountryClickedInd");if(countryClickInd!==null){countryClickInd.value="1";}fetchUserInputOnPostback();}function regionOnClick(){var regionClickInd=getEle("hdnRegionClickedInd"),cmbCountry=getEle("cmbCountry");if(regionClickInd!==null){regionClickInd.value="1";}if(cmbCountry!==null){cmbCountry.disabled=true;}fetchUserInputOnPostback();}function areaOnClick(){var areaClickInd=getEle("hdnAreaClickedInd");if(areaClickInd!==null){areaClickInd.value="1";}fetchUserInputOnPostback();}function ShowSearchCriteria(searchWindow,countryCd){fetchUserInputOnPostback();var controlAS=document.getElementById("cmbArea");controlASInnerHtml=controlAS.innerHTML;controlAS.style.display="none";jQuery.thickbox_open('Select a Region',"#tb_inline?height=500&width=400&inlineId=divModalFrame&modal=false",'');}function SelectValue(text,value){var control=getEle("cmbRegion");if(control===null){control=getEle("cmbArea");}text=text.replace(/~/g,"'");control.options[0].text=text;control.options[0].value=value;getEle("hdnRARInfo").value=value.replace(/_/g,",")+","+text;this.SelfPostback();}function loadHome(){return 0;}function ValidateSearch(){var hdnPropType=getEle('hdnPropType'),countryCd=getEle('cmbCountry'),currencyCd=getEle('hdnCurrencyCd'),hdnSiteGuid=getEle('hdnSiteGuid'),cmbRegion=getEle('cmbRegion'),cmbArea=getEle('cmbArea'),hdnRARInfo=getEle('hdnRARInfo'),cmbResort=getEle('cmbResort'),cmbSleeps=getEle('cmbSleeps'),QS="",AreaCD="",AreaNM="",ResortCD="",ResortNM="",splitVal="";function _getName(obj){return escape(obj.options[obj.selectedIndex].text.replace(/&/g,'_**_').replace(/'/gi,'%quot%'));}countryCd=countryCd!==null?countryCd.value:"GBR";if(cmbArea!==null&&cmbArea.value!=0){splitVal=cmbArea.value.split(",");if(splitVal[0]>0||splitVal[0]===""){if(splitVal[2].length>0){ResortCD=splitVal[2];ResortNM=_getName(cmbArea);}else
{AreaCD=splitVal[1];AreaNM=_getName(cmbArea);}}}QS="QS="+hdnSiteGuid.value+"~"+hdnPropType.value+"~"+countryCd+"~"+currencyCd.value+"~A~~~~~~~~~~~~~~~~~"+AreaCD+"~"+AreaNM+"~"+ResortCD+"~"+ResortNM+"~"+AreaNM+"~~~~~~~~~~~~~~"+cmbSleeps.value+"~~~~~~~~~Y~~~1~~~H~";window.location="SearchResult_C_NoMap.aspx?"+QS;}document.getElementById('imgBtnSearch').onclick=function(){ValidateSearch();return false;};
