var rot13map;

function realnameChange()
{
	with (document.forms[0])
	{
		realname.value = Nome.value + " " + Cognome.value;
	}
	return true;
}

// 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 = new Array();
	var s   = "abcdefghijklmnopqrstuvwxyz";

	for (i=0; i < s.length; i++)
		map[s.charAt(i)]				= s.charAt((i + 13) % 26);
	for (i=0; i < s.length; i++)
		map[s.charAt(i).toUpperCase()]	= s.charAt((i + 13) % 26).toUpperCase();
	return map;
}

function rot13(a)
{
	if (!rot13map)
		rot13map = rot13init();
	s = "";
	for (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 getmail()
{
	return rot13('vasb@obybtanyvathn.pbz');
}

function do_it(txt)
{
	if (txt == "")
		document.write('<a href="mailto:' + getmail() + '">' + 'bolognalingua' + '@' + 'bolognalingua.com' + '</a>');
	else
		document.write('<a href="mailto:' + getmail() + '">' + txt + '</a>');
}

function getmail_jp()
{
	return rot13('zegobybtan@ubgznvy.pbz');
}

function do_it_jp(txt)
{
	if (txt == "")
		document.write('<a href="mailto:' + getmail_jp() + '">' + 'mrtbologna' + '@' + 'hotmail.com' + '</a>');
	else
		document.write('<a href="mailto:' + getmail_jp() + '">' + txt + '</a>');
}

//function do_it_jp(txt)
//{
//	document.write('<a href="mailto:' + getmail_jp() + '">' + txt + '</a>');
//}

