// Copyright 2000.
//
// Permission to use this code to make web pages resistant
// to automated harvesting is granted without charge.  If
// you've found this code to be useful, drop me a line.
//
// Use by spammers for tuning their harvesting engines
// to recognize this trick is expressly forbidden :-)

// Stick the following near the top of your web page, eg
// in the header:
	
function spamResistantMailto (domain, user, subject)  {
	var addy;
	var url;
	
	addy = user + "@" + domain;
	if (subject.length > 0) {
		url = addy + "?subject=" + subject;
	} else {
		url = addy;
	}
	
	var code;
	code = '<A HREF="mailto:' + url + '">' + addy + '</A>';
	document.write (code);
	
}

function spamResistantHref (domain, user, ext)  {
	var addy;
	var url;
	
	addy = user + "@" + domain;
	if (ext.length > 0) {
		url = addy + "." + ext;
	} else {
		url = addy;
	}
	
	var code;
	code = '<A HREF="' + url + '">' + addy + '</A>';
	document.write (code);
	
}


// Then later in your page, do the following:
// spamResistantMailto("yourdomain", "user", "subject if desired");

