function GetXmlHttpRequestObject() 
{
	try
	{
		if(window.XMLHttpRequest) 
		{
			var l_oRequest = new XMLHttpRequest();
			//some versions of Mozilla do not support the readyState property and the onreadystate event so we patch it!
			if(l_oRequest.readyState == null) 
			{
				l_oRequest.readyState = 1;
				l_oRequest.addEventListener(
				 "load",
				 function() 
				 {
					 l_oRequest.readyState = 4;
					 if(typeof l_oRequest.onreadystatechange == "function")
						 l_oRequest.onreadystatechange();
				 },
  			false);
			}
			return l_oRequest;
		}
		if(window.ActiveXObject) 
			return new ActiveXObject(GetXmlParserProgID());
	}
	catch(l_oException) { }
	throw new Error("Your browser does not support XmlHttp objects");
}

var m_oXmlParserProgID;
function GetXmlParserProgID()
{
	if(m_oXmlParserProgID)
		return m_oXmlParserProgID;
	var l_astrProgIDs = ["Msxml2.XMLHTTP.5.0", "Msxml2.XMLHTTP.4.0", "MSXML2.XMLHTTP.3.0", "MSXML2.XMLHTTP", "Microsoft.XMLHTTP"];
	for(var l_intIndex = 0; l_intIndex < l_astrProgIDs.length; l_intIndex++)
	{
		try
		{
 		var l_strProgID = l_astrProgIDs[l_intIndex];
			var l_oActiveXObject = new ActiveXObject(l_strProgID);
			m_oXmlParserProgID = l_strProgID;
			return m_oXmlParserProgID;
		}
		catch(l_oException) { };
	}
	throw new Error("Could not find an installed XML parser");
}

function ASyncGetXmlHttpRequestResponse(p_strUrl, p_CallBackFunction)
{
 var l_oXmlHttpRequest;
 
 l_oXmlHttpRequest = GetXmlHttpRequestObject();
 l_oXmlHttpRequest.open("GET", UniquifiedUrl(p_strUrl), true);
 l_oXmlHttpRequest.setRequestHeader("Content-Type", "application/x-javascript;");
 l_oXmlHttpRequest.onreadystatechange = function()
  {
   if(l_oXmlHttpRequest.readyState == 4 && l_oXmlHttpRequest.status == 200)
    p_CallBackFunction(l_oXmlHttpRequest.responseText);
  };
 l_oXmlHttpRequest.send('dummy');
}

function GetXmlHttpRequestResponse(p_strUrl)
{
 var l_oXmlHttpRequest;

 l_oXmlHttpRequest = GetXmlHttpRequestObject();
 l_oXmlHttpRequest.open("GET", UniquifiedUrl(p_strUrl), false);
 l_oXmlHttpRequest.setRequestHeader("Content-Type", "application/x-javascript;");
 l_oXmlHttpRequest.send('dummy');
 return l_oXmlHttpRequest.responseText;
}
