var xmlhttp = false;

function InitXmlHttpRequest() 
{
	// branch for native XMLHttpRequest object
	if(window.XMLHttpRequest)
	{
    	try
    	{
			xmlhttp = new XMLHttpRequest();
			if (xmlhttp.overrideMimeType)
				xmlhttp.overrideMimeType('text/xml');
		}
		catch(e)
		{
			xmlhttp = false;
		}
	// branch for IE/Windows ActiveX version
	}
	else if (window.ActiveXObject)
	{
       	try
       	{
        	xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
      	}
      	catch(e)
      	{
        	try
        	{
          		xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
        	}
        	catch(e)
        	{
          		xmlhttp = false;
        	}
		}
	}
	if(xmlhttp) return xmlhttp;	
}