function setMainContentHeight()
{
	var mainContentTable = document.getElementById("MainContentTable")
	var rows  = mainContentTable.rows;
	var iRow = 0;
	var iTotalHeight = 0;
	
	for (iRow = 0; iRow < rows.length; iRow++)
	{
		iTotalHeight += rows[iRow].clientHeight;
	}
	
	var delta = document.documentElement.clientHeight - iTotalHeight;
	var mainContentCell = document.getElementById("MainContentCell")

	mainContentCell.height = mainContentCell.clientHeight + delta - 20;
}

function onResize()
{
	setMainContentHeight();
	
	return true;
}

function onError(e)
{
	if (!e) e = window.event;
	alert(e.type);
	return true;
}

function hookUpEvents()
{
	window.onresize = onResize;
	window.onerror = onError;
}
