/* util/ems/ems.js
 *
 * Unscramble an e-mail address on a page. This should keep the scum bag harvester robots for low life spammers at bay for a little while.
 *
 * Version: 8/29/2008
 * Author: Bill Rich, Wilandra Consulting LLC
 * Copyright (c) 2008 Drink Plonk LLC. All rights reserved.
 */

function unScramble(eMail1, eMail2, linkText, subjectText, statusText)
{
	var a,b,c,d,e;
	a = eMail1;
	c = linkText;
	b = eMail2.substring(0, eMail2.length-5);
	if (subjectText != "")
	{
		d = "?subject=" + escape(subjectText);
	}
	else
	{
		d = "";
	}
	if (statusText != "")
	{
		e = " onMouseOver=\"top.status=\'"+statusText + "\'\;return true\;\" onMouseOut=\"top.status=\'\'\;return true\;\"";
	}
	else
	{
		e = "";
	}
	document.write("<a href=\"mai" + "lto:" + a + "@" + b + d + "\"" + e + ">" + c + "</a>");
}
