function NeuerKunde()
  {
    var x= (screen.width-520)/2;
      var y= (screen.height-350)/2;
     openstring="width=500,height=450,left="+ x +",top="+ y ;
       NeuKundeFenster = window.open("../NeukundeAGBs/NeukundeAufnehmen.php","Neukunde",openstring);
 }

function DetailsZeigen()
   {
    var breite=790;
          var hoehe=660;
        var x= screen.width/2-breite/2+5;
    var y= 20
    openstring="width="+breite+",height="+hoehe+",left="+ x +",top="+ y ;
    AGBsFenster = window.open("/Seiten/Details.htm","Details",openstring);
 }

 function SQLExcecute(DateiName)
   {
    var breite=400;
          var hoehe=200;
        var x= screen.width/2-breite/2+5;
    var y= 20
    openstring="width="+breite+",height="+hoehe+",left="+ x +",top="+ y ;
    SQLFenster = window.open("/update/ExcecuteSQL.php?DateiName="+DateiName,"_blank",openstring);
 }

function Wunsch(Link,ZeilenAnzahl)
{
    window.location.href = Link;
}

function WertSelect(Wert,Test)
{
 for(i=0;i<Wert.length;++i)
  if(Wert.options[i].selected == true)
   alert(Wert.options[i].value);
}

function WertSelect(Feld, Art, RubrikID, WarengruppeID, Suchtext)
{
    switch(Art)
        {
        case 'Index':
                Link='index.php?Suchtext='+ Suchtext+'&';
                break;
        case 'WarengruppenSeite':
                Link='Warengruppen.php?RubrikID='+RubrikID+'&';
                break;
        case 'ProduktSeite':
                Link='Produkte.php?Art='+ Art +'&RubrikID='+ RubrikID +
                                '&WarengruppeID='+ WarengruppeID +
                                                '&Suchtext='+ Suchtext+'&';
                break;
        default:
                alert(Art+' gibt es nicht!');
                break;
        }

    for(i=0;i<Feld.length;++i)
          if(Feld.options[i].selected == true)
                   Zeilenanzahl=(Feld.options[i].value);
    window.location.href = Link+'ZeilenAnzahl='+Zeilenanzahl;
}
