<!--
function ValidateForm (FormName) {
	
// check to see if the first name is blank
	if (FormName.name.value == "")
	{
		alert("Error - You must enter a first name.");
		FormName.FirstName.focus();
		return (false);
	}

// check if email field is blank
	if (FormName.email.value == "")
	{
		alert("Error you must enter a valid email address.");
		FormName.email.focus();
		return (false);
	}

// Check email address contains @ and .
	var chkemail = "@.";
	var chkStr = FormName.email.value;
	var emailValid = false;
	var emailAt = false;
	var emailPeriod = false;
	for (i = 0;  i < chkStr.length;  i++)
	{
	ch = chkStr.charAt(i);
	for (j = 0;  j < chkemail.length;  j++)
	{
		if (ch == chkemail.charAt(j) && ch == "@")
		emailAt = true;
		if (ch == chkemail.charAt(j) && ch == ".")
		emailPeriod = true;
		  if (emailAt && emailPeriod)
			break;
		  if (j == chkemail.length)
			break;
		}
		// Found @ and . in the email address
		if (emailAt && emailPeriod)
		{
				emailValid = true
				break;
			}
	}
	if (!emailValid)
	{
		alert("Error - The email address must contain a @ and a .");
		FormName.email.focus();
		return (false);
	}
// check to see if the contact telephone is blank
	if (FormName.phone.value == "")
	{
		alert("Error - You must enter a contact telephone number.");
		FormName.Telephone.focus();
		return (false);
	}
	
// check to see thatthe spam filter has been entered
	if (FormName.SpamFilter.value == "")
	{
		alert("Error - Please enter the spam filter ");
		FormName.SpamFilter.focus();
		return (false);
	}
// check to see that the spam filter is correct
	if (FormName.SpamFilter.value != "20")
	{
		alert("Error - Incorect answer for the spam filter How many sides does a square have?");
		FormName.SpamFilter.focus();
		return (false);
	} 
	return (true);
}
//-->