var press = 0;

/* sfHover: copyright Patrick Griffiths and Dan Webb - http://www.htmldog.com/articles/suckerfish/ */
sfHover = function() {
	var sfEls = document.getElementById("menu").getElementsByTagName("LI");
	for (var i=0; i<sfEls.length; i++) {
		sfEls[i].onmouseover=function() {
			this.className+=" sfhover";
		}
		sfEls[i].onmouseout=function() {
			this.className=this.className.replace(new RegExp(" sfhover\\b"), "");
		}
	}
}
if (window.attachEvent) window.attachEvent("onload", sfHover);

/* prevent multiple clicks on submit buttons */
bPress = function() {
	return ++press == 1 ? true : false;
}

/* anti spam protection for emails */
function antispam (message, email1, email2) {

	var subject = '';

	if (antispam.arguments.length > 3) {
		subject = '?subject=' + antispam.arguments[3];
	}

	if (message.length == 0) {
		var message = "Anti-spam. Press OK to continue as normal";
	}

	if (confirm(message)) { 
		location = "mailto:"+email1+"@"+email2+subject; 
	} 

}

