﻿// JScript File

//Función para enviar mensajes
    function Mensaje(msj) 
    {
            alert(msj);
    }    

//Función que permite ingresar únicamente números
    function FilterOnlyNumeric(e){
        tecla = (document.all) ? e.keyCode : e.which;
        if (tecla==8) return true;
        patron =/[\d\s]/;
        te = String.fromCharCode(tecla);
        return patron.test(te); 
    }

//Función que permite ingresar únicamente números y letras
    function FilterAlfaNumeric(e) {
        tecla = (document.all) ? e.keyCode : e.which;
        if (tecla==8) return true;
        patron =/[\dA-Za-záéíóúñÑ\s]/;
        te = String.fromCharCode(tecla);
        return patron.test(te); 
    }


function url(page) {     
    hidden = open(page,'NewWindow','top=0,left=0,width=800, height=600,status=yes,resizable=0,scrollbars=yes'); 
}    

//Función que cambia el foco del campo actual al campo indicado en el parametro "id"
function enterKey(e,id)
{
    
    var tecla = (document.all) ? e.keyCode : e.which; // 2
    
    if(tecla==13)
    { 
        var teclita = document.getElementById(id); 
        teclita.focus();
        return false
    }
    
    return true;
}