<!--//--><![CDATA[//><!--

    //Funktion zum Ein- und Ausblenden der Hauptmenueunterpunkte
    sfHover = function() {
        var sfEls = document.getElementById("open");	
    		sfEls.onmouseover=function() {
    			this.className+=" sfhover";
    		}
    		sfEls.onmouseout=function() {
    			this.className=this.className.replace(new RegExp(" sfhover\\b"), "");
    		}
    	var collection = sfEls.childNodes;
    	for(var e in collection) {
        e.onmouseover = function() {
          sfEls.className+=" sfhover";
        }
        e.onmouseout = function() {
          sfEls.className=sfEls.className.replace(new RegExp(" sfhover\\b"), "");
        }
      }
    }
    //if (window.attachEvent) window.attachEvent("onload", sfHover);

    //Funktion zum Ein- und Ausblenden des Mehr Informationen-Fensters von Flash
    var switch_videoextra;
    function videoextra(){
        function applyOpacity(val) {
          var ids = ['suchbox','aktuell', 'submenue'];
          for (var i = ids.length - 1; i > -1; i--) {
            var item = document.getElementById(ids[i]);
            if (!item) continue;
            item.style.filter = "alpha(opacity=" + Math.floor(val * 100) + ")";
            item.style.opacity = val;
            item.style.MozOpacity = val;
          };
        };
    
        if(switch_videoextra != "on"){
            document.getElementById("player_area1").style.width = "930px";
            applyOpacity(0.1);
            switch_videoextra = "on";
        } else{
            document.getElementById("player_area1").style.width = "550px";
            applyOpacity(1);
            switch_videoextra = "off";
        }
    }
    
    //Funktion zum Aufruf eines Extrafensters
    function fenster(page,width,height){
        //window.alert("Page: "+page+" Width: "+width+" Height: "+height);
        extrafenster = window.open(page,'extrafenster','location=no,menubar=no,resizable=yes,scrollbars=yes,status=no,toolbar=no,width='+ width +',height='+ height +',left=150,top=10');
        if(parseInt(navigator.appVersion)>2){
            extrafenster.focus();
        }        
    }
    
    //Funktionen zum Aus- und Einfahren der Metamenues
    var scriptSwitch = "0";
    var startTop = "-26";
    var endTop = "0";
   	
    function changeContent(){
        if(scriptSwitch == "1"){	
            window.setTimeout("SlideIn()", 5);
            scriptSwitch = "0";
        } else{
            window.setTimeout("SlideOut()", 5);
            scriptSwitch = "1";
        }
    }
    function SlideOut(){
        var currentTop = parseInt(document.getElementById('meta').style.top);
        if(currentTop >= endTop){
            document.getElementById('meta').style.top = endTop+"px";     	
        } else{
            nextTop = currentTop+5;
            document.getElementById('meta').style.top = nextTop+"px";
            window.setTimeout("SlideOut()", 5);
        }
    }
    function SlideIn(){
        var currentTop = parseInt(document.getElementById('meta').style.top);      	
        if(currentTop <= startTop){
            document.getElementById('meta').style.top = startTop+"px";
        } else{
            nextTop = currentTop-5;
            document.getElementById('meta').style.top = nextTop+"px";
            window.setTimeout("SlideIn()", 5);
        }
    }
    
    //Funktion zum Aus- und Einklappen der weiteren Informationen im Playertext
    function changeProjectData() {
      var project = document.getElementById("extrainfo");
      if (!project) return;
      var heading = project.getElementsByTagName('h2')[0];
      var body = project.getElementsByTagName('div')[0];
      if (heading.className == "on") {
        heading.className = "off";
        body.style.display= "none";
      } else {
        heading.className ="on";
        body.style.display = "";      
      }
    }
    if (window.addEventListener) {
      window.addEventListener('load', changeProjectData, false);
      window.addEventListener('unload', function() {
        window.removeEventListener('load', changeProjectData, false);
        window.removeEventListener('unload', arguments.callee, false);
      }, false);
    }
    else if (window.attachEvent) {
      window.attachEvent('onload', changeProjectData);
      window.attachEvent('onunload', function() {
        window.detachEvent('onload', changeProjectData);
        window.detachEvent('onunload', arguments.callee);
      });
    }
    
    //Akkordeon
    $(document).ready(function() {
    
    var accordion = $("#suchbox");
    accordion.accordion({
      autoHeight: false,
      clearStyle: true,
      collapsible: true,
      navigation : true
    });
    accordion.bind('accordionchange', function(event, ui) {
      if (ui.newHeader[0]) ui.newHeader[0].style.margin = "1px 0 1px";
      if (ui.oldHeader[0]) ui.oldHeader[0].style.margin = "1px 0 1px";
    });
  });
//--><!]]>
