function getWindowWidth ( ) {
	if (self.innerWidth) // all except Explorer
	{
		return self.innerWidth;
	}
	else if (document.documentElement && document.documentElement.clientHeight)
		// Explorer 6 Strict Mode
	{
		return document.documentElement.clientWidth;
	}
	else if (document.body) // other Explorers
	{
		return document.body.clientWidth;
	}
}

function getWindowHeight ( ) {
	if (self.innerHeight) // all except Explorer
	{
		return self.innerHeight;
	}
	else if (document.documentElement && document.documentElement.clientHeight)
		// Explorer 6 Strict Mode
	{
		return document.documentElement.clientHeight;
	}
	else if (document.body) // other Explorers
	{
		return document.body.clientHeight;
	}
}

function hilite ( i )
{
	var e = document.getElementById ( "menuitem" + i.toString() );	
	e.style.backgroundColor = 'white';
}

function unhilite ( i )
{
	var e = document.getElementById ( "menuitem" + i.toString() );	
	e.style.backgroundColor = '#FF6600';
}

function centerTopVisible ( ) {
	var h = getWindowHeight();
	var w = getWindowWidth();
	var e = document.getElementById ( "containsall" );
	e.style.marginTop = -(Math.min( h/2, 309)) + 'px';
	e.style.marginLeft = -(Math.min( w/2, 397)) + 'px';
}

onresize = centerTopVisible;


