function ajaxObj ()
{
	this.req = null;
	this.url = null;
	this.status = null;
	this.statusText = '';
	this.method = 'GET';
	this.async = true;
	this.dataPayload = null;
	this.readyState = null;
	this.responseText = null;
	this.responseXML = null;
	this.handleResp = null;
	this.responseFormat = 'text', // 'text', 'xml', 'object'
	this.mimeType = null;
	this.headers = [];
	this.init = function ()
	{
		var i = 0;
		var reqTry = [ 
			function() { return new XMLHttpRequest (); },
			function() { return new ActiveXObject ('Msxml2.XMLHTTP'); },
			function() { return new ActiveXObject ('Microsoft.XMLHTTP'); }];
			
		while (!this.req && (i < reqTry.length))
		{
			try
			{
				this.req = reqTry [i++] ();
			}
			catch (e) {}
		}
		return true;
	};
	this.doGet = function (url, handler, format)
	{
		this.url = url;
		this.handleResp = handler;
		this.responseFormat = format || 'text';
		this.doReq ();
	}
	this.doReq = function ()
	{
		if (!this.init ())
		{
			alert ('Could not create XMLHttpRequest object.');
			return;
		}
		this.req.open (this.method, this.url, this.async);
		if (this.mimeType)
		{
			try
			{
				req.overrideMimeType (this.mimeType);
			}
			catch (e)
			{
				// Couldn't override MIME type -- IE6 or Opera?
			}
		}
		var self = this; // Fix loss-of-scope in inner function
		this.req.onreadystatechange = function ()
		{
			var resp = null;
			if (self.req.readyState == 4)
			{
				switch (self.responseFormat)
				{
					case 'text':
						resp = self.req.responseText;
						break;
					case 'xml':
						resp = self.req.responseXML;
						break;
					case 'object':
						resp = req;
						break;
				}
				if (self.req.status >= 200 && self.req.status <= 299)
				{
					self.handleResp (resp);
				}
				else
				{
					self.handleErr (resp);
				}
			}
		}
		this.req.send (this.postData);
	};
	this.setMimeType = function (mimeType)
	{
		this.mimeType = mimeType;
	};
	this.handleErr = function () {};
	this.abort = function ()
	{
		if (this.req)
		{
			this.req.onreadystatechange = function () {};
			this.req.abort ();
			this.req = null;
		}
	};
}