// send cloaked email
//
// Input:
//    x1 = mailbox name
//    x2 = domain name
//    x3 = optional text (if not displayed, use email address)
//    x4 = optional style (class for a)
//
// Example:
//    To publish an email address for mickey@mouse.com:
//      cloak_mail('mickey','mouse','Mickey Mouse', 'mstyle');
//    
//
// Action:
//    display mailto link with properly formed email address
//

function cloak_mail(x1, x2, x3, x4) {
  if (x3 == null) {
    x3 = x1 + "@" + x2;
  }
  
  if (x4 == null) {
    document.write('<a href="' + 'ma' + 'ilto:' + x1 + '@' + x2 + '">' + x3 + '</a>')
  } else {
    document.write('<a class="' + x4 + '" href="' + 'ma' + 'ilto:' + x1 + '@' + x2 + '">' + x3 + '</a>')
  }
}
