/**
 * XML Parser
 * Adapted from http://developer.apple.com/internet/webcontent/xmlhttpreq.html
 */
 
function getHttpReq() {
	var xhr_object=null;
		
	if(window.XMLHttpRequest){// Firefox
		xhr_object=new XMLHttpRequest();
	}else if(window.ActiveXObject)// Internet Explorer
		xhr_object=new ActiveXObject("Microsoft.XMLHTTP");
	else{// XMLHttpRequest non supporté par le navigateur 	   
		xhr_object = null;
	}
	
	return xhr_object;
}

function getXmlDoc(httpReq, filename) {
	var xmlDoc;

	httpReq.open("GET", filename, false /* sync */);
	httpReq.timeout = 10000;
	httpReq.send(null);
	xmlDoc = httpReq.responseXML;
	if (httpReq.status != 404 && httpReq.status!=403)
		return xmlDoc;
	else
		return null;
}
