function initPage()
{
	var n = document.getElementById("navigation");
	if (n)
	{
		var lis = n.getElementsByTagName("li");
		for (var i = 0; i < lis.length; i++)
		{
			if (lis[i].getElementsByTagName("ul").length)
			{
				lis[i].onclick = function (event)
				{
					if (!event) event = window.event;
					var src = (event.target || event.srcElement);
					if (this == src.parentNode)
					{
						if (this.className.indexOf("active") != -1)
							this.className = this.className.replace("active", "");
						else
							this.className += " active";
						event.cancelBubble = true;
						for (var i = 0; i < lis.length; i++)
						{
							if(!(this == lis[i]) && lis[i].className.indexOf("active") != -1)
								lis[i].className = lis[i].className.replace("active", "");
						}				
						return false;
					}
				}
			}
		}
	}
}

if (window.addEventListener)
	window.addEventListener("load", initPage, false);
else if (window.attachEvent)
	window.attachEvent("onload", initPage);
