window.dhx_globalImgPath="/images/";var varRight="right";var varLeft="left";var varTop="top";var varBottom="bottom";var secureURL="http://";function showDetailsTab(A){try{document.getElementById("DETAILS").style.display="none"}catch(B){}try{document.getElementById("DETAILSTab").src="/content/images/details-details-TAB-OFF.gif"}catch(B){}try{document.getElementById("AMENITIES").style.display="none"}catch(B){}try{document.getElementById("AMENITIESTab").src="/content/images/details-amenities-TAB-OFF.gif"}catch(B){}try{document.getElementById("MAPDIV").style.display="none"}catch(B){}try{document.getElementById("MAPDIVTab").src="/content/images/details-mapdiv-TAB-OFF.gif"}catch(B){}try{document.getElementById("POLICY").style.display="none"}catch(B){}try{document.getElementById("POLICYTab").src="/content/images/details-policy-TAB-OFF.gif"}catch(B){}try{document.getElementById(A).style.display=""}catch(B){}try{document.getElementById(A+"Tab").src="/content/images/details-"+A+"-TAB-ON.gif"}catch(B){}}function submitSearch(sSearchForm,bRoot){if(bRoot==null){bRoot==false}var oForm=eval("document."+sSearchForm);var fieldType=0;try{var sDropDown=oForm.destination.value;fieldType=1}catch(e){try{var sDropDown=oForm.N.value;fieldType=2}catch(e){var sDropDown=oForm.nameDestination.value;fieldType=3}}var sDestination=sDropDown;var checkInDate="";try{checkInDate=oForm.checkin.value}catch(e){}var checkOutDate="";try{checkOutDate=oForm.checkout.value}catch(e){}if(fieldType!=3){if(sDropDown!="0"){sDestination=sDropDown}if(sDestination!=parseInt(sDestination)&&sDestination.indexOf("+")<0){sDestination=""}}if(fieldType==3){setCheckInOutCookie(checkInDate,checkOutDate);document.location.href="/search-results.aspx?Destination="+sDestination}else{if(sDestination!=""){setCheckInOutCookie(checkInDate,checkOutDate);if(bRoot){document.location.href="/search-results.aspx?N="+sDestination}else{document.location.href="search-results.aspx?N="+sDestination}}else{alert("Invalid destination entered\nPlease try selecting from the dropdown list.")}}}function submitPropertySearch(sSearchForm){var oForm=eval("document."+sSearchForm);var fieldType=0;var checkInDate="";try{checkInDate=oForm.checkin.value}catch(e){}var checkOutDate="";try{checkOutDate=oForm.checkout.value}catch(e){}setCheckInOutCookie(checkInDate,checkOutDate);oForm.submit()}function clearHomeDates(A,C,B){if(A=="HomeSearchForm"){oForm=document.getElementById("HomeSearchForm");oForm.checkin.value="";oForm.checkout.value=""}if(A=="searchCategoryForm"){oForm=document.getElementById("searchCategoryForm");oForm.checkin.value="";oForm.checkout.value=""}setCheckInOutCookie("","")}function clearDates(B,A){try{document.getElementById(B).value=""}catch(C){}try{document.getElementById(A).value=""}catch(C){}setCheckInOutCookie("","")}function submitCategorySearch(sSearchForm){var oForm=eval("document."+sSearchForm);var sDestination=oForm.category.value;var checkInDate="";try{checkInDate=oForm.checkin2.value}catch(e){}var checkOutDate="";try{checkOutDate=oForm.checkout2.value}catch(e){}if(sDestination!=""){setCheckInOutCookie(checkInDate,checkOutDate);document.location.href="search-results.aspx?N="+sDestination}}function submitSearchForm(E,B,F,D){if(Page_ClientValidate()){var A="",C="";if(B){A=B.value}if(F){C=F.value}if(D&&D.value){E=E+((E.indexOf("?")==-1)?"?":"&")+"Ntt="+escape(D.value)+"&Ntk=Property"}setCheckInOutCookie(A,C);document.location.href=E}}function setCheckInOutCookie(A,B){document.cookie="checkin="+A+"; path=/";document.cookie="checkout="+B+"; path=/"}function makeItBig(C,A){var D=document.getElementById("largePreview");var B=C.src;B=B.substring(0,B.length-4);B+="_large.png";D.style.display="";D.src=B;if(A=="left"){D.style.top=(Position.cumulativeOffset($(C))[1]-10)+"px";D.style.left=(Position.cumulativeOffset($(C))[0]-D.width+150)+"px"}else{D.style.top=(Position.cumulativeOffset($(C))[1]-10)+"px";D.style.left=(Position.cumulativeOffset($(C))[0]-10)+"px"}}function inputSample(A,B){if(A.value==B){A.style.color="#333333";A.value=""}}function loadLargePreview(B,C){var A=document.getElementById("largePhotoView");A.style.display="";var D=document.getElementById("largePhoto");B=B.replace("-b.jpg","-c.jpg");D.style.background="url("+B+")"}function loadThumb(A,B){document.getElementById("propertyPhoto").src="/property/"+B+"/photo-"+A+"-b.jpg"}function loadURL(A){document.location.href=A}function loadRefinement(A){document.location.href=A}function loadSort(C,B,A){var D=C.options[C.selectedIndex].value;if(A[D]){loadRefinement(B+"&Ns="+A[D])}else{loadRefinement(B)}}function vrHomeTab(A){if(A=="1"){document.getElementById("vrHomeTabs").style.backgroundImage="url(/content/images/home-tab-1.gif)";document.getElementById("categorySearch").style.display="none";document.getElementById("destinationSearch").style.display=""}else{document.getElementById("vrHomeTabs").style.backgroundImage="url(/content/images/home-tab-2.gif)";document.getElementById("destinationSearch").style.display="none";document.getElementById("categorySearch").style.display=""}}function showMore(A,B){document.getElementById(A).style.display="";document.getElementById(B).style.display="none"}function compareRemove(A){searchCookieCompareRemove(A);document.location.href="search-compare.aspx"}function searchAddCompare(A){var B=document.getElementById("compare_"+A);if(B.checked==true){searchCookieCompareAdd(A,B)}else{searchCookieCompareRemove(A)}}function searchCookieCompareAdd(D,E){var B=getCookie("compare");if(maxCompare(B)==false){var C=new Date();C.setTime(C.getTime()+(60*60*1000));var A="; expires="+C.toGMTString();document.cookie="compare="+B+":"+D+"|"+A+"; path=/"}else{alert("Only Select 4\nGo to Compare Page to Remove Items.");E.checked=false}}function searchCookieCompareRemove(D){var B=getCookie("compare");var C=new Date();C.setTime(C.getTime()+(60*60*1000));var A="; expires="+C.toGMTString();document.cookie="compare="+B.replace(":"+D+"|","")+A+"; path=/"}function maxCompare(A){var B=A.split("|");if(B.length>4){return true}else{return false}}function compare(){document.location.href="/search-compare.aspx"}function getCookie(B){var D=B+"=";var A=document.cookie.split(";");for(var C=0;C<A.length;C++){var E=A[C];while(E.charAt(0)==" "){E=E.substring(1,E.length)}if(E.indexOf(D)==0){return E.substring(D.length,E.length)}}return""}function refinementSeeMore(B,A){if(B=="+"){document.getElementById("a"+A).style.display="none";document.getElementById("d"+A).style.display=""}if(B=="-"){document.getElementById("a"+A).style.display="";document.getElementById("d"+A).style.display="none"}}function showDropDownMenu(F,E,B,D,A){var G=document.getElementById(F);var C=document.getElementById(E);if(C.className==D){C.className=A}else{C.style.top=(Position.cumulativeOffset($(G))[1]+$(G).getHeight())+"px";C.style.left=Position.cumulativeOffset($(G))[0]+"px";C.className=D}}function loadFlash(A,E,B,C){var D=new SWFObject(C,A,E,B,"8","#000000");D.addParam("wmode","transparent");D.addParam("quality","autohigh");D.addParam("scale","default");D.write(A)}function formSubmit(C){var A="";for(i=0;i<C.elements.length;i++){sField=C.elements[i].name;sType=C.elements[i].type.toLowerCase();if(sType=="checkbox"){sValue=C.elements[i].checked}else{if(sType=="select-one"){sValue=C.elements[i].options[C.elements[i].selectedIndex].value}else{sValue=C.elements[i].value}}A+="&"+sField+"="+sValue}if(window.XMLHttpRequest){var B=new XMLHttpRequest()}else{var B=new ActiveXObject("MSXML2.XMLHTTP.3.0")}B.open("POST",C.action,false);B.setRequestHeader("Content-Type","application/x-www-form-urlencoded");B.send(A);return B.responseText}function stringSubmit(A,C){if(window.XMLHttpRequest){var B=new XMLHttpRequest()}else{var B=new ActiveXObject("MSXML2.XMLHTTP.3.0")}B.open("POST",C,false);B.setRequestHeader("Content-Type","application/x-www-form-urlencoded");B.send(A);return B.responseText}function newsletterEmail(C){var B=document.getElementById(C);if(isEmail(B.value)){var A=stringSubmit("FormType=NewsletterByEmailOnly&email="+B.value,"/FormSubmit.aspx");if(A==""){alert("Thank You!")}else{alert(A)}}else{alert("Invalid Email Address.")}}function commentKeyUp(A,B){if(A.value.length>=3000&&B.keyCode!=8&&B.keyCode!=46){if(B.preventDefault){B.preventDefault()}B.returnValue=false}document.getElementById("contactCharacterCount").innerHTML=(3000-A.value.length)}function jsonEscape(A){return A.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\r?\n/g,"\\n")}function submitNewsletterForm(){var C="";if(document.newsletterForm.firstname.value==""){C+="First Name is Required.\n"}if(document.newsletterForm.lastname.value==""){C+="Last Name is Required.\n"}if(!isEmail(document.newsletterForm.email.value)){C+="Missing or Invaild Email Address.\n"}try{if(document.newsletterForm.mountainnewsletter.checked==false&&document.newsletterForm.beachnewsletter.checked==false){C+="Please Select a Newsletter.\n"}}catch(B){}if(C==""){document.newsletterForm.action="/FormSubmit.aspx";var A=formSubmit(document.newsletterForm);if(A==""){alert("Thank You!")}else{alert(A)}}else{alert(C)}}function propertyQuestion(){var B="";if(document.propertyQuestionForm.firstname.value==""){B+="First Name is Required.\n"}if(document.propertyQuestionForm.lastname.value==""){B+="Last Name is Required.\n"}if(!isEmail(document.propertyQuestionForm.email.value)){B+="Missing or Invaild Email Address.\n"}if(B==""){document.propertyQuestionForm.action="/FormSubmit.aspx";var A=formSubmit(document.propertyQuestionForm);if(A==""){alert("Thank You!")}else{alert(A)}}else{alert(B)}}function emailFriend(){var B="";if(document.emailFriendForm.sendername.value==""){B+="Your Name is Required.\n"}if(document.emailFriendForm.recipientname.value==""){B+="Recipient Name is Required.\n"}if(!isEmail(document.emailFriendForm.senderemail.value)){B+="Your Email Address is Missing or Invaild.\n"}if(!isEmail(document.emailFriendForm.recipientemail.value)){B+="Recipient Email is Missing or Invaild.\n"}if(B==""){document.emailFriendForm.action="/FormSubmit.aspx";var A=formSubmit(document.emailFriendForm);if(A==""){alert("Thank You!")}else{alert(A)}}else{alert(B)}}function submitLead(){alert("entered submitLead");var B="";if(document.leadForm.firstname.value==""){B+="First Name is Required.\n"}if(document.leadForm.lastname.value==""){B+="Last Name is Required.\n"}if(!isEmail(document.leadForm.email.value)){B+="Missing or Invaild Email Address.\n"}if(B==""){alert("no errors");document.leadForm.action="/FormSubmit.aspx";var A=formSubmit(document.leadForm);if(A==""){alert("Thank You!")}else{alert(A)}alert("exited if")}else{alert(B)}alert("exited submitLead")}function isEmail(F){var A="@";var B=".";var E=F.indexOf(A);var C=F.length;var D=F.indexOf(B);if(F.indexOf(A)==-1){return false}if(F.indexOf(A)==-1||F.indexOf(A)==0||F.indexOf(A)==C){return false}if(F.indexOf(B)==-1||F.indexOf(B)==0||F.indexOf(B)==C){return false}if(F.indexOf(A,(E+1))!=-1){return false}if(F.substring(E-1,E)==B||F.substring(E+1,E+2)==B){return false}if(F.indexOf(B,(E+2))==-1){return false}if(F.indexOf(" ")!=-1){return false}return true};