function SubmitForm() {

// check if company field is blank
if (document.membersignup.company.value == "")
{
alert("The company name is a required field.");
document.membersignup.company.focus();
return (false);
}

// check if home city field is blank
if (document.membersignup.contact.value == "")
{
alert("The contact name is a required field.");
document.membersignup.contact.focus();
return (false);
}

// check if email field is blank
if (document.membersignup.email.value == "")
{
alert("Your email address is required. If you do not have one, there are many free email services such as Yahoo.com and Hotmail.com.");
document.membersignup.email.focus();
return (false);
}

// test if valid email address, must have @ and .
var checkEmail = "@.";
var checkStr = document.membersignup.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 \"email\" field must contain an \"@\" and a \".\" and is required.");
document.membersignup.email.focus();
return (false);
}

// check if password field is blank
if (document.membersignup.password.value == "")
{
alert("Please enter a new password of your choice.");
document.membersignup.password.focus();
return (false);
}

}