
function createXHR( )
{
	if (window.XMLHttpRequest)  // Mozilla, Safari,...
	{
		objXHR = new XMLHttpRequest( );

		if (objXHR.overrideMimeType)
		{
			objXHR.overrideMimeType('text/xml');
		}
	}

	else if (window.ActiveXObject)  // IE
	{
		try
		{
			objXHR = new ActiveXObject("Msxml2.XMLHTTP");
		}

		catch(e)
		{
			try
			{
				objXHR = new ActiveXObject("Microsoft.XMLHTTP");
			}
	
			catch(e)
			{
				throw e;
			}
		}
	}

	if (!objXHR)
	{
		alert('Giving up :( Cannot create an XMLHTTP instance');

		return null;
	}

	return objXHR;
}