/*********************************************************************************
	AJAX function
	Create request object. In Javascript, use the XMLTttpRequest object to create 
	a request object.
	Need to check browser type & version to know how to create the object.

	NOTE: 3-24-08 Need to figure out what to do for old browsers that can't 
	create request objects.
*********************************************************************************/
function createRequestObject() {

	try {
		// Firefox, Opera 8.0+, Safari		requestObject=new XMLHttpRequest();	}	catch (e) {		// Internet Explorer 		try {
			// Internet Explorer 6.0+
			requestObject=new ActiveXObject("Msxml2.XMLHTTP");		}		catch (e) {			try {				// Internet Explorer 5.5+
				requestObject=new ActiveXObject("Microsoft.XMLHTTP");			}			catch (e) {
				// Unable to create a request object: old browsers can't do it.
				alert("Your browser does not support AJAX!");				return false;			}		}	}

	return requestObject;
}


/*	// This code uses a for loop to do the same as the above function
	var XMLHttpFactories = [		// Firefox, Opera 8.0+, Safari		function () {return new XMLHttpRequest()},		// Internet Explorer 6.0+
		function () {return new ActiveXObject("Msxml2.XMLHTTP")},//		function () {return new ActiveXObject("Msxml3.XMLHTTP")},		// Internet Explorer 5.5+
		function () {return new ActiveXObject("Microsoft.XMLHTTP")}	];

	var requestObject = false;

	for (var i = 0 ; i < XMLHttpFactories.length ; i++) {		try {			xmlhttp = XMLHttpFactories[i]();			return xmlhttp;		}		catch (e) {
			continue;
		}	}

	// Unable to create a request object: old browsers can't do it.
	alert("Your browser does not support AJAX!");	return false;
*/

