function HTTPConnect()
{
	var HttpCnx = false;
	var Datas = new String();
	
	/*
	//Creation de l'objet de connection HTTP
	try
	{
		HttpCnx = new XMLHttpRequest();		
	}
	catch (error)
	{
		try
		{
			HttpCnx = new ActiveXObject("Microsoft.XMLHTTP");
		}
		catch (error)
		{
			try
			{
				HttpCnx = new ActiveXObject("Msxml2.XMLHTTP");
			}
			catch (error)
			{
				HttpCnx = false;
			}
		}
	}
	*/
	
	try
	{
		HttpCnx = new ActiveXObject("Msxml2.XMLHTTP");
	}
	catch (e)
	{
		try
		{
			HttpCnx = new ActiveXObject("Microsoft.XMLHTTP");
		}
		catch (e)
		{
			HttpCnx = false;
		}
	}
	if (!HttpCnx && typeof XMLHttpRequest!='undefined')
	{
		HttpCnx = new XMLHttpRequest();
	}

	//Vide la pile de données
	this.ResetData = function()
	{
		Datas = new String();
		Datas = '';
	};
	
	//Ajoute des données a envoyer
	this.AddData = function(pfield, pvalue)
	{
		Datas += (Datas.length == 0) ? pfield+ "=" + escape(pvalue) : "&" + pfield + "=" + escape(pvalue);
	};

	//Envoi la requete HTTP
	this.SendData = function(CnxUrl, HttpMode, CallBackFonction)
	{
		HttpMode = HttpMode.toUpperCase();
		
		HttpCnx.onreadystatechange = function()
		{
			if (HttpCnx.readyState == 4 && HttpCnx.status == 200)
			{
				// Si une fonction de callBack a été définie
				if (typeof CallBackFonction == "function")
				{
					CallBackFonction(HttpCnx);
					return;
				}
				else
				{
					return;
				}
			}
		};
		
		if(HttpMode == "GET")
		{
			try
			{
				if(Datas.length > 0)
				{
					CnxUrl = CnxUrl + "?" + Datas;
				}
				
				HttpCnx.open("GET", CnxUrl);
				HttpCnx.send(null);
			}
			catch(error)
			{
				return false;
			}
		}
		else if(HttpMode == "POST")
		{
			try
			{
				HttpCnx.open("POST", CnxUrl); 
				HttpCnx.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
				HttpCnx.send(Datas);
			}
			catch(error)
			{
				return false;
			}
		}
		else
		{
			return false;
		}
	};
	return this;
}