var g_initialHeight = 0;
	
window.onresize = fixHeight;

function init()
{
	var content = document.getElementById('mainContainer');
	g_initialHeight = content.offsetHeight;
	fixHeight();
}

function getWindowHeight()
{
	var height = 0;
	
	if (typeof(window.innerHeight) == 'number')
	{
		height = window.innerHeight;	
	}
	else if (document.documentElement && document.documentElement.clientHeight)
	{
		height = document.documentElement.clientHeight;
	}
	else if (document.body && (document.body.clientHeight))
	{
		height = document.body.clientHeight;	
	}
	
	return height;
}

function fixHeight()
{
	var content = document.getElementById('mainContainer');
	
	var windowHeight = getWindowHeight();
	
	if (windowHeight > g_initialHeight)
	{
		content.style.height = windowHeight + 'px';
	}
	else
	{
		content.style.height = g_initialHeight + 'px';
	}
}