// JavaScript Document

String.prototype.trim = function ()
	{
	var s = this;
	while (s.charAt (0) == " ")
	s = s.substr (1);
	while (s.charAt (s.length-1) == " ")
	s = s.substr (0,s.length-1);
	return s;
	}
function verifSaisie()		
	{
	var nom = document.post.nom.value;
	nom = nom.trim ();	
	if ((nom == ""))
		{
		alert ("remplissez le champ nom / complete the field last name");
		onClick=document.post.envoyer.value='envoyer / submit';
		return false;
		}
		
	var prenom = document.post.prenom.value;
	prenom = prenom.trim ();	
	if ((prenom == ""))
		{
		alert ("remplissez le champ prenom / complete the field first name");
		onClick=document.post.envoyer.value='envoyer / submit';
		return false;
		}		
	
	var ville = document.post.ville.value;
	ville = ville.trim ();	
	if ((ville == ""))
		{
		alert ("remplissez le champ ville / complete the field city");
		onClick=document.post.envoyer.value='envoyer / submit';
		return false;
		}	
	
	var pays = document.post.pays.value;
	pays = pays.trim ();	
	if ((pays == ""))
		{
		alert ("remplissez le champ pays / complete the field state or country");
		onClick=document.post.envoyer.value='envoyer / submit';
		return false;
		}

	var critique = document.post.critique.value;
	critique = critique.trim ();
	if ((critique == ""))
		{
		alert ("remplissez les champs critique / complete the field review");
		onClick=document.post.envoyer.value='envoyer / submit';
		return false;
		}	
		
	if ((document.post.accept.checked == false))
		{
		alert ("cocher \"j'accepte les conditions d'utilisation\" / check \"I agree to the terms of use\"");
		onClick=document.post.envoyer.value='envoyer / submit';
		return false;
		}	
	}	
