// JavaScript Document

var setFrameInt;
var minHeight = 700;
var buffer = 164;

function setFramePosition()
{
	
	var frame = document.getElementById('frameOuter');
	var footer = document.getElementById('footer');
	var frameBottom = document.getElementById('frameBottom');
	var windowHeight = (window.innerHeight ? window.innerHeight  : document.documentElement.clientHeight);
	if ( windowHeight < minHeight )
	{
		frame.style.minHeight = minHeight+'px';
		frameBottom.style.top = (minHeight-buffer)+'px';
		footer.style.top = (minHeight-40)+'px';
	}
	else
	{
		frame.style.minHeight = windowHeight+'px';
		frameBottom.style.top = 'auto';
		footer.style.top = 'auto';
	}
}

function initSetFramePosition()
{
	setFrameInt = setInterval(setFramePosition, 10);
	window.onmouseover = terminateSetFramePosition;
}

function terminateSetFramePosition()
{
	clearInterval = setFrameInt;
}

window.onload = setFramePosition;
window.onresize = initSetFramePosition;