function form1_Validator(theForm) { if (theForm.nombre.value == "") { alert("Por favor ingrese su nombre."); theForm.nombre.select(); return (false); } if (theForm.nombre.value.length < 6) { alert("Escriba correctamnte su nombre."); theForm.nombre.select(); return (false); } if (theForm.nombre.value.length > 40) { alert("Escriba como máximo 40 caracteres en el campo nombre."); theForm.nombre.select(); return (false); } var checkOK = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyzƒŠŒŽšœžŸÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõöøùúûüýþÿ0123456789. "; var checkStr = theForm.nombre.value; var allValid = true; for (i = 0; i < checkStr.length; i++) { ch = checkStr.charAt(i); for (j = 0; j < checkOK.length; j++) if (ch == checkOK.charAt(j)) break; if (j == checkOK.length) { allValid = false; break; } } if (!allValid) { alert("Escriba sólo letras y números en su nombre"); theForm.nombre.focus(); return (false); } var actionform, selectIndex, lvalue; lvalue = document.form1.email.value if (!lvalue) { alert("Por favor escriba su dirección de email"); theForm.email.select(); return false; } if(lvalue.charAt(0) > '~') { alert("Please switch your Input Method Editor(IME) to the Half-Width ASCII setting and retype your e-mail address."); return false; } if((lvalue.indexOf('@') == -1) || (lvalue.indexOf('.') == -1)) { alert("Por favor escriba su dirección de email correctamente. Ejemplo: alguien@loquesea.com."); theForm.email.select(); return false; } if(!document.form1.pass.value) { alert("Porfavor escriba su password."); theForm.pass.select(); return false; } if (theForm.pass.value.length < 4) { alert("Escriba por lo menos 4 caracteres en el campo \"Password\"."); theForm.pass.focus(); return (false); } if (theForm.pass.value.length > 30) { alert("Escriba como máximo 30 caracteres en el campo \"password\"."); theForm.pass.focus(); return (false); } var checkOK = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyzƒŠŒŽšœžŸÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõöøùúûüýþÿ0123456789-.!?¿_*()$%/=;:<> "; var checkStr = theForm.pass.value; var allValid = true; for (i = 0; i < checkStr.length; i++) { ch = checkStr.charAt(i); for (j = 0; j < checkOK.length; j++) if (ch == checkOK.charAt(j)) break; if (j == checkOK.length) { allValid = false; break; } } if (!allValid) { alert("Escriba sólo letras y números en el campo \"password\"."); theForm.pass.focus(); return (false); } if (theForm.alias.value == "") { alert("Ingrese su nombre de usuario."); theForm.alias.select(); return (false); } if (theForm.alias.value.length < 4) { alert("Escriba por lo menos 4 caracteres para el nombre de usuario."); theForm.alias.select(); return (false); } if (theForm.alias.value.length > 12) { alert("Escriba como máximo 12 caracteres en el campo nombre de usuario."); theForm.alias.select(); return (false); } var checkOK = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyzƒŠŒŽšœžŸÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõöøùúûüýþÿ0123456789_.-"; var checkStr = theForm.alias.value; var allValid = true; for (i = 0; i < checkStr.length; i++) { ch = checkStr.charAt(i); for (j = 0; j < checkOK.length; j++) if (ch == checkOK.charAt(j)) break; if (j == checkOK.length) { allValid = false; break; } } if (!allValid) { alert("Escriba sólo letras y números en el campo nombre de usuario."); theForm.alias.focus(); return (false); } return (true); }