function submitLibelle() {
	var valid = true;
	$("#libelleForm input").each(function() {
		if ($(this).val() == '' ) {
			$(this).css('border' , '1px solid red');
			valid = false;
		} else {
			$(this).css('border' , '1px solid #8ba407');
		}
	});
	if (!valid) {
		return false;
	} else {
		/*$.ajax({
			type: "POST",
			cache: false,
			url: "/resources/scripts/libelle.php",
			data: $("#libelleForm").serializeArray(),
			success: function(data) {
				$(".form").fadeOut('slow', function() {
					$("tr.response").fadeIn();
				});	

				setTimeout(function() {
					window.location.href = 'http://www.addenda.info/consument/home';
				}, 5000);	
			}
		});*/
		var oXHR = zXmlHttp.createRequest();
            oXHR.open("post", "/resources/scripts/libelle.php", true);
            oXHR.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
            
            oXHR.onreadystatechange = function () {
                if (oXHR.readyState == 4) {
                    if (oXHR.status == 200) {
                        $(".form").fadeOut('slow', function() {
			   $("tr.response").fadeIn();
			});	
                    } 
                }            
            };
            oXHR.send($("#libelleForm").serialize()); 
	}
};
