// Spambot foiler, based on http://www.syronex.com/antispam/
// Converted to separate function by Wes Groleau, GTSC
// 
// 1. Save this file as spamkiller.js at the _top_ level of your website.
// 2. In each page that needs a  mailto:  link, add in the HEAD section:
//    <script type="text/javascript" src="/spamkiller.js"></script>
// 3. For each link, put something like
//    <script type='text/javascript'>
//       <!--
//       nospam("NWKHNAJZ6U54EUBKM5BFZIVM8G3DN",//              "%279-%27%0E/%25%28B%3DBQ6%21%23%27%21P%2C2%28%28%3F%21Ki%5C6%29",
//              "<name or title of person>",
//              "e-mail <name or title of person>",
//              "optional subject line");//       -->
//    </script>
//    <noscript>
//       <a href='/email.shtml' title="e-mail <name or title>"><name or title></a>
//    </noscript>
//    ** No line breaks within quoted strings
//    ** <name or title> must not be an e-mail address
// 4. For each address, get the first two codes from http://www.syronex.com/antispam
// 5. email.shtml (or change the name if you wish) should be a file at the top
//    level of your website explaining why there's no clickable link and/or
//    offering a graphic of the address and/or providing a CGI-based contact form.
//    (If you really want you could cuss them out for not having Javascript,
//    but I don't recommend that.)
// 

function nospam(v2,v9,name,link,subj)
{
  var v7=unescape(v9);
  var v5=v2.length;
  var v1="";
  var SS="";

  if (subj != "")
  {
    SS = '?subject=' + subj;
  }

  for (var v4=0; v4 < v5; v4++)
  {
    v1 += String.fromCharCode(v2.charCodeAt(v4)^v7.charCodeAt(v4));
  }

  document.write('<a href="javascript:void(0)" title="' + link + '" onclick="window.location=\'mail\u0074o\u003a'+v1+SS+'\'">'+name+'</a>');
  
}