//afficher le formulaire de vote
function switchVote(id) {
	document.getElementById("resultats").style.display = "none" ;
	var ajax = new Ajax(true) ;
	ajax.sendAndLoad("/ajax/vote_personnalite.php?id=" + id + "&" + Math.random(),"GET",switchVoteHandler)  ;

}

function switchVoteHandler(conn) {
	if (conn.responseText != "-1") {
		document.getElementById("vote_perso").innerHTML = conn.responseText ;
	}
	else {
		alert("Vous ne pouvez pas voter, car vous n'êtes pas identifié !") ;
		location.href = "/whattodo.php?redirect=" + location.href ;
	}
}

function switchOrderCritere(id) {
	document.getElementById("resultats").style.display = "none" ;
	var ajax = new Ajax(true) ;
	ajax.sendAndLoad("/ajax/vote_personnalite_step2.php?id=" + id + "&" + Math.random(),"GET",switchOrderCritereHandler)  ;
}

function switchOrderCritereHandler(conn) {
	document.getElementById("vote_perso").innerHTML = conn.responseText ;
}

function validationVote(id) {
	var ajax = new Ajax(true) ;
	ajax.sendAndLoad("/ajax/vote_personnalite_step3.php?id=" + id + "&" + Math.random(),"GET",validationVoteHandler)  ;
}

function validationVoteHandler(conn) {
	document.getElementById("vote_perso").innerHTML = conn.responseText ;
}

function goWallpost() {
	document.commsForm.comms.focus();
}


