function articles(json)
		{
			$("#pickeddatebegincluster").val(json.query.from_date);
			$("#pickeddateendcluster").val(json.query.to_date);
			$("#recherche").val(json.query.text);
			for (j = 0; j < json.query.categories.length; j++)
			{
				if(json.query.categories[j] == "International")
				{
					alert('Inter');
					$('input[id=categorie1]').attr('checked', true);
				}
				else if(json.query.categories[j] == "France")
				{
					alert('France');
					$('input[id=categorie2]').attr('checked', true);
				}
				else if(json.query.categories[j] == "Economie")
				{
					alert('Economie');
					$('input[id=categorie3]').attr('checked', true);
				}
				else
				{
					alert('Culture');
					$('input[id=categorie4]').attr('checked', true);
				}
			}
			

		 	content = "<div class=\"articles\">";
			for (i = 0; i < json.documents.length; i++)
			{
				content += "<div class=\"article\"><div class=\"inner-article clearfix\"><h2><a id=\""+json.documents[i].id+"\" title=\"Lire l\'article\" href=\""+json.documents[i].url_document+"\">";
				content += json.documents[i].title;
				content += " »</a></h2><p class=\"author\"><a href=\"#\">";
				content += json.documents[i].date;
				content += " </a><br/> by <a href=\"#\">";
				content += json.documents[i].author[0].name;
				content += "</a></p><div class=\"article-content\"><div class=\"article-visuel-wrap\"><img class=\"article-visuel\" src=\"/static/img/visuel-article.jpg\" alt=\"\" /></div><p class=\"resume\">";
				content += json.documents[i].abstract;
				content += " </p></div></div></div>";
			}
			content +="</div>";
			$("#right").empty();
			$(content).appendTo("#right");
		}
		
$(function(){
				
		// Formulaire POST AJAX
		$("#ajax3").submit( function() 
		{
			var urlSubmit = $(this).attr('action');
			currentcategories = [];
			/*var data = { 'categories' : []};*/
			$("input:checked").each(function() {
					/*data['categories'].push($(this).val());*/
					currentcategories.push($(this).val());
			});
			currentfromdate= $("#pickeddatebegin").val();
			currenttodate= $("#pickeddateend").val();
						
			$.ajax(
			{  
				type: "POST",
				url: urlSubmit,
				data      : $(this).serializeArray(),
				success: function(data) {
					
					var json = jQuery.parseJSON(data);
					
					content = "<div class=\"articles\">";
					for (i = 0; i < json.documents.length; i++)
					{
						content += "<div class=\"article\"><div class=\"inner-article clearfix\"><h2><a id=\""+json.documents[i].id+"\" title=\"Lire l\'article\" href=\""+json.documents[i].url_document+"\">";
						content += json.documents[i].title;
						content += " »</a></h2><p class=\"author\"><a href=\"#\">";
						content += json.documents[i].date;
						content += " </a><br/> by <a href=\"#\">";
						content += json.documents[i].author[0].name;
						content += "</a></p><div class=\"article-content\"><div class=\"article-visuel-wrap\"><img class=\"article-visuel\" src=\"/static/img/visuel-article.jpg\" alt=\"\" /></div><p class=\"resume\">";
						content += json.documents[i].abstract;
						content += " </p></div></div></div>";
					}
					content +="</div>";
					$("#right").empty();
					$(content).appendTo("#right");	
				}
			});
			return false;
		});
		
		 $('.checkbox_category').click(function(){
			  /*var theValue = $(this).val();*/
			 $('#ajax3').submit();
  		});
	
});//jQuery