function initPulldownMenu()
{

	var activeMenu = top.activeMenu;
	var activePage = top.activePage;
	var rootName = "menu"
	var rootItem = document.getElementById(rootName);
	var list = rootItem.getElementsByTagName("li");
	
	if (activeMenu != null)
	{
		var el = document.getElementById("base_"+activeMenu);
		if (el != null)
		{
			el.className = "hover";
			var activeSubmenu = el.getElementsByTagName("ul");
			
			if (activeSubmenu.length > 0)
			{
				for (var i = 0; i < activeSubmenu.length; i++)
				{
					activeSubmenu[i].style.display="block";
				}
			}
		}
	}
	
	if (activePage != null)
	{
		
		var elPage = document.getElementById("drop_"+activePage);
		if (elPage != null)
			elPage.className="active";
	}
	
	/* Looping trough all li elements */
	for (var i = 0; i < list.length; i++)
	{
		/* Check if parent of li element is #nav	*/
		if (list[i].parentNode.id == rootName)
		{			
			/* Make a function of the mouseover state */
			list[i].onmouseover = function()
			{
				var activeTab = document.getElementById("base_"+top.activeMenu);
				
				if (activeTab)
					activeTab.className="";
				this.className="hover";
				
				
				var list2 = this.getElementsByTagName("ul");
				
				/* Loop trough all ul elements in the current li element */
				for (var a = 0; a < list2.length; a++)
				{
					/* If an ul element is found show it to the world */
					//list2[a].style.display="block";
				}
				
				/* Close all other subitems */
				var list3 = rootItem.getElementsByTagName("li");
				/* Loop trough all li elements form the root except the current li element */
				for (var z = 0; z < list3.length; z++)
				{
					if (list3[z].parentNode.id == rootName)
					{
						if (this.innerHTML != list3[z].innerHTML)
						{
							/* If the parentnode id is #nav and the li element is not the current li element, hide the child ul element from the world. */
							var list4 = list3[z].getElementsByTagName("ul");
							if (list4.length > 0)
							{
								for (var x = 0; x < list4.length; x++)
								{
									//list4[x].style.display="none";
								}
							}
						}
					}
				}
			}
			list[i].onmouseout = function()
			{
				var list5 = this.getElementsByTagName("ul");
				for (var i = 0; i < list5.length; i++)
				{
					list5[i].style.display="none";
				}
				
				if (top.activeMenu != null)
				{
					var activeTab = document.getElementById("base_"+top.activeMenu);
					this.className="";
					
					if (activeTab != null)
					{
						activeTab.className="hover";
					
						var list6 = activeTab.getElementsByTagName("ul");
					
						for (var a = 0; a < list6.length; a++)
						{
							list6[a].style.display="block";
						}
					}
				}
			}
		}
	}
}