// What browser are we in?
ns4 = ( document.layers ) ? true : false;
ie  = ( document.all ) ? true : false;
ns6 = ( ! document.all && document.getElementById ) ? true : false;


//
// Functions for mouse rollovers
//
function active( imgName ) 
{
   document [imgName].src = eval(imgName + "Over.src");
}

function inactive( imgName ) 
{
   document [imgName].src = eval(imgName + ".src");
}

//
// returns a random integer [1..max]
//
function random( max )
{
  var num = Math.floor(Math.random() * max);
  return num + 1;
}

//
// Hiding and showing text dynamically in a loaded page
//
lastShown = "";

function show( what )
{
   // a browser-specific reference to the layer we want to hide
   if      (ns4) layerLastShown = document.all.lastShown;
   else if (ns6) layerLastShown = document.getElementById( lastShown );
   else          layerLastShown = document.all[lastShown]; // if ie

   // a browser-specific reference to the layer we want to display
   if      (ns4) layerWhat = document.all.what;
   else if (ns6) layerWhat = document.getElementById( what );
   else          layerWhat = document.all[what]; // if ie

   if (lastShown != "")
   {
     layerLastShown.style.display = "none";  // hide the last one
   }
   
   layerWhat.style.display = "";  // make it visible
   lastShown = what;
   
   //document.location = "#" + what + "Anchor";  // jump to that part of the page

} // show

