<!--
//
// Function to construct the address in a mailto: href from its
// arguments, so that the literal address needn't appear in the
// document and be subject to spam harvesting.  The subject
// argument is optional.
//
// Usage:  <a href="javascript:mail_to('user','domain.ext')">
//         <a href="javascript:mail_to('user','domain.ext','Subject')">
//
function mail_to(user, domain, subject) {
  var prefix = 'mail';
  var str = prefix + 'to:' + '<' + user + '@' + domain + '>';
  if (arguments.length > 2)
  {
    str = str + '?subject=' + subject;
  }
  document.location.href = str;
}
// -->
