/*
 * validate.js was created on 21.04.2007 at 11:31:18 
 *
 * Copyright 2006 - 2007 © Manuel Rauber
 * 
 * ToDo:
 * 
 * Changes:
 * 
 */
function validate()
{
  var fehler;
  
  fehler = false;
  
  if (document.contactform.pname.value.length == 0)
  {
    fehler = true;
  }
  
  if (document.contactform.firma.value.length == 0)
  {
    fehler = true;
  }
  
  if (document.contactform.plz.value.length == 0)
  {
    fehler = true;
  }
  
  if (document.contactform.ort.value.length == 0)
  {
    fehler = true;
  }
  
  if (document.contactform.strasse.value.length == 0)
  {
    fehler = true;
  }
  
  if (document.contactform.email.value.length == 0)
  {
    fehler = true;
  }
  else 
  {
    reg = new RegExp('^([a-zA-Z0-9\\-\\.\\_]+)(\\@)([a-zA-Z0-9\\-\\.]+)(\\.)([a-zA-Z]{2,4})$');
    
    if (reg.test(document.contactform.email.value) != true)
    {
      fehler = true;
    }    
  }
  
  if (document.contactform.telefon.value.length == 0)
  {
    fehler = true;
  }
  
  if (document.contactform.nachricht.value.length == 0)
  {
    fehler = true;
  }
  
  if (fehler)
  {
    document.contactform.go.disabled = "disabled";
  }
  else
  {
    document.contactform.go.disabled = "";
  }
}
