/* Function to validate email address entered in Newsletter form field */
function valemail() {
	var valefield = window.event.srcElement;
	var vemtext = valefield.value;
	if (vemtext != "") {    // only if text is present
		var reg1 = /(@.*@)|(\.\.)|(@\.)|(\[)|(\])|( )|(\.@)|(^\.)/;   // not valid
		var reg2 = /^.+\@(\[?)[a-zA-Z0-9\-\.]+\.([a-zA-Z]{2,3}|[0-9]{1,3})(\]?)$/;   // valid
		if (!reg1.test(vemtext) && reg2.test(vemtext)) {    // if syntax is valid
			return true;
		}
		alert("\"" + vemtext + "\" IS A NOT A VALID E-MAIL ADDRESS. This form cannot be sent without a correct email address. Please check with your internet service provider if you are unsure what your email address is.");    // this is also optional
		valefield.focus();
		valefield.select();
		return false;
	}
}

