function Ajax(parames){var _this=this;this.parames=parames||{};this.getXmlHttp=function(){try{return new ActiveXObject("Microsoft.XMLHttp");}catch(e){return new XMLHttpRequest();}};this.xmlHttp=this.getXmlHttp();this.method=this.parames.method?this.parames.method.toLowerCase():"post";if(this.parames.onLoad)this.parames.onLoad();if(this.parames.parames){if(this.parames.rewrite)
{this.xmlHttp.open(this.method.toLowerCase(),this.parames.url+(this.method=="post"?"":("?"+this.parames.parames+"/_/"+new Date().getTime())),true);}else{this.xmlHttp.open(this.method.toLowerCase(),this.parames.url+(this.method=="post"?"":("?"+this.parames.parames+"&_="+new Date().getTime())),true);}}else{if(this.parames.rewrite)
{this.xmlHttp.open(this.method.toLowerCase(),this.parames.url,true);}else{this.xmlHttp.open(this.method.toLowerCase(),this.parames.url,true);}}
this.xmlHttp.setRequestHeader("cache-control","no-cache");if(this.method=="post")
{if(this.parames.parames){this.xmlHttp.setRequestHeader("content-length",this.parames.parames.length);}
this.xmlHttp.setRequestHeader("charset",this.parames.charset||"utf-8");this.xmlHttp.setRequestHeader("CONTENT-TYPE","application/x-www-form-urlencoded");if(this.parames.parames){if(this.parames.rewrite)
{this.xmlHttp.send(this.parames.parames+"&_="+new Date().getTime());}else{this.xmlHttp.send(this.parames.parames+"&_="+new Date().getTime());}}else{if(this.parames.rewrite)
{this.xmlHttp.send("_="+new Date().getTime());}else{this.xmlHttp.send("_="+new Date().getTime());}}}else{this.xmlHttp.send(null);}
this.xmlHttp.onreadystatechange=function()
{if(_this.xmlHttp.readyState==4&&_this.xmlHttp.status==200)
{if(_this.parames.onComplete){_this.parames.onComplete(_this.xmlHttp["responseText"],_this.xmlHttp["responseXML"]);}}else{if(_this.parames.onLoading){_this.parames.onLoading();}}};this.abort=function(){this.xmlHttp.abort();};}
