window.addOnloadFunction( sectionNavigation );
window.addOnloadFunction( subNavigation );
window.addOnloadFunction( superNavigation );

function sectionNavigation()
{
    var navRoot = document.getElementById("sectionnavigation");    
	for (i=0; i<navRoot.childNodes.length; i++) 
	{
		var node = navRoot.childNodes[i];
		if (node.nodeName == "LI") 
		{
			//IE MOET WEER MOEILIJK DOEN + Check om opera naar de else te krijgen
			if(document.all && navigator.appName == "Microsoft Internet Explorer")
    		{
    		
    			if(node.childNodes[0].childNodes[0].id != "")
                {
	        		if(node.childNodes[0].childNodes[0].id != 'active')
	    			{
	        			node.onmouseover=function() 
	        			{
	        				var imgName = '/uploads/_site_1/menu/'+this.childNodes[0].childNodes[0].id+'_hover.gif';
	        				this.childNodes[0].childNodes[0].src = imgName;
	        			}
	        			
	        			node.onmouseout=function() 
	        			{
	        				var imgName = '/uploads/_site_1/menu/'+this.childNodes[0].childNodes[0].id+'.gif';
	        				this.childNodes[0].childNodes[0].src = imgName;
	        			}
	        		}
	        	}
        	}
            else
            {
             
                if(node.childNodes[1].childNodes[0].id != "")
                {
	                if(node.childNodes[1].childNodes[0].id != 'active')
	    			{
	        			node.onmouseover=function() 
	        			{
	        				var imgName = '/uploads/_site_1/menu/'+this.childNodes[1].childNodes[0].id+'_hover.gif';
	        				this.childNodes[1].childNodes[0].src = imgName;
	        			}
	        			
	        			node.onmouseout=function() 
	        			{
	        				var imgName = '/uploads/_site_1/menu/'+this.childNodes[1].childNodes[0].id+'.gif';
	        				this.childNodes[1].childNodes[0].src = imgName;
	        			}
	        		}
	        	}
            }   
		}
	}		
}

function subNavigation()
{
    var navsubRoot = document.getElementById("subnavigation");    
    
    if(navsubRoot != null)
    {
    
		for (i=0; i<navsubRoot.childNodes.length; i++) 
		{
			var node = navsubRoot.childNodes[i];
			if (node.nodeName == "LI") 
			{
				//IE MOET WEER MOEILIJK DOEN + Check om opera naar de else te krijgen
				if(document.all && navigator.appName == "Microsoft Internet Explorer")
	    		{
	    			
	    			if(node.childNodes[1].childNodes[0].id != 'active_sub')
	    			{
	        			node.onmouseover=function() 
	        			{
	        				var imgName = '/uploads/_site_1/menu/'+this.childNodes[1].childNodes[0].id+'_hover.gif';
	        				this.childNodes[1].childNodes[0].src = imgName;
	        			}
	        			
	        			node.onmouseout=function() 
	        			{
	        				var imgName = '/uploads/_site_1/menu/'+this.childNodes[1].childNodes[0].id+'.gif';
	        				this.childNodes[1].childNodes[0].src = imgName;
	        			}
	        		}
	        	}
	            else
	            {
	                
	                if(node.childNodes[2].childNodes[0].id != 'active_sub')
	    			{
	        			node.onmouseover=function() 
	        			{
	        				var imgName = '/uploads/_site_1/menu/'+this.childNodes[2].childNodes[0].id+'_hover.gif';
	        				this.childNodes[2].childNodes[0].src = imgName;
	        			}
	        			
	        			node.onmouseout=function() 
	        			{
	        				var imgName = '/uploads/_site_1/menu/'+this.childNodes[2].childNodes[0].id+'.gif';
	        				this.childNodes[2].childNodes[0].src = imgName;
	        			}
	        		}
	            }   
			}
		}
	}		
}

function superNavigation()
{
    var navRoot = document.getElementById("supernavigatie");    
	
	for (i=0; i<navRoot.childNodes.length; i++) 
	{
		var node = navRoot.childNodes[i];
		if (node.nodeName == "LI") 
		{
		    node.onmouseover=function() 
			{
				var imgName = '/images/'+this.id+'_highlight.gif';
				this.childNodes[0].childNodes[0].src = imgName;
			}
			
			node.onmouseout=function() 
			{
				var imgName = '/images/'+this.id+'.gif';
				this.childNodes[0].childNodes[0].src = imgName;
			}
        }
	}		
}