$(document).ready(function(){ 
	buttnoretry();
	if(top==self){
		var paramarr=[];
		paramarr['webhost'] = location.hostname ;
		paramarr['targeturl']=location.href.replace('http://','').replace(location.hostname,'');		
		$e28dd6773=$e28dd6773?$e28dd6773:request('e28dd6773').replace('_mr_','.');
		$e28dd6773=$e28dd6773?$e28dd6773:location.hostname;
		top.location.href='http://'+ $e28dd6773 +'/index.php?'+http_build_query(paramarr);
	}
	innerresizeWeb();
}); 
//编辑节点
function EditNote(nid)
{
	var stradd='';
	var ebee555a9=0;
	if(!nid) {var nidarr = getitemarr(); nid=nidarr[0];ebee555a9=nidarr[1];}
	else {
		ebee555a9=$(":radio[name='nids'][value='"+nid+"']").attr("ebee555a9");
	}
	if(!nid){ alert("请选择一个节点！"); return;}
	location.href = 'http://'+window.name.replace('_mr_','.')+"/mr_co_edit.php?ebee555a9="+ebee555a9+"&eb5707348=edit&nid="+nid;
}
//编辑节点
function browcoarc(nid)
{
	if(!nid) {var nidarr = getitemarr(); nid=nidarr[0];}
	if(!nid){ alert("请选择一个节点！"); return;}
	location.href = 'http://'+window.name.replace('_mr_','.')+"/mr_co_batchedit.php?conote="+nid;
}
//采集所选节点
function GatherSel(nid)
{
	if(!nid) {var nidarr = getitemarr();nid=nidarr[0];ebee555a9=nidarr[1];if(ebee555a9==0)ebee555a9name='';else ebee555a9name='eminer';}  
	if(!nid){ alert("请选择一个节点！"); return;}
	var curl='http://'+window.name.replace('_mr_','.')+"/mr_co_gatherstart.php?nid="+nid+(ebee555a9name ? "&nodetype="+ebee555a9name:'');
	var maininfo="<div id=\"div_dialogcontent\"><iframe src=\""+curl+"\" frameborder=\"0\" width=\"100%\" id=\"div_dialog_iframe\" style=\"overflow: visible; height:360px;border: 1px solid #D1DDAA;\"></iframe></div>";	
	var ed946d2b0=$("tr[index='"+nid+"'] td.ed946d2b0").text().split(":");
	if(ed946d2b0.length>1)ed946d2b0=ed946d2b0[1];else ed946d2b0=ed946d2b0[0];
	$.poping({height:'auto'},{},'采集节点--'+ed946d2b0,maininfo);
}


//获得选中其中一个的id
function getitemarr()
{
	var $node; 
	$node=$("input[name='nids']:checked");
	return [$node.val(),$node.attr("ebee555a9")];	
}






function addconode()
{
	var maininfo=$("div#addnodequery").html();
	$.poping({width:'580px',height:'auto'},{},'添加采集节点',maininfo);
}
function selectnodetype_confirm(butt){
    var conode_type=$("#popmaininfo :radio[name='conode_type']:checked").val();
    location.href = 'http://' + window.name.replace('_mr_','.')+"/mr_co_edit.php?ebee555a9="+conode_type+"&eb5707348=new";
}
function data_chuli(e52731e59,aid){
	var act_del=function(data){
		
		
		document.location.reload();
		return true;
	}
	var nid=0,nexttitle,nextpos,nextcolor,acttitle,successafter_actfunc,jsondata,params,opts,pops,titleinfo,maininfo,callbackfunc;
	var aidarr=[];
	if(aid)aidarr=[aid];else{//浏览栏的顶端发出的命令
		aid='';
		$("input:radio.np:checked").each(function(){
			aid += this.value+',' ; 
		});
	}

	if (e52731e59=='del') {
		//callbackfunc=act_del;
		acttitle='删除';
	}

	if(aid==''){alert("请选中要"+acttitle+"的文档");return;}
	else {
		aid=aid.toString().substr(0,aid.length-1);
		aidarr=aid.split(',');
	}


	if (e52731e59=='del') {		
		if(!(window.confirm('你确定要删除这个节点吗?'))) return;
	}
	
	var curl="?ajax=1&eb5707348="+e52731e59+"&id="+aid;
	$.submitajax(curl,params,opts,pops,titleinfo,maininfo,callbackfunc);
}