function salvarFiltro(filtro,data1,data2,data3 = '',data4 = '',data5 = '',data6 = '',data7 = '',data8 = ''){
	var dados = "filtro="+filtro+"&data1="+data1+"&data2="+data2+"&data3="+data3+"&data4="+data4+"&data5="+data5+"&data6="+data6+"&data7="+data7+"&data8="+data8;
	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],jData[3],jData[4],jData[5],jData[6],jData[7],jData[8]);
		}
	});
}