
	function findRowID(s)
	{
		// Returns the index of a row with id == [s]
		var i;
		
		for (i = 0; i < linktable.rows.length; i++)
		{
			if (linktable.rows(i).id == s)
			{
				return i;
			}
		}
		
		// No match.
		return -1;
	}

	function ShowLinkSection(n)
	{	
		// User clicked on the navigation button.  Expand or collapse menu.
		// [n] is the section index for the clicked section.
		
		var arrLinks;
		var i;
		var nrow;
		var newcell;
		var newrow;
		var reportimg;
		
		if (LinkSections[n - 1][1] == "closed")
		{
			/* Expand section. */
			// Get links for this section.
			arrLinks = (LinkSections[n - 1][0]);
			
			// Add all links to menu.
			nrow = findRowID("row" + n)
			document.all("image" + n).src = "images/navopen.gif";
			newrow = linktable.insertRow(nrow + 1);
			newrow.style.background = "#e6e6e6";
			newrow.id = "rowdetail" + n;
			newcell = newrow.insertCell();
			newcell.colSpan = 5;
			newcell.style.height = 0;
			newcell.innerHTML += LinkSections[n - 1][0];

			// Set section as expanded.
			LinkSections[n - 1][1] = "open";
		}
		else
		{
			
			// Collapse section.
			nrow = findRowID("rowdetail" + n);
			linktable.deleteRow(nrow);
			document.all("image" + n).src = "images/navclosed.gif";
			LinkSections[n-1][1] = "closed";
		}
	}
