<!--
// a inserer dans la balise form : onsubmit="return Validator(this)"
function Validator(theForm)
{
  if (theForm.name.value == "")
  {
    alert("Please enter a value for the \"name\" field.");
    theForm.name.focus();
    return (false);
  }

  if (theForm.name.value.length > 80)
  {
    alert("Please enter at most 80 characters in the \"name\" field.");
    theForm.name.focus();
    return (false);
  }

  if (theForm.company.value == "")
  {
    alert("Please enter a value for the \"company\" field.");
    theForm.company.focus();
    return (false);
  }

  if (theForm.company.value.length > 80)
  {
    alert("Please enter at most 80 characters in the \"company\" field.");
    theForm.company.focus();
    return (false);
  }

	if (theForm.submit_by.value == "")
		{
		alert("Please enter a value for the \"e-mail\" field.");
		theForm.submit_by.focus();
		return (false);
		}

  if (theForm.submit_by.value.length > 150)
  {
    alert("Please enter at most 150 characters in the \"e-mail\" field.");
    theForm.submit_by.focus();
    return (false);
  }

	var checkOK = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz&#402;&#352;&#338;&#381;&#353;&#339;&#382;&#376;ÀÁÂÃÆÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝßáâåëìíîïñóôøúýþÿ0123456789-@-_.";
	var checkStr = theForm.submit_by.value;
	var allValid = true;
	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;
			}
		}

	if (!allValid)
		{
		alert("Please enter only letter, digit and \".@_-\" characters in the \"e-mail\" field.");
		theForm.submit_by.focus();
		return (false);
		}

  	adresse = theForm.submit_by.value;
	  var place = adresse.indexOf("@",1);
	  var point = adresse.indexOf(".",place+1);
	  if (!((place > -1)&&(adresse.length >2)&&(point > 1)))
		{
		alert('Please enter a valid e-mail adress!!!\r Example: name@domain.com');
		theForm.submit_by.focus();
		return (false);
		}

  if (theForm.phone.value.length > 80)
  {
    alert("Please enter at most 80 characters in the \"phone\" field.");
    theForm.phone.focus();
    return (false);
  }

  var checkOK = "0123456789-+-*/_()]['- \t\r\n\f";
  var checkStr = theForm.phone.value;
  var allValid = true;
  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;
    }
  }
  if (!allValid)
  {
    alert("Please enter only digit, whitespace and \"+-*/_()]['-\" characters in the \"phone\" field.");
    theForm.phone.focus();
    return (false);
  }
	
  if (2==1) {
	  if (theForm.codepost.value.length > 5)
	  {
		alert("Please enter at most 5 characters in the \"ZIP\" field.");
		theForm.codepost.focus();
		return (false);
	  }
	
	  var checkOK = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyzƒþŒŽšœžŸÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõöøùúûüýþ0123456789--. \t\r\n\f";
	  var checkStr = theForm.codepost.value;
	  var allValid = true;
	  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;
		}
	  }
	  if (!allValid)
	  {
		alert("Please enter only letter, digit, whitespace and \"-.\" characters in the \"ZIP\" field.");
		theForm.codepost.focus();
		return (false);
	  }
  }
  
  if (theForm.city.value.length > 80)
  {
    alert("Please enter at most 80 characters in the \"city\" field.");
    theForm.city.focus();
    return (false);
  }

  if (2==1) {
	  var checkOK = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyzƒþŒŽšœžŸÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõöøùúûüýþ0123456789--.' \t\r\n\f";
	  var checkStr = theForm.city.value;
	  var allValid = true;
	  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;
		}
	  }
	  if (!allValid)
	  {
		alert("Please enter only letter, digit, whitespace and \"-.'\" characters in the \"city\" field.");
		theForm.city.focus();
		return (false);
	  }

	  if (theForm.state.value.length > 2)
	  {
		alert("Please enter at most 2 characters in the \"state\" field.");
		theForm.state.focus();
		return (false);
	  }
	
	  var checkOK = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyzƒþŒŽšœžŸÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõöøùúûüýþ";
	  var checkStr = theForm.state.value;
	  var allValid = true;
	  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;
		}
	  }
	  if (!allValid)
	  {
		alert("Please enter only letter characters in the \"state\" field.");
		theForm.state.focus();
		return (false);
	  }
  }

  if (theForm.comments.value.length > 1500)
  {
    alert("Please enter at most 1500 characters in the \"comments\" field.");
    theForm.comments.focus();
    return (false);
  }
}
//-->

