function nuevoAjax(){
	var xmlhttp=false;
	try{
		xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
	}catch(e){
		try {
			xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
		}catch(E){
			xmlhttp = false;
		}
	}	
	if (!xmlhttp && typeof XMLHttpRequest!='undefined') {
		xmlhttp = new XMLHttpRequest();
	}
	return xmlhttp;
}
function enviarVoto(){
       c = document.getElementById('subbuffer2');
   
       //variable=documenet.nombre_del_form.nombre_del_control.value
       encuestaId	=	document.formulario2.encuestaId.value;
       voto			=	document.formulario2.voto.value;
  
       ajax=nuevoAjax();
       c.innerHTML = '<p style="text-align:center;">procesando voto<img src="image/loading.gif" align="absmiddle"/></p>'; 
       ajax.open("POST", "votar.php",true);
       ajax.onreadystatechange=function() {
       if (ajax.readyState==4) {
       c.innerHTML = ajax.responseText
       }
       borrarCampos()
       }
       ajax.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
       ajax.send("encuestaId="+encuestaId+"&voto="+voto)
}
function borrarCampos(){
}