function InternimHTTP() {
	
	var strXmlOnLoad;
	var objHTTPRequest = false;
	var strData = new String();
	var objDiv = new String();
	var objXml;
	
	try {
		objHTTPRequest = new XMLHttpRequest();		
	}
	catch (error) {
		try {
			objHTTPRequest = new ActiveXObject("Microsoft.XMLHTTP");
		}
		catch (error) {
			try {
				objHTTPRequest = new ActiveXObject("Msxml2.XMLHTTP");
			}
			catch (error) {
				objHTTPRequest = false;
			}
		}
	}

	// Appel d'un XML + traitement de la réponse
	// 	strUrl
	// 	strFnCB : Fonction de retour
	this.loadXML = function(strXMLFile, strFnCB) {
		if (!objHTTPRequest) return false;
		// Chargement
		if (objXml && strXMLFile) {
			if (typeof strFnCB == "function") {
				if (strXmlOnLoad == 'onload') {
					objXml.onload = function() {
						strFnCB(objXml);
					}
				}
				else {
					objXml.onreadystatechange = function() {
						if (objXml.readyState == 4) strFnCB(objXml)
					}
				}
			}
			objXml.load(strXMLFile);
			return;
		}		
	}

	// Appel d'une URL + traitement de la réponse
	// 	strUrl
	// 	strHTTPMode	: GET, HEAD ou POST
	// 	strFnCB : Fonction de retour
	this.LoadURL = function(strUrl, strHTTPMode, strFnCB) {
		strHTTPMode = strHTTPMode.toUpperCase();
		objHTTPRequest.onreadystatechange = function() {
			if (objHTTPRequest.readyState == 4 && objHTTPRequest.status == 200) {
				// Si une fonction de callBack a été définie
				if (typeof strFnCB == "function") {
					strFnCB(objHTTPRequest);
					return;
				}
				// Si une zone destinée à récupérer le résultat a été définie
				else if (objDiv.length > 0){
					try {
						document.getElementById(objDiv).innerHTML = objHTTPRequest.responseText;
					}
					catch(error) {

					}
					return;
				}
			}
		};
		switch(strHTTPMode) {
			case "POST":
				try {
					objHTTPRequest.open("POST", strUrl); 
					objHTTPRequest.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
					objHTTPRequest.send(strData);
				}
				catch(error) {
					return false;
				}
			break;
			case "GET":
				try {
					if (strData.length > 0) {
						strUrl = strUrl + "?" + strData;
					}
					else
					{
						strUrl = strUrl;
					}
					objHTTPRequest.open("GET", strUrl);
					objHTTPRequest.send(null);
				}
				catch(error) {
					return false;
				}
			break;
			default :
				return false;
			break;
		}
		return true;
	};

	// Remise à zéro des datas
	this.resetData = function() {
		strData = new String();
		strData = '';
	};
	
	// Ajout d'une donnée
	this.appendData = function(pfield, pvalue) {
		strData += (strData.length == 0) ? pfield + "=" + escape(pvalue) : "&" + pfield + "=" + escape(pvalue);
	};
	
	// Elément mis à jour par les données retournées par l'appel
	this.setRefreshArea = function(id) {
		objDiv = id;
	};
	
	return this;
}