function centerPage(id)
{
	el = document.getElementById(id);
	w = el.offsetWidth;
	h = el.offsetHeight;
	
	if (document.all)
	{
		screenWidth = document.body.clientWidth;
		screenHeight = document.body.clientHeight;
		isIE = true;
	}
	else
	{
		screenWidth = window.innerWidth;
		screenHeight = window.innerHeight;
		isIE = false;
	}
	currentLeft = (screenWidth - w)/2;
	currentTop = (screenHeight - h) / 2;

	if (isIE)
	{
		// IE4+ Code
		el.style.left = currentLeft;
		el.style.top = currentTop;
		el.style.visibility = 'visible';
		dark.style.visibility = 'visible';
		document.all.dark.style.left = currentLeft-10;
		document.all.dark.style.top = currentTop-10;
	}
	else
	{
		// NN4 Code
		document.floatingDiv.left = currentLeft;
		document.floatingDiv.top = currentTop;
		document.floatingDiv.visibility = 'show';
	}
}

//	показывает/скрывает объект по его id
function sh(id)
{
	numArgs = sh.arguments.length;
	if (numArgs <= 0) return;
	
	for (var i = 0; i <= numArgs; i++)
	{
		el = document.getElementById(sh.arguments[i]).style;
		el.visibility = (el.visibility == 'hidden') ? 'visible' : 'hidden';
	}
}