// javacsript library zzln_togglelayers
//  made by Zeezeilen www.zzln.nl
//  written bij Egbert Bleyenburg

var ns = (navigator.appName == "Netscape");

function ZZLN_makeAllLayersObject(){
  if (!document.all && !document.layers) return false;
  //maak het allLayers object
  if (!document.allLayers) {
    document.allLayers = new Array();
  }
  with (document){
    if (ns) {//NETSCAPE
      for (i=0; i<layers.length; i++){
		        allLayers[i]=layers[i];
      }
      for (i=0; i<allLayers.length; i++){
        if (allLayers[i].document && allLayers[i].document.layers){
          with (allLayers[i].document){
            for (j=0; j<layers.length; j++) {
              allLayers[allLayers.length]=layers[j];
            }
          }
        }
      }
    }
    else {//EXPLORER
      for (i=0;i<all.length;i++){
        if (all[i].style&&all[i].style.position){
          allLayers[allLayers.length]=all[i];
        }
      }
    }
  }


}


function ZZLN_showLayer(layername){
  var i;
  var v;
  for (i=0;i<document.allLayers.length;i++){
    if (document.allLayers[i].id==layername) {
      v='VISIBLE';
    }
    else {
      v='HIDDEN'
    }
    if (document.allLayers[i].style) { document.allLayers[i].style.visibility=v }else{ document.allLayers[i].visibility=v }
  }
}
