//Javascript document for Leger.co.uk navigation, 30/05/2008.
//Nav won't work in IE6 without this. Naturally!

startList = function() {
	if (document.all && document.getElementById) {
		navRoot = document.getElementById("nav");
			for (i=0; i<navRoot.childNodes.length; i++) {
  				node = navRoot.childNodes[i];
  					if (node.nodeName=="LI") {
  						node.onmouseover=function() {
  						this.className+=" navroll";
    					}
  						node.onmouseout=function() {
  						this.className=this.className.replace
      					(" navroll", "");
   						}
   					}
  			}
 		}
}

buttonHover = function() {
	var theElements = document.getElementsByTagName("input");
	for (var i=0; i<theElements.length; i++) {
		theElements[i].onmouseover=function(){
			this.className+=" over";
		}
		
		theElements[i].onmouseout=function() {
			this.className=this.className.replace(new RegExp(" over\\b"), "");
		}
	}
}
if (window.attachEvent) window.attachEvent("onload", buttonHover);