/* erzeugt auch für den ie den hover-effekt
 * das elment, was "hovern" soll, muss in der css datei als .over belegt werden
 */

startList = function()
{
	if (document.all&&document.getElementById)
	{
		navRoot = document.getElementById("menu");
		for (i=0; i<navRoot.childNodes.length; i++)
		{
			node = navRoot.childNodes[i];
			if (node.nodeName=="DIV")
			{
				/* überfahrene elemente hovern */
				node.onmouseover=function()
				{
					this.className+=" over";
 				}
  				node.onmouseout=function()
				{
  					this.className=this.className.replace(" over", "");
   				}
   				
   				/* subnavi einfügen */
   				for (k=0; k<node.childNodes.length; k++)
				{
					nodeSub = node.childNodes[k];
					if (nodeSub.nodeName=="UL")
					{
						for (l=0; l<nodeSub.childNodes.length; l++)
						{
							nodeSubSub = nodeSub.childNodes[l];
							if (nodeSubSub.nodeName=="LI")
							{
								nodeSubSub.onmouseover=function()
								{
									this.className+=" over_sub";
				 				}
				  				nodeSubSub.onmouseout=function()
								{
				  					this.className=this.className.replace(" over_sub", "");
				   				}
							}
						}
					}
				}
   			}
  		}
  		
  		/*navRoot = document.getElementById("menu");
		for (i=0; i<navRoot.childNodes.length; i++)
		{
			node = navRoot.childNodes[i];
			if (node.nodeName=="DIV")
			{
				for (k=0; k<node.childNodes.length; k++)
				{
					nodeSub = node.childNodes[k];
					if (nodeSub.nodeName=="UL")
					{
						for (l=0; l<nodeSub.childNodes.length; l++)
						{
							nodeSubSub = nodeSub.childNodes[l];
							if (nodeSubSub.nodeName=="LI")
							{
								nodeSubSub.onmouseover=function()
								{
									this.className+=" over_sub";
				 				}
				  				nodeSubSub.onmouseout=function()
								{
				  					this.className=this.className.replace(" over_sub", "");
				   				}
							}
						}
					}
				}
   			}
  		}*/
 	}
}
window.onload=startList;