//		This script was originally called spamtrap.js and was
//		written by Hamilton Ford on 19/05/2004.
//		This release, spamblock.js, is a simplified and updated
//		version, written by Hamilton Ford on 01/08/2007.
//		It is intended to provide basic SpamBot protection to
//		email addresses diplayed on web pages.
//		Visit: http://www.HamiltonFord.com.

//		In the <head> Element of your HTML document add:
//		<script type="text/javascript" src="spamblock.js"></script>
//		Then save this text as spamblock.js and add it to the
//		same directory as the HTML document.
//		Please include these notes also.

var tld = new Array('net', 'com', 'co.uk', 'info');

function emailLink(name,domain,tldCode,subject,linkText) {
	var emailAddress = (name + '&#064;' + domain + '.' + tld[tldCode]);
	if (subject.length != 0) var linkEmailAddress = (emailAddress + '?subject=' + subject);
	else var linkEmailAddress = emailAddress;
	if (linkText.length != 0) document.write('<a href="mailto:' + linkEmailAddress + '">' + linkText + '<\/a>');
	else document.write('<a href="mailto:' + linkEmailAddress + '">' + emailAddress + '<\/a>');
}

//		In the appropriate body element add:
//		<script type="text/javascript"><!--
//		emailLink('EmailName','EmailDomain','EmailTLDCode','EmailSubject','LinkText');
//		//--></script><noscript>Email address hidden - JavaScript required.</noscript>