var Galerie = new Array();
var GalCursor = 0;
var Werbung = new Array();
var WerCursor = 0;

function objGalerieBild() {
  this.url = '';
  this.ziel = '';
  this.title = '';
  this.text = '';
}

function changePics() {
  changeGalerie();
  changeWerbung();
  window.setTimeout(changePics, 5000);
}

function changeGalerie() {
  GalCursor++;
  if (GalCursor >= Galerie.length) { GalCursor = 0; }
  var divinhalt = "<a href='"+Galerie[GalCursor].ziel+"' title='"+Galerie[GalCursor].title+"'>";
  divinhalt += "<img src='/fotos/"+Galerie[GalCursor].url+"s.jpg' alt='"+Galerie[GalCursor].title+"'>";
  divinhalt += "<br>"+Galerie[GalCursor].text+"</a>";
  document.getElementById('neuingalerie').innerHTML = divinhalt;
}

function changeWerbung() {
  WerCursor++;
  if (WerCursor >= Werbung.length) { WerCursor = 0; }
  var divinhalt = "<a href='http://"+Werbung[WerCursor].ziel+"' target='_blank' title='"+Werbung[WerCursor].title+"'>";
  divinhalt += "<img src='"+Werbung[WerCursor].url+"' alt='"+Werbung[WerCursor].title+"'></a>";
  document.getElementById('werbepartnervar').innerHTML = divinhalt;
}

function anaus(OBJEKT) {
  if (document.getElementById(OBJEKT).style.visibility == 'visible') {
    document.getElementById(OBJEKT).style.visibility = 'hidden';
    document.getElementById(OBJEKT).style.display = 'none';
  } else {
    document.getElementById(OBJEKT).style.visibility = 'visible';
    document.getElementById(OBJEKT).style.display = 'block';
  }
}

function showMeldung(TITLE, TEXT) {
  Shadowbox.open({
        player:     "html",
        content:    TEXT,
        title:      TITLE,
        height:     500,
        width:      500
    });
}

