function AjaxRefresh(elementIdValue)
{
	this.xmlHttp = this.GetXmlHttpObject();
	this.elementID = elementIdValue;
}

AjaxRefresh.prototype.setHttpObject = function(value)
{
	this.xmlHttp = value;
}

AjaxRefresh.prototype.getHttpObject = function()
{
	return this.xmlHttp;
}

AjaxRefresh.prototype.setReturnElementID = function(value)
{
	this.elementID = value;
}

AjaxRefresh.prototype.getReturnElementID = function()
{
	return this.elementID;
}

AjaxRefresh.prototype.getData = function(url)
{
	var _this = this;
	this.xmlHttp.onreadystatechange=function(){_this.stateChanged()};
	this.xmlHttp.open("GET",url,true);
	this.xmlHttp.send(null);
}

AjaxRefresh.prototype.stateChanged = function()
{ 
	//alert('readyState='+this.xmlHttp.readyState);
	if (this.xmlHttp.readyState==4 || this.xmlHttp.readyState=="complete")
 	{ 
 		//alert('element ID='+this.elementID);
 		//alert('rtext='+this.xmlHttp.responseText);
  		if (this.elementID != '')
 		{
		    document.getElementById(this.elementID).innerHTML=this.xmlHttp.responseText;
		}
 	}
}

AjaxRefresh.prototype.GetXmlHttpObject = function()
{
	var http=null;
	try
	{
 		//Firefox, Opera 8.0+, Safari
 		http=new XMLHttpRequest();
 	}
	catch (e)
	{
		//Internet Explorer
 		try
  		{
  			http=new ActiveXObject("Msxml2.XMLHTTP");
  		}
 		catch (e)
  		{
  			http=new ActiveXObject("Microsoft.XMLHTTP");
  		}
 	}
	return http;
}