// JavaScript Document
function validate() {
	x=document.frmContactUs
	email=x.Email.value
	AtPos = email.indexOf("@");
	StopPos = email.lastIndexOf(".");
	name=x.Name.value
	comments=x.Comments.value
	submitOK="True"
	
	//clear all fields
	document.getElementById("emailError").innerHTML="";
	document.getElementById("nameError").innerHTML="";
	document.getElementById("commentsError").innerHTML="";
	
	if (email.length<1) {
		document.getElementById("emailError").innerHTML="Error: No Information";
		submitOK="False"
	} else if (AtPos == -1 || StopPos == -1 || StopPos - AtPos == 1) {
		document.getElementById("emailError").innerHTML="Error: Invalid Email Address";
		submitOK = "False";
	}
	if (name.length<1) {
		document.getElementById("nameError").innerHTML="Error: No Information";
		submitOK="False"
	}
	if (comments.length<1) {
		document.getElementById("commentsError").innerHTML="Error: No Information";
		submitOK="False"
	}
	if (submitOK=="False") {
		return false
	}
}