window.defaultStatus="Landschulheim Grovesmühle";

function chkJsOK(html_id)
  {  
  if(document.getElementById(html_id)) {
  	document.getElementById(html_id).style.display = "none";
  }
}
/*/////////////////////////////////////////////////////////
////////////////////////////////////////////////////////*/
/* currentStyle restricts the Javascript to IE only */
activateMenu = function (nav) {
    /* currentStyle restricts the Javascript to IE only */
	if (document.all && document.getElementById(nav).currentStyle) {  
        var navroot = document.getElementById(nav);
        /* Get all the list items within the menu */
        var lis=navroot.getElementsByTagName("LI");
				
        for (i=0; i<lis.length; i++) {     
           /* If the LI has another menu level */
            if(lis[i].lastChild.tagName=="UL"){
                 
                /* assign the function to the LI */
             	lis[i].onmouseover=function() {
                   /* display the inner menu */
                   this.lastChild.style.display="block";
                }
                lis[i].onmouseout=function() {
                   this.lastChild.style.display="none";
                }
            }
        }
    }
}
  // this function is need to work around 
  // a bug in IE related to element attributes
  function hasClass(obj) {
     var result = false;
     if (obj.getAttributeNode("class") != null) {
         result = obj.getAttributeNode("class").value;
     }
     return result;
  }  
function getElementbyClass(classname){
var partscollect;
var inc=0
var alltags=document.all? document.all :
document.getElementsByTagName("*")
for (i=0; i<alltags.length; i++){
if (alltags[i].className==classname)
partscollect=alltags[i]
}
}
/*////////////////////////////////////////////////////*/
var bgColor_obj = new Array("#EB7800","#B4BE0A","#3C6E37","#1C6E73","#188AA5","#5AAED1");
function switchColor(nav){
var navroot = document.getElementById(nav);
var lis=navroot.getElementsByTagName("LI");
  for (i=0; i<lis.length; i++) {
    act_obj = lis[i].className;
    //alert(act_obj);
    if(act_obj=="act"){
      lis[i].style.backgroundColor=bgColor_obj[i];
    }else{
      lis[i].style.backgroundColor="#e5e5e5";
    }
    
    lis[i].bgcolor = bgColor_obj[i];
    lis[i].onmouseover=function(i) {
         this.style.backgroundColor=this.bgcolor ;
         this.firstChild.style.color = "#ffffff";
    }
     lis[i].onmouseout=function() {
         if(this.className!="act"){
          this.style.backgroundColor="#e5e5e5";
          this.firstChild.style.color = "#696969";
         }
     }
  }
}
window.onload = function() {
	activateMenu ('main_navigation');
	switchColor('main_navigation');
}
/*/////////////////////////////////////////////////////////
////////////////////////////////////////////////////////*/
  // JS function for uncrypting spam-protected emails:
function UnCryptMailto(s) {     //
        var n=0;
        var r="";
        for(var i=0; i < s.length; i++) {
                n=s.charCodeAt(i);
                if (n>=8364) {n = 128;}
                if (n==44) {n = 60;}
                r += String.fromCharCode(n-(2));
        }
        return r;
}
  // JS function for uncrypting spam-protected emails:
function linkTo_UnCryptMailto(s)        {       //
        location.href=UnCryptMailto(s);
}

/*/////////////////////////////////////////////////////////
////////////////////////////////////////////////////////*/
/*function addLoadEvent(func) {
  var oldonload = window.onload;
  if (typeof window.onload != 'function') {
    window.onload = func;
  } else {
    window.onload = function() {
      oldonload();
      func;
    }
  }
}*/

function addLoadEvent(func) {
 var oldonload = window.onload;
 if (typeof window.onload != 'function') {
  window.onload = func;
 } else {
  window.onload = function() {
  oldonload();
  func();
 }
 }
}

function unLoadEvent(func) {
  var oldonunload = window.onunload;
  if (typeof window.onunload != 'function') {
    window.onunload = func;
  } else {
    window.onunload = function() {
      oldonunload();
      func();
    }
  }
}