// JavaScript Document
//  function ff() llama a pagina en combo 

function ff(menu)
{
location.href=menu.options[menu.selectedIndex].value;
}

function comprobar()
{
 error="";
  if(forma.elements[0].value=="") {error="Falta tu nombre";ind=0}
  if(forma.elements[1].value==""||forma.elements[1].value.indexOf("@")==-1 ||forma.elements[1].value.indexOf(".")==-1) {error="correo no valido"; ind=1}
  if(forma.elements[2].value=="") {error="Falta el comentario";ind=2}
  if(error!="") {
    msj="cuidado! "+error;
    alert(msj);
    forma.elements[ind].value="";
    forma.elements[ind].focus();
    return false;	}
  else {
            
        return true;
		forma.submit();}     
 }

function comprueba2()
{
error="";
  if(forma3.elements[0].options[forma3.elements[0].selectedIndex].value == "") {error="Selecciona tu categoría";ind=0}
  if(forma3.elements[1].value=="") {error="Falta tu Nombre";ind=1}
  if(forma3.elements[2].value=="") {error="Falta tu Apellido Paterno";ind=2}
  if(forma3.elements[3].value=="") {error="Falta tu Apellido Materno";ind=3}
  if(forma3.elements[4].options[forma3.elements[4].selectedIndex].value == "") {error="Selecciona un documento";ind=4}
  if(forma3.elements[5].value=="") {error="Falta el Número de Identidad";ind=5}
  if(forma3.elements[7].options[forma3.elements[7].selectedIndex].value == "") {error="Selecciona una especialidad";ind=7}
  if(forma3.elements[8].value=="") {error="Ingresa tu Año de Egreso";ind=8}
  if(forma3.elements[9].value==""||forma3.elements[9].value.indexOf("@")==-1 ||forma3.elements[9].value.indexOf(".")==-1) {error="Correo no válido"; ind=9}
  if(error!="") {
    msj="Cuidado! "+error;
    alert(msj);
    forma3.elements[ind].value="";
    forma3.elements[ind].focus();
    return false;	}
  else {
  		document.forma3.submit();}     
 }
 
 function comprueba3()
{
error="";
  if(forma4.elements[0].value=="") {error="Ingresa tu Año de Egreso";ind=0}
  if(forma4.elements[1].options[forma4.elements[1].selectedIndex].value == "") {error="Selecciona una especialidad";ind=1}
  if(forma4.elements[2].value=="") {error="Falta tu Nombre";ind=2}
  if(forma4.elements[3].value=="") {error="Falta tu Apellido Paterno";ind=3}
  if(forma4.elements[4].value=="") {error="Falta tu Apellido Materno";ind=4}
  if(forma4.elements[5].options[forma4.elements[5].selectedIndex].value == "") {error="Selecciona un documento";ind=5}
  if(forma4.elements[6].value=="") {error="Falta el Número de Identidad";ind=6}
  if(forma4.elements[7].value==""||forma4.elements[7].value.indexOf("@")==-1 ||forma4.elements[7].value.indexOf(".")==-1) {error="Correo no válido"; ind=7}
  if(error!="") {
    msj="Cuidado! "+error;
    alert(msj);
    forma4.elements[ind].value="";
    forma4.elements[ind].focus();
    return false;	}
  else {
  		document.forma4.submit();}     
 }
 
 function checkSubmit() 
{
	document.getElementById("btsubmit").value = "Enviando...";
	document.getElementById("btsubmit").disabled = true;
	return true;
	forma3.submit(); // coloca el nombre del formulario!!
}
