function Form_Validate(theForm, command)
{

  if (command == "join") {
    if (theForm.name.value == "") {
      alert("You must enter in your first and last name (BMW CCA members use name as it appears on your mailing label)");
      theForm.name.focus();
      return;
    }
  
    if (!validPersonsName(theForm.name, 5, 60, true)) {
    	return (false);
    }
  
    if (!theForm.driving.checked && !theForm.social.checked && !theForm.general.checked) {
  	  alert("You must select at least one category");
      theForm.driving.focus();
      return;
    }
  }
  
  if (!validEmailAddress(theForm.email)) {
  	return;
  }  
  
  if (command=="verify") {
    if (theForm.verify.value == "") {
  	  theForm.verify.focus();
  	  alert("You must enter in the verification code to complete process");
  	  return;
  	}
  } else {
    if (!validSecurityCode(theForm)) {
      theForm.antispam.focus();
  	  return;
    }  
  }
  
  theForm.operation.value = command;
  theForm.submit();	
}
