function hideContentInactive(id)
{
	var oContent = document.all.item("table"+id+"Content");
	if (!oContent) return;

	oContent.style.display = "none";
}

function showHideContent(id,bOn)
{
	var oContent = document.all.item("table"+id+"Content");
	if (!oContent) return;

	bOn = (oContent.style.display.toLowerCase() == "none");

	if (bOn == false)
	{
		oContent.style.display = "none";
	}
	else
	{
		oContent.style.display = "";
	}
}

function setBorder(id,bOn)
{
	var oTab    = document.all.item("table"+id+"Tab");
	var oTab2   = document.all.item("table"+id+"Tab2");

	if (!oTab || !oTab2)
		return;

	if (bOn)
	{
		oTab.background = "images/bar-main1.gif";
		oTab2.color  = "#F37C14";
	}
	else
	{
		oTab.background = "images/bar-main.gif";
		oTab2.color  = "#004C91";
	}
}

function writeDynamicTable(num, width, title)
{
	if (navigator.appName == 'Netscape')
	{
		tableStyle = '';
		divStyle = '';
	}
	else
	{
		tableStyle = ' style="CURSOR: hand;"';
		divStyle = ' style="BORDER-RIGHT: #004C91 1px solid; BORDER-LEFT: #004C91 1px solid; BORDER-BOTTOM: #004C91 1px solid; WIDTH: ' + width + '"';
	}
 	document.write('<table id=table' + num + 'Tab width=' + width + ' height=22 background="images/bar-main.gif" border=0 cellspacing=0 cellpadding=0 onmouseover="setBorder('+num+',true);"' + tableStyle + ' onmouseout="setBorder('+num+',false);">\n');
	document.write('<tr background="images/bar-main.gif">\n');

	document.write('<td width="2"><img src="images/bar-l.gif" border=0></td>\n');
	
	document.write('<td align=left width=100% height=10 valign=center onclick="showHideContent('+num+');">\n');
	document.write('<font id=table' + num + 'Tab2 face=verdana,arial,helvetica color=#004C91 size=1><b>' + title + '</b></font></td>\n');

	document.write('<td width="2"><img src="images/bar-r.gif" border=0></td>\n');
	
	document.write('</tr>\n');
	document.write('</table>\n');
	document.write('<div id=table' + num + 'Content' + divStyle + '>\n');
}