    
    
    function grpform(vars, divid, formname)
    {
      var count = document.eval(formname).part_ids.length;
      
      //alert (count);
      
      var url = "/core/httprequest.php?"+vars;
      
      for (i = 1; i < count; i++)
      {
	    if (document.eval(formname).part_ids[i].selected == true)
	    {
		var part_id = document.eval(formname).part_ids[i].value;
	        url += '&part_ids['+ i +']='+ part_id;
	    }
      }
      
      if (vars != "")
      {
          if(window.XMLHttpRequest)req=new XMLHttpRequest();
          else if(window.ActiveXObject)req=new ActiveXObject("Microsoft.XMLHTTP");
        
          if(req)
          {
            req.onreadystatechange = function()
            {
              
              if(req.readyState==4) // complete
              {
                if(req.status==200) // OK
                {
                  xmldoc=req.responseText;
                  if(xmldoc)
                  {
                    document.getElementById(divid).innerHTML = xmldoc;
                  }
                  //else document.getElementById(divid).innerHTML = "hier";
                }
                else alert("Fehler: "+req.status);
              }
              
            };
            
            req.open("GET",url,true);
            req.send(null);
          }
      }
      //else document.getElementById(divid).innerHTML = "hier";
    }
    
    function divaus(divname)
    {
    	if (document.getElementById) { 
        
        var len = document.getElementById(divname).length;
        
        var p = document.getElementById(divname).style;
        
              if (p.display == "block") p.display = "none";
              else p.display = "block";
    	}
    }
    
    function divnameaus(divname)
    {
      
    	if (document.getElementsByName) { 
        var len = document.getElementsByName(divname).length;
        
    		for(var i = 0; i < len; i++) {	
          
    			with (document.getElementsByName(divname)[i])
          {
              if (style.display == "none") style.display = "block";
              else style.display = "none";
    			}
    		}
    	}
    }
    
    function divan(divname)
    {
    	if (document.getElementById) { 
        
        var len = document.getElementById(divname).length;
        
        var p = document.getElementById(divname).style;
        
              if (p.display == "none") p.display = "block";
    	}
    }
    
    function anfuegen(formular, feld, data)
    {
        var mom = document.eval(formular).eval(feld).value;
        
        var separator = ",";
        if (mom == "") var separator = "";
        
        if(data != "") document.eval(formular).eval(feld).value = mom+separator+data;
    }
    
    function change_l(wo, sprache)
    {
        if (sprache != "")
        {
            if (sprache == 0)
            {
                location.href = wo+"&clean_lang=1";
            }
            else
            {
                location.href  = wo+"&_l="+sprache;
            }
        }
    }
    
    function opensuche(feldvalue, pfad)
    {
      if (feldvalue != "")
      {
          var url = pfad+"/httprequest.php?feldvalue="+feldvalue;
          
          if(window.XMLHttpRequest)req=new XMLHttpRequest();
          else if(window.ActiveXObject)req=new ActiveXObject("Microsoft.XMLHTTP");
        
          if(req)
          {
            req.onreadystatechange=callback;
            req.open("GET",url,true);
            req.send(null);
          }
      }
      else document.getElementById("suchtext").innerHTML = "";
    }
    
    function callback()
    {
      if(req.readyState==4) // complete
      {
        if(req.status==200) // OK
        {
          xmldoc=req.responseText;
          if(xmldoc)
          {
             document.getElementById("suchtext").innerHTML = xmldoc;
          }
        }
        else alert(req.status);
      }
    }

    function nachfragen(message,ziel)
    {
	    var is_confirmed = confirm(message);
	    if(is_confirmed == true){
		    location.href = ziel;
	    }
    }
    
    function navi_over(bild,quelle)
    {
        var b = eval(document.images[bild]);
        b.src = quelle;
    }
    
    
    function js_meldung (meldung)
    {
      var neu_m = meldung.replace("|","\n");
      neu_m = neu_m.replace("<br />","\n");
      neu_m = neu_m.replace("<br />","\n");
      alert (neu_m);
    }
  

