function test(c_id, url){
	if(c_id==0){
		return false;
	}
	var s = 1;
	$.ajax({
		type: 'POST',
		url: url,
		data: "c_id="+c_id+"&s="+s,
		dataType:'text',
		success: function(msg){
			$('#category').empty();
			$('#category').append('<option value="all">选择二级分类</option>');
			$('#category').append(msg);
		}
	});

	return false;
}
//按分类筛选话题
function select(report_c_id, url){
	document.getElementById('more').href='list.php?c_id='+report_c_id;
	$('#loading-status').html('正在载入...');
	$.ajax({
		type: 'POST',
		url: url,
		data: "report_c_id="+report_c_id+"&category=1",
		dataType:'text',
		success: function(msg){
			$('#list_topic').empty();

			$('#list_topic').append(msg);
			$('#loading-status').html('');
		}
	});
	return false;
}
//热门话题
function hot_topic(url){
	var report_c_id = $('#select').val();
	document.getElementById('more').href='list.php?c_id='+report_c_id+'&hot=1';
	if(report_c_id>0){
		var _url = "hot=1&report_c_id="+report_c_id;
	}else{
		var _url = "hot=1";
	}
	$('#new').removeClass();
	$('#hot').addClass('on');
	$('#loading-status').html('正在载入...');
	$.ajax({
		type: 'POST',
		url: url,
		data: _url,
		dataType:'text',
		success: function(msg){
			$('#list_topic').empty();
			$('#list_topic').append(msg);
			$('#loading-status').html('');
		}
	});
	return false;
}
//最新话题
function new_topic(url){
	var report_c_id = $('#select').val();
	document.getElementById('more').href='list.php?c_id='+report_c_id+'&new=1';
	if(report_c_id>0){
		var _url = "new=1&report_c_id="+report_c_id;
	}else{
		var _url = "new=1";
	}
	$('#hot').removeClass();
	$('#new').addClass('on');
	$('#loading-status').html('正在载入...');
	$.ajax({
		type: 'POST',
		url: url,
		data: _url,
		dataType:'text',
		success: function(msg){
			$('#list_topic').empty();
			$('#list_topic').append(msg);
			$('#loading-status').html('');
		}
	});
	return false;
}

