<script language="javascript">
	
	function sort_menu(channel_id,category_id,html_id){
		if($("#"+html_id).css('display')=="block"){
			$("#img_"+html_id).removeClass("_tree_open");
			$("#img_"+html_id).addClass("_tree_close");
			$("#"+html_id).hide('fast');
			$("#"+html_id).html("<img src=\"<?=BASEURI?>public/admin/discuz\images\mootree_loader.gif\"><?=$this->lang->line('loading')?>");
		}
		else{
			
			$.ajax({
			   type: "POST",
			   url: "<?=BASEURI?>model/assistant/updatehtml/"+ id +"/"+channel_id,
			   success: function(msg){
					if($(html_id).css('display')=="block"){
						$("#img_"+html_id).removeClass("_tree_close");
						$("#img_"+html_id).addClass("_tree_open");
					}
					else{
						$("#img_"+html_id).addClass("_tree_open");
						$("#img_"+html_id).removeClass("_tree_close");
					}
					$("#"+html_id).html(msg);
			   }
			}); 
			$("#"+html_id).show('fast');
			
		}
	}
	function update_html_sort(category_id,channel_id){
		
		$.ajax({
			   type: "POST",
			   url: "<?=BASEURI?>model/assistant/updatehtml/"+ category_id +"/"+channel_id,
			   success: function(msg){
					$("#right_contents").html(msg);
			   }
			}); 
	}
</script>

<li><b><font color="#FF0000"><a href="javascript:void(0)" onClick="update_html_sort(0,'<?=$channel_id?>')">
   <?=$this->lang->line('new')?>
  </a></font></b></li>
  <?php foreach($assistant as $value){?>
<li><span style="background:url(<?=BASEURI?>public/admin/joolma/images/gif_icon/tree_open.gif) no-repeat center left; cursor:pointer;"><a href="javascript:void(0)" onclick="update_html_sort('<?=$value['article_attach_category']?>','<?=$channel_id?>')">&nbsp;&nbsp;&nbsp;&nbsp;<?=$value['article_attach_name']?>
  </a></span></li>
  <?php }?>
<li id=""  style="display:none;" class="url_sort"><img src="<?=BASEURL?>public/admin/joolma/images/loading_1.gif">
  <?=$this->lang->line('loading')?>
</li>
