// JavaScript Document
/******************************************
 *
 * Created by Steelwork Web Services
 * 
 ******************************************/
 
 setBrowser();


function onLoadHook()
{
	if (window.formatMenuList) formatMenuList(); 
}


window.onload=onLoadHook;

function formatMenuList() 
{
	if (document.getElementById) 
	{
		navRoot = document.getElementById("mainMenu");
		if (navRoot)
		{
			for (i=0; i<navRoot.childNodes.length; i++) 
			{
				node = navRoot.childNodes[i];
				if (node.nodeName=="LI") 
				{
					var ul=node.getElementsByTagName("UL");
					if (ul)
					{						
						node.className="collapsed";
						node.onclick=function() 
						{
							if (this.className=="collapsed")
							{
								this.className="";
							}
							else
							{
								this.className="collapsed";
							}
						}
					}
					
					var urlString=window.location.href;
					if (urlString.indexOf("#")>0) urlString=urlString.substring(0,urlString.indexOf("#"));
					var a=node.getElementsByTagName("A");
					for (var j=0; j<a.length; j++)
					{
						if (urlString==a[j].href) 
						{
							a[j].className="selected";
							if (j>1 || ul)
							{
								node.className="";
							}
						}
					}
				}
			}
		}
	}
	return false;
}