﻿    //<![CDATA[

    sfHover = function() {
	    var sfEls = document.getElementById("nav").getElementsByTagName("LI");
	    for (var i=0; i<sfEls.length; i++) {
		    sfEls[i].onmouseover=function() {
			    this.className+=" sfhover";
		    }
		    sfEls[i].onmouseout=function() {
			    this.className=this.className.replace(new RegExp(" sfhover\\b"), "");
		    }
	    }
    }
    if (window.attachEvent) window.attachEvent("onload", sfHover);
    //]]>
    function OnRFC(e)
    {
        var tecla;
        if (document.all)
        {
            tecla = e.keyCode;
        }
        else
        {
            tecla = e.which;
        }
        if (tecla != 8 && (tecla < 65 || tecla > 90))
        {
            if(tecla < 97 || tecla > 122)
            {
                if (tecla < 48 || tecla > 57)
                {
                    return false;
                }
                else
                {
                    return true;
                }
            }
            else
            {
                return true;
            }
        }
        else
        {
            return true;
        }
    }
    function email(e)
    {
        var tecla;
        if (document.all)
        {
            tecla = e.keyCode;
        }
        else
        {
            tecla = e.which;
        }
        if (tecla != 46 && (tecla < 48 || tecla > 57)) 
        {//para puros numeros y punto
            if(tecla != 95 && (tecla < 64 ||tecla > 90))
            {//para mayusculas, arroba y guion bajo
                if((tecla != 8) && (tecla != 0) && (tecla < 97 || tecla > 122))
                {//para poder borrar y letras minusculas
                    return false;
                } 
                else
                {
                    return true;
                }
            }
            else
            {
                return true;
            }
                
        } 
        else 
        {
            return true;
        }
    }
    function nombresDeUsuario(e)
    {
        var tecla;
        if (document.all)
        {
            tecla = e.keyCode;
        }
        else
        {
            tecla = e.which;
        }
        if (tecla != 46 && (tecla < 48 || tecla > 57)) 
        {//para puros numeros y punto
            if(tecla != 95 && (tecla < 65 ||tecla > 90))
            {//para mayusculas, arroba y guion bajo
                if((tecla != 8) && (tecla != 0) && (tecla < 97 || tecla > 122))
                {//para poder borrar y letras minusculas
                    return false;
                } 
                else
                {
                    return true;
                }
            }
            else
            {
                return true;
            }
                
        } 
        else 
        {
            return true;
        }
    }
    function soloNumero(e) 
    {//solo numeros sin punto decimal
        var tecla;
        if (document.all) 
        {
            tecla = e.keyCode;
        } 
        else 
        {
            tecla = e.which;
        }
        if (tecla != 8 && tecla != 0 && (tecla < 48 || tecla > 57)) 
        {
            return false;
        } 
        else 
        {
            return true;
        }
    }
