function createXmlHttp()
{
	var xmlhttp = null;
	try {
		xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
	}
	catch (e) {
		try {
			xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
		}
		catch (e)  {
			xmlhttp = null;
		}
	}
			 
	if (!xmlhttp && typeof XMLHttpRequest!='undefined') xmlhttp = new XMLHttpRequest();
	
	return xmlhttp;
}

function parseXML(text)
{
	if (window.ActiveXObject)
	{
		var xmlDoc = new ActiveXObject("Microsoft.XMLDOM");
		xmlDoc.async = false;
		xmlDoc.loadXML(text);
		
		return xmlDoc;
	}
	// code for Mozilla, etc.
	else if (document.implementation && document.implementation.createDocument)
	{
		var xmlDoc = document.implementation.createDocument("","",null);
		var objDOMParser = new DOMParser();
		xmlDoc = objDOMParser.parseFromString(text, "text/xml");
		
		return xmlDoc;
	}
	else
	{		
		return null;
	}
}
