	var browser;
	
	if(document.all){ browser="ie"; }
	if(document.getElementById && !document.all){ browser="moz"; }	
	
	function setEventListeners(){
		var p=document.getElementById("menu");
		var k=p.childNodes;
		
		//loop through k and attach event handlers
		
		for(var i=0; i<k.length; i++){
			if(k[i].className=="swap"){ 
				if(browser=="moz"){
					k[i].addEventListener("mouseover", function() { swapHeader(this.id) }, true);
					k[i].removeEventListener("mouseover", function() { swapHeader(this.id) }, true);
					k[i].addEventListener("mouseout", function() { swapHeaderBack() }, true);
					k[i].removeEventListener("mouseout", function() { swapHeaderBack() }, true);
					}
				if(browser=="ie"){	
					k[i].onmouseover=function() { swapHeader(this.id) };			
					k[i].onmouseout=function() { swapHeaderBack() };
					}			
				}
			}
		}
	
	function swapHeader(t){
		var st=document.getElementById("menuHeader");
		st.src="/siteGraphics/menu/menu_top_" + t + ".gif";
		}
		
	function swapHeaderBack(){
		var st=document.getElementById("menuHeader");
		st.src="/siteGraphics/menu/menu_top_default.gif";
		}
		
	//dynamically attaches the events to the window
	if(window.attachEvent){ window.attachEvent("onload", function() { setEventListeners() } ); }
	if(!window.attachEvent){ window.addEventListener("load", function() { setEventListeners() }, true); }
