var XSLProcessor=new Object();XSLProcessor.AgentListings=null;XSLProcessor.AgentListingPagination=null;XSLProcessor.AgentListingResults=null;XSLProcessor.AgentSoldListings=null;XSLProcessor.AgentSoldListingsPagination=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.AgentListingResults=XSLProcessor.load("includes/xsl/agents/agent_detail_listings_results.xsl");XSLProcessor.AgentListings=XSLProcessor.load("includes/xsl/agents/agent_detail_listings.xsl");XSLProcessor.AgentListingPagination=XSLProcessor.load("includes/xsl/agents/agent_detail_listings_pagination.xsl");XSLProcessor.AgentSoldListings=XSLProcessor.load("includes/xsl/agents/agent_detail_soldlistings.xsl");XSLProcessor.AgentSoldListingPagination=XSLProcessor.load("includes/xsl/agents/agent_detail_soldlistings_pagination.xsl");XSLProcessor.loaded=true;};function RunAgentDetailQuery(Query){var QGen=new UrlGen(Query);if(XSLProcessor.loaded==false){XSLProcessor.loadAll();}var xmlDocPath="";xmlDocPath="agent_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;var listingCount=0;window.location.herf=window.location.reload;if(QGen.GetParam("SL")==""){Sarissa.updateContentFromNode(XMLDoc,gE("paging_active_listings"),XSLProcessor.AgentListingPagination);UnescapeCommonInnerHTML(gE("paging_active_listings"));Sarissa.updateContentFromNode(XMLDoc,gE("agentlisting_results"),XSLProcessor.AgentListings);UnescapeCommonInnerHTML(gE("agentlisting_results"));listingCount=GetSingleNodeContent(XMLDoc,"/agent/activelistings/ListingCount");var listingIds=new Array(listingCount);var codeFeaturedIds=new Array(listingCount);var bookNumbers=new Array(listingCount);for(var i=0;i<=listingCount;i++){listingIds[i]=GetSingleNodeContent(XMLDoc,"agent/activelistings/listing["+i+"]/idlisting");codeFeaturedIds[i]=GetSingleNodeContent(XMLDoc,"agent/activelistings/listing["+i+"]/codefeatured");bookNumbers[i]=GetSingleNodeContent(XMLDoc,"agent/activelistings/listing["+i+"]/booknumber");}}else{Sarissa.updateContentFromNode(XMLDoc,gE("paging_sold_listings"),XSLProcessor.AgentSoldListingPagination);UnescapeCommonInnerHTML(gE("paging_sold_listings"));Sarissa.updateContentFromNode(XMLDoc,gE("agentsoldlisting_results"),XSLProcessor.AgentSoldListings);UnescapeCommonInnerHTML(gE("agentsoldlisting_results"));listingCount=GetSingleNodeContent(XMLDoc,"/agent/soldlistings/ListingCount");var listingIds=new Array(listingCount);var codeFeaturedIds=new Array(listingCount);var bookNumbers=new Array(listingCount);for(var i=0;i<=listingCount;i++){listingIds[i]=GetSingleNodeContent(XMLDoc,"agent/soldlistings/listing["+i+"]/idlisting");codeFeaturedIds[i]=GetSingleNodeContent(XMLDoc,"agent/soldlistings/listing["+i+"]/codefeatured");bookNumbers[i]=GetSingleNodeContent(XMLDoc,"agent/soldlistings/listing["+i+"]/booknumber");}}var agentProductString="";for(var i=0;i<=listingCount;i++){if(listingIds[i]!=undefined&&listingIds[i]!="")agentProductString+=";"+listingIds[i]+";;;event8=1;evar41="+bookNumbers[i]+"|evar44="+codeFeaturedIds[i]+",";}if(agentProductString.substring(agentProductString.length-1)){agentProductString=agentProductString.substring(0,agentProductString.length-1);}omAgentPagination(agentProductString);}