execJS = function (node) {
    /* Element auf Javascript überprüfen, und falls nötig ausführen */
    var bSaf = (navigator.userAgent.indexOf('Safari') != -1);
    var bOpera = (navigator.userAgent.indexOf('Opera') != -1);
    var bMoz = (navigator.appName == 'Netscape');
    var st = node.getElementsByTagName('script');
    var strExec;

    for(var i=0;i<st.length; i++) {
      if (bSaf) {
        strExec = st[i].innerHTML;
      } else if (bOpera) {
        strExec = st[i].text;
      } else if (bMoz) {
        strExec = st[i].textContent;
      } else {
        strExec = st[i].text;
      }
      try {
        eval(strExec);
      }
      catch(e) {
        alert(e);
        alert(strExec);
      }
    }
  }

  function loadsection(sectionmodul, target, param) {
    //if(target == "") target = false;
    var tar = $(target);
		var opt = {
		    // Use GET
		    method: 'get',
		    // Handle successful response
		    onSuccess: function(t) {
            if(tar == null) {
            // dummy
            
            } else {
            
  		        tar.innerHTML = t.responseText;
  		        execJS(tar);
		        }
		    },
		    // Handle 404
		    on404: function(t) {
		        alert('Error 404.');
		    },
		    // Handle other errors
		    onFailure: function(t) {
		        alert('Error ' + t.status + ' -- ' + t.statusText);
		    }
		}
    if(document.location.protocol == "https:") {
      new Ajax.Request(document.location.protocol+'//'+document.location.hostname+'/telgesparts.de/ajax.php?section='+sectionmodul+'&'+param, opt);
    } else {
		  new Ajax.Request(document.location.protocol+'//'+document.location.hostname+'/ajax.php?section='+sectionmodul+'&'+param, opt);
		}
  }

  function cat_check_next(ebene) {
    loadsection("all", "ebene_" + ebene + "_load", "cID=" + $("ebene_"+ebene).value + "&ebene=" + ebene)
  }

