var iRow
function show_submenu()
{	
		CloseSubMenus(iRow)
		// close any open submenus first
	table=document.all.tags("TABLE")
	// set up table as a shortcut 

	iRow = document.activeElement.parentElement.rowIndex;
	// set a variable to handle the clicked row number
	
	RowToShow = iRow + 1;
	// the next row contains the table
	if (table['menu'].rows(RowToShow).style.display == "none")
	// if top level table row below clicked is hidden
	{
		table['menu'].rows(RowToShow).style.display = "inline";
		// then display it
		
		table['menu'].rows(iRow).cells(0).className = "menuOpen";
		// and change the class (minus gif)
	}
	else
	{	
		table['menu'].rows(RowToShow).style.display = "none";
		// otherwise hide it
		
		table['menu'].rows(iRow).cells(0).className = "menuClosed";
		// and change the class back (plus gif)
	}
	
}

function CloseSubMenus()
//	function to provide functionality of closing all submenus before
//	the selected submenu is displayed
{
	table=document.all.tags("TABLE")
	
	for(RowNum=0; RowNum<table['menu'].rows.length; RowNum++)
	// Loops through the available rows of top table
	{
		if (table['menu'].rows(RowNum).cells(0).className == "menuOpen")
		{
			NextRow = RowNum + 1;
			table['menu'].rows(RowNum).cells(0).className = "menuClosed";
			table['menu'].rows(NextRow).style.display = "none";
		}
	}
}

function CloseSubMenus2(iRow)
//	function to provide functionality of closing all submenus before
//	the selected submenu is displayed
{
	table=document.all.tags("TABLE")
	
	for(RowNum=0; RowNum<table['menu'].rows.length; RowNum++)
	// Loops through the available rows of top table
	{
		if (table['menu'].rows(RowNum).cells(0).className == "menuOpen")
		{
			if (RowNum != iRow)
			{
				NextRow = RowNum + 1;
				table['menu'].rows(RowNum).cells(0).className = "menuClosed";
				table['menu'].rows(NextRow).style.display = "none";
			}
		}
	}
}

function HighlightOn()
// Handles the mouseover event on the top level menus
{
	window.event.srcElement.className="hover";
	// change the colour to teal
}

function HighlightOff()
// Handles the mouseout event on the top level menus
{
	window.event.srcElement.className="";
	// change the color back to none
}

function HandOn()
// Handles the mouseover event on the top level menus
{
	window.event.srcElement.style.cursor="hand";
	// and show the pointer as a hand
}

function HandOff()
// Handles the mouseout event on the top level menus
{
	window.event.srcElement.style.cursor="auto";
	//  and the cursor back to normal
}

function navigateWindow(strLocation)
{
	iRow = document.activeElement.parentElement.parentElement.parentElement.parentElement.parentElement.rowIndex-1;
	CloseSubMenus2(iRow)		
	window.location.href=strLocation;
}

function HideSection()
{
	if (window.Section.style.display=="none")
	{
		window.Section.style.display="inline";
	}
	else
	{
		window.Section.style.display="none";
	}	
}