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);}}var XSLProcessor=new Object();XSLProcessor.ActiveListings=null;XSLProcessor.loaded=false;XSLProcessor.load=function(XSLPath){var processor=new XSLTProcessor();var xslDoc=Sarissa.getDomDocument();xslDoc.async=false;var xmlhttp=new XMLHttpRequest();xmlhttp.open('GET',AbsoluteWebRoot+XSLPath,false);xmlhttp.send('');xslDoc=xmlhttp.responseXML;processor.importStylesheet(xslDoc);return processor;};XSLProcessor.loadAll=function(){XSLProcessor.ActiveListings=XSLProcessor.load("includes/xsl/communities/community_properties.xsl");XSLProcessor.loaded=true;};function RunCommunityDetailQuery(Query){var QGen=new UrlGen(Query);if(XSLProcessor.loaded==false){XSLProcessor.loadAll();}var xmlDocPath="";xmlDocPath="community_xml.aspx?"+Query;var XMLDoc=Sarissa.getDomDocument();XMLDoc.async=false;var xmlhttp=new XMLHttpRequest();xmlhttp.open("GET",AbsoluteWebRoot+xmlDocPath,false);xmlhttp.send('');XMLDoc=xmlhttp.responseXML;window.location.herf=window.location.reload;Sarissa.updateContentFromNode(XMLDoc,gE("properties_view"),XSLProcessor.ActiveListings);UnescapeCommonInnerHTML(gE("properties_view"));}