/*
Function to obfuscate posted email addresses to confuse Spambots
To use, included this file in the header (<script language="JavaScript" type="text/javascript" src="/redherring.js"></script>)
and insert the following code where you wish the link to be:
  <script language="JavaScript" type="text/javascript">document.write(email_link("username","place.com","linkStyle","linkID"))</script>
  *"linkStyle" and "linkID" are optional CSS attributes. Most links can use the function: email_link("test","place.com")
This code will display the link "mailto:username@place.com"
*/
function email_link(user_name,mail_host,link_class,link_id) {
  var strMailLink = "<a href=\"mailto:" + user_name + "@" + mail_host + "\""
  if (link_class != "") {strMailLink += " class=\"" + link_class + "\""}
  if (link_id != "") {strMailLink += " id=\"" + link_id + "\""}
  strMailLink += ">" + user_name + "@" + mail_host + "</a>"
  return strMailLink
}

