/* 
 * Hovers li's in IE as it does not support CSS hovers on LI tags 
 * Requires the hover style to also apply to the class .over 
*/
function assignHoverNav() { assignHover('d-nav'); }
function assignHover(element)
{
	var ul = null;
	var li = null;
	var index = 0;
	var menu = document.getElementById(element);
	if (!menu) menu = document.getElementById(element);
	if (!menu) return false;

	ul = menu.getElementsByTagName("li");
	if (!ul) {
		window.status = "No drop down menu items found";
		return false;
	}

	for(index=0;index<ul.length;index++)
	{
		li = ul[index];
		// Skip li's without a submenu 
		if (!li.childNodes[2]) continue;

		li.onmouseover = function () 
		{
			this.className += " hover";
		}

		li.onmouseout = function ()
		{
			this.className = this.className.replace(" hover", "");
		}
	}
}

// Add to onload events
//var oldonload = window.onload;
//if (typeof window.onload != 'function') window.onload = assignHoverNav;
//else window.onload = function() { if (oldonload) { oldonload(); } assignHoverNav(); };
if (window.attachEvent) window.attachEvent('onload', assignHoverNav);
