function validate_form() {
  validity = true; // assume valid
  if (!check_email(document.form.Email.value))
        { validity = false; alert('The e-mail address you have entered is invalid.'); return validity; }
  if (!check_empty(document.form.Name.value))
        { validity = false; alert('The name you have entered is invalid.'); return validity; }
  if (!check_empty(document.form.Company.value))
        { validity = false; alert('The company name you have entered is invalid.'); return validity; }
  if (!check_empty(document.form.Category.value))
        { validity = false; alert('The category you have entered is invalid.'); return validity; }
  if (!check_empty(document.form.OS.value))
        { validity = false; alert('The operating system you have entered is invalid.'); return validity; }
return validity;
}

function check_empty(text) 
{
  if (text == "")
      return false;
  return true;
}

function check_email(address) {
  if ((address == "")
    || (address.indexOf ('@') <= 0)
    || (address.indexOf ('.') == -1))
      return false;
  return true;
}

