1function validateform() { 2 var stakeholder_full_name = document.leadformulario.stakeholder_full_name.value; 3 var x = document.leadformulario.stakeholder_contact_email.value; 4 var atposition = x.indexOf("@"); 5 var dotposition = x.lastIndexOf("."); 6 if (stakeholder_full_name == null || stakeholder_full_name == "") { 7 document.getElementById("nomeloc").innerHTML = "Informe o nome da empresa"; 8 return false; 9 } 10 if (atposition < 1 || dotposition < atposition + 2 || dotposition + 2 >= x.length) { 11 document.getElementById("emailloc").innerHTML = "Informe um e-mail válido"; 12 return false; 13 } 14} 15 16/* Máscaras ER */ 17function mascaraFone(event) { 18 var valor = document.getElementById("telefone").attributes[0].ownerElement['value']; 19 var retorno = valor.replace(/\D/g, ""); 20 retorno = retorno.replace(/^0/, ""); 21 if (retorno.length > 10) { 22 retorno = retorno.replace(/^(\d\d)(\d{5})(\d{4}).*/, "($1) $2-$3"); 23 } else if (retorno.length > 5) { 24 if (retorno.length == 6 && event.code == "Backspace") { 25 return; 26 } 27 retorno = retorno.replace(/^(\d\d)(\d{4})(\d{0,4}).*/, "($1) $2-$3"); 28 } else if (retorno.length > 2) { 29 retorno = retorno.replace(/^(\d\d)(\d{0,5})/, "($1) $2"); 30 } else { 31 if (retorno.length != 0) { 32 retorno = retorno.replace(/^(\d*)/, "($1"); 33 } 34 } 35 document.getElementById("telefone").attributes[0].ownerElement['value'] = retorno; 36}
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.