/*
 * Script to protect Mailto links from spam-bots
 * See http://www.htmldog.com/ptg/archives/000063.php
*/

function view_address() {
	if (document.getElementsByTagName) {
		var a = document.getElementsByTagName("a")
		var i
		for (i = 0; i < a.length; i++) {
			if (a[i].className && a[i].className == "e") {
				address = a[i].firstChild;
				s = address.nodeValue.replace(/ /g, "");
				s = s.replace(/\[dot\]/g, ".");
			  s = s.replace("[at]", "@");
				address.nodeValue = s;
				address.parentNode.setAttribute("href", "mailto:" + s);
			}
		}
	}
}

window.onload = function() { view_address(); }
