// ### NAVIGATION ###

sfHover = function() {
	var sfEls = document.getElementById("nav2").getElementsByTagName("LI");
	for (var i=0; i<sfEls.length; i++) {
		sfEls[i].onmouseover=function() {
			this.className+=" sfhover";
		}
		sfEls[i].onmouseout=function() {
			this.className=this.className.replace(new RegExp(" sfhover\\b"), "");
		}
	}
}
if (window.attachEvent) window.attachEvent("onload", sfHover);

//show and hide layer at OnMouseOver/OnMouseOut 
function show(divName) {
  document.getElementById(divName).style.visibility='visible';
  document.getElementById(divName).style.zIndex=99; 
}

function hide(divName) {
  document.getElementById(divName).style.visibility='hidden';
  document.getElementById(divName).style.zIndex=0; 
} 

//hide active layer, show new layer
function set_layer(Name) {
   if (act_nav!="")  {
			   hide(act_nav+"Div");
		 }
   
   onload_hiding();
   
		 if (Name!="null")  {
		 	  show(Name+"Div");
      act_nav=Name;
   }
 }
		
function onload_layer(Name) {
    set_layer(Name);
		  nav_selection=Name;
    document.getElementById('hideBottom').style.visibility='hidden';
}

//show hiding layer
function onload_hiding() {
    document.getElementById('hideBottom').style.visibility='visible';
}

// neues Fenster für externe Links
function setExternalLinks() {

    if (!document.getElementsByTagName) {
        return null;
    }
    var anchors = document.getElementsByTagName("a");
    for (var i=0;i < anchors.length;i++) {
        var anchor = anchors[i];
        if (anchor.getAttribute("href") && (anchor.getAttribute("rel") == "external") ) {
            anchor.setAttribute("target", "blank");
        }
    }
}

// mit scrollbars
function sesam(ort,w,h) {
win=window.open(ort,'sesam','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=no,copyhistory=no,width='+w+',height='+h+',screenX=50,screenY=10,left=50,top=10');
}
