function enviacorreo(pagina) 
{ 
open(pagina, 'Sizewindow', 'width=400,height=380,toolbar=no,location=no,directories=no,status=no,menubar=no,resizable=no, top=100,left=130'); 
} 

function winpopup_photo(pagina) 
{ 
open(pagina, 'Sizewindow', 'width=380,height=401,toolbar=no,location=no,directories=no,status=no,menubar=no,resizable=no, top=100,left=130'); 
} 

var checkOK = "ABCDEFGHIJKLMNÑOPQRSTUVWXYZÁÉÍÓÚ" + "abcdefghijklmnñopqrstuvwxyzáéíóú ";
var checkNUM = "0123456789-"; 
var allValid = true;

function validaletras(checkStr){
 for (i = 0; i < checkStr.length; i++) {
  ch = checkStr.charAt(i);
  for (j = 0; j < checkOK.length; j++)
  if (ch == checkOK.charAt(j)) break;
  if (j == checkOK.length) {
   allValid = false;
   break;
  }
 }
 return allValid;
}
function validanumeros(checkStr){
 for (i = 0; i < checkStr.length; i++) {
  ch = checkStr.charAt(i);
  for (j = 0; j < checkNUM.length; j++)
  if (ch == checkNUM.charAt(j)) break;
  if (j == checkNUM.length) {
   allValid = false;
   break;
  }
 }
 return allValid;
}
function validarForm() {
if ((document.dato.nombre.value == "") || (document.dato.nombre.value== null)) {
alert("Debes ingresar tu(s) nombres"); document.dato.nombre.focus();
return false;
}
if ((document.dato.ape_pat.value == "") || (document.dato.ape_pat.value== null)) {
alert("Debes ingresar tu apellido Paterno"); document.dato.ape_pat.focus();
return false;
}
if ((document.dato.ape_mat.value == "") || (document.dato.ape_mat.value== null)) {
alert("Debes ingresar tu apellido Materno"); document.dato.ape_mat.focus();
return false;
}

if (document.dato.correo.value.length < 5 || document.dato.correo.value.indexOf('@', 0) == -1) {
alert("Direccion e-mail no valido!");document.dato.correo.focus();
return false;
}
if ((document.dato.dir_lab.value == "") || (document.dato.dir_lab.value== null)) {
alert("Debes ingresar La dirección de su trabajo"); document.dato.dir_lab.focus();
return false;
}
allValid=validanumeros(document.dato.tel_lab.value);
if (!allValid) { alert("Escriba sólo numeros en el campo \"Telefono\".");
document.dato.tel_lab.focus();
allValid = true;
return false;
}
if ((document.dato.tel_lab.value == "") || (document.dato.tel_lab.value== null)) {
alert("Debe ingresar su numero telefónico laboral"); document.dato.tel_lab.focus();
return false;
}

allValid=validanumeros(document.dato.tel_dom.value);
if (!allValid) { alert("Escriba sólo numeros en el campo \"Telefono domicilio\".");
document.dato.tel_dom.focus();
allValid = true;
return false;
}
if ((document.dato.tel_dom.value == "") || (document.dato.tel_dom.value== null)) {
alert("Debe ingresar su numero telefónico de su domicilio"); document.dato.tel_dom.focus();
return false;
}

allValid=validanumeros(document.dato.celular.value);
if (!allValid) { alert("Escriba sólo numeros en el campo \"Celular\".");
document.dato.celular.focus();
allValid = true;
return false;
}
if ((document.dato.celular.value == "") || (document.dato.celular.value== null)) {
alert("Debe ingresar su numero de celular"); document.dato.celular.focus();
return false;
}

if ((document.dato.ciudad.value == "") || (document.dato.ciudad.value== null)) {
alert("Debes introducir la ciudad donde radicas"); document.dato.ciudad.focus();
return false;
}
allValid=validaletras(document.dato.ciudad.value);
if (!allValid) { alert("Escriba sólo letras en el campo \"Ciudad\".");
document.dato.ciudad.focus();
allValid = true;
return false;
}
return true;
}

function validarForm2() {
if ((document.datos.miembro[0].checked == false) && (document.datos.miembro[1].checked == false)) {
alert("Seleccione la opción Miembro ó Particular");  document.datos.miembro[0].focus();
return false;
}
if ((document.datos.institucion.value == "") || (document.datos.institucion.value== null)) {
alert("Debes ingresar el nombre en la intitución a la que perteneces"); document.datos.institucion.focus();
return false;
}
if ((document.datos.cargo.value == "") || (document.datos.cargo.value== null)) {
alert("Debes ingresar el cargo en tu institución"); document.datos.cargo.focus();
return false;
}
return true;
}

function validarForm3() {
if ((document.datos.miembro[0].checked == false) && (document.datos.miembro[1].checked == false)) {
alert("Seleccione la opción Miembro ó Particular");  document.datos.miembro[0].focus();
return false;
}
return true;
}

function messageclicbutton()
{
var agr=confirm("Los datos que introdujo están correctos ? ");
if (agr)
	return true;
else
	return false;
return true;	
}
function message_clich()
{
var agree=confirm("¿Los datos que indrodujo están correctos ? ");
if (agree)
	return true;
else
	return false;
}


function slctr(texto,valor){
this.texto = texto
this.valor = valor
}
var anuales=new Array()
anuales[0] = new slctr('- - - - - - - - - - Cursos Anuales- -- - - - - - - - ',0)
anuales[1] = new slctr("1.2.A. Gerencia y Administración de Hospitales",21)
anuales[2] = new slctr("1.2.B. Evaluación de Servicios de Salud y Auditoria Medica",22)
anuales[3] = new slctr("1.2.C. Gestión Estratégica de Seguros de Salud",23)
anuales[4] = new slctr("1.2.D. Administración de Servicios de Enfermería",24)
anuales[5] = new slctr("1.3.A. Gestión de la Seguridad Social",25)

var semestrales=new Array()
semestrales[0] = new slctr('- - - - - - - - - Cursos Semestrales- - - - - - - - - - - - - - - - - - -',0)
semestrales[1] = new slctr("1.2.E. Sistema de Administración de Recursos Humanos",26)
semestrales[2] = new slctr("1.2.F. Sistemas de Costos en Asistencia Sanitaria",27)
semestrales[3] = new slctr("1.2.G. La Gestión Social de la Medicina Familiar",28)
semestrales[4] = new slctr("1.2.H. Formulación y Evaluación de Proyectos Sociales",29)
semestrales[5] = new slctr("1.2.I. Control y Fiscalización Administrativo Financiera en la Seguridad Social",30)

var trimestrales=new Array()
trimestrales[0] = new slctr('- - - - - - - - - - - - Cursos Trimestrales - - - - - - - - - - - - -',0)
trimestrales[1] = new slctr("1.2.J. Las Prestaciones y Servicios Sociales en la Gestión de la Seguridad Social",31)
trimestrales[2] = new slctr("1.2.K. Gestión y Administración de Centros Sanitarios",32)
trimestrales[3] = new slctr("1.2.L. Mercadotecnia en la Gestión Sanitaria",33)
trimestrales[4] = new slctr("1.2.M. Economía de la Salud",34)


//*******Nietos*******************



function slctryole(cual,donde){
if(cual.selectedIndex != 0){
   donde.length=0
   cual = eval(cual.value)
   for(m=0;m<cual.length;m++){
      var nuevaOpcion = new Option(cual[m].texto);
      donde.options[m] = nuevaOpcion;
      if(cual[m].valor != null){
         donde.options[m].value = cual[m].valor
         }
      else{
         donde.options[m].value = cual[m].texto
         }
      }
   }
}

