function decodeEA(ea) {
	var codes=ea.split('o');
	var code;
	var charcode;
	var retval='';
	for(var i=0;i<codes.length;i++) {
		code=codes[i];
		charcode='';
		for(var j=0;j<code.length;j++) {
			charcode+=String(code.charCodeAt(j)-97);
		}
		retval+=String.fromCharCode(Number(charcode));
	}
	return retval;
}

function writeEA(ea,extraargs,linktext) {
	ea=decodeEA(ea);
	document.write('<a href="');
	var mt=String.fromCharCode(109,97,105,108,116,111);
	document.write(mt);
	document.write(':'+ea+'"');
	if(extraargs!=undefined) document.write(' '+extraargs);
	document.write('>');
	if(linktext==undefined) {
		linktext=ea;
		var pos=ea.indexOf('?');
		if(pos==-1) pos=ea.indexOf('&');
		if(pos>-1) linktext=ea.substring(0,pos);
	}
	document.write(linktext);
	document.write('</a>');
}
