window.onresize = makeElementsStick;

function makeElementsStick()
{
  document.all.maintable.style.height = document.body.clientHeight - (document.all.leftheadercell.clientHeight + document.all.topmenurow.clientHeight);
/*  var MinLHeadW = 364;
  var MinLMenuW = 600;
  var MinLMenuHolderW = 135;
  var MinPFootH = 32;
  var NewPFootH;

  document.all.leftmenucell.style.visibility = "visible";

  //if (document.all.leftheadercell.style.width < MinLHeadW)
  //{
  //  document.all.leftheadercell.style.width = MinLHeadW;
  //}
  
  if (document.all.leftmenucell.style.width < MinLMenuW)
  {
    document.all.leftmenucell.style.width = MinLMenuW;
  }
  
  //if (document.all.leftMenuHolder.style.width < MinLMenuHolderW)
  //{
  //  document.all.leftMenuHolder.style.width = MinLMenuHolderW;
  //}  
  
  document.all.mainbodycell.style.width = Math.max(document.body.clientWidth - document.all.leftmenucell.clientWidth, 10);
  document.all.mainbodycell.style.left = document.all.leftMenuHolder.clientWidth;

  NewPFootH = document.body.clientHeight - document.all.leftheadercell.clientHeight - document.all.mainbodycell.clientHeight - document.all.topmenurow.clientHeight;

  document.all.topmenurow.style.top = document.all.leftheadercell.clientHeight;
  document.all.leftmenucell.style.top = document.all.topmenurow.clientHeight + document.all.leftheadercell.clientHeight;
  document.all.mainbodycell.style.top = document.all.leftmenucell.style.top;
  
  document.all.rightheadercell.style.left = document.all.leftMenuHolder.style.width;
  document.all.leftheadercell.style.width = document.all.rightheadercell.style.left.substring(0, document.all.rightheadercell.style.left.length - 2);
  
  document.all.pagefooter.style.top = -(NewPFootH - document.body.clientHeight);
  
  if (NewPFootH < MinPFootH)
  {
    document.all.pagefooter.style.height = MinPFootH;
  }
  else
  {
    document.all.pagefooter.style.height = NewPFootH;
  }
  document.all.leftmenucell.style.visibility = "hidden";
  document.all.leftMenuHolder.style.visibility = "visible";
  
  document.all.pagefooter.style.width = 590;
  document.all.pagefooter.style.left = document.all.leftMenuHolder.style.width;
  */
}

function loadFooter(){
  if (navigator.userAgent.indexOf("Netscape") != -1)
  {
    if (navigator.plugins["Shockwave Flash"] || navigator.plugins["Shockwave Flash 2.0"]){
      document.all.dropdata.innerHTML += "Website created by:";
      document.all.dropdata.innerHTML += "<br>";
      document.all.dropdata.innerHTML += "<embed src='images/signature.swf' quality=high bgcolor=#FFFFFF loop=true width=125px height=32px type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash'>";
      document.all.dropdata.innerHTML += "</embed>";
    }
    else {
      document.all.dropdata.innerHTML += "Website created by:";
      document.all.dropdata.innerHTML += "<br>Ian MacDonald";
    }
  }
}

function printerFriendly(Page)
{
  window.open("inc/printerFriendly.asp?page=" + Page);
}