function	__XMLHttpRequest_init()
{
	var		xhr = null;
	
	if (window.XMLHttpRequest)
		xhr = new XMLHttpRequest();		
	else if (window.ActiveXObject)
	{
		try {
			xhr = new ActiveXObject("Msxml2.XMLHTTP");
		}
		catch(e) {
			xhr = new ActiveXObject("Microsoft.XMLHTTP");
		}
	}
	else
	{
		alert("Votre navigateur ne supporte pas le XMLHttpRequest...");
		return null;
	}
	return xhr;
}

/* 
** 0 : L'objet XHR a été créé, mais pas encore initialisé (la méthode open n'a pas encore été appelée)
** 1 : L'objet XHR a été créé, mais pas encore envoyé (avec la méthode send)
** 2 : La méthode send vient d'être appelée
** 3 : Le serveur traite les informations et a commencé à renvoyer des données
** 4 : Le serveur a fini son travail, et toutes les données sont réceptionnées 
*/
function	__XMLHttpRequest_send(rqt, target, callback, loading_container)
{
	var		xhr = null;
	var		loading;

	if (!(xhr = __XMLHttpRequest_init()))
	{
		alert("Echec de l'envoi");
		return ;
	}
	if (xhr && xhr.readyState != 0)
		xhr.abort();
	xhr.onreadystatechange = function () {
		if (xhr.readyState == 4 && (xhr.status == 200 || xhr.status == 0))
		{
			if (loading_container)
				loading_container.innerHTML = '';
			callback(xhr.responseText);
		}
		else if (xhr.readyState >= 1 && xhr.readyState <= 3 && loading_container)
		{
			loading_container.innerHTML = '<img src="'+absolute_path_http+'images/ajax-loader.gif" style="border: none;"/><br />Recherche en cours';
			loading_container.style.display = 'block';
		}
	}
	xhr.open("POST", target, true);
	xhr.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");	
	xhr.send(rqt);
}