// This work is hereby released into the Public Domain. To view a copy of the public domain dedication, visit http://creativecommons.org/licenses/publicdomain/ or send a letter to Creative Commons, 559 Nathan Abbott Way, Stanford, California 94305, USA.
// origin: 2000-01-08 nospam@geht.net http://tools.geht.net/rot13.html
// modified: 2005-12-10 djh
// Use at own risk.

var __rot13map;

// The problem is that JavaScript 1.0
// does not provide a Char to Numeric value conversion
// Thus we define a map.
// Because there are 64K UniCode characters, this map does not cover all characters.
function __rot13init() {
	var map = [];
	var s = "abcdefghijklmnopqrstuvwxyz";

	for (var i = 0; i < s.length; i++) {
		map[s.charAt(i)] = s.charAt((i + 13) % 26)
	}
	s = s.toUpperCase();
	for (var i = 0; i < s.length; i++) {
		map[s.charAt(i)] = s.charAt((i + 13) % 26)
	}
	return map
}

function rot13(a) {
	if (!__rot13map) {
		__rot13map = __rot13init()
	}
	var s = "";
	for (var i = 0; i < a.length; i++) {
		var b = a.charAt(i);

		s += ( ( ( (b >= 'A') && (b <= 'Z') ) || ( ( b >= 'a' ) && ( b <= 'z') ) ) ? __rot13map[b] : b)
	}
	return s
}

function initPage() 
{
//	document.getElementById("LastMod").innerHTML = 'Last modified on ' + new Date(document.lastModified) + '.';
	document.getElementById("ContactInfo").href = rot13('znvygb') + ':' + rot13('ghare') + '@' + rot13('cvnabgbavk.pbz');
}
