// JavaScript Document
var openedSubMenu = false;

window.onload = function()
{
	var navRoot = document.getElementById("nav");
	
	for (i = 0; i < navRoot.childNodes.length; i++)
	{
		node = navRoot.childNodes[i];	  
		
	  if(node.nodeName == 'LI')
	  {
  		node.onmouseover = function()
  		{
  		  if(openedSubMenu)
  		  {
  		    openedSubMenu.style.display = 'none';
  		  }
  			for(j = 0; j < this.childNodes.length; j++)
  			{
  			  if(this.childNodes[j].nodeName == 'UL')
  			  {
  			    openedSubMenu = this.childNodes[j];
  			    this.childNodes[j].id = 'geopened';
  			    this.childNodes[j].style.display = 'block';
  			    this.childNodes[j].style.position = 'absolute';
  			    this.childNodes[j].style.zIndex = '1000';
  			    this.childNodes[j].style.padding = '0px';
  			    this.childNodes[j].style.backgroundColor = '#CECECE';
  			    this.childNodes[j].style.top = '0px';
  			    this.childNodes[j].style.left = '162px';
		    
  			    this.childNodes[j].onmouseout = function()
  			    {
  			      this.style.display = 'none';
  			      this.parentNode.className = '';
  			    }
  			    
  			    this.childNodes[j].onmouseover = function()
  			    {
  			      this.parentNode.className = 'select';
  			    }
  			  }
  			}
  		}
  		
  		node.onmouseout = function()
  		{
  		  
  		}
	  }
	}
}