ajax={
xmlHttp:null,
strText:"",
onSuccess:null,
onRequest:null,
$:function(_){return document.getElementById(_);},
create:function(){
if(window.ActiveXObject)
	try{
		this.xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
	}catch(e){
			try{
				this.xmlHttp = new ActiveXObject("Msxml2.XMLHTTP");
			}catch(e){}
	}
else if(window.XMLHttpRequest) this.xmlHttp=new XMLHttpRequest();
},
post:function(strUrl,showObj,hideLoading){
		this.create();
		var _this = this;
		try{
			this.xmlHttp.open("POST",strUrl.url,true);		
			this.xmlHttp.setRequestHeader("cache-control","no-cache"); 
			this.xmlHttp.setRequestHeader("Content-Length",strUrl.parames.length);
			this.xmlHttp.setRequestHeader("Charset","utf-8");
			this.xmlHttp.setRequestHeader("CONTENT-TYPE","application/x-www-form-urlencoded");
			this.xmlHttp.onreadystatechange=function(){
			if(_this.xmlHttp.readyState!=4 && showObj){if(_this.onRequest && !hideLoading){_this.onRequest();}}
			if(_this.xmlHttp.readyState==4 && _this.xmlHttp.status==200){
					if(_this.onSuccess)
						_this.onSuccess(_this.xmlHttp.responseText);
										 }
								  }  //end onreadystatechange
			this.xmlHttp.send(strUrl.parames+"&_="+new Date().getTime());  // send parames
		}
		catch(e){}
},   //end Post
get:function(strUrl,showObj){
		this.create();
		var _this = this;
		try{
			if(this.onRequest) this.onRequest();
			this.xmlHttp.open("GET",strUrl.url+"?_="+new Date().getTime()+"&"+strUrl.parames,true);
			this.xmlHttp.onreadystatechange=function(){
			if(_this.xmlHttp.readyState!=4 && showObj){if(_this.onRequest) _this.onRequest();};	
			if(_this.xmlHttp.readyState==4 && _this.xmlHttp.status==200){
					if(showObj){_this.$(showObj).innerHTML=_this.xmlHttp.responseText;}
					}
														}  //end onreadystatechange
			this.xmlHttp.send(null);  // send parames
		}
		catch(e){}
}
}

