// Nicht ganz das klassische ROT-13
function crypt(text)
{
	var rot13	= new String();
	var codechar;
	var pos;

	for(var i = 0; i < text.length; i++)
	{
		codechar	= text.charAt(i);
		pos			= keycode.indexOf(codechar.toUpperCase());

		if(pos >= 0)
		{
			pos      = (pos + keyhalf) % keylength;
			codechar = (codechar == codechar.toUpperCase()) ?
						keycode.charAt(pos) :
						keycode.charAt(pos).toLowerCase();
		}

		rot13 += codechar;
	}

	return rot13;
}


function rot14(text)
{
	var keycode	= "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
	var textrot	= new String();

	for(var i = 0; i < text.length; i++)
	{
		var codechar = text.substring(i, i + 1);
		var pos = keycode.indexOf(codechar.toUpperCase());

		if(pos >= 0)
		{
			pos = (pos + keycode.length / 2) % keycode.length;
			codechar = (codechar == codechar.toUpperCase()) ? keycode.substring(pos, pos + 1) : keycode.substring(pos, pos + 1).toLowerCase();
		}
		textrot	= textrot + codechar;
	}
	return textrot;
}


function ch1(x){
var yy=2;var z=0;var xx="";
for(var y=0;y<x.length;y++)
        {
        z=x.charCodeAt(y);
        xx+=String.fromCharCode(z-yy);
        }
return xx;
}

function msb(x)
{
location.href=ch1(x);
}




function rot13(input) {
var coding = "ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMabcdefghijklmnopqrstuvwxyzabcdefghijklm";
for (var text = '', i = 0; i < input.length; i++) {
var ch = input.charAt(i), pos = coding.indexOf(ch);
if (pos > -1)
ch = coding.charAt(pos + 13);
text += ch;
}
return text;
}

function unrot13(link) {
if (link.href.indexOf("mailto:") != 0)
link.href = rot13(link.href);
}

function rot13_write(input) {
  document.write(rot13(input));
}

function bla() {
  document.write("bla");
}
