var req;var xmlRequests=new Array();var xmlDocuments=new Array();var waitingForResponse=0;function AddXmlRequest(A,B){xmlRequests[xmlRequests.length]=A;xmlDocuments[xmlDocuments.length]=B;SendXMLRequest()}function SendXMLRequest(){if((xmlRequests.length>=1)&&(waitingForResponse<=0)){waitingForResponse++;var B=xmlRequests[0];var A=xmlDocuments[0];xmlRequests.splice(0,1);xmlDocuments.splice(0,1);loadXMLDoc(B,A)}}function loadXMLDoc(A,C){req=false;if(window.XMLHttpRequest){try{req=new XMLHttpRequest()}catch(B){req=false}}else{if(window.ActiveXObject){try{req=new ActiveXObject("Msxml2.XMLHTTP")}catch(B){try{req=new ActiveXObject("Microsoft.XMLHTTP")}catch(B){req=false}}}}if(req){req.onreadystatechange=processReqChange;if(C==null){req.open("GET",A,true);req.send("")}else{req.open("POST",A,true);req.setRequestHeader("Content-Type","application/x-www-form-urlencoded");req.send("xml="+C)}}}function processReqChange(){if(req.readyState==4){if(req.status==200){processXML(req.responseXML)}else{alert("There was a problem retrieving the XML data:\n"+req.statusText)}waitingForResponse--;SendXMLRequest()}};
