function form1_Validator(theForm) { if (theForm.usuario.value == "") { alert("Por favor escriba su nombre."); theForm.usuario.focus(); return (false); } if (theForm.usuario.value.length < 15) { alert("Por favor escriba su nombre correctamente."); theForm.usuario.focus(); return (false); } if (theForm.usuario.value.length > 50) { alert("Su nombre no puede exceder los 50 caracteres."); theForm.usuario.focus(); return (false); } var checkOK = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyzƒŠŒŽšœžŸÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõöøùúûüýþÿ0123456789:.,;' "; var checkStr = theForm.usuario.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 solamente letras en al campo nombre."); theForm.usuario.focus(); return (false); } var actionform, selectIndex, lvalue; lvalue = theForm.mailss.value if (!lvalue) { alert("Por favor escriba su dirección de mail de contacto."); theForm.mailss.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("Escriba correcatmente su email.Ex: sunombre@whatever.com."); theForm.mailss.select(); return false; } if (theForm.message.value == "") { alert("Por favor escriba su consulta."); theForm.message.focus(); return (false); } if (theForm.message.value.length < 6) { alert("Escriba correctamente su consulta."); theForm.message.focus(); return (false); } var checkOK = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyzƒŠŒŽšœžŸÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõöøùúûüýþÿ0123456789 /:,.;"; var checkStr = theForm.message.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 solamene letrs y números en el campo consulta."); theForm.message.focus(); return (false); } return (true); }