function setHideNav(idname)
{
	//document.getElementById(idname).style.display  = "none";
	switchDiv(idname,false);
}
function setShowNav(idname)
{
	//document.getElementById(idname).style.display  = "block";
	switchDiv(idname,true); 
}

function swapInPNI(idname)
{
	document.getElementById(idname).style.backgroundPosition  =  "0px -36px";
}
function swapOutPNI(idname)
{
	document.getElementById(idname).style.backgroundPosition  =  "0px 0px";
}


function swapInTab(idname, daImage)
{
	document.getElementById(idname).style.backgroundImage  =  daImage;
}
function swapOutTab(idname, daImage)
{
	document.getElementById(idname).style.backgroundImage  =  daImage;
}


function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
	document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);


//=======================================================
    //detect browser settings for showing and hiding DIVs
    isNS4 = (document.layers) ? true : false;
    isIE4 = (document.all && !document.getElementById) ? true : false;
    isIE5 = (document.all && document.getElementById) ? true : false;
    isNS6 = (!document.all && document.getElementById) ? true : false;
//=======================================================

function switchDiv(strDivName,bolVisible){
//identify the element based on browser type
if (isNS4) {
  objElement = document.layers[strDivName];
} else if (isIE4) {
  objElement = document.all[strDivName].style;
} else if (isIE5 || isNS6) {
  objElement = document.getElementById(strDivName).style;
}

 if(isNS4){
     if(!bolVisible) {
      objElement.visibility ="hidden"
    } else {
      objElement.visibility ="visible"
    }    
 }else if(isIE4){
    if(!bolVisible) {
      objElement.visibility = "hidden";
    } else {
      objElement.visibility = "visible";
    }
} else if (isIE5 || isNS6) {
     if(!bolVisible){
        objElement.display = "none";
     } else {
       objElement.display = "block";
       }
     }
}
/**********************************************
      // Reload the window if NS4 is resized  \\
      \\ Added By Jay Solomon 10/23/2003            //
      // If the browser is NS4 and it gets      \\
      \\ resized, this will reload the page.      //
 **********************************************/
var oWidth, oHeight;
if (isNS4) {
      oWidth = window.innerWidth; oHeight = window.innerHeight;
      window.onresize = function() {
      if (window.innerWidth != oWidth || window.innerHeight != oHeight)
            location.reload();
      }
}
