function  valid_form_contact () {
  
  var flag = true;

  if($('nom').value == "" && flag == true) {
    flag = false;alert("Entrez votre NOM SVP");
  }
  
  if($('prenom').value == "" && flag == true) {
    flag = false;alert("Entrez votre PRENOM SVP");
  }
  
  if($('ville').value == "" && flag == true) {
    flag = false;alert("Entrez votre VILLE SVP");
  }
  
  if($('telephone').value == "" && flag == true) {
    flag = false;alert("Entrez votre NUMERO DE TELEPHONE SVP");
  }
  
  reg = new RegExp('^[0-9 \-]+$', 'i');
  if(!reg.test($('telephone').value) && flag == true) {
		flag = false;alert("Votre t"+String.fromCharCode('233')+"l"+String.fromCharCode('233')+"phone est invalide !");
	}
	
	if($('message').value == "" && flag == true) {
    flag = false;alert("Composez votre MESSAGE SVP");
  }
		  
  return flag;

}

function verif_contact() {
  if ( valid_form_contact() ) 
    send_contact();
}
        

function send_contact() {
	var url     = './xmlrpcnet.php';		
	var pars    =	'mode=send_contact&'+Form.serialize('form_contact');
	var target	= 'div_formulaire';	
  var myAjax	= new Ajax.Updater(target, url,	{method: 'get', parameters: pars});
	}