//set up layer call

var isIE, isNS, isNS6, isDOM, lR, sR, vis, invis, myTimeOut, goName;

if (document.all) {isIE= true;lR="document.all.";sR=".style";vis="visible";invis="hidden";}
if (document.layers){isNS = true;lR="document.layers.";sR="";vis="show";invis="hide";}
if (document.getElementById &&!isIE) {isDOM=true;lR = "document.getElementById('";sR = "').style";invis ="hidden";vis = "visible"}
if (isDOM == true && navigator.appName =="Netscape") isNS6 = true;

var oldwhich = 0;
var x=0;
var layerTimer;

//turn on layer 

function layOver(which)
{
x=0;
l = eval(lR + "l" + which + sR);
if (oldwhich != which)
{
  ol = eval(lR + "l" + oldwhich + sR);
  ol.visibility = invis;
}
l.visibility = vis;
oldwhich = which;
clearTimeout(layerTimer);
return;
}

//turn off layer  if user is completely off nav 

        function stopOver()
        {
                if (x<5) x++;
                else
                {
                ol = eval(lR + "l" + oldwhich + sR);
                ol.visibility = invis;
                x=0;
                }
        layerTimer = setTimeout("stopOver()",30)
        }
        

//reset the timer

        function startOver()
        {
        x=0
        clearTimeout(layerTimer);
        }

        





//netscape resize bug fix

function NSresize() {

  if (document.FIX.NSfix.initWindowWidth != window.innerWidth || document.FIX.NSfix.initWindowHeight != window.innerHeight) {

    document.location = document.location;

  }

}



function NSCheck() {

  if ((navigator.appName == 'Netscape') && (parseInt(navigator.appVersion) == 4)) {

    if (typeof document.FIX == 'undefined'){

      document.FIX = new Object;

    }

    if (typeof document.FIX.FIX_scaleFont == 'undefined') {

      document.FIX.NSfix = new Object;

      document.FIX.NSfix.initWindowWidth = window.innerWidth;

      document.FIX.NSfix.initWindowHeight = window.innerHeight;

    }

    window.onresize = NSresize;

  }

}

NSCheck()


//////////

function div_hide(itemname)
{
        tmp = document.getElementsByTagName('div');
        for (i=0;i<tmp.length;i++)
        {
                if (tmp[i].className == itemname) tmp[i].style.display = (tmp[i].style.display = 'none');
        }
}
function div_show(itemname)
{
        tmp = document.getElementsByTagName('div');
        for (i=0;i<tmp.length;i++)
        {
                if (tmp[i].className == itemname) tmp[i].style.display = (tmp[i].style.display = 'inline');
        }
}
