// General.js 04/30/2002

//This Script is Copyright 2002 by TA Schollmeyer All Rights Reserved

/* detect objects */
  (document.layers) ? layerobject=true : layerobject=false;
  (document.all) ? allobject = true: allobject = false;
  (document.getElementById) ? dom = true : dom = false;

/* detect browsers */
  opera=navigator.userAgent.toLowerCase().indexOf('opera')!=-1;
  cssRollCapable = (allobject || layerobject || dom) ? 1 : 0;
  var BodyHeight = 0

function LastPageUpdate() {
  var date = document.lastModified;
  var s = date.split(":");
  var t = s[0] + ":" + s[1]; 
  document.write("Last Update: " + t + "<br>")
}

function ShowDiv(Name,state) {
  if ((!cssRollCapable) || (opera)) return;
  var objnam = document.getElementById(Name);
  if (state) 
    objnam.style.visibility="visible";
  else
    objnam.style.visibility="hidden";
}


function SideResize() {BottomResize()}  // *** Delete later *** //

function BottomResize() {
  if ((!cssRollCapable) || (opera)) return;

  var sh     = document.body.scrollHeight;
  var side   = document.getElementById("SideBar");
  var bottom = document.getElementById("BottomBarOne");
  if (BodyHeight == 0) 
    {BodyHeight = sh - bottom.clientHeight;
     side.height = BodyHeight;}
  var NewHeight = sh - bottom.clientHeight;
  
  if (BodyHeight > NewHeight ) side.height = NewHeight 
  
  var sw = side.clientWidth;
  bottom.width = sw;
  var w = document.body.scrollWidth
  var bottom = document.getElementById("BottomBarTwo");
  bottom.width = w - sw
}


function BottomResize() {
  if ((!cssRollCapable) || (opera)) return;
  if (BodyHeight==0) BodyHeight = document.body.scrollHeight
  var side = document.getElementById("SideBar");
  var bottom = document.getElementById("BottomBarOne");
  if(bottom==null)return; 
  side.height = BodyHeight - bottom.clientHeight;
  var bottom = document.getElementById("BottomBarOne");
  var sw = side.clientWidth;
  bottom.width = sw;
  var w = document.body.scrollWidth
  var bottom = document.getElementById("BottomBarTwo");
  bottom.width = w - sw
}


//This script Copyright 1998 by Joe Burns, Ph.D.

function DateInBar(name) {
  var date = new Date(); 
  var m = date.getMonth() + 1; 
  var d = date.getDate(); 
  var y = date.getYear(); 
  var h = date.getHours();
  var mn = date.getMinutes();
  var sc = date.getSeconds();
  var t = m + '/' + d + '/' + y + ' at ' + h + ':' + mn + ':' + sc + ' '; 
  defaultStatus = "You arrived at " + name + " on " + t + ".";
}

