 var But = new Array(13);
 var Buth = new Array(13);
 But[0] = new Image();
 But[0].src = "aadat/Home.gif";
 Buth[0] = new Image();
 Buth[0].src = "aadat/Homeh.gif";
 But[1] = new Image();
 But[1].src = "aadat/Vita.gif";
 Buth[1] = new Image();
 Buth[1].src = "aadat/Vitah.gif";
 But[2] = new Image();
 But[2].src = "aadat/Schmuck.gif";
 Buth[2] = new Image();
 Buth[2].src = "aadat/Schmuckh.gif";
 But[3] = new Image();
 But[3].src = "aadat/Termine.gif";
 Buth[3] = new Image();
 Buth[3].src = "aadat/Termineh.gif";
 But[4] = new Image();
 But[4].src = "aadat/Philosophie.gif";
 Buth[4] = new Image();
 Buth[4].src = "aadat/Philosophieh.gif";
 But[5] = new Image();
 But[5].src = "aadat/Impressum.gif";
 Buth[5] = new Image();
 Buth[5].src = "aadat/Impressumh.gif";
 But[6] = new Image();
 But[6].src = "aadat/Back.gif";
 Buth[6] = new Image();
 Buth[6].src = "aadat/Backh.gif";
 But[7] = new Image();
 But[7].src = "aadat/Forwd.gif";
 Buth[7] = new Image();
 Buth[7].src = "aadat/Forwdh.gif";
 But[8] = new Image();
 But[8].src = "aadat/Ringe.gif";
 Buth[8] = new Image();
 Buth[8].src = "aadat/Ringeh.gif";
 But[9] = new Image();
 But[9].src = "aadat/Halsschmuck.gif";
 Buth[9] = new Image();
 Buth[9].src = "aadat/Halsschmuckh.gif";
 But[10] = new Image();
 But[10].src = "aadat/Broschen.gif";
 Buth[10] = new Image();
 Buth[10].src = "aadat/Broschenh.gif";
 But[11] = new Image();
 But[11].src = "aadat/Ohrstecker.gif";
 Buth[11] = new Image();
 Buth[11].src = "aadat/Ohrsteckerh.gif";
 But[12] = new Image();
 But[12].src = "aadat/Sonstiges.gif";
 Buth[12] = new Image();
 Buth[12].src = "aadat/Sonstigesh.gif";
 But[13] = new Image();
 But[13].src = "aadat/Shop.gif";
 Buth[13] = new Image();
 Buth[13].src = "aadat/Shoph.gif";

 ButFwdG = new Image();
 ButFwdG.src = "aadat/Forwdg.gif";
 ButBackG = new Image();
 ButBackG.src = "aadat/Backg.gif";

 var AktSw = new Array(8);
 AktSw[0] = "1";
 AktSw[1] = "0";
 AktSw[2] = "0";
 AktSw[3] = "0";
 AktSw[4] = "0";
 AktSw[5] = "0";
 AktSw[6] = "1";
 AktSw[7] = "1";
 
 var mebene = 0;
 var first = 0;
 var bildnr = 0;
 var stdwidth = "266";
 var stdheight = "200";
 
 var ringakt = 0;
 var anzringe = 24;
 var Bringe = new Array();
 for(j=0;j<anzringe;j++)
  {
   Bringe[j] = new Image();
   Bringe[j].src = "Pict/Ring"+j+".jpg";
  }

 var halsakt = 0;
 var anzhals = 7;
 var Bhals = new Array();
 for(j=0;j<anzringe;j++)
  {
   Bhals[j] = new Image();
   Bhals[j].src = "Pict/Hals"+j+".jpg";
  }

 var broscheakt = 0;
 var anzbrosche = 4;
 var Bbrosche = new Array();
 for(j=0;j<anzbrosche;j++)
  {
   Bbrosche[j] = new Image();
   Bbrosche[j].src = "Pict/Brosche"+j+".jpg";
  }

 var ohrstakt = 0;
 var anzohrst = 6;
 var Bohrst = new Array();
 for(j=0;j<anzohrst;j++)
  {
   Bohrst[j] = new Image();
   Bohrst[j].src = "Pict/Ohr"+j+".jpg";
  }
 
 var sonstakt = 0;
 var anzsonst = 3;
 var Bsonst = new Array();
 for(j=0;j<anzsonst;j++)
  {
   Bsonst[j] = new Image();
   Bsonst[j].src = "Pict/Sonstige"+j+".jpg";
  }

/********************************************************************************/
  function InitSize()
  {
   if(screen.width > "1024")
    {
     window.document.getElementById('MenuBer').style.top = "615"; 
     window.document.getElementById('MenuBer').style.left = "135"; 
     window.document.getElementById('TitelBer').style.top = "190";
     window.document.getElementById('TitelBer').style.left = "215";
     window.document.getElementById('AusgBer').style.top = "391";
     window.document.getElementById('AusgBer').style.left = "165";
    }
   window.focus();
  }

function Butchg(Butnr,Butname)
  {
   if((Butnr == 0) || (Butnr > 5))
    {
     if(AktSw[Butnr] == "0")
        window.document.images[Butnr].src = Butname[Butnr].src;
     if(Butnr == 13)
        window.document.images[8].src = Butname[Butnr].src;
    }
   else if(mebene == 0)
    {
     if(AktSw[Butnr] == "0")
        window.document.images[Butnr].src = Butname[Butnr].src;
    }
   else if(mebene == 1)
    {
     if(AktSw[Butnr] == "0")
        window.document.images[Butnr].src = Butname[Butnr+7].src;
    }
  }

 function ResetAktSw()
  {
   var i = 0;
   while(i < 6)
    { if(AktSw[i] == "1")
        { AktSw[i] = "0";
          Butchg(i,But);
        }
      i++;
    }
  }

function ResShopButtons()
 {
   window.document.ShopButton.src = "aadat/Nichts.gif";
   window.document.ShopButton.width = "0";
   window.document.ShopButton.height = "0";
 }

function ResetButtons()
 {
   window.document.FButton.src = "aadat/Nichts.gif";
   window.document.FButton.width = "0";
   window.document.FButton.height = "0";
   window.document.BButton.src = "aadat/Nichts.gif";
   window.document.BButton.width = "0";
   window.document.BButton.height = "0";
   AktSw[6] = "1";
   AktSw[7] = "1";
   ResShopButtons();
 }

 function Ausgmenue()
  {
   var bn = 1;
   if(mebene == 1)  bn = bn + 7;
   ResetAktSw();
   for(var i=1; i<6; i++) {
      window.document.images[i].src = But[bn].src;
      window.document.images[i].alt = "Schmuck"+(bn-7);
      bn++; }
  }

 function Ausgabe3(aktuell,anzahl,aname)
  {
   window.document.ausgbild1.width = "266";
   if(aktuell < (anzahl-3))
     {  window.document.FButton.src = But[7].src;
        window.document.FButton.width = "100";
        window.document.FButton.height = "22";
        AktSw[7] = "0" }
   else
     {  window.document.FButton.src = ButFwdG.src;
        window.document.FButton.width = "100";
        window.document.FButton.height = "22";
        AktSw[7] = "1" }
   if(aktuell < 1)
     {  window.document.BButton.src = ButBackG.src;
        window.document.BButton.width = "100";
        window.document.BButton.height = "22";
        AktSw[6] = "1" }
   else
     {  window.document.BButton.src = But[6].src;
        window.document.BButton.width = "100";
        window.document.BButton.height = "22";
        AktSw[6] = "0" }
   if(anzahl < 4) ResetButtons();
   if(anzahl > (aktuell+2))
    {
     window.document.ausgbild1.src = aname[aktuell].src;
     window.document.ausgbild2.src = aname[aktuell+1].src;
     window.document.ausgbild3.src = aname[aktuell+2].src;
    }
   else if(anzahl > (aktuell+1))
    {
     window.document.ausgbild1.src = aname[aktuell].src;
     window.document.ausgbild2.src = aname[aktuell+1].src;
     window.document.ausgbild3.src = "aadat/Nichts.gif";
    }
   else if(anzahl > (aktuell))
    {
     window.document.ausgbild1.src = aname[aktuell].src;
     window.document.ausgbild2.src = "aadat/Nichts.gif";
     window.document.ausgbild3.src = "aadat/Nichts.gif";
    }
   else 
    {
     window.document.ausgbild1.src = "aadat/Nichts.gif";
     window.document.ausgbild2.src = "aadat/Nichts.gif";
     window.document.ausgbild3.src = "aadat/Nichts.gif";
    }
  }
 
 function AusgBild()
  {
   var bildwin = window.open("","","width=543,height=640",false);
   bildwin.document.open();
   bildwin.document.write('<BODY background="aadat/MstrStck.jpg" bgcolor="black" text="yellow">Meisterstück</BODY>'); 
   window.focus();
   bildwin.focus();
  }

 function Vita(Bnr)
  {
   if(AktSw[Bnr] == "0")
    {  ResetAktSw();
       AktSw[Bnr] = "1";
       ResetButtons();
       window.document.ausgbild1.src = "Pict/Bild03.jpg";
       window.document.ausgbild1.width = "266";
       window.document.ausgbild3.src = "aadat/Nichts.gif";
       window.document.ausgbild2.src = "Pict/Vitatxt.gif";
     }
  }
 
 function Ringe(Bnr)
  {
   if(AktSw[Bnr] == "0")
    {  ResetAktSw();
       AktSw[Bnr] = "1";
       Ausgabe3(ringakt,anzringe,Bringe);
    }
   ResShopButtons();
  }
  
 function Halsschmuck(Bnr)
  {
   if(AktSw[Bnr] == "0")
    {  ResetAktSw();
       AktSw[Bnr] = "1";
       Ausgabe3(halsakt,anzhals,Bhals);
    }
   ResShopButtons();
  }
  
 function Broschen(Bnr)
  {
   if(AktSw[Bnr] == "0")
    {  ResetAktSw();
       AktSw[Bnr] = "1";
       Ausgabe3(broscheakt,anzbrosche,Bbrosche);
     }
   ResShopButtons();
  }
 function Ohrstecker(Bnr)
  {
   if(AktSw[Bnr] == "0")
    {  ResetAktSw();
       AktSw[Bnr] = "1";
       Ausgabe3(ohrstakt,anzohrst,Bohrst);
     }
   ResShopButtons();
  }

  function Sonstiges(Bnr)
  {
   if(AktSw[Bnr] == "0")
    {  ResetAktSw();
       AktSw[Bnr] = "1";
       Ausgabe3(sonstakt,anzsonst,Bsonst);
     }
   ResShopButtons();
  }
  
 function Schmuck(Bnr)
  {
   mebene = 1;
   Ausgmenue();
   window.document.ausgbild2.src = "Pict/Bild02.gif";
   window.document.ausgbild3.src = "aadat/Nichts.gif";
   window.document.ausgbild1.src = "aadat/Nichts.gif";
   window.document.ausgbild1.width = "266";
   window.document.ShopButton.src = "aadat/Shop.gif";
   window.document.ShopButton.width = "500";
   window.document.ShopButton.height = "30";
  }
 
 function Philosophie(Bnr)
  {
   if(AktSw[Bnr] == "0")
    {  ResetAktSw();
       AktSw[Bnr] = "1";
       ResetButtons();
       window.document.ausgbild3.src = "aadat/Nichts.gif";
       window.document.ausgbild2.src = "aadat/Nichts.gif";
       window.document.ausgbild1.src = "Pict/Philosophietxt.gif";
       window.document.ausgbild1.width = "900";
     }
  }
  
 function Termine(Bnr)
  {
   if(AktSw[Bnr] == "0")
    {  ResetAktSw();
       AktSw[Bnr] = "1";
       ResetButtons();
       window.document.ausgbild1.src = "Pict/Bild02.gif";
       window.document.ausgbild1.width = "266";
       window.document.ausgbild3.src = "aadat/Nichts.gif";
       window.document.ausgbild2.src = "Pict/Terminetxt.gif";
     }
  }
  
 function Impr(Bnr)
  {
   if(AktSw[Bnr] == "0")
    {  ResetAktSw();
       AktSw[Bnr] = "1";
       ResetButtons();
       window.document.ausgbild1.src = "Pict/Impr1.gif";
       window.document.ausgbild1.width = "300";
       window.document.ausgbild1.height = 200;
       window.document.ausgbild3.src = "aadat/Nichts.gif";
       window.document.ausgbild2.src = "Pict/Impr2.gif";
     }
  }
  
 function Checkbut(Bnr)
  {
   if((AktSw[0] == "1")&&(Bnr < 6))
    {
     window.document.logo.src = "aadat/Logo.gif";
     window.document.logo.width = 266;
     window.document.logo.height = 200;
     window.document.titel.src = "aadat/Titel1.gif";
     window.document.titel.width = 300;
     window.document.titel.height = 200;
     document.getElementById('AusgBer').style.borderTopStyle = "solid";
     document.getElementById('AusgBer').style.borderBottomStyle = "solid";
    }
   if(mebene == 0)
    {   
     if(Bnr == 1) {Vita(1);}
     if(Bnr == 2) {Schmuck(2);}
     if(Bnr == 3) {Termine(3);}
     if(Bnr == 4) {Philosophie(4);}
     if(Bnr == 5) {Impr(5);}
    }
   else if(mebene == 1)
    {   
     if(Bnr == 1) {Ringe(1)}
     if(Bnr == 2) {Halsschmuck(2)}
     if(Bnr == 3) {Broschen(3)}
     if(Bnr == 4) {Ohrstecker(4)}
     if(Bnr == 5) {Sonstiges(5)}
     if(Bnr == 6) {GoBack(6)}
     if(Bnr == 7) {GoFwd(7)}
    }
   else
    Home(0);
   window.focus();
  }
  
function GoBack()
 {
  if(AktSw[1] == "1") {
     if(ringakt > 2) 
        ringakt = ringakt - 3;
     else
        ringakt = 0;
     Ausgabe3(ringakt,anzringe,Bringe);  }
  if(AktSw[2] == "1") {
     if(halsakt > 2)
        halsakt = halsakt - 3;
     else
        halsakt = 0;
     Ausgabe3(halsakt,anzhals,Bhals); }
  if(AktSw[3] == "1") {
     if(broscheakt > 2)
        broscheakt = broscheakt - 3; 
     else
        broscheakt = 0;  
     Ausgabe3(broscheakt,anzbrosche,Bbrosche); }
  if(AktSw[4] == "1") {
     if(ohrstakt > 2)
        ohrstakt = ohrstakt - 3;
     else
        ohrstakt = 0;
     Ausgabe3(ohrstakt,anzohrst,Bohrst); }
  if(AktSw[5] == "1") {
     if(sonstakt > 2)
        sonstakt = sonstakt - 3;
     else
        sonstakt = 0;
     Ausgabe3(sonstakt,anzsonst,Bsonst); }
  window.focus();
 }

function GoFwd()
 {
  if(AktSw[1] == "1") {
     if(anzringe > (ringakt + 3))
        ringakt = ringakt + 3;  
     Ausgabe3(ringakt,anzringe,Bringe); }
  if(AktSw[2] == "1") {
     if(anzhals > (halsakt + 3))
        halsakt = halsakt + 3;  
     Ausgabe3(halsakt,anzhals,Bhals); }
  if(AktSw[3] == "1") {
     if(anzbrosche > (broscheakt + 3))
        broscheakt = broscheakt + 3;  
     Ausgabe3(broscheakt,anzbrosche,Bbrosche); }
  if(AktSw[4] == "1") {
     if(anzohrst > (ohrstakt + 3))
        ohrstakt = ohrstakt + 3;  
     Ausgabe3(ohrstakt,anzohrst,Bohrst); }
  if(AktSw[5] == "1") {
     if(anzsonst > (sonstakt + 3))
        sonstakt = sonstakt +3;  
     Ausgabe3(sonstakt,anzsonst,Bsonst); }
  window.focus();
 }

 function Home(Bnr)
  {
   ResetAktSw();
   mebene = 0;
   AktSw[0] = "1";
   location.reload();
   window.focus();
  }
  

