function swap(Bildname,BildURL) {
  window.document.images[Bildname].src = BildURL;
}


// DIV bei Flyout Downloads ein- bzw. ausblenden
function flyout_show () {
  window.document.getElementById ('flyout').style.visibility = 'visible';
}
function flyout_hide () {
  window.document.getElementById ('flyout').style.visibility = 'hidden';
}


// DIV ein- bzw. ausblenden -> Sprung nach Anker
function div_show (id, anker) {
  window.document.getElementById(id).style.height = 'auto';
  window.document.getElementById(id).style.visibility = 'visible';
  window.document.location.hash = anker;
}
function div_hide (id, anker) {
  window.document.getElementById(id).style.height = '0px';
  window.document.getElementById(id).style.visibility = 'hidden';
}


// Kontaktformular auswerten
function chkFormular () {

  if (document.Formular.name.value == "") {
    alert("Bitte Ihren Namen eingeben!");
    document.Formular.name.focus();
    return false;
  }
  if (document.Formular.strasse.value == "") {
    alert("Bitte Ihre Straße eingeben!");
    document.Formular.strasse.focus();
    return false;
  }
  if (document.Formular.plz.value == "") {
    alert("Bitte Ihre Postleitzahl eingeben!");
    document.Formular.plz.focus();
    return false;
  }
  var chkZ = 1;
  for (i = 0; i < document.Formular.plz.value.length; ++i)
    if (document.Formular.plz.value.charAt(i) < "0" ||
        document.Formular.plz.value.charAt(i) > "9")
      chkZ = -1;
  if (chkZ == -1) {
    alert("Postleitzahl ist keine Zahl!");
    document.Formular.plz.focus();
    return false;
  }
  if (document.Formular.ort.value == "") {
    alert("Bitte Ihren Wohnort eingeben!");
    document.Formular.ort.focus();
    return false;
  }
  if (document.Formular.email.value == "") {
    alert("Bitte Ihre E-Mail-Adresse eingeben!");
    document.Formular.email.focus();
    return false;
  }
  if (document.Formular.email.value.indexOf("@") == -1) {
    alert("Keine gültige E-Mail-Adresse!");
    document.Formular.email.focus();
    return false;
  }
  if (document.Formular.message.value == "") {
    alert("Bitte Ihre Nachricht eingeben!");
    document.Formular.message.focus();
    return false;
  }

}
