    var ajax = false;
    if (window.XMLHttpRequest) ajax = new XMLHttpRequest;
    else if (window.ActiveXObject) ajax = new ActiveXObject('Microsoft.XMLHTTP');
    function ajax_get(url){
      var retvar;
      ajax.open('GET', url);
      ajax.onreadystatechange = function(){
        if(ajax.readyState == 4) retvar = ajax.responseText;
      }
      ajax.send(null);
  
      return retvar;
    }
    
    function starteditgal(obj, name){
      var input = document.createElement("input");
      input.type = "text";
      input.name = name;
      input.value = obj.firstChild.nodeValue;
      input.onblur = new Function("stopeditgal(this.parentNode)");
      obj.onclick = null;
      obj.replaceChild(input, obj.firstChild);
      input.focus();
    }
  
    function stopeditgal(obj){
      var text = document.createTextNode(obj.firstChild.value);
      if(text == '') return;
      ajax_get('/?noncache=true&change=galtitel&value='+obj.firstChild.value);
      obj.onclick = new Function("starteditgal(this, '"+obj.firstChild.name+"')");
      obj.replaceChild(text, obj.firstChild);
    }
    
    //////////
    
    function starteditpic(obj, name, datei){
      var input = document.createElement("input");
      input.type = "text";
      input.name = name;
      input.value = obj.firstChild.nodeValue;
      datei = datei.substring(1, datei.length);
      input.onblur = new Function("stopeditpic(this.parentNode, '"+datei+"')");
      obj.onclick = null;
      obj.replaceChild(input, obj.firstChild);
      input.focus();
    }
  
    function stopeditpic(obj, datei){
      var text = document.createTextNode(obj.firstChild.value);
      if(text == '') return;
      ajax_get('/'+datei+'.html?noncache=true&change='+obj.firstChild.name+'&value='+obj.firstChild.value);
      obj.onclick = new Function("starteditpic(this, '"+obj.firstChild.name+"')");
      obj.replaceChild(text, obj.firstChild);
    }