// JavaScript Document

function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}

function resize()
{
  
    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;
  }

  var maxh = 0; // your max height here; enter 0 if not used
  var maxw = 1081; // table is 1076 wide, minimum margin of 5
  var content = document.getElementById('content');
  content.style.position = 'absolute';
  if(maxh > 0 && myHeight <= maxh)
  {
  content.style.height = myHeight+"px";
  }
  if(maxw > 0 && myWidth <= maxw)
  {
  //content.style.width = wide+"px";
  }
  if(maxh > 0 && myHeight > maxh)
  {
  content.style.height = maxh+"px";
  myHeight = (myHeight - maxh) / 2;
  content.style.top = myHeight+"px";
  }
  if(maxw > 0 && myWidth > maxw)
  {
  //content.style.width = maxw+"px";
  myWidth = (myWidth - maxw) / 2;
  content.style.left = myWidth+"px";
  }
}

MM_reloadPage(true);
window.onresize = resize;