function ajaxObject(url, divId, callbackFunction)
{
	var that=this;
	this.updating=false;

	this.update = function(passData)
	{
		that.AJAX = null;
		if(window.XMLHttpRequest){
			that.AJAX=new XMLHttpRequest();
		}else{
			that.AJAX=new ActiveXObject("Microsoft.XMLHTTP");
    	}

		if(that.updating || that.AJAX==null){return false;}

		that.AJAX.onreadystatechange = function()
		{
			if(that.AJAX.readyState==4)
			{
				that.updating=false;

				if(divId)
				{
					var obj = document.getElementById(divId);
					obj.innerHTML = that.AJAX.responseText;
				}
				that.callback(that.AJAX.responseText);

			}
		}

		that.updating = true;

		var uri=urlCall;
		if(passData != undefined){
			uri += '?'+passData;
		}
		that.AJAX.open("GET", uri, true);
		that.AJAX.send(null);
		return true;
	}

	var urlCall = url;
	this.callback = callbackFunction || function () { };
}

