function MortgageCalc(num){window.location.href=WebRoot+"tools/calculators/mortgage_calculator.aspx?price="+num;}function Listing(IdListing){var UGen=new UrlGen(QSCache.QueryString);UGen.RemoveParam("LID");UGen.AddParam("LID",IdListing);var strURL=WebRoot+"controls/ajaxcalls/DetailListingPath.aspx?"+UGen.ToString();$AJAX.GetForDelegate(function(AjaxResponse){window.location.href=AjaxResponse;},strURL);}function ListingPage(No,Position){QSCache.Position=Position;var UGen=new UrlGen(QSCache.QueryString);UGen.RemoveParam("No");UGen.AddParam("No",No);QSCache.QueryString=UGen.ToString();$AJAX.GetForDelegate(ListingPageHandler,WebRoot+"Controls/AjaxCalls/DetailListingIds.aspx?"+QSCache.QueryString);}function ListingPageHandler(AJAXResponse){if(AJAXResponse.length>0){var arrListingIds=AJAXResponse.split(',');var IdListing=arrListingIds[QSCache.Position];var UGen=new UrlGen(QSCache.QueryString);UGen.RemoveParams(["LIDS","LID"]);UGen.AddParam("LIDS",AJAXResponse.replace(/,/g,'--'));UGen.AddParam("LID",IdListing);var strURL=WebRoot+"controls/ajaxcalls/DetailListingPath.aspx?"+UGen.ToString();$AJAX.GetForDelegate(function(AjaxResponse){window.location.href=AjaxResponse;},strURL);}}function LoadRecentlySold(Address,AddressCityState,AddressZip,AddressLatLon){var strURL=WebRoot+"controls/ajaxcalls/GetRecentlySold.aspx?SEO=true&Address="+Address+"&AddressCityState="+AddressCityState+"&AddressZip="+AddressZip+"&AddressLatLon="+AddressLatLon;$AJAX.GetForDelegate(function(AjaxResponse){if(AjaxResponse!=""){gE("sold_homes").innerHTML=AjaxResponse;if(gE("sold_homes_js")){window.setTimeout(function(){var v="";var mylist=gE("sold_homes_js");for(i=0;i<mylist.childNodes.length;i++){v=v+mylist.childNodes[i].nodeValue;}eval(v);},200);}}else{gE("sold_homes").innerHTML="Information not available.";}},strURL);}function OmnitureClickRecentSales(){this.s_linkType='o';this.s_linkName="recent_sales_map";this.s_linkTrackVars="prop10,prop11,channel";this.s_suiteid="optimumhomescom";this.s_channel="recent_sales_map";this.s_pageName="recent_sales_map";this.s_prop10=IpAddress;this.s_prop11="3";s_lnk=s_co(this);s_gs(s_account)}