function verCorte(cedula, periodo)
{
 window.open("/cgi-bin/corte/consulta.cgi?cedula="+cedula+"&periodo="+periodo+"", "corte", "width=660,height=480,scrollbars=yes,resizeable=no,location=no");
}

function verIndice(cedula)
{
 window.open("/cgi-bin/indice/indice.cgi?cedula="+cedula+"", "indice", "width=660,height=480,scrollbars=yes,resizeable=no,location=no");
}

function encuesta(pregunta)
{

 var opciones = frmEncuesta.respuesta.length;
 var valida = 0;

 for(i=0;i < opciones;i++)
 {
  if(frmEncuesta.respuesta[i].checked)
  {
   valida = 1
   actualizaEncuesta(pregunta, frmEncuesta.respuesta[i].value);
  }
 }

 if(valida == 0)
 {
  alert("Debe seleccionar almenos una opcion");
 }

}

function actualizaEncuesta(pregunta,respuesta)
{ 
 var xmlHttp = new XHConn();
 var fnWhenDone = function (oXML)
 {
  // alert(oXML.responseText);
  resultadosEncuesta(pregunta);
 }
 xmlHttp.connect("/html/actualizaEncuesta.php", "POST", "p="+pregunta+"&r="+respuesta, fnWhenDone);
} 

function resultadosEncuesta(pregunta)
{
 window.open("/html/resultados.php?id="+pregunta+"","resultados","width=300,height=300,scrollbars=no");
}    
