// Author: Paul S. Wang
// July 2004

var theHeight = 0;   // to be set before calling vcenter

function cht()
{   
    document.write("height=\"" + ctp() + "\" ");
}

function vcenter()
{   var cell = document.getElementById("padding");
    cell.setAttribute("height", ctp());
}

window.onresize=vcenter;

function ctp()
{ var top;
  var ht;
  if (window.innerHeight)
  {  ht = window.innerHeight-theHeight;  top = 2*((ht - ht%5)/5); }
  else if (document.body.clientHeight)
  {  ht = document.body.clientHeight-theHeight;  top = 2*((ht - ht%5)/5); } 
  else
  {  top = 50; }
  return top;
}
