$(function()
{
	$(".myFilter, .listFilter, .today_end_filter, .today_going_filter").each(function()
	{
		$(this).val($(this).attr("filter"));
	});
	$(".myFilter").change(function()
	{
		var temp=$(".myFilter");
		var filter=[];
		var data="";
		var url="businessList.bus?";
		for(var i=0;i<temp.length;i++)
		{
			filter[i] = $(temp[i]).val();
			data+="&filter="+filter[i];
		}
		window.location=url+data;
	});
	
	$(".modifyBtn").click(function()
	{
		var token="&token="+$("#token").val();
		var url=$(this).attr("url")+".bus?";
		var data ="&modiNum="+$(this).attr("value");
		var td = $(this).parents("tr").children();
		var d = [];
		
		d[0] = $(td[0]).children().val();
		d[1] = $(td[1]).children().val();
		d[2] = $(td[2]).children().val();
		d[3] = $(td[3]).children().val();
		d[4] = $(td[4]).children().val();
		d[5] = $(td[5]).children().val();
		d[6] = $(td[6]).children().val();				

		var dat = "&data=";
		var da="";
		for(var i=0;i<d.length;i++)
		{
			d[i] =encodeURI(d[i]); 
			da+=dat+d[i];
		}
		alert(da);
		window.location=url+data+da+token;
	});
});
