function checkCaptcha(){
	$('#captcha').nextAll('.error').html('attente de la r&eacute;ponse du serveur...');
	$('#captcha').nextAll('.error').css({height:'auto'});
	var data = $.ajax({
		url: $('form#contactForm').attr('action')+'validation_captcha/value_'+$.base64Encode($('#captcha').val())+'/',
		type: 'POST',
		async: false
	}).responseText;
	if(parseInt(data) === 1)
		var msg = "Le champ n'a pas &eacute;t&eacute; recopi&eacute; correctement.";
	else if(parseInt(data) === 0)
		var msg = "";
	else
		var msg = "Serveur surcharg&eacute;, essayez ulterieurement.";
	$('#captcha').nextAll('.error').html(msg);
	if(!msg) $('#captcha').nextAll('.error').css({height:'1px'});
	return msg;
}

function setAutomatesContact(){	
	$('form#contactForm').submit(function(){
		if(checkCaptcha())
			return false;
		return true;
	});
}

