
// This is copyleft GPLv2, Dirk Wetter, spam AT drwetter () org
// rot13-(C) see below


// argument list: [isp, firstname, dispname, tld and maybe subject]
// 
function nospam_bots_ez()
{
	var domain = nospam_bots_ez.arguments[0] + "&#46" + nospam_bots_ez.arguments[3];
	var firstname = nospam_bots_ez.arguments[1];
	var dispname = nospam_bots_ez.arguments[2];
	var subj = "";
	if ( nospam_bots_ez.arguments.length == 5 ) {
		subj = "?subject=" + nospam_bots_ez.arguments[4];
	}
      	document.writeln("<a href=mailto:" + firstname + "&#64" + domain + subj + ">" + dispname + "<\/a>");
}



// same, but with domain, string 1+2 have to be rot13 encoded:
// hint: for HTML use /bin/sh, it's easy: "tr A-Za-z N-ZA-Mn-za-m" ;-)
// argument list: [ firstname13, dispname, domain13, and maybe subject]
// 

function nospam_bots13()
{
	var domain = nospam_bots13.arguments[0].rot13();
	var firstname = nospam_bots13.arguments[2].rot13();
	var dispname = nospam_bots13.arguments[1];
	var subj = "";
	if ( nospam_bots13.arguments.length == 4 ) {
		subj = "?subject=" + nospam_bots13.arguments[3];
	}
      	document.write("<a href=mailto:" + firstname + "&#64" + domain + subj + ">" + dispname + "<\/a>");
}

// idea from http://jsfromhell.com/string/rot13
//
String.prototype.rot13 = function()
{ 
	return this.replace(/[a-zA-Z]/g, function(c) {
		return String.fromCharCode((c <= "Z" ? 90 : 122) >= (c = c.charCodeAt(0) + 13) ? c : c - 26);
	});
};


