
function fehler(meldung,url,zeile) {
 setTimeout("",2000); return true;
}
window.onerror=fehler;

browser_name = navigator.appName;
browser_version = parseFloat(navigator.appVersion);
if ((browser_name == "Microsoft Internet Explorer" && browser_version >= 4.0) || (browser_name == "Netscape" && browser_version >= 3.0)) {
   window.focus();
}

function agb() {
   window.open("booking.cgi?user="+document.StartForm.user.value+"&lang=d&action=agb","agb","menubar=1,location=0,directories=0,toolbar=0,status=1,scrollbars=1,resizable=1,width=600,height=400");
}

function annullation() {
   window.open("booking.cgi?user="+document.StartForm.user.value+"&lang=d&action=cancel","annull","menubar=1,location=0,directories=0,toolbar=0,status=1,scrollbars=1,resizable=1,width=600,height=460");
}

function login() {
   location = "booking.cgi?user="+document.StartForm.user.value+"&lang=d&login=corporate";
}

function anfrage() {
   location = "public/sih-anfrage-d.htm";
}

function CalDisplay(thiswin) {
   if (thiswin.document.StartForm.Monat.selectedIndex > 0 && thiswin.document.StartForm.Jahr.value != "") {
      startM = (thiswin.document.StartForm.Monat.selectedIndex-1).toString();
      startJ = thiswin.document.StartForm.Jahr.value;
      show_calendar('StartForm.datebox',startM,startJ);
   } else {
      show_calendar('StartForm.datebox');
   }
}

function SetDisplay(thiswin) {
   if (thiswin.document.StartForm.datebox.value != "") {
      startDT = thiswin.document.StartForm.datebox.value.split("/");
      thiswin.document.StartForm.Monat.selectedIndex = 0 + startDT[0];
      thiswin.document.StartForm.Tag.selectedIndex = 0 + startDT[1];
      thiswin.makedatum();
      if (thiswin.document.StartForm.Jahr.value != startDT[2]) {
         thiswin.document.StartForm.Monat.selectedIndex = 0;
         thiswin.document.StartForm.Tag.selectedIndex = 0;
         thiswin.document.StartForm.Jahr.value = "";
         alert("Die automatische Buchung ist nur für die folgenden 365 Tage möglich!");
      }
   }
}
