function calcTablesHeight()
{
	gtables = document.getElementById("goodslist");
	if (!gtables)
		return;
	for (i = 0; gtables.rows[i]; i++ )
	{
		if (!gtables.rows[i].cells[0].children)
			return;
		col1 = gtables.rows[i].cells[0].children[0];
		if (gtables.rows[i].cells[1] && gtables.rows[i].cells[1].children[0])
		{
			col2 = gtables.rows[i].cells[1].children[0];
		}
		else
		{
			continue;
		}

		if (col1.clientHeight < col2.clientHeight)
		{
			col1.style.height = (col2.clientHeight - 20 ) + "px";
			col2.style.height = (col2.clientHeight - 20 ) + "px";
		}
		else
		{
			col2.style.height = (col1.clientHeight - 20 ) + "px";
			col1.style.height = (col1.clientHeight - 20 ) + "px";
		}
	}
}


function fixContentHeight()
{
	chead = document.getElementById("head");
	cleft = document.getElementById("menucol")
	if (!cleft) {cleft = document.getElementById("additcol")}
	cbottom = document.getElementById("bottom")
	if (!cbottom) cbottom = document.getElementById("bottom2")
	allheight = 0;
	if (chead) {allheight += chead.clientHeight;}
	if (cbottom) {allheight += cbottom.clientHeight;}
	if (window.screen.height < (allheight + cleft.clientHeight))
	{
		return;
	}
	cleft.style.height = (document.body.clientHeight - allheight - 25) + "px";
}


calcTablesHeight();
fixContentHeight();

