<!-- script start
// Ensure that mandatory fields of
// form have been completed
function ValidateComplete(theForm)
{

if (theForm.firstname.value == "")
{
alert("Please fill in your first name.");
theForm.firstname.focus();
return (false);
}

if (theForm.lastname.value == "")
{
alert("Please fill in your last name.");
theForm.lastname.focus();
return (false);
}

if ( (theForm.emailaddress.value == "")
	&& (theForm.phonenumber.value == "") )
{
alert("Please provide an email address or phone number.");
theForm.emailaddress.focus();
return (false);
}

// test if valid email address, must have @ and .
var checkEmail = "@.";
var checkStr = theForm.emailaddress.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)
	  && (theForm.phonenumber.value == "")
	  && (theForm.emailaddress.value != "") )
{
alert("The email address you entered appears invalid.");
theForm.emailaddress.focus();
return (false);
}

if ( ( theForm.category[0].checked == false )
    && ( theForm.category[1].checked == false )
	&& ( theForm.category[2].checked == false ) )
    {
        alert ( "Please complete your appropriate category." );
		theForm.category[0].focus();
        return (false);
    }


}
// script end -->