﻿// JScript File
function setLayout() {

//Set Main Height
	var windowHeight=0; 
	var contentHeight=0; 
	if (typeof(window.innerHeight)=='number') {
		windowHeight= window.innerHeight;
	}
	else {
		if (document.documentElement && document.documentElement.clientHeight) {
			windowHeight = document.documentElement.clientHeight;
		}
		else {
			if (document.body&&document.body.clientHeight) {
				windowHeight=document.body.clientHeight;
			}
		}
	}
	windowHeight = windowHeight-244;

		contentHeight = document.getElementById('main').offsetHeight;


	if(windowHeight < contentHeight){

		document.getElementById('main').style.height = contentHeight +'px';

	}else{

		document.getElementById('main').style.height = windowHeight +'px';

	}

}
window.onload = function()
{
	setLayout();
}

window.onresize = function()
{
	setLayout();
}
