function gId(id)
	{
	return document.getElementById(id);
	}

var oldcss = '';
function makePrintable()
	{
	if(oldcss.length > 0)
		{
		document.getElementById('stylesheet').href = oldcss;
		oldcss = '';
		return;
		}

	oldcss = document.getElementById('stylesheet').href;
	document.getElementById('stylesheet').href = '';
	setTimeout('window.print();', 500);
	}

// Shows sub menu
var oldid = '';
function showMenu(id)
	{
	if(oldid == id)
		return;

	if(gId(oldid))
		gId(oldid).style.display = 'none';
	if(gId(id))
		gId(id).style.display = '';

	oldid = id;
	}

var isMSIE = /*@cc_on!@*/false;

// Fits right menu to middle
function fitItems()
	{
	var max = 0;
	var max = 0;

	var types = new Array('content', 'rightSide', 'menu');
	for(var t in types)
		{
		name = types[t];
		if(gId(name))
			{
			if(max < gId(name).offsetHeight + gId(name).offsetTop)
				max = gId(name).offsetHeight + gId(name).offsetTop;
			}
		}

	if(gId('menu') && gId('menu').offsetHeight < max)
		{
		gId('menu').style.height = (max - gId('menu').offsetTop) + 'px';
		}

	if(gId('rightSide') && gId('rightSide').offsetHeight < max)
		{
		if(isMSIE)
			offset = gId('poll').offsetTop + gId('poll').parentNode.offsetTop;
		else
			offset = gId('poll').offsetTop;
		gId('poll').style.height = (max - offset) + 'px';
		}

	setTimeout('fitItems();', 500);
	}
//fitItems();
setTimeout('fitItems();', 500);
