
var blink_los = "0";
var bflag = "0";
var zeiger = "hand";
var Galerie = new Array();
var Foto = 0;

var t_name = "Geben Sie hier bitte Ihren Namen für Rückfragen an";
var t_sthn = "Geben Sie hier bitte Ihre Straße und Hausnummer an";
var t_plzo = "Geben Sie hier bitte Ihre Postleitzahl und Ihren Ort an";
var t_emai = "Geben Sie hier bitte Ihre E-Mail-Adresse für Rückfragen an";
var t_tele = "Geben Sie hier bitte Ihre Telefonnummer für Rückfragen an";
var t_betr = "Geben Sie hier bitte den Betreff Ihrer Nachricht an";
var t_nach = "Geben Sie hier bitte Ihre Nachricht ein";

var s_name = "Bitte Überschrift eingeben";
var s_nachricht = "Bitte Newsartikel eingeben";

if (navigator.appName == "Netscape"){
	zeiger="pointer";
}

function navovr(imgname,navimg){
     imgname.src = navimg;
}

function show(content) {
 if(document.getElementById)
   document.getElementById(content).style.visibility = "visible";
}

function hide(content) {
 if(document.getElementById)
   document.getElementById(content).style.visibility = "hidden";
}

function blinken() {
  blink_los++;
  if ((blink_los % 2) == 0) {
    if (bflag == "11") document.form.name.value = t_name;
    if (bflag == "12") document.form.email.value = t_emai;
    if (bflag == "13") document.form.phone.value = t_tele;
    if (bflag == "14") document.form.subject.value = t_betr;
    if (bflag == "15") document.form.nachricht.value = t_nach;
    if (bflag == "16") document.form.sthn.value = t_sthn;
    if (bflag == "17") document.form.plzo.value = t_plzo;
    if (bflag == "18") document.form.nwze8z48834.value = s_name;
    if (bflag == "19") document.form.sxjkh3hsdkq3.value = s_nachricht;
  }
  else {
    if (bflag == "11") document.form.name.value = "";
    if (bflag == "12") document.form.email.value = "";
    if (bflag == "13") document.form.phone.value = "";
    if (bflag == "14") document.form.subject.value = "";
    if (bflag == "15") document.form.nachricht.value = "";
    if (bflag == "16") document.form.sthn.value = "";
    if (bflag == "17") document.form.plzo.value = "";
    if (bflag == "18") document.form.nwze8z48834.value = "";
    if (bflag == "19") document.form.sxjkh3hsdkq3.value = "";
  }
  if (blink_los > 5) blink_los = 0;
  if (blink_los >= 1 && blink_los <= 5) ID=setTimeout("blinken()",100);
}


function validate(sflag) {
  validity = true;
  if (sflag == 1) {
    if(document.form.name.value == document.form.name.defaultValue || document.form.name.value == "" || document.form.name.value == t_name) {
      validity = false;
      bflag = "11";
      blinken();
      document.form.name.style.color = "#800000";
      document.form.name.focus();
    }
    else {
      if(document.form.email.value == document.form.email.defaultValue || document.form.email.value == "" || document.form.email.value == t_emai || document.form.email.value.indexOf ('@') == -1 || document.form.email.value.indexOf ('.') == -1) {
        validity = false;
        bflag = "12";
        blinken();
        document.form.email.style.color = "#800000";
        document.form.email.focus();
      }
      else {
        if(document.form.phone.value == document.form.phone.defaultValue || document.form.phone.value == "" || document.form.phone.value == t_tele) {
          validity = false;
          bflag = "13";
          blinken();
          document.form.phone.style.color = "#800000";
          document.form.phone.focus();
        }
        else {
          if(document.form.subject.value == document.form.subject.defaultValue || document.form.subject.value == "" || document.form.subject.value == t_betr) {
            validity = false;
            bflag = "14";
            blinken();
            document.form.subject.style.color = "#800000";
            document.form.subject.focus();
          }
          else {
            if(document.form.nachricht.value == document.form.nachricht.defaultValue || document.form.nachricht.value == "" || document.form.nachricht.value == t_nach) {
              validity = false;
              bflag = "15";
              blinken();
              document.form.nachricht.style.color = "#800000";
              document.form.nachricht.focus();
            }
          }
        }
      }
    }
  }
  if (sflag == 2) {
    if(document.form.name.value == document.form.name.defaultValue || document.form.name.value == "" || document.form.name.value == t_name) {
      validity = false;
      bflag = "11";
      blinken();
      document.form.name.style.color = "#800000";
      document.form.name.focus();
    }
    else {
      if(document.form.sthn.value == document.form.sthn.defaultValue || document.form.sthn.value == "" || document.form.sthn.value == t_sthn) {
        validity = false;
        bflag = "16";
        blinken();
        document.form.sthn.style.color = "#800000";
        document.form.sthn.focus();
      }
      else {
        if(document.form.plzo.value == document.form.plzo.defaultValue || document.form.plzo.value == "" || document.form.plzo.value == t_plzo) {
          validity = false;
          bflag = "17";
          blinken();
          document.form.plzo.style.color = "#800000";
          document.form.plzo.focus();
        }
        else {
          if(document.form.email.value == document.form.email.defaultValue || document.form.email.value == "" || document.form.email.value == t_emai || document.form.email.value.indexOf ('@') == -1 || document.form.email.value.indexOf ('.') == -1) {
            validity = false;
            bflag = "12";
            blinken();
            document.form.email.style.color = "#800000";
            document.form.email.focus();
          }
          else {
            if(document.form.phone.value == document.form.phone.defaultValue || document.form.phone.value == "" || document.form.phone.value == t_tele) {
              validity = false;
              bflag = "13";
              blinken();
              document.form.phone.style.color = "#800000";
              document.form.phone.focus();
            }
            else {
              if(document.form.subject.value == document.form.subject.defaultValue || document.form.subject.value == "" || document.form.subject.value == t_betr) {
                validity = false;
                bflag = "14";
                blinken();
                document.form.subject.style.color = "#800000";
                document.form.subject.focus();
              }
              else {
                if(document.form.nachricht.value == document.form.nachricht.defaultValue || document.form.nachricht.value == "" || document.form.nachricht.value == t_nach) {
                  validity = false;
                  bflag = "15";
                  blinken();
                  document.form.nachricht.style.color = "#800000";
                  document.form.nachricht.focus();
                }
              }
            }
          }
        }
      }
    }
  }
  if (sflag == 3) {
    if(document.form.nwze8z48834.value == document.form.nwze8z48834.defaultValue || document.form.nwze8z48834.value == "" || document.form.nwze8z48834.value == s_name) {
      bflag = "18";
      blinken();
      document.form.nwze8z48834.style.color = "#800000";
      document.form.nwze8z48834.focus();
    }
    else {
      if(document.form.sxjkh3hsdkq3.value == document.form.sxjkh3hsdkq3.defaultValue || document.form.sxjkh3hsdkq3.value == "" || document.form.sxjkh3hsdkq3.value == s_nachricht) {
        bflag = "19";
        blinken();
        document.form.sxjkh3hsdkq3.style.color = "#800000";
        document.form.sxjkh3hsdkq3.focus();
      }
      else {
        document.form.submit();
      }
    }
  }
}


function Back() {
  if (Foto > 0) {
    Foto--;
    window.status = '';
    document.images.Bildergalerie.src = Galerie[Foto];
  }
}

function Next() {
  if (Foto < Galerie.length - 1) {
    Foto++;
    window.status = '';
    document.images.Bildergalerie.src = Galerie[Foto];
  }
  else window.status = 'end of gallery';
}

