// AJAX JavaScript Document
function connexionCompte_init(login,pass){
			
		var objetXHR = creationXHR();
		// Déclaration de la fonction de rappel
		function connexionCompte(){
			document.getElementById("connexion_compte_wait").innerHTML = "<img src='ajax/imgs/wait01.gif' width='16' height='16' />";
			//document.getElementById("inscr_newsletter_wait").innerHTML = "";
			
			if(objetXHR.readyState == 4){
				
				if(objetXHR.status == 200){
					var resultat = objetXHR.responseText;
					document.getElementById("connexion_compte_wait").innerHTML = "";
					if(resultat == "ok"){
						window.location.replace("index.php?theme=gerer_compte");
					}else{
						window.location.replace("index.php");
					}
					
				}else{
					alert("Erreur HTTP N°"+objetXHR.status);
				}
			}
		}
		// Traitement Asynchrone GET
		// Désignation de la fonction de rappel
		objetXHR.onreadystatechange = connexionCompte;
		objetXHR.open("get", "ajax/custom/compte/connexion_compte.php?login="+login+"&pass="+pass, true);
		// envoie de la requête
		objetXHR.send(null);

}
