function checkOther()
{
	if($('U_IDList').length>0)
	{
		SetSelectValue('U_IDList');
		return false;
	}	
	else
	{
		alert("请增加记录。");
		return true;
	}	
	
	
}

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=$('U_IDList');
	for(i=selobj.options.length-1;i>=0;i--)
  {
    var s_value=selobj.options[i].value;
  	s_idlst+=","+s_value;
  }

  return s_idlst;
}

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

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

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


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