var n4 = (document.layers);
var n6 = (document.getElementById && !document.all);
var ie = (document.all);
var ie5 = (ie && navigator.appVersion.slice(21,23) == 5);
var mac = (navigator.platform == "MacPPC");
var pc = (navigator.platform == "Win32");
var xLay = (n4) ? document.layers : document.all;

function onImg(layName, imgName, overImg) {
   if(layName) {
                 if (overImg==0) {
                   document.getElementById(imgName).style.backgroundColor="#ffffff";
                 } else {
                   document.getElementById(imgName).style.backgroundColor="";
                 };
   }
}

var lTimer;
var arrAllSubnavis = new Array(); 

function showLayer() {
   if (arrAllSubnavis) hideLayer();
   if (showLayer.arguments) {
      arrAllSubnavis = showLayer.arguments;
      for (i = 0; i < showLayer.arguments.length; i++) {
         var temp = showLayer.arguments[i];
         if (n4) document.layers[temp].visibility = "visible";
         if (ie && document.all[temp]) document.all[temp].style.visibility = "visible";
         if (n6) document.getElementById(temp).style.visibility = "visible";
      }
   }
}

function hideLayer() {
   for (i = 0; i < arrAllSubnavis.length; i++) {
      var temp = arrAllSubnavis[i];
      if (n4) document.layers[temp].visibility = "hidden";
      if (ie) document.all[temp].style.visibility = "hidden";
      if (n6) document.getElementById(temp).style.visibility = "hidden";
   }
   arrAllSubnavis.length = 0;
   return;
}

function hideAll() {
   for (i = 0; i < arrAllSubnavis.length; i++) {
      if (n4) document.layers[arrAllSubnavis[i]].visibility = "hidden";
      if (ie) document.all[arrAllSubnavis[i]].style.visibility = "hidden";
      if (n6) document.getElementById(arrAllSubnavis[i]).style.visibility = "hidden";
   }
   arrAllSubnavis.length = 0;
   showLayer(); 
}

function startLayerTimer() {
   lTimer = setTimeout("hideAll()", 400);
}

function stopLayerTimer() {
   clearTimeout(lTimer);
}

function goTo(url) {
   window.location.href = url;
}