function windowScroll( ) 
{
  this.init();
}

windowScroll.prototype.init = function ( )
{
  var contentDivEl = document.getElementById("content");
  var headerDivEl = document.getElementById("header");
  if (!contentDivEl || !headerDivEl) return;
  
  this.content = contentDivEl;
  this.header = headerDivEl;
  this.resize();
  this.height = 0;
  
  var parent = this;
  toolkit.attach(window,"resize", function () { parent.resize(); } );
}

windowScroll.prototype.resize = function ()
{
  var height = document.body.offsetHeight - this.header.offsetHeight-2;
  if (height <= 0) return true;
  if (height == this.height) return true;
  
  this.height = height;
  this.content.style.height = height+"px";
}

toolkit.attach(window,"load", function() { new windowScroll(); } );

