//EmailPlusCheck.js

/*
This file checks if email address is in correct format
Add onChange="return checkEmail(this);" call to input
*/
 
//---------------- VARIABLE DECLARATIONS ----------------


   var emailregex = /^[\w\_\-\.]+@[\w\_\-\.]+\.\w+$/;
  
function checkEmail(theField, emptyOK)
{
	
if(!theField.value.match(emailregex))
	{
	alert("The email address  " + theField.value + "  is not in a correct format.\n Please try again");
	theField.focus();
	theField.select();
	return false;
	}


}