// Here is a cut and paste Javascript "solution" to the problem of
// spambots.
//
// First of all, you'll want to choose a cleverclass and a clevertag.
// 'span' and 'email' are fine, but you may get better results if you
// customise them. Perhaps use 'b' or 'i' or 'u' for the clevertag, and
// 'foobar' or 'warthog' or 'pumpernickel' for the cleverclass.
// clevertag should be a real HTML tag name.

var clevertag = 'span';
var cleverclass = 'email';

// Now, when you mention an e-mail address in the body of your document
// instead of writing (using square brackets instead of angled because
// angled brackets can cause problems in scripts!):
//
//     [a href="mailto:foo@bar.com"]foo@bar.com[/a]
//
// write this:
//
//     [span class="email"]foo at bar.com[/span]
//
// or:
//
//     [i class="warthog"]foo at bar.com[/i] 
//
// or whatever you changed clevertag and cleverclass to.
//
// That's it.
//
// This script is copyright (c) Toby Inkster 2004.
// May be used under the GNU GPL.
// http://www.gnu.org/licenses/gpl.txt

function linkify (e) {
	var regexp = new RegExp(" *at *","g");
	var address = e.innerHTML.replace(regexp,"@");
	e.innerHTML = "<a href=\"mailto:" + address + "\">" + address + "</a>";
}
function texasranger () {
	var spans = document.getElementsByTagName(clevertag);
	for (var i=0; spans.length>i; i++) {
		if (spans[i].className == cleverclass)
			linkify(spans[i]);
	}
}
window.onload = texasranger;