function checkMail(mail){ var er = new RegExp(/^[A-Za-z0-9_\-\.]+@[A-Za-z0-9_\-\.]{2,}\.[A-Za-z0-9]{2,}(\.[A-Za-z0-9])?/); if(typeof(mail) == "string"){ if(er.test(mail)){ return true; } }else if(typeof(mail) == "object"){ if(er.test(mail.value)){ return true; } }else{ return false; } } function estadoList(obj) { if (obj.options[obj.selectedIndex].value == "Brazil") { document.getElementById("divEstado1").style.display = "inline"; document.getElementById("divEstado2").style.display = "none"; document.getElementById("estado2").value = ""; } else { document.getElementById("divEstado1").style.display = "none"; document.getElementById("divEstado2").style.display = "inline"; document.getElementById("estado1").selectedIndex = 0; } } function PulaCampo(de, para) { if(de.value.length == 2) { para.focus(); } } function Maiusculo(campo) { campo.value = campo.value.toUpperCase(); }