
function replEmails() {
	if (document.getElementById && document.getElementsByTagName) {
		var c = document.getElementById('content');
		if (c) {
			var emaillinks = c.getElementsByTagName('a');
			for (var i=0; i < emaillinks.length; i++) {
				if (emaillinks[i].className == 'eRepl') {
					var str = emaillinks[i].innerHTML;
					str = str.replace(" (at) ","@");
					str = str.replace(" (dot) ",".");
					emaillinks[i].setAttribute('href', 'mailto:' + str);
					emaillinks[i].innerHTML = str;
				}
			}
		}
	}
}

function replPopups() {
	if (document.getElementById && document.getElementsByTagName) {
		var p = document.getElementById('bklinks');
		if (p) {
			var popuplinks = p.getElementsByTagName('a');
			for (var i=0; i < popuplinks.length; i++) {
				popuplinks[i].onclick = function() {
					popup = window.open(this.getAttribute('href'), 'popup');
					popup.focus();
					return false;
				}
			}
		}
	}
}

window.onload = function() {
	replEmails();
	replPopups();
}
