function initPage()
{
	var nav = document.getElementById("nav");
	if (nav)
	{
		var nodes = nav.getElementsByTagName("li");
		for (var i = 0; i < nodes.length; i++)
		{

				nodes[i].onmouseover = function () 
				{
					this.className += " hover";
				}
				nodes[i].onmouseout = function ()
				{
					this.className = this.className.replace(" hover", "");
				}

		}
	}
	
}
if (window.attachEvent)
	window.attachEvent("onload", initPage);

/*this code for drop-down menu in the sub navigation:*/
function initNav()
{
	var nav = document.getElementById("add-nav");
	if (nav)
	{
		var nodes = nav.getElementsByTagName("a");
		for (var i = 0; i < nodes.length; i++)
		{
			var _parent = nodes[i].parentNode;
			if (_parent.parentNode.className == "left-sub-nav" )
			{
				if(_parent.className == "active")
				{
					_parent.className = '';
				}
				else
				{
					_parent.className = 'close';
				}
				/*
				nodes[i].onclick = function ()
				{
					
					if ( this.parentNode.className == "close" ) this.parentNode.className = ""
					else this.parentNode.className = "close";

				}
				*/
			}
		}
	}

}
if (window.addEventListener) window.addEventListener("load", initNav, false)
else if (window.attachEvent) window.attachEvent("onload", initNav);