var submenu = document.getElementById("submenu");
browser = navigator.appVersion;
for(i=0;i<submenu.childNodes.length;i++)
{
	if(document.getElementById("submenu").childNodes[i].childNodes[0])
	{
		if(document.getElementById("submenu").childNodes[i].nodeName == "LI" && browser.indexOf('MSIE 6') >= 0)
		{
			node = document.getElementById("submenu").childNodes[i];
			node.onmouseover = function() 
			{
				this.className += " active";
			}
			node.onmouseout = function() 
			{
				this.className = this.className.replace(" active", "");
       			}
		}
		if(location.href == document.getElementById("submenu").childNodes[i].childNodes[0].href)
		{
			submenu.childNodes[i].className = "active";
		}
	}
}
locat = location.href
if(locat.indexOf("/", 10) == (locat.length-1))
{
	submenu.childNodes[0].className = "active";
}

/* Could be used for directory base detection
	var linkFull = document.getElementById("submenu").childNodes[i].childNodes[0].href;
	var linkHref = linkFull.substring(0,linkFull.lastIndexOf("/"));
	var locatFull = location.href;
	var locat = locatFull.substring(0,locatFull.lastIndexOf("/"));
	if(document.getElementById("submenu").childNodes[i].childNodes[0])
	{
		if(linkHref == locat)
		{
			submenu.childNodes[i].className = "active";
		}
	}
*/
