// Create Http object
function createHttpObject()
{
	var httpObj = null;

	if (typeof XMLHttpRequest != 'undefined')
	{
		try
		{
			// Native XML support (Firefox, etc...)
			httpObj = new XMLHttpRequest();
		}
		catch (e1) {}
	}
	else
	{
		try
		{
			// Internet Explorer support (new library)
			httpObj = new ActiveXObject("Msxml2.XMLHTTP");
		}
		catch (e2)
		{
			try
			{
				// Internet Explorer support (old library)
				httpObj = new ActiveXObject("Microsoft.XMLHTTP");
			}
			catch (e3) {}
		}
	}

	return httpObj;
}

// Do an XML request
function getXml(httpObj, urlPath, fnctName)
{
	if(httpObj == null) return false;

	httpObj.open('GET', urlPath, true);
	httpObj.onreadystatechange = function() {
			if (httpObj.readyState == 4)
			{
				if (httpObj.status == 200)
				{
					var xmldoc = httpObj.responseXML;
					eval(fnctName + "(xmldoc)");
				}
				else
				{
					alert('Error : getXml failed !\r\nReason : ' + httpObj.statusText);
				}   
			}
		}

	httpObj.send(null);
	setTimeout('getXml();', 10000);
}

