// Retourne un nouvel objet XmlHttpRequest

/*
var GetXmlHttpRequest_AXO=null
var GetXmlHttpRequest=function () 
{
	if (window.XMLHttpRequest) { return new XMLHttpRequest() }
	else if (window.ActiveXObject) 
	{
		if (!GetXmlHttpRequest_AXO) {
			GetXmlHttpRequest_AXO=pickRecentProgID(["Msxml2.XMLHTTP.5.0", "Msxml2.XMLHTTP.4.0", "MSXML2.XMLHTTP.3.0", "MSXML2.XMLHTTP", "Microsoft.XMLHTTP"]);
		}
		return new ActiveXObject(GetXmlHttpRequest_AXO)
	}
	return false;
}
*/

var GetXmlHttpRequest=function ()
{
	if (window.XMLHttpRequest)
  	return new XMLHttpRequest()
  else 
  {
  	if (window.ActiveXObject) 
    	return new ActiveXObject("Microsoft.XMLHTTP");
  }
}

function QueryString(param)
{
	var strParam = new String(param);
	var position = window.location.search.indexOf('&' + strParam + '=');
	if (position==-1) 
		position = window.location.search.indexOf('?' + strParam + '=');
	if (position==-1) return '';
	return (window.location.search.indexOf('&', position + strParam.length + 2)==-1) ? window.location.search.substr(position + strParam.length + 2) : window.location.search.substr(position + strParam.length + 2, window.location.search.indexOf('&', position + strParam.length + 2) - (position + strParam.length + 2));
}

function getFileContent(url) 
{
	var Xhr=GetXmlHttpRequest();
  Xhr.open("GET",url,false);
  Xhr.send(null);
  return Xhr.responseText;
}

function loadpage(p)
{
	document.getElementById("page").innerHTML=getFileContent("jsload.php?page=" + p);
}


