function checkOther()
{
	SetSelectValue('C_IDList');
	return false;
}

var i_type=0;
var i_table=0;
function AddItem(i_tab,i_sel)
{
	i_type=i_sel;
	i_table=i_tab;
	var s_idlst=GetSelectIdList();
  popup_open("/admin/getcontent/default.aspx?tp="+i_sel+"&nid="+escape(s_idlst),"选择相关"+(i_sel==0?"资讯":"产品")+"记录",510,465);

}

function GetSelectIdList()
{
  var s_idlst="0";
  var selobj=$('C_IDList');
	for(i=selobj.options.length-1;i>=0;i--)
  {
    var s_value=selobj.options[i].value;
    
    var re = new RegExp("_(\\d+)#","i");  //Create regular expression object.
    re.exec(s_value);
    if(re.test(s_value))
    {
  		s_idlst+=","+RegExp.$1;
  	}	
  }

  return s_idlst;
}

//插入数据
function SetItem(o_con)
{
	
	for(var o in o_con)
  {
    $('C_IDList').options[$('C_IDList').length] = new Option(o_con[o].name, i_table+"_"+o+"#"+i_type);
  }
}

function MoveItem(i_move)
{
	MoveItemSelect($('C_IDList'),i_move);
}

function DelItem()
{
	
	DelSelectItem($('C_IDList'));
}


function checkRowToggle(s_id)
{
	if($('box_' +s_id).checked)
		parent.GetSelect(s_id,$('ahr'+s_id).innerText);
	else
		parent.ClearSelect(s_id);
} 