
function sendIt(){
	var confirmed = validateme();
	if(confirmed=="yes"){
		document.form1.submit();
		}
	else{
		alert("Please fill in all of the required fields properly. The field -"+confirmed+"- is not filled in properly");
		}
}

function validateme(){
	// declare variables
	var valid
	var myname 		= document.form1.name.value;
	var myemail 	= document.form1.email_address.value;
	var mycomments 	= document.form1.comments.value;
	var count 		= 0;
	var goodemail	= 0;
	
	// Confirm that the fields are filled in
	if(count!=-1){
	  if(myname && count>=0){count=count+1;}else{count=-1;document.form1.name.focus();valid="Name";}
	  }
	if(count!=-1){
 	  if(myemail && count>=0){count = count+1;}else{count=-1;document.form1.email_address.focus();valid="Email Address";}
	  }
	if(count!=-1){
	  if(mycomments && count>=0){count = count+1;}else{count=-1;document.form1.comments.focus();valid="Comments";}
	  }
	
	// Double check that the email is properly entered type
	if(count>0){
	  if(myemail.indexOf("@")>0){goodemail=1;}else{goodemail=0;}
	  if(myemail.indexOf(".")>0){goodemail=1;}else{goodemail=0;}		
	  if(goodemail==0){count=-1;document.form1.email_address.focus();valid="Email Address";}
	  }

	// return if the form is valid
	if(count>0){valid="yes";}
	return valid
}