function checkAll(f) // IN form  OUT bool
{
  var s = '';

  if ( f.Topic.selectedIndex < 1 )
  {
    alert('Please select a topic.');
    f.Topic.focus();
    return false;
  }

  s = f.Name.value;
  if ( s.length < 1 )
  {
    alert('Please enter your name.');
    f.Name.focus();
    return false;
  }
  if ( s.length > 50 || !isText(s) )
  {
    alert('Please enter a valid name.');
    f.Name.focus();
    return false;
  }

  s = f.EMail.value;
  if (s.length < 1)
  {
    alert('Please enter your email address.');
    f.EMail.focus();
    return false;
  }
  if ( !isEMail(s) || s.length > 50 )
  {
    alert('Please enter a valid email address.');
    f.EMail.focus();
    return false;
  }

  s = f.Company.value;
  if ( s.length < 1 )
  {
    alert('Please enter your company\'s name.');
    f.Company.focus();
    return false;
  }
  if ( s.length > 50 || !isText(s) )
  {
    alert('Please enter a valid company name.');
    f.Company.focus();
    return false;
  }

  s = f.Designation.value;
  if ( s.length < 1 )
  {
    alert('Please enter your designation (professional title).');
    f.Designation.focus();
    return false;
  }
  if ( s.length > 50 )
  {
    alert('Please enter a valid designation.');
    f.Designation.focus();
    return false;
  }

  s = f.PhoneCC.value;
  if ( s.length < 1 )
  {
    alert('Please enter a country code.');
    f.PhoneCC.focus();
    return false;
  }
  if ( !isNumber(s) || s.length > 4 )
  {
    alert('Please enter a valid country code (1-4 digits).');
    f.PhoneCC.focus();
    return false;
  }

  s = f.PhoneAC.value;
  if ( !isNumber(s) || s.length > 4 )
  {
    alert('Please enter a valid area code (1-4 digits).');
    f.PhoneAC.focus();
    return false;
  }

  s = f.PhoneNN.value;
  if ( s.length < 1 )
  {
    alert('Please enter a phone number.');
    f.PhoneNN.focus();
    return false;
  }
  if ( !isNumber(s) || s.length < 4 || s.length > 10 )
  {
    alert('Please enter a valid phone number (4-10 digits).');
    f.PhoneNN.focus();
    return false;
  }

  if ( f.Country.selectedIndex < 1 )
  {
    alert('Please select a country.');
    f.Country.focus();
    return false;
  }

  s = f.Message.value;
  if ( s.length < 1 )
  {
    alert('Please enter a message.');
    f.Message.focus();
    return false;
  }
  if ( s.length > 500 )
  {
    var i = s.length - 500;
    alert('Your message is ' + i + ' character' + ( i == 1 ? 's' : '' ) + ' too long.');
    f.Message.focus();
    return false;
  }

  return true;
}
