$paramarr=[];
function nav(){if(window.navigator.userAgent.indexOf("MSIE")>=1){return"IE";
}else{if(window.navigator.userAgent.indexOf("Firefox")>=1){return"FF";
}else{return"OT";
}}}function include(a){var b=document.getElementsByTagName("head")[0];
script=document.createElement("script");
script.src=a;
script.type="text/javascript";
b.appendChild(script);
}function IsNumber(a){if(a!=null&&a!=""){return !isNaN(a);
}return false;
}function myObj(a){return document.getElementById(a);
}function resizeWeb(d){var c=winSize();
var b=/^\d+$/;
var a=c.h-10-(d?d:0);
if(b.test(a)){$("table#tab1").height(a);
$("td#frmtd").height(a-43);
}}function jumpto2(a,c){var b=$("iframe")[0];
b.src=a;
}function innerresizeWeb(){var a;
var b=false;
try{a=parseInt(parent.document.body.clientHeight);
}catch(c){b=true;
a=parseInt(document.body.clientHeight);
if(a<630){a=630;
}}$("div#main").css("min-height",(a-74)+"px");
$("div#maincontent").css("min-height",(a-96)+"px");
if(!b){iFrameHeight(true,$("div#main").height());
}}function iFrameHeight(c,a){if(!a){a=false;
}var b,f,g;
if(c){g=parent.window.document;
b=$("iframe",parent.document.body)[0];
}else{g=document;
b=$("iframe")[0];
}try{f=g.frames&&g.frames[0].document?g.frames[0].document:b.contentDocument;
}catch(d){}if(b!=null&&f!=null){b.height=(a?a:f.body.scrollHeight);
}}function winSize(){var a={};
if(self.innerHeight){a.h=self.innerHeight;
a.w=self.innerWidth;
}else{if(document.documentElement){a.h=document.documentElement.clientHeight;
a.w=document.documentElement.clientWidth;
}else{a.h=document.body.clientHeight;
a.w=document.body.clientWidth;
}}return a;
}function showHide(b){var a=$(b).next();
$(a).toggle(a.css("display")=="none");
}function arrcompare(b,a){if(b&&typeof b!="object"){b=[b];
}if(a&&typeof a!="object"){a=[a];
}for(var c in b){if(b[c]!=a[c]){return false;
}}return true;
}String.prototype.trim=function(){return this.replace(/(^\s*)|(\s*$)/g,"");
};
function setcoo(oldcoo,newcoo){if(typeof oldcoo=="undefined"){oldcoo="";
}if(newcoo.indexOf("=")>0){var s=newcoo.split("; ");
for(var i=0;
i<s.length;
i++){var d=s[i].split("=");
if(d[0]){if(oldcoo.indexOf(d[0]+"=")>-1){oldcoo=oldcoo.replace(eval("/"+d[0]+"=[^;]+/"),s[i]);
}else{oldcoo+="; "+s[i];
}}}}return oldcoo.replace("; ; ","; ").replace(/^; /,"");
}function judgeimg(a){var b=false;
if(a&&a.clientWidth&&a.clientWidth>10){return true;
}else{alert(a.clientWidth);
alert(a);
return false;
}}function parse_str(param1,glue,isfilter){if(typeof glue=="undefined"||!glue){glue="&";
}var arr=[];
var param2={};
if(param1.indexOf("=")>0){var s=param1.split(glue);
for(var i=0;
i<s.length;
i++){var d=s[i].split("=");
if(d[0]&&(!isfilter||d[0].indexOf("temp_")!=0)){try{eval("param2."+d[0]+"='"+d[1]+"';");
}catch(e){}}}}else{return false;
}return param2;
}function http_build_query(d,c){if(typeof c=="undefined"||!c){c="&";
}var a=[];
for(var b in d){a.push(b+"="+d[b]);
}return a.join(c);
}function mergecoo(b,a){if(typeof b=="undefined"){b=[];
}if(typeof a=="undefined"){a=[];
}return arr2coo($.extend(coo2arr(b),coo2arr(a)));
}function coo2arr(c){var b=[];
var f=c.split("; ");
for(var a in f){if(a!==""&&typeof f[a]!="undefined"&&f[a]!==""){var d=f[a].split("=");
b[d[0]]=d[1];
}}return b;
}function arr2coo(b){var c="";
for(var a in b){c+=(a+"="+b[a])+"; ";
}if(c){return c.replace(/;\s?$/,"");
}else{return"";
}}function GetRadioValue(b){var c;
c=document.getElementsByName(b);
if(c!=null){var a;
for(a=0;
a<c.length;
a++){if(c[a].checked){return c[a].value;
}}}return null;
}function table2query(d,b,k){if($("#"+d).length==0){return;
}var h=[];
var c,a;
var l="";
$("table#"+b).find("tr.fieldtr").each(function(){if(c=$("a.fieldname",this).text()){h[c]=$("input:text:last",this).val();
}});
var m="e442dfe17";
if(d.indexOf("l_")>=0){m="e6ef7019d";
}if(/Content-Disposition:\s+?form-data;\s+?/i.test($2(d).value)){var j=$paramarr.cfg_multipost_splitstr?$paramarr.cfg_multipost_splitstr:"------WebKitFormBoundaryHphRLaax7DEsICAy";
try{j=content.substring(0,/\n/g.exec(content).index);
}catch(f){j=$paramarr.cfg_multipost_splitstr?$paramarr.cfg_multipost_splitstr:"------WebKitFormBoundaryHphRLaax7DEsICAy";
}for(var g in h){l+=j+"\r\n";
l+='Content-Disposition: form-data; name="'+g+'"\r\n\r\n'+h[g]+"\r\n";
}if(l){l+=j+"--";
}}else{for(var g in h){l+=g+"="+h[g]+"&";
}if(l.slice(-1)=="&"){l=l.slice(0,-1);
}}$2(d).value=l;
if(!k){alert("已成功操作!");
}}function query2table(databoxid,tableid,notalert){var arrfield,selectoptionvalue=$("#ea23972cb").val();
var areatype=$("#"+tableid).attr("areatype");
if(areatype=="l"){eval("if(typeof l_fieldarr"+selectoptionvalue+" =='undefined')l_fieldarr"+selectoptionvalue+"={};arrfield=l_fieldarr"+selectoptionvalue+";");
}else{if(areatype=="p"){eval("if(typeof p_fieldarr"+selectoptionvalue+" =='undefined')p_fieldarr"+selectoptionvalue+"={};arrfield=p_fieldarr"+selectoptionvalue+";");
}else{eval("if(typeof c_fieldarr"+selectoptionvalue+" =='undefined')c_fieldarr"+selectoptionvalue+"={};arrfield=c_fieldarr"+selectoptionvalue+";");
}}var content=$2(databoxid).value.replace(/(^\s*)|(\s*$)/g,"");
var field_temparr=[];
var reg_ContentDisposition=/Content-Disposition:\s+?form-data;\s+?/i;
if(reg_ContentDisposition.test(content)){var reg_filename=/name\s?=\s?['"]([^"']+)['"]/i;
var reg_formdata=/Content-Disposition:\s*form-data/i;
var splitstr=$.trim(content.substr(0,/Content-Disposition/gi.exec(content).index));
var itemarr=content.split(splitstr);
var arr1,temparr;
for(var i in itemarr){if(reg_ContentDisposition.test(itemarr[i])){if(!(arr1=reg_filename.exec(itemarr[i]))){alert("提交内容为空或格式不符");
return content;
}temparr=itemarr[i].split(reg_filename);
if(temparr.length>1){field_temparr[arr1[1]]=$.trim(temparr.pop());
}else{field_temparr[arr1[1]]="";
}}}}else{var arr=content.split("&");
if(arr.length<1){return false;
}for(var i in arr){var itemarr=arr[i].split("=");
field_temparr[itemarr[0]]=itemarr[1];
}}if(field_temparr){$("table#"+tableid+" tr.fieldtr").remove();
for(var i in field_temparr){querytable_add(tableid,i,field_temparr[i],arrfield);
}}if(!notalert){alert("已成功操作!");
}}function querytable_add(a,g,b,c){var l=isSupportAttr("placeholder");
var j=$("table#"+a);
var d=j.closest("div").get(0);
if(typeof g=="undefined"){g="";
d.scrollTop=d.scrollHeight;
}if(typeof b=="undefined"){b="";
}if(c&&c[g]&&b.indexOf("{emArray:")==-1){c[g]["type"]=0;
}var f="";
if(b.indexOf("提示：")==0){f="placeholder='"+b+"' "+(l?"":"onFocus='placeholdfocus(this)' onblur='placeholdblur(this)' ");
if(l){b="";
}}var h="<tr class='fieldtr' isselected="+((g==""&&b=="")?1:0)+"><td><input id='arcID' name='arcID' type='checkbox' value=1 /></td><td><a class='underline fieldname' href='javascript:void(0)' onclick='itemset(this)'>"+g+"</a></td><td><input class='fullcell' tabIndex=1 value='"+b.replace("'",'"')+"' "+f+" /></td></tr>";
var k=false;
j.find("tr.fieldtr").each(function(){if(!k&&!($(this).find("input").length)){$(this).replaceWith(h);
k=true;
return;
}});
if(k==false){$(h).appendTo($("table#"+a)).find("input:text:last").focus();
}}function querytable_del(b){var a=0;
$("table#"+b+" :checkbox[name='arcID']").each(function(){if(this.checked){a++;
$(this).parents("tr.fieldtr").remove();
}});
if(a==0){alert("请选中要删除的字段");
}}function placeholdfocus(a){if(a.value==a.placeholder){a.value="";
}return true;
}function placeholdblur(a){}function getCheckboxItem(){var a="";
if(document.form1.arcID.value){return document.form1.arcID;
}for(i=0;
i<document.form1.arcID.length;
i++){if(document.form1.arcID[i].checked){if(a==""){a=document.form1.arcID[i].value;
}else{a=a+"`"+document.form1.arcID[i].value;
}}}return a;
}function adddouhao(a){if(typeof a!="string"){return"";
}if(a.substr(0,1)!=","){a=","+a;
}if(a.slice(-1)!=","){a=a+",";
}return a;
}function request(f){var d=new RegExp("(^|&)"+f+"=([^&]*)(&|$)","i");
var g=window.location.search.substr(1).match(d);
if(g!=null){return unescape(g[2]);
}return"";
}function banbubble(a){var b=(a)?a:window.event;
if(window.event){if(b.stopPropagation){b.stopPropagation();
}b.cancelBubble=true;
}else{b.stopPropagation();
b.cancelBubble=true;
}}function percent2px(d,c){var b,a;
if(c=="width"){b=document.body.clientWidth?document.body.clientWidth:document.documentElement.clientWidth;
return parseInt(b*d);
}else{a=document.body.clientHeight?document.body.clientHeight:document.documentElement.clientHeight;
return parseInt(a*d);
}}function selAll(){for(i=0;
i<document.form2.arcID.length;
i++){if(!document.form2.arcID[i].checked){document.form2.arcID[i].checked=true;
}}}function noSelAll(){for(i=0;
i<document.form2.arcID.length;
i++){if(document.form2.arcID[i].checked){document.form2.arcID[i].checked=false;
}}}function adjustval(c,b,a){if(typeof c!="string"){c="";
}c=adddouhao(c);
if(a){if(c.indexOf(","+b+",")>-1){}else{c=c+b;
}}else{if(c.indexOf(","+b+",")>-1){c=c.replace(","+b+",",",");
}else{}}return adddouhao(c);
}function ActRuleCallback(a,f,c,b){var d={};
if(c="alert"){alert(f);
}else{d.info=f;
d.status=a;
d.title=a=="success"?"操作成功":"操作失败";
d.data=c;
d.url=b;
$.updatepop(d);
}}function getCheckboxItem(){var a="";
if(document.form2.arcID.value){return document.form2.arcID.value;
}for(i=0;
i<document.form2.arcID.length;
i++){if(document.form2.arcID[i].checked){if(a==""){a=document.form2.arcID[i].value;
}else{a=a+"`"+document.form2.arcID[i].value;
}}}return a;
}function startpreviewxpath(b,h,d){var j,g=document.form1;
j="co_getsource_url_action.php";
var a=$(b).attr("previewurltype");
if(typeof eminer_getxpath=="undefined"){eminer_getxpath=new co_pub();
}eminer_getxpath.eae31a53a.e95159ca1=a?a:0;
eminer_getxpath.postdata=$(g).serialize();
if(!d){if(g.ee329075e.value==""){$("input#ee329075e").focus();
alert("采集网站网址不能为空！");
return;
}}if($("input#e441cba98").val()){eminer_getxpath.eae31a53a.temp_e441cba98=$("input#e441cba98").val();
}if(h){eminer_getxpath.eae31a53a.temp_e441cba98=h;
}eminer_getxpath.eae31a53a.temp_nextstep="e3871fa0a";
var f='<div id="popmaininfo_inner" style="height:100%;font-size:10pt;background:#ffffff"><br><div style="width:200px;height:auto;border:1px solid #898989;text-align:left"><div style="width: 95px; height: 0px; background-color: rgb(130, 157, 131);" id="now"></div></div><br><span id="go"></span><br></div>';
if($("#poping").length>0){$("#poping div.popingembase").hide();
$("#popmaininfo").append(f);
}else{$.poping({restormaxbutt:1,height:"150px"},{},"预览网页以获取节点Xpath",f);
}$("#poping #go").html("<img class='os' src='images/loading.gif' />&nbsp;&nbsp;请稍等待。。。");
eminer_getxpath.eminerco(j+"?e9d2722af=1&action=robot&kw_g=1&ecab1c4fe=1&e6dd1f3ba=1&eabd06204=1&ec7fca41a=1&e05ca0eb9=1&nid=T1&e66756569=1&temp_origin=1&"+http_build_query(eminer_getxpath.eae31a53a)+"&donow=1&eminer_innerindex=0&ec6017fed=1");
}function xpath_eminer(){eminer_getxpath.eae31a53a.temp_e441cba98=$("input#testurl").val();
if(!eminer_getxpath.eae31a53a.temp_e441cba98){alert("请输入测试网址。");
$("input#testurl").focus();
}eminer_getxpath.eae31a53a.temp_nextstep="browspage";
var b=eminer_getxpath.courl+"?"+http_build_query(eminer_getxpath.eae31a53a);
delete eminer_getxpath.eae31a53a.temp_e441cba98;
var a="";
a="&nbsp;&nbsp;<input id='shutinnderwindow' value='关 闭' type='button' height='22' class='coolbg2' onclick='shutinnerwindow(this)' />";
var f='<iframe src="'+b+'" frameborder="0" width="100%" id="div_dialog_iframe" style="overflow: visible; height:88%;"></iframe><div id="xpathbar"><div>Xpath地址：<input class=\'p80h16\' id="inputxpath" /></div><div class=\'xpathbuttdiv\'>'+a+"<input id='getlastxpathbutt' value='获取通用Xpath' type='button' height='22' class='coolbg2' />&nbsp;&nbsp;<input id='xpathhighlight' value='Xpath区高亮' type='button' height='22' class='coolbg2' /><span class='xpathpubblespan'>选区冒泡：<input id='xpathpubble' name='xpathpubble' type='checkbox' value=1 class='np' onclick=\"if(this.checked)$2('pubbledelay').style.display='inline';else $2('pubbledelay').style.display='none';\" />&nbsp;</span><span id='pubbledelay' style='display:none;margin-left:5px'>冒泡间隔秒数：<input class='pubbledelaycls' style='width:30px' id='pubbledelayinput' name='pubbledelayinput' value=1 type='text' /></span><span id='xpathinfo'></span></div></div>";
var h;
try{h=top.document||document;
}catch(g){h=document;
}var d=parseInt(h.body.clientHeight*0.85);
var c=parseInt(h.body.clientWidth*0.8);
$("#poping").css("width",c).css("height",d);
$.blockui.impl.abscenter($2("poping"));
$("#poping #popmaininfo_inner").html(f);
eminer_getxpath=null;
delete eminer_getxpath;
}function emwchange(a){if(a.src.indexOf("emwrestore")!=-1){$("#poping").width($(a).data("width"));
$("#poping").height($(a).data("height"));
a.src="images/emwmax.png";
}else{$(a).data("width",$("#poping").width());
$(a).data("height",$("#poping").height());
var f;
try{f=top.document||document;
}catch(d){f=document;
}var c=parseInt(f.body.clientHeight);
var b=parseInt(f.body.clientWidth);
$("#poping").css("width",b).css("height",c);
a.src="images/emwrestore.png";
}$.blockui.impl.abscenter($2("poping"));
}function shutinnerwindow(a){if($("div.popingembase").length>0&&$("div.popingembase").siblings(":visible").length>0){$("div.popingembase").show().siblings().remove();
}else{try{$.unblockui();
}catch(b){parent.window.$.unblockui();
}}}function setCookie(c,g){var a=setCookie.arguments;
var j=setCookie.arguments.length;
var b=(j>2)?a[2]:null;
var h=(j>3)?a[3]:"";
var f=(j>4)?a[4]:"";
if(b!=null){var d=new Date();
d.setTime(d.getTime()+(b*1000*3600*24));
}document.cookie=c+"="+escape(g)+((b==null)?"":("; expires="+d.toGMTString()))+((f=="")?"":("; domain="+f))+((h=="")?"":("; path="+h));
}function getCookie(a){var b=a+"=";
if(document.cookie.length>0){offset=document.cookie.indexOf(b);
if(offset!=-1){offset+=b.length;
end=document.cookie.indexOf(";",offset);
if(end==-1){end=document.cookie.length;
}return unescape(document.cookie.substring(offset,end));
}else{return"";
}}else{return"";
}}function deleteCookie(a){var b=new Date();
b.setTime(b.getTime()-(86400*1000*1));
setCookie(a,"",b);
}function opfhxoiuz(t){var o=false;
var n=document.location.href;
if(t.indexOf("|")>0){var m=t.split("|");
if(n.indexOf(m[0])>0){var l=m[1].substr(0,1);
var k=m[1].substr(1,2)+m[1].substr(5,2);
var j=k+l;
j=j.substr(1,4);
var r="robot";
var q="qjpemail";
var p="key";
j=j+r+q+p;
j=j.substr(0,4);
if(j=="2687"){if(l==1){o="t1";
}else{o="t0";
}}}}return o;
}function browse(a){return'<a href="'+a+'" title="BROWSE" target="_blank"><img src="'+path()+'/system/images/os/brow.gif" class="os" /></a>';
}function fetchtemplate(select){if(em_usrrank<10&&$("#eaaed87de").val()=="emusr1"){alert("此节点为公共示例节点，不能修改！");
return false;
}var lastoptionvalue=$(select).data("lastvalue");
if(typeof(lastoptionvalue)=="undefined"){lastoptionvalue=$(select).find("option[first='1']").attr("value");
}if(!lastoptionvalue){lastoptionvalue=0;
}var $lastoption=$(select).find("option[value='"+lastoptionvalue+"']");
var $option=$(select).find("option:selected");
$(select).data("lastvalue",$option.attr("value"));
var tempval=$(select).val();
var emid=$option.attr("emid");
var emlocate=1;
var ecca23550=$option.attr("ecca23550");
var haspostarea=document.form1.e535ded19.value.indexOf("td.Ccommontd")!=-1?true:false;
if(tempval==0){var settings={exportquery:$2("exportquery_false")?$2("exportquery_false").value:"",l_exportquery:$2("l_exportquery_false")?$2("l_exportquery_false").value:"",p_exportquery:$2("p_exportquery_false")?$2("p_exportquery_false").value:""};
$("tr.commontr").find("textarea,input:text").each(function(){settings[$(this).attr("name")]=$(this).val();
});
$("tr.commontr").find("input:radio").each(function(){if(this.checked==true){settings[$(this).attr("name")]={type:"radio",value:$(this).val()};
}});
$("tr.commontr").find("input:checkbox").each(function(){if(this.checked==true){settings[$(this).attr("name")]={type:"checkbox",value:$(this).attr("checked")};
}});
if($lastoption.data("data")){$lastoption.data("data")["settings"]=settings;
}else{$lastoption.data("data",{settings:settings,e535ded19:document.form1.e535ded19.value});
}}var callbackfunc=function(data,islocal){$option.data("data",data);
$("#logintr,#postsucinfotr,#artpostsettr").find("input:text,textarea").val("");
$("#logintr,#postsucinfotr,#artpostsettr").find("input:radio[value=1]").attr("checked",true);
$("#logintr,#postsucinfotr,#artpostsettr").find(".exportquerytable").find("tr.fieldtr").remove();
if(data.settings){var datasettings=data.settings;
var areatype="l";
var arr,selectoptionvalue=$("#ea23972cb").val();
for(var field in datasettings){if(field=="exportquery"||field=="l_exportquery"||field=="p_exportquery"){if(field=="l_exportquery"){areatype="l";
eval("l_fieldarr"+selectoptionvalue+"={};");
}else{if(field=="p_exportquery"){areatype="p";
eval("p_fieldarr"+selectoptionvalue+"={};");
}else{areatype="c";
eval("c_fieldarr"+selectoptionvalue+"={};");
}}if($2(field)){$2(field).value=datasettings[field];
}if($2(field+"_false")){$2(field+"_false").value=eme64769cac(datasettings[field],areatype,"parse");
}query2table((areatype=="l"?"l_":"")+"exportquery_false",(areatype=="l"?"l_":"")+"exportquerytable",1);
}else{if(datasettings[field]&&typeof(datasettings[field])=="object"){if(datasettings[field]["type"]=="radio"){$("input[type='radio'][name='"+field+"'][value='"+datasettings[field]["value"]+"']").attr("checked","checked");
}else{if(datasettings[field]["type"]=="checkbox"){$("input[type='checkbox'][name='"+field+"']").attr("checked",parseInt(datasettings[field][value])==0?false:true);
}}}else{if($("#"+field).is("input:radio")){$("input[type='radio'][name='"+field+"'][value='"+datasettings[field]+"']").attr("checked","checked");
}else{if($("#"+field).is("input:checkbox")){$("input[type='checkbox'][name='"+field+"']").attr("checked",parseInt(datasettings[field])==0?false:true);
}else{if($("#"+field).is("input:text,textarea")){$("#"+field).val(datasettings[field]);
}}}}}}}try{if(data.e535ded19){if(document.form1.e535ded19){document.form1.e535ded19.value=data.e535ded19;
}$(data.e535ded19).addClass("hiddencommon");
}else{if(document.form1.e535ded19&&document.form1.e535ded19.value){$(document.form1.e535ded19.value).removeClass("hiddencommon");
}document.form1.e535ded19.value="";
$("table.exportqueryarea").css("width","100%");
}$("table.exportquerytable").each(tablewidthchg);
}catch(e){}return true;
};
if($option.data("data")||$option.attr("value")==0){if($option.data("data")){callbackfunc($option.data("data"),1);
}else{if(haspostarea){callbackfunc({settings:{exportquery:"",l_exportquery:"",p_exportquery:""}},1);
}else{callbackfunc({settings:{l_exportquery:""}},1);
}}$.poping({width:"350px",height:"130px"},{},"提示信息",'<img class="os" src="images/loading.gif" />正在获取该类型信息...',1000);
}else{var targeturl=emlocate==0?"":"mr_";
var _object={url:targeturl+"bbstemplate.php?ajax=1&eb5707348=fetch&ecca23550="+ecca23550+"&id="+tempval+"&emid="+emid,params:null,opts:{width:"350px",height:"130px"},timedelay:8000};
$.submitajax(_object,"",{},{},"提示信息",'<img class="os" src="images/loading.gif" />正在获取该类型信息...',callbackfunc);
}}function itemset(butt,tableid){if(document.form1.e535ded19.value){return;
}var areatype=0,key="",fieldval="";
if(butt){key=$(butt).text();
fieldval=$(butt).closest("tr").find("input:last").val();
areatype=$(butt).closest("table.exportquerytable").attr("areatype");
$("tr.fieldtr").attr("isselected",0);
$(butt).closest("tr").attr("isselected",1);
}else{if(tableid){}}var arrfield={};
var selectoptionvalue=$("#ea23972cb").val();
if(areatype=="l"){eval("if(typeof l_fieldarr"+selectoptionvalue+" =='undefined')l_fieldarr"+selectoptionvalue+"={};arrfield=l_fieldarr"+selectoptionvalue+";");
}else{eval("if(typeof c_fieldarr"+selectoptionvalue+" =='undefined')c_fieldarr"+selectoptionvalue+"={};arrfield=c_fieldarr"+selectoptionvalue+";");
}if(!arrfield[key]){arrfield[key]={};
}var fieldtype=arrfield[key]["type"]?arrfield[key]["type"]:0;
var maininfo=$("div#addnodequery").html();
var maininfoid="fieldshow_"+key;
maininfo='<div tableid="'+tableid+'" class="popingembase" id="'+maininfoid+'" >'+maininfo+"</div>";
$.poping({height:"350px"},{},"提交字段特殊设置",maininfo);
$("input.getpreviewxpath","div.popingembase").attr("areatype",areatype);
$("#fieldname","#"+maininfoid).val(key);
$("input[name='fieldtype'][value='"+fieldtype+"']","div.popingembase").click();
if(fieldtype==0){$("input[name='fieldval']","div.popingembase").val(fieldval);
}else{$("textarea[name='fieldphpcode']","div.popingembase").val(arrfield[key]["fieldphpcode"]?arrfield[key]["fieldphpcode"]:"");
$("input[name='delaytime']","div.popingembase").val(arrfield[key]["delaytime"]?arrfield[key]["delaytime"]:"");
if(fieldtype==1){if(arrfield[key]["eb03a3273"]==1){$("input[name='eb03a3273'][value='1']","div.popingembase").click();
$("input[name='fet_xpath']","div.popingembase").val(arrfield[key]["fet_xpath"]?arrfield[key]["fet_xpath"]:"");
$("textarea[name='fet_startneedle']","div.popingembase").val(arrfield[key]["fet_startneedle"]?arrfield[key]["fet_startneedle"]:"");
$("textarea[name='fet_endneedle']","div.popingembase").val(arrfield[key]["fet_endneedle"]?arrfield[key]["fet_endneedle"]:"");
}else{$("input[name='eb03a3273'][value='0']","div.popingembase").click();
$("input[name='fetchurl']","div.popingembase").val(arrfield[key]["fetchurl"]?arrfield[key]["fetchurl"]:"");
}}else{$("textarea[name='endneedle']","div.popingembase").val(arrfield[key]["endneedle"]?arrfield[key]["endneedle"]:"");
$("textarea[name='startneedle']","div.popingembase").val(arrfield[key]["startneedle"]?arrfield[key]["startneedle"]:"");
$("input[name='xpath']","div.popingembase").val(arrfield[key]["xpath"]?arrfield[key]["xpath"]:"");
}}}function fieldset_confirm(butt){var arrfield,$popingembase=$(butt).closest("div.popingembase");
var type=$("input.getpreviewxpath",$popingembase).attr("areatype");
var selectoptionvalue=$("#ea23972cb").val();
if(type=="l"){eval("if(typeof l_fieldarr"+selectoptionvalue+" =='undefined')l_fieldarr"+selectoptionvalue+"={};arrfield=l_fieldarr"+selectoptionvalue+";");
}else{eval("if(typeof c_fieldarr"+selectoptionvalue+" =='undefined')c_fieldarr"+selectoptionvalue+"={};arrfield=c_fieldarr"+selectoptionvalue+";");
}var fieldname=$("input[name='fieldname']",$popingembase).val();
if(!arrfield[fieldname]){arrfield[fieldname]={};
}var fieldtype=$("input:checked[name='fieldtype']",$popingembase).val();
arrfield[fieldname]["type"]=fieldtype;
var fieldarrmark="";
if(fieldtype==0){fieldarrmark=$("input[name='fieldval']",$popingembase).val();
}else{fieldarrmark="{emArray:"+fieldtype+":"+fieldname+"}";
}var tableid=$popingembase.attr("tableid");
if(tableid&&tableid!="undefined"){querytable_add(tableid,fieldname,fieldarrmark,arrfield);
}else{var $selectedtr=$("tr.fieldtr[isselected=1]");
$selectedtr.find("td:eq(1)").find("a").text(fieldname);
$selectedtr.find("input:last").val(fieldarrmark);
}if(fieldtype!=0){if(!arrfield[fieldname]){arrfield[fieldname]={};
}arrfield[fieldname]["fieldname"]=$("input[name='fieldname']",$popingembase).val();
arrfield[fieldname]["type"]=fieldtype;
arrfield[fieldname]["delaytime"]=$("input[name='delaytime']",$popingembase).val();
arrfield[fieldname]["fieldphpcode"]=$("textarea[name='fieldphpcode']",$popingembase).val();
if(fieldtype==1){arrfield[fieldname]["eb03a3273"]=$("input[name='eb03a3273']:checked",$popingembase).val();
arrfield[fieldname]["fetchmode"]=$("input[name='fetchmode']:checked",$popingembase).val();
if(arrfield[fieldname]["eb03a3273"]==1){arrfield[fieldname]["fet_xpath"]=$("input[name='fet_xpath']",$popingembase).val();
arrfield[fieldname]["fet_startneedle"]=$("textarea[name='fet_startneedle']",$popingembase).val();
arrfield[fieldname]["fet_endneedle"]=$("textarea[name='fet_endneedle']",$popingembase).val();
}else{arrfield[fieldname]["fetchurl"]=$("input[name='fetchurl']",$popingembase).val();
}}else{arrfield[fieldname]["endneedle"]=$("textarea[name='endneedle']",$popingembase).val();
arrfield[fieldname]["startneedle"]=$("textarea[name='startneedle']",$popingembase).val();
arrfield[fieldname]["xpath"]=$("input[name='xpath']",$popingembase).val();
}}try{$.unblockui();
}catch(e){parent.window.$.unblockui();
}}function eme64769cac(c,f,h){var j=c.indexOf("{emArray:");
if(j==-1){return c;
}var b=c.substr(0,j);
var a=c.indexOf("}",j);
var g=c.substr(a+1);
var d;
if(a>j){d=c.substring(j,a+1);
if(h=="parse"){return b+fieldreverchange(d,f)+eme64769cac(g,f,h);
}else{return b+fieldchange(d,f)+eme64769cac(g,f,h);
}}else{return c;
}}function fieldchange(key,etype){var arr,selectoptionvalue=$("#ea23972cb").val();
var frontkey=key.substring(0,11);
var fieldname=key.substring(11,key.length-1);
if(etype=="l"){eval("if(typeof l_fieldarr"+selectoptionvalue+" =='undefined')l_fieldarr"+selectoptionvalue+"={};arr=l_fieldarr"+selectoptionvalue+";");
}else{eval("if(typeof c_fieldarr"+selectoptionvalue+" =='undefined')c_fieldarr"+selectoptionvalue+"={};arr=c_fieldarr"+selectoptionvalue+";");
}if(arr[fieldname]){return frontkey+encodeURIComponent(JSON.stringify(arr[fieldname]))+"}";
}return"";
}function fieldreverchange(parsecontent,etype){var arr,selectoptionvalue=$("#ea23972cb").val();
var frontkey=parsecontent.substring(0,11);
var fieldcontent=decodeURIComponent(parsecontent.substring(11,parsecontent.length-1));
var fielditem=JSON.parse(fieldcontent);
if(etype=="l"){eval("if(typeof l_fieldarr"+selectoptionvalue+" =='undefined')l_fieldarr"+selectoptionvalue+"={};arr=l_fieldarr"+selectoptionvalue+";");
}else{if(etype=="p"){eval("if(typeof p_fieldarr"+selectoptionvalue+" =='undefined')p_fieldarr"+selectoptionvalue+"={};arr=p_fieldarr"+selectoptionvalue+";");
}else{eval("if(typeof c_fieldarr"+selectoptionvalue+" =='undefined')c_fieldarr"+selectoptionvalue+"={};arr=c_fieldarr"+selectoptionvalue+";");
}}arr[fielditem.fieldname]=fielditem;
return frontkey+fielditem.fieldname+"}";
}function fieldset_cancel(a){try{$.unblockui();
}catch(b){parent.window.$.unblockui();
}}function steptopreview(a){var c=$(a).attr("areatype");
var b=$("#"+c+"_Referer").val()?$("#"+c+"_Referer").val():$("#"+c+"_siteurl").val();
if(!b){if(c=="c"){alert("请先输入内容发布配置区域内的网址。");
}else{alert("请先输入登陆配置区域内的网址。");
}return;
}startpreviewxpath(a,b,"co_pub_action.php");
}function fielddivsel(a){var b=$(a).closest(".fieldcustomarea");
b.find("div#fieldtype_div_"+$(a).val()).show().siblings(".fieldarea").hide();
if($(a).val()==0){b.find("#delaysetdiv").hide();
}else{b.find("#delaysetdiv").show();
}}var evalscripts=[],JSLOADED=[];
var BROWSER={};
var USERAGENT=navigator.userAgent.toLowerCase();
browserVersion({ie:"msie",firefox:"",chrome:"",opera:"",safari:"",mozilla:"",webkit:"",maxthon:"",qq:"qqbrowser",rv:"rv"});
if(BROWSER.safari||BROWSER.rv){BROWSER.firefox=true;
}BROWSER.opera=BROWSER.opera?opera.version():0;
function $2(a){return !a?null:document.getElementById(a);
}function isSupportAttr(b,a){if(!a){a="input";
}return b in document.createElement(a);
}function browserVersion(types){var other=1;
for(i in types){var v=types[i]?types[i]:i;
if(USERAGENT.indexOf(v)!=-1){var re=new RegExp(v+"(\\/|\\s|:)([\\d\\.]+)","ig");
var matches=re.exec(USERAGENT);
var ver=matches!=null?matches[2]:0;
other=ver!==0&&v!="mozilla"?0:other;
}else{var ver=0;
}eval("BROWSER."+i+"= ver");
}BROWSER.other=other;
}function doane(c,b,a){var b=isUndefined(b)?1:b;
var a=isUndefined(a)?1:a;
e=c?c:window.event;
if(!e){e=getEvent();
}if(!e){return null;
}if(b){if(e.preventDefault){e.preventDefault();
}else{e.returnValue=false;
}}if(a){if(e.stopPropagation){e.stopPropagation();
}else{e.cancelBubble=true;
}}return e;
}function getEvent(){if(document.all){return window.event;
}func=getEvent.caller;
while(func!=null){var a=func.arguments[0];
if(a){if((a.constructor==Event||a.constructor==MouseEvent)||(typeof(a)=="object"&&a.preventDefault&&a.stopPropagation)){return a;
}}func=func.caller;
}return null;
}function isUndefined(a){return typeof a=="undefined"?true:false;
}function evalscript(c){if(c.indexOf("<script")==-1){return c;
}var d=/<script[^\>]*?>([^\x00]*?)<\/script>/ig;
var a=[];
while(a=d.exec(c)){var f=/<script[^\>]*?src=\"([^\>]*?)\"[^\>]*?(reload=\"1\")?(?:charset=\"([\w\-]+?)\")?><\/script>/i;
var b=[];
b=f.exec(a[0]);
if(b){appendscript(b[1],"",b[2],b[3]);
}else{f=/<script(.*?)>([^\x00]+?)<\/script>/i;
b=f.exec(a[0]);
appendscript("",b[2],b[1].indexOf("reload=")!=-1);
}}return c;
}function appendscript(f,d,b,h){if(f.indexOf("?")>0){f+="&r="+Math.random();
}else{f+="?r="+Math.random();
}var g=hash(f+d);
if(!b&&in_array(g,evalscripts)){return;
}if(b&&$2(g)){$2(g).parentNode.removeChild($2(g));
}evalscripts.push(g);
var a=document.createElement("script");
a.type="text/javascript";
a.id=g;
a.charset=h?h:(BROWSER.firefox?document.characterSet:document.charset);
try{if(f){a.src=f;
a.onloadDone=false;
a.onload=function(){a.onloadDone=true;
JSLOADED[f]=1;
};
a.onreadystatechange=function(){if((a.readyState=="loaded"||a.readyState=="complete")&&!a.onloadDone){a.onloadDone=true;
JSLOADED[f]=1;
}};
}else{if(d){a.text=d;
}}document.getElementsByTagName("head")[0].appendChild(a);
}catch(c){}}function hash(b,d){var d=d?d:32;
var f=0;
var c=0;
var a="";
filllen=d-b.length%d;
for(c=0;
c<filllen;
c++){b+="0";
}while(f<b.length){a=stringxor(a,b.substr(f,d));
f+=d;
}return a;
}function stringxor(f,c){var g="";
var h="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";
var a=Math.max(f.length,c.length);
for(var d=0;
d<a;
d++){var b=f.charCodeAt(d)^c.charCodeAt(d);
g+=h.charAt(b%52);
}return g;
}function in_array(c,b){if(typeof c=="string"||typeof c=="number"){for(var a in b){if(b[a]==c){return true;
}}}return false;
}var dragMenuDisabled=false,JSMENU=[];
function dragMenu(b,c,f){c=c?c:window.event;
var d;
if(window.frames[0]){d=window.frames[0].contentDocument||window.frames[0].document;
}if(f==1){if(dragMenuDisabled||in_array(c.target?c.target.tagName:c.srcElement.tagName,["TEXTAREA","INPUT","BUTTON","SELECT"])){return;
}JSMENU.drag=[c.clientX,c.clientY];
JSMENU.drag[2]=parseInt(b.style.left?b.style.left:0);
JSMENU.drag[3]=parseInt(b.style.top?b.style.top:0);
document.onmousemove=function(h){try{dragMenu(b,h,2);
}catch(g){}};
document.onmouseup=function(h){try{dragMenu(b,h,3);
}catch(g){}};
if(d){d.onmousemove=function(h){try{dragMenu(b,h,2);
}catch(g){}};
d.onmouseup=function(h){try{dragMenu(b,h,3);
}catch(g){}};
}doane(c);
}else{if(f==2&&JSMENU.drag[0]){var a=[c.clientX,c.clientY];
b.style.left=(JSMENU.drag[2]+a[0]-JSMENU.drag[0])+"px";
b.style.top=(JSMENU.drag[3]+a[1]-JSMENU.drag[1])+"px";
b.removeAttribute("top_");
b.removeAttribute("left_");
doane(c);
}else{if(f==3){JSMENU.drag=[];
document.onmousemove=null;
document.onmouseup=null;
if(d){d.onmousemove=null;
d.onmouseup=null;
}}}}}function buttnoretry(){$("input:reset,input:button,input:submit").click(function(){var a=this;
a.disabled=true;
setTimeout("var a;",5000);
setTimeout(function(){a.disabled=false;
},5000);
});
}function tablewidthchg(){if($(this).closest("td").siblings().is(":hidden")){$(this).css("width","550px").find("a.fieldname").css("cursor","default").removeClass("underline");
}else{$(this).css("width","100%").find("a.fieldname").css("cursor","auto").addClass("underline");
}}