// JavaScript Document
function check (form) {
	
	if (form.email.value == "") {
		alert ("Please enter your email address");
		form.email.focus();
		return false;
	}//end of if
	
	if (!isEmail(form.email.value)) {
		form.email.value="";
    	alert("Please enter an appropiate email address in the form: yourname@yourdomain.com");
    	form.email.focus();
    	return false;
  	}//end of if
	
	return true;
}//end of check()

function isEmail(email) {
  email = email.toLowerCase();

  if (email.indexOf("@")<0) {
    return false;
  }//end of if
  
  if (email.indexOf(".")<0) {
    return false;
  }//end of if  

  return true;
}//end of isEmail()