// check for valid email address
// call by <FORM ... onSubmit="return(validemail(document.forms[0].Email.value))"
function validemail(email) {
	validRegExp = /^[^@]+@[^@]+.[a-z]{2,}$/i;

	if (email.search(validRegExp) == -1) {
		alert("Please enter a valid Email Address");
		return false;
	}
	else {
		document.forms[0].email.value = email;
		if(document.forms[0].ParentsFirstName != null)
			document.forms[0].realname.value = document.forms[0].ParentsFirstName.value + " " + document.forms[0].ParentsLastName.value;

		if(document.forms[0].FullName != null)
			document.forms[0].realname.value = document.forms[0].FullName.value
		return true;
	}
}