// JavaScript Document
        function ingresoValidar(){
            var correo=false;
            var pass=false;
            if(document.forms.loginfrm.password.value.length<5){
                document.getElementById("ingresoValidarPass").innerHTML='<img src="assets/templates/renkami/images/invalid_reg.png" width="37" height="37" alt="Incorrecto"/>';
                document.forms.loginfrm.password.focus();
                pass= false;
            }else{
                document.getElementById("ingresoValidarPass").innerHTML='<img src="assets/templates/renkami/images/valid_form_reg.png" width="37" height="37" alt="Correcto"/>';
                pass= true;
            }   
            if(!validate(document.forms.loginfrm.username.value)){
                document.getElementById("ingresoValidarEmail").innerHTML='<img src="assets/templates/renkami/images/invalid_reg.png" width="37" height="37" alt="Incorrecto"/>';
                document.forms.loginfrm.username.focus();
                correo= false;
            }else{
                document.getElementById("ingresoValidarEmail").innerHTML='<img src="assets/templates/renkami/images/valid_form_reg.png" width="37" height="37" alt="Correcto"/>';
                correo= true;
            }
                
            return ((correo)&&(pass));
        }
        
        function valida(){
            document.forms.websignupfrm.username.value=document.forms.websignupfrm.email.value;
            validarCiudad();
            validarCondiciones();
            validarEmail();
            validarNombre();
            validarPass1();
            validarPass2();
            if(/*2*/(/*1*/((validarCiudad())&&(validarNombre()))/*1*/&&/*1a*/((validarEmail())&&(validarPass1()))/*1a*/)/*2*/&&/*2b*/((validarPass2())&&(validarCondiciones()))/*2b*/){
                return true;    
            }
            return false;
        }
        function validate(email) {
           var reg = /^([A-Za-z0-9_\-\.])+\@([A-Za-z0-9_\-\.])+\.([A-Za-z]{2,4})$/;
           var address = email;
           if(reg.test(address) == false) {
              return false;
           }
           return true;
        }
        function validarNombre(){
            if(document.forms.websignupfrm.fullname.value.length<5){
                document.getElementById("validarNombre").innerHTML='<img src="assets/templates/renkami/images/invalid_reg.png" width="37" height="37" alt="Incorrecto"/>';
                document.forms.websignupfrm.fullname.focus();
                return false;
            }else{
                document.getElementById("validarNombre").innerHTML='<img src="assets/templates/renkami/images/valid_form_reg.png" width="37" height="37" alt="Correcto"/>';
                return true;
            }
        }
        function validarEmail(){
            if(!validate(document.forms.websignupfrm.email.value)){
                document.getElementById("validarEmail").innerHTML='<img src="assets/templates/renkami/images/invalid_reg.png" width="37" height="37" alt="Incorrecto"/>';
                document.forms.websignupfrm.email.focus();
                return false;
            }else{
                document.getElementById("validarEmail").innerHTML='<img src="assets/templates/renkami/images/valid_form_reg.png" width="37" height="37" alt="Correcto"/>';
                return true;
            }
        }
        function validarCiudad(){
            if(document.forms.websignupfrm.ciudad.value=="0"){
                document.getElementById("validarCiudad").innerHTML='<img src="assets/templates/renkami/images/invalid_reg.png" width="37" height="37" alt="Incorrecto"/>';
                document.forms.websignupfrm.ciudad.focus();
                return false;
            }else{
                document.getElementById("validarCiudad").innerHTML='<img src="assets/templates/renkami/images/valid_form_reg.png" width="37" height="37" alt="Correcto"/>';
                return true;
            }
        }
        function validarCondiciones(){
            if(document.forms.websignupfrm.condiciones.value==0){
                document.getElementById("validarCondiciones").innerHTML='<img src="assets/templates/renkami/images/invalid_reg.png" width="37" height="37" alt="Incorrecto"/>';
                document.forms.websignupfrm.condiciones.focus();
                return false;
            }else{
                document.getElementById("validarCondiciones").innerHTML='<img src="assets/templates/renkami/images/valid_form_reg.png" width="37" height="37" alt="Correcto"/>';
                return true;
            }
        }
        function validarPass1(){
            if(document.forms.websignupfrm.password.value.length<5){
                document.getElementById("validarPass1").innerHTML='<img src="assets/templates/renkami/images/invalid_reg.png" width="37" height="37" alt="Incorrecto"/>';
                document.forms.websignupfrm.password.focus();
                return false;
            }else{
                document.getElementById("validarPass1").innerHTML='<img src="assets/templates/renkami/images/valid_form_reg.png" width="37" height="37" alt="Correcto"/>';
                return true;
            }
        }
        function validarPass2(){
            if((document.forms.websignupfrm.password.value!=document.forms.websignupfrm.confirmpassword.value)||(document.forms.websignupfrm.password.value.length<5)){
                document.getElementById("validarPass2").innerHTML='<img src="assets/templates/renkami/images/invalid_reg.png" width="37" height="37" alt="Incorrecto"/>';
                document.forms.websignupfrm.confirmpassword.focus();
                return false;
            }else{
                document.getElementById("validarPass2").innerHTML='<img src="assets/templates/renkami/images/valid_form_reg.png" width="37" height="37" alt="Correcto"/>';
                return true;
            }
        }
