// Function affichant les differentes div caché du filtre
function affiche_box_filtre(div) {
	$(".box_filtre").each(function (i) {
		if($(this).css('display') == "block" && $(this).attr("id") != div) {
			//alert($(this).attr("id"));
			$(this).css('display', 'none');
		}
	});
	
	if($('#'+div).css('display') == 'none') {
		$('#'+div).css('display', 'block');
		if($('#'+div).height() >= 200) {
			$('#'+div).height(200);
		}
	} else {
		$('#'+div).css('display', 'none');
	}				
}

function check(div, all) {
	if(all) {
		$("."+div).each(function (i) {
			if($(this).attr("checked")) {
				$(this).attr("checked", false);
			}
		});
	} else {
		if($("#"+div).attr("checked")) {
			$("#"+div).attr("checked", false);
		}
		
		/* check_all = true;
		$("."+div).each(function (i) {
			if($(this).attr("checked") && check_all) {
				all = true;
			} else {
				check_all = false;
			}
		});
		
		 if(all) {
			$("."+div).each(function (i) {
				if($(this).attr("checked")) {
					$(this).attr("checked", false);
				}
			});
			$("#"+div).attr("checked", true);
		} */
	}
	$('#form-filtre').submit();
}
