//
// some help functions,  (c) Dirk Wetter dirkw AT dirkw () org
// You can copy/modify and distribute this code under the conditions
// of the GNU GENERAL PUBLIC LICENSE Version 2.
//

// to consider:
// http://www.jracademy.com/~jtucek/email/index.php
// http://scott.yang.id.au/file/js/rot13.js
// http://snippets.dzone.com/user/jonasraoni/tag/rot13


var isp="drwetter";
var str="&#64"+isp+"&#46;&#101;&#117";

function msg(txt) { window.status = txt }
function no_msg() { window.status = '' }

function WriteInput() {
        if (navigator.appName == "Netscape") {
                document.write("<input type=text class=lesen name=news size=45 value=''>")
        }
        else {
                document.write("<input type=text class=lesen name=news size=50 value=''>")
        }
}


<!-- kleine nuetzliche Funktionen von mir(TM) -->

function cr_zeile() {
        document.write("<span class=minimi>&copy; 2003-2011 &middot; <a href=http://drwetter.eu/>");
     	if (lang==1) {
            document.write("Dr. Dirk Wetter</a> ");
	} else {
            document.write("Dr. Dirk Wetter</a> ");
	}
            document.write(" &middot; </span>");
}


function no_spam_robots(firstname) {
     document.writeln("<a href=mailto:" + firstname + str + ">");
     if (lang==1) {
      	img='<img src="/images/email.jpg" width="34" height="28" border="0" alt="E-Mail">'
     	document.writeln(img + "E-Mail<\/a>");
     } else {
        img='<img src="/images/email.jpg" width="34" height="28" border="0" alt="e-mail">'
     	document.writeln(img + "e-mail<\/a>");
     }
}

<!-- dgl. ohne pic und line feed -->

function no_spam_robots2(firstname) {
      document.writeln("<a href=mailto:" + firstname + str + ">" + firstname + str + "<\/a>");
}

function mail2(firstname,subj,text) {
      document.writeln("<a href=mailto:" + firstname + str + "?subject=" + subj +">"+ text + "<\/a>");
}


<!-- Link nur js-browsern preisgeben -->

function cloak_url(link_text) {
        var dir="artikel/";
        var file="enterprise-desktops.pdf";
        document.writeln("<a href=" + dir + file + ">" + link_text + "<\/a>");
}


// 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);
	});
};




// Initialize while page loading
// window.onload=no_spam_robots;

// the END

// $Id: include.js,v 1.13 2011-01-11 14:49:51 dirkw Exp $

