/*###################################################################
# js_mail2crypt.js, Version 1.5 (Feb 13 2003)
# (c) 2002 by Henning Poerschke (http://webmediaconception.com)
# Released under the GNU General Public License
#
# To be used in conjunction with phpCMS 1.1.8+ and phpMail2Crypt 1.4.1+
#
# This script was inspired by Spam Vaccine by matterform.com and Character Encoder by Mike McGrath.
#
# Note though that js_mailcrypt.js does something quite different than, and in addition to, these.
# The idea of replacing characters in e-mail addresses by their respective ASCII codes is by no means
# new, nor original.
#
# While the SpamVaccine script alledgedly "juggles the pieces around", the ASCII code is still there unmodified.
# Enter phpMail2Crypt -- it actually scrambles the ASCII so it's practically impossible for spambots
# to detect.
#
# The touchy part is the <noscript></noscript>. Here of course, the ASCII cannot be scrambled since
# this would render non-js browsers unable to unscramble and read it, naturally.
#
# This is addressed by using an image for the @ character.
# Thus there is no discernable e-mail address in this part either.
#
# In order to encrypt your e-mail addresses manually you may use Character Encoder by Mike McGrath:
# http://website.lineone.net/~mike_mcgrath/ 
# http://javascript.internet.com/passwords/character-encoder.html
#####################################################################
# 
# COPYRIGHT NOTICE
# This script is copyright (c) 2002 Henning Poerschke
# All Rights Reserved except as provided below.
#
# js_mailcrypt.js may be used and modified free of charge by anyone so long
# as this copyright notice and the comments above remain intact, and any
# significantly modified code is made publically available at evolt.org.
#
# This script is PROVIDED 'AS IS' and comes with NO WARRANTY whatsoever!!
# BY USING THIS CODE YOU AGREE TO INDEMNIFY HENNING POERSCHKE & 
# WebMediaConception FROM ANY LIABILITY THAT MIGHT ARISE FROM ITS USE.
# 
# This script is released under the GPL.
# Selling this code or any derivative work thereof is expressly
# forbidden. A full copy of the GPL can be found in the Code section of
# http://evolt.org.
#
# In all cases copyright notice and this header must remain intact.
# Contact me for information -- No Spam Please ;-)
# 
######################################################################*/

function showmail(nospamplease, idontlikespam, nothanks, no, way) {

	var str_out = ''; 
	var num_out = '';
	var num_in;

	num_out = nospamplease;  
	for(i = 0; i < num_out.length; i += 2) {
		num_in = parseInt(num_out.substr(i,2)) + 23;
		num_in = unescape('%' + num_in.toString(16));
		str_out += num_in;
		str_out = unescape(str_out);
	}
	nospamplease = str_out;
	speakfriendandenter = '&#109;&#97;&#105;&#108;&#116;&#111;:' + nospamplease;

	voila = '<a href="' + speakfriendandenter + '" title="'+ nospamplease + '">';
	
	if((idontlikespam != "") && (nothanks != "")) {
		voila = idontlikespam  + " " + voila;
	}
	else if((idontlikespam != "") && (nothanks == "")) {
		voila += idontlikespam;
	}
	if(nothanks != "") {
		voila += '<img src="' + nothanks + '" width="' + no + '" height="' + way + '" border="0" alt="' + nospamplease + '" />';
	}
	else if((idontlikespam == "") && (nothanks == "")) {
		voila += nospamplease ;
	}
	voila += '</a>';
	document.write(voila);
	nospamplease = "";
	idontlikespam = "";
	nothanks = "";

} // end showmail

