/*
  Add this function to an external JavaScript file, include it with your HTML document,
 and put onload="email();" in the body tag. Now write all your contact links like this:
 
   <a href="contact.html" rel="email">.
   
 If the user has JavaScript, they will see a mailto: link. If they don't, they will see
 a link to your contact page. This is XHTML-compliant.

*/

/*
function email()
{
	if (!document.getElementsByTagName) return;
	var anchors = document.getElementsByTagName("a");
	for (var i = 0; i < anchors.length; i++)
	{
		var anchor = anchors[i];
		if (anchor.getAttribute("href") &&
		    anchor.getAttribute("rel") == "email")
		{
			anchor.href = "mail" + "to:" + "%79%6F%75%" + "%40" + "72%65%6D%61%69%6C";
		}
	}
}
*/

function getEmail(strText, strDomain, strUser)
{
	var strEmail = "<a href='mai" + "lto:" + strUser + "@" + strDomain + "'>" + strText + "</a>";
	document.write(strEmail);
}
