initMenu = function() 
{ 
 	// loop through menu
	navRoot = document.getElementById("sections").firstChild;
	for ( i=0; i < navRoot.childNodes.length; i++ ) 
	{
		var node = navRoot.childNodes[i]; 
		// count items in the nested list
		var numChildren = 0; 
		for ( j=0; j<node.childNodes.length; j++ ) 
			if( node.childNodes[j].nodeName == 'UL' ) 
				for ( k=0; k < node.childNodes[j].childNodes.length; k++ ) 
					numChildren++; 
		// only add rollover if more than one item in the list we will be revealing
		if ( numChildren > 1 ) 
		{
			if ( node.nodeName == "LI" ) 
			{
				// show
				node.onmouseover = function() 
				{
					for ( i=0; i<this.childNodes.length; i++ ) 
						{
							if( this.childNodes[i].nodeName == 'UL' ) 
							{
								var popup_list = this.childNodes[i]; // reference for later
								popup_list.style.display = 'block';
								break;
							}
						}
					// fix for IE - selects appear over popup unless an iframe is positioned under the DIV
					if( ( document.all && document.getElementById ) && document.getElementsByName( 'select_concealer' ) )
					{
						// reference iframe
						for ( i=0; i<this.childNodes.length; i++ ) 
						{
							if( this.childNodes[i].nodeName == 'IFRAME' && this.childNodes[i].getAttribute('name') == 'select_concealer' )  
							{
								iframe = this.childNodes[i];
								break;
							}
						}
						// apply settings
						popup_list.style.zIndex = 100;
						iframe.style.width = popup_list.offsetWidth;
						iframe.style.height = popup_list.offsetHeight + 3;
						iframe.style.top = popup_list.style.top;
						iframe.style.left = popup_list.style.left - 1;
						iframe.style.zIndex = popup_list.style.zIndex - 1;
						iframe.style.filter = 'progid:DXImageTransform.Microsoft.Alpha(style=0,opacity=0)';
						iframe.style.display = "block";
					}
				}
				// hide
				node.onmouseout=function() 
				{
					for ( i=0; i<this.childNodes.length; i++ ) 
					{
						if( this.childNodes[i].nodeName == 'UL' ) 
						{
							this.childNodes[i].style.display = 'none';
							break;
						}
					}
					// fix for IE again
					if( ( document.all && document.getElementById ) && document.getElementsByName( 'select_concealer' ) )
					{
						for ( i=0; i<this.childNodes.length; i++ ) 
						{
							if( this.childNodes[i].nodeName == 'IFRAME' && this.childNodes[i].getAttribute('name') == 'select_concealer' )  
							{
								this.childNodes[i].style.display = "none";
								break;
							}
						}
					}
				}
			}
		}
	}
}
addLoadEvent( initMenu );