function majSondage(fichier,methode,param){
	var xhr_object = null;
;
	if(window.XMLHttpRequest) // Firefox
		{
		xhr_object = new XMLHttpRequest();
		}
	else if(window.ActiveXObject) // Internet Explorer
		{
		xhr_object = new ActiveXObject("Microsoft.XMLHTTP");
		}
	else 
		{ 
		// XMLHttpRequest non supporté 
		alert("Utiliser firefox ou internet explorer.");
		return;
		}

	xhr_object.open(methode, fichier, true);
	xhr_object.onreadystatechange = function anonymous(){
		
		  if(xhr_object.readyState == 4)
			{
			
			//eval(xhr_object.responseText);
		
			document.getElementById('asvelSond').innerHTML = xhr_object.responseText;

			//alert(xhr_object.responseText);
			}
		}

	xhr_object.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
	xhr_object.send(param);
}

function valideSondage(thisForm){
	sondage = thisForm.idSondage.value;
	nbReponse = thisForm.reponse.length;
	reponse = -1;
	
	for(i=0;i<nbReponse;i++)
		{
		if(thisForm.reponse[i].checked)
			{
			reponse = thisForm.reponse[i].value;
			}
		}

	if(reponse==-1)
		{
		alert('Veuillez sélectionner une réponse');
		return false;
		}
	else
		{
		param='sondage='+sondage+'&reponse='+reponse;
		//alert(param);
		majSondage("asvel_sondage.asp?valid=true","POST",param);
		return false;
		}
}
