  //--- Browser ----------------------------------------------------------------
  var ns4 = (document.layers) ? 1 : 0;
  var ie4 = (document.all) ? 1 : 0;
  var ns6 = (document.getElementById&&!document.all) ? 1 : 0;
  var mac = (navigator.userAgent.toLowerCase().indexOf("mac") != -1) ? 1 : 0;
  var op6 = (navigator.userAgent.toLowerCase().indexOf("opera") != -1) ? 1 : 0;

  //--- Drucken ----------------------------------------------------------------
  function druckversion(page)
  {
     win = window.open(page, "druckversion", "width=680,height=600,resizable=yes,menubar=yes,scrollbars=yes");
     win.moveTo(10,10);
     win.focus();
  }

  //--- Mouseover --------------------------------------------------------------
  var image_cache = new Array();
  function change_picture(image, source)
  {
    if(!image_cache[source])
    {
      image_cache[source] = new Image();
      image_cache[source].src = source;
    }
    if(document.images[image])
    {
      document.images[image].src = image_cache[source].src;
    }
  }

  //--- Navigation -------------------------------------------------------------
  var subnavobject = null;
  var subnavtimer  = null;

  function show_subnav(obj)
  {
    window.clearTimeout(this.subnavtimer);
    if(this.subnavobject != null && this.subnavobject != obj)
    {
      hide_subnav(this.subnavobject, 0);
      this.subnavobject = null;
    }

    if((x=findLayer(obj+'pos'))!=null) posObj = getAnchorPosition(obj+'pos');
    else return;

    if(obj==null) return;
    if((sobj = findLayer(obj)) == null) return;

    if(obj!=null)
    {
      this.subnavobject = obj;
      if(ie4||ns6||op6){
        sobj.style.left = posObj.x + ((ie4||op6) ? -4 : 0);
        sobj.style.top = posObj.y + ((op6) ? 2 : ((ie4) ? 0 : -10));
        sobj.style.visibility = 'visible';
      }
      else if(ns4){
        sobj.left = posObj.x + 0;
        sobj.top = posObj.y + -10;
        sobj.visibility = 'show';
      }
      // document.getElementById(obj).style.visibility = 'visible';
    }
  }
  function hide_subnav(obj, timeout)
  {
    if(obj==null) return;
    if((hobj = findLayer(obj)) == null) return;

    timeout = ((timeout + 0) >= 0) ? timeout : 500;
    if(timeout)
    {
      if(ie4||ns6) this.subnavtimer = window.setTimeout("hobj.style.visibility = 'hidden'", timeout);
      else if(ns4) this.subnavtimer = window.setTimeout("hobj.visibility = 'hide'", timeout);
    }
    else
    {
      if(ie4||ns6) hobj.style.visibility = 'hidden';
      else if(ns4) hobj.visibility = 'hide';
    }
    // this.subnavtimer = window.setTimeout("document.getElementById('"+obj+"').style.visibility = 'hidden'", timeout);
  }

  //--- Help functions ---------------------------------------------------------

  function findLayer(n, d){
    var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
    if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
    for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=findLayer(n,d.layers[i].document);
    if(!x && document.getElementById) x=document.getElementById(n); return x;
  }

  function getAnchorPosition(anchorname) {
	 // This function will return an Object with x and y properties
	 var useWindow=false;
	 var coordinates=new Object();
	 var x=0,y=0;
	 // Browser capability sniffing
 	 var use_gebi=false, use_css=false, use_layers=false;
	 if (document.getElementById) { use_gebi=true; }
	 else if (document.all) { use_css=true; }
	 else if (document.layers) { use_layers=true; }
	 // Logic to find position
 	 if (use_gebi && document.all) {
	   x=AnchorPosition_getPageOffsetLeft(document.all[anchorname]);
	   y=AnchorPosition_getPageOffsetTop(document.all[anchorname]);
    }
	 else if (use_gebi) {
	   var o=document.getElementById(anchorname);
	   x=AnchorPosition_getPageOffsetLeft(o);
	   y=AnchorPosition_getPageOffsetTop(o);
    }
 	 else if (use_css) {
	   x=AnchorPosition_getPageOffsetLeft(document.all[anchorname]);
	   y=AnchorPosition_getPageOffsetTop(document.all[anchorname]);
    }
	 else if (use_layers) {
	   var found=0;
	   for (var i=0; i<document.anchors.length; i++) {
	     if (document.anchors[i].name==anchorname) { found=1; break; }
	   }
	   if (found==0) {
	     coordinates.x=0; coordinates.y=0; return coordinates;
      }
		x=document.anchors[i].x;
		y=document.anchors[i].y;
    }
	 else {
      coordinates.x=0; coordinates.y=0; return coordinates;
    }
	 coordinates.x=x;
	 coordinates.y=y;
	 return coordinates;
  }

  function getAnchorWindowPosition(anchorname) {
	 var coordinates=getAnchorPosition(anchorname);
	 var x=0;
	 var y=0;
	 if (document.getElementById) {
      if (isNaN(window.screenX)) {
		  x=coordinates.x-document.body.scrollLeft+window.screenLeft;
		  y=coordinates.y-document.body.scrollTop+window.screenTop;
      }
		else {
		  x=coordinates.x+window.screenX+(window.outerWidth-window.innerWidth)-window.pageXOffset;
		  y=coordinates.y+window.screenY+(window.outerHeight-24-window.innerHeight)-window.pageYOffset;
		}
    }
	 else if (document.all) {
		x=coordinates.x-document.body.scrollLeft+window.screenLeft;
		y=coordinates.y-document.body.scrollTop+window.screenTop;
    }
	 else if (document.layers) {
		x=coordinates.x+window.screenX+(window.outerWidth-window.innerWidth)-window.pageXOffset;
		y=coordinates.y+window.screenY+(window.outerHeight-24-window.innerHeight)-window.pageYOffset;
    }
	 coordinates.x=x;
	 coordinates.y=y;
	 return coordinates;
  }

  function AnchorPosition_getPageOffsetLeft (el) {
	 var ol=el.offsetLeft;
    while ((el=el.offsetParent) != null) { ol += el.offsetLeft; }
	 return ol;
  }

  function AnchorPosition_getWindowOffsetLeft (el) {
	 return AnchorPosition_getPageOffsetLeft(el)-document.body.scrollLeft;
  }

  function AnchorPosition_getPageOffsetTop (el) {
	 var ot=el.offsetTop;
	 while((el=el.offsetParent) != null) { ot += el.offsetTop; }
	 return ot;
  }

  function AnchorPosition_getWindowOffsetTop (el) {
	 return AnchorPosition_getPageOffsetTop(el)-document.body.scrollTop;
  }