<!--

  // © 2005 Bitpalast GmbH. Alle Rechte vorbehalten. All rights reserved.

  function printpage() {
    printlocation="http://www.ferienhaus-borkum.com/phprint.php?page="+window.location;
    window.open(printlocation,'','width=700,height=440,toolbar=1,menubar=1,scrollbars=1,status=0,resizable=0');
  }

  function reservation_validator(theForm)
  {

    if (theForm.Produkt.selectedIndex < 0)
    {
      alert("Wählen Sie eine der \"Zimmer/Wohnung\"-Optionen.");
      theForm.Produkt.focus();
      return (false);
    }

    if (theForm.Produkt.selectedIndex < 2)
    {
      alert("Die ersten beiden \"Zimmer/Wohnung\"-Optionen sind keine gültige Wahl. Wählen Sie eine der anderen Optionen.");
      theForm.Produkt.focus();
      return (false);
    }

    if (theForm.Anreisedatum.value == "")
    {
      alert("Geben Sie einen Wert in das Feld \"Anreisedatum\" ein.");
      theForm.Anreisedatum.focus();
      return (false);
    }

    if (theForm.Anreisedatum.value.length < 4)
    {
      alert("Geben Sie mindestens 4 Zeichen in das Feld \"Anreisedatum\" ein.");
      theForm.Anreisedatum.focus();
      return (false);
    }

    if (theForm.Anreisedatum.value.length > 10)
    {
      alert("Geben Sie höchstens 10 Zeichen in das Feld \"Anreisedatum\" ein.");
      theForm.Anreisedatum.focus();
      return (false);
    }

    var checkOK = "0123456789-.-/";
    var checkStr = theForm.Anreisedatum.value;
    var allValid = true;
    var validGroups = true;
    for (i = 0;  i < checkStr.length;  i++)
    {
      ch = checkStr.charAt(i);
      for (j = 0;  j < checkOK.length;  j++)
        if (ch == checkOK.charAt(j))
          break;
      if (j == checkOK.length)
      {
        allValid = false;
        break;
      }
    }
    if (!allValid)
    {
      alert("Für das Feld \"Anreisedatum\" sind nur Ziffern und die Zeichen \".-/\" erlaubt.");
      theForm.Anreisedatum.focus();
      return (false);
    }

    if (theForm.Abreisedatum.value.length > 10)
    {
      alert("Geben Sie höchstens 10 Zeichen in das Feld \"Abreisedatum\" ein.");
      theForm.Abreisedatum.focus();
      return (false);
    }

    var checkOK = "0123456789-.-/";
    var checkStr = theForm.Abreisedatum.value;
    var allValid = true;
    var validGroups = true;
    for (i = 0;  i < checkStr.length;  i++)
    {
      ch = checkStr.charAt(i);
      for (j = 0;  j < checkOK.length;  j++)
        if (ch == checkOK.charAt(j))
          break;
      if (j == checkOK.length)
      {
        allValid = false;
        break;
      }
    }
    if (!allValid)
    {
      alert("Für das Feld \"Abreisedatum\" sind nur Ziffern und die Zeichen \".-/\" erlaubt.");
      theForm.Abreisedatum.focus();
      return (false);
    }

    if (theForm.Abreisedatum.value == "")
    {
      theForm.Abreisedatum.value = "Noch unbekannt";
    }

    if (theForm.Name.value == "")
    {
      alert("Geben Sie einen Wert in das Feld \"Name\" ein.");
      theForm.Name.focus();
      return (false);
    }

    if (theForm.Name.value.length < 6)
    {
      alert("Geben Sie mindestens 6 Zeichen in das Feld \"Name\" ein.");
      theForm.Name.focus();
      return (false);
    }

    if (theForm.Name.value.length > 80)
    {
      alert("Geben Sie höchstens 80 Zeichen in das Feld \"Name\" ein.");
      theForm.Name.focus();
      return (false);
    }

    if (theForm.Anschrift.value == "")
    {
      alert("Geben Sie einen Wert in das Feld \"Anschrift\" ein.");
      theForm.Anschrift.focus();
      return (false);
    }

    if (theForm.Anschrift.value.length < 7)
    {
      alert("Geben Sie mindestens 7 Zeichen in das Feld \"Anschrift\" ein.");
      theForm.Anschrift.focus();
      return (false);
    }

    if (theForm.Telefon.value == "")
    {
      alert("Geben Sie einen Wert in das Feld \"Telefon tagsüber\" ein.");
      theForm.Telefon.focus();
      return (false);
    }

    if (theForm.Telefon.value.length < 4)
    {
      alert("Geben Sie mindestens 4 Zeichen in das Feld \"Telefon tagsüber\" ein.");
      theForm.Telefon.focus();
      return (false);
    }

    var checkOK = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyzƒŠŒŽšœžŸÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõöøùúûüýþÿ0123456789-.-_@";
    var checkStr = theForm.eMail.value;
    var allValid = true;
    var validGroups = true;
    for (i = 0;  i < checkStr.length;  i++)
    {
      ch = checkStr.charAt(i);
      for (j = 0;  j < checkOK.length;  j++)
        if (ch == checkOK.charAt(j))
          break;
      if (j == checkOK.length)
      {
        allValid = false;
        break;
      }
    }
    if (!allValid)
    {
      alert("Für das Feld \"e-Mail\" sind nur Buchstaben, Ziffern und die Zeichen \".-_@\" erlaubt.");
      theForm.eMail.focus();
      return (false);
    }

    if (theForm.eMail.value == "")
    {
      theForm.eMail.value = "Keine";
    }

    return (true);
  }

//-->
