//<SCRIPT LANGUAGE="javascript">
<!--


function newstr(str2)	{
	if(str2 == null)	str2 = "";
	str = ""
	for(j = 0; j < str2.length; j++)	{
		if(str2.charAt(j) == "\"")	str += "&quot;";
		else	{if (str2.charAt(j) == "'")	str += "`";
		else	{if (str2.charAt(j) == "|")	str += "!";
		else	str += str2.charAt(j);}}
	}
	return str;
}

function Validator(theForm)
{
  var str = "";
  if (theForm.projekt.value == "")
  {
    alert("Indiquez votre projet, s´il vous plaît");
    theForm.projekt.focus();
    return (false);
  }

  if (theForm.projekt.value.length < 1)
  {
    alert("Indiquez votre projet, s´il vous plaît");
    theForm.projekt.focus();
    return (false);
  }

  str = "";
  for(j = 0; j < theForm.projekt.value.length; j++)	{
		if(theForm.projekt.value.charAt(j) == "\"")	str += "&quot;"
		else	{
			if(theForm.projekt.value.charAt(j) == "'")	str += "`"
			else	str += theForm.projekt.value.charAt(j);
			}
	}
  theForm.projekt.value = str;

  if (theForm.bedrijf.value == "")
  {
    alert("Indiquez votre société, s´il vous plaît");
    theForm.bedrijf.focus();
    return (false);
  }

  if (theForm.bedrijf.value.length < 1)
  {
    alert("Indiquez votre société, s´il vous plaît");
    theForm.bedrijf.focus();
    return (false);
  }


  if (theForm.naam.value == "")
  {
    alert("Indiquez votre nom, s´il vous plaît");
    theForm.naam.focus();
    return (false);
  }

  if (theForm.naam.value.length < 1)
  {
    alert("Indiquez votre nom, s´il vous plaît");
    theForm.naam.focus();
    return (false);
  }

  if (theForm.straat.value == "")
  {
    alert("Indiquez votre rue, s´il vous plaît");
    theForm.straat.focus();
    return (false);
  }

  if (theForm.straat.value.length < 1)
  {
    alert("Indiquez votre rue, s´il vous plaît");
    theForm.straat.focus();
    return (false);
  }

  if (theForm.postcode.value == "")
  {
    alert("Indiquez votre code postale, s´il vous plaît");
    theForm.postcode.focus();
    return (false);
  }

  if (theForm.postcode.value.length < 4)
  {
    alert("Indiquez votre code postale, s´il vous plaît");
    theForm.postcode.focus();
    return (false);
  }

  if (theForm.plaats.value == "")
  {
    alert("Indiquez votre ville, s´il vous plaît");
    theForm.plaats.focus();
    return (false);
  }

  if (theForm.plaats.value.length < 1)
  {
    alert("Indiquez votre ville, s´il vous plaît");
    theForm.plaats.focus();
    return (false);
  }

  if (theForm.telnummer.value == "")
  {
    alert("Indiquez votre telephone, s´il vous plaît");
    theForm.telnummer.focus();
    return (false);
  }

  if (theForm.email.value == "")
  {
    alert("Indiquez votre e-mail correctement, s´il vous plaît");
    theForm.email.focus();
    return (false);
  }

  if (theForm.email.value.length < 1)
  {
    alert("Indiquez votre e-mail correctement, s´il vous plaît");
    theForm.email.focus();
    return (false);
  }

var eersteaapje = theForm.email.value.indexOf('@');
var laatsteaapje = theForm.email.value.lastIndexOf('@');
var punt = theForm.email.value.lastIndexOf('.');
    if (eersteaapje != laatsteaapje || punt <= eersteaapje + 1 || punt >= theForm.email.value.length -1) {
         alert("Indiquez votre e-mail correctement, s´il vous plaît");
         theForm.email.focus();
         return (false);
     }


	theForm.projekt.value = newstr(theForm.projekt.value);
	theForm.bedrijf.value = newstr(theForm.bedrijf.value);
	theForm.naam.value = newstr(theForm.naam.value);
	theForm.straat.value = newstr(theForm.straat.value);
	theForm.plaats.value = newstr(theForm.plaats.value);
	theForm.telnummer.value = newstr(theForm.telnummer.value);
	theForm.faxnummer.value = newstr(theForm.faxnummer.value);
	theForm.email.value = newstr(theForm.email.value);
  return (true);
}


//-->
//</SCRIPT>

