<!--

function newWin(w,h,dir,pic,url,text) {
  var win;
  win=window.open ("ecard_send.php?directory=" + dir + "&image=" + pic + "&page=" + url + "&image_text=" + text + "","Ecards","width=" + w + ",height=" + h + ",scrollbars=yes,resizable=no,screenX=50,screenY=50");
}

function agendaWin(id) {
  var win2;
  win2=window.open ("agenda_details.php?id=" + id,"Agenda","width=400,height=300,scrollbars=yes,resizable=no,screenX=50,screenY=50");
}

function emailCheck(str) {
  var at="@"
  var dot="."
  var lat=str.indexOf(at)
  var lstr=str.length
  var ldot=str.indexOf(dot)
  if (str.indexOf(at)==-1){
    alert("Ungültige Emailadresse")
    return false
  }

  if (str.indexOf(at)==-1 || str.indexOf(at)==0 || str.indexOf(at)==lstr){
    alert("Ungültige Emailadresse")
    return false
  }

  if (str.indexOf(dot)==-1 || str.indexOf(dot)==0 || str.indexOf(dot)==lstr){
    alert("Ungültige Emailadresse")
    return false
  }

  if (str.indexOf(at,(lat+1))!=-1){
    alert("Ungültige Emailadresse")
    return false
  }

  if (str.substring(lat-1,lat)==dot || str.substring(lat+1,lat+2)==dot){
    alert("Ungültige Emailadresse")
    return false
  }

  if (str.indexOf(dot,(lat+2))==-1){
    alert("Ungültige Emailadresse")
    return false
  }

  if (str.indexOf(" ")!=-1){
    alert("Ungültige Emailadresse")
    return false
  }

  return true
}


function dialog(url,message) {
  var button;
  button=confirm(message);
  if (button==true) {
    window.location.href=url;
  }
}

function Login_Form_Validator(theForm) {

  if (theForm.uid.value == "") {
    alert("Bitte geben Sie Ihren Usernamen ein.");
    theForm.uid.focus();
    return (false);
  }

  if (theForm.pw.value == "") {
    alert("Bitte geben Sie Ihr Passwort ein.");
    theForm.pw.focus();
    return (false);
  }
  return (true);
}

function MailingList_Form_Validator(theForm) {

  if (theForm.email_addr.value == "") {
    alert("Bitte geben Sie Ihre Emailadresse ein.");
    theForm.email_addr.focus();
    return (false);
  }  
  return (true);
}

function Search_Form_Validator(theForm) {

  if (theForm.searchWord.value == "") {
    alert("Bitte geben Sie ein Stichwort ein.");
    theForm.searchWord.focus();
    return (false);
  }  
  return (true);
}
-->
