function initMenu()
{
	var menu = document.getElementById('pulpMenu');
	menu._timer = null;
	if(null != menu)
	{
		if(menu.hasChildNodes())
		{
			for(i = 0; i < menu.childNodes.length; i++)
			{
				if('item' == menu.childNodes[i].className)
				{
					menu.childNodes[i].onmouseover = function()
					{ 
						showSubmenu(this);
						window.clearTimeout(document.getElementById('pulpMenu')._timer);
						document.getElementById('pulpMenu')._timer = window.setTimeout("showSubmenu(null)", 10000);
					}
				}
			}
		}
	}
}

function showSubmenu(menuItem)
{
	var menu = document.getElementById('pulpMenu');
	if(null != menu)
	{
		if(menu.hasChildNodes())
		{
			for(i = 0; i < menu.childNodes.length; i++)
			{
				if('item' == menu.childNodes[i].className)
				{
					if(menu.childNodes[i].hasChildNodes())
					{
						for(j = 0; j < menu.childNodes[i].childNodes.length; j++)
						{
							if('submenu' == menu.childNodes[i].childNodes[j].className)
							{
								if(menuItem == menu.childNodes[i]) 
									menu.childNodes[i].childNodes[j].style.display = 'block';
								else
									menu.childNodes[i].childNodes[j].style.display = 'none';
							}
						}
					}
				}
			}
		}
	}
}

function addLoadEvent(func)
{	
	var oldonload = window.onload;
	if (typeof window.onload != 'function'){
    	window.onload = func;
	} else {
		window.onload = function(){
		oldonload();
		func();
		}
	}

}