function setHeight() {
	if (document.getElementById) {
		var windowHeight=getWindowHeight();
		if (windowHeight>0) {
			var mainmenuHeight=0
			/*	if(document.getElementById('mainmenu'))
					mainmenuHeight=document.getElementById('mainmenu').offsetHeight;
			*/
			var logoHeight=0
				if(document.getElementById('logo'))
					logoHeight=document.getElementById('logo').offsetHeight;
			var pageHeaderHeight=0;
				//if(document.getElementById('pageHeader'))
					//pageHeaderHeight=document.getElementById('pageHeader').offsetHeight;
			var footerHeight=0
				if(document.getElementById('footer'))
					footerHeight=document.getElementById('footer').offsetHeight;
			var totalHeight=mainmenuHeight+logoHeight+pageHeaderHeight+footerHeight;

			var pageHeight=0
				if(document.getElementById('content')) {
					var pageElement=document.getElementById('content');
					pageHeight=pageElement.offsetHeight;
				}
								
			if (windowHeight-(totalHeight+pageHeight)>=0) {
				/*submenuElement.style.height=windowHeight-totalHeight+'px';*/
				pageElement.style.height=windowHeight-totalHeight-footerHeight+'px';

				// Adjust submenu & extra height
				if(document.getElementById('submenu')) {
					var submenuElement=document.getElementById('submenu');
					pageElement.style.height=windowHeight-totalHeight-footerHeight+'px';
				}
				if(document.getElementById('extra')) {
					var extraElement=document.getElementById('extra');
					pageElement.style.height=windowHeight-totalHeight-footerHeight+'px';
				}
			}
		}
	}
}

function getWindowHeight() {
	var windowHeight=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;
			}
		}
	}
	return windowHeight;
}

function printpage()
{
	window.print();
}
window.onload = function() {
	setHeight();
}
window.onresize = function() {
	setHeight();
}