<!--
// Read size and place element
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 setFooter() {
	if (document.getElementById) {
		var windowHeight = getWindowHeight();
		if (windowHeight > 0) {
			var contentHeight = document.getElementById('content').offsetHeight;
			var footerElement;
			if (document.getElementById('footer') != null)
			{
				footerElement = document.getElementById('footer');
			}
			else
			{
				footerElement = document.getElementById('footer2');
			}
			var footerHeight  = footerElement.offsetHeight;
			
			if (windowHeight - (contentHeight + footerHeight +158) >= 0) {
				//footerElement.style.position = 'relative';
				document.getElementById('content').style.height = (windowHeight - (footerHeight + 158)) + 'px';
				if (document.getElementById('events') != null)
				{	
					if (document.getElementById('ontwerpdag') != null)
					{
						if (document.getElementById('events').clientHeight >= document.getElementById('ontwerpdag').clientHeight)
						{
							document.getElementById('content').style.height = (document.getElementById('events').clientHeight + (footerHeight + 158) ) + 'px';
						}
						else
						{
							document.getElementById('content').style.height = (document.getElementById('ontwerpdag').clientHeight + (footerHeight + 158) ) + 'px';
						}
					}
				}
				//footerElement.style.position = 'absolute';
				//footerElement.style.top = (windowHeight - 26)+'px';
			}
			else {
				//alert("content hoger dan browservenster?");
			}
		}
	}
}

function getWindowWidth() {
	var windowWidth = 0;
	if (typeof(window.innerWidth) == 'number') {
		windowWidth = window.innerWidth;
	}
	else {
		if (document.documentElement && document.documentElement.clientWidth) {
			windowWidth = document.documentElement.clientWidth;
		}
		else {
			if (document.body && document.body.clientWidth) {
				windowWidth = document.body.clientWidth;
			}
		}
	}
	return windowWidth;
}

function setGardenList() {
	if (document.getElementById) {
		var windowWidth = getWindowWidth();
		//alert (windowWidth);
		if (windowWidth > 0) {
			var pageElement = document.getElementById('page');
			if (windowWidth >= 938) {
				pageElement.style.width = '937px';
			}
			else {
				pageElement.style.width = '100%';
			}
		}
	}	
}


window.onload = function() {
	//setGardenList(); 
	setFooter();
}
window.onresize = function() {
	//setGardenList(); 
	setFooter();
}

function showSubnav() {
	document.getElementById('diensten').style.background = 'transparent url(images/menu.gif) -77px -25px no-repeat';
	document.getElementById('subnav').style.display = 'block';	
}
function hideSubnav() {
	document.getElementById('diensten').style.background = '';
	document.getElementById('subnav').style.display = 'none';	
}
//-->
