function sendRequest(url,func,postData){var xhr=createXMLHttpObject();if(!xhr){return;}var method=(postData)?"POST":"GET";xhr.open(method,url,true);xhr.setRequestHeader('User-Agent','XHR');if(postData){xhr.setRequestHeader('Content-Type','application/x-www-form-urlencoded');}xhr.onreadystatechange=function(){if(xhr.readyState!=4){return;}if(xhr.status!=200&&xhr.status!=304){alert('HTTP error '+xhr.status);return;}func(xhr);};if(xhr.readyState==4){return;}xhr.send(postData);};var XHRoptions=[function(){return new XMLHttpRequest()},function(){return new ActiveXObject("Msxml2.XMLHTTP")},function(){return new ActiveXObject("Msxml3.XMLHTTP")},function(){return new ActiveXObject("Microsoft.XMLHTTP")}];function createXMLHttpObject(){var xmlhttp=false;for(var i=0;i<XHRoptions.length;i++){try{xmlhttp=XHRoptions[i]();}catch(e){continue;}break;}return xmlhttp;}
