function validate_letras(field) {
var valid = "áéíóúabcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMÑOPQRSTUVWXYZ"
var ok = "yes";
var temp;
for (var i=0; i<field.value.length; i++) {
temp = "" + field.value.substring(i, i+1);
if (valid.indexOf(temp) == "-1") ok = "no";
}
if (ok == "no") {
alert("Por favor ingrese solo letras...");
field.focus();
field.select();
field.value="";
   }
}
function validate_nros(field) {
var valid = ".0123456789"
var ok = "yes";
var temp;
for (var i=0; i<field.value.length; i++) {
temp = "" + field.value.substring(i, i+1);
if (valid.indexOf(temp) == "-1") ok = "no";
}
if (ok == "no") {
alert("Por favor ingrese solo numeros");
field.focus();
field.select();
field.value="";
   }
}

function valida_nivel_ingreso() {
 if (document.form_NIVEL.nombre_nivel.value == "") {
        alert('Ingrese por favor el nombre del Nivel.');
        document.form_NIVEL.nombre_nivel.focus();
        return false;
    }  else {
        return true;
     }
}


function valida_alumno_curso() {
 if (document.frm_curso.rut_aux.value == "") {
        alert('Ingrese por favor el rut.');
        document.frm_curso.rut_aux.focus();
        return false;
    }   else if (document.frm_curso.nombres.value == "") {
        alert('Ingrese por favor los nombres.');
       document.frm_curso.nombres.focus();
        return false;
    }  else if (document.frm_curso.ap_paterno.value == "") {
        alert('Por favor ingrese el apellido paterno');
       document.frm_curso.ap_paterno.focus();
        return false;
    }  else if (document.frm_curso.forma_pago.value == "0") {
        alert('Por favor seleccione la forma de pago');
        document.frm_curso.forma_pago.focus();
        return false;
    }  else if (document.frm_curso.monto.value == "") {
        alert('Por favor ingrese el monto a cancelar, si el alumno esta becado ingrese 0.');
       document.frm_curso.monto.focus();
        return false;
    }  else if (document.frm_curso.sede.value == "") {
        alert('Por favor ingrese la sede.');
       document.frm_curso.sede.focus();
        return false;
     }  else if (document.frm_curso.boleta.value == "") {
        alert('Por favor ingrese el numero de boleta, si el alumno esta becado ingrese 0.');
       document.frm_curso.sede.focus();
        return false;
     }  else if (document.frm_curso.cod_curso.value == "0") {
        alert('Por favor ingrese un curso.');
       document.frm_curso.cod_curso.focus();
        return false;
    }  else {
        return true;
     }
}

function valida_subida() {
 if (document.miformu.nombre.value == "") {
        alert('Ingrese por favor su Nombre.');
        document.miformu.nombre.focus();
        return false;
    }   else if (document.miformu.apellidos.value == "") {
        alert('Ingrese por favor su Apellido.');
       document.miformu.apellidos.focus();
        return false;
    }  else if (document.miformu.mail.value == "") {
        alert('Por favor ingrese el mail');
       document.miformu.mail.focus();
        return false;
    }  else if (document.miformu.telefono.value == "") {
        alert('Por favor ingrese el Telefono');
       document.miformu.telefono.focus();
        return false;
    }   else if (document.miformu.id_origen.value == "0") {
        alert('Por favor ingrese el idioma de origen del documento.');
       document.miformu.id_origen.focus();
        return false;
    } else if (document.miformu.id_destino.value == "0") {
        alert('Por favor ingrese el idioma de destino del documento.');
       document.miformu.id_destino.focus();
        return false;
    } else {
        return true;
     }
}

//  End -->

//-->
