function checkEmailAddress(theForm) {

	if (theForm.email.value != theForm.emailx.value) {
		alert('Both e-mail address entries must match.');
		return false;
	}

	var goodemail = theForm.email.value.match(/\b(^(\S+@).+((\.com)|(\.net)|(\.edu)|(\.mil)|(\.gov)|(\.org)|(\..{2,2}))$)\b/gi);
	
	if (goodemail){
		return true;
	} 
	else {
		alert('Please enter a valid e-mail address.');
		return false;
	}
}