function valider_sondage(id){

	data="";

	var xhr2 = new_xhr();//On crée un nouvel objet XMLHttpRequest
	xhr2.onreadystatechange = function(){
		if ( xhr2.readyState == 4 ){//Actions executées une fois le chargement fini
			if(xhr2.status  != 200){//Message si il se produit une erreur
				document.getElementById("sondage").innerHTML ="Error code " + xhr2.status;
			} else {//On met le contenu du fichier externe dans la div "content"
				chaine=xhr2.responseText;
				document.getElementById("sondage").innerHTML = chaine;

			}
		} else {//Message affiché pendant le chargement
			document.getElementById("sondage").innerHTML = "Enegistrement en cours ...<br />";
		}
	}

	monForm=document.sondage;
	

	ok=0;
	for (i=0; i<monForm.quizz.length; i++){
		if (monForm.quizz[i].checked == true){
			rep=monForm.quizz[i].value;
			ok=1;
		}
	}

	if(ok==1){


		
		data="rep="+rep;
		data+="&id_sondage="+id;


		if(rep!=""){
				
			xhr2.open("POST", "comportement/php/enregistrer-sondage.html", true);
			xhr2.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); 	
			xhr2.send(data);
		}
	}

}
