
 function checkForm()
 {
  var form = document.kontakt;

  if(form.name.value == "")
  {
   alert('Geben Sie bitte Ihren Namen an!');
   form.name.focus();
   return false;
  }

  if(!form.email.value.match(/^[a-zA-Z0-9_\.-]{2,}@[a-zA-Z0-9-]{3,}\.[a-zA-Z]{2,4}$/i) && !form.tel.value.match(/^[0-9]{3,}$/))
  {
   alert('Geben Sie bitte eine gueltige E-Mail-Adresse oder eine Telefonnummer an.\n\n(Bitte nur Ziffern als Telefonnummer verwenden!)');
   form.email.focus();
   return false;
  }

  if(form.betreff.value == "")
  {
   alert('Geben Sie bitte den Betreff an!');
   form.betreff.focus();
   return false;
  }

  if(form.text.value == "")
  {
   alert('Ihre Anfrage?');
   form.text.focus();
   return false;
  }
 }

 function CheckS()
 {
  document.location = document.form_s.select_s.value;
 }

 function Show(url, width, height)
 {
  var winname;
  winname = window.open(url,"",'width=' + width + ',height=' + height + ',resizable=0,scrollbars=auto,menubar=no,status=no,resizable=no' );
  winname.moveTo((screen.width-width)/2,(screen.height-height)/2);
 }

 function show(divid)
 {
  d=document;
  d.getElementById(divid).style.display="inline";
 }

 function hide(divid)
 {
  d=document;
  d.getElementById(divid).style.display="none";
 }

 function name_form_image(form,divid,divid2)
 {
  var f = document.getElementById(divid).value;
  var n = f.split("\\");
  n.reverse();
  var s = n[0].split(".");
  var x = s[0];
  var z = document.getElementById(divid2).value = x;
 }
