function initPulldownMenu()
{
	var rootItem = document.getElementById("nav");
	var list = rootItem.getElementsByTagName("li");
	
	/* 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 =="nav")
		{
			/* Make a function of the mouseover state */
			list[i].onmouseover = function()
			{
				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 == "nav")
					{
						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";
								}
							}
						}
					}
				}
			}
		}
	}
}