if(document.getElementById) {
   if(window.attachEvent) {
      window.attachEvent('onload',init);
   } else if(window.addEventListener) {
      window.addEventListener('load',init,false);
   }
   var initialContent,initialFixed;
}

function HSize() {
  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 myHeight;
}

function WSize() {
  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;
}

function init() {
	var myHeight = HSize();
	var myWidth = WSize();
	var treepos = myHeight - 575;
	var footerpos = myHeight - 90;
	var footwid = myWidth - 16;
	var headwid = footwid - 255;
	var contwid = footwid - 279;
	document.getElementById("fixedbox2").style.top = treepos + "px";
	document.getElementById("fixedbox3").style.top = footerpos + "px";
	document.getElementById("fixedbox3").style.width = footwid + "px";
	document.getElementById("headtab").style.width = headwid + "px";
	document.getElementById("content").style.width = contwid + "px";
}
