$(function(){$("#lnkViewAll").click(function(A){A.preventDefault();IDXViewAll($(this).attr("href"))})});function IDXViewAll(E){var D=E.split("?");var C="";if(D.length>1){strQS=D[1];D=strQS.split("&");for(var B=0;B<D.length;B++){aParts=D[B].split("=");if(aParts[0]=="where"){C=(aParts[1]).replace(/\+/g," ")}}}if(C.length>0){var A=new eNStateFix();if(A.isState(C)){alert("Additional listings will display too many results. Please use the Location field to specify a City and State.");return false}else{document.location.href=E;
return false}}}function ReportPvHit(C){var B=obj("trackingframe");if(B){var A=""+(Math.random()*10000000000000);B.src=C+"&rnd="+A}}function ShowMoreInfo(A){var B=obj(A);if(B){B.style.display="block"}}function HideMoreInfo(A){var B=obj(A);if(B){B.style.display="none"}}function alterPropertySearch(D,A){var B=obj("sidebar_form_property");if(A==""&&(D=="lspcompid"||D=="lspsakey"||D=="lspofficekey")){SetCookie("lsp","",false,"/");window.location="/erabuy/";return }var C=obj(D);if(C){C.value=A}if(typeof g_AjaxSearcher!="undefined"){if(D=="propertysort"||D=="propertyrpp"){g_AjaxSearcher.ChangePage(0)
}}if(B){if(DoPropertySearch()){}}}function switchToCityStateSearch(){AddClass("propertysidebartypecontainer_map","hide");RemoveClass("propertysidebartypecontainer_loc","hide");obj("propertysearchtype").value="loc";obj("propertyshape_1").value=""}function switchToMapSearch(){RemoveClass("propertysidebartypecontainer_map","hide");AddClass("propertysidebartypecontainer_loc","hide");obj("propertysearchtype").value="map";obj("propertywhere_1").value=""}function DoPropertySearch(A){try{RemoveAllDefaultData(A)}catch(B){}}function DoAgentSearch(A){RemoveAllDefaultData(A)
}function DoOfficeSearch(A){RemoveAllDefaultData(A)}function onCompleteGotoListing(E){var D=E.responseXML.getElementsByTagName("propertymininav");if(!D||D.length!=1){onErrorGotoListing(E);return }DisableFormElements("searchactions",false);var C=D[0];var B=C.getElementsByTagName("property");if(B&&B.length>=1){var A=CyberGetNodeValue(B[0],"lp-url");document.location.href=A}else{alert("There are no more properties in your current search.")}}function onErrorGotoListing(A){DisableFormElements("searchactions",false);
alert("Could not select property")}function GotoListing(C,A){if(C==0){document.location.href="/property/index.jsp?property="+escape(A)}else{var B="property="+escape(A);B+="&offset="+C+"&"+GetCookie("lsp");var D="/ajaxservlet/search/propertymininav?"+B;if(C>0){DisableFormElements("viewnextlisting",true)}else{DisableFormElements("viewpreviouslisting",true)}g_CyberAjaxQueue.schedule("propertymininav",D,onCompleteGotoListing,onErrorGotoListing,true,true,null)}}function GetCookieObject(C){var B=GetCookie(C);var E=null;
if(B!=null){E={};var A=B.split("&");for(var D=0;D<A.length;D++){E[A[D].split("=")[0]]=A[D].split("=")[1]}}return E}function IsPropertyInCompare(A){var B=GetCookie("PropCompare");var D;if(B){D=B.split("|")}else{D=new Array}for(var C=0;C<D.length;C++){if(D[C]==A){return true}}return false}function CountCompareProperties(){var A=GetCookie("PropCompare");var B;if(A){B=A.split("|")}else{B=new Array}return B.length}function ToggleCompare(G){var B=false;var C=0;var E=true;var I=GetCookie("PropCompare");var D;var A;
var F;var K;var J;var H=true;var L=(new Date((new Date()).getTime()+30*150000));if(I){A=I.split("|")}else{A=new Array}F="";for(D=0;D<A.length;D++){if(G==A[D]){B=true;C=D}else{if(!H){F+="|"+A[D]}else{F+=A[D];H=false}}}if(!B){if(A.length>17){alert("You may only compare up to 18 properties at a time.  Please remove one or more proeprties from the comparison before trying to add more.");return }else{if(!H){F+="|"}F+=G}}SetCookie("PropCompare",F,L,"/",null,false);if(document.getElementById){K=document.getElementById(("pcd"+G));
if(K&&K.length&&K.length>1){for(D=0;D<K.length;D++){J=K[D];if(J){if(B){J.innerHTML='<img src="/eraimages/cpadd.gif" border=0 align=middle width=20 height=19>Add to Compare'}else{J.innerHTML='<img src="/eraimages/cprem.gif" border=0 align=middle width=20 height=19>Remove from Compare'}E=false}}}else{if(K){if(B){K.innerHTML='<img src="/eraimages/cpadd.gif" border=0 align=middle width=20 height=19>Add to Compare'}else{K.innerHTML='<img src="/eraimages/cprem.gif" border=0 align=middle width=20 height=19>Remove from Compare'
}E=false}}}if(E){if(B){alert("You have removed this property from your comparison list.")}else{alert("You have added this property to your comparison list.")}}if(!B){I=GetCookie("PropCompare");if(I==null||I==""){alert("You must have cookies enabled in your browser to use this feature.")}}}function SetCompareDisplay(B){if(obj("toolboxcompareimage")){if(IsPropertyInCompare(B)){obj("toolboxcompareimage").src="/images/search/icon_compare_remove.gif"}else{obj("toolboxcompareimage").src="/images/search/icon_compare_add.gif"
}}var A=CountCompareProperties();if(A<=0){if(obj("searchhelperbox")){obj("searchhelperbox").style.display="block"}if(obj("comparehelperbox")){obj("comparehelperbox").style.display="none"}}else{if(obj("comparehelperbox")){obj("comparehelperbox").style.display="block"}if(obj("searchhelperbox")){obj("searchhelperbox").style.display="none"}if(A==1){if(obj("searchhelperbox")){obj("comparehelpertext").innerHTML="Add one more property to use the compare tool."}if(obj("searchhelperbox")){obj("compareviewlistingsbutton").disabled=true
}}else{if(obj("searchhelperbox")){obj("comparehelpertext").innerHTML="You have "+A+" properties to compare."}if(obj("searchhelperbox")){obj("compareviewlistingsbutton").disabled=false}}}};
