// JavaScript Document

  function toggleLayer(whichLayer, whichState) {
    if (document.getElementById)
    {
      // this is the way the standards work
      var style1 = document.getElementById(whichLayer);
    }
    else if (document.all)
    {
      // this is the way old msie versions work
      var style1 = document.all[whichLayer];
    }
    else if (document.layers)
    {
      // this is the way nn4 works
      var style1 = document.layers[whichLayer];
    }
    
    style1.style.display = whichState=="block" ? "none" : "block";

  }
  
  function layerSwap(whichLayer, whichSymbol) {
    if (document.getElementById)
    {
      // this is the way the standards work
      var style1 = document.getElementById(whichLayer);
      var style2 = document.getElementById(whichSymbol);
    }
    else if (document.all)
    {
      // this is the way old msie versions work
      var style1 = document.all[whichLayer];
      var style2 = document.all[whichSymbol];
    }
    else if (document.layers)
    {
      // this is the way nn4 works
      var style1 = document.layers[whichLayer];
      var style2 = document.layers[whichSymbol];
    }
    
    style1.style.display = style1.style.display ? "" : "block";
    style2.innerHTML = (style2.innerHTML == "+") ? "-" : "+";

  }

	var l = false;
	var prefix = 'text';
	function setvis(id,vis) {
		setvis2(id,vis);
		if(prefix) setvis2(prefix+id,vis);
	}
	function setvis2(id,vis) {
		var o;
		if(o = document.getElementById(id)) {
			o.style.visibility = vis;
		}
	}
	function ukaz(id) {
		if(l != id) {
			if(l) {
				setvis(l,'hidden');
			}
			setvis(id,'visible');
			l = id;
		}
	}
	function skryj(id) {
		setvis(id,'hidden');
		if(l == id) {
			l = false;
		}
	}

