function chkFormularanmelden() { if(window.document.Login.Benutzer.value == "") { alert("Bitte Benutzernamen eingeben!"); window.document.Login.Benutzer.focus(); return false; } if(window.document.Login.Kennwort.value == "") { alert("Bitte Kennwort eingeben!"); window.document.Login.Kennwort.focus(); return false; } } function Loginausfuehren() { var Benutzer = window.document.Login.Benutzer.value; var Kennwort = window.document.Login.Kennwort.value; var Seite = "keine Seite"; if (chkFormularanmelden() != false) { switch(Benutzer) { case "Frank Wellegehausen": if (Kennwort == "hansi") { Seite = "privat/privat02.htm"; } else { /* window.document.Login.hansi.focus(); */ alert("Hallo Frank, das Kennwort ist falsch. Bitte neu eingeben.."); window.document.Login.Kennwort.value = ""; window.document.Login.Kennwort.focus(); } break; case "Frank Köster": if (Kennwort == "witchco") { Seite = "privat/gast0001.htm"; } else { alert("Hallo Frank, das Kennwort ist falsch. Bitte neu eingeben.."); window.document.Login.Kennwort.value = ""; window.document.Login.Kennwort.focus(); } break; case "Martina Petersen": if (Kennwort == "turbotini") { Seite = "privat/gast0001.htm"; } else { alert("Hallo Tini, das Kennwort ist falsch. Bitte neu eingeben.."); window.document.Login.Kennwort.value = ""; window.document.Login.Kennwort.focus(); } break; case "Markus Kulbe": if (Kennwort == "hansi") { Seite = "privat/gast0001.htm"; } else { alert("Hallo Markus, das Kennwort ist falsch. Bitte neu eingeben.."); window.document.Login.Kennwort.value = ""; window.document.Login.Kennwort.focus(); } break; case "Jens Kessler": if (Kennwort == "asdf123") { Seite = "privat/gast0001.htm"; } else { alert("Hallo Jens, das Kennwort ist falsch. Bitte neu eingeben.."); window.document.Login.Kennwort.value = ""; window.document.Login.Kennwort.focus(); } break; case "Gast": if (Kennwort == "gast") { Seite = "privat/gast0001.htm"; } else { alert("Hallo Gast, das Kennwort ist falsch. Bitte neu eingeben.."); window.document.Login.Kennwort.value = ""; window.document.Login.Kennwort.focus(); } break; default: alert("Sorry " + Benutzer + ", unbekannte Benutzer haben keinen Zugriff !"); break; } } return Seite } function KennwortEingabePruefen(Eingabe) { if (Eingabe == 13) { Seiteladen(); } } function BenutzerEingabePruefen(Eingabe) { if (window.document.Login.Benutzer.value != "") { if (Eingabe == 13) { window.document.Login.Kennwort.focus(); } } }