
	function validateForm() {
		d=document.forms.form1;
		if (!d.email.value) {
			alert('You have not entered an email address');
			d.email.focus();
			return false;
			}
		if(-1 == document.forms.form1.email.value.indexOf("@")) { 
		       document.forms.form1.email.focus(); 
		       alert("The email enetered is not a valid email address."); 
		       return false; 
		       }
		    if(-1 == document.forms.form1.email.value.indexOf(".")) { 
		       document.forms.form1.email.focus(); 
		       alert("The email address must have a suffix such as .com, .org or .co.uk."); 
		       return false; 
		       }
		    if(-1 != document.forms.form1.email.value.indexOf(",")) { 
		       document.forms.form1.email.focus(); 
		       alert("The email address must not have a comma in it"); 
		       return false; 
		       }
		    if(-1 != document.forms.form1.email.value.indexOf("#")) { 
		       document.forms.form1.email.focus(); 
		       alert("The email must not have a # in it." ); 
		       return false; 
		       }
		    if(-1 != document.forms.form1.email.value.indexOf("!")) { 
		       document.forms.form1.email.focus(); 
		       alert("The email must not have a ! in it." ); 
		       return false; 
		       }
		    if(-1 != document.forms.form1.email.value.indexOf(" ")) { 
		       document.forms.form1.email.focus(); 
		       alert("The email address must not have a space in it, or at the end of it." ); 
		       return false; 
		       }
		    if(document.forms.form1.email.value.length == (document.forms.form1.email.value.indexOf("@")+1) ) {
		       document.forms.form1.email.focus();
		       alert("The email address entered is not a valid email address.");
		       return false;
		       }
		  return true;
	}


