var formCommentaires = {
	name: 'reagissez'
	,initComponent: function() {
		var options = {
			target: '#reponseForm'
			,beforeSubmit: this.showRequest
			,success: this.showResponse
			,url: '../ajax/ajaxRequest.php?action=writeComment'
			,type: 'post'
		};

		$('#reagissez').ajaxForm(options);		
	}
	,showRequest: function (formData, jqForm, options) {
		var queryString = $.param(formData); 
		
		 
		
		return true; 
	}
	,showResponse: function(responseText, statusText) {
	}
	
};

function CheckLen(Target) {
	
	// cette fonction calcule et affiche le nombre de caracteres saisi pour le message a envoyer
	var maxLength = 85;
	
	if (Target.value.length > maxLength) {
		Target.value = Target.value.substring(0,maxLength);
		CharsLeft = 0;
	}
	else {
		CharsLeft = maxLength - Target.value.length;
	}

	$('#labelCommentaire').html("Commentaire ("+CharsLeft+" caractères restant) :");
}
