
var browserName = navigator.appName;
var browserVer = parseInt(navigator.appVersion);
var msie4 = (browserName == "Microsoft Internet Explorer" && browserVer >= 4);
if ((browserName == "Netscape" && browserVer >= 3) || msie4 || browserName=="Konqueror" || browserName=="Opera") {version = "n3";} else {version = "n2";}

// Blurring links:
function blurLink(theObject)	{
	if (msie4) theObject.blur();
}

// if we have javascript support include dhtml menue
document.write('<script language="JavaScript" src="fileadmin/template/lib/brainjarmenu.js"></script>');


/* add mouseevents and effects for programm overview - so the page
 * is full accessable without javascript */
function addMouseEvents() {
  var a = null;
  var para = null;

  // add the mouseeffects to the menuebar
  execAddEvents(document.getElementById('menuBar').getElementsByTagName('a'));
  //execAddEvents(document.getElementById('menuHome').getElementsByTagName('a'));

}


function execAddEvents(aLinks) {
  for (var i=0; i< aLinks.length; i++)  {
      a = aLinks[i];
      if (a.id > '' && a.rev =='') {
        a.href='#';
        a.onclick = function(event) { var para = this.id.split('_'); return buttonClick(event,para[1]);  }
        a.onmouseover = function(event) { var para = this.id.split('_'); return buttonMouseover(event,para[1]); }
        if (msie4) a.onfocus = function() { this.blur() };
      }
  }
}



window.onload = addMouseEvents;
