function ajax_send(url,onfinish) { var request=new httprequest(); request.onfinish=function(){eval(onfinish);} request.onerror=function(e){alert(e.message);} request.open("get",url+"&math="+math.random(),true); request.setrequestheader('content-type','text/xml'); request.setrequestheader("charset","utf-8"); request.send(null); } function httprequest() { if(this==window)throw new error(0,"httprequest is unable to call as a function.") var me=this; var asyncflag=false; var typeflag=false; var r; function onreadystatechange() { if(me.onreadystatechange)me.onreadystatechange.call(r); if(r.readystate==4) { if(number(r.status)>=300) { if(me.onerror)me.onerror.call(r,new error(0,"http error:"+r.status+" "+r.statustext)); if(typeflag)r.onreadystatechange=function.prototype; else r.onreadystatechange=function.prototype; r=null; return; } me.status=r.status; me.statustext=r.statustext; me.responsetext=r.responsetext; me.responsebody=r.responsebody; me.responsexml=r.responsexml; me.readystate=r.readystate; if(typeflag)r.onreadystatechange=function.prototype; else r.onreadystatechange=function.prototype; r=null; if(me.onfinish)me.onfinish(); } } function creathttprequest(){ var e; try{ r=new window.xmlhttprequest(); typeflag=true; } catch(e) { var activexname=[ 'msxml2.xmlhttp.6.0', 'msxml2.xmlhttp.3.0', 'msxml2.xmlhttp.5.0', 'msxml2.xmlhttp.4.0', 'msxml2.xmlhttp', 'msxml.xmlhttp', 'microsoft.xmlhttp' ] function xmlhttpactivex() { var e; for(var i=0;i