function Ajax()
{
	//properties
	this.timeout=5000;
	this.send_way='GET';
	this.http_object=null;
	this.status='none';
	
	//methods
	this.state_changing=null;
	this.create_objec=create_objec;
	this.send=send;
	this.expired=null;
	this.create_objec();
	function create_objec()
	{
		try
		{
			req=new XMLHttpRequest();
		}
		catch(e)
		{
			try
			{
				req=new ActiveXObject('Msxml2.XMLHTTP');
			}
			catch(e)
			{
				try
				{
					req=new ActiveXObject('Microsoft.HttpRequest');
				}
				catch(e){this.http_object=null;	return false;}
			}
		}
		this.http_object=req;
	}
	
	function send(url,data,no_cache)
	{
		this.http_object.abort();
		if(data=='undefined') data=null;
		if(no_cache!==false) no_cache=true; else no_cache=false;
		if(this.http_object==null)
		{
			if(this.create_objec()==false) return false;
		}
		if(this.state_changing!=null) this.http_object.onreadystatechange=this.state_changing;
		if(this.expired!=null) setTimeout('this.expired()',this.timeout);
		this.http_object.open(this.send_way,url);
		if(this.send_way=='POST') this.http_object.setRequestHeader("Content-type", "application/x-www-form-urlencoded; charset=utf-8");
		if(no_cache)
		{
			this.http_object.setRequestHeader("Cache-Control","no-store, no-cache, must-revalidate");
			this.http_object.setRequestHeader( "If-Modified-Since", "Sat, 1 Jan 1900 00:00:00 GMT" );
		}
		this.status='connecting';
		this.http_object.send(data);
		this.status='sending';
	}
}
