startDig = function()
{
	if (document.all && document.getElementById)
	{
		navRoot = document.getElementById("dropdown");
		dig(navRoot);
	}
}

dig = function(toDig)
{
	for (var i = 0; i < toDig.childNodes.length; i++)
	{	// assign functions to each LI
		var node = toDig.childNodes[i];
		if (node.nodeName=="LI")
		{	// node is LI, assign functions
			node.onmouseover=function()
			{
				this.className+=" over";
			}
			node.onmouseout=function()
			{
				this.className=this.className.replace(" over", "");
			}
			
			for (var iC = 0; iC < node.childNodes.length; iC++)
			{	// check for a UL child and dig it
				if (node.childNodes[iC].nodeName == "UL")
				{	// node is UL, dig it
					dig(node.childNodes[iC]);
				}
			}
		}
	}
}

window.onload = startDig;