// Email obfuscator script 2.1 by Tim Williams, University of Arizona
// Random encryption key feature by Andrew Moulden, Site Engineering Ltd
// This code is freeware provided these four comment lines remain intact
// A wizard to generate this code is at http://www.jottings.com/obfuscator/
//
// Recoded by David Archer

function mailLink(display, coded, cipher)
{
	shift = coded.length;
	address = "";

	for (ind = 0; ind < shift; ind++)
	{
		chr = coded.charAt(ind);
		pos = cipher.indexOf(chr);

		if (pos > -1) chr = cipher.charAt((pos - shift + cipher.length) % cipher.length);

		address += chr;
	}

	document.write("<a href='mailto:" + address + "'>" + display + "</a>");
}
