function GetRepeat(s_lst)
{
	var s_con=s_lst.split('$');
	location.href="repeat.aspx?cid="+s_con[1]+"&md5="+s_con[0]+"&rnd="+Math.random();
}

function LoadBody()
{
	if(top.o_pageTemplate.length==0)
	{
		ExecuteScript("/admin/dynamic.aspx?sel=4&Rnd="+Math.random());
	} 
}

function MoveItem()
{
	var b_item=beforeRolloverSubmit($('frmlist'), '未选择任何记录。');
	
	if(b_item)
	{
		popup_open("classtree.aspx?id="+s_cid,"选择目标分类",410,70);
	}
}

function UpdateTime()
{
	var b_item=beforeRolloverSubmit($('frmlist'), '未选择任何记录。');
	
	if(b_item)
	{
		if(confirm("您是否确实要更新选定的记录？"))
		{
			$('formdo').value="update";
			$('frmlist').submit();
		}
	}
	
}

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

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(docobj.getElementById("chktyp").checked)
	{
		s_para+=",C_Type="+docobj.getElementById("selpagetype").value+" ";
	}	
	
	if(docobj.getElementById("chkft").checked)
	{
		s_para+=",C_Status="+docobj.getElementById("selfiletype").value+" ";
	}	
	
	if(docobj.getElementById("chkupdate").checked)
	{
		s_para+=",C_update='"+docobj.getElementById("txtupdate").value+"' ";
	}
	
	if(s_para!="")
	{
		s_para=s_para.substr(1);
	}
	
	$('frmlist').action="contentlist.aspx";
	$('formdo').value="batch";
	$('para').value=s_para;
	$('frmlist').submit();
}



//群发软件
function Publish()
{
	var b_item=beforeRolloverSubmit($('frmlist'), '未选择任何记录。');
	
	if(b_item)
	{
		if(confirm("您是否确实要群发选定的记录？"))
		{
			var s_txt="IDLIST="+location.host;
			var itemObjs=document.getElementsByName("itemid");
			for(i=0;i<itemObjs.length;i++)
			{
				 var chkobj=itemObjs[i];
				 if(chkobj.checked)
				 {
				 	s_txt+=","+chkobj.value;	
				 }
			}
			
			
			copyToClipboard(s_txt);
		}
	}
	
}

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