function initDocument()
{
  eow = document.getElementById('endOfWindow');
  if (eow.y)
    wh = eow.y - 8;
  else if (eow.offsetTop)
    wh = eow.offsetTop - 8;
  else
    return;
  
  eop = document.getElementById('endOfPage');
  cs = document.getElementById('contentSpacer');
  if (eop.y)
  {
    dh = eop.y;
  	if (dh < wh) cs.height = cs.height + wh - dh;
  }
  else if (eop.offsetTop)
  {
    dh = eop.offsetTop;
  	if (dh < wh) cs.height = cs.height  + wh - dh;
  }
}

function initPopUp()
{
  eop = document.getElementById('endOfPage');
  eow = document.getElementById('endOfWindow');

  if (eop.y)
  {
	if (eop.y > eow.y) window.resizeBy(0, eop.y - eow.y);
  }
  else if (eop.offsetTop)
  {
    if (eop.offsetTop > eow.offsetTop) window.resizeBy(0, eop.offsetTop - eow.offsetTop);
  }
}

function showPopUp(theURL)
{
  wnd = window.open(theURL, "PopUp", "width=400,height=32,resizable=1");
  wnd.focus();
  return false;
}

