var HexChar = ['0','1','2','3','4','5','6','7','8','9','a','b','c','d','e','f'];

function LoadContact() {
	InsertContactLink();	
}

function GetEncodedDec(aDec) {
	return String.fromCharCode(29+3*3,9*3+8)+aDec;
}

function GetEncodedHex(aDec) {
	return '%' + HexChar[Math.floor(aDec / 16)] + HexChar[aDec % 16];
}

function GetDecContact() {
	var TempText = [''];
	TempText[1] = '&#109'+'a'+GetEncodedDec(105);
	TempText[2] = '&#124'+GetEncodedDec((17-1)*4)+'j'+'&#115&#112';
	TempText[3] = '&#114&#106'+'n'+'&#115&#110'+GetEncodedDec(44+2)+'c';
	TempText[4] = '&#111'+'m'; // If the last character is encoded it will not show in the Safari browser.
	for (var i in TempText) TempText[0] += TempText[i];
 	return TempText[0];
}

function GetHexContact() {
	var TempText = [''];
	TempText[1] = '%6d'+'a'+GetEncodedHex(105);
	TempText[2] = '%6c'+GetEncodedHex((24*3)-8)+'j'+'%73%70';
	TempText[3] = '%72%6a'+'n'+'%73%6e'+GetEncodedHex(23*2)+'c';
	TempText[4] = '%6f%6d';
	for (var i in TempText) TempText[0] += TempText[i];
 	return TempText[0];
}

function GetContactLink(aContact) {
	var TempText = [''];
	TempText[1] = String.fromCharCode(109)+HexChar[10]+'i';
	TempText[2] = 'l'+String.fromCharCode(110+6)+'o'+String.fromCharCode(52+6);
	TempText[3] = aContact;
	for (var i in TempText) TempText[0] += TempText[i];
 	return TempText[0];
}

function InsertContactLink() {
	var Elem = document.getElementById('contact');
	var Contact = GetDecContact();
	Elem.innerHTML = Contact;
}

function OnClickContact() {
	parent.location = GetContactLink(GetHexContact());
}