<!--
$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(filename)
{
    var head = document.getElementsByTagName('head')[0];
    script = document.createElement('script');
    script.src = filename;
    script.type = 'text/javascript';
    head.appendChild(script)
}
function IsNumber(s)
{
   if (s!=null && s!="")
  {        return !isNaN(s);
   }
   return false;
}
function myObj(oid){
    return document.getElementById(oid);
}
//调整窗口大小 *** *** www.eminer.cc *** ***
function resizeWeb(xx){
    var win = winSize();
    var reg = /^\d+$/;
    var num = win.h - 10- (xx?xx:0);
    if (reg.test(num)){
		$('table#tab1').height(num);
		$('td#frmtd').height(num-43);
		
    }
}
function jumpto2(url ,target) { 
	var ifm= $("iframe")[0];
	ifm.src = url;
} 

function innerresizeWeb(){
	var bodyheight;
	var kuayu=false;
	try{
		bodyheight = parseInt(parent.document.body.clientHeight);
	}catch(err){
		kuayu=true;
		bodyheight = parseInt(document.body.clientHeight);
		if(bodyheight<630)bodyheight=630;
	}
	$("div#main").css("min-height",(bodyheight-74)+'px');
	$("div#maincontent").css("min-height",(bodyheight-96)+'px');
	if(!kuayu)iFrameHeight(true,$("div#main").height());

}
function iFrameHeight(isparent,height) { 
	if(!height)height=false;
	var ifm,subWeb,doc ;
	if(isparent){doc = parent.window.document; ifm= $("iframe",parent.document.body)[0];}else{doc = document; ifm= $("iframe")[0];}

	try{
	    subWeb = doc.frames && doc.frames[0].document ? doc.frames[0].document : ifm.contentDocument; 
	}
	catch(err){}
	if(ifm != null && subWeb != null) ifm.height=(height?height:subWeb.body.scrollHeight); 
} 


function winSize(){ var e = {}; if (self.innerHeight) { e.h = self.innerHeight; e.w = self.innerWidth; }else if(document.documentElement){ e.h = document.documentElement.clientHeight; e.w = document.documentElement.clientWidth; } else { e.h = document.body.clientHeight; e.w = document.body.clientWidth;} return e; }

function showHide(objname){
	//$("#"+objname).toggle();
	var tr=$(objname).next();
		$(tr).toggle(tr.css('display') == 'none');//兼容ie8
}

function arrcompare(arr1,arr2){
	if(arr1 && typeof arr1 != 'object')arr1=[arr1];
	if(arr2 && typeof arr2 != 'object')arr2=[arr2];
	for(var i in arr1){
		if(arr1[i]!=arr2[i]) 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(img){
	var imgstate = false;
	if(img && img.clientWidth && img.clientWidth>10) 
	return true;
	else {
		alert(img.clientWidth);
		alert(img);
		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(param2,glue){
	if(typeof glue == "undefined" || !glue){glue='&';}
	var arr = [];  
	for(var i in param2){  
	   arr.push( i + "=" + param2[i]);
	}  
	return arr.join(glue);
}

function mergecoo (coo1,coo2) {//注意：coo1,coo2像$.extend的参数一样，位置不能颠倒
	if(typeof coo1 == "undefined")coo1=[];
	if(typeof coo2 == "undefined")coo2=[];
	return arr2coo ($.extend (coo2arr (coo1),coo2arr (coo2)));
}
function coo2arr (str) {
	var cooarr=[];
	var strarr=str.split('; ');
	for(var i in strarr){
	if(i!=="" && typeof strarr[i]!="undefined" && strarr[i]!==""){
		var itemarr=strarr[i].split('=');
		cooarr[itemarr[0]]=itemarr[1];
		}
	}
	return cooarr;
}
function arr2coo (cooarr) {
	var str='';
	for(var i in cooarr){
		str+=(i+"="+cooarr[i])+'; ';
	}
	if(str)
	return str.replace(/;\s?$/ , '');
	else return '';
}
function GetRadioValue(RadioName){
    var obj;   
    obj=document.getElementsByName(RadioName);
    if(obj!=null){
        var i;
        for(i=0;i<obj.length;i++){
            if(obj[i].checked){
                return obj[i].value;           
            }
        }
    }
    return null;
}

//
function table2query(databoxid,tableid,notalert){
	if($("#"+databoxid).length==0) return;
	//代表经过特殊设置的字段的全局变量arrfield，只有在三个地方用到：1：最后提交修改时用作参考值，修改下提交内容。2：最初初始化时，从exportquery中获得。3：更新完某个字段的特殊设置时
	var fieldarr=[];
	var a1,a2;
	var str='';
	
	$("table#"+tableid).find("tr.fieldtr").each(function(){
		if(a1=$("a.fieldname",this).text()){
			fieldarr[a1]=$("input:text:last",this).val();
		}	
	});
	var ctrlname='e442dfe17';
	if(databoxid.indexOf('l_')>=0) 
		ctrlname='e6ef7019d';//其实并没设e6ef7019d这个标签，因为登陆不存在上传图片
	if(/Content-Disposition:\s+?form-data;\s+?/i.test($2(databoxid).value))
	{
		var splitstr = $paramarr["cfg_multipost_splitstr"]?$paramarr["cfg_multipost_splitstr"]:"------WebKitFormBoundaryHphRLaax7DEsICAy";
		try {splitstr=content.substring(0,/\n/g.exec(content).index);}
		catch(exception){splitstr = $paramarr["cfg_multipost_splitstr"]?$paramarr["cfg_multipost_splitstr"]:"------WebKitFormBoundaryHphRLaax7DEsICAy";}	

		for(var i in fieldarr){
			str += splitstr+"\r\n";
			str += "Content-Disposition: form-data; name=\""+i+"\"\r\n\r\n"+fieldarr[i]+"\r\n";
		}
		if(str) str += splitstr+"--";
	}else{
		for(var i in fieldarr){
			str += i+"="+fieldarr[i]+"&";
		}
		if(str.slice(-1)=="&") str=str.slice(0,-1);
	}
	$2(databoxid).value = str;
	if(!notalert)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(tableid,key,val,arrfield){
	var   isplaceholder = isSupportAttr('placeholder');
	if(typeof key == "undefined" ){key='';}
	if(typeof val == "undefined" ){val='';}
	if(arrfield[key] && val.indexOf('{emArray:')==-1) arrfield[key]['type']=0;
	var placeholder = ""; 
	if(val.indexOf('提示：')==0) {
		placeholder = "placeholder='"+val+"' " +
		(isplaceholder?"":"onFocus='placeholdfocus(this)' onblur='placeholdblur(this)' ") ;
		if(isplaceholder)val='';
	}
	var addtr= "<tr class='fieldtr'><td><input id='arcID' name='arcID' type='checkbox' value=1 /></td><td><a class='underline fieldname' href='javascript:void(0)' onclick='itemset(this)'>"+key+"</a></td><td><input class='fullcell' tabIndex=1 value='"+val.replace("'",'"')+"' " +
		placeholder+	
	" /></td></tr>";
	var isreplace=false;
	$("table#"+tableid).find("tr.fieldtr").each(function(){
		if(!isreplace && !($(this).find("input").length)){
			$(this).replaceWith(addtr);
			isreplace=true;
			return;
		}	
	});
	//a=$("table#exportquerytable").append(addtr);
	if(isreplace==false) $(addtr).appendTo($("table#"+tableid));
	//$(addtr).appendTo($("table#"+tableid)).find("input:text:first").focus();
	
}

function querytable_del(tableid){
	var itemnum=0;
	$("table#"+tableid+" :checkbox[name='arcID']").each(function(){
		if(this.checked)
		{
			itemnum++;
			$(this).parents("tr.fieldtr").remove();
			
		}
	});
	if(itemnum==0) alert("请选中要删除的字段");
}

function placeholdfocus(input)
{
	if(input.value==input.placeholder) input.value='';return true;
}
function placeholdblur(input)
{
	//if(input.value=='') input.value=input.placeholder; return true;
}
function getCheckboxItem()
{
	var allSel="";
	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(allSel=="")
				allSel=document.form1.arcID[i].value;
			else
				allSel=allSel+"`"+document.form1.arcID[i].value;
		}
	}
	return allSel;
}

function adddouhao(str){
	if(typeof str!="string") return '';
	if(str.substr(0,1)!=",") str=","+str;
	if(str.slice(-1)!=",") str=str+",";
	return str;
}



function request(a) {
    var b = new RegExp("(^|&)" + a + "=([^&]*)(&|$)", "i");
    var c = window.location.search.substr(1).match(b);// location.search 返回URL中的查询字符串部分。包括(?)及?后面的内容，如?id=5&name=dreamdu
    if (c != null) {
        return unescape(c[2])
    };
    return '';
};

function banbubble (evt) { 
	var e=(evt)?evt:window.event; 
	if (window.event) { 
		if(e.stopPropagation)e.stopPropagation(); 
	e.cancelBubble=true; 
	} else { 
	//e.preventDefault(); 
	e.stopPropagation(); 
	e.cancelBubble=true; 
	} 
}
function percent2px(percentval,direction)
{
	var cWidth,cHeight;
	if(direction=='width'){
		cWidth = document.body.clientWidth?document.body.clientWidth:document.documentElement.clientWidth;
		return parseInt(cWidth*percentval);	
	}else{
		cHeight = document.body.clientHeight?document.body.clientHeight:document.documentElement.clientHeight;
		return parseInt(cHeight*percentval);
	}
}


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(val1,val2,val2checked){
	if(typeof val1 !="string") val1= '';
	val1=adddouhao(val1);
	if(val2checked){
		if(val1.indexOf(","+val2+",")>-1){}else{
			val1=val1+val2;
		}
	}else{
		if(val1.indexOf(","+val2+",")>-1){val1=val1.replace(","+val2+",",",");}else{}
	}
	return adddouhao(val1);
}
function ActRuleCallback(status,info,data,url){
	var newdata={};
	if(data='alert')alert(info);
	else{
		newdata['info'] = info;
		newdata['status'] = status;
		newdata['title'] = status=='success'?'操作成功':'操作失败';
		newdata['data'] = data;
		//if(data && $("input.nid").length>0)$("input.nid").val(data);
		newdata['url'] = url;
		$.updatepop(newdata);
	}
}
function getCheckboxItem()
{
	var allSel="";
	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(allSel=="")
				allSel=document.form2.arcID[i].value;
			else
				allSel=allSel+"`"+document.form2.arcID[i].value;
		}
	}
	return allSel;
}
/*
 * 利用Xpath工具获取xpath主要是利用empathsearcher.js这个插件以及本页的xpath_eminer() startpreviewxpath(butt,previewurl)这两个函数；php的function e3871fa0a和browspage()这两个函数。
 另外每个Xpath工具按钮上有个previewurltype属性，利用该属性判明php下步要做的事，是预览列表页，还是预览内容页，或者手工指定。另外如果要预先指定，可利用函数startpreviewxpath(butt,previewurl)的第二个参数
 原理机制是：先通过函数startpreviewxpath指挥php后台获得要预览的网址，返回给前台，让用户确认或修改，然后再通过 函数xpath_eminer()生成一个url，通过iframe的src的形式，指挥php后台获得预览网页的内容，然后再往该网页中加入jquery1.6插件和empathsearcher.js插件。通过该插件使网页上的每个链接失效，被点击后生成xpath填入输入框内
*/


/**//************************************************************************  
|    函数名称： startpreviewxpath                                                |  
|    函数功能： 预览网页以获取节点Xpath的第一步，获取网页url                                            |  
|    入口参数： butt：按钮；previewurl：网页url ;

*************************************************************************/  
function startpreviewxpath(butt,previewurl,puburl){//预览网页以获取节点Xpath
	var c, form=document.form1;
	c='co_getsource_url_action.php';
	var previewurltype=$(butt).attr('previewurltype');
	if(typeof eminer_getxpath == "undefined")eminer_getxpath = new co_pub();
	//要预览的网页无非有四种，内容页（获取分页导航：2），列表页(1)和登陆页（获取验证码区域）再加指定页(0)
	eminer_getxpath.eae31a53a['e95159ca1']=previewurltype?previewurltype:0;//借用e95159ca1来区分不同的浏览行为
	eminer_getxpath.postdata=$(form).serialize();
	
	if(!puburl){
		/*if(form.ed946d2b0.value==""){alert("节点名字不能为空！");$("input#ed946d2b0").focus();return;}
		else */
			if(form.ee329075e.value==""){$("input#ee329075e").focus();alert("采集网站网址不能为空！");return;}
	}
	/*
	else{
		if(form.pname.value==""){alert("节点名字不能为空！");$("input#pname").focus();return;}
		else if(form.ee329075e.value==""){alert("默认发布网站不能为空！");$("input#ee329075e").focus();return;}
	}
	*/

	if($("input#e441cba98").val()) eminer_getxpath.eae31a53a['temp_e441cba98']=$("input#e441cba98").val();
	if(previewurl)eminer_getxpath.eae31a53a['temp_e441cba98']=previewurl;
	eminer_getxpath.eae31a53a['temp_nextstep']='e3871fa0a';
	var maininfo="<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(maininfo);
	}else{
		$.poping({'restormaxbutt':1,height:'150px'},{},'预览网页以获取节点Xpath',maininfo);
	}
	$("#poping #go").html("<img class='os' src='images/loading.gif' />&nbsp;&nbsp;请稍等待。。。");
	eminer_getxpath.eminerco(c + "?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");
}
/**//************************************************************************  
|    函数名称： xpath_eminer                                                |  
|    函数功能： 预览网页以获取节点Xpath的第二步，获取网页的内容                                      |  
|    入口参数： 

*************************************************************************/  
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';//下面步骤不再通过eminer_tes.eminerco来继续，而是通过iframe的src来继续与后台交互，获得内容
	var curl=eminer_getxpath.courl+"?"+http_build_query(eminer_getxpath.eae31a53a);
	delete eminer_getxpath.eae31a53a['temp_e441cba98'];
	var shutbutstr='';
	shutbutstr = "&nbsp;&nbsp;<input id='shutinnderwindow' value='关 闭' type='button' height='22' class='coolbg2' onclick='shutinnerwindow(this)' />";
	var maininfo="<iframe src=\""+curl+"\" 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'>" 
			+shutbutstr
			+"<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>";	
	//$("#poping").css('top','700px');
	var doc;
	try{doc = top.document || document;}catch(e){doc = document;};
	var emclientHeight = parseInt(doc.body.clientHeight*0.85);
	var emclientWidth =parseInt( doc.body.clientWidth*0.8);
	
	$("#poping").css('width',emclientWidth).css('height',emclientHeight);
	$.blockui.impl.abscenter($2("poping"));
	//$("#poping #popmaininfo").height($2("poping").offsetHeight-42).css('background','#F5F5F5');
	$("#poping #popmaininfo_inner").html(maininfo);
	eminer_getxpath=null;
	delete eminer_getxpath;
}
function emwchange(img)
{  
	if(img.src.indexOf('emwrestore')!=-1){
		$("#poping").width($(img).data('width'));
		$("#poping").height($(img).data('height'));
		img.src="images/emwmax.png";
	}else{
		$(img).data('width',$("#poping").width());$(img).data('height',$("#poping").height());
		var doc;
		try{doc = top.document || document;}catch(e){doc = document;}
		var emclientHeight = parseInt(doc.body.clientHeight);
		var emclientWidth =parseInt( doc.body.clientWidth);
		$("#poping").css('width',emclientWidth).css('height',emclientHeight);
		img.src="images/emwrestore.png";
	}
	$.blockui.impl.abscenter($2("poping"));
}
/**//************************************************************************  
|    函数名称： xpath_eminer                                                |  
|    函数功能： 预览网页以获取节点Xpath的第三步，关闭该预览窗口                                    |  
|    入口参数： 

*************************************************************************/  
function shutinnerwindow(butt){
	if($("div.popingembase").length>0 && $("div.popingembase").siblings(":visible").length>0){
		$("div.popingembase").show().siblings().remove();
	}else{
		try{$.unblockui();}
		catch(e){ parent.window.$.unblockui();}

	}
}
/**//************************************************************************  
|    函数名称： setCookie                                                |  
|    函数功能： 设置cookie函数                                            |  
|    入口参数： name：cookie名称；value：cookie值 ;expires：天数;path：路径;domain：域名 

*************************************************************************/  
function setCookie(name, value)   
{   
   var argv = setCookie.arguments;   
   var argc = setCookie.arguments.length;   
   var expires = (argc > 2) ? argv[2] : null;   
   var path = (argc > 3) ? argv[3] : ''; 
   var domain = (argc > 4) ? argv[4] : ''; 
   
   if(expires!=null)   
   {   
       var LargeExpDate = new Date ();   
       LargeExpDate.setTime(LargeExpDate.getTime() + (expires*1000*3600*24));
   } 
  
   document.cookie = name + "=" + escape (value)+((expires == null) ? "" : ("; expires=" +LargeExpDate.toGMTString()))+((domain == '') ? "" : ("; domain=" +domain))+((path == '') ? "" : ("; path=" +path));    
}  
/**//************************************************************************  
|    函数名称： getCookie                                                |  
|    函数功能： 读取cookie函数                                            |  
|    入口参数： Name：cookie名称                                            | 
*************************************************************************/  
function getCookie(Name)   
{   
   var search = Name + "="   
   if(document.cookie.length > 0)   
   {   
       offset = document.cookie.indexOf(search)   
       if(offset != -1)   
       {   
           offset += search.length   
           end = document.cookie.indexOf(";", offset)   
           if(end == -1) end = document.cookie.length   
           return unescape(document.cookie.substring(offset, end))   
       }   
       else return ""   
   }   else return "" 
}   
/**//************************************************************************  
|    函数名称： deleteCookie                                            |  
|    函数功能： 删除cookie函数                                            |  
|    入口参数： Name：cookie名称                                        |  

*************************************************************************/      
function deleteCookie(name)   
{   
	var expdate = new Date();   
	expdate.setTime(expdate.getTime() - (86400 * 1000 * 1));   
    setCookie(name, "", expdate);   
}

function opfhxoiuz(s) {
    var d = false;
    var e = document.location.href;
    if (s.indexOf("|") > 0) {//s=eminerutf.cv|78250688
        var f = s.split('|');
        if (e.indexOf(f[0]) > 0) {//
            var g = f[1].substr(0, 1);
            var h = f[1].substr(1, 2) + f[1].substr(5, 2);
            var i = h + g;
            i = i.substr(1, 4);
            var a = "robot";
            var b = "qjpemail";
            var c = "key";
            i = i + a + b + c;
            i = i.substr(0, 4);
            if (i == "2687") {
                if (g == 1) d = 't1';
                else d = 't0'
            }
        }
    }
    return d;
}
function browse(l1){ return '<a href="'+l1+'" title="BROWSE" target="_blank"><img src="'+path()+'/system/images/os/brow.gif" class="os" /></a>'; }


/**//************************************************************************  
|    函数名称： fetchtemplate                                                |  
|    函数功能： 改变模板类型后的入口函数                              |  
|    入口参数： select：所操作的select标签
*************************************************************************/  
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();//classname
	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;
	//start 保护现场
	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});
	}
	
//end 保护现场

	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{//$option.attr('value')==0
			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);
	}
	
}

/**//************************************************************************  
|    函数名称： itemset                                                |  
|    函数功能： 提交字段设置表格内点击“特殊设置” 时对应的函数                              |  
|    入口参数： butt：按钮；
|				key：字段名称 ;

*************************************************************************/  
function itemset(butt){
	if(document.form1.e535ded19.value) return;
	var key = $(butt).text();
	$("tr.fieldtr").attr("isselected",0);
	$(butt).closest("tr").attr("isselected",1);
	var maininfo=$("div#addnodequery").html();
	var maininfoid = 'fieldshow_'+key;
	maininfo = '<div class="popingembase" id="'+maininfoid+'" >'+maininfo+'</div>';
	$.poping({height:'350px'},{},'提交字段特殊设置',maininfo);
	var areatype = $(butt).closest("table.exportquerytable").attr("areatype");
	$("input.getpreviewxpath","div.popingembase").attr('areatype',areatype);

	$("#fieldname","#"+maininfoid).val(key);
	
	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;
	$("input[name='fieldtype'][value='"+fieldtype+"']" ,"div.popingembase").click();
	
	if(fieldtype==0){
		$("input[name='fieldval']" , "div.popingembase").val( $(butt).closest("tr").find("input:last").val() );	
	}
	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']:'');
		}
	}
}
/**//************************************************************************  
|    函数名称： fieldset_confirm                                    |  
|    函数功能： 特殊设置完后的提交                                  |  
|    入口参数： butt：按钮；
*************************************************************************/  
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 $selectedtr = $("tr.fieldtr[isselected=1]");
	
	$selectedtr.find("td:eq(1)").find("a").text(fieldname);//更新key 的 name
	if(fieldtype==0)  $selectedtr.find("input:last").val($("input[name='fieldval']" , $popingembase).val());//更新普通值
	else{
		var fieldarrmark = '{emArray:'+fieldtype+':'+fieldname+'}';	
		$selectedtr.find("input:last").val(fieldarrmark);//更新普通值

		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();
			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();}
}


/*exportquery字段变化原理：预先建立一全局变量fieldarr和隐藏字段exportquery，并将显示给用户的字段的名字命名为exportquery_false,
 * 修改后提交时，以exportquery_false的值和fieldarr的值为准，而不再道不顾及隐藏字段exportquery的值。页面截图时，让隐藏字段exportquery获得最初的值，然后，解析该值，将适合用户看的假值赋给exportquery_false,将特殊值赋予给全局变量fieldarr，以后再操作时就针对着fieldarr和exportquery_false来进行。*/
/**//************************************************************************  
|    函数名称： eme64769cac                                                |  
|    函数功能：字符串替换函数                               |  
|    入口参数： querystr：要替换的字符串；
				fieldarr:  字段数组
				etype exportquery输入框所在区域，只能是'l'或'c'
*************************************************************************/  
function eme64769cac(querystr , etype,fanxiang){
	var start =  querystr.indexOf('{emArray:');
	if(start == -1) return querystr;
	var str_front = querystr.substr(0,start);
	var end = querystr.indexOf('}' , start);
	var str_end = querystr.substr(end+1);
	var key;
	if(end>start){ 
		key = querystr.substring(start , end+1);
		if(fanxiang=='parse') return str_front + fieldreverchange(key , etype) + eme64769cac(str_end, etype,fanxiang);
		else return str_front + fieldchange(key , etype) + eme64769cac(str_end, etype,fanxiang);
	}else{
		return querystr;
	}
}
/**//************************************************************************  
|    函数名称： fieldchange                                                |  
|    函数功能：特殊字段替换函数                          |  
|    入口参数： key：要替换的特殊字段名；
|    入口参数： etype exportquery输入框所在区域，只能是'l'或'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]))+'}';
	//则参数在从js传递给php时要使用encodeURI编码，然后在php中使用urldecode函数解码。
	return  '';
	//php savejsondata($this->eminersetting["commontools"]);
}
/**//************************************************************************  
|    函数名称： fieldreverchange                                                |  
|    函数功能：特殊字段反向替换函数                          |  
|    入口参数： key：要替换的特殊字段名；
|    入口参数： etype exportquery输入框所在区域，只能是'l'或'c'
*************************************************************************/
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']+'}';
}



/**//************************************************************************  
|    函数名称： fieldset_cancel                                                |  
|    函数功能：取消                        |  
|    入口参数： butt 按钮
*************************************************************************/

function fieldset_cancel(butt){
	try{$.unblockui();} catch(e){ parent.window.$.unblockui();}
}

/**//************************************************************************  
|    函数名称： steptopreview                                                |  
|    函数功能： 预览网页以获取节点Xpath的第0步，进入startpreviewxpath的入口                                   |  
|    入口参数： butt：按钮；
|				previewurl：网页url ;
|               area：只能有两个值 ：'l' 或'c'，前者代表登陆区域，后者代表内容发布区域

*************************************************************************/  
function steptopreview(butt){//预览网页以获取节点Xpath
	var area = $(butt).attr("areatype");
	var previewurl = $("#"+area+"_Referer").val() ? $("#"+area+"_Referer").val() : $("#"+area+"_siteurl").val();
	if(!previewurl){
		if(area == 'c') alert("请先输入内容发布配置区域内的网址。");
		else alert("请先输入登陆配置区域内的网址。");
		return;
	}
	startpreviewxpath(butt,previewurl,'co_pub_action.php');

}
/**//************************************************************************  
|    函数名称： fielddivsel                                                |  
|    函数功能： 点选字段类型后的入口函数                              |  
|    入口参数： node：radio
*************************************************************************/  
function fielddivsel(node){
	var $parent = $(node).closest(".fieldcustomarea");
	$parent.find("div#fieldtype_div_"+$(node).val()).show().siblings(".fieldarea").hide();
	if($(node).val()==0) $parent.find("#delaysetdiv").hide();
	else {$parent.find("#delaysetdiv").show();}
}
//discuz代码
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(id) {
	return !id ? null : document.getElementById(id);
}
function isSupportAttr(attrname,ctrlname) {
	if(!ctrlname)ctrlname='input';
    return attrname in document.createElement(ctrlname);
}


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(event, preventDefault, stopPropagation) {
	var preventDefault = isUndefined(preventDefault) ? 1 : preventDefault;
	var stopPropagation = isUndefined(stopPropagation) ? 1 : stopPropagation;
	e = event ? event : window.event;
	if(!e) {
		e = getEvent();
	}
	if(!e) {
		return null;
	}
	if(preventDefault) {
		if(e.preventDefault) {
			e.preventDefault();
		} else {
			e.returnValue = false;
		}
	}
	if(stopPropagation) {
		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 arg0 = func.arguments[0];
		if (arg0) {
			if((arg0.constructor  == Event || arg0.constructor == MouseEvent) || (typeof(arg0) == "object" && arg0.preventDefault && arg0.stopPropagation)) {
				return arg0;
			}
		}
		func=func.caller;
	}
	return null;
}
function isUndefined(variable) {
	return typeof variable == 'undefined' ? true : false;
}
function evalscript(s) {
	if(s.indexOf('<script') == -1) return s;
	var p = /<script[^\>]*?>([^\x00]*?)<\/script>/ig;//\x00: ASCII 码值为 0 的字符，在通讯中多表示字符串结束
	var arr = [];
	while(arr = p.exec(s)) {
		var p1 = /<script[^\>]*?src=\"([^\>]*?)\"[^\>]*?(reload=\"1\")?(?:charset=\"([\w\-]+?)\")?><\/script>/i;
		var arr1 = [];
		arr1 = p1.exec(arr[0]);
		if(arr1) {
			appendscript(arr1[1], '', arr1[2], arr1[3]);
		} else {
			p1 = /<script(.*?)>([^\x00]+?)<\/script>/i;
			arr1 = p1.exec(arr[0]);
			appendscript('', arr1[2], arr1[1].indexOf('reload=') != -1);
		}
	}
	return s;
}
function appendscript(src, text, reload, charset) {
	if(src.indexOf('?')>0)src+= "&r=" + Math.random();
	else src+= "?r=" + Math.random();
	var id = hash(src + text);
	if(!reload && in_array(id, evalscripts)) return;
	if(reload && $2(id)) {
		$2(id).parentNode.removeChild($2(id));
	}

	evalscripts.push(id);
	var scriptNode = document.createElement("script");
	scriptNode.type = "text/javascript";
	scriptNode.id = id;
	scriptNode.charset = charset ? charset : (BROWSER.firefox ? document.characterSet : document.charset);
	try {
		if(src) {
			scriptNode.src = src;
			scriptNode.onloadDone = false;
			scriptNode.onload = function () {
				scriptNode.onloadDone = true;
				JSLOADED[src] = 1;
			};
			scriptNode.onreadystatechange = function () {
				if((scriptNode.readyState == 'loaded' || scriptNode.readyState == 'complete') && !scriptNode.onloadDone) {
					scriptNode.onloadDone = true;
					JSLOADED[src] = 1;
				}
			};
		} else if(text){
			scriptNode.text = text;
		}
		document.getElementsByTagName('head')[0].appendChild(scriptNode);
	} catch(e) {}
}

function hash(string, length) {
	var length = length ? length : 32;
	var start = 0;
	var i = 0;
	var result = '';
	filllen = length - string.length % length;
	for(i = 0; i < filllen; i++){
		string += "0";
	}
	while(start < string.length) {
		result = stringxor(result, string.substr(start, length));
		start += length;
	}
	return result;
}

function stringxor(s1, s2) {
	var s = '';
	var hash = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';
	var max = Math.max(s1.length, s2.length);
	for(var i=0; i<max; i++) {
		var k = s1.charCodeAt(i) ^ s2.charCodeAt(i);
		s += hash.charAt(k % 52);
	}
	return s;
}
function in_array(needle, haystack) {
	if(typeof needle == 'string' || typeof needle == 'number') {
		for(var i in haystack) {
			if(haystack[i] == needle) {
					return true;
			}
		}
	}
	return false;
}
var dragMenuDisabled = false,JSMENU=[];
function dragMenu(menuObj, e, op) {
	e = e ? e : window.event;
	var framedoc;
	if(window.frames[0]){
		 framedoc = window.frames[0].contentDocument || window.frames[0].document;
	}
	if(op == 1) {
		if(dragMenuDisabled || in_array(e.target ? e.target.tagName : e.srcElement.tagName, ['TEXTAREA', 'INPUT', 'BUTTON', 'SELECT'])) {
			return;
		}
		JSMENU['drag'] = [e.clientX, e.clientY];
		JSMENU['drag'][2] = parseInt(menuObj.style.left?menuObj.style.left:0);
		JSMENU['drag'][3] = parseInt(menuObj.style.top?menuObj.style.top:0);
		
		
		document.onmousemove = function(e) {try{dragMenu(menuObj, e, 2);}catch(err){}};
		document.onmouseup = function(e) {try{dragMenu(menuObj, e, 3);}catch(err){}};
		if(framedoc){
			framedoc.onmousemove = function(e) {try{dragMenu(menuObj, e, 2);}catch(err){}};
			framedoc.onmouseup = function(e) {try{dragMenu(menuObj, e, 3);}catch(err){}};
		}
		doane(e);
	}else if(op == 2 && JSMENU['drag'][0]) {
		var menudragnow = [e.clientX, e.clientY];
		menuObj.style.left = (JSMENU['drag'][2] + menudragnow[0] - JSMENU['drag'][0]) + 'px';
		menuObj.style.top = (JSMENU['drag'][3] + menudragnow[1] - JSMENU['drag'][1]) + 'px';
		menuObj.removeAttribute('top_');menuObj.removeAttribute('left_');
		doane(e);
	}else if(op == 3) {
		JSMENU['drag'] = [];
		document.onmousemove = null;
		document.onmouseup = null;
		if(framedoc){
			framedoc.onmousemove = null;
			framedoc.onmouseup = null;
		}
	}
}
function buttnoretry(){
	$("input:reset,input:button,input:submit").click(
			function(){
				var butt=this;
				butt.disabled=true;
				setTimeout("var a;", 5000 );//不知什么原因，一个settimeout不起用
				setTimeout(function(){
					butt.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");
}
-->