var AjaxKtClass = function()
{
	this.xmlHttp = false;
	this.url = "";
	this.updateFun = null;

	this.Create = function(url, updateFun)
	{

		try{
			this.xmlHttp = new ActiveXObject("Msxml2.XMLHTTP");
		}catch(e){
			try{
				this.xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
			}catch(e2){
				this.xmlHttp = false;
			}
		}
		
		if(!this.xmlHttp&&typeof XMLHttpRequest != 'undefined'){
			this.xmlHttp = new XMLHttpRequest();

		}
		
		this.url = url;
		this.updateFun = updateFun;
	}

	this.OpenPost = function(param)
	{
		this.xmlHttp.onreadystatechange = this.updateFun;
		this.xmlHttp.open("POST", this.url, true);
		this.xmlHttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
		this.xmlHttp.setRequestHeader("Content-length", param.length);
		this.xmlHttp.setRequestHeader("Connection", "close");
		this.xmlHttp.send(param);
	}
	
	this.Open = function()
	{
		this.xmlHttp.open("GET", this.url, true);
		this.xmlHttp.onreadystatechange = this.updateFun;
		this.xmlHttp.send(null);
	}
	
	this.Open2 = function(url)
	{
		this.xmlHttp.open("GET", url, true);
		this.xmlHttp.onreadystatechange = this.updateFun;
		this.xmlHttp.send(null);
	}
	
	this.Open3 = function(param)
	{
		this.xmlHttp.open("GET", this.url + param, true);
		this.xmlHttp.onreadystatechange = this.updateFun;
		this.xmlHttp.send(null);
	}
	
	this.GetData = function()
	{
		if(this.xmlHttp.readyState == 4){
			return this.xmlHttp.responseText;
		}
		return null;
	}
	this.GetXml = function()
	{
		if(this.xmlHttp.readyState == 4){
			return this.xmlHttp.responseXML;
		}
		return null;
	}
}