function RefreshClass(s_nid)
{
    //debugger;
    
	UploadClass(s_id,1);
	
	
	if(s_nid!=undefined)
	{
		UploadClass(s_nid,2);
	}
	
	location.reload();
}

function MoveItem()
{
	var b_item=beforeRolloverSubmit($('frmlist'), '未选择任何记录。');
	
	if(b_item)
	{
		var s_id="0";
		var itemobj=document.getElementsByName("itemid");
		for(i=0;i<itemobj.length;i++)
		{
			if(itemobj[i].checked)
			{
				s_id+=","+itemobj[i].value;
			}	
		}
		
		popup_open("classtree.aspx?class=1&itemid="+s_id,"选择目标分类",410,70);
	}
}

function StartMoveItem(s_do,s_id,s_sync)
{
	$('frmlist').action="classlist.aspx?sync="+s_sync;
	
	$('formdo').value=s_do;
	$('para').value=s_id;
	$('frmlist').submit();
}

function Batch()
{
	var b_item=beforeRolloverSubmit($('frmlist'), '未选择任何记录。');
	
	if(b_item)
	{
		popup_open("batchdo.aspx?type=0","批量处理",510,150);
	}
}

function StartBatch(docobj)
{
	var s_para="";
	//debugger;
	
	if(docobj.getElementById("chktmp").checked)
	{
		s_para+=", C_Template="+docobj.getElementById("seltemplate").value+" ";
	}	
	
	if(docobj.getElementById("chkord").checked)
	{
		s_para+=", C_Order="+docobj.getElementById("txtord").value+" ";
	}	
	
	if(s_para!="")
	{
		s_para=s_para.substr(1);
	}
	
	$('frmlist').action="classlist.aspx";
	$('formdo').value="batch";
	$('para').value=s_para;
	$('frmlist').submit();
}