function emailCheck (emailStr) {
	/* Verificar si el email tiene el formato user@dominio. */
	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 (matchArray==null) {
		//alert("Email address seems incorrect (check @ and .'s)")
		correo=false
	}else{
		correo=true
	}
	return correo
}

function SubmitTheForm(){
submitted = false;
	if (document.myform.email.value!=""){
		//alert(emailCheck(document.myform.email.value));
		if (emailCheck(document.myform.email.value)==false) {
		alert("Debe ingresar un E-mail válido.");
		return false;
		}else{
		submitted = true;
		}
		
		if(submitted == true){ 
		document.myform.submit();
		//document.myform.mybutton.disabled = true;
		}
	}
}	
