function centerPage()
{
	if ($(window).width() < $('#page').width())
	{
		$('#leftbar').hide();
		$('#page').width( 1100 - 160 );
		$('#topbar').css('margin-left', 0);
		$('#bottombar').css('margin-left', 0);
		$('#imagebar').css('left', 0);
	}
	else
	{
		$('#leftbar').show();
		$('#page').width( 1100 );
		$('#topbar').css('margin-left', 160);
		$('#bottombar').css('margin-left', 160);
		$('#imagebar').css('left', 160);
	}
	$('#page').css('left', Math.max(0, ($(window).width() - $('#page').width()) / 2) );
	$('#page').css('top', Math.max(0, ($(window).height() - $('#page').height()) / 2) );
}

$(document).ready(function(){
	centerPage();
	$(window).bind('resize', centerPage);	
	if ($.browser.mozilla) $('#topbar ul li a').css('display', 'block');
});
