// Email Unmangling
function emangler(InMail, InName, Subject)
{
// ------------------------------------- if no parameter send back a dummy
	if (typeof(InMail) == "undefined") return '';
	var i, s, InString, OutString, Content;
	InString = InMail + ':otliam';
	OutString = new String();
	for(i=InString.length-1; i>= 0; i--) {
		s = InString.charAt(i);
		if ( s == '*' ) s= '@';
		OutString += s;
	}
	Content = new String();
// --------------------------------- if the anchor text is supplied use it
	if (typeof(InName) != "undefined" && InName.length > 0) {
		Content = InName;
	}
// ------------------------------------ otherwise repeat the email address
	else {
		Content = OutString.substring(7);
	}
	OutString+='?Subject=';
	if (typeof(Subject) != "undefined") {
		OutString+= Subject;
	}
	else {
		var href = document.location.href;
		var docname = (document.location.hash)? href.substr(0,(href.length-document.location.hash.length)): href;
		OutString+='URL:' + docname;
	}
	return '<a href="' + OutString + '">' + Content + '</' + 'a>';
}
