// function for expanding and collapsing result tables
function expandRow(obj)
{
	var clickedImg = obj;
	var oRow = obj.parentNode.parentNode;
	var oTable = oRow.parentNode;
	var oNextRow = oTable.rows[oRow.rowIndex + 1];
	
	// Expands next row
	oNextRow.style.display = (oNextRow.style.display == "none")? "":"none";

	// Highlights the second cell with bold
	oRow.cells[1].style.fontWeight = (oNextRow.style.display == "none")? "":"bold";

	// Changes the src of the clicked image
	clickedImg.src = (clickedImg.src.indexOf("tab_open")>0)? "/ci/images/button/arrow_tab_closed.gif":"/ci/images/button/arrow_tab_open.gif";
}


// function for expanding and collapsing result tables in categorized views
function expandRowCategorized(obj)
{
	var clickedImg = obj;
	var oRow = obj.parentNode.parentNode;
	var oTable = oRow.parentNode;
	var oNextRow = oTable.rows[oRow.rowIndex + 2];
	
	// Expands next row
	oNextRow.style.display = (oNextRow.style.display == "none")? "":"none";

	// Highlights the second cell with bold
	oRow.cells[2].style.fontWeight = (oNextRow.style.display == "none")? "":"bold";

	// Changes the src of the clicked image
	clickedImg.src = (clickedImg.src.indexOf("tab_open")>0)? "/ci/images/button/arrow_tab_closed.gif":"/ci/images/button/arrow_tab_open.gif";
}


// Function to show the correct description for active word
var activeWord;

function showWord(num)
{
	colWords = document.getElementById("glossaryContent").getElementsByTagName("DIV");

	if(activeWord != undefined)
	{
		colWords[activeWord].style.display = "none";
	}

	colWords[num].style.display = "";
	activeWord = num;
}