addLIevents = function(ul, num)
{
	var i;
	for (i = 0; i < ul.childNodes.length; i++)
	{
		node = ul.childNodes[i];
		if (node.nodeName == "LI")
		{
			node.onmouseover = function() 
			{
				this.className += "over";
			}
			
			node.onmouseout = function() 
			{
				this.className = this.className.replace(/over/, "");
			}
			
			for (j = 0; j < node.childNodes.length; j++)
			{
				node2 = node.childNodes[j];
				if (node2.nodeName == "UL")
					addLIevents(node2, 2);
			}
		}
	}
}

startList = function() 
{
	if (document.all && document.getElementById) 
	{
		navRoot = document.getElementById("topnav");
		addLIevents(navRoot, 1);
	}
}

window.onload = startList;