  function validateOnSubmit() {
    var elem;
    var errs=0;
    // execute all element validations in reverse order, so focus gets
    // set to the first one in error.
    if (!validateEmail(document.forms.registration.email_address, 'inf_email', true)) errs += 1;
    if (!validateAlpha(document.forms.registration.lastname, 'inf_lastname', true)) errs += 1;
    if (!validateAlpha(document.forms.registration.firstname, 'inf_firstname', true)) errs += 1;

    if (errs>0)  alert(f_err_formcheck);

    return (errs==0);
  };
