/**
* Iconic Management Systems AJAX Communication
*
* @package IMS
* @subpackage IMSAJAXComm Application
* @author Iconic Media
* @copyright Iconic Media (Division of Bates Management Corporation)
* @version 1.0.0
*/

/**
* Create XML HTTP Request Object
*
* @access Public
* @return object
*/
function MakeXMLHTTPRequest(url, callback, return_xml)
{
	var XMLReqObj = false;

	try
	{
		// Firefox, Opera 8.0+, Safari
		XMLReqObj = new XMLHttpRequest();
	}
	catch (e)
	{
		// Internet Explorer
		try
		{
			XMLReqObj = new ActiveXObject("Msxml2.XMLHTTP");
		}
		catch (e)
		{
			try
			{
				XMLReqObj = new ActiveXObject("Microsoft.XMLHTTP");
			}
			catch (e)
			{
				alert("Your browser does not support AJAX!");
				return false;
			}
		}
	}

XMLReqObj.onreadystatechange = function() {
	if (XMLReqObj.readyState == 4) {
		if (XMLReqObj.status == 200) {
			if (return_xml) {
				eval(callback + '(XMLReqObj.responseXML)');
			} else {
				eval(callback + '(XMLReqObj.responseText)');
			}
		}
	}
}

XMLReqObj.open('GET', url, true);
XMLReqObj.send(null);
}