
//****   Solo Letras ok ******************
function validarLetras(e) { 
    tecla = (document.all) ? e.keyCode : e.which; 
    if ((tecla==8)||(tecla==0)) return true; 
    patron =/[A-Za-z\sñÑ]/;
    te = String.fromCharCode(tecla); 
    return patron.test(te);
} 

//****   Solo Numeros ******************
function validarNumeros(e) { 
    tecla = (document.all) ? e.keyCode : e.which; 
     if ((tecla==8)||(tecla==0)) return true;  
    patron =/[0-9]/; 
    te = String.fromCharCode(tecla); 
    return patron.test(te); 
} 

//****   Solo Numeros ******************
function validarNumerosYEspacio(e) { 
    tecla = (document.all) ? e.keyCode : e.which; 
     if ((tecla==8)||(tecla==0)) return true;  
    patron =/[0-9\s]/; 
    te = String.fromCharCode(tecla); 
    return patron.test(te); 
} 

function validarLetrasYNumeros(e) {
    tecla = (document.all) ? e.keyCode : e.which; 
    if ((tecla==8)||(tecla==0)) return true; 
    patron =/[A-Za-z0-9\sñÑ]/;
    te = String.fromCharCode(tecla); 
    return patron.test(te); 
	} 
	
function validarSinCaracteresEspeciales(e) {
    tecla = (document.all) ? e.keyCode : e.which; 
    if ((tecla==8)||(tecla==0)) return true; 
    patron =/[-'"]/;
    te = String.fromCharCode(tecla); 
    return !patron.test(te); 
	} 
/*
function validarEmail(valor) {
if (/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3,4})+$/.test(valor)){
alert("La dirección de email " + valor + " es correcta.");
} else {
alert("La dirección de email es incorrecta.");
}
}*/