$(document).ready(function(){buttnoretry();
var b;
try{b=parseInt(parent.document.documentElement.clientHeight?parent.document.documentElement.clientHeight:parent.document.body.clientHeight);
}catch(d){kuayu=true;
b=parseInt(document.documentElement.clientHeight?document.documentElement.clientHeight:document.body.clientHeight);
if(b<630){b=630;
}}var c=(b-30-43)+"px";
var f=parseInt($("div#main").attr("clientWidth"));
$("div#mainleft").css("width",parseInt(f*17/100)+"px");
$("div#mainmain").css("width",parseInt(f*82/100)+"px");
$("div#main").css("height",c);
$("div#mainmain").css("height",c);
$("div#mainmiddle").css("height",c);
$("div#mainleft").css("height",c);
var e=parseInt((parseInt(c)-33)*0.46);
$("div#maintop").height(e);
$("div#mainbottom").height(parseInt(c)-37-e);
if(top==self){var a=[];
a.webhost=location.hostname;
a.targeturl=location.href.replace("http://","").replace(location.hostname,"");
$e28dd6773=request("e28dd6773").replace("_mr_",".");
$e28dd6773=$e28dd6773?$e28dd6773:location.hostname;
top.location.href="http://"+$e28dd6773+"/index.php?"+http_build_query(a);
}innerresizeWeb();
$("div.listtb_wrapdiv").live("dblclick",function(){if($(this).parent().is(".multiitembox")){}else{}var n=document.form1.cellwidth.value;
$(this).css("overflow","visible");
if(!$(this).data("float")){cancel_listtablecellfloat();
}else{return;
}$(this).data("float",1);
$listtablecell=$(this).find("div.listtablecell");
var k=$listtablecell.children(".multi_dragrightbottom");
if(k.length>0){$listtablecell.resizable({handler:".multi_dragrightbottom",min:{width:document.form1.editor_minwidth.value,height:document.form1.editor_minheight.value},max:{width:document.form1.editor_maxwidth.value,height:document.form1.editor_maxheight.value}});
}$listtablecell.addClass("listdivtuchu").css("width",(n?(n+"px"):"150%"));
var j=$listtablecell.width(),g=$listtablecell.height();
var l=document.body.clientWidth,i=document.body.clientHeight;
var h=$(this).offset();
if(h.top+g>i){if(h.left+j>l){$listtablecell.addClass("divtuchu_posbottomright");
}else{$listtablecell.addClass("divtuchu_posbottomleft");
}}else{if(h.left+j>l){$listtablecell.addClass("divtuchu_postopright");
}else{$listtablecell.addClass("divtuchu_postopleft");
}}destroycoleditor("tablelistdiv",true);
$("div.tablelistdiv").data("curobj",this);
var m=$listtablecell.find("textarea.fieldtextarea");
m.cleditor({width:"100%",height:"98%"}).closest(".fieldtextouter1").resizable({handler:".dragrightbottom",min:{width:document.form1.editor_minwidth.value,height:document.form1.editor_minheight.value},max:{width:document.form1.editor_maxwidth.value,height:document.form1.editor_maxheight.value}});
return false;
});
});
$paramarr.cfg_editor_minwidth=$paramarr.cfg_editor_minwidth?$paramarr.cfg_editor_minwidth:50;
$paramarr.cfg_editor_minheight=$paramarr.cfg_editor_minheight?$paramarr.cfg_editor_minheight:20;
$paramarr.cfg_editor_maxwidth=$paramarr.cfg_editor_maxwidth?$paramarr.cfg_editor_maxwidth:800;
$paramarr.cfg_editor_maxheight=$paramarr.cfg_editor_maxheight?$paramarr.cfg_editor_maxheight:600;
$paramarr.cfg_editor_replyboxheight=$paramarr.cfg_editor_replyboxheight?$paramarr.cfg_editor_replyboxheight:200;
$paramarr.cfg_newarc_maxnum=$paramarr.cfg_newarc_maxnum?$paramarr.cfg_newarc_maxnum:3;
$paramarr.cfg_editarc_maxnum=$paramarr.cfg_editarc_maxnum?$paramarr.cfg_editarc_maxnum:4;
$paramarr.cfg_editor_textareaheight=$paramarr.cfg_editor_textareaheight?$paramarr.cfg_editor_textareaheight:30;
$paramarr.cfg_editor_listtablefieldwidth=$paramarr.cfg_editor_listtablefieldwidth?$paramarr.cfg_editor_listtablefieldwidth:450;
$paramarr.cfg_editor_listtabletdheight=$paramarr.cfg_editor_listtabletdheight?$paramarr.cfg_editor_listtabletdheight:30;
var $elem,form=document.form1;
for(var key in $paramarr){$elem=$("[name='"+key.replace("cfg_","")+"']",form);
if($elem.is(":radio")){$elem.each(function(){if(this.value==$paramarr[key]){this.checked=true;
}});
}else{$elem.val($paramarr[key]);
}}if(typeof e6d22ba8earr=="undefined"||!e6d22ba8earr){e6d22ba8earr={};
}$(function(){$.extend($.cleditor.buttons.layout,{popupClass:"cleditorList",popupContent:'<div>每行一栏</div><div class="itemSelectCss">每行两栏</div><div>每行三栏</div>',popupClick:function(f,c){var d=f.target||window.event.srcElement;
$(d).siblings().removeClass("itemSelectCss");
$(d).addClass("itemSelectCss");
var b=$("div.arcarea");
layoutonchange("",b,c.value,true);
return false;
}});
$.extend($.cleditor.buttons.newarea_setting,{popupClass:"cleditorList",popupName:"newarea_setting",title:"新建区字段显示设置",editortype:"new",buttonClick:function(c,b){var d=$(b.popup);
if($(b.popup).html()){$(b.popup).show();
}else{$("#nodebrowdiv select#conode_"+this.editortype).clone().attr("multiple",false).val(0).bind("change",{container:d,button:b.button,owner:this},this.selectChange).appendTo(d).wrap("<div class='area_select'></div>").change();
}return true;
},selectChange:function(d){var g=d.data.container;
var h=$(this).val();
var b=d.data.owner;
var c=b.editortype;
$(this).closest("div").siblings().remove();
if(h!=0){var f=this.fieldchecked;
$(this).closest("div").siblings().remove();
g.data("nid",h);
$(d.data.button).data("nid",h);
g.append(fieldshowset(h,c=="edit"?1:0));
g.find("input:checkbox").bind("click",{nid:h,areatype:c,owner:b},b.fieldchecked);
g.find("input:text").bind("change",{nid:h,areatype:c,owner:b},b.heightchange);
g.children().hover($.cleditor.globalfunc.subitemhoverEnter,$.cleditor.globalfunc.subitemhoverLeave);
}},fieldchecked:function(g){var i=g.data.areatype;
var f=$("div#"+i+"arcarea");
var b=g.data.nid;
var h=i=="edit"?1:0;
var k=$(this).val();
var c=$(this).attr("nodetype");
var d=this.checked?1:0;
if(c=="parent"){e6d22ba8earr[b][k][1][h]=d;
}else{if(c=="son"){var j=$(this).attr("parent");
e6d22ba8earr[b][j][0][0][k][h]=d;
}else{e6d22ba8earr[b][k][h]=d;
}}if(this.checked){$("div[col='"+b+"'] div[index='"+this.value+"']",f).show();
}else{$("div[col='"+b+"'] div[index='"+this.value+"']",f).hide();
}},heightchange:function(f){var h=f.data.areatype;
var d=$("div#"+h+"arcarea");
var b=f.data.nid;
var g=h=="edit"?3:2;
var i=$(this).closest("tr").find("input:checkbox");
var k=i.val();
var c=i.attr("nodetype");
if(c=="parent"){e6d22ba8earr[b][k][1][g]=this.value;
$("div[col='"+b+"'] div.itembox1[index='"+k+"']",d).css("height",this.value+"px");
}else{if(c=="son"){var j=i.attr("parent");
e6d22ba8earr[b][j][0][0][k][g]=this.value;
$("div[col='"+b+"'] div[index='"+k+"'] div.fieldinputdiv",d).css("height",this.value+"px");
}else{e6d22ba8earr[b][k][g]=this.value;
$("div[col='"+b+"'] div[index='"+k+"'] div.fieldinputdiv",d).css("height",this.value+"px");
}}},popupClick:function(c,b){c=c||window.event;
if(c.stopPropagation){c.stopPropagation();
}c.cancelBubble=true;
return false;
}});
$.extend($.cleditor.buttons.editarea_setting,{popupClass:"cleditorList",popupName:"editarea_setting",title:"编辑区字段显示设置",editortype:"edit",buttonClick:function(c,b){var d=$(b.popup);
if($(b.popup).html()){$(b.popup).show();
}else{$("#nodebrowdiv select#conode_"+this.editortype).clone().attr("multiple",false).val(0).bind("change",{container:d,button:b.button,owner:this},this.selectChange).appendTo(d).wrap("<div class='area_select'></div>").change();
}return true;
},selectChange:function(d){var g=d.data.container;
var h=$(this).val();
var b=d.data.owner;
var c=b.editortype;
$(this).closest("div").siblings().remove();
if(h!=0){var f=this.fieldchecked;
g.data("nid",h);
$(d.data.button).data("nid",h);
g.append(fieldshowset(h,c=="edit"?1:0));
g.find("input:checkbox").bind("click",{nid:h,areatype:c,owner:b},b.fieldchecked);
g.find("input:text").bind("change",{nid:h,areatype:c,owner:b},b.heightchange);
g.children().hover($.cleditor.globalfunc.subitemhoverEnter,$.cleditor.globalfunc.subitemhoverLeave);
}},fieldchecked:function(g){var i=g.data.areatype;
var f=$("div#"+i+"arcarea");
var b=g.data.nid;
var h=i=="edit"?1:0;
var k=$(this).val();
var c=$(this).attr("nodetype");
var d=this.checked?1:0;
if(c=="parent"){e6d22ba8earr[b][k][1][h]=d;
}else{if(c=="son"){var j=$(this).attr("parent");
e6d22ba8earr[b][j][0][0][k][h]=d;
}else{e6d22ba8earr[b][k][h]=d;
}}if(this.checked){$("div[col='"+b+"'] div[index='"+this.value+"']",f).show();
}else{$("div[col='"+b+"'] div[index='"+this.value+"']",f).hide();
}},heightchange:function(f){var h=f.data.areatype;
var d=$("div#"+h+"arcarea");
var b=f.data.nid;
var g=h=="edit"?3:2;
var i=$(this).closest("tr").find("input:checkbox");
var k=i.val();
var c=i.attr("nodetype");
if(c=="parent"){e6d22ba8earr[b][k][1][g]=this.value;
$("div[col='"+b+"'] div.itembox1[index='"+k+"']",d).css("height",this.value+"px");
}else{if(c=="son"){var j=i.attr("parent");
e6d22ba8earr[b][j][0][0][k][g]=this.value;
$("div[col='"+b+"'] div[index='"+k+"'] div.fieldinputdiv",d).css("height",this.value+"px");
}else{e6d22ba8earr[b][k][g]=this.value;
$("div[col='"+b+"'] div[index='"+k+"'] div.fieldinputdiv",d).css("height",this.value+"px");
}}},popupClick:function(c,b){c=c||window.event;
if(c.stopPropagation){c.stopPropagation();
}c.cancelBubble=true;
return false;
}});
$.extend($.cleditor.buttons["new"],{popupName:1,command:newcoarc});
$.maketoolbar($("#cleditorbar"));
$("div[name='hideicon']").click(function(){var b=$(this).parent("div").attr("class");
if(b=="title"){$(this).parent().attr("class","title hiddenbar");
$(this).siblings().hide();
}else{$(this).parent().attr("class","title");
$(this).siblings().show();
}});
new straightDrag("clientX","mainmiddle","mainleft","mainmain");
new straightDrag("clientY","mainmiddle2","maintop","mainbottom");
var a=request("conote");
if(a){$("#conode_edit").val(a);
$("div#listtableicon").click();
}});
function newcoarc(C,H,R){if(this.popupName==1&&$("div.tablelistdiv").is(":visible")){tblistaddline();
return;
}var l,P,q=0,S,h,b=false,x=0;
var T="";
if(R){P=document.form1.editarc_maxnum.value;
l=$("div#mainbottom");
x=1;
S=R.eminer_nid;
q=R.eminer_aid;
T=S+"-"+q;
if(q){delete R.eminer_aid;
}delete R.eminer_nid;
delete R.eminer_url;
h=R;
if($("#mainbrowlist tr[index='"+q+"']").find("div.coltool[title='审核']").length==0){b=true;
}}else{P=document.form1.newarc_maxnum.value;
l=$("div#maintop");
S=$(C).siblings("[title='新建区字段显示设置']").data("nid");
if(!S||S==0){$(C).siblings("[title='新建区字段显示设置']").focus();
$.poping({height:"auto",overlayCSS:{display:"none"}},{},"信息提示",'<img class="os" src="images/dg_face/face_error.png" />请选择要新建文档的采集节点！');
return;
}h=e6d22ba8earr[S];
}var p=$(".arcarea",l);
var g=p.data("e47587254");
if(!g){g=0;
}if(P&&g>=P){var z=p.find(".fieldcol").last();
if(x==1){var F=z.find("div.coltool[title='保存']").attr("index");
$("#mainbrowlist tr[index='"+F+"']").find("a.titleclass").css("text-decoration","none");
}destroycoleditor(z);
z.remove();
g--;
}var i=e6d22ba8earr[S];
g++;
p.data("e47587254",g);
var w="";
var a="circleclass";
var G=$("#mainmain").data("colwidth");
if(!G){G="48%";
}else{restorewindow(p);
}var v=classnamebuilt();
var t,o,N,e,d,O,E,Q,f,c;
o=document.form1.editor_textareaheight.value;
for(var L in h){if(!i[L]||L.indexOf("eminer_")===0){continue;
}if(typeof i[L][0]=="object"){if(i[L][1]&&i[L][1][x+2]>0){o=i[L][1][x+2];
}O=R?h[L]:i[L][0];
f=0;
for(var K in O){f++;
}if(!i[L][1][x]){t="display:none;";
}else{t="";
}c="共<span class='replycount'>"+f+"</span>条";
Q='<div class="itemtoolbar">'+c+'</div><div class="coltoolbar"><div class="coltool" onclick="itemhandle(this)" title="添加" style="background-position:-135px"></div><div class="coltool" onclick="changesize(this)" type="parent" title="扩大" style="background-position:-90px"></div></div>';
N="";
N="<div index='"+L+"' class='itembox1 multiitembox' style='height:"+o+"px;"+t+"' ><div class='fieldlable1'><div class='itemplable'>"+L+":</div>"+Q+"</div>";
var J=document.form1.editor_textareaheight.value;
for(var K in O){e="";
d="";
var A=0,y=0;
for(var M in O[K]){if(x==1){textval=O[K][M];
}else{textval="";
}if(!i[L][0][0][M][x]){t="display:none;";
}else{t="";
y++;
}if(i[L][0][0][M][x+2]>0){J=i[L][0][0][M][x+2];
}d+="<div style='clear:both'></div><div index='"+M+"' class='itembox3' style='"+t+"'><div class='fieldlable3'>"+M+":</div>";
d+="<div style='clear:both'></div><div class='fieldinputdiv' style='height:"+J+"px'><div class='"+v.fieldtextouter+"'><div class='"+a+" littleaddon' onclick='changesize(this)'  type=\"son\" title=\"扩大\"></div><div class='"+v.dragclass+" littleaddon'></div><textarea   name=\""+L+"uuyyuujjbbee"+K+"uuyyuujjbbee"+M+'" nlevel="1"  class=\'fieldtextarea\'>'+textval+"</textarea></div></div></div>";
}if(y==0){t="display:none;";
}else{t="";
}e+="<div index='"+K+"' class='itembox2' style='"+t+"'>";
E='<div class="coltoolbar"><div class="coreplyindex">['+(parseInt(K)+1)+']</div><div class="coltool" onclick="itemhandle(this)" title="下降" style="background-position:-180px" ></div><div class="coltool" onclick="itemhandle(this)" title="上升" style="background-position:-195px" ></div><div class="coltool" onclick="itemhandle(this)" title="插入" style="background-position:-285px" ></div><div class="coltool" onclick="itemhandle(this)" title="关闭" style="background-position:-300px" ></div></div>';
e+=E+d+"</div>";
N+=e;
}if(e!=""){var r=$(e);
r.find("div.coltoolbar div.coreplyindex").html("");
r.css("display","none").addClass("itemtemplate").find("textarea.fieldtextarea").removeClass("fieldtextarea").addClass("fieldtextarea_temp").val("").html("");
var s=$("<div></div>").append(r).html();
}w+=N+s+"</div>";
}else{if(x==1){textval=h[L];
}else{textval="";
}if(!i[L][x]){t="display:none;";
}else{t="";
}if(i[L][x+2]>0){o=i[L][x+2];
}w+="<div index='"+L+"' class='itembox1' style='"+t+"'><div class='fieldlable'>"+L+":</div>";
w+="<div class='fieldinputdiv' style='height:"+o+"px'><div class='"+v.fieldtextouter+"'><div class='"+a+" littleaddon'  onclick='changesize(this)'  title=\"扩大\"></div><div class='"+v.dragclass+" littleaddon'></div><textarea nlevel=\"0\"  name='"+L+"' class='fieldtextarea'>"+textval+"</textarea></div></div></div>";
}}var I="",B="",u;
if(!R){I='<div class="coltool" onclick="colhandle(this)" title="新加" style="background-position:0px;display:none" ></div>';
u="insert";
}else{B='<div class="coltool" onclick="data_chuli(\''+(b?"auditcancel":"audit")+"',"+q+',this,2)" title="'+(b?"取消":"")+'审核" style="background-position:'+(b?"-360":"-330")+'px" ></div>';
u="update";
}$("#mainmain").data("colwidth",G);
if(T==""){T="新建："+g;
}var m='<div class="coarcindex">[<span>'+T+"</span>]</div>";
var D='<div class="coltoolbar">'+m+I+'<div class="coltool" onclick="colhandle(this)" title="清除" style="background-position:-15px" ></div>'+B+'<div class="coltool" onClick="data_chuli(\'del\','+(q?q:0)+',this,2);" title="删除" style="background-position:-390px" ></div><div class="coltool" index='+(q?q:0)+" onclick=\"data_chuli('"+u+"',"+q+',this,2)"  title="保存" style="background-position:-45px" ></div><div class="coltool" onclick="pubcodata(2,0,this)" title="发布" style="background-position:-60px" ></div><div class="coltool" onclick="colhandle(this)" title="还原" style="background-position:-90px" ></div><div class="coltool" onclick="colhandle(this)" title="最大化" style="background-position:-105px" ></div><div class="coltool" onclick="colhandle(this)" title="关闭" style="background-position:-120px" ></div></div>';
w="<div col='"+S+"' index='"+q+"' class='fieldcol' style='width:"+G+";'><form name=\"form_"+p.attr("id")+p.data("e47587254")+'">'+D+w+"</form></div>";
if(q){$("#mainbrowlist tr[index='"+q+"']").find("a.titleclass").css("text-decoration","underline");
}$(w).prependTo(p).find("textarea.fieldtextarea").cleditor({width:"100%",height:"100%"}).parents("."+v.fieldtextouter).resizable({handler:"."+v.dragclass,min:{width:document.form1.editor_minwidth.value,height:document.form1.editor_minheight.value},max:{width:document.form1.editor_maxwidth.value,height:document.form1.editor_maxheight.value}});
}function maketrline(K,a){var B="#000",m=0,l,L,g,x,v=1,s=false;
var M="";
var N=$("div.tablelistdiv_up table.em_edittable");
if(K){v=1;
s=false;
L=K.eminer_nid;
m=K.eminer_aid;
x=K.eminer_url;
M=L+"-"+m;
B=K.eminer_eec5f242f==0?"#000":"#999";
g=K;
if(!a){if(m){delete g.eminer_aid;
}delete g.eminer_nid;
delete g.eminer_url;
delete g.eminer_eec5f242f;
}l=K.eminer_audit==1?1:0;
}else{s=true;
v=1;
L=$("select#conode_edit").val();
g=e6d22ba8earr[L];
}var h=e6d22ba8earr[L];
var u="";
var t=classnamebuilt();
var p,H,d,c,I,C,J,e,b;
fieldinputheight=document.form1.editor_textareaheight.value;
if(a){u='<tr onclick="cancel_listtablecellfloat();destroycoleditor(\'div.tablelistdiv\',true)"><th>ID&nbsp;<img src="images/help.png" title=\'双击任一数据单元格可使之变为编辑活动格；双击标题栏或右上角“采集浏览”空白处可恢复表格。\' width="14" height="14"></th>';
}for(var F in g){if(!h[F]||F.indexOf("eminer_")===0){continue;
}if(typeof h[F][0]!="object"&&!h[F][v]){continue;
}if(a){u+="<th>"+F+"</th>";
continue;
}if(typeof h[F][0]=="object"){if(h[F][1]&&h[F][1][v+2]>0){fieldinputheight=h[F][1][v+2];
}I=s?h[F][0]:g[F];
e=0;
for(var E in I){e++;
}if(!h[F][1][v]){continue;
}else{p="";
}J="";
H="<td index='"+F+"' class='listtable_itembox1 multiitembox' ><div class='listtb_wrapdiv itembox1'><div class='listtablecell fieldtextouter1'  style='height:"+fieldinputheight+"px'><div class='multi_dragrightbottom littleaddon'></div><div class='fieldlable1'><div class='itemplable'>字段组：共<span class='replycount'>"+e+"</span>条</div>"+J+"</div>";
var D=document.form1.editor_textareaheight.value;
for(var E in I){d="";
c="";
var y=0,w=0;
for(var G in I[E]){if(!s){textval=I[E][G];
}else{textval="";
}if(!h[F][0][0][G][v]){continue;
}else{p="";
w++;
}if(h[F][0][0][G][v+2]>0){D=h[F][0][0][G][v+2];
}c+="<div index='"+G+"' class='itembox3' style='"+p+"'><div class='fieldlable3'>"+G+":</div>";
c+="<div class='fieldinputdiv' style='height:"+D+"px'><div class='fieldtextouter1'><div class='dragrightbottom littleaddon'></div><textarea   name=\""+F+"uuyyuujjbbee"+E+"uuyyuujjbbee"+G+'" nlevel="1"  class=\'fieldtextarea\'>'+textval+"</textarea></div></div></div>";
}if(w==0){p="display:none;";
}else{p="";
}d+="<div index='"+E+"' class='itembox2' style='"+p+"'>";
C='<div class="coltoolbar"><div class="coreplyindex">['+(parseInt(E)+1)+']</div><div class="coltool" onclick="itemhandle(this)" title="下降" style="background-position:-180px" ></div><div class="coltool" onclick="itemhandle(this)" title="上升" style="background-position:-195px" ></div><div class="coltool" onclick="itemhandle(this)" title="插入" style="background-position:-285px" ></div><div class="coltool" onclick="itemhandle(this)" title="关闭" style="background-position:-300px" ></div></div>';
d+=C+c+"</div>";
H+=d;
}var q="";
if(d!=""){var o=$(d);
o.find("div.coltoolbar div.coreplyindex").html("");
o.css("display","none").addClass("itemtemplate").find("textarea.fieldtextarea").removeClass("fieldtextarea").addClass("fieldtextarea_temp").html("");
var q=$("<div></div>").append(o).html();
}u+=H+q+"</div></div></td>";
}else{if(!s){textval=g[F];
}else{textval="";
}if(h[F][v+2]>0){fieldinputheight=h[F][v+2];
}u+="<td index='"+F+"' class='listtable_itembox1 singleitembox' ><div class='listtb_wrapdiv itembox1' style='height:"+document.form1.editor_listtabletdheight.value+"px'>";
u+="<div class='listtablecell fieldtextouter1' style='height:"+fieldinputheight+"px'><div class='dragrightbottom littleaddon'></div><textarea nlevel=\"0\"  name='"+F+"' class='fieldtextarea'>"+textval+"</textarea></div></div></td>";
}}if(a){return u+'<th width=\'70\'>操作<div class="coltool rtaddicon" onclick="tblistaddline()" title="添加" style="background-position:-135px"></div></th></tr>';
}var z="",r;
if(!s){z='<div class="coltool" onclick="data_chuli(\''+(l?"auditcancel":"audit")+"',"+m+',this,3)" title="'+(l?"取消":"")+'审核" style="background-position:'+(l?"-360":"-330")+'px" ></div>';
r="update";
}else{r="insert";
}var f=N.data("sele47587254");
if(!f){f=0;
}N.data("sele47587254",++f);
if(M==""){M="新建："+f;
}var i="<td style='height:"+document.form1.editor_listtabletdheight.value+'px\' class="coarcindex">[<span><a target="_blank" class="titleclass" href="'+x+'" style="color:'+B+'">'+M+"</a></span>]</td>";
var A='<td class="archandle"><div title="'+(l?"取消审核":"审核")+'" class="coltool" onClick="data_chuli(\''+(l==0?"audit":"auditcancel")+"','"+m+'\',this,3);" style="background-position:'+(l?"-360":"-330")+'px"></div><div class="coltool" index='+(m?m:0)+" onclick=\"data_chuli('"+r+"',"+m+',this,3)"  title="保存" style="background-position:-45px" ></div><div title="发布" class="coltool" onClick="pubcodata(3,\''+m+'\',this);" style="background-position:-60px"></div><div title="删除" class="coltool" onClick="data_chuli(\'del\',\''+m+'\',this,3);" style="background-position:-390px"></div></td>';
return u="<tr col='"+L+"' index='"+m+"' class='listtable_fieldtr'><form>"+i+u+A+"</form></tr>";
}function destroycoleditor(a,d){if(a=="tablelistdiv"){a=$("div.tablelistdiv").data("curobj");
}if(!a||typeof a!="object"){return;
}var f=$("textarea.fieldtextarea",a);
var b,c=0;
if(d){var e=Math.random()>0.9;
}f.each(function(g,h){try{b=$(h).data("cleditor").index;
$.cleditor.destroy(b,!d?c==0:e);
c++;
}catch(i){}});
}function restorewindow(a){$selfmainarea=a.closest(".mainarcarea");
if($selfmainarea.data("height")){var b=$selfmainarea.siblings(".mainarcarea");
$selfmainarea.height($selfmainarea.data("height"));
b.height(b.data("height"));
$selfmainarea.data("height",0);
b.data("height",0);
}if($("#mainmain").data("colwidth")){layoutonchange("",a,$("#mainmain").data("colwidth"));
}}function tblistaddline(){var a=$("div.tablelistdiv_up table.em_edittable");
if(a.length==0){$.poping({height:"auto",overlayCSS:{display:"none"}},{},"信息提示",'<img class="os" src="images/dg_face/face_error.png" />不能往空表格内添加空白文档行，请先采集或在框架式编辑区内建立新文档，然后可再回到表格式编辑区操作。');
setTimeout("$.unblockui();",3000);
return;
}a.find("tr:eq(0)").after(maketrline(0));
}function changesize(h){var d=$(h);
var e;
var f=d.parents(".mainarcarea");
var c=d.parents("div.itembox1");
var b=d.parents("div.fieldtextouter1");
var a;
var g=parseInt(f.css("height"));
if(d.attr("title")=="扩大"){d.attr("title","恢复");
d.css("background-position","-75px");
d.data("mainarcarea_scrollTop",f.get(0).scrollTop);
if(d.attr("type")=="son"){f.get(0).scrollTop=c.get(0).offsetTop+30;
c.height(g-60);
b.height(g-100);
d.data("itembox1_scrollTop",c.get(0).scrollTop);
c.get(0).scrollTop=d.parents("div.itembox2").get(0).offsetTop+d.parents("div.itembox3").get(0).offsetTop;
}else{f.get(0).scrollTop=c.get(0).offsetTop;
if(d.attr("type")=="parent"){d.data("parents_height",c.height());
c.height(g-40);
}else{b.height(g-70);
}}}else{d.attr("title","扩大");
d.css("background-position","-92px");
b.height("100%").width("100%");
f.get(0).scrollTop=d.data("mainarcarea_scrollTop");
if(d.attr("type")=="son"){c.get(0).scrollTop=d.data("itembox1_scrollTop");
}else{if(d.attr("type")=="parent"){c.height(d.data("parents_height"));
}}}}function rearangeclass(a){var b=parseInt($("#mainmain").data("colwidth").replace("%",""));
$("div.fieldcol",a).each(function(d){var c=classnamebuilt(b,d+1);
$("div.littleaddon",this).attr("class",c.dragclass+" littleaddon");
$("div.littleaddon>div",this).attr("class",c.dragclass+2);
$(".fieldinputdiv>div",this).attr("class",c.fieldtextouter);
});
}function classnamebuilt(b,a){return{dragclass:"dragrightbottom",fieldtextouter:"fieldtextouter1"};
}function layoutonchange(h,a,d,g){if(!g){g=false;
}var e=$("div.fieldcol",a).show();
var f=$("#mainmain");
$("div.fieldtextouter1").width("100%");
if(!d||d=="每行一栏"){g&&f.data("colwidth","98%");
e.css("width","98%");
}else{if(d=="每行两栏"){g&&f.data("colwidth","48%");
e.css("width","48%");
}else{if(d=="每行三栏"){g&&f.data("colwidth","32%");
e.css("width","32%");
}else{if(d.indexOf("%")>0){g&&f.data("colwidth",d);
e.css("width",d);
}}}}if(!h){if($(".fieldcol:visible",a).length){var b=$("div.fieldcol:visible",a);
var c=b.find(".coltoolbar");
if(c.find("[title='最小化']").length){h=c.find("[title='最小化']");
}}}if(h){if(h.attr("title")=="最小化"){if(h.siblings("[title='最大化']").length>0){h.attr("title","还原");
h.css("background-position","-92px");
}else{h.attr("title","最大化");
h.css("background-position","-105px");
}}else{if(h.attr("title")=="最大化"){if(h.siblings("[title='最小化']").length>0){h.attr("title","还原");
h.css("background-position","-92px");
}else{h.attr("title","最小化");
h.css("background-position","-75px");
}}else{if(h.attr("title")=="还原"){if(h.siblings("[title='最小化']").length>0){h.attr("title","最大化");
h.css("background-position","-105px");
}else{h.attr("title","最小化");
h.css("background-position","-75px");
}}}}}}function replymsgsort(b){var a=0;
$(".itembox2",b).not(".itemtemplate").each(function(){$(this).attr("index",a).find("textarea").each(function(){$(this).attr("name",$(this).attr("name").replace(/uuyyuujjbbee(\d+)uuyyuujjbbee/g,"uuyyuujjbbee"+a+"uuyyuujjbbee"));
});
a++;
});
}function itemhandle(e){var i=$(e).closest(".itembox1");
if($(e).attr("title")=="关闭"){$item=$(e).closest(".itembox2");
$countelem=i.find(".fieldlable1").find("span.replycount");
$countelem.text(parseInt($countelem.text())-1);
$.cleditor.destroy($.data($item.find("textarea").get(0),"cleditor").index);
$item.remove();
replymsgsort(i);
}else{if($(e).attr("title")=="添加"){$fieldlable1=$(e).closest(".fieldlable1");
$countelem=$fieldlable1.find("span.replycount");
var q=parseInt($countelem.text());
$countelem.text(q+1);
var c=classnamebuilt();
var r=i.children(".itemtemplate").first().clone().show().removeClass("itemtemplate").appendTo(i);
r.find("div.coreplyindex").text("["+(q+1)+"]");
r.find("textarea").each(function(){var s=$(this).removeClass("fieldtextarea_temp").addClass("fieldtextarea").attr("name").split("uuyyuujjbbee");
s[1]=q;
$(this).attr("name",s.join("uuyyuujjbbee"));
});
r.find("textarea").cleditor({width:"100%",height:"100%"}).closest("."+c.fieldtextouter).resizable({handler:"."+c.dragclass,min:{width:document.form1.editor_minwidth.value,height:document.form1.editor_minheight.value},max:{width:document.form1.editor_maxwidth.value,height:document.form1.editor_maxheight.value}});
var o=i.get(0);
i.get(0).scrollTop=i.get(0).scrollHeight;
}else{if($(e).attr("title")=="插入"){$countelem=i.find(".fieldlable1").find("span.replycount");
$countelem.text(parseInt($countelem.text())+1);
var c=classnamebuilt();
var a=i.find(".itemtemplate").first().clone().show();
a.find("textarea").removeClass("fieldtextarea_temp").addClass("fieldtextarea");
a.removeClass("itemtemplate").insertBefore($(e).closest(".itembox2")).find("textarea.fieldtextarea").cleditor({width:"100%",height:"100%"}).closest("."+c.fieldtextouter).resizable({handler:"."+c.dragclass,min:{width:document.form1.editor_minwidth.value,height:document.form1.editor_minheight.value},max:{width:document.form1.editor_maxwidth.value,height:document.form1.editor_maxheight.value}});
replymsgsort(i);
}else{if($(e).attr("title")=="下降"||$(e).attr("title")=="上升"){i=$(e).closest(".itembox2");
var m;
if($(e).attr("title")=="下降"){m=i.next();
}else{m=i.prev();
}if(m.length){var j=m;
var p=i.find("textarea");
var n=j.find("textarea");
var b,g,k,d,f,h,l;
p.each(function(s){b=$.data(this,"cleditor").$frame;
k=$(b[0].contentWindow.document.body);
h=n.get(s);
f=$.data(h,"cleditor").$frame;
d=$(f[0].contentWindow.document.body);
l=this.value;
this.value=h.value;
h.value=l;
l=k.html();
k.html(d.html());
d.html(l);
});
replymsgsort($(e).closest(".itembox1"));
}}}}}}function pubareahandle(a){if(a){$(a).closest(".xuanfu").remove();
}else{$("div.xuanfu").remove();
}}function colhandle(e){var c=$(e).closest(".fieldcol");
var f=$(e).closest(".mainarcarea");
var d=f.is("#maintop");
var h=f.siblings(".mainarcarea");
var g=$(e).closest(".arcarea");
if($(e).attr("title")=="清除"){$(e).siblings("div[title='保存']").attr("index",0);
$("iframe",c).each(function(k,l){$(this.contentWindow.document.body).html("");
$(this).siblings("textarea").get(0).value="";
});
}else{if($(e).attr("title")=="新加"){$(e).css("display","none");
c.attr("index",0);
var g;
g=c.closest(".arcarea");
c.find("div.coarcindex span").text("新建："+g.data("e47587254"));
}else{if($(e).attr("title")=="关闭"){if(!d){var i=c.find("div.coltool[title='保存']").attr("index");
$("#mainbrowlist tr[index='"+i+"']").find("a.titleclass").css("text-decoration","none");
}destroycoleditor(c);
c.remove();
g.data("e47587254",g.data("e47587254")-1);
d&&f.find(".cleditorToolbar .cleditorButton[title='新建']").removeClass("cleditorDisabled");
restorewindow(g);
}else{if($(e).attr("title")=="还原"){if(f.data("height")){f.height(f.data("height"));
h.height(h.data("height"));
}f.data("height",0);
h.data("height",0);
layoutonchange($(e),$(e).closest("div.arcarea"));
c.siblings(".fieldcol").hide();
}else{if($(e).attr("title")=="最小化"){if(f.data("height")){f.height(f.data("height"));
h.height(h.data("height"));
}f.data("height",0);
h.data("height",0);
layoutonchange($(e),$(e).closest("div.arcarea"),$("#mainmain").data("colwidth"));
}else{if($(e).attr("title")=="最大化"){var b=f.height()||parseInt(f.css("height"));
var j=h.height()||parseInt(h.css("height"));
f.data("height",b);
h.data("height",j);
var a=j-30;
if(a>0){h.height(30);
f.height(b+a);
}layoutonchange($(e),$(e).closest("div.arcarea"));
c.siblings(".fieldcol").hide();
}else{if($(e).attr("title")=="发布"){pubcodata(2,"",e);
}}}}}}}}function pubcodata(cmdsrc,aid,butt){if(em_usrrank<2){$.poping({height:"auto",overlayCSS:{display:"none"}},{},"信息提示",'<img class="os" src="images/dg_face/face_error.png" />该功能需正式用户才能使用，您的用户级别尚不足以使用该功能，请联系官网客服提升级别。');
return;
}var $parent,cmdsrc,ebb8ee038=1,e1fd8961b=1,nid,aidarr,isnew=false,arcid=0,postdata;
var pubednum=0;
var c="co_pub_action.php";
var assign_pid=$("select#e103f1080").val();
pid=assign_pid;
if(pid==0||!pid){$.poping({height:"auto",overlayCSS:{display:"none"}},{},"信息提示",'<img class="os" src="images/dg_face/face_error.png" />该采集节点未指定默认发布节点，请指定发布节点。');
return;
}var pubtype="";
var selectednum=0;
if(cmdsrc==0){$parent=$("div#mainbrow");
nid=$parent.find("input[name='arcidcheck']:checked").closest("tr").attr("col");
aid="";
$("td.arccheck input.arccheckbox:checked",$parent).each(function(){selectednum++;
aid+=this.value+",";
});
if(aid==""){$.poping({height:"auto",overlayCSS:{display:"none"}},{},"信息提示",'<img class="os" src="images/dg_face/face_error.png" />请选中要发布的文档。');
return;
}else{aid=aid.toString().substr(0,aid.length-1);
aidarr=aid.split(",");
}arcid=aidarr[0];
ebb8ee038=0;
eminer0.successact=function(owner,data){if(data.ee0941534==0){$("table.em_edittable tr[index='"+aidarr[pubednum]+"']").find("a.titleclass").css("color","#999");
}if((data.ee0941534==0&&!data.forever_prevpid)||(data.ee0941534==1&&typeof(data.forever_prevpid)!="undefined")){pubednum++;
nid=$("#mainbrowlist tr[index='"+aidarr[pubednum]+"']").attr("col");
owner.eae31a53a.arcid=aidarr[pubednum];
if(pubednum==selectednum-1){owner.eae31a53a.ebb8ee038=1;
}else{if(pubednum>=selectednum){return false;
}}pid=assign_pid;
if(pid==0||!pid){$.poping({height:"auto",overlayCSS:{display:"none"}},{},"信息提示",'<img class="os" src="images/dg_face/face_error.png" />该采集节点未指定默认发布节点，请指定发布节点！');
return false;
}owner.eae31a53a.pid=pid;
}return true;
};
}else{if(cmdsrc==2){$parent=$(butt).closest(".fieldcol");
}else{$parent=$(butt).closest("tr");
}nid=$parent.attr("col");
if(!aid||aid==0){aid=$parent.attr("index");
}if(!aid||aid==0){isnew=true;
pubtype="insert";
}aidarr=[aid];
arcid=aid;
if(cmdsrc>1){var e4bab7fb7={};
$("textarea",$parent).not(".fieldtextarea_temp").each(function(idx,elem){if($(elem).next("iframe").length>0){e4bab7fb7[$(elem).attr("name")]=$(elem).next("iframe").contents().find("body").html();
}else{e4bab7fb7[$(elem).attr("name")]=$(elem).val();
}});
postdata=e4bab7fb7;
}ebb8ee038=1;
}if(cmdsrc>1){e1fd8961b=1;
}else{e1fd8961b=0;
}eval("if(typeof eminer"+pid+" == 'undefined')eminer"+pid+" = new co_pub();eminer0=eminer"+pid);
eminer0.isfloatwindow=false;
eminer0.emcj_err=0;
eminer0.eae31a53a={};
var maininfo="<div  id=\"repaircostart\" style=\"display:block;\"><div class='copubbox'><div class='copubbar'><div id='now'></div></div><div id='go'><div class='initmsg'><img class='os' src='images/loading.gif'/>发布工作准备中，请稍等...</div></div></div></div>";
$.poping({height:"300px",overlayCSS:{display:"none"}},{},"内容发布",maininfo);
$.extend(eminer0.eae31a53a,{e9d2722af:1,pubtype:pubtype,action:"robot",kw_g:1,ecab1c4fe:1,e6dd1f3ba:1,eabd06204:1,ec7fca41a:1,e05ca0eb9:1,e0c34fff6:1,pid:pid,e1fd8961b:e1fd8961b,temp_phrase:4,ed171cc1a:1,ebb8ee038:ebb8ee038,arcid:arcid});
eminer0.finishact=function(status){if(status=="finish"){if(!isnew){$("table.em_edittable tr[index='"+arcid+"']").find("a.titleclass").css("color","#999");
}}else{}};
eminer0.postdata=postdata;
eminer0.e1fd8961b=e1fd8961b;
eminer0.eminerpuberr_allownum=3;
eminer0.eminerpub(c+"?"+http_build_query(eminer0.eae31a53a));
}function fieldshowset(a,h){var g="edit";
h=h?h:0;
if(h==0){g="new";
}var e=e6d22ba8earr[a];
var d=0,f="";
for(var c in e){if(c.indexOf("eminer_")!==0){d++;
}}if(d>0){f="<form name=fieldsetform><table width=100% class='fieldsset'>";
for(var b in e){if(b.indexOf("eminer_")===0){continue;
}if(typeof e[b][0]=="object"){f+="</tr>";
f+='<td width=14><input nodetype="parent" type="checkbox" index="'+(e[b][1][h]?"2":"1")+'" value="'+b+'" name="'+g+"_eminerfield_check_"+b+'" '+(e[b][1][h]?"checked":"")+" /></td><td>"+b+'</td><td width=24><input title="字段框的高，单位：像素" class="fieldsetheight" value="'+e[b][1][h+2]+'" type="text" name="'+g+"_eminerfield_height_"+b+'"></td>';
f+="</tr>";
for(var j in e[b][0][0]){f+="</tr>";
f+='<td width=14><input nodetype="son" parent="'+b+'" type="checkbox" index="'+(e[b][0][0][j][h]?"2":"1")+'" value="'+j+'" name="'+g+"_eminerfield_check_"+j+'" '+(e[b][0][0][j][h]?"checked":"")+" /></td><td>"+j+'</td><td width=24><input title="字段框的高，单位：像素" class="fieldsetheight" value="'+e[b][0][0][j][h+2]+'" type="text" name="'+g+"_eminerfield_height_"+j+'"></td>';
f+="</tr>";
}}else{f+="</tr>";
f+='<td width=14><input nodetype="common" type="checkbox" index="'+(e[b][h]?"2":"1")+'" value="'+b+'" name="'+g+"_eminerfield_check_"+b+'" '+(e[b][h]?"checked":"")+" /></td><td>"+b+'</td><td width=24><input title="字段框的高，单位：像素" class="fieldsetheight" value="'+e[b][h+2]+'" type="text" name="'+g+"_eminerfield_height_"+b+'"></td>';
f+="</tr>";
}}f+='<tr><td colspan=3 align="right"><input  value="保存" type="button"  height="22" border="0" class="coolbg fieldssetbutt"  onclick="savefieldset(\'savefieldset\','+a+',this)" /></td></tr>';
f+="</table></form>";
}return f;
}function fieldssetconfirm(a){}function fieldoncheck(a){var c=$(a).attr("checked");
var e=$(a).attr("index");
var d=$(a).attr("name").indexOf("edit")!=-1?1:0;
e6d22ba8earr[e][$(a).attr("value")][d]=c;
var b=$(a).parents("div.mainarcarea");
if(c){$("div[col='"+e+"'] div[index='"+$(a).val()+"']",b).show();
}else{$("div[col='"+e+"'] div[index='"+$(a).val()+"']",b).hide();
}}function editArc(b){if(!b||b==0){b="";
var a=0;
$("td.arccheck input.arccheckbox:checked").each(function(){b+=this.value+",";
a++;
});
if(a>parseInt(document.form1.editarc_maxnum.value)){$.poping({height:"auto",overlayCSS:{display:"none"}},{},"信息提示",'<img class="os" src="images/dg_face/face_error.png" />同时编辑的文档数已超过设置值：'+$paramarr.cfg_editarc_maxnum);
return;
}if(b==""){$.poping({height:"auto",overlayCSS:{display:"none"}},{},"信息提示",'<img class="os" src="images/dg_face/face_error.png" />请选中要编辑的文档.');
return;
}else{b=b.toString().substr(0,b.length-1);
}}$('<div class=\'xuanfu\' style=\'top:10px;left:5px\'><div class="shutoff" onclick="pubareahandle(this)" title="关闭" style="background-position:-300px"></div><div id=\'go\'><img class="os" src="images/loading.gif" />  调取文档中...</div></div>').css("z-index",200).appendTo($("#mainbrow"));
$.ajax({type:"GET",url:"mr_ajaxgetconode.php?ajax=1&eb5707348=editarc&aid="+b,dataType:"json",cache:false,success:showeditArcdata,error:function(){$("div.xuanfu #go").html("网络或服务器故障，未能获取到该文档的相关信息！");
setTimeout('$("div.xuanfu").remove();',5000);
}});
}function showeditArcdata(c){if(c.status=="success"||c.status=="1"){$("div.xuanfu").remove();
var a=c.data;
for(var b in a){newcoarc("","",a[b]);
}}else{$("div.xuanfu #go").html("未能获取到该文档的相关信息！");
setTimeout('$("div.xuanfu").remove();',5000);
}}function getcodata(d,f,e,a){$("#maincontent").data("args",arguments);
if(e=="table"){$("div.tablelistdiv_up").data("args",arguments);
}else{$("#mainmain").data("args",arguments);
}if(!d){d=0;
}if(!e){e="common";
}var c=document.form1;
if(!f||f==0){f=$("select#conode_edit").val();
if(!f||f==0){$(c.conode).focus();
$.poping({height:"auto",overlayCSS:{display:"none"}},{},"信息提示",'<img class="os" src="images/dg_face/face_error.png" />请选中一采集节点！');
return;
}}if(d&&$(c.conode).data("oldval")&&!arrcompare(f,$(c.conode).data("oldval"))){if(!confirm("你已经更改了采集节点，如点确定将重新检索。")){return;
}else{d=0;
}}if(typeof(f)=="object"){f=f.join(",");
}var b=c.pagesize.value;
if(!b){$(c.pagesize).focus();
$.poping({height:"auto",overlayCSS:{display:"none"}},{},"信息提示",'<img class="os" src="images/dg_face/face_error.png" />请设置每页显示数！');
return;
}$("div#leftloading").show();
$.poping({height:"auto",overlayCSS:{display:"none"}},{},"提示信息",'<img class="os" src="images/loading.gif" />调取文档中...');
$.ajax({buttsrc:a,type:"GET",url:"mr_ajaxgetconode.php?ajax=1&e3b2a8bb8="+e+"&eb5707348=getcodata&ea15ee1fe="+[c.ea15ee1fe0.checked?1:0,c.ea15ee1fe1.checked?1:0,c.ea15ee1fe2.checked?1:0].join("")+"&pagesize="+b+"&page="+d+"&nid="+f,dataType:"json",cache:false,success:getdatahandle,error:dataerrorhandle});
}function dataerrorhandle(a,c,b){$("#popmaininfo").html("服务器或网络故障！未检索到信息");
setTimeout("$.unblockui();",3000);
}function getdatahandle(c){var l=this.buttsrc;
$.unblockui();
var h="",e=c.data;
if(c.e3b2a8bb8=="table"){if(c.status=="success"){if(l){$("#listtableicon").click();
}var f=0,g="",m;
for(var d in e){m=e[d];
if(f==0){g="<table cellspacing=0 cellpadding=0  class='lz_table em_edittable'>";
g+=maketrline(m,true);
}g+=maketrline(m);
f++;
}if(g){g+="</table>";
}var b=$2("maincontent").clientHeight-50;
$("div.tablelistdiv_up").height(b).html(g);
$("div.tablelistdiv_down").html(c.page_str);
}else{if(c.status=="not"){$.poping({height:"auto",overlayCSS:{display:"none"}},{},"信息提示",'<img class="os" src="images/dg_face/face_error.png" />该节点尚无采集记录，请先行采集！');
setTimeout("$.unblockui();",5000);
}}}else{if(c.status=="success"){if(l){$("#titlelisticon").click();
}var k='<tr col="nid" index="coaid"><td class="arccheck"><input class="arccheckbox" type="checkbox" value="coaid" name="arcidcheck" /></td><td class="arcnodenum"><a class="titleclass" title="nid-coaid:courl" target="_blank" href="courl">nid-subaid</a></td><td class="maintd"><div class="titleouterdiv"><div><a title="编辑" class=\'titleclass\' style="color:titlecolor;" href="javascript:editArc(\'coaid\');">cotitle</a></div></div></td><td class="archandle"><div title="审核" class="coltool" onClick="data_chuli(\'audit_type\',coaid,this,1);" style="background-position:auditiconpx"></div><div title="发布" class="coltool" onClick="pubcodata(1,coaid,this);" style="background-position:-60px"></div><div title="删除" class="coltool" onClick="data_chuli(\'del\',coaid,this,1);" style="background-position:-390px"></div></td></tr>';
$("select#conode_edit").data("oldval",$("select#conode_edit").val());
$("#mainbrow").css("height",($("#mainleft").attr("clientHeight")-$("#leftbottarea").attr("clientHeight")-38)+"px");
var j,a;
for(var d in e){a=e[d]["aid"].toString().length-3;
j=e[d]["aid"].toString().substr(a?a:0);
h+=k.replace(/coaid/g,e[d]["aid"]).replace(/subaid/g,j).replace(/nid/g,e[d]["nid"]).replace(/courl/g,e[d]["url"]).replace(/cotitle/g,e[d]["title"]).replace(/audit_type/g,e[d]["audit"]==0?"audit":"auditcancel").replace(/auditicon/g,e[d]["audit"]==0?"-330":"-360").replace(/审核/g,e[d]["audit"]==0?"审核":"取消审核").replace(/titlecolor/g,e[d]["eec5f242f"]==0?"#000":"#999");
}$("table#mainbrowlist").html(h);
$("#listpagebar").html(c.page_str);
if($("ul#nodesetting input[name='showtype']:checked").attr("value")==0){changetitleurl(0);
}if($("ul#nodesetting input[name='titlealign']:checked").attr("value")==1){$("div.titleouterdiv>div","#mainbrowlist").css("float","right");
}}else{if(c.status=="not"){$.poping({height:"auto",overlayCSS:{display:"none"}},{},"信息提示",'<img class="os" src="images/dg_face/face_error.png" />该节点尚无采集记录，请先行采集！');
setTimeout("$.unblockui();",5000);
}}}}function list_settoggle(b){var e,d=$("#maincontent").data("args");
e=$("select#conode_edit").val();
if(!e||e==0){$("select#conode_edit").focus();
$.poping({height:"auto",overlayCSS:{display:"none"}},{},"信息提示",'<img class="os" src="images/dg_face/face_error.png" />请选中一采集节点！');
return;
}if(!d){d=[];
}var c=$("#mainmain").data("args");
var a=$("div.tablelistdiv_up").data("args");
if(!c||!a||(c&&a&&(c[0]!=a[0]||c[1]!=e||a[1]!=e||c[1]!=a[1]))){if($("#listtableicon").is(":visible")&&$("#titlelisticon").is(":visible")){if($(b).attr("id")=="listtableicon"){if((c&&a)||!a||a[1]!=e){$("div.tablelistdiv_up").html("");
$("div.tablelistdiv_down").html("");
getcodata(d[0]?d[0]:0,e,"table");
}}else{if($(b).attr("id")=="titlelisticon"){if((c&&a)||!c||c[1]!=e){$("table#mainbrowlist").html("");
$("#listpagebar").html("");
getcodata(d[0]?d[0]:0,e,"common");
}}}}else{if($(b).attr("id")=="listtableicon"&&$("#listtableicon").is(":visible")&&$("#titlelisticon").is(":hidden")){$("div.tablelistdiv_up").html("");
$("div.tablelistdiv_down").html("");
getcodata(d[0],e,"table");
}else{if($(b).attr("id")=="titlelisticon"&&$("#titlelisticon").is(":visible")&&$("#listtableicon").is(":hidden")){$("table#mainbrowlist").html("");
$("#listpagebar").html("");
getcodata(d[0],e);
}}}}$(b).siblings(".switchicon").show();
if($(b).is("#listtableicon")){$("div.wrapdiv").height(29);
$("div.tablelistdiv").show();
$("#browsetting").html("采集浏览");
$(b).siblings(".titlelisticon").hide();
$("#selectallcheck").attr("disabled",true);
}else{if($(b).is("#titlelisticon")){$("div.wrapdiv").height("100%");
$("div.tablelistdiv").hide();
$(b).siblings(".titlelisticon").show();
$("#mainsetting").hide();
$("#browsetting").html("采集浏览");
$("#mainbrow").show();
$("#listpagebar").show();
$("#selectallcheck").attr("disabled",false);
}else{if($(b).is("#seticon")){$("div.wrapdiv").height("100%");
$("div.tablelistdiv").hide();
$(b).siblings(".titlelisticon").hide();
$("#mainsetting").show();
$("#browsetting").html("设置");
$("#listpagebar").hide();
$("#mainbrow").hide();
$("#selectallcheck").attr("disabled",true);
}}}$(b).hide();
}function editcodata(e){var d="",c='<tr col="nid" index="coaid"><td class="arccheck"><input class="arccheckbox" type="checkbox" value="coaid" name="arcidcheck" /></td><td class="arcnodenum"><a title="nid-coaid:courl" target="_blank" href="courl">nid-subaid</a></td><td class="maintd"><div class="titleouterdiv"><div><a title="编辑" class=\'titleclass\' style="color:titlecolor;" href="javascript:editArc(\'coaid\');">cotitle</a></div></div></td><td class="archandle"><div title="审核" class="coltool" onClick="data_chuli(\'audit_type\',coaid,this,1);" style="background-position:auditiconpx"></div><div title="发布" class="coltool" onClick="pubcodata(1,coaid,this);" style="background-position:-60px"></div><div title="删除" class="coltool" onClick="data_chuli(\'del\',coaid,this,1);" style="background-position:-390px"></div></td></tr>';
if(e.edittype=="insert"){var b=e.aid.toString().length-3;
var a=e.aid.toString().substr(b?b:0);
var d=c.replace(/coaid/g,e.aid).replace(/subaid/g,a).replace(/nid/g,e.nid).replace(/courl/g,"新建").replace(/cotitle/g,e.title).replace(/audit_type/g,e.audit==0?"audit":"auditcancel").replace(/auditicon/g,e.audit==0?"-330":"-360").replace(/审核/g,e.audit==0?"审核":"取消审核").replace(/titlecolor/g,e.eec5f242f==0?"#000":"#999");
$("#mainbrowlist").prepend(d);
if($("ul#nodesetting input[name='showtype']:checked").attr("value")==0){changetitleurl(0,e.aid);
}if($("ul#nodesetting input[name='titlealign']:checked").attr("value")==1){$("div.titleouterdiv>div","#mainbrowlist tr[index='"+e.aid+"']").css("float","right");
}}else{$tr=$("#mainbrowlist tr[index='"+e.aid+"']");
if($("ul#nodesetting input[name='showtype']:checked").attr("value")==0){$("td.arcnodenum>a",$tr).text(e.nid+"-"+e.aid+":"+e.title);
}else{$("div.titleouterdiv>div>a",$tr).text(e.title);
}}}if($("ul#nodesetting input[name='showtype']:checked").attr("value")==0){changetitleurl(0);
}function changetitleurl(a,e){var c=true;
var b=$("ul#nodesetting input[name='showtype']:checked").attr("value");
if(typeof a=="object"){$(a).attr("disabled",true);
$(a).siblings("input:radio").attr("disabled",false);
}else{if(a==b){c=true;
}else{return;
}}var d;
if(e){d=$("div.titleouterdiv>div>a","#mainbrowlist tr[index='"+e+"']");
}else{d=$("div.titleouterdiv>div>a","#mainbrowlist");
}if(c){d.each(function(){var k=$(this).closest("tr");
var i=k.find("div.titleouterdiv>div>a");
var f,g,h,j,l;
f=k.find("td.arcnodenum>a");
g=f.attr("title");
l=g.indexOf(":");
if(l){h=g.substr(g.indexOf(":")+1);
j=g.substr(0,g.indexOf(":"));
}f.attr("title",j+":"+i.text());
i.html(h);
});
}}function layoutchange(a){var b=$(a).parents("div.mainarcarea");
if($(a).val()==1){$("div.fieldcol",b).css("width","98%");
}else{if($(a).val()==2){$("div.fieldcol",b).css("width","48%");
}else{if($(a).val()==3){$("div.fieldcol",b).css("width","32%");
}}}}function checkindexspan_change(b){var a=$("div.main"+b+"buttbar span.checkitem");
a.html("");
$("div#"+b+"arcarea div.fieldcol").each(function(c,d){a.append('<input type="checkbox" value="'+c+'" name="arcidcheck" />'+(c+1)+"&nbsp;");
$(this).attr("idx",c);
});
}function selectarc(a,b){}function cancel_listtablecellfloat(){if($("div.tablelistdiv").data("curobj")){$($("div.tablelistdiv").data("curobj")).css("overflow","hidden").data("float",false).find("div.listtablecell").removeClass("listdivtuchu").removeClass("divtuchu_postopright").removeClass("divtuchu_postopleft").removeClass("divtuchu_posbottomleft").removeClass("divtuchu_posbottomright");
}}function leftbarshowHide(a){$("#"+a).toggle();
$("#mainbrow").css("height",($("#mainleft").attr("clientHeight")-$("#mainleftmain").attr("clientHeight")-$("#leftbottarea").attr("clientHeight"))+"px");
}function savesettings(b){var d="savesettings",a="gettype=post";
var c=$(b.form).serialize();
$.poping({height:"auto",overlayCSS:{display:"none"}},{},"信息提示",'<img class="os" src="images/loading.gif" />保存中，请稍候...');
$.ajax({type:"POST",url:"mr_sys_info.php?"+a+"&ajax=1&eb5707348="+d,data:c,dataType:"json",cache:false,success:function(e){if(e.status=="success"||e.status==1){$("#popmaininfo").html("已成功保存");
setTimeout(function(){$.unblockui();
},3000);
}else{$("#popmaininfo").html(e.info?e.info:("遇到故障，未成功保存"));
setTimeout(function(){$.unblockui();
},3000);
}},error:function(){$("#popmaininfo").html("遇到故障，未成功操作");
setTimeout(function(){$.unblockui();
},3000);
}});
}function savefieldset(g,h,c){var d="保存",b="gettype=post";
var f=$(c).closest("div.cleditorPopup");
var e=$(c.form).serialize();
$('<div class=\'xuanfu\'><div class="shutoff" onclick="pubareahandle(this)" title="关闭" style="background-position:-300px"></div><div id=\'go\'><img class="os" src="images/loading.gif" />  '+d+"中...</div></div>").css("z-index",200).prependTo(f);
var h=f.find("select").val();
if(!h){a();
}$.ajax({type:"POST",url:"mr_ajaxgetconode.php?"+b+"&ajax=1&eb5707348="+g+"&nid="+h,data:e,dataType:"json",cache:false,success:function(i){if(i.status=="success"||i.status==1){f.find("#go").html("已成功"+d);
setTimeout(function(){f.find(".xuanfu").fadeOut("normal",function(){f.find(".xuanfu").remove();
});
},2000);
}else{f.find("#go").html(i.info?i.info:("遇到故障，未成功"+d));
setTimeout(function(){f.find(".xuanfu").fadeOut("normal",function(){f.find(".xuanfu").remove();
});
},3000);
}},error:a});
var a=function(){f.find("#go").html("遇到故障，未成功操作");
setTimeout(function(){f.find(".xuanfu").fadeOut("normal",function(){f.find(".xuanfu").remove();
});
},3000);
};
}function data_chuli(n,d,f,k){if(!k){k=0;
}var l=[];
var a=function(v,z){var y,w;
if(n=="audit"){n="auditcancel";
}else{n="audit";
}for(var x in v){y=$("table.em_edittable tr[index='"+v[x]+"']");
$fieldcol=$("#editarcarea>.fieldcol[index='"+v[x]+"']");
if($fieldcol.length>0){w=$fieldcol.find("div.coltool[title='"+r+"']");
w.attr("title",s).css("background-position",g).attr("onclick","").unbind("click").click(function(){data_chuli(n,v[x],w[0],k);
});
}y.find("input.arccheckbox").attr("checked",false);
y.find("div.coltool[title='"+r+"']").attr("title",s).css("background-position",g).attr("onclick","").unbind("click").click(function(){data_chuli(n,v[x],f,k);
});
}};
var u=function(v,x){if(p){o.remove();
p=false;
}else{for(var w in v){$("table.em_edittable tr[index='"+v[w]+"']").remove();
$("div#editarcarea").find("div[index='"+v[w]+"']").remove();
}}};
var b=function(v,w){if(p){p=false;
o.attr("index",w.aid);
o.find("td.coarcindex span").text(w.nid+"-"+w.aid);
}editcodata(w.data);
};
var e;
var i="";
var o,h=0,j=false,s,g,m,r,q,t,p=false;
if(k==0){o=$("div#mainbrow");
h=o.find("input[name='arcidcheck']:checked").closest("tr").attr("col");
d="";
$("td.arccheck input.arccheckbox:checked").each(function(){d+=this.value+",";
});
if(!d||d==0){$.poping({height:"auto",overlayCSS:{display:"none"}},{},"信息提示",'<img class="os" src="images/dg_face/face_error.png" />请选中要'+r+"的文档");
return;
}else{d=d.toString().substr(0,d.length-1);
l=d.split(",");
}}else{if(k==2){j=true;
e=o=$(f).closest(".fieldcol");
}else{if(k==3){j=true;
}e=o=$(f).closest("tr");
}h=o.attr("col");
if(!d||d==0){d=o.attr("index");
}if(!d||d==0){p=true;
}l=[d];
}if(!h||h==0){return;
}if(n=="auditcancel"){if(!d||d==0){$.poping({height:"auto",overlayCSS:{display:"none"}},{},"信息提示",'<img class="os" src="images/dg_face/face_error.png" />新文档审核无意义。');
setTimeout("$.unblockui();",3000);
return;
}r="取消审核";
s="审核";
g="-330px";
m="#000";
q=a;
}else{if(n=="audit"){if(!d||d==0){$.poping({height:"auto",overlayCSS:{display:"none"}},{},"信息提示",'<img class="os" src="images/dg_face/face_error.png" />新文档审核无意义。');
setTimeout("$.unblockui();",3000);
return;
}r="审核";
s="取消审核";
g="-360px";
m="#29769B";
q=a;
}else{if(n=="del"){r="删除";
if(p&&k>1){o.remove();
return;
}q=u;
}else{if(n=="update"||n=="insert"){if(!d||d==0){n="insert";
}else{n="update";
}if(em_usrrank<2){$.poping({height:"auto",overlayCSS:{display:"none"}},{},"信息提示",'<img class="os" src="images/dg_face/face_error.png" />该功能需正式用户才能使用，您的用户级别尚不足以使用该功能，请联系官网客服提升级别。');
return;
}r="保存";
m="#29769B";
q=b;
var c={};
if(k>1){if(k==2){$(f).siblings("div[title='新加']").css("display","");
}if(!d||d==0){n="insert";
}else{n="update";
}$("textarea",e).not(".fieldtextarea_temp").each(function(v,w){if($(w).next("iframe").length>0){c[$(w).attr("name")]=$(w).next("iframe").contents().find("body").html();
}else{c[$(w).attr("name")]=$(w).val();
}});
c.e5f1e473a=e6d22ba8earr[h]["e5f1e473a"];
t=c;
}}}}}$.poping({height:"auto",overlayCSS:{display:"none"}},{},"提示信息",'<img class="os" src="images/loading.gif" />'+r+"中...");
$.ajax({type:"POST",url:"mr_ajaxgetconode.php?"+i+"&ajax=1&eb5707348="+n+"&aid="+d+"&nid="+h,data:t,dataType:"json",cache:false,success:function(v){if(v.status=="success"||v.status==1){if(q){q(l,v);
}$("#popmaininfo").html("已成功"+r);
setTimeout(function(){$.unblockui();
},1000);
}else{$("#popmaininfo").html(v.info?v.info:("遇到故障，未成功"+r));
setTimeout(function(){$.unblockui();
},3000);
}},error:function(){$("#popmaininfo").html("遇到故障，未成功操作");
setTimeout(function(){$.unblockui();
},3000);
}});
}function table_settoggle(c){var a=$("div.wrapdiv");
var b=$("div.tablelistdiv");
if(c||b.is(":hidden")){a.height(29);
b.show();
}else{a.height("100%");
b.hide();
}}function nodesettingswitch(b){var c=$(b).attr("class");
if(c.indexOf("listtableli")!=-1){c="listtableli";
}else{if(c.indexOf("frameli")!=-1){c="frameli";
}else{if(c.indexOf("dragli")!=-1){c="dragli";
}else{if(c.indexOf("superli")!=-1){c="superli";
}}}}if(c=="superli"){var a=$(b).find("span");
var d=a.text();
if(d=="折叠"){$(b).siblings("li").hide();
a.text("更多");
}else{$(b).siblings("li.globalli").show();
a.text("折叠");
}}else{$(b).siblings("li."+c).toggle();
}}function editfieldssetting(b){var a=$("#editareasettingmenu");
if(a.is(":visible")){a.hide();
}else{a.show();
}var c=$(b),f=c.offset(),e=--f.left,d=f.top+c.height();
a.css({left:e,top:d}).show();
$.cleditor.popups.eminer_editareasetting=a[0];
setTimeout("$.cleditor.showpops=true;",500);
}