// JavaScript Document
function init()
{
if(window.addEventListener)
	{
	AdjustDivWidth();
	window.addEventListener("resize", AdjustDivWidth, false);
	}
else if(document.addEventListener && window.opera)
	{
	AdjustDivWidthForOpera7();
	document.addEventListener("resize", AdjustDivWidthForOpera7, false);
	};
}

function AdjustDivWidth()
{
var ScrollbarWidth = 13; var TableBorder = 0;
if(navigator.userAgent && navigator.userAgent.indexOf("Gecko") != -1 && (navigator.userAgent.indexOf("Firefox/1.") != -1 || navigator.userAgent.indexOf("K-Meleon/1.") != -1))
{ScrollbarWidth = 15; TableBorder = 0;}
else if(navigator.userAgent && navigator.userAgent.indexOf("Gecko") != -1 && navigator.userAgent.indexOf("Firefox/2.") != -1) {ScrollbarWidth = 14;}
else if(navigator.userAgent.indexOf("SeaMonkey/1.") != -1)
{ScrollbarWidth = 9;}
else if(navigator.userAgent && navigator.userAgent.indexOf("Opera/9.") != -1)
{ScrollbarWidth = 11;};
document.getElementById("idDivScrollingTBody").style.width = parseInt(document.defaultView.getComputedStyle(document.getElementById("idTableHeader"), null).getPropertyValue("width"), 10) + TableBorder + 2 + 2 + TableBorder + ScrollbarWidth + "px";
/* 15 for Mozilla suite; 17 for FF 1.x and K-meleon 1.0+ assuming that Start/Settings/Control Panel/Display/Appearance tab/Font size is Normal
and here assuming that Advanced button/Item: Scrollbar/Size: has not been user-defined, then 17 */
}

function AdjustDivWidthForOpera7()
{
document.getElementById("idTableHeader").style.width = document.getElementById("idDivScrollingTBody").offsetWidth - 17 + "px";
}