   function bildwechsel()
   {
     this.bild = new Array();
     this.bildid = new Array();
     this.thumbnail = new Array();
     this.daten = new Array();
     this.pos = 0;
   }

   bildwechsel.prototype.anzeigen = function ()
   {
     with(document.getElementById("mybild"))
     {
       src = this.bild[this.pos].src;
       width = this.bild[this.pos].width;
       height = this.bild[this.pos].height;
     }

     document.getElementById("myanz").innerHTML= (this.pos+1) + von + this.bild.length;
     document.getElementById("mytitle").innerHTML = this.daten[this.pos][0];
     document.getElementById("mydesc").innerHTML = this.daten[this.pos][1];

    with(document.getElementById("mythumbnail"))
    {
      src = this.thumbnail[this.pos].src;
      width = this.thumbnail[this.pos].width;
      height = this.thumbnail[this.pos].height;
    }

    with(document.getElementById("mythumbdiv").style)
    {
     width = this.thumbnail[this.pos].width+"px";
     height = this.thumbnail[this.pos].height+"px";
    }
   }

   bildwechsel.prototype.zurueck = function ()
   {
     this.pos=this.pos-1;
     if(this.pos < 0)
       this.pos=this.bild.length-1;

     this.anzeigen();
   }

   bildwechsel.prototype.vor = function ()
   {
     this.pos=this.pos+1;
     if(this.pos >= this.bild.length)
       this.pos=0;

     this.anzeigen();
   }
   
   bildwechsel.prototype.addbild = function (bsrc,bw,bh)
   {
     this.bild.push(new Image(bw,bh));
     this.bild[(this.bild.length-1)].src = bsrc;
   }
   
   bildwechsel.prototype.addthumbnail = function (bsrc,bw,bh)
   {
     this.thumbnail.push(new Image(bw,bh));
     this.thumbnail[(this.bild.length-1)].src = bsrc;
   }
   
   bildwechsel.prototype.showgrossbild = function ()
   {
     MeinFenster = window.open(site_url+"grossbild.php?fileID="+this.bildid[this.pos], "grossbild", "resizable=yes,scrollbars=yes");
     MeinFenster.focus();
   }
   
   bildwechsel.prototype.showthumbnail = function () { document.getElementById("mythumbdiv").style.display="inline";}
   bildwechsel.prototype.hidethumbnail = function () { document.getElementById("mythumbdiv").style.display="none";}
   bildwechsel.prototype.addbildid = function (id) { this.bildid.push(id); }
   bildwechsel.prototype.adddaten = function (btitel,bdesc) { this.daten.push(new Array(btitel,bdesc));  }

