/**********************************************************************************
Anti-Spam Javascript

AUTHOR:  Loren R. Sheets, DiscoverySoft
AUTHOR DATE:  4/1/2004

DIRECTIONS:
Include this in the page's <HEAD>:
<script language="JavaScript" type="text/javascript" src="scripts/antispam.js"></script>

Include this where you want the email link to be generated:
<script language="JavaScript">document.write(mailLink(null,'bsmith','xyz.com'));</script>

PARAMETERS:
mailLink(display, user, domain) where:
* display = The name/text to display in the link.
* user = The email user name.
* domain = The email domain name.

EXAMPLES:
* mailLink('Bob Smith', 'bsmith', 'xyz.com') generates <a href="bsmith@xyz.com">Bob Smith</a>
* mailLink(null, 'bsmith', 'xyz.com') generates <a href="bsmith@xyz.com"></a>
* mailLink('', 'bsmith', 'xyz.com') generates <a href="bsmith@xyz.com">bsmith</a>
* mailLink('Click here to generate an email.', 'bsmith', 'xyz.com') generates <a href="bsmith@xyz.com">Click here to generate an email.</a>
**********************************************************************************/
function mailLink(display, user, domain) {
  var emailAddress = user + '@' + domain;
  if (display==null || display=='')
    display = emailAddress;
  return '<a href="mailto:' + emailAddress + '">' + display + '</a>';
}