function eventcheckit(theForm)
{

  if (theForm.Name.value == "")
  {
    alert("Gib einen Wert in das Feld \"Name der Veranstaltung\" ein.");
    theForm.Name.focus();
    return (false);
  }

//  if (theForm.Kategorie.value == "NULL")
//  {
//    alert("Wähle eine geeignete Kategorie aus.");
//    theForm.Kategorie.focus();
//    return (false);
//  }

  if (theForm.Kategorie.selectedIndex == 0)
  {
    alert("Wähle eine geeignete Kategorie aus.");
    theForm.Kategorie.focus();
    return (false);
  }

  if (theForm.Beschreibung.value == "")
  {
    alert("Gib einen Wert in das Feld \"Beschreibung der Veranstaltung\" ein.");
    theForm.Beschreibung.focus();
    return (false);
  }

if (theForm.Location.value == "0")
{
//  if (theForm.Bezirk.value == "NULL")
//  {
//    alert("Wähle den entsprechenden Bezirk aus.");
//    theForm.Bezirk.focus();
//    return (false);
//  }

  if (theForm.Bezirk.selectedIndex == 0)
  {
    alert("Wähle den entsprechenden Bezirk aus.");
    theForm.Bezirk.focus();
    return (false);
  }

  if (theForm.PLZ.value == "")
  {
    alert("Gib einen Wert in das Feld \"PLZ\" ein.");
    theForm.PLZ.focus();
    return (false);
  }

  /*if (theForm.PLZ.value.length < 5)
  {
    alert("Gib mindestens 5 Zeichen in das Feld \"PLZ\" ein.");
    theForm.PLZ.focus();
    return (false);
  }

  if (theForm.PLZ.value.length > 5)
  {
    alert("Gib höchstens 5 Zeichen in das Feld \"PLZ\" ein.");
    theForm.PLZ.focus();
    return (false);
  }*/

  var checkOK = "0123456789-";
  var checkStr = theForm.PLZ.value;
  var allValid = true;
  var decPoints = 0;
  var allNum = "";
  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;
    }
    allNum += ch;
  }
  if (!allValid)
  {
    alert("Gib nur Ziffern in das Feld \"PLZ\" ein.");
    theForm.PLZ.focus();
    return (false);
  }

  if (theForm.Ort.value == "")
  {
    alert("Gib einen Wert in das Feld \"Ort\" ein.");
    theForm.Ort.focus();
    return (false);
  }
}

  if (theForm.EMail.value == "")
  {
    alert("Geben Sie einen Wert in das Feld \"E-Mail\" ein.");
    theForm.EMail.focus();
    return (false);
  }

  return (true);
}



function locationcheckit(theForm)
{

  if (theForm.Name.value == "")
  {
    alert("Gib einen Wert in das Feld \"Name des Veranstaltungsortes\" ein.");
    theForm.Name.focus();
    return (false);
  }

//  if (theForm.Kategorie.value == "NULL")
//  {
//    alert("Wähle eine geeignete Kategorie aus.");
//    theForm.Kategorie.focus();
//    return (false);
//  }

  if (theForm.Kategorie.selectedIndex == 0)
  {
    alert("Wähle eine geeignete Kategorie aus.");
    theForm.Kategorie.focus();
    return (false);
  }

  if (theForm.Beschreibung.value == "")
  {
    alert("Gib einen Wert in das Feld \"Beschreibung der Location\" ein.");
    theForm.Beschreibung.focus();
    return (false);
  }

  if (theForm.Ansprechpartner.value == "")
  {
    alert("Gib einen Wert in das Feld \"Ansprechpartner\" ein.");
    theForm.Ansprechpartner.focus();
    return (false);
  }

//  if (theForm.Bezirk.value == "NULL")
//  {
//    alert("Wähle den entsprechenden Bezirk aus.");
//    theForm.Bezirk.focus();
//    return (false);
//  }

  if (theForm.Bezirk.selectedIndex == 0)
  {
    alert("Wähle den entsprechenden Bezirk aus.");
    theForm.Bezirk.focus();
    return (false);
  }

  if (theForm.Strasse.value == "")
  {
    alert("Gib einen Wert in das Feld \"Strasse\" ein.");
    theForm.Strasse.focus();
    return (false);
  }

  if (theForm.Hausnummer.value == "")
  {
    alert("Gib einen Wert in das Feld \"Hausnummer\" ein.");
    theForm.Hausnummer.focus();
    return (false);
  }

  if (theForm.Telefon.value == "")
  {
    alert("Gib einen Wert in das Feld \"Telefonnummer\" ein.");
    theForm.Telefon.focus();
    return (false);
  }

  if (theForm.Fax.value == "")
  {
    alert("Gib einen Wert in das Feld \"Telefax\" ein.");
    theForm.Fax.focus();
    return (false);
  }

  if (theForm.PLZ.value == "")
  {
    alert("Gib einen Wert in das Feld \"PLZ\" ein.");
    theForm.PLZ.focus();
    return (false);
  }

  /*if (theForm.PLZ.value.length < 5)
  {
    alert("Gib mindestens 5 Zeichen in das Feld \"PLZ\" ein.");
    theForm.PLZ.focus();
    return (false);
  }

  if (theForm.PLZ.value.length > 5)
  {
    alert("Gib höchstens 5 Zeichen in das Feld \"PLZ\" ein.");
    theForm.PLZ.focus();
    return (false);
  }*/

  var checkOK = "0123456789-";
  var checkStr = theForm.PLZ.value;
  var allValid = true;
  var decPoints = 0;
  var allNum = "";
  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;
    }
    allNum += ch;
  }
  if (!allValid)
  {
    alert("Gib nur Ziffern in das Feld \"PLZ\" ein.");
    theForm.PLZ.focus();
    return (false);
  }

  if (theForm.Ort.value == "")
  {
    alert("Gib einen Wert in das Feld \"Ort\" ein.");
    theForm.Ort.focus();
    return (false);
  }

//  if (theForm.URL.value == "http://")
//  {
//    alert("Gib einen Wert in das Feld \"URL\" ein.");
//    theForm.URL.focus();
//    return (false);
//  }

  if (theForm.URL.value.length > 50)
  {
    alert("Gib höchstens 50 Zeichen in das Feld \"URL\" ein.");
    theForm.URL.focus();
    return (false);
  }

  if (theForm.EMail.value == "")
  {
    alert("Gib einen Wert in das Feld \"EMail\" ein.");
    theForm.EMail.focus();
    return (false);
  }

  return (true);
}