function setHeight(){
	var content 		= document.getElementById('content');
	var windowHeight	= getWindowSize()[1];
	var contentHeight  	= content.offsetHeight;

	var maxHeight = 800;
	
	
	// als de viewport kleiner is dan 800 pixels pas dan de content aan
	if(windowHeight < maxHeight ) {
		
		var middleElement = document.getElementById('middle');
		var leftElement = document.getElementById('leftside');
		var rightElement = document.getElementById('rightside');
		var containerElement = document.getElementById('container');
		
		var smaller		= (windowHeight/maxHeight);
		
		middleElement.style.height = Math.round((middleElement.offsetHeight-(40/smaller)) * smaller)+'px';	// 40 is de padding van het element. die moet ook x keer kleiner
		leftElement.style.height = Math.round(leftElement.offsetHeight * smaller)+'px';
		rightElement.style.height = Math.round(rightElement.offsetHeight * smaller)+'px';
		containerElement.style.height = Math.round(containerElement.offsetHeight * smaller)+20+'px';
	}
}

function getWindowSize() {
  var myWidth = 0, myHeight = 0;
  if( typeof( window.innerWidth ) == 'number' ) {
    //Non-IE
    myWidth = window.innerWidth;
    myHeight = window.innerHeight;
  } else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
    //IE 6+ in 'standards compliant mode'
    myWidth = document.documentElement.clientWidth;
    myHeight = document.documentElement.clientHeight;
  } else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
    //IE 4 compatible
    myWidth = document.body.clientWidth;
    myHeight = document.body.clientHeight;
  }
 
   return [ myWidth, myHeight ];
}
