//<!--
// This function will validate a form
function validateForm(theform)
{
  pass = 1; //assume everything is ok
  msg = "The following problems where found in trying to submit this form:\n\n";

  //make sure required fields are not empty
  //validate the email address
  if (!(isEmail(theform.EmailAddress.value)))
  {
    msg = msg + "- Please enter a valid email address\n";
    pass = 0;
  }


  if (pass == 1)
  {
    return true;
  }
  else
  {
    alert(msg);
    return false;
  }
}

// validators ------------------------------------------------------------------
	
function isEmail(string) {
    if (string.search(/^\w+((-\w+)|(\.\w+))*\@[A-Za-z0-9]+((\.|-)[A-Za-z0-9]+)*\.[A-Za-z0-9]+$/)
!= -1)
        return true;
    else
        return false;
}

//-->