
// Envia la petición ajax para realizar un voto.
function votarSecreto(id_secreto, voto){
	
	if(id_secreto == undefined){
		alert('Error: se esperaba un "id de usuario"');
		return;
	}
	
	if(voto == undefined){
		alert('Error: se esperaba una voto!!');
		return;
	}
	
	var div_voto = $('#voto'+id_secreto);
	div_voto.hide().html('Procesado voto, por favor espere...').fadeIn();
	
	$.ajax({
		type: "GET",
		url: "datos.php?op=votar_secreto",
		data: "id_secreto="+id_secreto+"&voto="+voto,
		success: function(msg){
			 div_voto.html(msg);
		}, 
		error: function(xho){
			 div_voto.html('Error:'+xho.responseText);
		}
	});
}