function fixImage(img)
{
	w = img.width;
	h = img.height;
	if ( w > 100 && w > h )
		img.width = 100;
	if ( h > 100 && h > w )
		img.height = 100;
}

function changeNewsLable(l)
{
	if ( l == 1 )
	{
		document.all.TdNewsLable1.className = "labBody";
		document.all.TdNewsLable2.className = "labOut";
		document.all.TableNews1.style.display = "";
		document.all.TableNews2.style.display = "none";
	}
	if ( l == 2 )
	{
		document.all.TdNewsLable1.className = "labOut";
		document.all.TdNewsLable2.className = "labBody";
		document.all.TableNews1.style.display = "none";
		document.all.TableNews2.style.display = "";
	}
}

function changeUserLable(l)
{
	for ( i=1; i<=8; i++ )
	{
		objTd	= eval("document.all.Td" + i );
		objTbl	= eval("document.all.TableUser" + i );
		
		if ( i == l )
		{
			objTd.className = "labBody";
			objTbl.style.display = "block";
			document.all.txtCurrentLab.value = i;
		}
		else
		{
			objTd.className = "labOut";
			objTbl.style.display = "none";
		}
	}
}
