function enhanceMenu(el)
{
	for (var i = 0; i < el.childNodes.length; i++)
	{
		var node = el.childNodes[i];
		if (node.nodeName == "LI")
		{
			enhanceMenu(node);
		}
		else if (node.nodeName == "A")
		{
			enhanceMenu(node);
		}
		else if (node.nodeName == "IMG")
		{
			node.onmouseover = function()
			{
				this.src = this.src.replace("Off", "On");
				document.getElementById('textImg').src = WEBSITE_HROOT+'/images/'+this.id.replace("img", "text")+'.gif';
			}
			node.onmouseout = function()
			{
				this.src = this.src.replace("On", "Off");
				document.getElementById('textImg').src = WEBSITE_HROOT+'/images/empty.gif';
			}
		}
	}
}
function enhanceMenuInit()
{
	enhanceMenu(document.getElementById('menu'));
}

function enlargeSite()
{
	var availableHeight = getWindowHeight();
	document.getElementById('contentBlockContentContainer').style.height = (availableHeight - (24 + 24 + 60 + 100))+'px';
}

function getWindowHeight()
{
	if (typeof( window.innerHeight) == 'number')
		return window.innerHeight;
	else
		return document.documentElement.clientHeight;
}

if (window.addEventListener)
{
	window.addEventListener('load', enhanceMenuInit, false);
	window.addEventListener('load', enlargeSite, false);
	window.addEventListener('resize', enlargeSite, false);
}
else
{
	window.attachEvent('onload', enhanceMenuInit);
	window.attachEvent('onload', enlargeSite);
	window.attachEvent('onresize', enlargeSite);
}