function salvarFiltro(filtro,data1,data2){
	var dados = "filtro="+filtro+"&data1="+data1+"&data2="+data2;
	jQuery.ajax({
		type: "POST",
		url: "action/salvar_filtro",
		data: dados,
		success: function(data){
			if(data == '-1') {window.location.href = "./"; return;}
		}
	});
}

function pegarFiltro(func){
	jQuery.ajax({
		type: "POST",
		url: "action/obter_filtro",
		success: function(data){
			if(data == '-1') {window.location.href = "./"; return;}
			var jData = JSON.parse(data);
			func(jData[0],jData[1],jData[2]);
		}
	});
}