/* Vorschau Bildergalerie: Initialisierung */
function galerie_start() {
  aktId = 0;
  autoChange = true;
  galleryTags = new Array();
  galleryId = 0;
  var divTags = document.getElementsByTagName("div");
  var anzahlDivTags = divTags.length;
  for (i=0; i<anzahlDivTags; i++) {
    if (divTags[i].className=="loc_galerie") {
      galleryTags[galleryId] = divTags[i];
      galleryId++;
    } 
  }
  anzahlGalleryTags = galleryId;
  if (anzahlGalleryTags > 0) {
    galleryTags[0].style.display = "block";
    setTimeout("galerie_wechsel()",6000);
  }
}


/* Vorschau Bildergalerie: Bildwechsel */
function galerie_wechsel() {
  if (autoChange == true) {
    aktId++;
    galleryTags[aktId-1].style.display = "none";
    if (aktId == anzahlGalleryTags) { aktId = 0; }
    galleryTags[aktId].style.display = "block"; 
  }
  else { autoChange = true; }
  setTimeout("galerie_wechsel()",6000);
}
