function initPage(){
	var ul = document.getElementById("header");
	var lis = ul.getElementsByTagName("li");
	for (var j=0; j<lis.length; j++) {
		lis[j].onmouseover = function(){
			this.className += " hover";
			}
		lis[j].onmouseout = function(){
			this.className = this.className.replace(new RegExp("hover"),"");
			}
		}
}

function initAll(){
	var _drop = document.getElementById("footer");
	var _tempdropper = _drop.getElementsByTagName("a");
	for (var j=0; j<_tempdropper.length; j++){
		if(_tempdropper[j].className=="dropped"){
			_tempdropper[j].onmouseover = function(){
				this.parentNode.parentNode.className += " hover";
			}
		}
	}
	var _temp2dropper = _drop.getElementsByTagName("div");
	for (var j=0; j<_temp2dropper.length; j++){
		if(_temp2dropper[j].className=="drop"){
			_temp2dropper[j].onmouseover = function(){
				this.parentNode.className += " hover";
			}
			_temp2dropper[j].parentNode.onmouseout = function(){
				while(this.className.indexOf("hover") != -1){
					this.className = this.className.replace("hover","");
				}
			}
		}
	}
}

if (window.attachEvent && !window.opera)
attachEvent("onload", initPage);

if (window.addEventListener)
	window.addEventListener("load", initAll, false);
else if (window.attachEvent)
	window.attachEvent("onload", initAll);
