// JavaScript Document
function ValidateForm(form){
	//this javascript submits the form with the correct action request
	var OK2Send = true;
	//}
	if (form.name.value == ""){
		alert("You must enter your name.  Please try again.");
		form.name.focus(); 
		return false;
	}
	if (form.company.value == ""){
		alert("You must enter a company name.  Please try again.");
		form.company.focus(); 
		return false;
	}
	if (form.telephone.value == ""){
		alert("You must enter a telephone number so that we can contact you.  Please try again.");
		form.telephone.focus(); 
		return false;
	}
	if (form.email.value == ""){
		alert("You must enter an e-mail address so that we can contact you.  Please try again.");
		form.email.focus(); 
		return false;
	}
	// allow ONLY alphanumeric keys, no symbols or punctuation
	// this can be altered for any "checkOK" string you desire
	var checkOK = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_.@-&+";
	var checkStr = form.email.value;
	var allValid = true;
	for (i = 0;  i < checkStr.length;  i++)
	{
	ch = checkStr.charAt(i);
	for (j = 0;  j < checkOK.length;  j++)
	if (ch == checkOK.charAt(j))
	break;
	if (j == checkOK.length)
	{
	allValid = false;
	break;
	}
	}
	if (!allValid)
		{
		alert("Your e-mail address appears to be invalid. Please try again.");
		return false;
		}
	
	// test if valid email address, must have @ and .
var checkEmail = "@.";
var checkStr = form.email.value;
var EmailValid = false;
var EmailAt = false;
var EmailPeriod = false;
for (i = 0;  i < checkStr.length;  i++)
{
ch = checkStr.charAt(i);
for (j = 0;  j < checkEmail.length;  j++)
{
if (ch == checkEmail.charAt(j) && ch == "@")
EmailAt = true;
if (ch == checkEmail.charAt(j) && ch == ".")
EmailPeriod = true;
  if (EmailAt && EmailPeriod)
break;
  if (j == checkEmail.length)
break;
}
// if both the @ and . were in the string
if (EmailAt && EmailPeriod)
{
EmailValid = true
break;
}
}
if (!EmailValid)
{
alert("The e-mail address you entered does not appear to be valid. Please enter a valid e-mail address to continue.");
return (false);
} 

	if ( OK2Send ) {
		form.submit();
	}
	}