  /* GLOBALS */
  // Stores layers' names:
var layers = new Array(
                 "athletic", "academic", "centers", "dorms", "general",
                 "utility", "buses", "construct", "inner", "outer", "gold", 
                 "other", "purple", "visitor", "white" );

  // used to determine state of All layers On/Off (we want all layers on or
  // off all at once; each layer's state won't help us with this.
var togALL = false;

function showMe(statString) {  self.status = statString;  }

function init() {
  // IE renders DIV layers as defined: "hidden" but, at same time does
  // not set the layer's visibility to hidden. Initially the empty string.
  if (document.all){ 
    for (var i = 0; i < layers.length; i++) {
      eval ( "document." + layers[i] + ".style.visibility = \"hidden\"");
    }
  }

}  // END init().

function togLayer(divLayer){
    //Render image code for IE 4+
if (document.all){
  if (divLayer.style.visibility=="hidden"){
    divLayer.style.visibility="visible";     return false;
  }
  else {  divLayer.style.visibility="hidden";  return false;  }
}
    //Render image code for NS 4
else if (document.layers){
  if (divLayer.visibility=="hide"){
    divLayer.left=document.images["base"].x;
    divLayer.top=document.images["base"].y;
    divLayer.visibility="show";
    return false;
  }
  else {  divLayer.visibility="hide";  return false  }
}
  
else  {  return true  }  //NOT IE 4+ or NS 4, display image.

}

function togRange(beginRange, endRange){

if ( typeof(beginRange) == 'undefined' ) {  thisBegin = 0;                  }
else                                     {  thisBegin = beginRange;         }
if ( typeof(endRange)   == 'undefined' ) {  thisEnd   = layers.length -1 ;  }
else                                     {  thisEnd   = endRange;           }

    //Render image code for IE 4+
if (document.all){
  if (togALL){
    for (var i = thisBegin; i <= thisEnd; i++) {
      eval ( "document." + layers[i] + ".style.visibility = \"hidden\"");
    }
    togALL = false;
  }
  else {
    for (var i = thisBegin; i <= thisEnd; i++) {
      eval ( "document." + layers[i] + ".style.visibility = \"visible\"");
    }
    togALL = true;
  }
  return false;
}
    //Render image code for NS 4
else if (document.layers){
  if (togALL){
    for (var i = thisBegin; i <= thisEnd; i++) {
      var thisLayer = eval ( "document.layers." + layers[i] );
      thisLayer.left= document.images["base"].x;
      thisLayer.top=  document.images["base"].y;
      thisLayer.visibility = "hide";
    }
    togALL = false;
  }
  else {
    for (var i = thisBegin; i <= thisEnd; i++) {
      var thisLayer = eval ( "document.layers." + layers[i] );
      thisLayer.left= document.images["base"].x;
      thisLayer.top=  document.images["base"].y;
      thisLayer.visibility = "show";

    }
    togALL = true;
  }
  return false;
}

else  {  return true  }  //NOT IE 4+ or NS 4, follow HREF.

}  // END togAll().
