// JavaScript Document
/*Harvest the form with the id myForm and
add an event handler to check the information
when the form gets submitted*/
document.getElementById("formpage").onsubmit= function checkmail() {
		var check_name=document.getElementById("realname").value;
		var IsThereAnAt=document.getElementById("email").value.indexOf("@");
		var IsThereAPeriod=document.getElementById("email").value.indexOf(".");

			if(check_name=="") {
				alert("You have left the Name Field Blank");
			return false;
			}
			
			if (IsThereAnAt<0 || IsThereAPeriod<0) {
				alert("Please fill in a valid email");
			return false;
			}
	}		