function request(callback) 	
	{
	var xhr = null;
	
	if (window.XMLHttpRequest || window.ActiveXObject) {
		if (window.ActiveXObject) {
			try {
				xhr = new ActiveXObject("Msxml2.XMLHTTP");
			} catch(e) {
				xhr = new ActiveXObject("Microsoft.XMLHTTP");
			}
		} else {
			xhr = new XMLHttpRequest(); 
		}
	} else {
		alert("Votre navigateur ne supporte pas l'objet XMLHTTPRequest...");
		return null;
	}
	
	xhr.onreadystatechange = function() {
		if (xhr.readyState == 4 && (xhr.status == 200 || xhr.status == 0)) {
			callback(xhr.responseText);
		}
	};
		var user = encodeURIComponent(document.getElementById('mail').value);
		var password = encodeURIComponent(document.getElementById('password').value);
		xhr.open("POST", "login.php", true);
		xhr.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
		xhr.send("user=" + user + "&password=" + password);
		
		
	}
	
	function readData(sData) {
	//document.getElementById('infos_connexion').innerHTML = sData;
	// alert(sData);
	
		if(sData==1)
		{
		var url=document.location
		document.location.href=url;
		}
		else
		{
		document.getElementById('infos_connexion').innerHTML = sData;
		}
	
	}
