
/* ----- bk.js ----- */
// script.js - fÃ¼gt an alle Links einer Seite, die das Attribut class="popup"
// haben ein weiteres Attribut "popup" an, welches dafür sorgt, dass sich der
// link in einem neuen Fenster öffnet.

window.onload = function() {
    setInteractive();
}

var setInteractive = function() {
    links = document.getElementsByTagName("a");
    
    /* Internet Explorer bestimmen */
    var isIe/*@cc_on = true@*/;
    
    if (isIe) {
        for (var i=0, l=links.length; i<l; i++) {
            if (links[i].className &&
                links[i].className == "popup") {
                    links[i].onclick = function() { link_popup(this); return false; };
            }
        }
    } else {   
        for (var i=0, l=links.length; i<l; i++) {
            if (links[i].getAttribute("class") &&
                links[i].getAttributeNode("class").nodeValue == "popup") {
                    links[i].setAttribute("onclick", "link_popup(this); return false;");
            }
        }
    }
}

var newWindow = null;

function closeWin(){
    if (newWindow != null){
        if(!newWindow.closed) {
        newWindow.close();
        }
    }
}

// accessible pop-ups. see: http://www.alistapart.com/articles/popuplinks
function link_popup(src) {
  var _POPUP_FEATURES = '\
        directories=no, \
        height=600,     \
        width=650,      \
        left=200,       \
        top=50,         \
        toolbar=no,     \
        scrollbars=yes, \
        resizable=yes,  \
        location=yes,    \
        status=no,      \
        menubar=no';
  closeWin();
  var theWindow = window.open(src.getAttribute('href'), '_blank', _POPUP_FEATURES);
  theWindow.focus();
  return theWindow;
}


function img_popup(url){
    var _IMG_FEATURES = '\
        directories=no, \
        height=600,     \
        width=750,      \
        left=200,       \
        top=50,         \
        toolbar=no,     \
        scrollbars=no,  \
        resizable=yes,  \
        location=no,    \
        status=no,      \
        menubar=no';
    closeWin();
    newWindow = window.open(url, '_blank', _IMG_FEATURES);
    newWindow.focus();
}

// fly out navigation

var prevobj="nuller";
var obj = 0;
    function showLayer(obj){
        if(document.getElementById){
            //alert(document.getElementById(prevobj).style.visibility);
            document.getElementById(prevobj).style.visibility= "hidden";
            document.getElementById(obj).style.visibility= "visible";
        }
    
        if(document.all){
            document.all[prevobj].style.visibility= "hidden";
            document.all[obj].style.visibility= "visible";
        }
    
        if(document.layers){
            //alert(document.layers[prevobj].visibility);
            document.layers[prevobj].visibility= "hidden";
            document.layers[obj].visibility= "visible";
        }
    
    prevobj=obj;
    hideEbene(obj);
    }

    function hideLayer(obj){
        if(document.getElementById){
            document.getElementById(obj).style.visibility= "hidden";
        }

        if(document.layers){
            document.layers[obj].visibility= "hidden";
        }
    }
    
    function hideEbene(obj){
        var speed = 100;
        obj2 = obj;
        i = setTimeout("hideLayer(obj2);",20000);
    }
