var XMLHttp={XMLHttpRequestPool:[],getInstance:function(){for(var a=0;a<this.XMLHttpRequestPool.length;a++){if(this.XMLHttpRequestPool[a].readyState==0||this.XMLHttpRequestPool[a].readyState==4){return this.XMLHttpRequestPool[a];}}this.XMLHttpRequestPool[this.XMLHttpRequestPool.length]=this.createXMLHttpRequest();
return this.XMLHttpRequestPool[this.XMLHttpRequestPool.length-1];},createXMLHttpRequest:function(){if(window.XMLHttpRequest){var b=new XMLHttpRequest();}else{var a=["MSXML2.XMLHTTP.5.0","MSXML2.XMLHTTP.4.0","MSXML2.XMLHTTP.3.0","MSXML2.XMLHTTP","Microsoft.XMLHTTP"];for(var d=0;d<a.length;d++){try{var b=new ActiveXObject(a[d]);
break;}catch(c){alert(c);}}}if(b.readyState==null){b.readyState=0;b.addEventListener("load",function(){b.readyState=4;if(typeof b.onreadystatechange=="function"){b.onreadystatechange();}},false);}return b;},sendRequest:function(method,url,data,callback){var objXMLHttp=this.getInstance();with(objXMLHttp){try{if(url.indexOf("?")>0){url+="&randnum="+Math.random();
}else{url+="?randnum="+Math.random();}open(method,url,true);if(method=="POST"){setRequestHeader("Content-Type","application/x-www-form-urlencoded");send(data);}if(method=="GET"){send();}onreadystatechange=function(){if(objXMLHttp.readyState==4){if(objXMLHttp.status==200||objXMLHttp.status==304){callback(objXMLHttp);
}}};}catch(e){alert(e);}}}};
