function createAjaxObject(func_ref)
{
	ajaxObj = null;
	try
	{
		// Firefox, Opera 8.0+, Safari
		ajaxObj = new XMLHttpRequest();
	}
	catch (e)
	{
		// Internet Explorer
		try
		{
			ajaxObj = new ActiveXObject("Msxml2.XMLHTTP");
		}
		catch (e)
		{
			ajaxObj = new ActiveXObject("Microsoft.XMLHTTP");
		}
	}

	ajaxObj.onreadystatechange = function() { ajaxObjStateChanged(func_ref); }
	return ajaxObj;
}

function ajaxObjStateChanged(func_ref)
{
	var x, y;
	var rowDiv = '||#~#||';
	var cellDiv = '||~#~||';
	var keyValDiv = '||~~~||';

	if (ajaxObj.readyState == 4)
	{
		if (ajaxObj.status != 200)
		{
			alert('Ajax error - Status: ' + ajaxObj.status + '\nSome features of this website may not work with your browser.\nPlease reload the site using Internet Explorer 6 or later, Firefox, Safari or Opera.');
			return false;
		}

		//alert('Ajax returned!');
		//query executed ok.
		//data returned will be in format 'name||~~~||value||~#~||name||~~~||value||~#~||||#~#||' etc..
		//  ||~~~||  == split between colName and data
		//  ||~#~||  == split between column
		//  ||#~#||  == split between rows

		//Grab full string returned
		//Remove last 7 chars as this will be ||#~#|| to signify the end of the last row
		var recSet = ajaxObj.responseText.substr(0, ajaxObj.responseText.length - 7);

		//Split recSet into rows
		theRows = recSet.split(rowDiv);

		//Each row will now contain 'name||~~~||value||~#~||name||~~~||value||~#~||' etc..
		//Split rows into sets of results

		var rows = new Array();

		for (x = 0; x < theRows.length; x++)
		{
			keyVals = theRows[x].split(cellDiv);
			rows[x] = new Array();

			for (y = 0; y < keyVals.length; y++)
			{
				vals = keyVals[y].split(keyValDiv);
				rows[x][vals[0]] = vals[1];
			}
		}

		switch (func_ref)
		{
			case 'addPerson':
				react_doThis();
				break;
		}
		return true;
	}
}

function react_doThis()
{
	alert('react_doThis()');
	return false;
}