NeededHeight = 580;
MinimalHeight = 722;

function RecheckWindow(){
  ClientHeight = GetWindowHeight();
  MainDiv = document.getElementById( 'md' );

  if ( MainDiv ){ 
    max = Math.max( ClientHeight, MinimalHeight );
    MainDiv.style.height = max + 'px';
  
    h = document.getElementById( 'holder' );

    if ( MinimalHeight > ClientHeight ){
//      document.documentElement.style.overflowY = 'auto';
      h.style.overflowY = 'auto';
    } else { 
  //    document.documentElement.style.overflowY = 'visible';      
      h.style.overflowY = 'visible';
    }

    for( var i in Bijwerken ){ 
      Bijwerk = Bijwerken[ i ];
 
      elem = document.getElementById( Bijwerk.id );
      if ( elem ){
        elem.style[ Bijwerk.what ] = ( max + Bijwerk.how ) + 'px';
      }
    }

  }
}

window.onload = RecheckWindow;
window.onresize = RecheckWindow;


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