﻿function SoloNumeros(evt) {
    var nav4 = window.Event ? true : false;
    var key = nav4 ? evt.which : evt.keyCode;
    return (key <= 13 || (key >= 48 && key <= 57) || key == 44);
}


function Focus() {
    
    
    var txtNomina = document.getElementById("txtNomina");
    var txtTarjeta = document.getElementById("txtTarjeta");

    if (txtNomina.value.length == 0) {
        txtNomina.focus();
        return;
    }
    else if (txtTarjeta.value.length == 0) {
        txtTarjeta.focus();
        return;
    }   
}
 
    
    
    function ValidaForma() {
	
    //var	correo = document.getElementById("txtEmail");
	var nomina = document.getElementById("txtNomina");
	var tarjeta = document.getElementById("txtTarjeta");
		
//		if (correo.value.length == 0) {
//			alert("Favor de ingresar su correo");
//			correo.focus();
//			correo.select();
//			return false;
//		}
//		
//		else if ((correo.value.indexOf ('@', 0) == -1) || (correo.value.indexOf ('.', 0) == -1) || (correo.value.length <= 9)) {
//		    alert("Escriba una direccion de correo valida ");
//			correo.focus();
//			correo.select();
//    		return false;
//		}
		
		if (nomina.value.length == 0) {
			alert("Favor de ingresar su numero de nomina");
			nomina.focus();
			nomina.select();
			return false;
		}
				
		else if (tarjeta.value.length == 0) {
			alert("Favor de ingresar su numero de tarjeta");
			tarjeta.focus();
			tarjeta.select();
			return false;
		}
		
	return true;
}
    
    
    


