
function ajaxcls()
{
	var xmlhttp;
	//var URL='';
	this.sss='php';
	this.resp_txt='';
	this.resp='notyet';

	this.GetXmlHttpObject=function()
	{
	  var xmlHttp=null;
	  try
		{
		// Firefox, Opera 8.0+, Safari
		xmlHttp=new XMLHttpRequest();
		}
	  catch (e)
		{
		// Internet Explorer
		try
		  {
		  xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
		  }
		catch (e)
		  {
		  xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
		  }
		}
	  return xmlHttp;
	}
	
	this.filename = function(f)
	{
		this.tt_filename=f;
	}
	
	this.setURL = function()
	{
		this.p='';
		this.URL='';
		var args=arguments;
		if(args.length!=0)
		{
		for(i=0;i<args.length;i++)
		{
			if((i+1)==args.length)
			{
			this.p+=args[i];
			}else{
			this.p+=args[i]+'&';
			}
		}
		}
		
		this.URL += this.tt_filename+"."+this.sss;
		this.URL += "?"+this.p;
		this.URL += "&sid="+Math.random();
	}
	
	this.connect=function()
	{
		this.xmlHttp=this.GetXmlHttpObject();
		if (this.xmlHttp==null)
		  {
		  alert ("Your browser does not support AJAX!");
		  return;
		  } 
		this.xmlHttp.onreadystatechange=this.response();
		this.xmlHttp.open("GET",this.URL,true);
		this.xmlHttp.send(null);
	}
	
	this.response=function()
	{
		if (this.xmlHttp.readyState==0)
		{
			alert("nono");
		}else
		if (this.xmlHttp.readyState==4)
		{
		this.resp_txt=this.xmlhttp.responseText;
		this.resp='done';
		alert("done1");
		}else{
			alert(this.xmlHttp.status);
		}
		
	}
	
}
