// Copyright 2001-2011 Wolfe Works LLC <info@WolfeWorks.net>. May be
// freely used, modified, and redistributed under the same terms as Perl
// so long as this copyright notice remains intact and any modifications
// are clearly noted. Absolutely no warranty of any kind. Author is not
// responsible for any damage or loss caused by use of this program.

// Function to invoke a mailer to simulate a mailto link without
// actually having a mailto link for spammers to harvest. Use in an
// onClick attribute of a link, e.g.:
// <a href="/cgi/nospam.pl?c=<<reCaptcha-encoded email address>>"
// onclick="return nospam(this)" target="captcha"
// title="Click to email">Name of person</a>

// $Id: nospam.js 403 2011-12-13 23:20:46Z dwolfe $

function nospam(link) {
  var key = encodeURIComponent('01qUvnJBRwqGJ_W_60vRPSSg==');
  var tok = encodeURIComponent(link.search.substring(3));
  window.open('http://www.google.com/recaptcha/mailhide/d?k=' + key
  + '&c=' + tok, 'captcha',
  'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=500,height=300');
  return false;
}

