function popup(url)
{
  newwindow=window.open(url,'popup','height=590,width=650,scrollbars=yes,status=yes');
  if (window.focus) {newwindow.focus()}
}

function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

function CheckDate(Dat) {
    var ok = false;
    if (Dat.length > 5) {
      var DatArr = Dat.split(".");
      if (DatArr.length == 3) {
        var ckDate = new Date(DatArr[2], DatArr[1] - 1, DatArr[0]);
        ok = (ckDate.getMonth() == DatArr[1] - 1)
      }
    }
    if ((Dat == "29.02.00") || (Dat == "29.2.00")) {
          ok = true
          }
    return ok;
}

function CheckForm() {
    if ((CheckDate(document.Search.CheckIn.value)) &&
      (CheckDate(document.Search.CheckOut.value))) {
      return true;
    } else {
      alert("Datumseingabe nicht korrekt. Bitte geben Sie ein korrektes Ankunfts- und Abreisedatum ein.");
      return false;
    }
}

function CheckForm() {
  var result = false;
  if (document.Hotel.idRoom.length) {
    for (i = 0; i < document.Hotel.idRoom.length; i++) {
      if (document.Hotel.NumRooms[i].selectedIndex * (document.Hotel.Adults[i].selectedIndex + 1) > 0) { result = true }
      if (document.Hotel.NumRooms[i].selectedIndex * (document.Hotel.Children[i].selectedIndex + 1) > 0) { result = true }
    }
  } else {
    if (document.Hotel.NumRooms.selectedIndex * (document.Hotel.Adults.selectedIndex + 1) > 0) { result = true }
    if (document.Hotel.NumRooms.selectedIndex * (document.Hotel.Children.selectedIndex + 1) > 0) { result = true }
  }
  if (!result) { alert('Unvollständige Auswahl. Bitte wählen Sie mindestens eines der Zimmer aus.') }
  return result;
}


