// JavaScript Documentfunction email(Texto){		if (!emailCheck(Texto)){		document.IEAN.email.focus();		return false;	}else{		return true;	}}function emailCheck(Texto) {/* Verificar si el email tiene el formato user@dominio. */emailStr=Texto.value;if (emailStr==""){		return false;	}var emailPat=/^(.+)@(.+)$/ /* Verificar la existencia de caracteres. ( ) < > @ , ; : \ " . [ ] */var specialChars="\\(\\)<>@,;:\\\\\\\"\\.\\[\\]" /* Verifica los caracteres que son válidos en una dirección de email */var validChars="\[^\\s" + specialChars + "\]" var quotedUser="(\"[^\"]*\")" /* Verifica si la dirección de email está representada con una dirección IP Válida */ var ipDomainPat=/^\[(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})\]$//* Verificar caracteres inválidos */ var atom=validChars + '+'var word="(" + atom + "|" + quotedUser + ")"var userPat=new RegExp("^" + word + "(\\." + word + ")*$")/*domain, as opposed to ipDomainPat, shown above. */var domainPat=new RegExp("^" + atom + "(\\." + atom +")*$")var matchArray=emailStr.match(emailPat)if ((emailStr.length != 0) && (matchArray==null)) {alert("Por favor revise su correo electrónico parece ser erróneo")Texto.focus();return false}var user=matchArray[1]var domain=matchArray[2]// Si el user "user" es valido if (user.match(userPat)==null) {// Si noalert("Por favor revise su correo electrónico parece ser erróneo")Texto.focus();return false}/* Si la dirección IP es válida */var IPArray=domain.match(ipDomainPat)if (IPArray!=null) {for (var i=1;i<=4;i++) {if (IPArray[i]>255) {alert("Invalid IP of destination")Texto.focus();return false}}return true}var domainArray=domain.match(domainPat)if (domainArray==null) {alert("Por favor revise su correo electrónico parece ser erróneo")Texto.focus();return false}var atomPat=new RegExp(atom,"g")var domArr=domain.match(atomPat)var len=domArr.lengthif (domArr[domArr.length-1].length<2 || domArr[domArr.length-1].length>3) { alert("Por favor revise su correo electrónico parece ser erróneo")Texto.focus();return false}if (len<2) {var errStr="Por favor revise su correo electrónico parece ser erróneo"alert(errStr)Texto.focus();return false}// La dirección de email ingresada es Válidareturn true;}// FIN FUNCION DE EMAIL