//
// VALIDAR FORMULARIO IDENTIFICACION DIPLOMA
//

//
// FORMULARIO Validar_bloque_1 - CARRERAS ESPAÑA
//

function Validar_form1(in_form)
{

//
//    NUMERO DE DORSAL: fr_dorsal
//


w_texto = in_form.fr_dorsal.value


expreg= /(^[0123456789]*$)/

if (w_texto.length > 0 && !expreg.test(w_texto))
        {
         alert("campo NÚMERO DE DORSAL tiene caracteres no numéricos");
         in_form.fr_dorsal.focus();
         return (false);
        }

if (w_texto.length == 0 )
        {
         alert("campo NÚMERO DE DORSAL debe tener contenido");
         in_form.fr_dorsal.focus();
         return (false);
        }

w_texto=w_texto*1

if ( ( w_texto < in_form.fr_dorsal_min.value ) || ( w_texto > in_form.fr_dorsal_max.value ) )
        {

        alert("NÚMERO DE DORSAL fuera de rango");
        in_form.fr_dorsal.focus();
         return (false);
        }

return (true);

}



function Validar_form2(in_form)
{

//
//    PUESTO EN CARRERA: fr_puesto
//


w_texto = in_form.fr_puesto.value


expreg= /(^[0123456789]*$)/

if (w_texto.length > 0 && !expreg.test(w_texto))
        {
         alert("campo PUESTO EN META tiene caracteres no numéricos");
         in_form.fr_puesto.focus();
         return (false);
        }

if (w_texto.length == 0 )
        {
         alert("campo PUESTO EN META debe tener contenido ");
         in_form.fr_puesto.focus();
         return (false);
        }

w_texto=w_texto*1

if ( (w_texto < 1 ) || (w_texto > in_form.fr_puesto_max.value ) )
        {

        alert("PUESTO EN META fuera de rango");
        in_form.fr_puesto.focus();
         return (false);
        }

return (true);

}



function Validar_form3(in_form)
{

//
//    NOMBRE Y APELLIDOS: fr_nombre fr_apellidos
//


w_texto = in_form.fr_nombre.value


if (w_texto.length < 3 )
        {
         alert("campo NOMBRE: debe informar al menos 3 caracteres");
         in_form.fr_nombre.focus();
         return (false);
        }


expreg= /(^[ABCDEFGHIJKLMNÑOPQRSTUVWXYZÇçabcdefghijklmnñopqrstuvwxyzáéíóúöü ]*$)/

if (w_texto.length < 3 || !expreg.test(w_texto))
        {
         alert("campo NOMBRE tiene caracteres no permitidos");
         in_form.fr_nombre.focus();
         return (false);
        }

w_texto = in_form.fr_apellidos.value

if (w_texto.length < 3 )
        {
         alert("campo APELLIDOS: debe informar al menos 3 caracteres");
         in_form.fr_apellidos.focus();
         return (false);
        }

expreg= /(^[ABCDEFGHIJKLMNÑOPQRSTUVWXYZÇçabcdefghijklmnñopqrstuvwxyzáéíóúöü ]*$)/

if (w_texto.length < 3 || !expreg.test(w_texto))
        {
         alert("campo APELLIDOS tiene caracteres no permitidos");
         in_form.fr_apellidos.focus();
         return (false);
        }



return (true);

}



