function cs()
{
	if (!document.getElementById) return;
	
	var bg = document.getElementById("bg");
	var fix = document.getElementById("fix");
	
	bg.height = fix.clientHeight;
	
	if (fix.clientWidth < 830)
	{
		bg.width = 830;
	}
	else
	{
		bg.width = fix.clientWidth;
	}
}

function rs()
{
	if (!document.getElementById) return;
	
	var n = navigator.userAgent.indexOf("MSIE");
	var p = document.getElementById("pole1");
	var p2 = document.getElementById("pole2");			
	
	if (n > -1)
	{
		p.style.height = 0;
		p2.style.height = 0;
	}
	else
	{
		p.style.minHeight = 0;
		p2.style.minHeight = 0;
	}
	
	if (p.clientHeight > p2.clientHeight)
	{
		if (n > -1)
		{
			p2.style.height = p.clientHeight;
		}
		else
		{
			p2.style.minHeight = p.clientHeight;
		}
	}
	
	if (p.clientHeight < p2.clientHeight)
	{
		if (n > -1)
		{
			p.style.height = p2.clientHeight;
		}
		else
		{
			p.style.minHeight = p2.clientHeight;
		}
	}			
}

function ps()
{
	if (!document.getElementById) return;
	
	var vi = document.getElementById("vi");
	var tu = document.getElementById("tu");
	
	vi.style.backgroundPosition = tu.clientWidth - 30 + "px 0";
}		

function OpenWindow(sUri, iWidth, iHeight)
{
	var sWindowName = 'win' + Math.floor (Math.random() * 1000);
	var iRealWidth = iWidth ? iWidth + 70 : 600;
	var iRealHeight = iHeight ? iHeight + 64 : screen.height - 300;

	var iLeft = Math.round ((screen.width - iRealWidth) / 2);
	var iTop =  Math.round ((screen.height - iRealHeight) / 2) - 35;

	var sWindowOptions = 'status=no,menubar=no,toolbar=no';
	sWindowOptions += ',resizable=no,scrollbars=yes,location=no';
	sWindowOptions += ',width='  + iRealWidth;
	sWindowOptions += ',height=' + iRealHeight;
	sWindowOptions += ',left='   + iLeft;
	sWindowOptions += ',top='    + iTop;

	var win = window.open (sUri, sWindowName, sWindowOptions);
	win.focus();
}	
