var leapconfig={server:"http://192.168.0.174:8080/LEAPClient",_rpcurl:null,loginHTML:null,rpcurl:function(){return this._rpcurl;},resurl:function(){return this.server;},rpcservice:"leap",defaultCallService:"leap",ReturnJSON:true};var PublishServerConfig={URL:"http://192.168.0.174:8080/LEAPClient",ImagesPath:this.URL+"Images",UploadURL:this.URL+"Upload.jsp"};
var leapscripttype={js:0,css:1,template:2};var ___logout=function(){var A=document.URL;A=A.substring(0,A.indexOf("/HTML/"))+"/HTML/Login.html";if(leapconfig.loginHTML==null){window.location.replace(A);}else{window.location.replace(leapconfig.server+leapconfig.loginHTML);}};var leaprpcclient=function(){this.URL=leapconfig.rpcurl();
this.Service=leapconfig.rpcservice;this.CallService=leapconfig.defaultCallService;this.IsReturnJSON=leapconfig.ReturnJSON;var C;var A;this.isSuccess=null;this.lastError=null;this.lastErrorCode=null;this.lastWarring=null;this.extendResult=null;this.ID="";this.sid=null;this.getLastWarring=function(){return this.lastWarring;
};this.getLastExtendResult=function(){return this.extendResult;};this.setLastExtendResult=function(D){this.extendResult=D;};this.getLastError=function(){var F=this.lastError;var D=this.lastErrorCode;var G=this.isSuccess;this.isSuccess=1;this.lastError=null;this.lastErrorCode=null;if(F==null&&D==null&&G==1){return ;
}var E={error:F,code:D,success:G};return E;};this.___buildResult=function(J,I){this.isSuccess=1;this.lastError=null;this.lastErrorCode=null;if(J==null||J==""||J=="null"){this.isSuccess=0;this.lastError="request result is null";this.lastErrorCode="-9999";return null;}if(I==null){I=true;}else{var D=null;
try{D=JSON.parse(J);if(D!=null&&D.javaClass){this.isSuccess=D.isSuccess;this.lastError=D.lastError;this.lastErrorCode=D.lastErrorCode;this.lastWarring=D.lastWarring;this.extendResult=D.extendResult;if(this.isSuccess==0){if(this.lastErrorCode=="88888"||this.lastErrorCode=="-1"){setTimeout(___logout,1000);
}return null;}var E=D.result;if(E==null||E==""||E=="null"){return null;}if(D.dataType!=null&&D.dataType==12){I=false;}if(I){var H=null;try{H=JSON.parse(E);}catch(F){}if(H!=null){return H;}return E;}else{return E;}}}catch(G){this.isSuccess=0;this.lastError="deserialize server return result error";this.lastErrorCode="-9998";
}}};this.getsid=function(){if(this.sid==null){if(document.cookie.indexOf("JSESSIONID=")>-1){var E=document.cookie.substring(document.cookie.indexOf("JSESSIONID="));E=E.split(";")[0];this.sid=E.substring(11);return this.sid;}else{var D=XmlHttpHelper.GetTextByPost(leapconfig.rpcurl(),"type=997");this.sid=D;
return this.sid;}}else{return this.sid;}};this.request=function(T,O,V,I,P,G,D,N,R,M){var U=null;var E=null;if(P==null){U=this.Service;}else{U=P;}if(G==null){E=this.CallService;}else{E=G;}var Q=this.IsReturnJSON;if(N!=null&&N!=Q){Q=N;}var K="service="+U+"&method="+T+"&callService="+E+"&returnJSON="+Q+"&clientID="+this.ID+"&sid="+this.getsid();
if(V!=null){K+="&extend="+encodeURIComponent(encodeURIComponent(escape(V)));}if(D!=null){K+="&type="+D;}var F=null;if(O!=null&&typeof (O)=="object"&&O!=""){try{var L=[];var J=0;for(var W in O){if(typeof (O[W])!="function"){if(typeof (O[W])!="string"){L[J]=JSON.stringify(O[W]);}else{L[J]=O[W];}J++;}}K+="&requestData="+encodeURIComponent(encodeURIComponent(escape(JSON.stringify(L))));
}catch(H){parexp=null;}}try{if(K!=null&&K!=""){K+="&";}K+="requestURL="+document.URL;if(I==null){var S=null;if(R==true){S=XmlHttpHelper.GetTextByGet(T);}else{S=XmlHttpHelper.GetTextByPost(leapconfig.rpcurl(),K);}if(Q){return this.___buildResult(S,true);}else{return S;}}else{if(R==true){XmlHttpHelper.GetTextByGet(T,this.callbackfunction,this,{callback:I,domain:M});
}else{XmlHttpHelper.GetTextByPost(leapconfig.rpcurl(),K,this.callbackfunction,this,{callback:I,domain:M});}}}catch(H){if(I!=null){return null;}}};this.asynrequest=function(F,G,H,E,D){return this.request(F,G,H,E,null,null,null,null,null,D);};this.callbackfunction=function(H,E){try{var D=this.___buildResult(H,true);
if(E.callback!=null){var G=function(){try{var I=E.domain;if(I==null){I=this;}E.callback.call(I,D);I=callobject=null;}finally{I=E=null;}};setTimeout(G,1);}}catch(F){}};this.load=function(D){return this.request(leapconfig.resurl()+D,null,null,null,null,null,2,false,true);};this.loadjs=function(F,D,E){return this.loadscript(F,leapscripttype.js,D,E);
};this.loadcss=function(E,D){return this.loadscript(E,leapscripttype.css,D);};this.loadtl=function(E,D){return this.loadscript(E,leapscripttype.template,D);};this._s=null;this._c=null;this.loadscript=function(G,M,K,D){if(K==null){K=document;}if(this._s==null){this._s=[];var N=K.getElementsByTagName("SCRIPT");
if(N!=null){for(var H=0;H<N.length;H++){var E=N[H].getAttribute("path");if(E!=null){this._s.push(E.toLowerCase());}E=null;}}}if(this._c==null){this._c=[];var J=K.getElementsByTagName("LINK");if(J!=null){for(var H=0;H<J.length;H++){var E=J[H].getAttribute("path");if(E!=null){this._c.push(E.toLowerCase());
}E=null;}}}if(M==null){M=leapscripttype.js;}if(M==leapscripttype.js){var F=this._s.length;var I=G.toLowerCase();for(var H=0;H<F;H++){if(I==this._s[H]){return ;}}this._s.push(I);}else{if(M==leapscripttype.css){var F=this._c.length;var I=G.toLowerCase();for(var H=0;H<F;H++){if(I==this._c[H]){return ;}}this._c.push(I);
}}var L=this.load(G);if(L==null){return ;}if(M==leapscripttype.js||M==leapscripttype.css){B(L,K,M,D,G);}else{try{return L;}finally{L=null;}}};var B=function(I,F,D,K,J){try{if(I!=null){var H=F.getElementsByTagName("HEAD").item(0);var G;if(D==leapscripttype.js){G=F.createElement("script");G.language="javascript";
G.type="text/javascript";G.charset="UTF-8";G.defer="defer";G.text=I;G.path=J;}else{if(D==leapscripttype.css){var G=document.createElement("link");G.setAttribute("rel","stylesheet");G.setAttribute("type","text/css");G.setAttribute("href",leapconfig.server+J);G.path=J;}}H.appendChild(G);I=F=D=K=H=G=null;
return true;}}catch(E){}};this.init=function(){var F=window.location.href;var E=document.getElementsByTagName("HEAD").item(0).childNodes;for(var G=0;G<E.length;G++){if(E[G].tagName=="SCRIPT"&&E[G].src!=null&&(E[G].src.indexOf("Base.js")>-1||E[G].src.indexOf("Net.js")>-1)){var H=E[G].src;if(H.charAt(0)=="/"){while(F.indexOf("//")>-1){F=F.replace("//","_");
}F=F.replace("http:_","http://").replace("https:_","https://");while(F.lastIndexOf("/")>-1&&F.charAt(F.lastIndexOf("/")-1)!="/"){F=F.substring(0,F.lastIndexOf("/"));}if(E[G].src.indexOf("Base.js")>-1){F+=H.replace("LEAP/Resource/JavaScript/Base.js","");}else{F+=H.replace("LEAP/Resource/JavaScript/Base/Net.js","");
}}else{if(H.indexOf("http://")>-1||H.indexOf("https://")>-1){if(E[G].src.indexOf("Base.js")>-1){F=H.replace("LEAP/Resource/JavaScript/Base.js","");}else{F=H.replace("LEAP/Resource/JavaScript/Base/Net.js","");}}else{var I=0;while(H.indexOf("../")>-1){I+=1;H=H.replace("../","");}while(F.indexOf("//")>-1){F=F.replace("//","_");
}F=F.replace("http:_","http://").replace("https:_","https://").substring(0,F.lastIndexOf("/"));if(I>0){while(I>0){I--;F=F.substring(0,F.lastIndexOf("/"));}}F=F+"/"+H;if(E[G].src.indexOf("Base.js")>-1){F=F.replace("LEAP/Resource/JavaScript/Base.js","");}else{F=F.replace("LEAP/Resource/JavaScript/Base/Net.js","");
}}}break;}}var D=F;leapconfig.server=D;leapconfig._rpcurl=D+"LEAP/Service/RPC/RPC.DO";PublishServerConfig.URL=D;PublishServerConfig.ImagesPath=PublishServerConfig.URL+"Images";PublishServerConfig.UploadURL=PublishServerConfig.URL+"Upload.jsp";};};var leapclient=new leaprpcclient();function XmlHttpHelper(){}var arr_t=new Array("MSXML2.XMLHTTP.4.0","MSXML2.XMLHTTP.3.0","MSXML2.XMLHTTP.2.6","MSXML2.XMLHTTP","Microsoft.XMLHTTP","MSXML.XMLHTTP");
var arr_t_indx=-1;XmlHttpHelper._getXmlHttpObj=function(){var D=null;if(window.ActiveXObject){if(arr_t_indx==-1){for(var B=0;B<arr_t.length;B++){try{D=new ActiveXObject(arr_t[B]);arr_t_indx=B;}catch(C){}if(D!=null){break;}}}else{D=new ActiveXObject(arr_t[arr_t_indx]);}}else{if(window.XMLHttpRequest){try{D=new XMLHttpRequest();
if(D.overrideMimeType){D.overrideMimeType("text/xml");}}catch(A){}}}if(D==null){alert("con not create XMLHTTP object");throw (new Error(-1,"con not create XMLHTTP object"));}return D;};XmlHttpHelper.GetTextByPost=function(D,C,F,B,A){var E=null;try{if(arguments.length>2){if(arguments.length>3){E=arguments[3];
}return XmlHttpHelper.transmit(arguments[0],"POST",arguments[1],"text",true,arguments[2],E,A);}else{return XmlHttpHelper.transmit(arguments[0],"POST",arguments[1],"text",false,null);}}finally{E=null;}};XmlHttpHelper.GetTextByGet=function(C,E,B,A){var D=null;try{if(arguments.length>1){if(arguments.length>3){D=arguments[2];
}return XmlHttpHelper.transmit(arguments[0],"GET",null,"text",true,arguments[1],D,A);}else{return XmlHttpHelper.transmit(arguments[0],"GET",null,"text",false,null);}}finally{D=null;}};XmlHttpHelper.transmit=function(A,B,D,G,F,L,H,E){var C=this._getXmlHttpObj();try{C.open(B,A,F);C.setRequestHeader("connection","keep-alive");
if(B.toLowerCase()=="post"){var J=0;if(D!=null){J=D.length;}C.setRequestHeader("Content-Length",'"'+J+'"');C.setRequestHeader("Content-Type","application/x-www-form-urlencoded");}if(F){C.onreadystatechange=function(){if(C.readyState==4){try{if(G!=null){if(G.toLowerCase()=="text"){if(L!=null){if(H!=null){L.call(H,C.responseText,E);
}else{L.call(C.responseText);}}}else{if(G.toLowerCase()=="xml"){if(H!=null){L.call(H,C.responseXML,E);}else{L.call(C.responseXML);}}}}else{if(H!=null){if(E!=null){L.call(H,null,E);}else{L.call(H);}}else{L.call();}}}finally{}}};if(D==null){D="";}C.send(D);}else{if(D==null){D="";}C.send(D);if(C.status==200){if(G!=null){if(G.toLowerCase()=="text"){return C.responseText;
}else{if(G.toLowerCase()=="xml"){return C.responseXML;}}}else{return null;}}return null;}}catch(I){}finally{if(C!=null){try{}catch(K){}}}};RegExp.prototype.toJSON=function(){return this.toString();};if(!this.JSON){this.JSON={};}(function(){function f(n){return n<10?"0"+n:n;}if(typeof Date.prototype.toJSON!=="function"){Date.prototype.toJSON=function(key){return isFinite(this.valueOf())?this.getUTCFullYear()+"-"+f(this.getUTCMonth()+1)+"-"+f(this.getUTCDate())+"T"+f(this.getUTCHours())+":"+f(this.getUTCMinutes())+":"+f(this.getUTCSeconds())+"Z":null;
};String.prototype.toJSON=Number.prototype.toJSON=Boolean.prototype.toJSON=function(key){return this.valueOf();};}var cx=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,escapable=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,gap,indent,meta={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},rep;
function quote(string){escapable.lastIndex=0;return escapable.test(string)?'"'+string.replace(escapable,function(a){var c=meta[a];return typeof c==="string"?c:"\\u"+("0000"+a.charCodeAt(0).toString(16)).slice(-4);})+'"':'"'+string+'"';}function str(key,holder){var i,k,v,length,mind=gap,partial,value=holder[key];
if(value&&typeof value==="object"&&typeof value.toJSON==="function"){value=value.toJSON(key);}if(typeof rep==="function"){value=rep.call(holder,key,value);}switch(typeof value){case"string":return quote(value);case"number":return isFinite(value)?String(value):"null";case"boolean":case"null":return String(value);
case"object":if(!value){return"null";}gap+=indent;partial=[];if(Object.prototype.toString.apply(value)==="[object Array]"){length=value.length;for(i=0;i<length;i+=1){partial[i]=str(i,value)||"null";}v=partial.length===0?"[]":gap?"[\n"+gap+partial.join(",\n"+gap)+"\n"+mind+"]":"["+partial.join(",")+"]";
gap=mind;return v;}if(rep&&typeof rep==="object"){length=rep.length;for(i=0;i<length;i+=1){k=rep[i];if(typeof k==="string"){v=str(k,value);if(v){partial.push(quote(k)+(gap?": ":":")+v);}}}}else{for(k in value){if(Object.hasOwnProperty.call(value,k)){v=str(k,value);if(v){partial.push(quote(k)+(gap?": ":":")+v);
}}}}v=partial.length===0?"{}":gap?"{\n"+gap+partial.join(",\n"+gap)+"\n"+mind+"}":"{"+partial.join(",")+"}";gap=mind;return v;}}if(typeof JSON.stringify!=="function"){JSON.stringify=function(value,replacer,space){var i;gap="";indent="";if(typeof space==="number"){for(i=0;i<space;i+=1){indent+=" ";}}else{if(typeof space==="string"){indent=space;
}}rep=replacer;if(replacer&&typeof replacer!=="function"&&(typeof replacer!=="object"||typeof replacer.length!=="number")){throw new Error("JSON.stringify");}return str("",{"":value});};}if(typeof JSON.parse!=="function"){JSON.parse=function(text,reviver){var j;function walk(holder,key){var k,v,value=holder[key];
if(value&&typeof value==="object"){for(k in value){if(Object.hasOwnProperty.call(value,k)){v=walk(value,k);if(v!==undefined){value[k]=v;}else{delete value[k];}}}}return reviver.call(holder,key,value);}cx.lastIndex=0;if(cx.test(text)){text=text.replace(cx,function(a){return"\\u"+("0000"+a.charCodeAt(0).toString(16)).slice(-4);
});}if(/^[\],:{}\s]*$/.test(text.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,"@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,"]").replace(/(?:^|:|,)(?:\s*\[)+/g,""))){j=eval("("+text+")");return typeof reviver==="function"?walk({"":j},""):j;}throw new SyntaxError("JSON.parse");
};}}());var json_parse=(function(){var D,B,A={'"':'"',"\\":"\\","/":"/",b:"\b",f:"\f",n:"\n",r:"\r",t:"\t"},M,K=function(N){throw {name:"SyntaxError",message:N,at:D,text:M};},G=function(N){if(N&&N!==B){K("Expected '"+N+"' instead of '"+B+"'");}B=M.charAt(D);D+=1;return B;},F=function(){var O,N="";if(B==="-"){N="-";
G("-");}while(B>="0"&&B<="9"){N+=B;G();}if(B==="."){N+=".";while(G()&&B>="0"&&B<="9"){N+=B;}}if(B==="e"||B==="E"){N+=B;G();if(B==="-"||B==="+"){N+=B;G();}while(B>="0"&&B<="9"){N+=B;G();}}O=+N;if(isNaN(O)){K("Bad number");}else{return O;}},H=function(){var Q,P,O="",N;if(B==='"'){while(G()){if(B==='"'){G();
return O;}else{if(B==="\\"){G();if(B==="u"){N=0;for(P=0;P<4;P+=1){Q=parseInt(G(),16);if(!isFinite(Q)){break;}N=N*16+Q;}O+=String.fromCharCode(N);}else{if(typeof A[B]==="string"){O+=A[B];}else{break;}}}else{O+=B;}}}}K("Bad string");},J=function(){while(B&&B<=" "){G();}},C=function(){switch(B){case"t":G("t");
G("r");G("u");G("e");return true;case"f":G("f");G("a");G("l");G("s");G("e");return false;case"n":G("n");G("u");G("l");G("l");return null;}K("Unexpected '"+B+"'");},L,I=function(){var N=[];if(B==="["){G("[");J();if(B==="]"){G("]");return N;}while(B){N.push(L());J();if(B==="]"){G("]");return N;}G(",");
J();}}K("Bad array");},E=function(){var O,N={};if(B==="{"){G("{");J();if(B==="}"){G("}");return N;}while(B){O=H();J();G(":");if(Object.hasOwnProperty.call(N,O)){K('Duplicate key "'+O+'"');}N[O]=L();J();if(B==="}"){G("}");return N;}G(",");J();}}K("Bad object");};L=function(){J();switch(B){case"{":return E();
case"[":return I();case'"':return H();case"-":return F();default:return B>="0"&&B<="9"?F():C();}};return function(Q,O){var N;M=Q;D=0;B=" ";N=L();J();if(B){K("Syntax error");}return typeof O==="function"?(function P(U,T){var S,R,V=U[T];if(V&&typeof V==="object"){for(S in V){if(Object.hasOwnProperty.call(V,S)){R=P(V,S);
if(R!==undefined){V[S]=R;}else{delete V[S];}}}}return O.call(U,T,V);}({"":N},"")):N;};}());if(this.JSON&&!window.ActiveXObject){if(this.JSON.parse&&this.json_parse){this.JSON.innerParse=this.JSON.parse;this.JSON.parse=function(B,A){if(B!=null){if(B.length>=327680){return json_parse(B,A);}else{return JSON.innerParse(B,A);
}}};}}var UUID={S4:function(){return(((1+Math.random())*65536)|0).toString(16).substring(1);},randomUUID:function(){return(UUID.S4()+UUID.S4()+"-"+UUID.S4()+"-"+UUID.S4()+"-"+UUID.S4()+"-"+UUID.S4()+UUID.S4()+UUID.S4());},d:new Date().getTime()+"_"+Math.random().toString().replace(".","_")+"_",c:0,cID:function(){++UUID.c;
return"cid_"+UUID.d+UUID.c;}};function leap_common_init(){leapclient.init();}leap_common_init();leapclient.ID=UUID.randomUUID();var LEAP=new Object();var isdebug=true;LEAP.isIE;(function(){if(document.all){LEAP.isIE=true;}else{LEAP.isIE=false;}})();LEAP.getAbsolutePos=function(E){var H=/^div$/i.test(E.tagName),B=E.scrollLeft,D=E.scrollTop;
var A=H&&B?B:0,C=H&&D?D:0,F={x:E.offsetLeft-A,y:E.offsetTop-C};if(E.offsetParent){var G=LEAP.getAbsolutePos(E.offsetParent);F.x+=G.x;F.y+=G.y;G=null;}E=null;return F;};LEAP.stopEvent=function(A){e=A?A:window.event;if(LEAP.isIE){e.cancelBubble=true;e.returnValue=false;}else{e.preventDefault();e.stopPropagation();
}};if(!LEAP.isIE){HTMLElement.prototype.__defineGetter__("innerText",function(){return this.textContent;});HTMLElement.prototype.__defineSetter__("innerText",function(A){this.textContent=A;});Event.prototype.__defineGetter__("offsetX",function(){var B=this.target;var A=LEAP.getAbsolutePos(B).x;B=null;
return this.clientX-A;});Event.prototype.__defineGetter__("offsetY",function(){var A=this.target;var B=LEAP.getAbsolutePos(A).y;A=null;return this.clientY-B;});Event.prototype.__defineGetter__("srcElement",function(){return this.target;});}(function(){var O=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^[\]]*\]|['"][^'"]*['"]|[^[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?/g,H=0,D=Object.prototype.toString,M=false;
var B=function(d,T,a,V){a=a||[];var Q=T=T||document;if(T.nodeType!==1&&T.nodeType!==9){return[];}if(!d||typeof d!=="string"){return a;}var b=[],c,Y,h,g,Z,S,R=true,W=N(T);O.lastIndex=0;while((c=O.exec(d))!==null){b.push(c[1]);if(c[2]){S=RegExp.rightContext;break;}}if(b.length>1&&I.exec(d)){if(b.length===2&&E.relative[b[0]]){Y=F(b[0]+b[1],T);
}else{Y=E.relative[b[0]]?[T]:B(b.shift(),T);while(b.length){d=b.shift();if(E.relative[d]){d+=b.shift();}Y=F(d,Y);}}}else{if(!V&&b.length>1&&T.nodeType===9&&!W&&E.match.ID.test(b[0])&&!E.match.ID.test(b[b.length-1])){var j=B.find(b.shift(),T,W);T=j.expr?B.filter(j.expr,j.set)[0]:j.set[0];}if(T){var j=V?{expr:b.pop(),set:A(V)}:B.find(b.pop(),b.length===1&&(b[0]==="~"||b[0]==="+")&&T.parentNode?T.parentNode:T,W);
Y=j.expr?B.filter(j.expr,j.set):j.set;if(b.length>0){h=A(Y);}else{R=false;}while(b.length){var U=b.pop(),X=U;if(!E.relative[U]){U="";}else{X=b.pop();}if(X==null){X=T;}E.relative[U](h,X,W);}}else{h=b=[];}}if(!h){h=Y;}if(!h){throw"Syntax error, unrecognized expression: "+(U||d);}if(D.call(h)==="[object Array]"){if(!R){a.push.apply(a,h);
}else{if(T&&T.nodeType===1){for(var f=0;h[f]!=null;f++){if(h[f]&&(h[f]===true||h[f].nodeType===1&&G(T,h[f]))){a.push(Y[f]);}}}else{for(var f=0;h[f]!=null;f++){if(h[f]&&h[f].nodeType===1){a.push(Y[f]);}}}}}else{A(h,a);}if(S){B(S,Q,a,V);B.uniqueSort(a);}return a;};B.uniqueSort=function(R){if(C){M=false;
R.sort(C);if(M){for(var Q=1;Q<R.length;Q++){if(R[Q]===R[Q-1]){R.splice(Q--,1);}}}}};B.matches=function(Q,R){return B(Q,null,null,R);};B.find=function(Y,Q,Z){var X,U;if(!Y){return[];}for(var T=0,S=E.order.length;T<S;T++){var W=E.order[T],U;if((U=E.match[W].exec(Y))){var R=RegExp.leftContext;if(R.substr(R.length-1)!=="\\"){U[1]=(U[1]||"").replace(/\\/g,"");
X=E.find[W](U,Q,Z);if(X!=null){Y=Y.replace(E.match[W],"");break;}}}}if(!X){X=Q.getElementsByTagName("*");}var V={set:X,expr:Y};return V;};B.filter=function(a,Z,d,T){var S=a,g=[],X=Z,V,Q,W=Z&&Z[0]&&N(Z[0]);while(a&&Z.length){for(var Y in E.filter){if((V=E.match[Y].exec(a))!=null){var R=E.filter[Y],f,c;
Q=false;if(X==g){g=[];}if(E.preFilter[Y]){V=E.preFilter[Y](V,X,d,g,T,W);if(!V){Q=f=true;}else{if(V===true){continue;}}}if(V){for(var U=0;(c=X[U])!=null;U++){if(c){f=R(c,V,U,X);var b=T^!!f;if(d&&f!=null){if(b){Q=true;}else{X[U]=false;}}else{if(b){g.push(c);Q=true;}}}}}if(f!==undefined){if(!d){X=g;}a=a.replace(E.match[Y],"");
if(!Q){return[];}break;}}}if(a==S){if(Q==null){throw"Syntax error, unrecognized expression: "+a;}else{break;}}S=a;}return X;};var E=B.selectors={order:["ID","NAME","TAG"],match:{ID:/#((?:[\w\u00c0-\uFFFF_-]|\\.)+)/,CLASS:/\.((?:[\w\u00c0-\uFFFF_-]|\\.)+)/,NAME:/\[name=['"]*((?:[\w\u00c0-\uFFFF_-]|\\.)+)['"]*\]/,ATTR:/\[\s*((?:[\w\u00c0-\uFFFF_-]|\\.)+)\s*(?:(\S?=)\s*(['"]*)(.*?)\3|)\s*\]/,TAG:/^((?:[\w\u00c0-\uFFFF\*_-]|\\.)+)/,CHILD:/:(only|nth|last|first)-child(?:\((even|odd|[\dn+-]*)\))?/,POS:/:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^-]|$)/,PSEUDO:/:((?:[\w\u00c0-\uFFFF_-]|\\.)+)(?:\((['"]*)((?:\([^\)]+\)|[^\2\(\)]*)+)\2\))?/},attrMap:{"class":"className","for":"htmlFor"},attrHandle:{href:function(Q){return Q.getAttribute("href");
}},relative:{"+":function(X,Q,W){var U=typeof Q==="string",Y=U&&!/\W/.test(Q),V=U&&!Y;if(Y&&!W){Q=Q.toUpperCase();}for(var T=0,S=X.length,R;T<S;T++){if((R=X[T])){while((R=R.previousSibling)&&R.nodeType!==1){}X[T]=V||R&&R.nodeName===Q?R||false:R===Q;}}if(V){B.filter(Q,X,true);}},">":function(W,R,X){var U=typeof R==="string";
if(U&&!/\W/.test(R)){R=X?R:R.toUpperCase();for(var S=0,Q=W.length;S<Q;S++){var V=W[S];if(V){var T=V.parentNode;W[S]=T.nodeName===R?T:false;}}}else{for(var S=0,Q=W.length;S<Q;S++){var V=W[S];if(V){W[S]=U?V.parentNode:V.parentNode===R;}}if(U){B.filter(R,W,true);}}},"":function(T,R,V){var S=H++,Q=P;if(!R.match(/\W/)){var U=R=V?R:R.toUpperCase();
Q=L;}Q("parentNode",R,S,T,U,V);},"~":function(T,R,V){var S=H++,Q=P;if(typeof R==="string"&&!R.match(/\W/)){var U=R=V?R:R.toUpperCase();Q=L;}Q("previousSibling",R,S,T,U,V);}},find:{ID:function(R,S,T){if(typeof S.getElementById!=="undefined"&&!T){var Q=S.getElementById(R[1]);return Q?[Q]:[];}},NAME:function(S,V,W){if(typeof V.getElementsByName!=="undefined"){var R=[],U=V.getElementsByName(S[1]);
for(var T=0,Q=U.length;T<Q;T++){if(U[T].getAttribute("name")===S[1]){R.push(U[T]);}}return R.length===0?null:R;}},TAG:function(Q,R){return R.getElementsByTagName(Q[1]);}},preFilter:{CLASS:function(T,R,S,Q,W,X){T=" "+T[1].replace(/\\/g,"")+" ";if(X){return T;}for(var U=0,V;(V=R[U])!=null;U++){if(V){if(W^(V.className&&(" "+V.className+" ").indexOf(T)>=0)){if(!S){Q.push(V);
}}else{if(S){R[U]=false;}}}}return false;},ID:function(Q){return Q[1].replace(/\\/g,"");},TAG:function(R,Q){for(var S=0;Q[S]===false;S++){}return Q[S]&&N(Q[S])?R[1]:R[1].toUpperCase();},CHILD:function(Q){if(Q[1]=="nth"){var R=/(-?)(\d*)n((?:\+|-)?\d*)/.exec(Q[2]=="even"&&"2n"||Q[2]=="odd"&&"2n+1"||!/\D/.test(Q[2])&&"0n+"+Q[2]||Q[2]);
Q[2]=(R[1]+(R[2]||1))-0;Q[3]=R[3]-0;}Q[0]=H++;return Q;},ATTR:function(U,R,S,Q,V,W){var T=U[1].replace(/\\/g,"");if(!W&&E.attrMap[T]){U[1]=E.attrMap[T];}if(U[2]==="~="){U[4]=" "+U[4]+" ";}return U;},PSEUDO:function(U,R,S,Q,V){if(U[1]==="not"){if(U[3].match(O).length>1||/^\w/.test(U[3])){U[3]=B(U[3],null,null,R);
}else{var T=B.filter(U[3],R,S,true^V);if(!S){Q.push.apply(Q,T);}return false;}}else{if(E.match.POS.test(U[0])||E.match.CHILD.test(U[0])){return true;}}return U;},POS:function(Q){Q.unshift(true);return Q;}},filters:{enabled:function(Q){return Q.disabled===false&&Q.type!=="hidden";},disabled:function(Q){return Q.disabled===true;
},checked:function(Q){return Q.checked===true;},selected:function(Q){Q.parentNode.selectedIndex;return Q.selected===true;},parent:function(Q){return !!Q.firstChild;},empty:function(Q){return !Q.firstChild;},has:function(S,R,Q){return !!B(Q[3],S).length;},header:function(Q){return/h\d/i.test(Q.nodeName);
},text:function(Q){return"text"===Q.type;},radio:function(Q){return"radio"===Q.type;},checkbox:function(Q){return"checkbox"===Q.type;},file:function(Q){return"file"===Q.type;},password:function(Q){return"password"===Q.type;},submit:function(Q){return"submit"===Q.type;},image:function(Q){return"image"===Q.type;
},reset:function(Q){return"reset"===Q.type;},button:function(Q){return"button"===Q.type||Q.nodeName.toUpperCase()==="BUTTON";},input:function(Q){return/input|select|textarea|button/i.test(Q.nodeName);}},setFilters:{first:function(R,Q){return Q===0;},last:function(S,R,Q,T){return R===T.length-1;},even:function(R,Q){return Q%2===0;
},odd:function(R,Q){return Q%2===1;},lt:function(S,R,Q){return R<Q[3]-0;},gt:function(S,R,Q){return R>Q[3]-0;},nth:function(S,R,Q){return Q[3]-0==R;},eq:function(S,R,Q){return Q[3]-0==R;}},filter:{PSEUDO:function(V,R,S,W){var Q=R[1],T=E.filters[Q];if(T){return T(V,S,R,W);}else{if(Q==="contains"){return(V.textContent||V.innerText||"").indexOf(R[3])>=0;
}else{if(Q==="not"){var U=R[3];for(S=0,l=U.length;S<l;S++){if(U[S]===V){return false;}}return true;}}}},CHILD:function(Q,T){var W=T[1],R=Q;switch(W){case"only":case"first":while((R=R.previousSibling)){if(R.nodeType===1){return false;}}if(W=="first"){return true;}R=Q;case"last":while((R=R.nextSibling)){if(R.nodeType===1){return false;
}}return true;case"nth":var S=T[2],Z=T[3];if(S==1&&Z==0){return true;}var V=T[0],Y=Q.parentNode;if(Y&&(Y.sizcache!==V||!Q.nodeIndex)){var U=0;for(R=Y.firstChild;R;R=R.nextSibling){if(R.nodeType===1){R.nodeIndex=++U;}}Y.sizcache=V;}var X=Q.nodeIndex-Z;if(S==0){return X==0;}else{return(X%S==0&&X/S>=0);
}}},ID:function(R,Q){return R.nodeType===1&&R.getAttribute("id")===Q;},TAG:function(R,Q){return(Q==="*"&&R.nodeType===1)||R.nodeName===Q;},CLASS:function(R,Q){return(" "+(R.className||R.getAttribute("class"))+" ").indexOf(Q)>-1;},ATTR:function(V,T){var S=T[1],Q=E.attrHandle[S]?E.attrHandle[S](V):V[S]!=null?V[S]:V.getAttribute(S),W=Q+"",U=T[2],R=T[4];
return Q==null?U==="!=":U==="="?W===R:U==="*="?W.indexOf(R)>=0:U==="~="?(" "+W+" ").indexOf(R)>=0:!R?W&&Q!==false:U==="!="?W!=R:U==="^="?W.indexOf(R)===0:U==="$="?W.substr(W.length-R.length)===R:U==="|="?W===R||W.substr(0,R.length+1)===R+"-":false;},POS:function(U,R,S,V){var Q=R[2],T=E.setFilters[Q];
if(T){return T(U,S,R,V);}}}};var I=E.match.POS;for(var K in E.match){E.match[K]=new RegExp(E.match[K].source+/(?![^\[]*\])(?![^\(]*\))/.source);}var A=function(R,Q){R=Array.prototype.slice.call(R);if(Q){Q.push.apply(Q,R);return Q;}return R;};try{Array.prototype.slice.call(document.documentElement.childNodes);
}catch(J){A=function(U,T){var R=T||[];if(D.call(U)==="[object Array]"){Array.prototype.push.apply(R,U);}else{if(typeof U.length==="number"){for(var S=0,Q=U.length;S<Q;S++){R.push(U[S]);}}else{for(var S=0;U[S];S++){R.push(U[S]);}}}return R;};}var C;if(document.documentElement.compareDocumentPosition){C=function(R,Q){var S=R.compareDocumentPosition(Q)&4?-1:R===Q?0:1;
if(S===0){M=true;}return S;};}else{if("sourceIndex" in document.documentElement){C=function(R,Q){var S=R.sourceIndex-Q.sourceIndex;if(S===0){M=true;}return S;};}else{if(document.createRange){C=function(T,R){var S=T.ownerDocument.createRange(),Q=R.ownerDocument.createRange();S.selectNode(T);S.collapse(true);
Q.selectNode(R);Q.collapse(true);var U=S.compareBoundaryPoints(Range.START_TO_END,Q);if(U===0){M=true;}return U;};}}}(function(){var R=document.createElement("div"),S="script"+(new Date).getTime();R.innerHTML="<a name='"+S+"'/>";var Q=document.documentElement;Q.insertBefore(R,Q.firstChild);if(!!document.getElementById(S)){E.find.ID=function(U,V,W){if(typeof V.getElementById!=="undefined"&&!W){var T=V.getElementById(U[1]);
return T?T.id===U[1]||typeof T.getAttributeNode!=="undefined"&&T.getAttributeNode("id").nodeValue===U[1]?[T]:undefined:[];}};E.filter.ID=function(V,T){var U=typeof V.getAttributeNode!=="undefined"&&V.getAttributeNode("id");return V.nodeType===1&&U&&U.nodeValue===T;};}Q.removeChild(R);Q=R=null;})();(function(){var Q=document.createElement("div");
Q.appendChild(document.createComment(""));if(Q.getElementsByTagName("*").length>0){E.find.TAG=function(R,V){var U=V.getElementsByTagName(R[1]);if(R[1]==="*"){var T=[];for(var S=0;U[S];S++){if(U[S].nodeType===1){T.push(U[S]);}}U=T;}return U;};}Q.innerHTML="<a href='#'></a>";if(Q.firstChild&&typeof Q.firstChild.getAttribute!=="undefined"&&Q.firstChild.getAttribute("href")!=="#"){E.attrHandle.href=function(R){return R.getAttribute("href",2);
};}Q=null;})();if(document.querySelectorAll){(function(){var Q=B,S=document.createElement("div");S.innerHTML="<p class='TEST'></p>";if(S.querySelectorAll&&S.querySelectorAll(".TEST").length===0){return ;}B=function(W,V,T,U){V=V||document;if(!U&&V.nodeType===9&&!N(V)){try{return A(V.querySelectorAll(W),T);
}catch(X){}}return Q(W,V,T,U);};for(var R in Q){B[R]=Q[R];}S=null;})();}if(document.getElementsByClassName&&document.documentElement.getElementsByClassName){(function(){var Q=document.createElement("div");Q.innerHTML="<div class='test e'></div><div class='test'></div>";if(Q.getElementsByClassName("e").length===0){return ;
}Q.lastChild.className="e";if(Q.getElementsByClassName("e").length===1){return ;}E.order.splice(1,0,"CLASS");E.find.CLASS=function(R,S,T){if(typeof S.getElementsByClassName!=="undefined"&&!T){return S.getElementsByClassName(R[1]);}};Q=null;})();}function L(R,W,V,a,X,Z){var Y=R=="previousSibling"&&!Z;
for(var T=0,S=a.length;T<S;T++){var Q=a[T];if(Q){if(Y&&Q.nodeType===1){Q.sizcache=V;Q.sizset=T;}Q=Q[R];var U=false;while(Q){if(Q.sizcache===V){U=a[Q.sizset];break;}if(Q.nodeType===1&&!Z){Q.sizcache=V;Q.sizset=T;}if(Q.nodeName===W){U=Q;break;}Q=Q[R];}a[T]=U;}}}function P(R,W,V,a,X,Z){var Y=R=="previousSibling"&&!Z;
for(var T=0,S=a.length;T<S;T++){var Q=a[T];if(Q){if(Y&&Q.nodeType===1){Q.sizcache=V;Q.sizset=T;}Q=Q[R];var U=false;while(Q){if(Q.sizcache===V){U=a[Q.sizset];break;}if(Q.nodeType===1){if(!Z){Q.sizcache=V;Q.sizset=T;}if(typeof W!=="string"){if(Q===W){U=true;break;}}else{if(B.filter(W,[Q]).length>0){U=Q;
break;}}}Q=Q[R];}a[T]=U;}}}var G=document.compareDocumentPosition?function(R,Q){return R.compareDocumentPosition(Q)&16;}:function(R,Q){return R!==Q&&(R.contains?R.contains(Q):true);};var N=function(Q){return Q.nodeType===9&&Q.documentElement.nodeName!=="HTML"||!!Q.ownerDocument&&Q.ownerDocument.documentElement.nodeName!=="HTML";
};var F=function(Q,X){var T=[],U="",V,S=X.nodeType?[X]:X;while((V=E.match.PSEUDO.exec(Q))){U+=V[0];Q=Q.replace(E.match.PSEUDO,"");}Q=E.relative[Q]?Q+"*":Q;for(var W=0,R=S.length;W<R;W++){B(Q,S[W],T);}return B.filter(U,T);};window.Sizzle=B;LEAP.selector=B;})();var DateFormat=function(B){var D=function(E){E=E.replace(/yyyy/g,B.getFullYear());
E=E.replace(/yy/g,B.getFullYear().toString().slice(2));E=E.replace(/mm/g,(B.getMonth()+1)<10?"0"+(B.getMonth()+1):B.getMonth()+1);E=E.replace(/dd/g,B.getDate()<10?"0"+B.getDate():B.getDate());E=E.replace(/wk/g,B.getDay()<10?"0"+B.getDay():B.getDay());E=E.replace(/hh/g,B.getHours()<10?"0"+B.getHours():B.getHours());
E=E.replace(/mi/g,B.getMinutes()<10?"0"+B.getMinutes():B.getMinutes());E=E.replace(/ss/g,B.getSeconds()<10?"0"+B.getSeconds():B.getSeconds());E=E.replace(/ms/g,B.getMilliseconds()<10?"0"+B.getMilliseconds():B.getMilliseconds());return E;};var A=function(){};var C=function(){return B.toLocaleString();
};B=new Date(B);if(!B||B=="NaN"){B=new Date();}this.format=D;this.valueOf=A;this.toString=C;};function StringBuffer(){this._strings_=[];}StringBuffer.prototype.append=function(A){this._strings_.push(A);};StringBuffer.prototype.toString=function(A){if(A==null){A="";}return this._strings_.join(A);};String.prototype.Trim=function(){return this.replace(/(^\s*)|(\s*$)/g,"");
};String.prototype.replaceall=function(A,C){var B=this;if(C==null){C="";}B=B.replace(A,C);while(B.indexOf(A)>=0){B=B.replace(A,C);}return B;};Array.prototype.contains=function(A){return this.indexof(A)>-1;};Array.prototype.add=function(A){this[this.length]=A;};Array.prototype.insert=function(C,B){var A=this.length;
return this.slice(0,B).concat(C).concat(this.slice(B,A));};Array.prototype.insertBefore=function(C,B){var A=this.indexof(B);if(A==-1){return this.concat(B);}return this.insert(C,A);};Array.prototype.replace=function(B,A){this[B]=A;};Array.prototype.clear=function(){this.length=0;};Array.prototype.indexof=function(C){if(C==null){return -1;
}var A=this.length;for(var B=0;B<A;B++){if(this[B]==C){return B;}}return -1;};Array.prototype.removeindex=function(A){if(isNaN(A)||A>this.length){return false;}this.splice(A,1);};Array.prototype.remove=function(B){var A=this.indexof(B);if(A>-1){this.removeindex(A);}};var array=function(){this.k=UUID.cID();
this.keys={};};array.prototype.length=0;array.prototype.n="number";array.prototype.b="boolean";array.prototype.s="string";array.prototype.nn="n_";array.prototype.add=function(D){if(D==null){return ;}var B=typeof (D);var C=B==this.n||B==this.b||B==this.s;var A;if(C){A=this.k+this.nn+D;if(this.keys[A]!=null){return ;
}}else{A=this.k+this.length;if(D[this.k]>-1){return ;}else{D[this.k]=this.length;}}this.keys[A]=D;++this.length;};array.prototype.getindex=function(A){return this.getValue(this.keys[A]);};array.prototype.getkey=function(E){if(E==null){return ;}var C=typeof (E);var D=C==this.n||C==this.b||C==this.s;if(D){var A=this.k+this.nn+E;
if(this.keys[A]!=null){return A;}}else{var B=E[this.k];if(B>-1){return this.k+B;}}};array.prototype.contains=function(A){return this.getkey(A)!=null;};array.prototype.getvalue=function(A){return this.keys[A];};array.prototype.remove=function(B){var A=this.getkey(B);if(A==null){return ;}delete this.keys[A];
--this.length;};array.prototype.clear=function(){this.keys=null;this.keys={};this.length=0;};var hashtable=function(){this.keys={};};hashtable.prototype.contains=function(A){if(this.count==0){return false;}return this.keys.hasOwnProperty(A);};hashtable.prototype.count=0;hashtable.prototype.add=function(A,B){if(this.contains(A)){return ;
}this.keys[A]=B;this.count++;};hashtable.prototype.getvalue=function(A){return this.keys[A];};hashtable.prototype.replace=function(B,A){if(this.contains(B)){this.keys[B]=A;}};hashtable.prototype.remove=function(A){this.keys[A]=null;delete this.keys[A];this.count--;};hashtable.prototype.clear=function(){this.keys=null;
this.keys={};this.count=0;};hashtable.prototype.clone=function(){var C=this.keys;var B=new hashtable();for(var A in C){B.add(A,this.getvalue(A));}return B;};var commfields={ggc:"___global_GC_Flage",gcfs:"[_GC=",gcfe:"]",gcf:"_GCA",gco:new hashtable(),string:"string",idpre:"#",value:"value",ct:"ct",ctf:"ctf",tpof:"tpof",tag:"tagName",bindfiled:"bindfiled_",bl:"&nbsp",vv:"@v",vn:"@n",vid:"@i",c:1,tpo:"<a ctf='table_tpo' href='javascript:void(0)' tpof='@v'>@n</a>",tpos:"|",tpos2:":",rsccv:"___codevalue___",sncel:"<input ctf='table_chk' type='checkbox'/>@sn",pge:"@pageNum/@pageCount页 @beginNum/@count条 @pageSize条/页",rsc:"com.longrise.LEAP.Base.Objects.ResultSet"};
var UIEventManager=new Object();UIEventManager.o="on";UIEventManager.u="_uuid";UIEventManager._e="___events";UIEventManager.addEvent=function(C,F,G,E,B){if(G==null){return ;}var A=null;var I=E;try{if(!C.events){C.events=[];}A=C.events[F];if(!A){A=C.events[F]=[];if(C[UIEventManager.o+F]){A[0]=C[UIEventManager.o+F];
}}A.add([G,B,I]);if(!C[UIEventManager.o+F]){C[UIEventManager.o+F]=UIEventManager.handleEvent;var D=[F];C[UIEventManager._e]=D;D=null;}else{var H=C[UIEventManager._e];if(!H.contains(F)){H.add(F);}H=null;}}finally{A=null;C=null;I=null;}};UIEventManager.removeEvent=function(E,F,B){var G=E["___events"];if(F==null){if(E.events&&G){var A=G.length;
for(var D=0;D<A;D++){var F=G[D];E.events[F].clear();E["on"+F]=null;}G.clear();}}else{if(E.events&&E.events[F]){if(B!=null){var C=E.events[F];for(D=C.length-1;D>-1;D--){if(C[D][0]==B){C.removeindex(D);}}if(C.length==0){C.clear();G.remove(F);E["on"+F]=null;}C=null;}else{E.events[F].clear();G.remove(F);
E["on"+F]=null;}}}E=null;};UIEventManager.handleEvent=function(A){var B=true;A=A||window.event;if(A==null||A.type==null||A.srcElement==null||A.srcElement.disabled||A.srcElement.tagName==null){if(A.type!=null&&(A.type=="load"||A.type=="unload")){}else{return ;}}var D=this.events[A.type];if(D==null){return ;
}var C=D.length;if(C==null||C==0){return ;}for(var G=C-1;G>-1;G--){var F=D[G][1];var I=D[G][2];var J=D[G][0];try{if(J==null){return ;}var K={e:A,caller:this,arg:I};if(F==null){F=this;}var H=J.call(F,K);if(H!=null){if(H==false){break;}if(H.breakEvent==true){return false;}}}catch(E){if(isdebug){throw E;
}}finally{J=K.caller=K.e=K.arg=null;F=I=K=null;}}D=null;return B;};DelegateUIEventManager=new Object();DelegateUIEventManager.a=new array();DelegateUIEventManager.b=new hashtable();DelegateUIEventManager.c=new array();DelegateUIEventManager.init=function(){DelegateUIEventManager.c.add("click");DelegateUIEventManager.c.add("dblclick");
DelegateUIEventManager.c.add("keydown");DelegateUIEventManager.c.add("keypress");DelegateUIEventManager.c.add("keyup");DelegateUIEventManager.c.add("mousemove");}();DelegateUIEventManager.u="_uuid";DelegateUIEventManager.e="___devents";DelegateUIEventManager.addEvent=function(C,D,A,B,F){var G=C[DelegateUIEventManager.e];
if(G==null){G=C[DelegateUIEventManager.e]=new hashtable();}var E=G.getvalue(D);if(E==null){E=[];G.add(D,E);}E.add({arg:B,domain:F,fn:A});if(!DelegateUIEventManager.a.contains(D)){UIEventManager.addEvent(document.body,D,DelegateUIEventManager.handleEvent);DelegateUIEventManager.a.add(D);}G=E=A=B=C=D=F=null;
};DelegateUIEventManager.removeEvent=function(D,E,B){if(D!=null){if(E==null&&B==null){D[DelegateUIEventManager.e]=null;D.removeAttribute(DelegateUIEventManager.e);}else{if(E!=null&&B!=null){var H=D[DelegateUIEventManager.e];if(H==null){return ;}var F=H.getvalue(E);if(F!=null){var A=F.length;for(var C=A-1;
C>-1;C--){var G=F[C];if(G.fn==B){F.remove(G);}}}H=F=null;}else{if(E==null&&B!=null){}else{if(E!=null&&B==null){var H=D[DelegateUIEventManager.e];if(H!=null){H.remove(E);}}}}}}};DelegateUIEventManager.handleEvent=function(A){var G=A.e;var E=G.target||G.srcElement;var H=G.type;var J=E[DelegateUIEventManager.e];
if(J==null){return ;}var K=J.getvalue(H);if(K!=null){var B=K.length;for(var F=0;F<B;F++){var I=K[F];var L={caller:E,e:G,arg:I.arg};var D=I.domain;if(D==null){D=E;}try{if(I.fn.call(D,L)==false){break;}}catch(C){if(isdebug){throw C;}}finally{I=L=D=null;}}}J=K=E=G=A=null;};ElementEventManager=new Object();
ElementEventManager.a=new hashtable();ElementEventManager.e="__eevents";ElementEventManager.addManagedEventType=function(C,B){if(ElementEventManager.a.contains(C)){ElementEventManager.a.getvalue(C).add(B);}else{var A=new array();A.add(B);ElementEventManager.a.add(C,A);}};ElementEventManager.addEvent=function(C,D,A,B,F){if(C==null||D==null||A==null){return ;
}var G=C[ElementEventManager.e];if(G==null){G=C[ElementEventManager.e]=new hashtable();}var E=G.getvalue(D);if(E==null){E=[];G.add(D,E);}E.add({arg:B,domain:F,fn:A});G=E=A=B=C=D=F=null;};ElementEventManager.removeEvent=function(E,F,B){if(E!=null){if(F==null&&B==null){E[ElementEventManager.e]=null;E.removeAttribute(ElementEventManager.e);
}else{if(F!=null&&B!=null){var G=E[ElementEventManager.e];if(G.contains(F)){var C=G.getvalue(F);if(C!=null){var A=C.length;for(var D=A-1;D>-1;D--){if(C[D].fn==B){C.remove(C[D]);}}if(C.length==0){}G.remove(F);if(G.count==0){E[ElementEventManager.e]=null;E.removeAttribute(ElementEventManager.e);}C=null;
}}G=null;}else{if(F==null&&B!=null){}else{if(F!=null&&B==null){var G=E[ElementEventManager.e];if(G!=null){G.remove(F);}G=null;}}}}E=B=F=null;}};ElementEventManager.handleEvent=function(E,G,K){var H=E[ElementEventManager.e];if(H==null){return ;}var J=H.getvalue(G);if(J!=null){var B=J.length;for(var F=0;
F<B;F++){var I=J[F];var A={caller:E,arg:I.arg,arg2:K};var D=I.domain;if(D==null){D=E;}try{if(I.fn.call(D,A)==false){break;}}catch(C){if(isdebug){throw C;}}finally{I=A=D=null;}}}H=J=E=K=null;};LEAP.getElement=function(A,E,D,B){var C=null;try{if(E!=null&&typeof (E)==commfields.string){E=LEAP.getElement(E);
}C=LEAP.selector(A,E,D,B);if(C.length>0){return C[0];}}catch(F){}finally{C=null;}};LEAP.getElements=function(A,E,D,B){var C=null;try{if(E!=null&&typeof (E)==commfields.string){E=LEAP.getElement(E);}C=LEAP.selector(A,E,D,B);if(C!=null&&C.length==0){return null;}return C;}catch(F){}finally{C=null;}};LEAP.addEvent=function(A,K,L,J,E,M){if(typeof (A)==commfields.string){A=LEAP.getElements(A);
}if(A==null||K==null||L==null){return ;}if(K!=null){K=K.Trim();}var H=M!=true&&DelegateUIEventManager.c.contains(K);var C=null;if(H){C=DelegateUIEventManager;}else{C=UIEventManager;}if(A instanceof Array){var D=A.length;for(var G=0;G<D;G++){var F=A[G];var I=F.getAttribute(commfields.ct);var B=I!=null&&ElementEventManager.a.contains(I)&&ElementEventManager.a.getvalue(I).contains(K);
if(B){ElementEventManager.addEvent(F,K,L,J,E);}else{C.addEvent(F,K,L,J,E);}F=null;}}else{var I=null;if(A.getAttribute!=null){I=A.getAttribute(commfields.ct);}var B=I!=null&&ElementEventManager.a.contains(I)&&ElementEventManager.a.getvalue(I).contains(K);if(B){ElementEventManager.addEvent(A,K,L,J,E);}else{C.addEvent(A,K,L,J,E);
}}A=K=L=J=E=null;};LEAP.removeEvent=function(A,I,J,K){if(typeof (A)==commfields.string){A=LEAP.getElements(A);}if(A==null||I==null||J==null){return ;}if(I!=null){I=I.Trim();}var F=K!=true&&DelegateUIEventManager.c.contains(I);var C=null;if(F){C=DelegateUIEventManager;}else{C=UIEventManager;}if(A instanceof Array){var D=A.length;
for(var G=0;G<D;G++){var E=A[G];var H=E.getAttribute(commfields.ct);var B=H!=null&&ElementEventManager.a.contains(H)&&ElementEventManager.a.getvalue(H).contains(I);if(B){ElementEventManager.removeEvent(E,I,J);}else{C.removeEvent(E,I,J);}E=null;}}else{var H=null;if(A.getAttribute!=null){H=A.getAttribute(commfields.ct);
}var B=H!=null&&ElementEventManager.a.contains(H)&&ElementEventManager.a.getvalue(H).contains(I);if(B){ElementEventManager.removeEvent(A,I,J);}else{C.removeEvent(A,I,J);}}A=I=J=null;};LEAP.setGCFlag=function(B,A){if(B["_GC"]!=null){return ;}if(A==null){A="___global_GC_Flage";}B["_GC"]=A;};LEAP.getGCFlag=function(A){return A.getAttribute("_GC");
};LEAP.setGCAttribute=function(B,A,D){if(B==null){return ;}LEAP.setGCFlag(B);B[A]=D;var C=B["_GCA"];if(C==null){C=B["_GCA"]=new array();C.add(A);}else{if(!C.contains(A)){C.add(A);}}C=D=A=B=null;};LEAP.getGCAttribute=function(B,A){if(B!=null){return B[A];}};LEAP.removeGCAttribute=function(B,A){if(B!=null&&A!=null){B[A]=null;
B.removeAttribute(A);B[commfields.gcf].remove(A);}};LEAP.createGCObject=function(A){if(A==null){A=commfields.ggc;}var B=commfields.gco.getvalue(A);if(B==null){B=new Object();commfields.gco.add(A,B);}return B;};LEAP.getGCObject=function(A){if(A==null){A=commfields.ggc;}return commfields.gco.getvalue(A);
};LEAP.setAttribute=function(E,F,B){if(typeof (E)==commfields.string){E=LEAP.getElements(E);}if(E==null){return ;}var D=E instanceof Array;if(D){if(E.length>0){var A=E.length;for(var C=0;C<A;C++){E[C][F]=B;E[C].setAttribute(F,B);}}}else{E[F]=B;}E=null;};LEAP.removeAttribute=function(C,D){if(typeof (C)==commfields.string){C=LEAP.getElements(C);
}if(C==null){return ;}if(!(C instanceof Array)){C=[C];}var A=C.lenght;for(var B=0;B<A;B++){C[B].removeAttribute(D);}};LEAP.getAttribute=function(C,B){if(C==null){return ;}var A=C[B];if(A==null){return C.getAttribute(B);}return A;};LEAP.setStyle=function(F,E,B){if(F==null||E==null){return ;}if(typeof (F)==commfields.string){F=LEAP.getElements(F);
}if(F==null){return ;}if(B==true||F instanceof Array){}else{F=[F];}var A=F.length;for(var D=0;D<A;D++){var G=F[D];for(var C in E){G.style[C]=E[C];}G=null;}F=null;};LEAP.GCCollect=function(G){var H=G==null||G==commfields.ggc;if(H&&G==null){G=commfields.ggc;}var C=LEAP.getElements(commfields.gcfs+G+commfields.gcfe);
if(C!=null&&C.length>0){var A=C.length;for(var D=0;D<A;D++){var I=C[D];var F=I.getAttribute(commfields.gcf);if(F!=null){for(var B in F.keys){var E=F.getvalue(B);I[E]=null;E=null;}I[commfields.gcf]=null;F=null;}UIEventManager.removeEvent(I);DelegateUIEventManager.removeEvent(I);I=null;}}if(!H){if(commfields.gco.contains(G)){commfields.gco.remove(G);
}}else{commfields.gco.clear();}};LEAP.request=function(B,C,A,I,G,E,F,D,H){return leapclient.request(B,C,A,I,G,E,F,D,H);};LEAP.asynrequest=function(C,D,E,B,A){return leapclient.request(C,D,E,B,null,null,null,null,null,A);};LEAP._check=function(B,A){if(typeof (B)==commfields.string){B=LEAP.getElement(B);
}if(B==null||B.getAttribute("ct")!=A){return ;}try{return B;}finally{B=null;}};LEAP._match=function(D,F,G,H,B){if(G==null){G=commfields.ct;}var I=null;try{if(D.getAttribute(G)==F){return D;}if(H==null){H=19;}I=D.parentNode;var A=-1;for(var E=0;E<H;E++){A++;if(I==null){return ;}if(I.tagName=="BODY"){return ;
}if(I.getAttribute(G)==F){if(B==true){return A;}return I;}I=I.parentNode;if(I==null){return ;}}}catch(C){}finally{I=D=null;}};LEAP.formatdate=function(A,C){if(C==null){if(A==null){return ;}if(typeof (A)=="string"&&A.indexOf(":")>0){C=0;}else{C==1;}}if(A==null){return null;}var B="yyyy-mm-dd hh:mi:ss";
if(C==1){B="yyyy-mm-dd";}if(A instanceof Date){return new DateFormat(A).format(B);}else{return new DateFormat(LEAP.tonum(A)).format(B);}};LEAP.toDate=function(D){if(D==null){return ;}var C=null;var A=D.indexOf(".");if(A>-1){C=D.substring(A+1)*1;D=D.substring(0,A);}var B=new Date(Date.parse(D.replace(/-/g,"/")));
if(C!=null){B.setMilliseconds(C);}return B;};LEAP.parsedatestr=function(A,B){if(B==null){B=0;}if(A==null){return null;}if(A!=null&&A.javaClass!=null&&(A.javaClass=="java.util.Date"||A.javaClass=="java.sql.Timestamp")){return LEAP.formatdate(A.time,B);}return A;};LEAP.tonum=function(B){if(B==null||B==undefined||isNaN(B)){B=0;
}var A=Number(B);if(isNaN(A)){return 0;}return A;};LEAP.parsenum=function(B){if(B==null||B==undefined||isNaN(B)){return null;}var A=Number(B);if(isNaN(A)){return null;}return A;};LEAP.isArray=function(A){if(A==null){return false;}return Object.prototype.toString.apply(A)=="[object Array]";};LEAP.convertResult=function(D){if(D.javaClass!=null){if(D.javaClass==commfields.rsc){if(D==null||D.result==null||D.result.length==0){return null;
}var A=new Array();var C=D.result.length;var L=D.codeValues!=null;for(var H=0;H<C;H++){var I=new Object();var K=D.result[H];var J=D.metaData.length;for(var F=0;F<J;F++){var E=D.metaData[F].name;var G=D.metaData[F].type;var M=K[F];if(L){var B=D.codeValues[H];if(B!=null){_cv=B[F];if(_cv!=null){I[commfields.rsccv+E]=_cv;
}}}switch(G){case 12:break;case -5|-6|-7|2|3|4|5|6|7|8:M=LEAP.tonum(M);break;}I[E]=M;}A.add(I);}return A;}else{if(D.javaClass=="com.longrise.LEAP.Base.Objects.EntitySet"){return D.result;}}}return D;};var ChangeResult=function(){};ChangeResult.prototype.javaClass="com.longrise.LEAP.Base.Objects.ChangeResult";
ChangeResult.prototype.addparameter=function(C,A,B){if(this.metaData==null){this.metaData=[];this.result=[];this.source=[];}this.metaData.push(C);this.result.push(A);this.source.push(B);};var QueryParameters=function(){};QueryParameters.prototype.javaClass="com.longrise.LEAP.Base.Objects.QueryParameter";
var SearchParameters=function(){};SearchParameters.prototype.javaClass="com.longrise.LEAP.Base.Objects.SearchParameters";var JavaDate=function(){};JavaDate.prototype.javaClass="java.util.Date";SearchParameters.prototype.addParameter=function(B,D,A){if(this.parameters==null){this.parameters=[];}var C=new QueryParameters();
C.name=B;C.value=D;C.flag=A;this.parameters.push(C);};SearchParameters.prototype.removeParameter=function(B){if(this.parameters==null){return ;}var A=this.parameters.length;for(var C=A-1;C>-1;C--){var D=this.parameters[C];if(D.name==B){this.parameters.remove(D);}}};SearchParameters.prototype.addField=function(A){if(this.fields==null){this.fields=[];
}if(A!=null){this.fields.push(A);}};SearchParameters.prototype.setOrder=function(A){this.order=A;};var DataResult=function(){};DataResult.prototype.javaClass="com.longrise.LEAP.Base.Objects.DataResult";DataResult.prototype.addparameter=function(A,B){if(this.metaData==null){this.metaData=[];this.result=[];
}this.metaData.push(A);this.result.push(B);};LEAP._p=function(str){if(str==null){return ;}var l=str.indexOf("<!--@");if(l>-1){var e=str.substr(l+5,str.indexOf("-->",l)-l-5);var o=null;try{var ex="({"+e.replaceall(" =","=").replaceall("= ","=").replaceall("=",":").Trim().replaceall("\r\n"," ").replaceall("\n"," ").replaceall("  "," ").replaceall(" ",",")+"})";
var o=eval(ex);if(o!=null&&ex!=null){var idx=ex.indexOf("module:");if(idx>-1){var idx2=ex.indexOf(",");if(idx2<0){idx2=ex.length-2;}var n=ex.substring(idx+7,idx2);o.___moduleName=n;}}}catch(err){}}return o;};LEAP._m=new hashtable();LEAP.buildModuleDef=function(A){if(A==null){return ;}if(A.type=="static"){}else{if(A.type="instance"){}}};
LEAP.clone=function(C,B){if(B==null){B={};}for(var A in C){B[A]=C[A];}return B;};LEAP.getLastError=function(){var A=leapclient.getLastError();if(A!=null&&A.error!=null){return A;}return null;};var pageObject={};pageObject.getValue=function(A){return LEAP.getValue(A);};pageObject.setValue=function(B,A){LEAP.setValue(B,A);
};pageObject.addEvent=function(E,C,B,A,D){if(B==null){return ;}if(typeof (E)==commfields.string){E=LEAP.getElements(E+"[instance="+this.instance+"]");}LEAP.addEvent(E,C,B,A,this);};pageObject.removeEvent=function(C,B,A){if(typeof (C)==commfields.string){C=LEAP.getElements(C+"[instance="+this.instance+"]");
}LEAP.removeEvent(C,B,A);};pageObject.validateUI=function(A){if(A!=null){if(typeof (A)==commfields.string){A=LEAP.getElements(A+"[instance="+this.instance+"]");}}else{A=LEAP.getElements("[check][instance="+this.instance+"]");}return LEAP.check.validate(A);};pageObject.request=function(A,B){return LEAP.request(A,B,this.extendPar);
};pageObject.getLastWarring=function(){return leapclient.getLastWarring();};pageObject.getLastExtendResult=function(){return leapclient.getLastExtendResult();};pageObject.setLastExtendResult=function(A){return leapclient.setLastExtendResult(A);};pageObject.getLastError=function(){return leapclient.getLastError();
};pageObject.getElements=function(C,B){var A=LEAP.getElements(C,B);try{return A;}finally{A=null;}};pageObject.getElement=function(C,B){var A=LEAP.getElement(C,B);C=B=null;try{return A;}finally{A=null;}};pageObject.setPageData=function(C,E,F,B,A){if(B==null){B=true;}if(B){this.data=C;}var D=null;if(E!=null){D="[ds="+E+"]";
}if(F==true){LEAP.bindData(C,this.instance,D);}else{LEAP.asyn(LEAP.bindData,null,null,C,this.instance,D,A);}C=null;};pageObject.setPageDataByPK=function(D,C,E){if(this.moduleName==null){return ;}var A=this.request("SearchByPK",{name:this.moduleName,pk:D});if(A!=null){this.pks=A.pks;var B=LEAP.convertResult(A);
if(B!=null){this.setPageData(B[0],C,E);}}};pageObject.getPageData=function(C){var B=null;if(C!=null){B="[ds="+C+"]";}var A=LEAP.getData(this.data,this.instance,B);try{return A;}finally{A=null;}};pageObject.clearPageData=function(A){this.data=null;if(A==true){LEAP.check.clearValidate(LEAP.getElements("[check][instance="+this.instance+"]"));
LEAP.bindData(this.defaultData,this.instance);}else{LEAP.check.clearValidate(LEAP.getElements("[check][instance="+this.instance+"]"));LEAP.asyn(LEAP.bindData,null,null,this.defaultData,this.instance);}};pageObject.clearValidateUI=function(){LEAP.asyn(LEAP.check.clearValidate,null,null,LEAP.getElements("[check][instance="+this.instance+"]"));
};pageObject.getQueryParameter=function(G,A){if(G==null){G=new SearchParameters();}var H=LEAP.getData(null,this.instance,A,true);try{if(H!=null&&H.data!=null){for(var C in H.data){var I=H.data[C];if(I==null||(typeof (I)=="string"&&I.Trim()=="")){continue;}var B=H.searchtype[C];if(C.lastIndexOf("___")==C.length-3){C=C.substr(0,C.indexOf("___"));
}var E=false;if(C.toLowerCase()=="areaid"){G.addParameter(C,I,16);var K=null;if(I.length==18){if(I.substring(2,4)=="00"){K=I.substring(0,2);}else{if(I.substring(4,6)=="00"){K=I.substring(0,4);}else{if(I.substring(6,9)=="000"){K=I.substring(0,6);}else{if(I.substring(9,12)=="000"){K=I.substring(0,9);}else{if(I.substring(12,15)=="000"){K=I.substring(0,12);
}else{if(I.substring(15,18)=="000"){K=I.substring(0,15);}}}}}}while(K.length!=18){K+="9";}}G.addParameter(C,K,17);}else{if(H.change[C]!=null&&H.change[C].controltype!=null){if(H.change[C].controltype=="checkbox"){E=true;var J=I.split(",");for(var D=0;D<J.length;D++){var F=J[D];if(F!=null&&F.Trim()!=""){G.addParameter(C,F,12);
}}}}if(!E){G.addParameter(C,I,B);}}}}return G;}finally{G=H=null;}};pageObject.getUpdateParameter=function(F){if(this.pks==null){return ;}var A=null;var B=null;try{var E=null;if(F!=null){E="[ds="+F+"]";}B=LEAP.getData(this.data,this.instance,E);if(B==null||B.change==null){return null;}A=LEAP.convertChangeResult(B.change);
for(var D=0;D<this.pks.length;D++){var C=this.data[this.pks[D]];if(C==null){return null;}A.addparameter(this.pks[D],C,null);}return A;}finally{A=B=null;}};pageObject.deleteResult=function(B,E,A){if(A==null||B==null||E==null||!(A instanceof Array)){return ;}var F=new DataResult();F.name=B;if(typeof (A)=="string"){A=[A];
}for(var D=0;D<A.length;D++){var C=E[A[D]];if(C==null){return ;}F.addparameter(A[D],C);}return this.request("DynaDelete",{par:F});};pageObject.getCreateParameter=function(F){var E=null;var C=null;try{var D=null;if(F!=null){D="[ds="+F+"]";}C=LEAP.getData(null,this.instance,D);if(C!=null&&C.data!=null){for(var B in C.data){var A=C.data[B];
if(A==null||(typeof (A)=="string"&&A.Trim()=="")){continue;}if(E==null){E=new DataResult();}E.addparameter(B,A);}}return E;}finally{E=C=null;}};pageObject.regEvent=function(B,A,C){if(B==null||A==null){return ;}if(this.___es==null){this.___es=new hashtable();}var D=this.___es.getvalue(B);if(C==null){C=this;
}if(D==null){D=[{fn:A,domain:C}];this.___es.add(B,D);}else{D.push({fn:A,domain:C});}B=D=A=null;};pageObject.fireEvent=function(D,A){if(this.___es==null){return ;}var F=this.___es.getvalue(D);if(F==null){return ;}var B=F.length;for(var C=B-1;C>-1;C--){var E=F[C];E.fn.call(E.domain,A);E=null;}F=null;};
pageObject.unRegEvent=function(D,C){if(D==null){return ;}if(this.___es==null){return ;}var F=this.___es.getvalue(D);if(F==null){return ;}if(C==null){this.___es.remove(D);}else{var A=F.length;for(var B=A-1;B>-1;B--){var E=F[B];if(E.fn==C){F.remove(E);}}F=null;}};pageObject._pageLoad=function(){};pageObject.pageLoad=function(){var A=LEAP.getData(null,this.instance);
if(A!=null){this.defaultData=A.data;}if(this._pageLoad!=null){this._pageLoad();}};pageObject.dispose=function(){this.defaultData=null;this.___es=null;if(this.innerDispose!=null){this.innerDispose();}if(this.form!=null){LEAP.form.close(this.form);}};pageObject.showForm=function(){if(this.form!=null){LEAP.form.show(this.form);
}};pageObject.hideForm=function(){if(this.form!=null){LEAP.form.hide(this.form);}};pageObject.getMD=function(A,C){var B="[md="+A+"][instance="+this.instance+"]";if(C!=null){B+="[ds="+C+"]";}return LEAP.getElement(B);};pageObject.getUT=function(A,B){return LEAP.getElement("[ut="+A+"][instance="+this.instance+"]",B);
};pageObject.getControl=function(A){return LEAP.getElement("[instance="+this.instance+"]"+A);};pageObject.addShortKeyEvent=function(A,D,B,C){LEAP.addShortKeyEvent(A,D,B,C,this);};var ___maus=new hashtable();LEAP.getModuleAuthoritys=function(C){if(C==null){return null;}C=C.Trim();if(___maus.contains(C)){return ___maus.getvalue(C);
}var E=LEAP.request("getLogicModuleOperations",{n:C});if(E==null){E={};E.url="";}if(E!=null&&E.operations!=null){var B=E.operations.length;var A=new array();for(var D=0;D<B;D++){A.add(E.operations[D]);}E.operations=null;E.operations=A;}___maus.add(C,E);return E;};var __fp="LEAP/Resource/HTML/Control/form.html";
var __als1=["Province","City","County","Street","Community","Team"];var __als6=["省","市","区","街道","社区","网格"];var __als2=[2,4,6,9,12,15];var __als3=18;var __als4="<font style='float:left;line-height:24px;margin-left:@splitWidth;'>@name</font><div ds='@ds' defaultvalue='@default' instance='@instance' readonly='@readonly' ut='@group_@areaname' style='width:@itemWidth;float:left;' group='@group' code='@code' size='@size' deep='@deep' count='@count' class='select' ct='select' search='10'  md='@md' bt='select'><div class='lg_p_lr_right select_drop' ctf='select_drop'></div><div class='lg_p_lr_fill search_fill'><div class='lg_p_lr_fill_c search_fill_c' ><input name='button' type=button class='selectbtn ellipsis' ctf='selectbtn' /></div></div><div class='select_items' ctf='select_items'><div><a value='' href='javascript:void(0)' ctf='select_item'>&nbsp</a></div><!--values--></div></div>";
var __als5="<div><a value='@value' href='javascript:void(0)' ctf='select_item'>@text</a></div>";LEAP.userInfo=null;LEAP.areaString=null;LEAP.areaStrings=new hashtable();var __haspa=false;LEAP.getUserInfo=function(){LEAP.processArea();return LEAP.userInfo;};LEAP.processArea=function(){if(LEAP.userInfo==null&&__haspa==false){__haspa=true;
LEAP.userInfo=LEAP.request("getUserInfo");if(LEAP.userInfo==null){return ;}var B=LEAP.userInfo;if(B!=null&&LEAP.areaString==null&&B.areavalues!=null){if(B.areaLevel!=null&&B.areaLevel<__als1.length){var H=__als1[B.areaLevel];var F="";var A=1;for(var E=B.areaLevel;E<__als6.length;E++){var G="";if(E==B.areaLevel){var D="";
for(var C=0;C<B.areavalues.length;C++){D+=__als5.replace("@value",B.areavalues[C].codeid).replace("@text",B.areavalues[C].codevalue);}G=__als4.replace("<!--values-->",D).replace("@name",__als6[E]).replace("@default",LEAP.userInfo.areaid);}else{G=__als4.replace("@name",__als6[E]).replace("defaultvalue='@default'","");
}F+=G.replace("@code",__als1[E]).replace("@areaname",__als1[E]).replace("@size",__als2[E]).replace("@deep",A).replace("@count",__als3);LEAP.areaStrings.add(__als1[E],F);A++;}LEAP.areaString=F;}}}};LEAP.bindControl=function(B,A){if(A==null||A.instance==null){return ;}uid=A.instance;B=B.replaceall("@instance",uid);
B=B.replaceall(" ht=",' instance="'+uid+'"ht=');B=B.replaceall(" ct=",' instance="'+uid+'"ct=');B=B.replaceall(" ut=",' instance="'+uid+'"ut=');return B;};LEAP.deniedModule=function(A,C,B,D){if(C!=null){C.innerHTML="";C.innerHTML="无访问权限";}};LEAP.loadModule=function(L,H,AH,AE,K){var w=null;if(K==null){if(L==null||L!=__fp){if(L==null){if(AE!=null){L=AE.___moduleName;
}}if(L==null){return ;}var R=LEAP.getModuleAuthoritys(L);if(R==null||R.operations==null||R.operations.length==0){LEAP.deniedModule(L,H,AH,AE);return ;}w=R.url;}if(L==__fp){w=__fp;}if(AE==null&&w==null){return ;}var D=AE!=null;if(AE!=null&&AE.type==null){AE.type="instance";}if(w!=null&&typeof (H)==commfields.string){H=LEAP.getElement(H);
}if((w==null||w=="")&&H!=null){if(H!=null){H.innerHTML="";H.innerHTML="未登录或者配置错误,请重新登录!";}else{var C=LEAP.getElements("[ut=System_AreaControl]");if(C!=null){for(var AC=0;AC<C.length;AC++){C[AC].innerHTML="";}}}return ;}}if(AE==null){if(w!=null&&w.Trim()!=""&&LEAP._m.contains(w)){AE=LEAP._m.getvalue(w);
}else{var c=null;if(K!=null){c=K;}else{c=leapclient.load(w);}if(c==null){return ;}var AF=c.indexOf("</head>");var p=null;if(AF>1){var r=c.indexOf("<head>");p=c.substr(r,AF-r);var I=[];var W=[];var g=p.split("\n");var z=g.length;for(var AC=0;AC<z;AC++){var G=g[AC];var AH=-1;if(G.toLowerCase().indexOf("<script")>-1&&G.indexOf(" path")>-1){AH=1;
}else{if(G.toLowerCase().indexOf("<link")>-1&&G.indexOf(" path")>-1){AH=2;}}if(AH!=-1){G=G.replaceall(" ","");var O=G.indexOf("path=");var v=G.substr(O+5,1);var U=G.substr(O+6);U=U.substr(0,U.indexOf(v));if(AH==1){I.push(U);}else{if(AH==2){W.push(U);}}}}for(var AC=0;AC<I.length;AC++){leapclient.loadjs(I[AC]);
}for(var AC=0;AC<W.length;AC++){leapclient.loadcss(W[AC]);}}var h=c.indexOf("</head>");var Z=c;if(h>0){Z=c.substr(h+8);}var AE=LEAP._p(p);if(AE==null){AE={};}if(AE.type==null){AE.type="instance";}AE.source=Z;if(w!=null&&w.Trim()!=""){LEAP._m.add(w,AE);}}}if(AE.type=="instance"){if(AE.module!=null&&typeof (AE.module)=="function"){var r=new AE.module();
AE=LEAP.clone(AE,r);}else{AE=LEAP.clone(AE);}}else{if(AE.___hasmoduleinit!=true){var r=AE.module;AE.module=null;LEAP.clone(AE,r);if(r!=null){AE=r;}}}var B=UUID.cID();AE.instance=B;if(AE.type!="static"&&AE.source!=null){AE.source=AE.source.replaceall("@instance",B);AE.source=AE.source.replaceall(" ht=",' instance="'+B+'"ht=');
AE.source=AE.source.replaceall(" ct=",' instance="'+B+'"ct=');AE.source=AE.source.replaceall(" ut=",' instance="'+B+'"ut=');B=null;}else{var AD=LEAP.getElements("[ct]:not([instance]),[ht]:not([instance]),[ut]:not([instance])");if(AD!=null&&AD.length>0){var z=AD.length;for(var AC=0;AC<z;AC++){var u=AD[AC];
u["instance"]=B;}}}if(AE.type=="instance"||(AE.type=="static"&&AE.___hasmoduleinit!=true)){AE.addEvent=pageObject.addEvent;AE.removeEvent=pageObject.removeEvent;AE.getElements=pageObject.getElements;AE.getElement=pageObject.getElement;if(AE.setPageData==null&&typeof (AE.setPageData)!="function"){AE.setPageData=pageObject.setPageData;
}AE.getPageData=pageObject.getPageData;AE.convertChangeResult=LEAP.convertChangeResult;AE.regEvent=pageObject.regEvent;AE.fireEvent=pageObject.fireEvent;AE.getControl=pageObject.getControl;AE.getMD=pageObject.getMD;AE.getUT=pageObject.getUT;AE.getQueryParameter=pageObject.getQueryParameter;AE.getCreateParameter=pageObject.getCreateParameter;
AE.clearPageData=pageObject.clearPageData;AE.getUpdateParameter=pageObject.getUpdateParameter;AE.deleteResult=pageObject.deleteResult;AE.hideForm=pageObject.hideForm;AE.showForm=pageObject.showForm;AE.getValue=pageObject.getValue;AE.setValue=pageObject.setValue;AE.validateUI=pageObject.validateUI;AE.request=pageObject.request;
AE.getLastExtendResult=pageObject.getLastExtendResult;AE.clearValidateUI=pageObject.clearValidateUI;AE.getLastError=pageObject.getLastError;AE.setLastExtendResult=pageObject.setLastExtendResult;AE.getLastError=pageObject.getLastError;AE.unRegEvent=pageObject.unRegEvent;AE.addShortKeyEvent=pageObject.addShortKeyEvent;
if(AE.setPageDataByPK==null){AE.setPageDataByPK=pageObject.setPageDataByPK;}if(AE.dispose==null){AE.dispose=pageObject.dispose;}else{AE.innerDispose=AE.dispose;AE.dispose=pageObject.dispose;}if(AE.pageLoad==null){AE.pageLoad=pageObject.pageLoad;}else{AE._pageLoad=AE.pageLoad;AE.pageLoad=pageObject.pageLoad;
}}if(AE.type=="static"){AE.___hasmoduleinit=true;LEAP._m.replace(w,AE);}AE.___def=R;if(H!=null){H.innerHTML=AE.source;D=true;}if(D){if(AE.pageLoad!=null){AE.pageLoad.call(AE);if(LEAP.areaString==null){LEAP.processArea();}if(LEAP.areaString!=null){var C=LEAP.getElements("[instance="+AE.instance+"][ut=System_AreaControl]");
if(C!=null){for(var AC=0;AC<C.length;AC++){var S=C[AC].getAttribute("group");var Q=C[AC].getAttribute("md");var V=C[AC].getAttribute("itemWidth");var F=C[AC].getAttribute("splitWidth");var m=C[AC].getAttribute("readonly");var E=C[AC].getAttribute("ds");var a=C[AC].getAttribute("lastLevel");if(S==null||S.Trim()==""){S="area";
}if(Q==null||Q.Trim()==""){Q="areaid";}if(V==null){V="80px";}if(F==null||F.Trim()==""){F="10px";}if(m==null){m="0";}var f=null;if(a==null||a.Trim()==""){f=LEAP.areaString;}else{f=LEAP.areaStrings.getvalue(a);}if(f==null){C[AC].innerHTML="";continue;}if(E==null||E==""){f=f.replaceall("ds='@ds'","");}else{f=f.replaceall("@ds",E);
}f=f.replaceall("@instance",AE.instance).replaceall("@readonly",m).replaceall("@md",Q).replaceall("@group",S).replaceall("@itemWidth",V).replaceall("@splitWidth",F);C[AC].innerHTML=f;}}C=null;}else{var C=LEAP.getElements("[instance="+AE.instance+"][ut=System_AreaControl]");if(C!=null){for(var AC=0;AC<C.length;
AC++){C[AC].innerHTML="";}}}if(AE.___def!=null&&AE.___def.operations!=null){var o=AE.___def.operations;if(!o.contains("999")){var z=AE.___def.operations.length;var r=new StringBuffer();r.append("[instance="+AE.instance+"][al]");for(var P in o.keys){var A=o.getvalue(P);r.append("[al!="+A+"]");}var y=LEAP.getElements(r.toString());
if(y!=null){LEAP.setStyle(y,{display:"none"},true);}var AA=LEAP.getElements("[ct=table][instance="+AE.instance+"]");if(AA!=null){var z=AA.length;for(var AC=0;AC<z;AC++){var T=LEAP.getElements("th[ctf=table_header][tpo!=null][tpoal!=null]",AA[AC]);if(T!=null){var a=T.length;for(var AB=0;AB<a;AB++){var x=T[AB].getAttribute("tpo");
var n=T[AB].getAttribute("tpoal");if(x!=null&&x.Trim()!=""&&n!=null&&n.Trim()!=""){var Y=x.split("|");var J=n.split("|");if(J.length<Y.length){var q=J.length;J.length=Y.length;for(var AG=q;AG<Y.length;AG++){J[AG]="";}}var N=[];for(jj=0;jj<Y.length;jj++){var b=Y[jj];var M=J[jj];if(M==null||M.Trim()==""){continue;
}if(o.contains(M)){N.add(b);}}var X=N.join("|");if(X!=Y){T[AB].setAttribute("tpo",X);}T[AB].removeAttribute("tpoal");}}}T=null;}}AA=null;}}}}try{return AE;}finally{H=AE=null;}};LEAP.removeElement=function(D,C){if(D==null){return ;}if(LEAP._gb==null){LEAP._gb=document.createElement("div");LEAP._gb.style["display"]="none";
document.body.appendChild(LEAP._gb);}if(C!=true&&!(D instanceof Array)){D=[D];}var A=D.length;for(var B=A-1;B>-1;B--){LEAP._gb.appendChild(D[B]);}LEAP._gb.innerHTML="";D=null;};LEAP.shortKeyService=function(O){var A=O.e.srcElement;var L=O.e.type;var E=-1;if(LEAP.isIE){E=O.e.keyCode;}else{E=O.e.which;
}if(E==113||E==118||E==119||E==120||E==13||E==27||(O.e.ctrlKey&&(E==81||E==87||E==69||E==65||E==83||E==88))){if(A.tagName!="BODY"){var N=A;var I=null;for(var H=0;H<20;H++){if(N==null||N.tagName=="BODY"){break;}shortKeys=N.getAttribute("shortkey");var K=false;if(shortKeys!=null){var C=shortKeys.length;
for(var G=0;G<C;G++){var M=shortKeys[G];I=M.keycode;var J=I.indexOf("ctrl+")==0;if(J){I=I.substring(5);}if(I!=null&&I!=""&&J==O.e.ctrlKey&&I.Trim()!=""&&I==E.toString()){var F=M.domain;if(F==null){F=N;}var B={caller:A,e:O.e,arg:M.arg,ut:A.getAttribute("ut")};try{M.fn.call(F,B);}catch(D){if(isdebug){throw D;
}}finally{M=B=F=null;LEAP.stopEvent(O.e);return ;breakEvent:true;}K=true;break;}}}if(K==true){break;}shortKeys=null;N=N.parentNode;}N=null;}}if(A.tagName!="INPUT"&&A.tagName!="TEXTAREA"&&E==8){LEAP.stopEvent(O.e);}if(O.e.ctrlKey&&E==87){LEAP.stopEvent(O.e);}O=null;};LEAP.addShortKeyEvent=function(A,D,B,C,E){try{if(A!=null&&D!=null&&B!=null){if(D["shortkey"]==null){D["shortkey"]=[{keycode:A.toString(),fn:B,arg:C,domain:E}];
}else{D["shortkey"].add({keycode:A.toString(),fn:B,arg:C,domain:E});}}}finally{A=D=B=C=E=null;}};LEAP._pl=function(){UIEventManager.removeEvent(window,"load",LEAP._pl);if(LEAP.isIE){try{document.execCommand("BackgroundImageCache",false,true);}catch(A){}}var B=LEAP._p(LEAP.getElement("head").innerHTML);
LEAP.loadModule(null,null,null,B);B=null;LEAP.addEvent(document.body,"keydown",LEAP.shortKeyService,null,null,true);};UIEventManager.addEvent(window,"load",LEAP._pl);LEAP.getBindValue=function(binddef,value,data,ct,autoUseCodeCache){if(binddef==null){return ;}var ri=value;if(value==null){ri=value="";
}else{value=LEAP.parsedatestr(value);}if((value==null||value=="")&&(binddef.defaultcode!=null&&binddef.code!=null)){ri=value=binddef.defaultcode;}if(value!=null&&typeof (value)!=""){if(value.toString!=null){value=value.toString();}else{value=value+"";}}if(value!=""){if(binddef!=null&&binddef.code!=null&&binddef.code.Trim()!=""){if((autoUseCodeCache!=null&&autoUseCodeCache==false)){value=data["data.___codevalue___"+binddef.md];
}else{if(value!=null&&value.indexOf(",")>-1){var vs=value.split(",");var value="";for(var i=0;i<vs.length;i++){var tv=vs[i];if(tv!=null&&tv.Trim()!=""){var tvv=LEAP.getCodeText(binddef.code,tv);if(tvv!=null&&tvv.Trim()!=""){if(value!=""){value+=",";}value+=tvv;}}}}else{value=LEAP.getCodeText(binddef.code,value,binddef.defaultcode);
}}}if(value==null){value="";}else{if(binddef!=null&&binddef.bt=="date"&&value!=""){var _t=value.split(" ");if(_t.length>0){value=_t[0];}}else{if(binddef!=null&&binddef.bt=="datetime"&&value!=""){var _t=value.split(" ");if(_t.length>1){value=_t[0]+" "+_t[1].substring(0,_t[1].lastIndexOf("."));}}}}}try{if(binddef.btfn!=null){if(binddef._btfn==null){try{binddef._btfn=eval("("+binddef.btfn+")");
}catch(err){}}if(binddef._btfn!=null){value=binddef._btfn(binddef,value,data,ct);}}if((binddef.btexp!=null&&value!=null&&value!="")||binddef.sncol=="1"){value=binddef.btexp.replaceall(commfields.vv,value).replaceall(commfields.vvn,binddef.txt).replaceall(commfields.vid,ri);}if(binddef.tpo!=null){if(binddef._tpo!=null){value=binddef._tpo;
}else{var tpos=binddef.tpo.split(commfields.tpos);var l=tpos.length;var ret="";for(var i=0;i<l;i++){var o=tpos[i];if(o.Trim()==""){continue;}var t=o.split(commfields.tpos2);var _t=t[0];if(t.length>2){_t="";for(var ii=0;ii<t.length-1;ii++){_t+=t[ii];if(ii<t.length-2){_t+=":";}}}ret+=commfields.tpo.replace(commfields.vn,_t).replace(commfields.vv,t[t.length-1]);
if(i!=l-1){ret+=commfields.bl;}}binddef._tpo=value=ret;}}}catch(err){}binddef=data=ct=null;return value;};LEAP.getBindDef=function(B){if(B["_bdef"]==null){var A={md:B.getAttribute("md"),sncol:B.getAttribute("sncol")=="1",bt:B.getAttribute("bt"),btexp:B.getAttribute("btexp"),btfn:B.getAttribute("btfn"),urlpath:B.getAttribute("urlpath"),code:B.getAttribute("code"),pcodes:B.getAttribute("pcodes"),tpo:B.getAttribute("tpo"),defaultcode:B.getAttribute("defaultcode"),enableedit:B.getAttribute("enableedit"),btcontrol:B.getAttribute("btcontrol"),treecol:B.getAttribute("treecol"),textalign:B.getAttribute("textalign"),check:B.getAttribute("check")};
B["_bdef"]=A;}else{A=B["_bdef"];}B=null;return A;};var vhts=new array();vhts.add("INPUT");vhts.add("TEXTAREA");LEAP.bindData=function(G,L,C,P){if(G==null){G={};}var H='[bt][instance="'+L+'"]';if(C!=null){H+=C;}var O=LEAP.getElements(H);var M=[];if(O!=null){var B=O.length;for(var F=0;F<B;F++){var N=O[F];
var A=N.getAttribute(commfields.ct);var E=A==null;var D=LEAP.getBindDef(N);var K=G[D.md];if(K!=null&&typeof (K)!="string"){K=K+"";}var I=K;K=LEAP.getBindValue(D,K,G,N,P);if(E){if(vhts.contains(N.tagName)){N.value=K;}else{N.innerText=K;}}else{if(A=="select"){var J=N.getAttribute("group");if(M.contains(J)){continue;
}LEAP.select.setValue(N,I,false);if(J!=null&&J.Trim()!=""){M.push(J);}}else{if(A.indexOf("upload_control_")==0){LEAP.upload.setValue(N,I);}else{if("checkbox"==A){LEAP.checkbox.setValue(N,I);}else{if("radio"==A){if(P!=null&&P==false){LEAP.radio.setValueByText(N,I);}else{LEAP.radio.setValue(N,I);}}else{if(A=="date"){LEAP.date.setValue(N,I);
}}}}}}}}};LEAP.convertChangeResult=function(A){if(A==null){return ;}var D=new ChangeResult();for(var C in A){if(C!="changeResultName"&&C!="_data"){var G=C;var F=null;var E=null;var B=A[C];if(B==null){F=E=null;}else{F=B.value;E=B.source;}D.addparameter(G,F,E);}}return D;};LEAP.convertDataResult=function(A){if(A==null){return ;
}var D=new DataResult();for(var C in A){if(C!="dataResultName"&&C!="_data"){var G=C;var F=null;var E=null;var B=A[C];if(B==null){F=E=null;}else{F=B.value;E=B.source;}D.addparameter(G,F);}}return D;};LEAP.converObject=function(A){if(A!=null&&A.metaData!=null&&A.result!=null){if(A.javaClass=="com.longrise.LEAP.Base.Objects.DataResult"||A.javaClass=="com.longrise.LEAP.Base.Objects.ChangeResult"){var B=A.metaData.length;
var C=new Object();for(var D=0;D<B;D++){C[A.metaData[D]]=A.result[D];}A=null;return C;}}A=null;};LEAP.getValue=function(B){if(B==null){return ;}if(typeof (B)=="string"){B=LEAP.getElement(B);}if(B==null){return ;}var D=B.getAttribute(commfields.ct);var F=D==null;var C=LEAP.getBindDef(B);var A=null;if(F){if(vhts.contains(B.tagName)){A=B.value;
}else{A=B.innerText;}}else{if(D=="areagroup"){var E=LEAP.getElement("[ct=select]",B);if(E==null){return ;}A=LEAP.select.getValue(E);}else{if(D=="select"){A=LEAP.select.getValue(B);}else{if(D.indexOf("upload_control_")==0){A=LEAP.upload.getValue(B);}else{if("checkbox"==D){A=LEAP.checkbox.getValue(B);}else{if("radio"==D){A=LEAP.radio.getValue(B);
}else{if(D=="date"){A=LEAP.date.getValue(B);}}}}}}}return A;};LEAP.setValue=function(B,A){if(B==null){return ;}if(typeof (B)=="string"){B=LEAP.getElement(B);}if(B==null){return ;}var D=B.getAttribute(commfields.ct);var G=D==null;var C=LEAP.getBindDef(B);var F=A;A=LEAP.getBindValue(C,A,null,B);if(G){if(vhts.contains(B.tagName)){B.value=A;
}else{B.innerText=A;}}else{if(D=="areagroup"){var E=LEAP.getElement("[ct=select]",B);if(E==null){return ;}LEAP.select.setValue(B,F,false);}else{if(D=="select"){LEAP.select.setValue(B,F,false);}else{if(D.indexOf("upload_control_")==0){LEAP.upload.setValue(B,F);}else{if("checkbox"==D){LEAP.checkbox.setValue(B,F);
}else{if("radio"==D){LEAP.radio.setValue(B,F);}else{if(D=="date"){LEAP.date.setValue(B,F);}}}}}}}};LEAP.getData=function(W,S,H,N){var F='[bt][instance="'+S+'"]';if(H!=null){F+=H;}var E=LEAP.getElements(F);var V=null;var W=LEAP.clone(W);var R=[];var I=null;if(N==true){I={};}var A=null;if(E!=null){var O=E.length;
for(var P=0;P<O;P++){var L=E[P];var Q=L.getAttribute(commfields.ct);var D=Q==null;var B=LEAP.getBindDef(L);var K=null;var U=W[B.md];var T=null;if(D){if(vhts.contains(L.tagName)){K=L.value;}else{K=L.innerText;}}else{if(Q=="select"){T="select";var G=L.getAttribute("group");if(R.contains(G)){continue;}K=LEAP.select.getValue(L);
if(G!=null&&G.Trim()!=""){R.push(G);}}else{if(Q.indexOf("upload_control_")==0){T="upload";K=LEAP.upload.getValue(L);}else{if("checkbox"==Q){T="checkbox";K=LEAP.checkbox.getValue(L);}else{if("radio"==Q){T="radio";K=LEAP.radio.getValue(L);}else{if(Q=="date"){T="date";K=LEAP.date.getValue(L);}else{continue;
}}}}}}var C=B.md;if(V!=null){var M=1;while(V[C]!=null){C=B.md+"___"+M+"___";M++;}}var J=false;if((K==""||K==null)&&(U==null||U=="")){J=true;}if(N||(K!=U&&!J)){if(V==null){V={};}if(U!=null&&typeof (U)!="string"){U=U+"";}if(K!=null&&typeof (K)!="string"){K=K+"";}V[C]={source:U,value:K,controltype:T};W[C]=K;
if(N==true){I[C]=LEAP.parsenum(L.getAttribute("search"));}}if(A==null){A={};}A[C]=K;}}try{var V={change:V,data:W,searchtype:I,curData:A};return V;}finally{V=W=null;}};LEAP.hasCSS=function(C,A){if(C==null){return ;}var B=C.className;C=null;if(B!=null&&B!=""&&(B==A||B.split(" ").contains(A))){return true;
}return false;};LEAP.addCSS=function(D,I,F){if(D==null){return ;}if(F!=true&&!(D instanceof Array)){D=[D];}var A=D.length;for(var C=0;C<A;C++){var G=D[C].className;var H=G.split(" ");if(G!=null&&G!=""&&(G==I||H.contains(I))){continue;}var E=H.length;for(var B=E-1;B>-1;B--){if(H[B]==""||H[B]==" "){H.removeindex(B);
}}H.add(I);D[C].className=H.join(" ");}D=null;};LEAP.removeCSS=function(E,I,G){if(E==null){return ;}if(G!=true&&!(E instanceof Array)){E=[E];}var B=E.length;for(var D=0;D<B;D++){var H=E[D].className.split(" ");var F=H.length;var A=false;for(var C=0;C<F;C++){if(H[C]==I){H[C]="";A=true;}}if(A){E[D].className=H.join(" ");
}}E=null;};LEAP.getCodeValue=function(C,B){if(C==null||C==""){return ;}var E="__codetype_"+C.toLowerCase();if(B!=null&&B.Trim()!=""){E+="__parentcode__"+B;}var D=commfields.gco.getvalue(E);if(D==null){var A=null;if(B==null||B.Trim()==""){A=LEAP.request("getCodeValues",{c:C});}else{A=LEAP.request("getCodeValuesByParentValue",{c:C,p:B});
}D={i:true,r:A};commfields.gco.add(E,D);}return D.r;};LEAP.addCodeType=function(A,C){if(A==null||A==""){return ;}var E="__codetype_"+A.toLowerCase();var B=commfields.gco.getvalue(E);if(B==null){B={i:true,r:[]};for(var D=0;D<C.length;D++){C[D].codetypename=A;B.r.add(C[D]);}commfields.gco.add(E,B);}};LEAP.getCodeText=function(B,F,D){var C=LEAP.getCodeValue(B);
if(C!=null){if(F==null||F==""){F=D;}var A=C.length;for(var E=0;E<A;E++){if(C[E].codeid==F){return C[E].codevalue;}}}};LEAP.getCodeIDByValue=function(B,E){if(E==null||E==""){return ;}var C=LEAP.getCodeValue(B);if(C!=null){var A=C.length;for(var D=0;D<A;D++){if(C[D].codevalue==E){return C[D].codeid;}}}};
LEAP.asyn=function(F,D,E){if(E==null){E=10;}var A=null;if(arguments==null||arguments.length<4){}else{A=[];for(var B=3;B<arguments.length;B++){A[B-3]=arguments[B];}}var C=function(){try{if(A!=null){F.apply(D,A);}else{F.apply(D);}}finally{D=A=arguments=F=null;}};setTimeout(C,E);C=null;};LEAP.getSelectedText=function(H){var E=null;
var A=null;var G=null;try{if(LEAP.isIE){G=document.selection.createRange();if(G.text.length>0){E=G.text;}G.moveToPoint(window.event.x,window.event.y);G.moveStart("character",-H.value.length);A=G.text.length;G=null;}else{var F=H.selectionStart;var D=H.selectionEnd;if(F||F=="0"){if(F!=D){E=H.value.substring(F,D);
}}A=F;}if(E==""){E=null;}}catch(C){}finally{G=H=null;}var B={text:E,idx:A};return B;};LEAP.getRealSyscode=function(A){if(A==null){return null;}if(A!=null&&A.toString().Trim()!=""&&A.toString().indexOf(".")>-1){var B=A.toString();var D=B.substring(0,B.indexOf("."));var C=B.substring(B.indexOf(".")+1);
while(C.length%3!=0){C+="0";}while(C.substring(C.length-3,C.length)=="000"){C=C.substring(0,C.length-3);}if(C==""){B=D;}else{B=D+"."+C;}return B;}else{return A.toString();}};LEAP.getNextSyscode=function(A){if(A.indexOf(".")>-1){var B=A.substring(A.length-3,A.length);B=(B*1+1)+"";while(B.length<3){B="0"+B;
}return A.substring(0,A.length-3)+B;}else{return A*1+1;}};LEAP.getParentSyscode=function(B){if(B.indexOf(".")>-1){var A=B.substring(0,B.length-3);if(A.charAt(A.length-1)=="."){return A.substring(0,A.length-1);}return A;}};LEAP.form={};LEAP.form.d="form";LEAP.form.z=100;LEAP.form._init=function(){ElementEventManager.addManagedEventType(LEAP.form.d,"formHided");
ElementEventManager.addManagedEventType(LEAP.form.d,"formHiding");UIEventManager.removeEvent(window,"load",LEAP.form._init);LEAP.addEvent(document.body,"mousedown",LEAP.form.uiProcess,null,null,true);LEAP.addEvent(document.body,"click",LEAP.form.uiProcess,null,null,true);if(LEAP._dragDiv==null){LEAP._dragDiv=document.createElement("div");
LEAP._dragDiv.className="drag";LEAP.setStyle(LEAP._dragDiv,{display:"none"});document.body.appendChild(LEAP._dragDiv);}if(LEAP._maskdiv==null){LEAP._maskdiv=document.createElement("DIV");LEAP._maskdiv.style.position="absolute";LEAP._maskdiv.style.height="100%";LEAP._maskdiv.style.width="100%";LEAP._maskdiv.style.zIndex="99999";
LEAP._maskdiv.style.left="0px";LEAP._maskdiv.style.top="0px";LEAP._maskdiv.style.display="none";LEAP._maskdiv.style.background="black";LEAP._maskdiv.style.filter="alpha(opacity = 50)";document.body.appendChild(LEAP._maskdiv);}};LEAP.form.init=function(){if(document!=null&&document.body!=null){LEAP.form._init();
}else{UIEventManager.addEvent(window,"load",LEAP.form._init);}}();LEAP._showMask=function(){if(LEAP._maskdiv!=null){LEAP._maskdiv.style.display="block";}};LEAP.showMask=function(){LEAP.asyn(LEAP._showMask);};LEAP._hideMask=function(){if(LEAP._maskdiv!=null){LEAP._maskdiv.style.display="none";}};LEAP.hideMask=function(){LEAP.asyn(LEAP._hideMask);
};LEAP.form.create=function(N,I,C,L,J,H,E,K,M){var D=LEAP.loadModule("LEAP/Resource/HTML/Control/form.html");var A=document.createElement("div");LEAP.setStyle(A,{display:"none"});document.body.appendChild(A);var B=D.instance;A.innerHTML=D.source;var F=LEAP.getElement("[ct=form]",A);var G={form:"[instance="+B+"]",module:null};
if(N!=null){G.module=LEAP.form.setContentModule(F,N);if(G.module.pageLoad!=null){G.module.form=G.form;}}LEAP.setStyle(F,{zIndex:LEAP.form.z++});if(I!=null){LEAP.form.setTitle(F,I);}A.removeChild(F);LEAP.removeElement(A);document.body.appendChild(F);if(E==false){F.setAttribute("autohide","0");}if(K!=null){F.setAttribute("hidemsg",K);
}if(M==true){F["module"]=G.module;}if(C==null){C=800;}if(L==null){L=600;}if(typeof (C)=="string"&&C.indexOf("%")>-1){C=document.body.clientWidth*("0."+C.replace("%",""));}if(typeof (L)=="string"&&L.indexOf("%")>-1){L=document.body.clientHeight*("0."+L.replace("%",""));}LEAP.form.setSize(F,C+"px",L+"px");
if(J==null){J=(document.body.clientWidth-F.clientWidth)/2;}if(H==null){H=(document.body.clientHeight-F.clientHeight)/2;}if(J<0){J=20;}if(H<0){H=40;}LEAP.setStyle(F,{position:"absolute",left:J+"px",top:H+"px"});A=F=null;return G;};LEAP.form.setLocation=function(B,A,C){B=LEAP._check(B,LEAP.form.d);if(B==null){return ;
}LEAP.setStyle(B,{left:A+"px",top:C+"px"});};LEAP.form.setTitle=function(A,C){A=LEAP._check(A,LEAP.form.d);if(A==null){return ;}var B=LEAP.getElement("[ctf=form_settitle]",A);B.innerText=C;};LEAP.form.setContentModule=function(B,D){B=LEAP._check(B,LEAP.form.d);if(B==null){return ;}var C=LEAP.getElement("div[ctf=form_content]",B);
var A=LEAP.loadModule(D,C);C=B=null;return A;};LEAP.form.setContent=function(B,A){B=LEAP._check(B,LEAP.form.d);if(B==null){return ;}var C=LEAP.getElement("div[ctf=form_content]",B);C.innerHTML=A;C=B=null;};LEAP.form.setContentElement=function(A,C){A=LEAP._check(A,LEAP.form.d);if(A==null){return ;}var B=LEAP.getElement("div[ctf=form_content]",A);
B.innerHTML="";B.appendChild(C);B=A=C=null;};LEAP.form.setSize=function(B,C,A){B=LEAP._check(B,LEAP.form.d);if(B==null){return ;}if(A!=null){if(typeof (A)=="string"&&A.indexOf("%")>-1){A=document.body.clientHeight*("0."+A.replace("%",""))+"px";}LEAP.setStyle(LEAP.getElements("div[ctf=form_setheigth]",B),{height:A});
}if(C!=null){if(typeof (C)=="string"&&C.indexOf("%")>-1){C=document.body.clientWidth*("0."+C.replace("%",""))+"px";}LEAP.setStyle(B,{width:C});}C=A=B=null;};LEAP.form.close=function(A){A=LEAP._check(A,LEAP.form.d);if(A==null){return ;}var B=LEAP.getElement("div[ctf=form_content]",A);B.innerHTML="";LEAP.removeElement(B);
A.innerHTML="";LEAP.removeElement(A);B=A=null;};LEAP.form.hide=function(B,C){B=LEAP._check(B,LEAP.form.d);if(B==null){return ;}if(B["module"]!=null){var A=B["module"];B["module"]=null;A.dispose();A=null;B=null;return ;}if(C==true){if(B.getAttribute("autohide")=="0"||B.getAttribute("autohide")==0){var D=B.getAttribute("hidemsg");
if(D==null||D==""){D="确认关闭窗体?";}if(!window.confirm("确认关闭窗体?")){B=null;return ;}}}ElementEventManager.handleEvent(B,"formHiding",{form:B.getAttribute("instance")});LEAP.setStyle(B,{display:"none"});ElementEventManager.handleEvent(B,"formHided",{form:B.getAttribute("instance")});B=null;};LEAP.form.isHide=function(A){A=LEAP._check(A,LEAP.form.d);
if(A==null){return ;}var B=A.style.display=="none";A=null;return B;};LEAP.form.show=function(A){A=LEAP._check(A,LEAP.form.d);if(A==null){return ;}LEAP.setStyle(A,{display:"",zIndex:LEAP.form.z++});A=null;};LEAP.form.uiProcess=function(I){var D=I.e.type;if(D=="mouseup"&&LEAP.form.dragObj!=null){LEAP.removeEvent(document.body,"mousemove",LEAP.form.uiProcess,true);
LEAP.removeEvent(document.body,"mouseup",LEAP.form.uiProcess,true);var H=LEAP.getAbsolutePos(LEAP._dragDiv);LEAP.setStyle(LEAP.form.dragObj,{left:H.x,top:H.y});LEAP.setStyle(LEAP._dragDiv,{display:"none"});LEAP.form.dragObj=null;if(LEAP.isIE){document.onselectstart=null;}return false;}if(D=="mousemove"&&LEAP.form.dragObj!=null){if(LEAP.form.dragObj==null){return false;
}var H=LEAP.getAbsolutePos(LEAP.form.dragObj);var G=I.e.clientX-LEAP.form.dragObj._offsetX;var E=I.e.clientY-LEAP.form.dragObj._offsetY;if(G<0||E<0){return ;}LEAP.setStyle(LEAP._dragDiv,{left:G,top:E});return false;}var A=I.e.srcElement;var F=A.getAttribute(commfields.ctf);var C=A.getAttribute(commfields.ct);
var B=null;try{if(C==LEAP.form.d){B=A;}if(B==null&&F!=null&&F.indexOf(LEAP.form.d)==0){B=LEAP._match(A,LEAP.form.d);}if(B==null){return ;}if(D=="click"){if(F=="form_btn_close"){LEAP.form.hide(B,true);return ;}else{if(F=="form_btn_size"){if(A.className=="iframe_title_max_icon"){LEAP.form.maxSize(B);}else{LEAP.form.restoreSize(B);
}return ;}}}else{if(D=="mousedown"&&F=="form_title"){LEAP.setStyle(B,{zIndex:LEAP.form.z++});A.style.cursor="move";if(LEAP._dragDiv==null){LEAP._dragDiv=document.createElement("div");LEAP._dragDiv.className="drag";document.body.appendChild(LEAP._dragDiv);}var H=LEAP.getAbsolutePos(B);LEAP.setStyle(LEAP._dragDiv,{width:B.clientWidth,height:B.clientHeight,left:H.x,top:H.y,display:"block"});
LEAP.addEvent(document.body,"mousemove",LEAP.form.uiProcess,null,null,true);LEAP.addEvent(document.body,"mouseup",LEAP.form.uiProcess,null,null,true);LEAP.form.dragObj=B;B._offsetX=I.e.offsetX;B._offsetY=I.e.offsetY;if(LEAP.isIE){document.onselectstart=LEAP.form.onselectstart;}return false;}}}finally{A=F=C=D=B=null;
}};LEAP.form.maxSize=function(B){B=LEAP._check(B,LEAP.form.d);if(B==null){return ;}if(!LEAP.hasCSS(LEAP.getElement("[ctf=form_btn_size]",B),"iframe_title_res_icon")){LEAP.getElement("[ctf=form_btn_size]",B).className="iframe_title_res_icon";var E=B.style.left;var D=B.style.top;var C=B.clientWidth;var A=B.clientHeight;
B.setAttribute("size_left",E);B.setAttribute("size_top",D);B.setAttribute("size_width",C);B.setAttribute("size_height",A-48);B.style.left="0px";B.style.top="0px";LEAP.form.setSize(B,document.body.clientWidth,document.body.clientHeight-50);}B=null;};LEAP.form.restoreSize=function(A){A=LEAP._check(A,LEAP.form.d);
if(A==null){return ;}if(!LEAP.hasCSS(LEAP.getElement("[ctf=form_btn_size]",A),"iframe_title_max_icon")){LEAP.getElement("[ctf=form_btn_size]",A).className="iframe_title_max_icon";A.style.left=A.getAttribute("size_left");A.style.top=A.getAttribute("size_top");LEAP.form.setSize(A,A.getAttribute("size_width"),A.getAttribute("size_height"));
}A=null;};LEAP.form.onselectstart=function(){return false;};LEAP.select={};LEAP.select.a="<a value='@v'href='javascript:void(0)'ctf='select_item'>@n</a>";LEAP.select.b="@v";LEAP.select.c="@n";LEAP.select.d="select";LEAP.select.dd="areagroup";LEAP.select.init=function(){if(document!=null&&document.body!=null){LEAP.select._init();
}else{UIEventManager.addEvent(window,"load",LEAP.select._init);}ElementEventManager.addManagedEventType(LEAP.select.d,"valueChange");ElementEventManager.addManagedEventType(LEAP.select.dd,"valueChange");};LEAP.select._init=function(){LEAP.addEvent(document.body,"click",LEAP.select.uiProcess,null,null,true);
LEAP.addEvent(document.body,"keydown",LEAP.select.uiProcess,null,null,true);UIEventManager.removeEvent(window,"load",LEAP.select._init);};LEAP.select.getValue=function(E){var G=E;try{E=LEAP._check(E,LEAP.select.d);if(E==null){E=LEAP._check(G,LEAP.select.dd);if(E==null){return ;}else{E=LEAP.getElement("[ct=select][deep]",E);
if(E==null){return ;}}}var L=E.getAttribute("group");if(L!=null&&L.Trim()!=""){var M=E.getAttribute("deep");if(M==null||M.toString().Trim()==""){return ;}M=LEAP.parsenum(M);if(M==null){return ;}var N=E.getAttribute("instance");var J="div[ct=select][group="+L+"]";if(N!=null&&N.Trim()!=null){J+="[instance='"+N+"']";
}var I=LEAP.getElements(J);if(I!=null){var C=I.length;for(var D=C-1;D>-1;D--){var B=I[D];var K=B.getAttribute(commfields.value);if(K==null||K==""){if(D==0){var A=E.getAttribute("defaultvalue");if(A!=null&&A.Trim()!=""){return A.Trim();}}else{continue;}}var F=B.getAttribute("count");var H=LEAP.select._fill(F,K);
if(H==null||H.toString().Trim()==""){var A=E.getAttribute("defaultvalue");if(A!=null&&A.Trim()!=""){return A.Trim();}}return H;}}}else{var H=E.getAttribute(commfields.value);if(H==null||H.toString().Trim()==""){var A=E.getAttribute("defaultvalue");if(A!=null&&A.Trim()!=""){return A.Trim();}}return H;
}}finally{G=E=null;}};LEAP.select.getSelectedText=function(C){C=LEAP._check(C,LEAP.select.d);if(C==null){return ;}var B=LEAP.getElement("[ctf=selectbtn]",C);if(B!=null){var A=B.value;B=null;return A;}B=null;};LEAP.select.setValue=function(C,H,A,F){var E=C;try{C=LEAP._check(C,LEAP.select.d);if(C==null){C=LEAP._check(E,LEAP.select.dd);
if(C==null){return ;}else{C=LEAP.getElement("[ct=select][deep]",C);if(C==null){return ;}}}var J=C.getAttribute("size");var K=LEAP.select._sub(J,H);var D=LEAP.getElement(".select_items a[value="+K+"]",C);if(D==null){D=LEAP.getElement('.select_items a[value=""]',C);}if(D!=null){var I=C.getAttribute(commfields.value);
var B=D.getAttribute(commfields.value);var G=H;if(H==null){G="";}C.setAttribute(commfields.value,G);LEAP.getElement("[ctf=selectbtn]",C).value=D.innerText;if(F!=false){LEAP.select._setvalue(C,I,H,A);}}else{C.setAttribute(commfields.value,"");LEAP.getElement("[ctf=selectbtn]",C).value="";if(F!=false){LEAP.select._setvalue(C,I,H,A);
}}}finally{C=null;E=null;}};LEAP.select.addItem=function(C,D,A){C=LEAP._check(C,LEAP.select.d);if(C==null){return ;}var E=LEAP.getElement(".select_items",C);var F=document.createElement("div");E.appendChild(F);if(D==null||D.Trim()==""){D="";}if(A==null||A.Trim()==""){A="&nbsp";}var B=C.getAttribute("size");
D=LEAP.select._sub(B,D);F.innerHTML=LEAP.select.a.replace(LEAP.select.b,D).replace(LEAP.select.c,A);C=E=F=null;};LEAP.select.clearItem=function(A){A=LEAP._check(A,LEAP.select.d);if(A==null){return ;}var B=LEAP.getElement(".select_items",A);if(B!=null){B.innerHTML="";}A.setAttribute(commfields.value,"");
LEAP.getElement(".selectbtn",A).value="";LEAP.select.addItem(A,"","");B=A=null;};LEAP.select.removeItem=function(B,C){B=LEAP._check(B,LEAP.select.d);if(B==null){return ;}var A=LEAP.getElement(".select_items a[value="+C+"]",B);if(A!=null){A.parentNode.parentNode.removeChild(A.parentNode);if(B.getAttribute(commfields.value)==C){B.setAttribute(commfields.value,"");
LEAP.getElement(".selectbtn",B).value="";}}};LEAP.select.uiProcess=function(F){var H=F.e.srcElement;var A=H.getAttribute("ctf");var C=F.e.type;var B=null;if(C=="keydown"&&H.tagName=="INPUT"&&(B=LEAP._match(H,LEAP.select.d))!=null){if(B.getAttribute("readonly")=="1"){return ;}var T=-1;if(LEAP.isIE){T=F.e.keyCode;
}else{T=F.e.which;}var P=B.getAttribute("md")=="areaid";if(T==37||T==38){var Q=LEAP.select.getValue(B);var D=LEAP.getElements("a[ctf=select_item]",B);if(D!=null){var R=D.length;if(Q==null){if(R>1){LEAP.select.setValue(B,D[1-1].getAttribute("value"));}else{LEAP.select.setValue(B,D[0].getAttribute("value"));
}}for(var V=0;V<R;V++){var W=D[V].getAttribute("value");if((W.Trim()!=""&&P&&Q.substring(0,W.length)==W)||(!P&&Q==W)){if(V==0){if(!P){LEAP.select.setValue(B,D[R-1].getAttribute("value"));}break;}var W=D[V-1].getAttribute("value");if(W!=null&&W.Trim()==null){W=null;}if((W==null||W.Trim()=="")&&P){}else{LEAP.select.setValue(B,W);
}}}}LEAP.stopEvent(F.e);return ;breakEvent:true;}else{if(T==39||T==40){var Q=LEAP.select.getValue(B);var D=LEAP.getElements("a[ctf=select_item]",B);if(D!=null){var R=D.length;if(Q==null){if(R>0){LEAP.select.setValue(B,D[1].getAttribute("value"));}else{if(R==0){LEAP.select.setValue(B,D[0].getAttribute("value"));
}}}else{var M=false;for(var V=0;V<R;V++){var W=D[V].getAttribute("value");if((W.Trim()!=""&&P&&Q.substring(0,W.length)==W)||(!P&&Q==W)){if(V==R-1){if(!P){LEAP.select.setValue(B,null);}M=true;break;}var W=D[V+1].getAttribute("value");if(W!=null&&W.Trim()==null){W=null;}if((W==null||W.Trim()=="")&&P){}else{LEAP.select.setValue(B,W);
}M=true;}}if(!M){if(R>1){LEAP.select.setValue(B,D[1].getAttribute("value"));}else{LEAP.select.setValue(B,D[0].getAttribute("value"));}}}}LEAP.stopEvent(F.e);return ;breakEvent:true;}}return ;}if(C=="mouseout"){var J,I;if(A=="select_drop"){I=H;J=LEAP.getElement("[ctf=selectbtn]",I.parentNode);}else{if(A=="selectbtn"){J=H;
I=LEAP.getElement("[ctf=select_drop]",J.parentNode.parentNode.parentNode);}else{return ;}}LEAP.removeCSS(J,"selectbtnon");LEAP.removeCSS(I,"selectdropon");LEAP.addCSS(I,"selectdropout");H=J=I=null;return ;}else{if(C=="mouseover"){var J,I;if(A=="select_drop"){I=H;J=LEAP.getElement("[ctf=selectbtn]",I.parentNode);
}else{if(A=="selectbtn"){J=H;I=LEAP.getElement("[ctf=select_drop]",J.parentNode.parentNode.parentNode);}else{return ;}}LEAP.removeCSS(I,"selectdropout");LEAP.addCSS(I,"selectdropon");LEAP.addCSS(J,"selectbtnon");H=J=I=null;return ;}}var U=LEAP.getElement(".select_items[_ui_select_on=1]");if(U!=null){LEAP.setAttribute(U,"_ui_select_on",null);
LEAP.setStyle(U,{display:"none"});LEAP.setStyle(U.parentNode,{zIndex:"99998"});U=null;}if(A!=null){if(A=="selectbtn"||A=="select_drop"){var S=null;var B=null;if(A=="select_drop"){B=H.parentNode;}else{B=H.parentNode.parentNode.parentNode;}if(B.getAttribute("readonly")=="1"){return ;}S=LEAP.getElement(".select_items",B);
J=LEAP.getElement("[ctf=selectbtn]",B);var L=J.offsetLeft;var K=J.offsetTop;LEAP.setStyle(S,{display:"block"});LEAP.setStyle(S,{display:"block",top:K+22,left:L});S.parentNode.style.zIndex="99999";S["_ui_select_on"]=1;S=null;}else{if(A=="select_item"){var N=H.parentNode.parentNode.parentNode;var O=N.getAttribute(commfields.value);
var E=H.getAttribute(commfields.value);var G=N.getAttribute("count");O=LEAP.select._fill(G,O);E=LEAP.select._fill(G,E);LEAP.getElement(".selectbtn",N).value=H.innerText;N.setAttribute(commfields.value,E);H.parentNode.parentNode.style.display="none";LEAP.getElement(".selectbtn",N).focus();LEAP.select._setvalue(N,O,E,true,true);
N=null;}}}H=null;};LEAP.select._sub=function(B,A){if(A==null){return ;}if(typeof (B)=="string"&&(A.Trim()==""||A.Trim()=="&nbsp")){return"";}if(B!=null&&(typeof (B)=="number"||B.Trim()!="")){B=LEAP.parsenum(B);if(B!=null&&A.length>B){A=A.substr(0,B);}}return A;};LEAP.select._fill=function(D,B){if(B==null){return ;
}if(typeof (D)=="string"&&(B.Trim()==""||B.Trim()=="&nbsp")){return"";}if(D!=null&&(typeof (length)=="number"||(D.Trim()!=""&&B!=null&&B.Trim()!=""))){D=LEAP.parsenum(D);if(D!=null){var A=B.length;for(var C=0;C<D-A;C++){B+="0";}}}return B;};LEAP.select._setvalue=function(M,O,E,X,K){var U,I;var N=M.getAttribute("size");
U=LEAP.select._sub(N,O);I=LEAP.select._sub(N,E);if(X){if(I!=U){ElementEventManager.handleEvent(M,"valueChange",{caller:M,pv:U,lv:I});}}var H=M.getAttribute("group");if(H!=null&&H.Trim()!=""){var S=M.getAttribute("deep");if(S==null||S.Trim()==""){return ;}S=LEAP.parsenum(S);if(S==null){return ;}var W=M.getAttribute("instance");
var V="";if(W!=null&&W.Trim()!=null){V="[instance='"+W+"']";}if(K){if(I==U){return ;}var D="div[ct=select][deep][group="+H+"]";if(S>0){for(var T=1;T<=S;T++){D+="[deep!="+T+"]";}}var C=LEAP.getElements(D+V);if(C!=null){for(var T=0;T<C.length;T++){LEAP.select.clearItem(C[T]);}if(E!=null&&E.Trim()!=""){var A=C[0].getAttribute("code");
var N=M.getAttribute("size");var R=LEAP.getCodeValue(A,LEAP.select._sub(N,E));if(R!=null){for(var T=0;T<R.length;T++){LEAP.select.addItem(C[0],R[T].codeid,R[T].codevalue);}}}}}else{var D="div[ct=select][deep][group="+H+"]";var C=LEAP.getElements(D+V);if(C!=null){var Q=C.length;var B=0;for(var T=0;T<Q;
T++){var P=C[T];if(T!=0){LEAP.select.clearItem(P);LEAP.select.setValue(P,"",false,false);}var A=P.getAttribute("code");var N=P.getAttribute("size");if(N==null||N.Trim()==""){continue;}var F,G;if(T!=0){F=LEAP.select._sub(B,E);if(F==null||F.Trim()==""){continue;}R=LEAP.getCodeValue(A,F);}if(T!=0&&R!=null){for(var L=0;
L<R.length;L++){LEAP.select.addItem(P,R[L].codeid,R[L].codevalue);}}var J=E;if(E!=null){J=LEAP.parsenum(E.substr(B,N-B));}if(J==null||J==0){continue;}LEAP.select.setValue(P,E,false,false);B=N;}}}var Y=LEAP._match(M,LEAP.select.dd);if(Y!=null){ElementEventManager.handleEvent(Y,"valueChange",{caller:Y,pv:U,lv:I});
Y=null;}}};LEAP.select.init();LEAP.check={};LEAP.check.p="white";LEAP.check.n="#FFDDDD";LEAP.check.i="#FFF7E5";LEAP.check.t="<div style='display: block' class=tip_top><div style=' overflow:auto; width:100%;'><div ctf='tip_content_msg' class='tip_msg'></div><div ctf='tip_content_err' class='tip_err'></div></div></div><div style='display: block' class=tip_bottom></div>";
LEAP.check._init=function(){LEAP.addEvent(document.body,"click",LEAP.check.uiProcess,null,null,true);LEAP.addEvent(document.body,"keypress",LEAP.check.uiProcess,null,null,true);if(LEAP.isIE){LEAP.addEvent(document.body,"focusin",LEAP.check.uiProcess,null,null,true);LEAP.addEvent(document.body,"focusout",LEAP.check.uiProcess,null,null,true);
}else{document.addEventListener("focus",LEAP.check.uiProcess,true);document.addEventListener("blur",LEAP.check.uiProcess,true);}var A=document.createElement("div");A.className="tip";A.setAttribute("ct","tip");document.body.appendChild(A);A.innerHTML=LEAP.check.t;A=null;};LEAP.check.uiProcess=function(arg){var e=null;
var src=null;var k=null;var type=null;if(arg!=null&&arg.e!=null&&arg.e.type!=null){type=arg.e.type;}try{if(type!=null){src=arg.e.srcElement;e=arg.e;if(LEAP.isIE){k=e.keyCode;}else{k=e.which;}}else{e=arg;src=arg.target;k=e.which;}type=e.type;if(src==null||src.getAttribute==null){return ;}var f=src.getAttribute("tip");
if(f==""){f=null;}if(f=="null"||f=="NULL"){src.removeAttribute("tip");f=null;}var c=src.getAttribute("check");if(f==null&&c==null){return ;}var m=src["_chec_error_msg"];if(m=="null"||m=="NULL"){m=null;src["_chec_error_msg"]=null;}if((type=="mouseout"||type=="mouseover"||type=="mousemove"||type=="click")&&(f!=null||m!=null)){var tip=LEAP.getElement("[ct=tip]");
var last=tip["last"];var ctid=src.getAttribute("ctid");if(type=="mouseover"){if(f==null){f="";}LEAP.getElement("[ctf=tip_content_msg]").innerHTML=f;if(m==null){m="";}LEAP.getElement("[ctf=tip_content_err]").innerHTML=m;LEAP.setStyle(tip,{display:"block",left:e.clientX-23+document.body.scrollLeft,top:e.clientY+2+document.body.scrollTop});
if(ctid==null){ctid=UUID.cID();src.setAttribute("ctid",ctid);}tip["last"]=ctid;}else{if(type=="mouseout"){if(last==ctid){tip["last"]=null;tip.style.display="none";}}else{if(type=="mousemove"){if(ctid==last&&tip.style.display=="block"){LEAP.setStyle(tip,{left:e.clientX-23+document.body.scrollLeft,top:e.clientY+2+document.body.scrollTop});
}}}}tip=null;return ;}if(type=="click"){return ;}var def=src["_check_def"];if(def==null){def={};try{if(c!=null){def.check=eval("({"+c+"})");if(def.exp!=null&&typeof (def.exp)=="string"){def.exp=new RegExp(def.exp);}def.warn=src.getAttribute("warn");}}catch(err){}if(f!=null){def.tip=f;}src["_check_def"]=def;
}if(def==null){return ;}if(def.check!=null&&def.check.maxlen!=null){if(src.maxLength!=def.check.maxlen+""){src.maxLength=def.check.maxlen;}}var id=src.getAttribute("ctid");if(id==null){id=UUID.cID();src.setAttribute("ctid",id);}if(type=="keypress"&&def.check!=null){if(k==8||k==0||k==13||k==35||k==36||k==37||k==38||k==39||k==40){return ;
}if(e.ctrlKey&&(k==67||k==99)){return ;}if(e.ctrlKey&&(k==86||k==118)){if(def.check.isnumber==true||def.check.enablecn==false){if(!LEAP.isIE){e.preventDefault();}}return ;}if(def.check.maxlen!=null){var v=LEAP.getValue(src);var l=0;if(v!=null){l=(v+"").length;}if(def.check.maxlen<=l){var _t=LEAP.getSelectedText(src);
var word=_t.text;var idx=_t.idx;if(word==null){if(LEAP.isIE){e.returnValue=false;}else{e.preventDefault();}return ;}}}if(def.check.isen==true){if(k<65||k>122){if(LEAP.isIE){e.returnValue=false;}else{e.preventDefault();}return ;}}if(def.check.isint==true){var v=LEAP.getValue(src);var _d=LEAP.getSelectedText(src);
if(k==45){var l=0;if(v!=null){l=(v+"").length;}if(l==0){return ;}else{if((_d.idx==0&&_d.text==null)||(_d.text!=null&&_d.text.length-_d.idx==0)){if(v.indexOf("-")==-1||(_d.text!=null&&_d.text.indexOf("-")!=-1)){return ;}}else{if(LEAP.isIE){e.returnValue=false;}else{e.preventDefault();}return ;}}}else{if(k<48||k>57){if(k==48){var v=LEAP.getValue(src);
var l=0;if(v!=null){l=(v+"").length;}if(l!==0){return ;}}if(LEAP.isIE){e.returnValue=false;}else{e.preventDefault();}return ;}}}if(def.check.isnumber==true){var v=LEAP.getValue(src);var _d=LEAP.getSelectedText(src);var _v=v;if(v=="-"){_v="0";}if(k>46&&k<58&&(def.check.precision!=null||def.check.decimalplace!=null)&&v!=""){if(((parseInt(_v)+"").length>=def.check.precision&&_d.text==null&&_d.idx<=def.check.precision)||(def.check.decimalplace!=null&&v.indexOf(".")>0&&_d.text==null&&_d.idx>def.check.precision&&def.check.decimalplace<=(v.length-v.indexOf(".")-1))){if(LEAP.isIE){e.returnValue=false;
}else{e.preventDefault();}return ;}}if(k==45){var l=0;if(v!=null){l=(v+"").length;}if(l==0){return ;}else{if((_d.idx==0&&_d.text==null)||(_d.text!=null&&_d.text.length-_d.idx==0)){if(v.indexOf("-")==-1||(_d.text!=null&&_d.text.indexOf("-")!=-1)){return ;}}else{if(LEAP.isIE){e.returnValue=false;}else{e.preventDefault();
}return ;}}}if((k<48||k>57||k==48)&&k!=45){if(k==46||k==48){if(k==48){if(v==""||(v.indexOf("0.")==0&&v*1==0)){return ;}else{if(v*1==0){if(LEAP.isIE){e.returnValue=false;}else{e.preventDefault();}return ;}}}var l=0;if(v!=null){l=(v+"").length;}if(l>0){if(k==46&&def.check.maxlen!=null&&(l+1)==def.check.maxlen){if(LEAP.isIE){e.returnValue=false;
}else{e.preventDefault();}return ;}if(k==46&&(v+"").indexOf(".")==-1){return ;}else{if(k==48){if(l!==0){return ;}}}}}if(LEAP.isIE){e.returnValue=false;}else{e.preventDefault();}return ;}}return ;}if(f!=null&&def.tip!=null){if(type=="mouseover"){}else{if(type=="mouseout"){}}}if(c!=null&&def.check!=null){if(type=="blur"||type=="focusout"){LEAP.check.setStyle(src,"");
LEAP.check.validate(src,false);}else{if(type=="focus"||type=="focusin"){LEAP.check.setStyle(src,LEAP.check.i);if(def.check.enablecn==false||def.check.isen==true||def.check.isint==true||def.check.isnumber==true){if(src.style.imeMode!="disabled"){src.style.imeMode="disabled";}}}}}def=null;}finally{e=src=arg=null;
}};LEAP.check.getErrorMsg=function(A){if(A==null){return ;}if(typeof (A)==commfields.string){A=LEAP.getElement(A);}if(A==null){return ;}var B=A["_chec_error_msg"];A=null;return B;};LEAP.check.setCheck=function(C,A){if(C==null){return ;}if(typeof (C)==commfields.string){C=LEAP.getElements(C);}if(C==null){return ;
}if(C.length){}else{C=[C];}if(A==null||A=="null"){A="";}LEAP.setAttribute(C,"check",A);for(var B=0;B<C.length;B++){C[B]["_check_def"]=null;C[B]["_chec_error_msg"]=null;}LEAP.check.setStyle(C,"",true);C=null;};LEAP.check.setCheckFunction=function(D,B,C){if(D==null){return ;}if(typeof (D)==commfields.string){D=LEAP.getElements(D);
}if(D==null){return ;}if(D.length){}else{D=[D];}for(var A=0;A<D.length;A++){D[A]["_check_function"]=B;if(B!=null){B._cdomain=C;}D[A]["_chec_error_msg"]=null;}D=null;};LEAP.check.setTip=function(B,A){if(B==null){return ;}if(typeof (B)==commfields.string){B=LEAP.getElements(B);}if(B==null){return ;}if(B.length){}else{B=[B];
}if(A==null||A=="null"){A="";}LEAP.setAttribute(B,"tip",A);B=null;};LEAP.check.setErrorMsg=function(C,A){if(C==null){return ;}if(typeof (C)==commfields.string){C=LEAP.getElements(C);}if(C==null){return ;}if(C.length){}else{C=[C];}if(A==""){A=null;}for(var B=0;B<C.length;B++){C[B]["_chec_error_msg"]=A;
if(A!=null){LEAP.check.setStyle(C[B],LEAP.check.n);var D=C[B].getAttribute("ctid");if(D==null){D=UUID.cID();C[B].setAttribute("ctid",D);}}else{LEAP.check.setStyle(C[B],LEAP.check.p);}}C=null;};LEAP.check.validate=function(elements,autoshowerr){if(elements==null){return ;}if(typeof (elements)==commfields.string){elements=LEAP.getElements(elements);
}if(elements==null){return ;}if(elements.length){}else{elements=[elements];}var ret=null;var ll=elements.length;for(var j=0;j<ll;j++){var src=elements[j];var def=src["_check_def"];if(def==null){def={};var c=src.getAttribute("check");try{if(c!=null){def.check=eval("({"+c+"})");def.warn=src.getAttribute("warn");
}}catch(err){}if(src.getAttribute("tip")!=null){def.tip=src.getAttribute("tip");}src["_check_def"]=def;}if(def==null){continue;}if(def.check==null){continue;}if(def.check.maxlen!=null){if(src.maxLength!=def.check.maxlen+""){src.maxLength=def.check.maxlen;}}var v=LEAP.getValue(src);var l=0;if(v!=null){l=(v+"").length;
}var msg="";if(def.check.codelength>0){var v=LEAP.getValue(src);if(v!=null&&v!=""){var sels=LEAP.getElements("[ct=select]",src);var tv=null;if(sels!=null){var tl=sels.length;var tj=-1;for(var jj=0;jj<tl;jj++){var sel=sels[jj];var text=LEAP.select.getSelectedText(sel);if(text==null||text.Trim()==""){if(_tv==null||_tv==""){break;
}}var _tv=sel.getAttribute("value");tv=_tv;tj=sel.getAttribute("size");}if(tj<def.check.codelength){msg+="*区域级别不符合";}}}else{msg+="*填写内容不允许为空";}}if(def.check.notnull==true){if(l==0){msg+="*填写内容不允许为空";}}if(l>0){if(def.check.maxlen!=null&&def.check.maxlen<l){if(msg!=null){msg+="<br>";}msg+="*您填写的内容太长,系统允许填写的最大长度是"+def.check.maxlen+"字";
}if(def.check.minlen!=null&&def.check.minlen>l){if(msg!=null){msg+="<br>";}msg+="*您填写的内容太短,系统允许填写的最小长度是"+def.check.minlen+"字";}if((def.check.isint==true||def.check.isnumber==true)&&(def.check.maxnumber!=null||def.check.minnumber!=null)){if(def.check.maxnumber!=null){var _v=v*1;if(_v>def.check.maxnumber){if(msg!=null){msg+="<br>";
}msg+="*超出最大值限制，最大值:"+def.check.maxnumber;}}if(def.check.minnumber!=null){var _v=v*1;if(_v<def.check.minnumber){if(msg!=null){msg+="<br>";}msg+="*超出最小值限制，最小值:"+def.check.minnumber;}}}if(def.check.isint==true){if(isNaN(parseInt(v))){if(msg!=null){msg+="<br>";}msg+="*非法整数";}else{for(var i=0;i<l;i++){var _t=v.charAt(i);
if((_t<"0"||_t>"9")&&_t!="-"){if(msg!=null){msg+="<br>";}msg+="*只允许填写数字";break;}}}}if(def.check.isnumber==true){for(var i=0;i<l;i++){var _t=v.charAt(i);var _err=false;if((_t<"0"||_t>"9")&&_t!="."&&_t!="-"){if(msg!=null){msg+="<br>";}msg+="*只允许填写数字";_err=true;break;}}if(!_err&&(def.check.precision!=null||def.check.decimalplace!=null)&&v!=""){if(isNaN(parseInt(v))){if(msg!=null){msg+="<br>";
}msg+="*非法数字";}else{if(def.check.precision<(parseInt(v)+"").length){if(msg!=null){msg+="<br>";}msg+="*整数位超出限制,整数位:"+def.check.precision;}}if(def.check.decimalplace!=null&&v.indexOf(".")>-1&&def.check.decimalplace<=(v.length-v.indexOf(".")-2)){if(msg!=null){msg+="<br>";}msg+="*小数数位超出限制,小数位:"+def.check.precision;
}}}if(def.check.isen==true){for(var i=0;i<l;i++){var _t=v.charAt(i);if(_t<"A"||_t>"z"){if(msg!=null){msg+="<br>";}msg+="*只允许填写英文";break;}}}if(def.check.enablecn==false){if(escape(v).indexOf("%u")>=0){if(msg!=null){msg+="<br>";}msg+="*不允许填写中文";}}if(def.check.exp!=null){if(!def.check.exp.exec(v)){if(msg!=null){msg+="<br>";
}if(def.check.warn!=null){msg+="*"+def.check.warn;}else{msg+="*填写内容不符合规则";}}}if(src["_check_function"]!=null){var fn=src["_check_function"];var _msg=null;try{var d=fn._cdomain;if(d==null){d=this;}_msg=fn.call(d,src);}catch(err){}if(_msg!=null){if(msg!=null){msg+="<br>";}msg+="*"+_msg;}}}if(msg==""){msg=null;
}src["_chec_error_msg"]=msg;if(msg!=null){LEAP.check.setStyle(src,LEAP.check.n);if(ret==null){ret=[];}var id=src.getAttribute("ctid");if(id==null){id=UUID.cID();src.setAttribute("ctid",id);}ret.add("[ctid="+id+"]");}else{LEAP.check.setStyle(src,LEAP.check.p);}src=def=null;}elements=null;if(ret!=null){try{return ret;
}finally{if(autoshowerr!=false){var msg=LEAP.getElement(ret[0]).getAttribute("_chec_error_msg");if(window.confirm(msg.replace("*","").replace("<br>","")+"\n点击确定移动到错误位置!")==true){try{LEAP.getElement(ret[0]).focus();}catch(err){}}}ret=null;}}};LEAP.check.clearValidate=function(A){if(A==null){return ;}if(typeof (A)==commfields.string){A=LEAP.getElements(A);
}if(A==null){return ;}if(A.length){}else{A=[A];}LEAP.getElement("[ct=tip]").display="none";LEAP.check.setStyle(A,"",true);A=null;};LEAP.check.hideTip=function(){var A=LEAP.getElement("[ct=tip]");A["last"]=null;A.style.display="none";A=null;};LEAP.check.setStyle=function(F,D,E){if(E==true){var A=F.length;
for(var C=0;C<A;C++){var G=F[C];if(G.getAttribute("ct")=="select"){var B=LEAP.getElement("[ctf=selectbtn]",G);if(B.style.backgroundColor!=D){B.style.backgroundColor=D;}B=null;}else{if(G.style.backgroundColor!=D){G.style.backgroundColor=D;}}if(D==""){G["_chec_error_msg"]=null;}G=null;}}else{var G=F;if(G.getAttribute("ct")=="select"){var B=LEAP.getElement("[ctf=selectbtn]",G);
if(B.style.backgroundColor!=D){B.style.backgroundColor=D;}B=null;}else{if(G.style.backgroundColor!=D){G.style.backgroundColor=D;}}if(D==""){G["_chec_error_msg"]=null;}G=null;}F=D=null;};LEAP.check.init=function(){if(document!=null&&document.body!=null){LEAP.check._init();}else{UIEventManager.addEvent(window,"load",LEAP.check._init);
}}();LEAP.radio={};LEAP.radio.d="radio";LEAP.radio.init=function(){if(document!=null&&document.body!=null){LEAP.radio._init();}else{UIEventManager.addEvent(window,"load",LEAP.radio._init);}ElementEventManager.addManagedEventType(LEAP.radio.d,"valueChange");ElementEventManager.addManagedEventType(LEAP.radio.d,"clickItem");
};LEAP.radio._init=function(){LEAP.addEvent(document.body,"click",LEAP.radio.uiProcess,null,null,true);LEAP.addEvent(document.body,"keydown",LEAP.radio.uiProcess,null,null,true);UIEventManager.removeEvent(window,"load",LEAP.radio._init);};LEAP.radio.uiProcess=function(F){var H=null;var B=null;var A=null;
var G=null;var J=null;var D=null;try{H=F.e.srcElement;if(null==H){return ;}B=F.e.type;if(null==B){return ;}var A=null;var C=null;if(B=="keydown"&&(H.tagName=="INPUT"||(A=LEAP._match(H,LEAP.radio.d))!=null||((C=H.getAttribute("ct"))!=null&&C.indexOf("upload_control_")==0))){if(A!=null&&A.getAttribute("readonly")=="1"){return ;
}var Q=-1;if(LEAP.isIE){Q=F.e.keyCode;}else{Q=F.e.which;}if(Q==9){var N="input:visible,div[ct=radio]:visible";if(C!=null){N+=",[ct="+C+"]:visible";}var M=LEAP.getElements(N);if(M!=null){var P=M.length;for(var R=0;R<P;R++){if(M[R]==H&&R!=P-1){if(M[R+1].tagName=="INPUT"){break;}else{var L=M[R+1];try{if(L!=null&&L.getAttribute("readonly")=="1"){return ;
}L.focus();}catch(E){continue;}LEAP.stopEvent(F.e);L=null;break;}}}M=null;}}if(A!=null){if(Q==37||Q==38){var I=LEAP.getElements("label[ctf=radio_label]",A);if(I!=null){var O=LEAP.radio.getValue(A);var P=I.length;if(O==null){var K=I[0].getAttribute("value");LEAP.radio.setValue(A,K);ElementEventManager.handleEvent(A,"valueChange",{radio:A,newvalue:K,oldvalue:O});
}else{if(O==I[0].getAttribute("value")){var K=I[P-1].getAttribute("value");LEAP.radio.setValue(A,K);ElementEventManager.handleEvent(A,"valueChange",{radio:A,newvalue:K,oldvalue:O});}else{for(var R=0;R<P;R++){var K=I[R].getAttribute("value");if(K==O&&R!=0){LEAP.radio.setValue(A,I[R-1].getAttribute("value"));
ElementEventManager.handleEvent(A,"valueChange",{radio:A,newvalue:K,oldvalue:O});}}}}}LEAP.stopEvent(F.e);}else{if(Q==39||Q==40){var I=LEAP.getElements("label[ctf=radio_label]",A);if(I!=null){var O=LEAP.radio.getValue(A);var P=I.length;if(O==null){var K=I[0].getAttribute("value");LEAP.radio.setValue(A,I[0].getAttribute("value"));
ElementEventManager.handleEvent(A,"valueChange",{radio:A,newvalue:K,oldvalue:O});}else{if(O==I[P-1].getAttribute("value")){var K=I[0].getAttribute("value");LEAP.radio.setValue(A,K);ElementEventManager.handleEvent(A,"valueChange",{radio:A,newvalue:K,oldvalue:O});}else{for(var R=0;R<P;R++){var K=I[R].getAttribute("value");
if(K==O&&R!=P-1){LEAP.radio.setValue(A,I[R+1].getAttribute("value"));ElementEventManager.handleEvent(A,"valueChange",{radio:A,newvalue:K,oldvalue:O});}}}}}LEAP.stopEvent(F.e);}}}}if("radio_label"!=H.getAttribute("ctf")){return ;}A=LEAP._match(H,LEAP.radio.d);if(null==A){return ;}if("1"==A.getAttribute("readonly")){return ;
}G=A.getAttribute("ccancel");if(null==G||""==G){G="y";}if("click"==B){if("radio_disabled"==H.className){return ;}G=G.Trim().toLowerCase();if("y"==G||"yes"==G){J=LEAP.radio.getValue(A);if("radio_checked"==H.className){LEAP.radio.clean(A);}else{LEAP.radio.clean(A);H.className="radio_checked";}D=LEAP.radio.getValue(A);
ElementEventManager.handleEvent(A,"valueChange",{radio:A,newvalue:D,oldvalue:J});}else{if("radio_unchecked"==H.className){J=LEAP.radio.getValue(A);LEAP.radio.clean(A);H.className="radio_checked";D=LEAP.radio.getValue(A);ElementEventManager.handleEvent(A,"valueChange",{radio:A,newvalue:D,oldvalue:J});
}}ElementEventManager.handleEvent(A,"clickItem",{item:H});}}finally{D=J=G=A=H=F=B=null;}};LEAP.radio.getNameByValue=function(C,D){var A=null;var B=null;try{C=LEAP._check(C,LEAP.radio.d);if(null==C){return null;}A=LEAP.getElements("[ctf=radio_label]",C);if(null==A){return null;}for(B=0;B<A.length;B++){if(A[B].getAttribute("value").Trim()==D){return(LEAP.isIE?A[B].innerText:A[B].textContent);
}}return null;}finally{B=C=null;}};LEAP.radio.getCheckedItem=function(C){var A=null;var B=null;var D=null;try{C=LEAP._check(C,LEAP.radio.d);if(null==C){return null;}A=LEAP.getElements("[ctf=radio_label]",C);if(null==A){return null;}D=new hashtable();for(B=0;B<A.length;B++){if("radio_checked"==A[B].className){D.add(A[B].getAttribute("value").Trim(),(LEAP.isIE?A[B].innerText:A[B].textContent));
}}return D.count>0?D:null;}finally{D=B=C=null;}};LEAP.radio.getValue=function(C){var A=null;var D="";try{C=LEAP._check(C,LEAP.radio.d);if(null==C){return null;}A=LEAP.getElements("[ctf=radio_label]",C);if(null==A){return null;}for(var B=0;B<A.length;B++){if("radio_checked"==A[B].className){D=A[B].getAttribute("value").Trim();
break;}}B=null;return(""==D)?null:D;}finally{D=C=A=null;}};LEAP.radio.setValue=function(C,D){var A=null;try{C=LEAP._check(C,LEAP.radio.d);if(null==C){return ;}LEAP.radio.clean(C);if(D==null){return ;}D=D.toString();A=LEAP.getElements("[ctf=radio_label]",C);if(null==A){return ;}for(var B=0;B<A.length;
B++){if(A[B].getAttribute("value").Trim()==D){if("radio_disabled"==A[B].className){continue;}A[B].className="radio_checked";A[B].setAttribute("ischecked",true);break;}}B=null;}finally{C=D=A=null;}};LEAP.radio.setValueByText=function(C,D){var A=null;try{C=LEAP._check(C,LEAP.radio.d);if(null==C){return ;
}LEAP.radio.clean(C);if(D==null){return ;}D=D.toString();A=LEAP.getElements("[ctf=radio_label]",C);if(null==A){return ;}for(var B=0;B<A.length;B++){if(A[B].innerText.Trim()==D){if("radio_disabled"==A[B].className){continue;}A[B].className="radio_checked";A[B].setAttribute("ischecked",true);break;}}B=null;
}finally{C=D=A=null;}};LEAP.radio.clean=function(C){var A=null;try{C=LEAP._check(C,LEAP.radio.d);if(null==C){return ;}A=LEAP.getElements("[ctf=radio_label]",C);if(null==A){return ;}for(var B=0;B<A.length;B++){if("radio_disabled"==A[B].className){continue;}A[B].className="radio_unchecked";A[B].setAttribute("ischecked",false);
}B=null;}finally{C=A=null;}};LEAP.radio.addItem=function(C,B,E,D){var F=null;var A=null;try{C=LEAP._check(C,LEAP.radio.d);if(null==C){return ;}if(null==B||""==B){B="&nbsp;";}F=document.createElement("div");C.appendChild(F);F.className="radio_div";F.setAttribute("ctf","radio_item");A=document.createElement("label");
F.appendChild(A);A.setAttribute("ctf","radio_label");A.innerHTML=B;A.setAttribute("value",E);if("boolean"==typeof (D)){if(D){LEAP.radio.setValue(C,E);}else{A.className="radio_unchecked";}}else{A.className="radio_disabled";}}finally{F=A=C=B=E=D=null;}};LEAP.radio.removeItems=function(D,B,E){var A=null;
try{D=LEAP._check(D,LEAP.radio.d);if(null==D){return ;}A=LEAP.getElements("[ctf=radio_label]",D);if(null==A){return ;}if(null!=B&&null!=E){for(var C=0;C<A.length;C++){if(A[C].getAttribute("value")==E&&A[C].innerHTML==B){D.removeChild(A[C].parentNode);}}C=null;}else{if(null!=B){for(var C=0;C<A.length;
C++){if(A[C].innerHTML==B){D.removeChild(A[C].parentNode);}}C=null;}else{if(null!=E){for(var C=0;C<A.length;C++){if(A[C].getAttribute("value")==E){D.removeChild(A[C].parentNode);}}C=null;}}}}finally{A=D=B=E=null;}};LEAP.radio.setDisabled=function(D,F,B,E){var A=null;try{D=LEAP._check(D,LEAP.radio.d);
if(null==D){return ;}if("boolean"!=typeof (F)){return ;}A=LEAP.getElements("[ctf=radio_label]",D);if(null==A){return ;}if(null!=B&&null!=E){for(var C=0;C<A.length;C++){if(A[C].getAttribute("value")==E&&A[C].innerHTML==B){if(F){A[C].className="radio_disabled";}else{A[C].className="radio_unchecked";}}}C=null;
}else{if(null!=B){for(var C=0;C<A.length;C++){if(A[C].innerHTML==B){if(F){A[C].className="radio_disabled";}else{A[C].className="radio_unchecked";}}}C=null;}else{if(null!=E){for(var C=0;C<A.length;C++){if(A[C].getAttribute("value")==E){if(F){A[C].className="radio_disabled";}else{A[C].className="radio_unchecked";
}}}C=null;}}}}finally{A=D=B=E=null;}};LEAP.radio.setReadOnly=function(A,B){try{A=LEAP._check(A,LEAP.radio.d);if(null==A){return ;}if(B){A.setAttribute("readonly","1");}else{A.setAttribute("readonly","0");}}finally{A=B=null;}};LEAP.radio.init();LEAP.table={};LEAP.table.d="table";LEAP.table.a="_headers";
LEAP.table.b="_lastRowIndex";LEAP.table.m="_searchMethod";LEAP.table.p="pageSize";LEAP.table.z='<input idx="@idx" type="checkbox" datatype=@datatype cntext="@cntext" checked ctf="table_props_chk_md" name="checkbox" md="@md" code="@code" id="checkbox" >@text<br>';LEAP.table.t=null;LEAP.table.s=null;LEAP.table.selectedColor="#C8D8FA";
LEAP.table.scolor="#FFFFFF";LEAP.table.spcolor="#F5F8FF";LEAP.table.movecolor="#FFF4BF";LEAP.table.lasteditcontroltype=null;LEAP.table.lasteditcontrolid=null;LEAP.table.modifyflag='<label style="position:absolute;left:0px;top:0px;color:red;">*</label>';LEAP.table.nodeopen="<label ctf=table_node_open class=table_node_open></label>";
LEAP.table.nodeclose="<label ctf=table_node_close class=table_node_close></label>";LEAP.table._tempDiv=null;LEAP.table.init=function(){if(document!=null&&document.body!=null){LEAP.table._init();}else{UIEventManager.addEvent(window,"load",LEAP.table._init);}ElementEventManager.addManagedEventType(LEAP.table.d,"dataLoaded");
ElementEventManager.addManagedEventType(LEAP.table.d,"selectedIndexChange");ElementEventManager.addManagedEventType(LEAP.table.d,"rowOperationClick");ElementEventManager.addManagedEventType(LEAP.table.d,"doubleClick");ElementEventManager.addManagedEventType(LEAP.table.d,"cellClick");ElementEventManager.addManagedEventType(LEAP.table.d,"headerClick");
ElementEventManager.addManagedEventType(LEAP.table.d,"cellValueChanged");};LEAP.table._init=function(){LEAP.addEvent(document.body,"click",LEAP.table.uiProcess,null,null,true);LEAP.addEvent(document.body,"mousedown",LEAP.table.uiProcess,null,null,true);LEAP.addEvent(document.body,"mouseup",LEAP.table.uiProcess,null,null,true);
LEAP.addEvent(document.body,"keydown",LEAP.table.uiProcess,null,null,true);LEAP.addEvent(document.body,"dblclick",LEAP.table.uiProcess,null,null,true);UIEventManager.removeEvent(window,"load",LEAP.table._init);if(LEAP.table._tempDiv==null){LEAP.table._tempDiv=document.createElement("div");LEAP.setStyle(LEAP.table._tempDiv,{display:"none",width:"0px",height:"0px"});
document.body.appendChild(LEAP.table._tempDiv);}};LEAP.table._crid=function(){if(LEAP.table._rid!=null){var A=LEAP.getElement("#"+LEAP.table._rid);if(A!=null){A["_resize"]=false;LEAP.table._rid=null;A=null;}}};LEAP.table.buildQueryExt=function(){if(this._orderExp!=null){if(this.innerBuildQuery!=null){var B=this.innerBuildQuery();
if(B!=null){if(LEAP.isArray(B)){var A=B[0].order;if(A==null){B[0].setOrder(this._orderExp);}else{B[0].setOrder(this._orderExp+" , "+A);}}else{var A=B.order;if(A==null){B.setOrder(this._orderExp);}else{B.setOrder(this._orderExp+" , "+A);}}return B;}}}else{if(this.innerBuildQuery!=null){return this.innerBuildQuery();
}}};LEAP.table.uiProcess=function(arg){if(arg==null){return ;}var src=arg.e.srcElement;if(src==null){return ;}var type=arg.e.type;if(type==null){return ;}var tag=src.tagName;if(tag==null){return ;}var ctf=src.getAttribute(commfields.ctf);if(type=="keydown"){if(LEAP.isIE){k=arg.e.keyCode;}else{k=arg.e.which;
}if((k==38||k==40)&&((ctf!=null&&ctf.indexOf("table_")==0)||src.tagName=="TABLE")){var element=LEAP._match(src,LEAP.table.d);if(element!=null){if(k==40){LEAP.table.setSelectedIndex(element,LEAP.table.getSelectedIndex(element)+1);}if(k==38){if(element[LEAP.table.b]==null){var rows=LEAP.getElements("tr[ctf=table_row]",element);
if(rows!=null){LEAP.table.setSelectedIndex(element,rows.length-1);}rows=null;}else{LEAP.table.setSelectedIndex(element,LEAP.table.getSelectedIndex(element)-1);}}LEAP.stopEvent(arg.e);}element=src=null;return false;}if(k==27||k==13||k==9||k==40||k==38){if(src.getAttribute("ttf")=="table_cell_edite_contrl_cons"||LEAP._match(src,"table_cell_edite_contrl_cons","ttf")!=null){if(k==27){LEAP.table.hideCellEidt(true);
}else{if(k==13||k==9||k==40||k==38){if((k==13||k==40||k==38)&&src.tagName=="TEXTAREA"&&!arg.e.ctrlKey){return ;}if(LEAP.table.lasteditcontrolid!=null){var control=LEAP.getElement("[ctid="+LEAP.table.lasteditcontrolid+"]",LEAP.table._tempDiv);if(control!=null){var _cell=LEAP.getElement("[ctid="+control.getAttribute("cellid")+"]");
if(_cell!=null){var element=LEAP._match(_cell,"table");if(element!=null&&LEAP.table.modifyCellValue!=null){var ret=LEAP.table.modifyCellValue(element);if(ret!=false&&LEAP.table.editNextCell!=null){if(k==9){LEAP.table.editNextCell(_cell,element);LEAP.stopEvent(arg.e);}else{if((src.tagName=="TEXTAREA"&&arg.e.ctrlKey&&k==38)||(src.tagName!="TEXTAREA"&&k==38)){LEAP.table.editPreRowCell(_cell,element);
LEAP.stopEvent(arg.e);}else{if((src.tagName=="TEXTAREA"&&arg.e.ctrlKey&&k==40)||(src.tagName!="TEXTAREA"&&k==40)){LEAP.table.editNextRowCell(_cell,element);LEAP.stopEvent(arg.e);}}}}}element=null;}control=_cell=null;}}}}}}return ;}var _temp=LEAP._match(src,"table_cell_edite_contrl_cons",commfields.ttf);
if(_temp==null&&(type=="click"||type=="dblclick")&&LEAP.table.hideCellEidt!=null){if(src.getAttribute("ttf")=="table_cell_edite_contrl_cons"||LEAP._match(src,"table_cell_edite_contrl_cons","ttf")!=null){}else{LEAP.table.hideCellEidt();if(LEAP.table.modifyCellValue!=null){var control=LEAP.getElement("[ctid="+LEAP.table.lasteditcontrolid+"]",LEAP.table._tempDiv);
if(control!=null){var _cell=LEAP.getElement("[ctid="+control.getAttribute("cellid")+"]");if(_cell!=null){LEAP.table.modifyCellValue(LEAP._match(_cell,LEAP.table.d));}control=_cell=null;}}}}if(type=="mouseout"){if(tag=="TD"&&ctf=="table_cell"){var row=LEAP._match(src,"table_row",commfields.ctf);var element=LEAP._match(row,LEAP.table.d);
if(row==null){return ;}var index=row.sectionRowIndex;var seindex=element[LEAP.table.b];if(index==seindex){}else{if((index%2)==0){LEAP.setStyle(row,{background:"#F5F8FF"});}else{LEAP.setStyle(row,{background:"#FFFFFF"});}}row=element=src=null;return false;}src=null;return ;}if(type=="mousemove"){if(tag=="TD"&&ctf=="table_cell"){var row=LEAP._match(src,"table_row",commfields.ctf);
var element=LEAP._match(row,LEAP.table.d);if(row==null){return ;}var index=row.sectionRowIndex;var seindex=element[LEAP.table.b];if(index==seindex){}row.style.backgroundColor=LEAP.table.selectedColor;return false;}else{if(tag!="TH"){LEAP.table._crid();return ;}}if(src["_resize"]==true){var w=src["_sw"];
var x=arg.e.offsetX;var dx=src["_downx"];var tw=x-dx;var rw=w+tw;if(rw>20){src.style.width=rw+"px";}}else{LEAP.table._crid();var w=src.clientWidth;var x=arg.e.offsetX;if(w<x+20){src.style.cursor="e-resize";}else{src.style.cursor="";}}src=type=tag=x=null;return false;}if(type=="mousedown"){if(tag=="TH"){LEAP.table._crid();
var w=src.clientWidth;var x=arg.e.offsetX;if(w<x+20){src.style.cursor="e-resize";}else{src.style.cursor="";}}if(tag=="TH"&&src.style.cursor=="e-resize"){src["_resize"]=true;src["_downx"]=arg.e.offsetX;src["_sw"]=src.clientWidth;if(src.id==null||src.id==""){src.id=UUID.cID();}LEAP.table._rid=src.id;src=type=tag=null;
LEAP.addEvent(document.body,"mousemove",LEAP.table.uiProcess,null,null,true);return false;}src=type=tag=null;return ;}if(type=="mouseup"){LEAP.removeEvent(document.body,"mousemove",LEAP.table.uiProcess,true);if(tag=="TH"&&src["_resize"]==true){src["_resize"]=false;LEAP.table._rid=null;LEAP.table._crid();
src=type=tag=null;return false;}LEAP.table._crid();src=type=tag=null;return ;}var ctf=src.getAttribute(commfields.ctf);var ct=src.getAttribute(commfields.ct);var table=null;var tablect=null;if(ct==LEAP.table.d){tablect=src;}if(tablect==null&&ctf!=null&&ctf.indexOf(LEAP.table.d)==0){tablect=LEAP._match(src,LEAP.table.d);
}if(tablect==null){return ;}if(type=="click"){if(ctf=="table_header"&&tablect.getAttribute("enablesort")!="0"){var autosort=true;var maxsort=null;if(LEAP.getUserInfo()!=null){autosort=LEAP.getUserInfo().autosort;maxsort=LEAP.getUserInfo().maxsort;}if(autosort!=null&&autosort==true){var element=LEAP._match(src,LEAP.table.d);
if((element["pageResultCount"]==null||maxsort==null)||element["pageResultCount"]<=maxsort){var md=src.getAttribute("md");if(md!=null&&md.Trim()!=""&&src.getAttribute("sncol")!="1"){var fn=tablect[LEAP.table.m];if(fn!=null){var domain=fn._domain;if(domain!=null){if(domain.buildQuery!=null){if(domain.innerBuildQuery==null){domain.innerBuildQuery=domain.buildQuery;
domain.buildQuery=LEAP.table.buildQueryExt;}var isasc=src.getAttribute("isasc")==null;if(isasc){src.setAttribute("isasc","1");}else{src.removeAttribute("isasc");}if(isasc){domain._orderExp=md;}else{domain._orderExp=md+" desc";}LEAP.table.refreshPage(tablect);var flag=LEAP.getElement("div[flag=orderflag]",src.parentNode);
if(flag==null){var flag=document.createElement("div");flag.style.width="18px";flag.style.height="16px";flag.style.left="0px";flag.style.top="0px";flag.style.position="absolute";flag.setAttribute("flag","orderflag");}if(isasc){flag.style.background="url("+leapconfig.server+"LEAP/Resource/images/itemstyle/table/order1.png)  no-repeat center";
}else{flag.style.background="url("+leapconfig.server+"LEAP/Resource/images/itemstyle/table/order2.png)  no-repeat center";}src.style.position="relative";src.appendChild(flag);flag=null;}}}}}else{alert("超出允许排序的最大记录数["+maxsort+"]");}}return ;}if(ctf=="table_export"){if(tablect.getAttribute("exportmode")=="1"){var result=tablect["result"];
if(result!=null){var url=LEAP.request("ExportExcelByResult",{r:result});if(url!=null){window.open(leapconfig.server+"LEAP/Download/excelReport/"+url);}}return ;}if(LEAP.table.s==null){LEAP.table.s=leapclient.load("LEAP/Resource/HTML/Control/tableExport.html");}var econs=LEAP.getElement("[ctf=table_export_cons]",tablect);
if(econs==null){var div=document.createElement("div");div.innerHTML=LEAP.table.s;econs=LEAP.getElement("[ctf=table_export_cons]",div);tablect.appendChild(econs);LEAP.removeElement(div);div=null;econs=null;}else{if(econs.style.display=="none"){econs.style.display="block";}else{econs.style.display="none";
}econs=null;}}if(ctf=="table_export_setPageSize"){LEAP.getElement("[ctf=table_export_cons]",tablect).style.display="none";var sizes=LEAP.getElement("[ctf=table_export_pageSize]",tablect);if(sizes!=null){var size=sizes.value;sizes=null;if(size.Trim()!=""){size=parseInt(size);if(size>0){tablect.setAttribute(LEAP.table.p,size+"");
tablect[LEAP.table.p]=size;LEAP.table.refreshPage(tablect);}}}}if(ctf=="table_export_curPage"||ctf=="table_export_export"){LEAP.getElement("[ctf=table_export_cons]",tablect).style.display="none";var fn=tablect[LEAP.table.m];if(fn!=null){var domain=fn._domain;if(domain!=null){if(domain.buildQuery!=null&&domain.moduleName!=null){var par=domain.buildQuery.call(domain);
var isarray=LEAP.isArray(par);var mode=null;if(isarray==true){mode=4;}else{var exportmode=tablect.getAttribute("exportmode");if(exportmode!=null&&exportmode.toString().Trim()!=""&&exportmode==3){mode=3;}else{mode=2;}}if(par!=null){var name=null;var pagenum=null;var pagesize=null;name=domain.moduleName;
var toc=true;if(ctf=="table_export_curPage"){pagenum=tablect["pageNum"]*1;pagesize=tablect[LEAP.table.p];}else{var mins=LEAP.getElement("[ctf=table_export_min]",tablect);var maxs=LEAP.getElement("[ctf=table_export_max]",tablect);var min=mins.value*1;var max=maxs.value*1+1;var pageCount=max-min;mins=maxs=null;
if(min!=0&&max!=0&&min<=max){pagenum=min;pagesize=tablect["pageSize"]*1;}else{toc=false;}}if(toc){var headers=tablect[LEAP.table.a];if(headers!=null){var l=headers.length;for(var i=0;i<l;i++){var h=headers[i];if(h.md!=null&&h.sncol==false){if(!isarray){if(par.fields==null||!par.fields.contains(h.md)){par.addField(h.md);
}}else{for(var j=0;j<par.length;j++){if(par[j].fields==null||!par[j].fields.contains(h.md)){par[j].addField(h.md);}}}}}if(mode==4&&par!=null){par[0].pageNum=pagenum;par[0].name=name;par[0].pageSize=pagesize;par[0].pageCount=pageCount;}else{par.name=name;par.pageNum=pagenum;par.pageSize=pagesize;par.pageCount=pageCount;
}if(mode!=4){par=[par];}var str=LEAP.request("ExportExcelExt",{par:par,mode:mode});var err=LEAP.getLastError();if(err!=null){alert(err.error);}else{window.open(leapconfig.server+"LEAP/Download/excelReport/"+str);}}}}}}domain=null;}fn=null;}else{if(ctf=="table_props_chk_md"){var headers=tablect[LEAP.table.a];
var chk=src.checked;var md=src.getAttribute("md");var datatype=src.getAttribute("datatype");if(chk){var code=src.getAttribute("code");var idx=src.getAttribute("idx");var ths=LEAP.getElements("input[checked][type=checkbox][ctf=table_props_chk_md]",tablect);var nextmd=null;if(ths!=null){var l=ths.length;
for(var i=0;i<l;i++){var tidx=ths[i].getAttribute("idx")*1;if(tidx>idx){nextmd=ths[i].getAttribute("md");break;}}ths=null;}var th=document.createElement("TH");if(code!=null&&code!="null"){th.setAttribute("code",code);}th.setAttribute("md",md);if(datatype!=91&&datatype!=93){th.setAttribute("bt","text");
}else{th.setAttribute("bt","date");}th.setAttribute("ctf","table_header");th.innerText=src.getAttribute("cntext");var hdef=LEAP.getBindDef(th);if(nextmd!=null){var next=LEAP.getElement("th[ctf=table_header][md="+nextmd+"]",tablect);next.parentNode.insertBefore(th,next);headers=headers.insert(hdef,next.cellIndex-1);
tablect[LEAP.table.a]=headers;}else{var hs=LEAP.getElements("th[ctf=table_header]",tablect);if(hs!=null){var tpo=hs[hs.length-1].getAttribute("tpo");if(tpo!=null&&tpo.Trim()!=""){hs[hs.length-1].parentNode.insertBefore(th,hs[hs.length-1]);headers=headers.insert(hdef,hs[hs.length-1].cellIndex-1);tablect[LEAP.table.a]=headers;
}else{var tthread=LEAP.getElement("thead",tablect);var trows=LEAP.getElements("tr",tthread);trows[trows.length-1].appendChild(th);headers.add(hdef);tablect[LEAP.table.a]=headers;}}else{var tthread=LEAP.getElement("thead",tablect);var trows=LEAP.getElements("tr",tthread);trows[trows.length-1].appendChild(th);
headers=[];headers.add(hdef);tablect[LEAP.table.a]=headers;}}LEAP.table.refreshPage(tablect);th=null;}else{var th=LEAP.getElement("th[ctf=table_header][md="+md+"]",tablect);var idx=th.cellIndex;headers.remove(headers[idx]);th.parentNode.removeChild(th);th=null;var rows=LEAP.getElements("tr[ctf=table_row]",tablect);
if(rows!=null){var l=rows.length;for(var i=0;i<l;i++){var row=rows[i];row.removeChild(row.cells[idx]);row=null;}rows=null;}}}else{if(ctf=="table_props"){var props=LEAP.getElement("[ctf=table_props_cons]",tablect);if(props==null){var codeTypes=tablect["codeTypes"];var metaDatas=tablect["metaDatas"];var headers=tablect[LEAP.table.a];
if(codeTypes!=null&&metaDatas!=null){if(LEAP.table.t==null){LEAP.table.t=leapclient.load("LEAP/Resource/HTML/Control/tableProps.html");}var div=document.createElement("div");div.innerHTML=LEAP.table.t;props=LEAP.getElement("[ctf=table_props_cons]",div);props.style.height=tablect.clientHeight*0.6+"px";
tablect.appendChild(props);LEAP.removeElement(div);div=null;props=null;var l=codeTypes.length;var temp=new hashtable();var temp2=new array();var ll=headers.length;for(var i=0;i<ll;i++){var h=headers[i];if(h.md!=null&&h.sncol==false){temp.add(h.md,{code:h.code,md:h.md,txt:null});temp2.add(h.md);}}for(var i=0;
i<l;i++){var codeType=codeTypes[i];var metaData=metaDatas[i];var mdName=metaData.name;if(temp.contains(mdName)){temp.getvalue(mdName).txt=metaData.cnName;temp.getvalue(mdName).datatype=metaData.type;continue;}var lmd=mdName.toLowerCase();if(lmd=="id"||(lmd!="areaid"&&lmd.indexOf("id")>-1)||lmd=="photo"||metaData.cnName=="照片"||metaData.cnName=="附件"){continue;
}temp.add(lmd,{code:codeType,md:lmd,txt:metaData.cnName,datatype:metaData.type});}var str="";var index=0;for(var key in temp.keys){var value=temp.getvalue(key);var md=value.md;var code=value.code;var txt=value.txt;var datatype=value.datatype;if(txt==null){txt=md;}var _str=LEAP.table.z;if(!temp2.contains(md)){_str=_str.replace("checked","");
}str+=_str.replace("@text",txt).replace("@idx",index).replace("@cntext",txt).replace("@md",md).replace("@code",code).replace("@datatype",datatype);index++;}if(str!=""){LEAP.getElement("[ctf=table_props_list]",tablect).innerHTML=str;}}}else{if(props.style.display=="none"){props.style.display="block";}else{props.style.display="none";
}props=null;}}}}}table=LEAP.getElement(LEAP.table.d,tablect);if(table==null){return ;}var tpof=src.getAttribute(commfields.tpof);if(ctf=="table_header"){var header=LEAP.table.getHeaders(tablect,src.cellIndex);ElementEventManager.handleEvent(tablect,"headerClick",{cell:src,table:table,src:src,cellIndex:src.cellIndex,header:header,md:header.md});
header=null;return ;}var row=null;if(LEAP._match(src,"table_thead")!=null){}else{row=LEAP._match(src,"table_row",commfields.ctf);}if(row!=null){if(type=="dblclick"){if(tag=="TD"){ElementEventManager.handleEvent(tablect,"doubleClick",{row:row,table:table});}return ;}var cell=null;if(tag=="TD"){cell=src;
}else{cell=LEAP._match(src,"table_cell",commfields.ctf);}if(cell!=null){var headers=LEAP.table.getHeaders(tablect);var header=null;if(headers!=null){header=headers[cell.cellIndex];}var md=null;if(header!=null){md=header.md;}ElementEventManager.handleEvent(tablect,"cellClick",{row:row,cell:cell,table:table,src:src,index:row.sectionRowIndex,cellIndex:cell.cellIndex,data:row["data"],selectedIndex:tablect[LEAP.table.b],header:header,md:md});
}if(cell!=null&&tpof!=null&&tpof!=""){var roc=tablect.getAttribute("operationClick");if(roc!=null&&roc!=""&&tablect["_ioc"]==null){var rocfn=null;try{rocfn=eval("("+roc+")");}catch(err){}LEAP.addEvent(tablect,"rowOperationClick",rocfn);tablect["_ioc"]="true";}ElementEventManager.handleEvent(tablect,"rowOperationClick",{row:row,cell:cell,table:table,flag:tpof,src:src,index:row.sectionRowIndex,cellIndex:cell.cellIndex,data:row["data"],selectedIndex:tablect[LEAP.table.b]});
return ;}if(ctf=="table_chk"||ctf=="table_img"){return ;}if(ctf=="table_node_open"){LEAP.table.closeNode(tablect,row);}if(ctf=="table_node_close"){LEAP.table.expandNode(tablect,row);}if(tablect.getAttribute("enableedit")=="1"){if(ctf=="table_cell"){if(LEAP.table.modifyCellValue!=null){LEAP.table.modifyCellValue(tablect);
}LEAP.check.hideTip();if(LEAP.table.editCell!=null){LEAP.table.editCell(src,tablect);}}}if(cell!=null&&row.sectionRowIndex!=tablect[LEAP.table.b]){var iic=tablect.getAttribute("indexChange");if(iic!=null&&iic!=""&&tablect["_iic"]==null){var iicfn=null;try{iicfn=eval("("+iic+")");}catch(err){}LEAP.addEvent(tablect,"selectedIndexChange",iicfn);
tablect["_iic"]="true";}var pindex=tablect[LEAP.table.b];LEAP.table.setSelectedIndex(tablect,row.sectionRowIndex);}}else{if(ctf=="table_page_info"){return ;}if(ctf!=null&&ctf.indexOf("table_page_")==0){var pageCount=LEAP.tonum(tablect["pageCount"]);var gotoNumctl=LEAP.getElement("[ctf=table_page_in]",tablect);
if(pageCount==0&&gotoNumctl!=null){gotoNumctl.value="";return ;}var pageNum=LEAP.tonum(tablect["pageNum"]);var pageResultCount=LEAP.tonum(tablect["pageResultCount"]);if(ctf=="table_page_next"){if(pageCount>pageNum){LEAP.table.gotoPage(tablect,pageNum+1);}}else{if(ctf=="table_page_pre"){if(pageNum>1){LEAP.table.gotoPage(tablect,pageNum-1);
}}else{if(ctf=="table_page_first"){if(pageNum!=1){LEAP.table.gotoPage(tablect,1);}}else{if(ctf=="table_page_last"){if(pageNum!=pageCount){LEAP.table.gotoPage(tablect,pageCount);}}else{if(ctf=="table_page_goto"){var gotoNum=LEAP.tonum(gotoNumctl.value);if(gotoNum>0&&gotoNum<=pageCount){LEAP.table.gotoPage(tablect,gotoNum);
}}}}}}if(gotoNumctl!=null){gotoNumctl.value="";}gotoNumctl=null;}}};LEAP.table.focus=function(A){A=LEAP._check(A,LEAP.table.d);if(A==null){return ;}LEAP.getElement("td:firsh:visible",A).focus();};LEAP.table.getHeaders=function(C,F){C=LEAP._check(C,LEAP.table.d);if(C==null){return ;}var A=C[LEAP.table.a];
if(A==null){A=[];var G=LEAP.getElement("thead",C);var I=LEAP.getElements("tr",G);var J=I[I.length-1].cells;var B=J.length;for(var D=0;D<B;D++){var H=J[D];var E=LEAP.getBindDef(H);if(E.sncol){if(C.getAttribute("showcheck")=="1"){E.btexp=commfields.sncel;}else{if(E.btexp==null||E.btexp.Trim()==""){E.btexp="@sn";
}}}A.add(E);}C[LEAP.table.a]=A;}if(F==null||F<0){return A;}if(F<A.length){return A[F];}};LEAP.table.setCellValue=function(K,E,H,B,C,F){var I=null;var D=null;if(E.tpo==null&&B!=null){I=B[E.md];D=B[commfields.rsccv+E.md];}var G=null;if(D!=null){G=D;}if(D!=null&&(C.getAttribute("enableedit")!="1"||(C.getAttribute("enableedit")=="1"&&(E!=null&&E.enableedit!=null&&E.enableedit=="0")))){}else{var J=H.getAttribute("modifyvalue");
if(J!=null){G=LEAP.getBindValue(E,J,B,LEAP.table.d);}else{G=LEAP.getBindValue(E,I,B,LEAP.table.d);}}H.setAttribute(commfields.ctf,"table_cell");if(E.bt=="date"||E.bt=="datetime"){H.setAttribute("sourcevalue",G);}else{H.setAttribute("sourcevalue",I);}if(G!=null&&E.sncol){var A=C["pageNum"];if(A==null||A==""){A=1;
}A=A-1;if(C[LEAP.table.p]==null){C[LEAP.table.p]=C.getAttribute(LEAP.table.p)*1;}G=G.replace("@sn",A*C[LEAP.table.p]+K.sectionRowIndex+1);}if(G==""||G.Trim()==""){G="&nbsp";}H.innerHTML=G;H.setAttribute("md",E.md);if(C.getAttribute("enableedit")=="1"){if(F==true&&(E.tpo==null||E.tpo.Trim()=="")&&E.sncol!="1"){H.setAttribute("isnew","1");
H.style.color="red";H.ismodify=1;}if(C.getAttribute("showtree")=="1"&&E.md=="table_wbs"){if(B.table_wbs!=B.wbs){H.style.color="red";H.setAttribute("wbsmodify","1");}else{H.style.color="";H.setAttribute("wbsmodify","0");}}}if(E.sncol!="1"&&(E.tpo==null||E.tpo.Trim()=="")&&G!=null&&G.Trim()!=""&&G!="&nbsp"){if(E.bt=="textarea"){H.setAttribute("title",G);
}else{H.setAttribute("title",H.innerText);}}if(C.getAttribute("hideoverflow")=="0"){H.style.height="auto";}else{H.className="ellipsis";}if(E.textalign!=null){H.style.textAlign=E.textalign;}C=K=E=H=B=null;};LEAP.table.addRow=function(G,F,A,D,J){G=LEAP._check(G,LEAP.table.d);if(G==null){return ;}var B=LEAP.table.getHeaders(G);
if(B==null){return ;}if(F==null){F=new Object();}var M=document.createElement("tr");M.setAttribute(commfields.ctf,"table_row");M["data"]=F;var H=LEAP.getElement("tbody",G);if(H==null){return ;}H.appendChild(M);H=null;var K=M.sectionRowIndex;if((K%2)==0){LEAP.setStyle(M,{background:LEAP.table.spcolor});
}else{LEAP.setStyle(M,{background:LEAP.table.scolor});}var C=B.length;for(var E=0;E<C;E++){var I=B[E];var L=document.createElement("td");LEAP.table.setCellValue(M,I,L,F,G,J);M.appendChild(L);}if(A!=null){M.setAttribute("cttag",A);}if(G.getAttribute("hideoverflow")=="0"){M.style.height="auto";}try{return M;
}finally{M=null;}};LEAP.table.removeRow=function(F,K){try{F=LEAP._check(F,LEAP.table.d);if(F==null){return ;}var G=LEAP.getElement("tbody",F);if(G==null){return ;}if(K>-1&&K<G.rows.length){var H=F[LEAP.table.b];if(K==H){F[LEAP.table.b]=null;}if(K<H){F[LEAP.table.b]=null;}var E=G.rows[K]["data"];G.deleteRow(K);
var J=null;var I=null;var A=LEAP.table.getHeaders(F);for(var D=0;D<A.length;D++){if(A[D].sncol==true){J=A[D];I=D;break;}}var C=false;if(F.getAttribute("showtree")!="1"){C=true;}for(var D=K;D<G.rows.length;D++){var L=G.rows[D];if(!C&&L["data"].levels>E.levels){L["data"].levels=L["data"].levels-1;}else{C=true;
}if((D%2)==0){LEAP.setStyle(L,{background:LEAP.table.spcolor});}else{LEAP.setStyle(L,{background:LEAP.table.scolor});}if(J!=null){LEAP.table.setCellValue(L,J,L.cells[I],L["data"],F);}L=null;}if(K!=G.rows.length&&F.getAttribute("showtree")=="1"&&LEAP.table.rebuildTree!=null){LEAP.table.rebuildTree(F);
}}G=F=null;}catch(B){}};LEAP.table.updateRow=function(D,G,C){if(C==null){return ;}var A=LEAP.table.getHeaders(D);if(A==null){return ;}var I=LEAP.table.getRow(D,G);I["data"]=C;var B=A.length;for(var E=0;E<B;E++){var F=A[E];var H=I.cells[E];LEAP.table.setCellValue(I,F,H,C,D);}D=C=A=I=null;};LEAP.table.clearRow=function(C){C[LEAP.table.b]=null;
C=LEAP._check(C,LEAP.table.d);if(C==null){return ;}var B=LEAP.getElement("tbody",C);if(B==null){return ;}var A=B.childNodes.length;if(!LEAP.isIE){A=A-1;}LEAP.removeElement(B.rows,true);LEAP.table.setSelectedIndex(C,-1);};LEAP.table.getRow=function(C,B){if(B==null||B<0){return null;}C=LEAP._check(C,LEAP.table.d);
if(C==null){return ;}var A=LEAP.getElement("tbody",C);var D=LEAP.getElements("tr",A);var E=D[B];try{return E;}finally{C=A=D=E=null;}};LEAP.table.getRows=function(B){if(B==null){return null;}B=LEAP._check(B,LEAP.table.d);if(B==null){return ;}var A=LEAP.getElement("tbody",B);var C=LEAP.getElements("tr",A);
try{return C;}finally{B=A=C=null;}};LEAP.table.setSelectedIndex=function(D,C){if(C==null||C<0){return null;}D=LEAP._check(D,LEAP.table.d);if(D==null){return ;}if(C==-1){D[LEAP.table.b]=null;return ;}var E=D[LEAP.table.b];var B=E;if(E==null){E=0;}var A=LEAP.getElement("tbody",D);var F=LEAP.getElements("tr",A);
if(E!=null&&E>-1&&(E%2)==0){LEAP.setStyle(F[E],{background:LEAP.table.spcolor});}else{LEAP.setStyle(F[E],{background:LEAP.table.scolor});}if(C>=F.length){D[LEAP.table.b]=null;return ;}LEAP.setStyle(F[C],{background:LEAP.table.movecolor});D[LEAP.table.b]=C;if(B!=C){ElementEventManager.handleEvent(D,"selectedIndexChange",{pindex:E,row:F[C],table:D,index:F[C].sectionRowIndex,data:F[C]["data"]});
}};LEAP.table.getSelectedIndex=function(B){B=LEAP._check(B,LEAP.table.d);if(B==null){return ;}var A=B[LEAP.table.b];B=null;if(A==null){return -1;}return A;};LEAP.table.setSearchMethod=function(A,B,C){if(typeof (B)!="function"){return ;}A=LEAP._check(A,LEAP.table.d);if(A==null){return ;}A[LEAP.table.m]=B;
if(C!=null){B._domain=C;}else{B._domain=this;}};LEAP.table.bindData=function(C,D){var E=LEAP.convertResult(D);if(E!=null){for(var B=0;B<E.length;B++){var A=null;if(D.codeValues!=null){A=D.codeValues[B];}LEAP.table.addRow(C,E[B]);}}if(C.getAttribute("showtree")=="1"&&LEAP.table.rebuildTree!=null){LEAP.table.rebuildTree(C);
}};LEAP.table.getCheckedRows=function(E){var C=null;try{E=LEAP._check(E,LEAP.table.d);if(E==null){return ;}if(E.getAttribute("showcheck")!="1"){return ;}var B=LEAP.getElements("[ctf=table_chk][checked]",E);if(B!=null){C=[];var A=B.length;for(var D=0;D<A;D++){C[D]=B[D].parentNode.parentNode;}B=null;return C;
}}finally{C=E=null;}};LEAP.table.setCheckedRow=function(B,D,H){var F=null;try{B=LEAP._check(B,LEAP.table.d);if(B==null){return ;}if(B.getAttribute("showcheck")!="1"){return ;}if(D==null){var E=LEAP.getElements("[ctf=table_chk]",B);if(E!=null){F=[];var A=E.length;for(var C=0;C<A;C++){var G=E[C];if(H!=false){G.setAttribute("checked",true);
}else{G.setAttribute("checked",null);G.removeAttribute("checked");}}E=null;}}else{var I=LEAP.table.getRow(B,D);if(I!=null){var G=LEAP.getElement("[ctf=table_chk]",I);if(H!=false){G.setAttribute("checked",true);}else{G.setAttribute("checked",null);G.removeAttribute("checked");}I=null;}}}finally{F=B=null;
}};LEAP.table.gotoPage=function(B,E,D){var A=LEAP.getElement("[ctf=table_page_in]",B);if(A!=null){A.value="";A=null;}var C=LEAP.getElement("[ctf=table_page_info]",B);if(C!=null){C.innerHTML="&nbsp&nbsp&nbsp&nbsp<B><font style='color:red;font-size:14px'>正在查询...<font><B>&nbsp&nbsp&nbsp&nbsp";}C=null;LEAP.asyn(LEAP.table._gotoPage,null,null,B,E,D);
};LEAP.table._gotoPage=function(element,gotoPageNum,resultset){if(typeof (gotoPageNum)!="number"||gotoPageNum<1){return ;}element=LEAP._check(element,LEAP.table.d);if(element==null){return ;}var fn=element[LEAP.table.m];var sm=element.getAttribute("searchMethod");if(fn==null&&sm!=null){try{element[LEAP.table.m]=fn=eval("("+sm+")");
}catch(err){}}if(fn==null){return ;}if(element[LEAP.table.p]==null){element[LEAP.table.p]=LEAP.tonum(element.getAttribute(LEAP.table.p));}var pageSize=element[LEAP.table.p];var d=fn._domain;if(d==null){d=element;}var result=null;if(resultset!=null){result=resultset;}else{result=fn.call(d,element,gotoPageNum,pageSize);
}d=null;if(result!=null){element["codeTypes"]=result.codeTypes;element["metaDatas"]=result.metaData;}element["pageCount"]=0;element["pageNum"]=0;element["pageResultCount"]=0;var info=LEAP.getElement("[ctf=table_page_info]",element);LEAP.table.clearRow(element);if(result==null||result.result==null){if(info!=null){info.innerText=commfields.pge.replace("@pageNum",0).replace("@endNum",0).replace("@beginNum",0).replace("@pageCount",0).replace("@size",0).replace("@count",0).replace("@pageSize",pageSize);
info=null;}return ;}element["pageCount"]=result.pageCount;element["pageNum"]=result.pageNum;element["pageResultCount"]=result.count;LEAP.table.bindData(element,result);if(info!=null){info.innerText=commfields.pge.replace("@pageNum",element["pageNum"]).replace("@endNum",result.endNum).replace("@beginNum",result.beginNum).replace("@pageCount",element["pageCount"]).replace("@size",result.size).replace("@count",element["pageResultCount"]).replaceall("@pageSize",pageSize);
}info=null;ElementEventManager.handleEvent(element,"dataLoaded",{table:element});};LEAP.table.refreshPage=function(A){A=LEAP._check(A,LEAP.table.d);if(A==null){return ;}var B=A["pageNum"];if(B==null||B<1){B=1;}LEAP.table.gotoPage(A,B);};LEAP.table.init();LEAP.dynamodule={};LEAP.dynamodule.itemflag="<!--values-->";
LEAP.dynamodule.radioitem="<div ctf='radio_item'><label ctf='radio_label' value='@value' class='radio_unchecked'>@name</label></div>";LEAP.dynamodule.selectitem="<DIV><A href='javascript:void(0)' ctf='select_item' value=@value>@name</A></DIV>";LEAP.dynamodule.z='<TABLE class="devtable devtableext" style="WIDTH: 100%" cellSpacing=0 cellPadding=0 border=0 ct="devtable" devtable="lg"><TR class=devtablexrow><TD class=devtablexycell style="WIDTH: 20px"></TD><TD class=devtablexcell style="WIDTH: 120px">A</TD><TD class=devtablexcell>B</TD><TD class=devtablexcell style="WIDTH: 120px">C</TD><TD class=devtablexcell>D</TD></TR>@tbody<TBODY></TBODY></TABLE>';
LEAP.dynamodule.y='<TR><TD style="height:@rowheight" class=devtableycell>@rowsn</TD>@row</TR>';LEAP.dynamodule.x='<TD class="devtableleftcell" title=@name>@name</TD><TD colSpan=@colspan class=devtablerightcell><DIV class=devtablecon>@control</DIV></TD>';LEAP.dynamodule._x='<TD class="devtableleftcell" title=@name>@name</TD><TD colSpan=@colspan class=devtablerightcell>@control</TD>';
LEAP.dynamodule.v='<TD class="devtableleftcell" title=@name>@name</TD><TD class="devtablerightcell " style="TEXT-ALIGN: left"><LABEL class=devtablecontrol bt="text" md="@md" code="@code" ht="input" type="text"></LABEL></TD>';LEAP.controls={};LEAP.controls.area='<DIV style="OVERFLOW: visible; WIDTH: auto; HEIGHT: 26px" ut="System_AreaControl" ct="areagroup" md="areaid" group="area" class="devtablecontrol">区域联动选择控件</DIV>';
LEAP.controls.date='<DIV class="date devtablecontrol" ct="date" bt="date" md="@md" check="@check"><INPUT class=date_y maxLength=4 ctf="date_1"> <A>-</A> <INPUT class=date_i maxLength=2 ctf="date_2"> <A>-</A> <INPUT class=date_i maxLength=2 ctf="date_3"> <DIV class=date_img ctf="date_show"></DIV></DIV>';
LEAP.controls.radio='<DIV class="radio_frame devtablecontrol" style="OVERFLOW: visible; HEIGHT: 100%" ct="radio" bt="text" md="@md" check="@check" code="@code"><!--values--></DIV>';LEAP.controls.select='<DIV class="select devtablecontrol" style="WIDTH: 100%" bt="text" ct="select" md="@md" check="@check" code="@code"><DIV class="lg_p_lr_right select_drop selectdropout" ctf="select_drop"></DIV><DIV class=lg_p_lr_fill><DIV class="lg_p_lr_fill_c "><INPUT class="selectbtn ellipsis " type=button ctf="selectbtn"> </INPUT></DIV></DIV><DIV class=select_items style="WIDTH: 392px" ctf="select_items"><DIV><A href="javascript:void(0)" value="" ctf="select_item"></A></DIV><!--values--></DIV></DIV>';
LEAP.controls.select2='<DIV value="@selectvalue" class="select devtablecontrol" style="WIDTH: 100%" bt="text" ct="select" md="@md" check="@check" code="@code"><DIV class="lg_p_lr_right select_drop selectdropout" ctf="select_drop"></DIV><DIV class=lg_p_lr_fill><DIV class="lg_p_lr_fill_c "><INPUT class="selectbtn ellipsis " type=button ctf="selectbtn" value="@value"> </INPUT></DIV></DIV><DIV class=select_items style="WIDTH: 392px" ctf="select_items"><!--values--></DIV></DIV>';
LEAP.controls.textarea='<TEXTAREA style="FLOAT: left; OVERFLOW: auto; WIDTH: 98%; HEIGHT: 52px" md="@md" check="@check" wrap=on bt="text" ht="textarea" class="devtablecontrol"></TEXTAREA>';LEAP.controls.text='<INPUT style="WIDTH: 99%" bt="text" md="@md" check="@check" ht="input" class="devtablecontrol">';
LEAP.controls.textutil=LEAP.controls.text+'<div class="devtableutil">@unit</div>';LEAP.controls.view="<label style='height:@height' md='@md' code='' type='@bt'  ht='label' bt='text' class='devtablecontrol'></label>";LEAP.controls.viewutil=LEAP.controls.view+'<div class="devtableutil">单位</div>';LEAP.controls.pohots='<DIV class="main_content upload_photolist" style="WIDTH: 100%; HEIGHT: 240px" ct="upload_control_photolist" dev="lg" bt="text" md="@md"><DIV class="upload_btn upload_btn_upload" title=上传 style="RIGHT: 0px; POSITION: absolute; TOP: 0px" ctf="upload_btn_upload" ctt="upload_control_photolist"></DIV></DIV>';
LEAP.dynamodule.moduleheader="<head>\n		<!--@ \n		module = @showmodulename\n	-->\n</head>\n";LEAP.dynamodule.module='<DIV style="WIDTH: 99%; POSITION: relative; HEIGHT: 100%" dev="lg">    <DIV class="lg_p_bct_top" style="DISPLAY: none; HEIGHT: 0px" dev="lg">    </DIV>    <DIV class="lg_p_bct_center" style="BOTTOM: 25px; TOP: 0px;overflow:auto;" dev="lg"> @content   </DIV>    <DIV class="lg_p_bct_bottom submitBtn" style="HEIGHT: 25px;" dev="lg">    	<DIV class=button_frame style="FLOAT: right">            <A class=button href="javascript:void(0)">                <P>                </P>                <SPAN al="@al" ut="submit" ctf="button" ht="button">                   	 确定                </SPAN>            </A>        </DIV>    </DIV></DIV>';
LEAP.dynamodule.viewmodule='<DIV ht="viewModule" al="@al" style="WIDTH: 99%; POSITION: relative; HEIGHT: 100%;overflow:auto;" dev="lg">@content<DIV>';LEAP.dynamodule.cache=new hashtable();LEAP.dynamodule.build=function(modulename,fields,parent,buildType){if(modulename==null||modulename.Trim()==""){return ;
}var showmodulename="dynamodule_"+modulename;var datamodulename=modulename;var def=null;if(LEAP.dynamodule.cache.contains(showmodulename)){def=LEAP.dynamodule.cache.getvalue(showmodulename);}else{var content=LEAP.dynamodule.innerBuild(fields,buildType);var html=null;var js=null;if(buildType==1){html=LEAP.dynamodule.module;
html=html.replace("@al","create");js=leapclient.load("LEAP/Studio/Template/JavaScript/create.js");js=js.replace("DynaCreate","DynaCreate2").replace("this.fireEvent('onSubmit');","this.fireEvent('onSubmit',result);").replace("if (result == true)","if (result != null)");}else{if(buildType==2){html=LEAP.dynamodule.module;
html=html.replace("@al","modify");js=leapclient.load("LEAP/Studio/Template/JavaScript/modify.js");}else{if(buildType==3){html=LEAP.dynamodule.viewmodule;html=html.replace("@al","view");js=leapclient.load("LEAP/Studio/Template/JavaScript/view.js");}}}js=" "+showmodulename+" = "+js.replace("@showmodulename","").replace("@datamodulename",datamodulename);
html=html.replace("@content",content);html=LEAP.dynamodule.moduleheader.replace("@showmodulename",showmodulename)+html;def={js:js,html:html};with(window){eval(js);}LEAP.dynamodule.cache.add(showmodulename,def);}var ret=LEAP.loadModule(null,parent,null,null,def.html);return ret;};LEAP.dynamodule.innerBuild=function(R,Q){if(R==null||R.length==0){return ;
}var S=R.length;var F=new StringBuffer();var N=[];for(var T=0;T<S;T++){var X=R[T];var Y=X.name.toLowerCase().Trim();if(Y=="id"||Y=="gispid"||Y=="shape"||Y=="objectid"){continue;}var W=X.cnname;var K=X.field.isnullable;var E=X.field.minsize;var V=X.field.maxsize;var O=X.field.measuerunit;var M=X.field.remarks;
var I=X.field.datatype;var A=X.field.codetype;var B=false;var P="";var J=null;var L=W;if(L==null||L.Trim()==""){L=Y;}var G=null;if(Q==1||Q==2){if(Y=="areaid"){G=LEAP.controls.area;B=true;}else{if(Y=="照片"||Y=="photos"||Y=="photos"){G=LEAP.controls.pohots.replace("@md",Y);P="230px";B=true;}else{if(I==91||I==93||I==92){G=LEAP.controls.date.replace("@md",Y);
}else{if(A!=null){J=LEAP.getCodeValue(A);if(J!=null){if(J.length<3){G=LEAP.controls.radio.replace("@md",Y).replace("@code",A);G=LEAP.dynamodule.buildRadioItem(G,J);}else{if(J.length<7){G=LEAP.controls.radio.replace("@md",Y).replace("@code",A);G=LEAP.dynamodule.buildRadioItem(G,J);B=true;}else{G=LEAP.controls.select.replace("@md",Y).replace("@code",A);
G=LEAP.dynamodule.buildSelectItem(G,J);}}}else{G=LEAP.controls.text.replace("@md",Y).replace("@code",A);}}else{if(V>300){G=LEAP.controls.textarea.replace("@md",Y).replace("@code",A);B=true;P="52px";}else{if(O==null||O.Trim()==""){G=LEAP.controls.text.replace("@md",Y).replace("@code",A);}else{G=LEAP.controls.textunit.replace("@md",Y).replace("@unit",O);
}}}}}}var U=new StringBuffer();if(E!=null&&J==null){U.append("minlen:"+E.toString(10));}if(V!=null&&J==null){U.append("maxlen:"+V.toString(10));}if(K!=null&&K==0){U.append("notnull:true");}if(I==2||I==3||I==6||I==7||I==8){U.append("isnumber:true");}if(I==4||I==5||I==-6||I==-5){U.append("isint:true");
}G=G.replace("@check",U.toString());}else{if(Q==3){if(Y=="areaid"){G=LEAP.controls.area;B=true;}else{if(Y=="照片"||Y=="photos"||Y=="photos"){G=LEAP.controls.pohots.replace("@md",Y);P="230px";B=true;}else{if(V>300){B=true;P="52px";}if(O==null||O.Trim()==""){G=LEAP.controls.view.replace("@md",Y);}else{G=LEAP.controls.viewunit.replace("@md",Y).replace("@unit",O);
}if(I==91||I==92||I==93){G=G.replace("@bt","date");}else{G=G.replace("@bt","text");}G=G.replace("@height",P);G=G.replace("@check","");}}}}N.add({control:G,def:X,text:L,oneline:B,height:P});}var S=N.length;var H=[];for(var T=0;T<S;T++){var G=N[T];if(Q<4){if(G.oneline){H.add([G]);}else{if(H.length==0){H.add([G]);
}else{if(H[H.length-1].length==2){H.add([G]);}else{if(H[H.length-1].length==1&&H[H.length-1][0].oneline){H.add([G]);}else{H[H.length-1].add(G);}}}}}}var S=H.length;for(var T=0;T<S;T++){var D=H[T];var C="";if(D.length==2){if(Q==1||Q==2){C=LEAP.dynamodule.x.replace("@control",D[0].control).replaceall("@name",D[0].text).replace("@colspan",1);
C+=LEAP.dynamodule.x.replace("@control",D[1].control).replaceall("@name",D[1].text).replace("@colspan",1);}else{if(Q==3){C=LEAP.dynamodule._x.replace("@control",D[0].control).replaceall("@name",D[0].text).replace("@colspan",1);C+=LEAP.dynamodule._x.replace("@control",D[1].control).replaceall("@name",D[1].text).replace("@colspan",1);
}}}else{C=LEAP.dynamodule.x.replace("@control",D[0].control).replaceall("@name",D[0].text).replace("@colspan",3);}C=LEAP.dynamodule.y.replace("@rowsn",T+1).replace("@rowheight",D[0].height).replace("@row",C);F.append(C);}return LEAP.dynamodule.z.replace("@tbody",F.toString("\n"));};LEAP.dynamodule.buildRadioItem=function(E,B){if(B==null){return E;
}var A=B.length;var G=new StringBuffer();var D=0;for(var C=0;C<A;C++){var F=B[C];G.append(LEAP.dynamodule.radioitem.replace("@value",F.codeid).replace("@name",F.codevalue));if(F.codevalue!=null){D+=F.codevalue.length;}}if(D>14){E=E.replace("cell2","cell1");}B=null;return E.replace(LEAP.dynamodule.itemflag,G.toString());
};LEAP.dynamodule.buildSelectItem=function(D,B){if(B==null){return D;}var A=B.length;var F=new StringBuffer();for(var C=0;C<A;C++){var E=B[C];F.append(LEAP.dynamodule.selectitem.replace("@value",E.codeid).replace("@name",E.codevalue));}B=null;return D.replace(LEAP.dynamodule.itemflag,F.toString());};
LEAP.dynamodule.S_z='<TABLE class="devtable devtableext " style="WIDTH: 100%; HEIGHT: 100%" cellSpacing=0 cellPadding=0 border=0 ct="devtable" devtable="lg"><TBODY class=""><TR class="devtablexrow "><TD class="devtablexycell " style="WIDTH: 20px"></TD><TD class="devtablexcell " style="WIDTH: 100px">A</TD><TD class="devtablexcell " style="WIDTH: 25px">B</TD><TD class=devtablexcell>C</TD></TR><TR><TD class="devtableycell " style="HEIGHT: 70%">1</TD><TD class="" style="OVERFLOW: auto" rowSpan=2><DIV class=studio_selected style="OVERFLOW: auto; WIDTH: 100%; HEIGHT: 100%" ut="props" dev="lg">@props</DIV></TD><TD class="" style="VERTICAL-ALIGN: middle; TEXT-ALIGN: center" rowSpan=2 ut="btns"><DIV class="table_project_menu_new table_project_menuicon " title=新增查询条件 ut="btnnew" dev="lg"></DIV><DIV class="table_project_menu_newbefore table_project_menuicon " title=新增排序条件 ut="btnsort" dev="lg"></DIV><DIV class="table_project_menu_refresh table_project_menuicon " title=刷新,删除所有条件 ut="btnref" dev="lg"></DIV></TD><TD class="" style="VERTICAL-ALIGN: top; OVERFLOW: auto; TEXT-ALIGN: left"><DIV class="" style="OVERFLOW: auto; WIDTH: 100%; HEIGHT: 100%" ut="pars" dev="lg"><TABLE class="devtable devtableext" style="WIDTH: 100%" cellSpacing=0 cellPadding=0 border=0 ct="devtable" devtable="lg"><TBODY><TR class=devtablexrow><TD class="devtablexcell " style="WIDTH: 70px">A</TD><TD class="devtablexcell " style="WIDTH: 100px">B</TD><TD class="devtablexcell " style="WIDTH: 70px">C</TD><TD class="devtablexcell ">D</TD><TD class="devtablexcell " style="WIDTH: 25px">E</TD></TR><TR><TD class="">和/或</TD><TD class="">字段</TD><TD class="">运算符</TD><TD class="">值</TD><TD>删除</TD></TR></TBODY></TABLE></DIV></TD></TR><TR><TD class="devtableycell " style="HEIGHT: 30%">2</TD><TD class="" style="VERTICAL-ALIGN: top; OVERFLOW: auto; TEXT-ALIGN: left"><DIV class="" style="OVERFLOW: auto; WIDTH: 100%; HEIGHT: 100%" ut="shorts" dev="lg"><TABLE class="devtable devtableext" style="WIDTH: 100%" cellSpacing=0 cellPadding=0 border=0 ct="devtable" devtable="lg"><TBODY><TR class=devtablexrow><TD class="devtablexcell " style="WIDTH: 100px">A</TD><TD class="devtablexcell ">B</TD><TD class="devtablexcell " style="WIDTH: 25px">C</TD></TR><TR><TD class="">顺序</TD><TD class=studio_selected>字段</TD><TD>删除</TD></TR></TBODY></TABLE></DIV></TD></TR><TR><TD class="devtableycell " style="HEIGHT: 18px">3</TD><TD class="" style="VERTICAL-ALIGN: bottom; TEXT-ALIGN: right" colSpan=3><DIV class=button_frame style="FLOAT: right" ct="button"><A class=button href="javascript:void(0)"><P></P><SPAN class="" ut="submit" ctf="button" ht="button">确定</SPAN> </A></DIV><DIV class=button_frame style="FLOAT: right" ct="button"><A class=button href="javascript:void(0)"><P></P><SPAN class="" ut="btnclose" ctf="button" ht="button">关闭</SPAN> </A></DIV><DIV class="button_frame " style="FLOAT: right" ct="button"><A class="button " href="javascript:void(0)"></A></DIV><DIV class=button_frame style="FLOAT: right" ct="button"><A class=button href="javascript:void(0)"><P></P><SPAN class="" ut="gissearch" ctf="button" ht="button">地图搜索</SPAN></A></DIV></TD></TR></TBODY></TABLE>';
LEAP.dynamodule.S_y='<div class="advancesearch" style="height:20px;width:100%;cursor:pointer;margin-top:5px;border-width:1px;border-color:green;" text="@text" mdname="@md" datatype="@datatype" codetype="@code">@text</div>';LEAP.dynamodule.S_cache=new hashtable();LEAP.dynamodule.buildAdvanceSearch=function(modulename,fields,parent){if(modulename==null||modulename.Trim()==""){return ;
}var showmodulename="dynaadvancesearchmodule_"+modulename;var datamodulename=modulename;var def=null;if(LEAP.dynamodule.S_cache.contains(showmodulename)){def=LEAP.dynamodule.S_cache.getvalue(showmodulename);}else{var content=LEAP.dynamodule.innerBuildAdvanceSearch(modulename,fields);var html=null;html=LEAP.dynamodule.moduleheader.replace("@showmodulename",showmodulename)+content;
def={html:html};with(window){eval(showmodulename+" = LEAP.advanceSearch;");}LEAP.dynamodule.S_cache.add(showmodulename,def);}var ret=LEAP.loadModule(null,parent,null,null,def.html);ret.moduleName=modulename;return ret;};LEAP.dynamodule.innerBuildAdvanceSearch=function(J,G){if(J==null||J.Trim()==""){return ;
}var D=G.length;var C=new StringBuffer();var L=[];var C=new StringBuffer();for(var F=0;F<D;F++){var I=G[F];var A=I.name.toLowerCase();var N=I.cnname;var K=I.field.measuerunit;var E=I.field.datatype;var B=I.field.codetype;var O=null;var H=LEAP.dynamodule.S_y;var M=N;if(M==null||M.Trim()==""){M=A;}if(B!=null){O=LEAP.getCodeValue(B);
if(O!=null){H=H.replace("@code",B);}else{H=H.replace('codetype="@code"',"");}}else{H=H.replace('codetype="@code"',"");}H=H.replace("@datatype",E).replace("@md",A).replaceall("@text",M);C.append(H);}return LEAP.dynamodule.S_z.replace("@props",C.toString());};LEAP.advanceSearch=function(){this.z='<DIV ctf="radio_item"><LABEL class=radio_checked ischecked=true ctf="radio_label" value="0">顺序</LABEL></DIV><DIV ctf="radio_item"><LABEL class=radio_unchecked ctf="radio_label" value="1">倒序</LABEL></DIV>';
this.y='<DIV ctf="radio_item"><LABEL class=radio_checked ischecked=true ctf="radio_label" value="0">和</LABEL></DIV><DIV ctf="radio_item"><LABEL class=radio_unchecked ctf="radio_label" value="1">或</LABEL></DIV>';this.x='<DIV><A href="javascript:void(0)" ctf="select_item" value="2">包含</A></DIV><DIV><A href="javascript:void(0)" ctf="select_item" value="1">=</A></DIV><DIV><A href="javascript:void(0)" ctf="select_item" value="4">&gt;</A></DIV><DIV><A href="javascript:void(0)" ctf="select_item" value="5">&lt;</A></DIV><DIV><A href="javascript:void(0)" ctf="select_item" value="6">&ge;</A></DIV><DIV><A href="javascript:void(0)" ctf="select_item" value="7">&le;</A></DIV><DIV><A href="javascript:void(0)" ctf="select_item" value="8">&ne;</A></DIV><DIV><A href="javascript:void(0)" ctf="select_item" value="11">不包含</A></DIV><DIV><A href="javascript:void(0)" ctf="select_item" value="13">空</A></DIV><DIV><A href="javascript:void(0)" ctf="select_item" value="14">非空</A></DIV>';
this.w='<div class="table_project_menu_del table_project_menuicon" title="删除条件"></div>';this.moduleName=null;this.propclick=function(A){var B=LEAP.getElements(">div",this.getUT("props"));LEAP.setStyle(B,{border:""});LEAP.setStyle(A.caller,{border:"solid"});LEAP.setAttribute(B,"selected","0");LEAP.setAttribute(A.caller,"selected","1");
A=B=null;};this.getSelectedProps=function(){var D=LEAP.getElement(">div[selected=1]",this.getUT("props"));if(D!=null){var C=D.getAttribute("datatype");var A=D.getAttribute("mdname");var E=D.getAttribute("codetype");var F=D.getAttribute("text");D=null;var B={datatype:C,md:A,code:E,text:F};return B;}};
this.btnnew=function(){var B=this.getSelectedProps();if(B!=null){var D=LEAP.getElement(">table:first",this.getUT("pars"));var M=document.createElement("tr");var E=LEAP.getElement("tbody",D);if(E==null){return ;}E.appendChild(M);var K=document.createElement("td");var J=document.createElement("td");var I=document.createElement("td");
var G=document.createElement("td");var F=document.createElement("td");var C=B.datatype;var A=B.code;var H=B.md;M.setAttribute("md",H);J.innerHTML=B.text;K.innerHTML=LEAP.controls.radio.replace("@md","").replace("@code","").replace(LEAP.dynamodule.itemflag,this.y);if(C==91||C==92||C==93){G.innerHTML=LEAP.controls.date;
I.innerHTML=LEAP.controls.select2.replace("@selectvalue","6").replace("@md","").replace("@value",">=").replace("@code","").replace(LEAP.dynamodule.itemflag,this.x);M.setAttribute("controltype","date");}else{if(A!=null&&A.Trim()!=""){var L=LEAP.getCodeValue(A);if(L!=null){M.setAttribute("controltype","select");
G.innerHTML=LEAP.dynamodule.buildSelectItem(LEAP.controls.select,L);I.innerHTML=LEAP.controls.select2.replace("@selectvalue","1").replace("@md","").replace("@value","=").replace("@code","").replace(LEAP.dynamodule.itemflag,this.x);}else{if((C>=2&&C<=8)||C==-6||C==-5){I.innerHTML=LEAP.controls.select2.replace("@selectvalue","6").replace("@md","").replace("@value",">=").replace("@code","").replace(LEAP.dynamodule.itemflag,this.x);
}else{I.innerHTML=LEAP.controls.select2.replace("@selectvalue","2").replace("@md","").replace("@value","包含").replace("@code","").replace(LEAP.dynamodule.itemflag,this.x);}G.innerHTML=LEAP.controls.text;M.setAttribute("controltype","text");}}else{if((C>=2&&C<=8)||C==-6||C==-5){I.innerHTML=LEAP.controls.select2.replace("@selectvalue","6").replace("@md","").replace("@value",">=").replace("@code","").replace(LEAP.dynamodule.itemflag,this.x);
}else{I.innerHTML=LEAP.controls.select2.replace("@selectvalue","2").replace("@md","").replace("@value","包含").replace("@code","").replace(LEAP.dynamodule.itemflag,this.x);}G.innerHTML=LEAP.controls.text;M.setAttribute("controltype","text");}}F.innerHTML=this.w;M.appendChild(K);M.appendChild(J);M.appendChild(I);
M.appendChild(G);M.appendChild(F);this.addEvent(LEAP.getElement(">div:first",F),"click",this.btndel);F=K=J=I=G=M=D=E=B=null;}};this.btnsort=function(){var G=this.getSelectedProps();if(G!=null){var E=LEAP.getElement(">table:first",this.getUT("shorts"));var H=document.createElement("tr");var D=LEAP.getElement("tbody",E);
if(D==null){return ;}D.appendChild(H);var C=document.createElement("td");var A=document.createElement("td");var B=document.createElement("td");var F=G.md;H.setAttribute("md",F);A.innerHTML=this.w;B.innerHTML=G.text;C.innerHTML=LEAP.controls.radio.replace("@md",G.name).replace("@code",G.code).replace(LEAP.dynamodule.itemflag,this.z);
H.appendChild(C);H.appendChild(B);H.appendChild(A);this.addEvent(LEAP.getElement(">div:first",A),"click",this.btndel);C=B=H=E=D=G=null;}};this.btndel=function(A){A.caller.parentNode.parentNode.parentNode.deleteRow(A.caller.parentNode.parentNode.rowIndex);};this.btnref=function(A){LEAP.removeElement(LEAP.getElements(">table:first >tbody >tr:gt(1)",this.getUT("shorts")),true);
LEAP.removeElement(LEAP.getElements(">table:first >tbody >tr:gt(1)",this.getUT("pars")),true);};this.submit=function(O){var E=LEAP.getElements(">table:first >tbody >tr:gt(1)",this.getUT("shorts"));var H=LEAP.getElements(">table:first >tbody >tr:gt(1)",this.getUT("pars"));var F=new StringBuffer();if(E!=null&&E.length>0){var D=E.length;
for(var G=0;G<D;G++){var N=E[G];var K=N.getAttribute("md");var L=LEAP.radio.getValue(LEAP.getElement(">div",N.cells[0]));if(L!=1){F.append(K+" asc");}else{F.append(K+" desc");}}}var C=new StringBuffer();var I=new SearchParameters();if(H!=null&&H.length>0){var D=H.length;for(var G=0;G<D;G++){var N=H[G];
var M=LEAP.getValue(LEAP.getElement(">[ht] >[ct]",N.cells[3]));if(M==null||M.Trim()==""){continue;}var K=N.getAttribute("md");var J=null;var A=LEAP.getValue(LEAP.getElement(">div",N.cells[0]));if(A!=1){J="1";}else{J="2";}var B=LEAP.getValue(LEAP.getElement(">div",N.cells[2]));if(B==null||B.Trim()==""){B="1";
}J+=B;I.addParameter(K,M,J);}}I.setOrder(F.toString());if((I.parameters==null||I.parameters.length==0)&&(I.order==null||I.order.Trim()=="")){return ;}I.name=this.moduleName;if(O==true){return I;}this.fireEvent("onSubmit",I);this.hideForm();};this.gissearch=function(){var A=this.submit(true);this.fireEvent("onGisSubmit",A);
this.hideForm();};this.showGisSearch=function(){this.getUT("gissearch").parentNode.style.display="block";};this.btnclose=function(){this.hideForm();};this.pageLoad=function(){this.addEvent(LEAP.getElements(">div",this.getUT("props")),"click",this.propclick);this.addEvent(this.getUT("btnnew"),"click",this.btnnew);
this.addEvent(this.getUT("btnsort"),"click",this.btnsort);this.addEvent(this.getUT("btnref"),"click",this.btnref);this.addEvent(this.getUT("btnclose"),"click",this.btnclose);this.addEvent(this.getUT("submit"),"click",this.submit);this.addEvent(this.getUT("gissearch"),"click",this.gissearch);};};LEAP.button={};
LEAP.checkbox={};LEAP.checkbox.d="checkbox";LEAP.checkbox.init=function(){if(document!=null&&document.body!=null){LEAP.checkbox._init();}else{UIEventManager.addEvent(window,"load",LEAP.checkbox._init);}ElementEventManager.addManagedEventType(LEAP.checkbox.d,"valueChange");ElementEventManager.addManagedEventType(LEAP.checkbox.d,"clickItem");
};LEAP.checkbox._init=function(){LEAP.addEvent(document.body,"click",LEAP.checkbox.uiProcess,null,null,true);UIEventManager.removeEvent(window,"load",LEAP.checkbox._init);};LEAP.checkbox.uiProcess=function(K){var A=null;var H=null;var D=null;var J=null;var E=null;var G=null;var B=null;var C=null;var I=0;
try{A=K.e.srcElement;if(null==A){return ;}H=K.e.type;if(null==H){return ;}D=LEAP._match(A,LEAP.checkbox.d);if(null==D){return ;}if("checkbox_label"!=A.getAttribute("ctf")){return ;}if("1"==D.getAttribute("readonly")){return ;}J=D.getAttribute("cmax");E=D.getAttribute("cmin");if(null==J||""==J){J=0;}else{try{J=parseInt(J);
if(J<0){J=0;}}catch(F){J=0;}}if(null==E||""==E){E=0;}else{try{E=parseInt(E);if(E<0){E=0;}}catch(F){E=0;}}if(E>J){E=J;}G=LEAP.getElements("[ctf=checkbox_item]",D);if(null==G){return ;}if(null!=G){G=G.length;}if(E>G){E=G;}if(J>G){J=G;}if("click"==H){if("checkbox_disabled"==A.className){return ;}I=LEAP.checkbox.getCheckedCount(D);
if("checkbox_unchecked"==A.className){if(J==0||J>I){B=LEAP.checkbox.getValue(D,false);A.className="checkbox_checked";C=LEAP.checkbox.getValue(D,false);ElementEventManager.handleEvent(D,"valueChange",{newvalue:C,oldvalue:B});}}else{if(E<I){B=LEAP.checkbox.getValue(D,false);A.className="checkbox_unchecked";
C=LEAP.checkbox.getValue(D,false);ElementEventManager.handleEvent(D,"valueChange",{newvalue:C,oldvalue:B});}}ElementEventManager.handleEvent(D,"clickItem",{item:A});}}finally{C=B=G=J=E=D=A=K=H=null;}};LEAP.checkbox.getCheckedCount=function(D){var A=null;var C=0;try{D=LEAP._check(D,LEAP.checkbox.d);if(null==D){return C;
}A=LEAP.getElements("[ctf=checkbox_label]",D);if(null==A){return C;}for(var B=0;B<A.length;B++){if("checkbox_checked"==A[B].className){C++;}}B=null;return C;}finally{C=A=D=null;}};LEAP.checkbox.getNameByValue=function(C,D){var A=null;var B=null;try{C=LEAP._check(C,LEAP.checkbox.d);if(null==C){return null;
}A=LEAP.getElements("[ctf=checkbox_label]",C);if(null==A){return null;}for(B=0;B<A.length;B++){if(A[B].getAttribute("value").Trim()==D){return(LEAP.isIE?A[B].innerText:A[B].textContent);}}return null;}finally{B=C=null;}};LEAP.checkbox.getCheckedItem=function(C){var A=null;var B=null;var D=null;try{C=LEAP._check(C,LEAP.checkbox.d);
if(null==C){return null;}A=LEAP.getElements("[ctf=checkbox_label]",C);if(null==A){return null;}D=new hashtable();for(B=0;B<A.length;B++){if("checkbox_checked"==A[B].className){D.add(A[B].getAttribute("value").Trim(),(LEAP.isIE?A[B].innerText:A[B].textContent));}}return D.count>0?D:null;}finally{D=B=C=null;
}};LEAP.checkbox.getValue=function(C,A){var G=",";var I=null;var D=null;var H=null;var E=0;try{C=LEAP._check(C,LEAP.checkbox.d);if(null==C){return null;}H=LEAP.getElements("[ctf=checkbox_label]",C);if(null==H){return null;}if(null==A){A=false;}if(A){I=C.getAttribute("cmax");D=C.getAttribute("cmin");if(null==I||""==I){I=0;
}else{try{I=parseInt(I);if(I<0){I=0;}}catch(F){I=0;}}if(null==D||""==D){D=0;}else{try{D=parseInt(D);if(D<0){D=0;}}catch(F){D=0;}}if(D>I){D=I;}if(D>H.length){D=H.length;}if(I>H.length){I=H.length;}}for(var B=0;B<H.length;B++){if("checkbox_checked"==H[B].className){G+=H[B].getAttribute("value").Trim()+",";
E++;}}B=null;if(A){if(D!=0&&D>E){throw"最小选择项数为["+D+"],大于实际选择项数["+E+"]";}if(I!=0&&I<E){throw"最大选择项数为["+I+"],小于实际选择项数["+E+"]";}}return(","==G)?null:G.substring(0,G.length);}finally{A=E=D=I=H=G=C=null;}};LEAP.checkbox.setValue=function(D,E){var A=null;try{D=LEAP._check(D,LEAP.checkbox.d);if(null==D){return ;
}if(null==E||""==E){return ;}A=LEAP.getElements("[ctf=checkbox_label]",D);if(null==A){return ;}E=E.split(",");LEAP.checkbox.checkedAll(D,false);for(var C=0;C<E.length;C++){for(var B=0;B<A.length;B++){if("checkbox_disabled"==A[B].className){continue;}if(A[B].getAttribute("value").Trim()==E[C].Trim()){A[B].className="checkbox_checked";
break;}}B=null;}C=null;}finally{D=E=A=null;}};LEAP.checkbox.checkedAll=function(C,D){var A=null;try{C=LEAP._check(C,LEAP.checkbox.d);if(null==C){return ;}A=LEAP.getElements("[ctf=checkbox_label]",C);if(null==A){return ;}for(var B=0;B<A.length;B++){if("checkbox_disabled"==A[B].className){continue;}A[B].className=(D?"checkbox_checked":"checkbox_unchecked");
}B=null;}finally{D=C=A=null;}};LEAP.checkbox.addItem=function(C,B,E,D){var F=null;var A=null;try{C=LEAP._check(C,LEAP.checkbox.d);if(null==C){return ;}if(null==B||""==B){B="&nbsp;";}F=document.createElement("div");C.appendChild(F);F.className="checkbox_div";F.setAttribute("ctf","checkbox_item");A=document.createElement("label");
F.appendChild(A);A.setAttribute("ctf","checkbox_label");A.setAttribute("value",E);A.innerHTML=B;if("boolean"==typeof (D)){if(D){A.className="checkbox_checked";}else{A.className="checkbox_unchecked";}}else{A.className="checkbox_disabled";}}finally{F=A=C=B=E=D=null;}};LEAP.checkbox.removeItems=function(C,A,D){var E=null;
try{C=LEAP._check(C,LEAP.checkbox.d);if(null==C){return ;}E=LEAP.getElements("[ctf=checkbox_label]",C);if(null==E){return ;}if(null!=A&&null!=D){for(var B=0;B<E.length;B++){if(E[B].getAttribute("value")==D&&E[B].innerHTML==A){C.removeChild(E[B].parentNode);}}B=null;}else{if(null!=A){for(var B=0;B<E.length;
B++){if(E[B].innerHTML==A){C.removeChild(E[B].parentNode);}}B=null;}else{if(null!=D){for(var B=0;B<E.length;B++){if(E[B].getAttribute("value")==D){C.removeChild(E[B].parentNode);}}B=null;}else{for(var B=0;B<E.length;B++){C.removeChild(E[B].parentNode);}B=null;}}}}finally{E=C=A=D=null;}};LEAP.checkbox.setDisabled=function(C,F,A,D){var E=null;
try{C=LEAP._check(C,LEAP.checkbox.d);if(null==C){return ;}if("boolean"!=typeof (F)){return ;}if(null!=A&&null!=D){E=LEAP.getElements("[ctf=checkbox_label]",C);if(null!=E){for(var B=0;B<E.length;B++){if(E[B].getAttribute("value")==D&&E[B].innerHTML==A){if(F){E[B].className="checkbox_disabled";}else{E[B].className="checkbox_unchecked";
}}}B=null;}}else{if(null!=A){E=LEAP.getElements("[ctf=checkbox_label]",C);if(null!=E){for(var B=0;B<E.length;B++){if(E[B].innerHTML==A){if(F){E[B].className="checkbox_disabled";}else{E[B].className="checkbox_unchecked";}}}B=null;}}else{if(null!=D){E=LEAP.getElements("[ctf=checkbox_label]",C);if(null!=E){for(var B=0;
B<E.length;B++){if(E[B].getAttribute("value")==D){if(F){E[B].className="checkbox_disabled";}else{E[B].className="checkbox_unchecked";}}}B=null;}}}}}finally{E=C=A=D=null;}};LEAP.checkbox.setReadOnly=function(A,B){try{A=LEAP._check(A,LEAP.checkbox.d);if(null==A){return ;}if(B){A.setAttribute("readonly","1");
}else{A.setAttribute("readonly","0");}}finally{A=B=null;}};LEAP.checkbox.init();LEAP.input={};LEAP.input.init=function(){if(document!=null&&document.body!=null){LEAP.menu._init();}else{UIEventManager.addEvent(window,"load",LEAP.input._init);}};LEAP.input._init=function(){LEAP.addEvent(document.body,"click",LEAP.input.uiProcess,null,null,true);
LEAP.addEvent(document.body,"keyup",LEAP.input.uiProcess,null,null,true);if(LEAP.isIE){LEAP.addEvent(document.body,"focusin",LEAP.input.uiProcess,null,null,true);}else{document.addEventListener("focus",LEAP.input.uiProcess,true);}var A=document.createElement("div");A.id="leap___autocomplate_div_cons";
A.style.display="none";A.style.position="absolute";A.style.overflow="auto";A.style.height="50px";A.style.backgroundColor="white";A.style.borderColor="#CBCBCB";A.style.borderWidth="1px";A.style.borderTopWidth="0px";A.style.borderStyle="solid";A.style.textAlign="left";document.body.appendChild(A);LEAP.addEvent(A,"mouseover",LEAP.input.uiProcess,null,null,true);
LEAP.addEvent(A,"mouseout",LEAP.input.uiProcess,null,null,true);window.setInterval(LEAP.input.save,1000*30);A=null;};LEAP.input.save=function(){try{if(LEAP.input.t!=null){var C=new String(document.cookie);var B=new Date();B.setTime(B.getTime()+30*24*3600000);document.cookie="autocomplate="+JSON.stringify(LEAP.input.t).replaceall(";","|")+";expires="+B.toGMTString();
}}catch(A){}};LEAP.input.uiProcess=function(arg){var e=null;var src=null;var k=null;var type=null;if(arg!=null&&arg.e!=null&&arg.e.type!=null){type=arg.e.type;}try{if(type!=null){src=arg.e.srcElement;e=arg.e;if(LEAP.isIE){k=e.keyCode;}else{k=e.which;}}else{e=arg;src=arg.target;k=e.which;}type=e.type;
if(src==null||src.getAttribute==null){return ;}if(type=="click"){if(src.getAttribute("ctf")=="leap___autocomplate_item"){var element=LEAP._match(src,"leap___autocomplate_div_cons","id");if(element!=null){var last=null;if((last=LEAP.getElement(element.getAttribute("lastctid")))!=null){last.value=src.getAttribute("_value");
last.focus();last=null;element.style.display="none";}element=null;return ;}}}if(type=="keyup"&&(k==38||k==40||k==13)&&LEAP.getElement("#leap___autocomplate_div_cons").style.display!="none"){var element=LEAP.getElement("#leap___autocomplate_div_cons");if(k==13){var items=LEAP.getElements("div[ctf=leap___autocomplate_item]",element);
var s=-1;for(var i=0;i<items.length;i++){if(items[i].style.backgroundColor.toUpperCase()=="#B8E5FF"){items[i].style.backgroundColor="white";s=i;break;}}if(s!=-1){var last=null;if((last=LEAP.getElement(element.getAttribute("lastctid")))!=null){last.value=items[s]["_value"];last=null;element.style.display="none";
}last=null;}items=null;}else{var items=LEAP.getElements("div[ctf=leap___autocomplate_item]",element);var s=-1;for(var i=0;i<items.length;i++){if(items[i].style.backgroundColor.toUpperCase()=="#B8E5FF"){items[i].style.backgroundColor="white";s=i;break;}}if(s!=-1){if(items.length!=1){if(k==40){if(s==items.length-1){s=0;
}else{s+=1;}}else{if(k==38){if(s!=0){s-=1;}}}items[s].style.backgroundColor="#B8E5FF";var last=null;if((last=LEAP.getElement(element.getAttribute("lastctid")))!=null){last.value=items[s]["_value"];last=null;}last=null;}}else{items[0].style.backgroundColor="#B8E5FF";var last=null;if((last=LEAP.getElement(element.getAttribute("lastctid")))!=null){last.value=items[0]["_value"];
last=null;}last=null;}items=null;}element=null;return ;}if((type!="click"||(type=="click"&&type.toLowerCase()=="text"&&src.getAttribute("auto_complate")=="1")||type=="focusin"||type=="focus"||type=="keyup")&&src.tagName=="INPUT"&&src.type.toLowerCase()=="text"&&src.getAttribute("auto_complate")=="1"){var items=null;
var md=src.getAttribute("md");if(md==null){var element=LEAP.getElement("#leap___autocomplate_div_cons");element.style.display="none";element=null;return ;}try{if(LEAP.input.t==null){var cookieString=new String(document.cookie);if(cookieString.indexOf("autocomplate=")>-1){if(LEAP.input.t==null){var strings=cookieString.split(";");
for(var i=0;i<strings.length;i++){var string=strings[i];if(string.indexOf("autocomplate=")>-1){var object=eval("("+string.substring(cookieString.indexOf("autocomplate=")+13).replaceall("|",";")+")");if(object!=null){LEAP.input.t=object;}break;}}}}}}catch(err){}if(LEAP.input.t==null){LEAP.input.t=new Object();
}if(LEAP.input.t[md]==null){LEAP.input.t[md]=[];}items=LEAP.input.t[md];var element=LEAP.getElement("#leap___autocomplate_div_cons");var last=null;if((last=LEAP.getElement(element.getAttribute("lastctid")))!=null&&src!=last){var _md=last.getAttribute("md");if(_md==null){return ;}var _v=last.value.Trim();
if(_v!=null&&_v!=""){if(!LEAP.input.t[_md].contains(_v)){LEAP.input.t[_md].add(_v);if(LEAP.input.t.length>8){LEAP.input.t.removeindex(0);}}}}var v=src.value.Trim();if(items!=null&&items.length>0){var tempitems=[];items.sort();if(v==""){var l=items.length;for(var i=0;i<l;i++){tempitems.add("<div _value='"+items[i]+"' ctf='leap___autocomplate_item' style='width:100%;'>"+items[i].replace(v,"<strong ctf='leap___autocomplate_item_strong'>"+v+"</strong>")+"</div>");
}}else{var l=items.length;for(var i=0;i<l;i++){if(items[i].indexOf(v)>-1&&items[i]!=v){tempitems.add("<div _value='"+items[i]+"' ctf='leap___autocomplate_item' style='width:100%;'>"+items[i].replace(v,"<strong ctf='leap___autocomplate_item_strong'>"+v+"</strong>")+"</div>");}}}if(tempitems.length>0){LEAP.input.t[md]=items;
var html=tempitems.join("\n");var cons=LEAP.getElement("#leap___autocomplate_div_cons");cons.innerHTML="";cons.innerHTML=html;cons.style.display="block";var p=LEAP.getAbsolutePos(src);cons.style.left=p.x+"px";cons.style.width=src.offsetWidth;cons.style.top=p.y+src.offsetHeight+"px";if(src.getAttribute("ctid")==null){var id=UUID.cID();
src.setAttribute("ctid",id);}cons.setAttribute("lastctid","[ctid="+src.getAttribute("ctid")+"]");cons=null;}else{var cons=LEAP.getElement("#leap___autocomplate_div_cons");cons.innerHTML="";cons.style.display="none";if(src.getAttribute("ctid")==null){var id=UUID.cID();src.setAttribute("ctid",id);}cons.setAttribute("lastctid","[ctid="+src.getAttribute("ctid")+"]");
}}else{var cons=LEAP.getElement("#leap___autocomplate_div_cons");cons.innerHTML="";cons.style.display="none";if(src.getAttribute("ctid")==null){var id=UUID.cID();src.setAttribute("ctid",id);}cons.setAttribute("lastctid","[ctid="+src.getAttribute("ctid")+"]");cons=null;}}else{var ctf=src.getAttribute("ctf");
if(ctf!="leap___autocomplate_item"&&ctf!="leap___autocomplate_item_strong"&&!(src.tagName=="INPUT"&&src.type.toLowerCase()=="text"&&src.getAttribute("auto_complate")=="1")){var cons=LEAP.getElement("#leap___autocomplate_div_cons");cons.innerHTML="";cons.style.display="none";var element=cons;var last=null;
if((last=LEAP.getElement(element.getAttribute("lastctid")))!=null){var _md=last.getAttribute("md");if(_md==null){return ;}var _v=last.value.Trim();if(_v!=null&&_v!=""){if(!LEAP.input.t[_md].contains(_v)){LEAP.input.t[_md].add(_v);if(LEAP.input.t.length>8){LEAP.input.t.removeindex(0);}}}}cons.removeAttribute("lastctid");
cons=null;}}if(type=="mouseover"){var ctf=src.getAttribute("ctf");if(ctf=="leap___autocomplate_item"||ctf=="leap___autocomplate_item_strong"){var element=LEAP._match(src,"leap___autocomplate_item","ctf");if(element!=null){element.style.backgroundColor="#B8E5FF";element.setAttribute("sel","1");element=null;
}}return ;}if(type=="mouseout"){var ctf=src.getAttribute("ctf");if(ctf=="leap___autocomplate_item"||ctf=="leap___autocomplate_item_strong"){var element=LEAP._match(src,"leap___autocomplate_div_cons","id");if(element!=null){var element=LEAP._match(src,"leap___autocomplate_item","ctf");if(element!=null){element.setAttribute("sel","0");
element.style.backgroundColor="white";element=null;}}}return ;}}finally{arg=e=src=k=type=null;}};LEAP.input.init();LEAP.tab={};LEAP.tab.d="tab";LEAP.tab._init=function(){LEAP.addEvent(document.body,"click",LEAP.tab.uiProcess,null,null,true);UIEventManager.removeEvent(window,"load",LEAP.tab._init);};LEAP.tab.init=function(){if(document!=null&&document.body!=null){LEAP.tab._init();
}else{UIEventManager.addEvent(window,"load",LEAP.tab._init);}ElementEventManager.addManagedEventType(LEAP.tab.d,"selectedIndexChange");}();LEAP.tab.uiProcess=function(M){var A=M.e.srcElement;var I=M.e.type;var N=A.tagName;var J=A.getAttribute(commfields.ctf);var G=A.getAttribute(commfields.ct);try{if(J==null||J!="tab_label"){return ;
}var D=A.className.split(" ").contains("hover");if(D){return ;}var B=LEAP._match(A,LEAP.tab.d);if(B==null){return ;}var F=LEAP.getElements(">li[ctf=tab_label]",A.parentNode);var H=-1;var C=F.length;var L=-1;var K=false;for(var E=0;E<C;E++){if(F[E].getAttribute("ctf")!="tab_label"){continue;}L++;if(F[E]==A){K=true;
break;}}if(K){H=L;}LEAP.tab.setSelectedIndex(B,H);F=null;}finally{A=M=null;}};LEAP.tab.getSelectedIndex=function(D){D=LEAP._check(D,LEAP.tab.d);if(D==null){return ;}if(D==null){return ;}var F=LEAP.getElements(">div:first>UL>LI[ctf=tab_label]",D);var B=-1;var A=F.length;var E=[];for(var C=0;C<F.length;
C++){if(F[C].getAttribute("ctf")=="tab_label"){E.add(F[C]);}}for(var C=0;C<A;C++){if(F[C].className.split(" ").contains("hover")){B=C;break;}}D=F=null;return B;};LEAP.tab.setSelectedIndex=function(C,A){if(A<0){return ;}C=LEAP._check(C,LEAP.tab.d);if(C==null){return ;}if(C==null){return ;}var F=LEAP.getElements(">div:first>UL>LI[ctf=tab_label]",C);
if(A>=F.lenght){return ;}var E=LEAP.getElements(">div:last>div",C);LEAP.removeCSS(F,"hover",true);LEAP.addCSS(F[A],"hover",false);var D=[];for(var B=0;B<E.length;B++){if(E[B].getAttribute("ctf")=="tab_content"){D.add(E[B]);}}LEAP.setStyle(D,{display:"none"},true);LEAP.setStyle(D[A],{display:""},false);
ElementEventManager.handleEvent(C,"selectedIndexChange",{tab:C,index:A});D=C=F=E=null;};LEAP.tree={};LEAP.tree.d="tree";LEAP.tree.e1="></div><input type='checkbox'></a><a href='javascript:void(0)' class='tree_item_title' style='color:@color'>@text</a>";LEAP.tree.e2="></div><input type='checkbox'></a><a href='javascript:void(0)' class='tree_item_title'>@text</a>";
LEAP.tree.e11="></div><a href='javascript:void(0)' style='color:@color' class='tree_item_title'>@text</a>";LEAP.tree.e21="></div><a href='javascript:void(0)' class='tree_item_title'>@text</a>";LEAP.tree.e3=" ctid='@id' ctf='tree_item'>";LEAP.tree.cf="<!--childs-->";LEAP.tree.e4=LEAP.tree.cf+"</li>";LEAP.tree.e5="<li ctid='@id' _value='@value' _value2='@value2' _value3='@value3' _value4='@value4' ctf='tree_item'>";
LEAP.tree.e5_2="<li treestyle2=1 ctid='@id' _value='@value' _value2='@value2' _value3='@value3' _value4='@value4' ctf='tree_item'>";LEAP.tree.e6="<a class='tree_item_pre'><label class='tree_child'></label><div";LEAP.tree.e7="<h3 class='tree_02_opened_bg'>";LEAP.tree.e72="<h3 class='tree_02_opened_bg2'>";
LEAP.tree.e8="</h3>";LEAP.tree._init=function(){LEAP.addEvent(document.body,"click",LEAP.tree.uiProcess,null,null,true);LEAP.addEvent(document.body,"dblclick",LEAP.tree.uiProcess,null,null,true);UIEventManager.removeEvent(window,"load",LEAP.tree._init);};LEAP.tree.init=function(){if(document!=null&&document.body!=null){LEAP.tree._init();
}else{UIEventManager.addEvent(window,"load",LEAP.tree._init);}ElementEventManager.addManagedEventType(LEAP.tree.d,"selectedItemChange");ElementEventManager.addManagedEventType(LEAP.tree.d,"itemInit");ElementEventManager.addManagedEventType(LEAP.tree.d,"checkedChanged");ElementEventManager.addManagedEventType(LEAP.tree.d,"doubleClick");
}();LEAP.tree.uiProcess=function click(B){var G=B.e.srcElement;var E=B.e.type;var A=G.tagName;var D=G.getAttribute(commfields.ct);var F=LEAP._match(G,"tree_item","ctf",99);if(F!=null){var C=null;if(D==LEAP.tree.d){C=G;}else{C=LEAP._match(F,LEAP.tree.d,null,99);}if(C==null){return ;}if(E=="click"){if(A=="LABEL"||A=="H3"){if((A=="LABEL"&&G.className=="tree_opened")||(A=="H3"&&G.className=="tree_02_opened_bg")){if(A=="LABEL"){G.className="tree_closed";
if(F.getAttribute("treestyle2")=="1"){G.parentNode.parentNode.className="tree_02_closed_bg";}}else{if(A=="H3"){G.className="tree_02_closed_bg";LEAP.getElement(">a>label:first",G).className="tree_closed";}}LEAP.setStyle(LEAP.getElements(">ul",F),{display:"none"},true);}else{if((A=="LABEL"&&G.className=="tree_closed")||(A=="H3"&&G.className=="tree_02_closed_bg")){if(A=="LABEL"){G.className="tree_opened";
if(F.getAttribute("treestyle2")=="1"){G.parentNode.parentNode.className="tree_02_opened_bg";}}else{if(A=="H3"){G.className="tree_02_opened_bg";LEAP.getElement(">a>label:first",G).className="tree_opened";}}LEAP.setStyle(LEAP.getElements(">ul",F),{display:"block"},true);if(F.getAttribute("init")==false||F.getAttribute("init")=="false"){if(F.getAttribute("ctid")==null){F.setAttribute("ctid",UUID.cID());
}F.setAttribute("init",true);ElementEventManager.handleEvent(C,"itemInit",{tree:C,value:F.getAttribute("_value"),value2:F.getAttribute("_value2"),value3:F.getAttribute("_value3"),value4:F.getAttribute("_value4"),item:"[ctid="+F.getAttribute("ctid")+"]"});}}}}if(A=="INPUT"){ElementEventManager.handleEvent(C,"checkedChanged",{tree:C,item:"[ctid="+F.getAttribute("ctid")+"]",value:F.getAttribute("_value"),value2:F.getAttribute("_value2"),value3:F.getAttribute("_value3"),value4:F.getAttribute("_value4"),checked:G.checked});
}if(A=="A"){LEAP.tree.setSelectedItem(C,F);}C=null;}else{if(E=="dblclick"){if(A=="A"){ElementEventManager.handleEvent(C,"doubleClick",{tree:C,value:F.getAttribute("_value"),value2:F.getAttribute("_value2"),value3:F.getAttribute("_value3"),value4:F.getAttribute("_value4"),item:"[ctid="+F.getAttribute("ctid")+"]"});
}}}}G=E=A=B=D=F=null;};LEAP.tree.expandNode=function(B){if(B==null){return ;}if(typeof (B)=="string"){B=LEAP.getElement(B);}if(B==null){return ;}var A=LEAP.getElement("a>label:first",B);if(A!=null){A.className="tree_opened";}B=A=null;};LEAP.tree.closeNode=function(B){if(B==null){return ;}if(typeof (B)=="string"){B=LEAP.getElement(B);
}if(B==null){return ;}var A=LEAP.getElement("a>label:first",B);if(A!=null){A.className="tree_closed";}B=A=null;};LEAP.tree.addItems=function(E,S,F){if(F==null){return ;}E=LEAP._check(E,LEAP.tree.d);if(E==null){return ;}var J=S==null;if(S==null){S=E;}else{if(typeof (S)=="string"){S=LEAP.getElement(S);
}if(S==null){return ;}var P=LEAP.getElement("ul:first",S);if(P==null){P=document.createElement("UL");S.appendChild(P);var N=S;if(S.getAttribute("treestyle2")=="1"){N=LEAP.getElement(">h3:first",S);}LEAP.getElement("a>label:first",N).className="tree_opened";S=null;S=P;P=null;}else{S=null;S=P;P=null;}}var X=false;
if(J){X=LEAP.hasCSS(E,"tree_02");}var B=new StringBuffer();var c=[];var I=LEAP.tree.e1;var H=LEAP.tree.e2;var A=!(E.getAttribute("showcheck")!="1");if(!A){I=LEAP.tree.e11;H=LEAP.tree.e21;}var C=null;if(F!=null&&F[0].syscode!=null){C=new hashtable();}var M=F.length;for(var W=0;W<M;W++){var Q=F[W];var O=Q.text;
var V=Q.value;var D=Q.fontColor;var Z=Q.icon;if(X&&(Z==null||Z.Trim()=="")){if(!Q.hasChild){Z="LEAP/Resource/images/itemstyle/tree/rootnode2.gif";}else{Z="LEAP/Resource/images/itemstyle/tree/rootnode1.gif";}}var Y=Q.hasChild;var G=Q.showCheck;if(G==null){G=A;}else{if(G!=true){G=false;}}var b=I;var a=H;
if(A!=G){if(G){I=LEAP.tree.e1;H=LEAP.tree.e2;}else{b=LEAP.tree.e11;a=LEAP.tree.e21;}}if(O==null){continue;}var U=null;if(Q.ctid==null){Q.ctid=U=UUID.cID();}else{U=Q.ctid;}var R=null;if(D==null){R=a;}else{R=b.replace("@color",D);}R=R.replace("@text",O);if(Z!=null){if(Z.indexOf("http://")==-1){Z=PublishServerConfig.URL+"/"+Z;
}R=" style='background-image: url("+Z+")'"+R;}R=LEAP.tree.e6+R;if(Y==true){R=R.replace("tree_child","tree_closed");}if(!X){R=LEAP.tree.e5+R;}else{if(Q.hasChild){R=LEAP.tree.e5_2+LEAP.tree.e7+R;}else{R=LEAP.tree.e5_2+LEAP.tree.e72+R;}}if(V!=null){R=R.replace("@value",V);}else{R=R.replace("@value","");
}if(Q.value2!=null){R=R.replace("@value2",Q.value2);}else{R=R.replace("@value2","");}if(Q.value3!=null){R=R.replace("@value3",Q.value3);}else{R=R.replace("@value3","");}if(Q.value4!=null){R=R.replace("@value4",Q.value4);}else{R=R.replace("@value4","");}if(!X){R=R+LEAP.tree.e4;}else{R=R+LEAP.tree.e8+LEAP.tree.e4;
}R=R.replace("@id",U);if(Y){R=R.replace("<li ",'<li init="false" ');}if(C==null){B.append(R);B.append("\n");}else{var L=LEAP.getRealSyscode(Q.syscode);Q._html=R;if(L!=null){Q._syscode=L;Q._issys=true;C.add(L,Q);}else{Q._syscode=UUID.cID();Q._issys=false;C.add(Q._syscode,Q);}}c.push("[ctid="+U+"]");Q=O=V=D=Z=R=U=null;
}if(C==null){S.innerHTML=B.toString();}else{for(var W=M-1;W>-1;W--){var Q=F[W];var L=Q._syscode;if(Q._issys==true){var T=LEAP.getParentSyscode(L);if(T!=null){var K=C.getvalue(T);if(K!=null){Q._html=Q._html.replace(LEAP.tree.cf,"");if(K.hassetul!=true){K.hassetul=true;K._html=K._html.replace("tree_child","tree_opened").replace(LEAP.tree.cf,"<UL>"+LEAP.tree.cf+"</UL>");
}K._html=K._html.replace(LEAP.tree.cf,LEAP.tree.cf+Q._html);F[W]=null;}}}}for(var W=0;W<M;W++){var Q=F[W];if(Q==null){continue;}B.append(Q._html);}S.innerHTML=B.toString();}try{return c;}finally{E=S=F=B=c=null;}};LEAP.tree.addItem=function(C,M,K,O,B,Q,P,D,I,H,G){C=LEAP._check(C,LEAP.tree.d);if(C==null){return ;
}if(K==null){return ;}var R=document.createElement("LI");R[commfields.ctf]="tree_item";var A=!(C.getAttribute("showcheck")!="1");if(D==null){D=A;}else{if(D!=true){D=false;}}var N=UUID.cID();R.setAttribute("ctid",N);R.setAttribute("ctf","tree_item");if(O!=null){R.setAttribute("_value",O);}if(I!=null){R.setAttribute("_value2",I);
}if(H!=null){R.setAttribute("_value3",H);}if(G!=null){R.setAttribute("_value4",G);}var F=LEAP.tree.e1;var E=LEAP.tree.e2;if(C.getAttribute("showcheck")!="1"&&D==false){F=LEAP.tree.e11;E=LEAP.tree.e21;}var L=null;if(B==null){L=E;}else{L=F.replace("@color",B);}L=L.replace("@text",K);if(Q!=null){if(Q.indexOf("http://")==-1){Q=PublishServerConfig.URL+"/"+Q;
}L=" style='background-image: url("+Q+")'"+L;}L=LEAP.tree.e6+L;if(P==true){L=L.replace("tree_child","tree_closed");}R.setAttribute("init",false);R.innerHTML=L;if(M==null){C.appendChild(R);}else{if(typeof (M)=="string"){M=LEAP.getElement(M);}if(M==null){return ;}var J=LEAP.getElement("ul:first",M);if(J==null){J=document.createElement("UL");
M.appendChild(J);LEAP.getElement("a>label:first",M).className="tree_opened";M=null;M=J;J=null;}else{M=null;M=J;J=null;}M.appendChild(R);}L=C=M=K=O=B=Q=null;return"[ctid="+N+"]";};LEAP.tree.getValue=function(A){if(A==null){return ;}if(typeof (A)=="string"){A=LEAP.getElement(A);}if(A==null){return ;}return A.getAttribute("_value");
};LEAP.tree.getValue2=function(B){if(B==null){return ;}if(typeof (B)=="string"){B=LEAP.getElement(B);}if(B==null){return ;}var A={value:B.getAttribute("_value"),value2:B.getAttribute("_value2"),value3:B.getAttribute("_value3"),value4:B.getAttribute("_value4")};return A;};LEAP.tree.getValues=function(E){E=LEAP._check(E,LEAP.tree.d);
if(E==null){return ;}var B=LEAP.getElements("li[ctf=tree_item]",E);if(B!=null){var C=[];var A=B.length;for(var D=0;D<A;D++){C.add(B[D].getAttribute("_value"));}}B=E=null;return C;};LEAP.tree.getItemByValue=function(B,D){if(D==null){return ;}B=LEAP._check(B,LEAP.tree.d);if(B==null){return ;}if(D==null){return ;
}var C=LEAP.getElement("li[ctf=tree_item][_value="+D+"]",B);if(C==null){return ;}var E=C.getAttribute("ctid");if(E==null){E=UUID.cID();C.setAttribute("ctid",E);}var A="[ctid="+E+"]";C=null;return A;};LEAP.tree.getChild=function(F){if(F==null){return ;}if(typeof (F)=="string"){F=LEAP.getElement(F);}if(F==null){return ;
}var E=F[commfields.ct]==LEAP.tree.d;if(F[commfields.ctf]=="tree_item"||E){var C=null;if(!E){C=LEAP.getElement("ul:first",F);}else{C=F;}if(C==null){return null;}else{var D=LEAP.getElements(">li[ctf=tree_item]",C);if(D!=null){var A=[];for(var B=0;B<D.length;B++){if(D[B].getAttribute("ctid")==null){D[B].setAttribute("ctid",UUID.cID());
}A.push("[ctid="+D[B].getAttribute("ctid")+"]");}try{return A;}finally{D=null;A=null;F=null;}}}}F=null;};LEAP.tree.getAllChild=function(F){if(F==null){return ;}if(typeof (F)=="string"){F=LEAP.getElement(F);}if(F==null){return ;}var E=F[commfields.ct]==LEAP.tree.d;if(F[commfields.ctf]=="tree_item"||E){var C=null;
if(!E){C=LEAP.getElement("ul:first",F);}else{C=F;}if(C==null){return null;}var D=LEAP.getElements("li[ctf=tree_item]",C);if(D!=null){var A=[];for(var B=0;B<D.length;B++){if(D[B].getAttribute("ctid")==null){D[B].setAttribute("ctid",UUID.cID());}A.push("[ctid="+D[B].getAttribute("ctid")+"]");}try{return A;
}finally{D=null;A=null;F=null;}}}F=null;};LEAP.tree.dispose=function(A){if(item==null){return ;}A=LEAP._check(A,LEAP.tree.d);if(A==null){return ;}LEAP.removeElement(A);};LEAP.tree.isExpand=function(C){if(C==null){return false;}if(typeof (C)=="string"){C=LEAP.getElement(C);}if(C==null){return false;}var A=C;
if(C.getAttribute("treestyle2")=="1"){A=LEAP.getElement(">h3:first",C);}var B=LEAP.getElement("a>label:first",A);if(B!=null&&B.className=="tree_opened"){B=C=null;return true;}return false;};LEAP.tree.removeItem=function(B,E,A){if(E==null){return ;}B=LEAP._check(B,LEAP.tree.d);if(B==null){return ;}if(typeof (E)=="string"){E=LEAP.getElement(E);
}if(E==null){return ;}if(A==true){var D=LEAP.tree.getParent(E);var F=LEAP.tree.getChild(D);if(F!=null&&F.length==1){var C=LEAP.getElement("a>label:first",D);C.className="";F=C=null;}D=null;}LEAP.removeElement(E,false);B=E=null;};LEAP.tree.clearItem=function(A){A=LEAP._check(A,LEAP.tree.d);if(A==null){return ;
}A.innerHTML="";A=null;};LEAP.tree.setSelectedItem=function(C,D){if(C==null){return ;}C=LEAP._check(C,LEAP.tree.d);if(C==null){return ;}if(typeof (D)=="string"){D=LEAP.getElement(D);}if(D==null){C.removeAttribute("selected");LEAP.setAttribute(LEAP.getElements("a.tree_item_on",C),"className","");return ;
}if(D.getAttribute("ctid")==null){D.setAttribute("ctid",UUID.cID());}LEAP.setAttribute(LEAP.getElements("a.tree_item_on",C),"className","");var B=D;if(D.getAttribute("treestyle2")=="1"){B=LEAP.getElement(">h3:first",D);}LEAP.getElement(">a:last",B).className="tree_item_on";var A=C.getAttribute("selected");
C.setAttribute("selected",D.getAttribute("ctid"));if(A!=C.getAttribute("selected")){ElementEventManager.handleEvent(C,"selectedItemChange",{tree:C,value:D.getAttribute("_value"),value2:D.getAttribute("_value2"),value3:D.getAttribute("_value3"),value4:D.getAttribute("_value4"),item:"[ctid="+D.getAttribute("ctid")+"]"});
}C=D=null;};LEAP.tree.getSelectedItem=function(B){B=LEAP._check(B,LEAP.tree.d);if(B==null){return ;}var A=LEAP.getElement("a.tree_item_on",B);if(A!=null){var C=LEAP._match(A,"tree_item",commfields.ctf,99);if(C!=null){if(C.getAttribute("ctid")==null){C.setAttribute("ctid",UUID.cID());}return"[ctid="+C.getAttribute("ctid")+"]";
}}B=A=null;};LEAP.tree.isHalfChecked=function(D,E){if(E==null){return ;}D=LEAP._check(D,LEAP.tree.d);if(D==null){return ;}if(typeof (E)=="string"){E=LEAP.getElement(E);}if(E==null){return ;}var C=E;if(E.getAttribute("treestyle2")=="1"){C=LEAP.getElement(">h3:first",E);}var A=LEAP.getElement("a>input:first",C);
try{if(A!=null){var B=A.getAttribute("indeterminate");if(B=="true"||B==true){return true;}}return false;}finally{D=A=E=null;}};LEAP.tree.setItemHalfChecked=function(C,E,D){if(E==null){return ;}C=LEAP._check(C,LEAP.tree.d);if(C==null){return ;}if(typeof (E)=="string"){E=LEAP.getElement(E);}if(E==null){return ;
}if(E.getAttribute("ctid")==null){E.setAttribute("ctid",UUID.cID());}if(D==null){D=true;}var B=E;if(E.getAttribute("treestyle2")=="1"){B=LEAP.getElement(">h3:first",E);}var A=LEAP.getElement("a>input:first",B);if(A!=null){if(D!=false){A.setAttribute("indeterminate",true);}else{A.setAttribute("indeterminate",null);
A.removeAttribute("indeterminate");}}C=E=A=null;};LEAP.tree.getHalfCheckedItems=function(E){E=LEAP._check(E,LEAP.tree.d);if(E==null){return ;}var B=LEAP.getElements("input[indeterminate]",E);if(B!=null){var A=B.length;var C=[];for(var D=0;D<A;D++){var F=LEAP._match(B[D],"tree_item",commfields.ctf,99);
if(F.getAttribute("ctid")==null){F.setAttribute("ctid",UUID.cID());}C.push("[ctid="+F.getAttribute("ctid")+"]");F=B[D]=null;}return C;}};LEAP.tree.isChecked=function(D,E){if(E==null){return ;}D=LEAP._check(D,LEAP.tree.d);if(D==null){return ;}if(typeof (E)=="string"){E=LEAP.getElement(E);}if(E==null){return ;
}var C=E;if(E.getAttribute("treestyle2")=="1"){C=LEAP.getElement(">h3:first",E);}var A=LEAP.getElement("a>input:first",C);try{if(A!=null){var B=A.getAttribute("checked");if(B=="true"||B==true){return true;}}return false;}finally{D=A=E=null;}};LEAP.tree.setItemChecked=function(C,E,D){if(E==null){return ;
}C=LEAP._check(C,LEAP.tree.d);if(C==null){return ;}if(typeof (E)=="string"){E=LEAP.getElement(E);}if(E==null){return ;}if(E.getAttribute("ctid")==null){E.setAttribute("ctid",UUID.cID());}if(D==null){D=true;}var B=E;if(E.getAttribute("treestyle2")=="1"){B=LEAP.getElement(">h3:first",E);}var A=LEAP.getElement("a>input:first",B);
if(A!=null){if(D!=false){A.setAttribute("checked",true);}else{A.setAttribute("checked",null);A.removeAttribute("checked");}}C=E=A=null;};LEAP.tree.setItemChildChecked=function(E,G,F){E=LEAP._check(E,LEAP.tree.d);if(E==null){return ;}if(G!=null){if(typeof (G)=="string"){G=LEAP.getElement(G);}if(G==null){return ;
}if(G.getAttribute("ctid")==null){G.setAttribute("ctid",UUID.cID());}}else{G=E;}if(F==null){F=true;}var C=LEAP.getElements("input[type=checkbox]",G);if(C!=null){var B=C.length;for(var D=0;D<B;D++){var A=C[D];if(F!=false){A.setAttribute("checked",true);}else{A.setAttribute("checked",null);A.removeAttribute("checked");
}}}C=E=G=null;};LEAP.tree.getCheckedItems=function(E){E=LEAP._check(E,LEAP.tree.d);if(E==null){return ;}var B=LEAP.getElements("input[checked]",E);if(B!=null){var A=B.length;var C=[];for(var D=0;D<A;D++){var F=LEAP._match(B[D],"tree_item",commfields.ctf,99);if(F.getAttribute("ctid")==null){F.setAttribute("ctid",UUID.cID());
}C.push("[ctid="+F.getAttribute("ctid")+"]");F=B[D]=null;}return C;}};LEAP.tree.getCheckedValues=function(E){E=LEAP._check(E,LEAP.tree.d);if(E==null){return ;}var B=LEAP.getElements("input[checked]",E);if(B!=null){var A=B.length;var C=[];for(var D=0;D<A;D++){var F=LEAP._match(B[D],"tree_item",commfields.ctf,99);
C.push(F.getAttribute("_value"));F=B[D]=null;}return C;}};LEAP.tree.removeCheckedItems=function(D){D=LEAP._check(D,LEAP.tree.d);if(D==null){return ;}var B=LEAP.getElements("input[checked]",D);if(B!=null){var A=B.length;for(var C=0;C<A;C++){var E=LEAP._match(B[C],"tree_item",commfields.ctf,99);LEAP.removeElement(E,false);
E=B[C]=null;}}};LEAP.tree.getParent=function(A){if(A==null){return ;}if(typeof (A)=="string"){A=LEAP.getElement(A);}if(A==null){return ;}var B=null;try{if(A[commfields.ctf]=="tree_item"&&A.parentNode!=null){B=LEAP._match(A.parentNode,"tree_item","ctf",99);if(B==null){return ;}if(B.getAttribute("ctid")==null){B.setAttribute("ctid",UUID.cID());
}return"[ctid="+B.getAttribute("ctid")+"]";B=null;}}finally{B=A=null;}};LEAP.tree.updateItem=function(B,D,C){if(B==null){return ;}if(typeof (B)=="string"){B=LEAP.getElement(B);}if(B==null){return ;}if(B[commfields.ctf]=="tree_item"){var A=LEAP.getElement(">a:last",B);if(A!=null){A.innerText=D;}if(C==null){B.removeAttribute("_value");
}else{B.setAttribute("_value",C);}A=null;}B=null;C=null;};LEAP.tree.getItemText=function(B){if(B==null){return ;}if(typeof (B)=="string"){B=LEAP.getElement(B);}if(B==null){return ;}if(B[commfields.ctf]=="tree_item"){var A=LEAP.getElement(">a:last",B);if(A!=null){return A.innerText;}A=null;}B=null;};LEAP.tree.setItemText=function(A,B){LEAP.tree.getItemText=function(D){if(D==null){return ;
}if(typeof (D)=="string"){D=LEAP.getElement(D);}if(D==null){return ;}if(D[commfields.ctf]=="tree_item"){var C=LEAP.getElement(">a:last",D);if(C!=null){C.innerText=B;}C=null;}D=null;B=null;};};LEAP.chart={};LEAP.chart.loads=[];LEAP.chart.show=function(G,F,C){if(C==null||G==null){return ;}try{var E=LEAP.request("getChartDataXML",{serviceName:G,searchParameters:F});
if(E!=null){if(typeof (C)=="string"){C=LEAP.getElement(C);}var B=C.getAttribute("id");if(B==null){B="chart_con_"+UUID.cID();C.setAttribute("id",B);}var D="chart_"+UUID.cID();var J=E.type;var I=leapconfig.server;var A="LEAP/Resource/Chart/fun/";if(J==1){A+="bar";}else{if(J==2){A+="mbar";}else{if(J==3){A+="MSLine";
}else{if(J==4){A+="Angular";}else{if(J=5){A+="barline";}}}}}A+=".swf";I+=A;if(!LEAP.chart.loads.contains(A)){leapclient.load(A);LEAP.chart.loads.add(A);}var H=new FusionCharts(I,D,C.clientWidth+"",C.clientHeight+"","0","0");H.setDataXML(E.data);H.render(B);H=null;}else{if(typeof (C)=="string"){C=LEAP.getElement(C);
}C.innerHTML="";}}finally{C=null;}};LEAP.date={};LEAP.date.d="date";LEAP.date._init=function(){LEAP.addEvent(document.body,"click",LEAP.date.uiProcess,null,null,true);LEAP.addEvent(document.body,"keypress",LEAP.date.uiProcess,null,null,true);LEAP.addEvent(document.body,"keyup",LEAP.date.uiProcess,null,null,true);
if(LEAP.isIE){LEAP.addEvent(document.body,"focusin",LEAP.date.uiProcess,null,null,true);LEAP.addEvent(document.body,"focusout",LEAP.date.uiProcess,null,null,true);}else{document.addEventListener("focus",LEAP.date.uiProcess,true);document.addEventListener("blur",LEAP.date.uiProcess,true);}UIEventManager.removeEvent(window,"load",LEAP.date._init);
loadcalendar();};LEAP.date.init=function(){if(document!=null&&document.body!=null){LEAP.date._init();}else{UIEventManager.addEvent(window,"load",LEAP.date._init);}ElementEventManager.addManagedEventType(LEAP.date.d,"valueChange");}();LEAP.date.uiProcess=function(F){var Q=null;var G=null;var M=null;var E=null;
if(F!=null&&F.e!=null&&F.e.type!=null){E=F.e.type;}if(E!=null){G=F.e.srcElement;Q=F.e;if(LEAP.isIE){M=Q.keyCode;}else{M=Q.which;}}else{Q=F;G=F.target;M=Q.which;}if(G==null||G.getAttribute==null){return ;}var A=G.getAttribute(commfields.ctf);if(A==null){return ;}if(A.indexOf("date_")==-1&&A.indexOf("dates_")==-1){return ;
}var B=LEAP._match(G,LEAP.date.d);if(B==null){return ;}if(B.getAttribute("readonly")=="1"){return ;}if(E=="click"&&A=="date_show"){showcalendar(Q,G.parentNode);}if(A!="date_show"){var P="";var I=-1;var H=G.value;var L=H.length;var C=A.substr(5,1)*1;var R=LEAP.getSelectedText(G);P=R.text;I=R.idx;if(E=="keypress"){var N=M-48;
if(M==8||M==0||M==0||M==35||M==36||M==37||M==38||M==39||M==40){return ;}if(Q.ctrlKey&&(M==67||M==99)){return ;}if(M<48||M>57){if(LEAP.isIE){Q.returnValue=false;}else{Q.preventDefault();}return ;}else{if((P==null||P=="")&&I!=-1&&I!=4){var H=G.value;if(I==H.length){return ;}G.value=H.substr(0,I)+H.substr(I+1,H.length);
LEAP.date._s(G,I);}}}if(E=="keyup"||E=="focusout"||E=="blur"||E=="focusin"||E=="focus"){if(E=="keyup"){if(((M>=48&&M<=57)||(M>=96&&M<=105))&&((A=="date_1"&&L==4&&I==4)||(A!="date_1"&&L==2&&I==2))){var K=LEAP.getElement("input[ctf=date_"+(C+1)+"]",G.parentNode);if(K!=null){K.focus();}K=null;}if(M==8&&N!=1&&I==0){var J=LEAP.getElement("input[ctf=date_"+(C-1)+"]",G.parentNode);
if(J!=null){J.focus();if(C-1==1){LEAP.date._s(J,4);}else{LEAP.date._s(J,2);}}J=null;}}if(E=="focusin"||E=="focus"){}if(E=="focusout"||E=="blur"){G.value=LEAP.date._c(H,L,C,G);H=G.value;L=H.length;if(L==0){return ;}if((C==1&&L<4)||(C>1&&L<2)){if(C==1){for(var N=L;N<4;N++){H="0"+H;}}else{H="0"+H;}G.value=H;
return ;}else{}var O=LEAP.date.getValue(B);var D=B["_lv"];if(D!=O){if(D!=O){ElementEventManager.handleEvent(B,"valueChange",{caller:B,pv:D,lv:O});B["_lv"]=O;}}}}}};LEAP.date._c=function(J,E,I,A){var B="";for(var F=0;F<E;F++){var H=J.charAt(F);if(H>="0"&&H<="9"){B+=H;}}if(B==""){A.value=B;return B;}var C=B*1;
if(I==1&&C<1753){B="1753";}if(I==2&&C>12){B="12";}if(I==3&&C>28){var G=LEAP.getElement("[ctf=date_1]",A.parentNode).value*1;var D=LEAP.getElement("[ctf=date_2]",A.parentNode).value*1;if(G!=0&&D==2){if(G%400==0){B=29;}else{if(G%100==0){B=28;}}if(G%4==0){B=29;}else{B=28;}}if(B*1>31){B="31";}}if(I<4&&B*1==0){B="01";
if(I==1){B="00"+B;}}if(I==4&&C>24){B="24";}if((I==5||I==6)&&C>60){B="60";}return B+"";};LEAP.date._s=function(C,A){if(LEAP.isIE){var B=C.createTextRange();B.moveStart("character",A);B.collapse(true);B.select();}else{C.selectionStart=C.selectionEnd=A;}};LEAP.date.setValue=function(E,H,J){E=LEAP._check(E,LEAP.date.d);
if(E==null){return ;}var G=LEAP.date.getValue(E);var F=LEAP.getElements("input[ctf^=date_]",E);if(H==null||H.Trim()==""){LEAP.setAttribute(F,"value","");}else{var K=H.split(" ");var I=[];I=K[0].split("-");if(K.length>1){var B=K[1].split(":");for(var D=0;D<B.length;D++){I.add(B[D]);}}var M=I.length;if(F.length<M){M=F.length;
}for(var D=0;D<M;D++){if(D==0&&I[D].length<4){var A=I[D].length;for(var C=0;C<4-A;C++){I[D]="0"+I[D];}}if(D>0&&I[D].length<2){I[D]="0"+I[D];}F[D].value=I[D];}if(F.length>I.length){for(var D=I.length;D<F.length;D++){F[D].value="00";}}}var L=LEAP.date.getValue(E);if(G!=L){ElementEventManager.handleEvent(E,"valueChange",{caller:E,pv:G,lv:L});
}E["_lv"]=L;if(J==true){E.focus();}F=E=H=null;};LEAP.date.getValue=function(E){E=LEAP._check(E,LEAP.date.d);if(E==null){return ;}var G=LEAP.getElements("input[ctf^=date_]",E);var A=G.length;var F="";for(var C=0;C<A;C++){var D=G[C];var B=D.value;if(B.Trim()==""){return ;}F+=B;if(C<2){F+="-";}if(C==2){F+=" ";
}if(C>2&&C!=A-1){F+=":";}}if(A>3&&A<6){for(var D=A;D<6;D++){F+=":";F+="00";}}G=A=null;return F.Trim();};var ie=navigator.appName=="Microsoft Internet Explorer"?true:false;function $(A){return document.getElementById(A);}var controlid=null;var currdate=null;var startdate=null;var enddate=null;var yy=null;
var mm=null;var hh=null;var ii=null;var currday=null;var addtime=false;var today=new Date();var lastcheckedyear=false;var lastcheckedmonth=false;function _cancelBubble(A){e=A?A:window.event;if(ie){e.cancelBubble=true;}else{e.stopPropagation();}}function getposition(B){var A=LEAP.getAbsolutePos(B);return A;
}function loadcalendar(){s="";s+='<div id="calendar" style="display:none; position:absolute; z-index:99999995;" onclick="_cancelBubble(event)">';if(ie){s+='<iframe width="190" height="150" src="about:blank" style="position: absolute;z-index:-1;"></iframe>';}s+='<div style="width: 200px;"><table class="tableborder" cellspacing="0" cellpadding="0" width="100%" style="text-align: center">';
s+='<tr align="center" class="header"><td class="header"><a href="#" onclick="refreshcalendar(yy, mm-1);return false" title="上一月"><<</a></td><td colspan="5" style="text-align: center" class="header"><a href="#" onclick="showdiv(\'year\');_cancelBubble(event);return false" title="点击选择年份" id="year"></a>  -  <a id="month" title="点击选择月份" href="#" onclick="showdiv(\'month\');_cancelBubble(event);return false"></a></td><td class="header"><A href="#" onclick="refreshcalendar(yy, mm+1);return false" title="下一月">>></A></td></tr>';
s+='<tr class="category"><td>日</td><td>一</td><td>二</td><td>三</td><td>四</td><td>五</td><td>六</td></tr>';for(var D=0;D<6;D++){s+='<tr class="altbg2">';for(var B=1;B<=7;B++){s+="<td id=d"+(D*7+B)+' height="19">0</td>';}s+="</tr>";}s+='<tr id="hourminute"><td colspan="7" align="center"><input type="text" size="1" value="" id="hour" onKeyUp=\'this.value=this.value > 23 ? 23 : zerofill(this.value);LEAP.date.setValue(controlid , LEAP.date.getValue(controlid).replace(/\\d+(:\\d+)/ig, this.value+"$1"),true)\'> 点 <input type="text" size="1" value="" id="minute" onKeyUp=\'this.value=this.value > 59 ? 59 : zerofill(this.value);LEAP.date.setValue(controlid, LEAP.date.getValue(controlid).replace(/(\\d+:)\\d+/ig, "$1"+this.value),true)\'> 分</td></tr>';
s+="</table></div></div>";s+='<div id="calendar_year" onclick="_cancelBubble(event)"><div class="col">';for(var A=1930;A<=2019;A++){s+=A!=1930&&A%10==0?'</div><div class="col">':"";s+='<a href="#" onclick="refreshcalendar('+A+", mm);$('calendar_year').style.display='none';return false\"><span"+(today.getFullYear()==A?' class="today"':"")+' id="calendar_year_'+A+'">'+A+"</span></a><br />";
}s+="</div></div>";s+='<div id="calendar_month" onclick="_cancelBubble(event)">';for(var A=1;A<=12;A++){s+='<a href="#" onclick="refreshcalendar(yy, '+(A-1)+");$('calendar_month').style.display='none';return false\"><span"+(today.getMonth()+1==A?' class="today"':"")+' id="calendar_month_'+A+'">'+A+(A<10?" ":"")+" 月</span></a><br />";
}s+="</div>";var C=document.createElement("div");C.innerHTML=s;document.body.appendChild(C);document.onclick=function(E){$("calendar").style.display="none";$("calendar_year").style.display="none";$("calendar_month").style.display="none";};$("calendar").onclick=function(E){_cancelBubble(E);$("calendar_year").style.display="none";
$("calendar_month").style.display="none";};}function parsedate(E){/(\d+)\-(\d+)\-(\d+)\s*(\d*):?(\d*)/.exec(E);var D=(RegExp.$1&&RegExp.$1>1899&&RegExp.$1<2101)?parseFloat(RegExp.$1):today.getFullYear();var C=(RegExp.$2&&(RegExp.$2>0&&RegExp.$2<13))?parseFloat(RegExp.$2):today.getMonth()+1;var B=(RegExp.$3&&(RegExp.$3>0&&RegExp.$3<32))?parseFloat(RegExp.$3):today.getDate();
var A=(RegExp.$4&&(RegExp.$4>-1&&RegExp.$4<24))?parseFloat(RegExp.$4):0;var F=(RegExp.$5&&(RegExp.$5>-1&&RegExp.$5<60))?parseFloat(RegExp.$5):0;/(\d+)\-(\d+)\-(\d+)\s*(\d*):?(\d*)/.exec("0000-00-00 00:00");return new Date(D,C-1,B,A,F);}function settime(B){$("calendar").style.display="none";var A=yy+"-"+zerofill(mm+1)+"-"+zerofill(B)+(addtime?" "+zerofill($("hour").value)+":"+zerofill($("minute").value):"");
LEAP.date.setValue(controlid,A,true);}function showcalendar(D,G,B,F,C){if(G.getAttribute("ctid")==null){G.setAttribute("ctid",UUID.cID());}controlid="[ctid="+G.getAttribute("ctid")+"]";addtime=B;startdate=F?parsedate(F):false;enddate=C?parsedate(C):false;var A=LEAP.date.getValue(G);currday=A?parsedate(A):today;
hh=currday.getHours();ii=currday.getMinutes();var E=getposition(G);$("calendar").style.display="block";$("calendar").style.left=E["x"]+"px";$("calendar").style.top=(E["y"]+20)+"px";_cancelBubble(D);refreshcalendar(currday.getFullYear(),currday.getMonth());if(lastcheckedyear!=false){$("calendar_year_"+lastcheckedyear).className="default";
$("calendar_year_"+today.getFullYear()).className="today";}if(lastcheckedmonth!=false){$("calendar_month_"+lastcheckedmonth).className="default";$("calendar_month_"+(today.getMonth()+1)).className="today";}$("calendar_year_"+currday.getFullYear()).className="checked";$("calendar_month_"+(currday.getMonth()+1)).className="checked";
$("hourminute").style.display=addtime?"":"none";lastcheckedyear=currday.getFullYear();lastcheckedmonth=currday.getMonth()+1;}function refreshcalendar(G,D){var C=new Date(G,D,1);var B=C.getDay();var F=C.getDate();var A=null;yy=C.getFullYear();mm=C.getMonth();$("year").innerHTML=yy;$("month").innerHTML=mm+1>9?(mm+1):"0"+(mm+1);
for(var E=1;E<=B;E++){A=$("d"+E);A.innerHTML=" ";A.className="";}while(C.getMonth()==mm){A=$("d"+(F+B));A.innerHTML='<a href="###" onclick="settime('+F+');return false">'+F+"</a>";if(C.getTime()<today.getTime()||(enddate&&C.getTime()>enddate.getTime())||(startdate&&C.getTime()<startdate.getTime())){A.className="expire";
}else{A.className="default";}if(C.getFullYear()==today.getFullYear()&&C.getMonth()==today.getMonth()&&C.getDate()==today.getDate()){A.className="today";A.firstChild.title="今天";}if(C.getFullYear()==currday.getFullYear()&&C.getMonth()==currday.getMonth()&&C.getDate()==currday.getDate()){A.className="checked";
}C.setDate(++F);}while(F+B<=42){A=$("d"+(F+B));A.innerHTML=" ";F++;}if(addtime){$("hour").value=zerofill(hh);$("minute").value=zerofill(ii);}}function showdiv(B){var A=getposition($(B));$("calendar_"+B).style.left=A["x"]+"px";$("calendar_"+B).style.top=(A["y"]+16)+"px";$("calendar_"+B).style.display="block";
}function zerofill(A){var A=parseFloat(A.toString().replace(/(^[\s0]+)|(\s+$)/g,""));A=isNaN(A)?0:A;return(A<10?"0":"")+A.toString();}LEAP.popupMenu={};LEAP.popupMenu.d="popupmenu";LEAP.popupMenu.it=null;LEAP.popupMenu.icons=null;LEAP.popupMenu.tp=null;LEAP.popupMenu.currentut=null;LEAP.popupMenu.init=function(){if(document!=null&&document.body!=null){LEAP.popupMenu._init();
}else{UIEventManager.addEvent(window,"load",LEAP.popupMenu._init);}UIEventManager.addEvent(window,"unload",LEAP.popupMenu._unload);ElementEventManager.addManagedEventType(LEAP.popupMenu.d,"OnClick");};LEAP.popupMenu._unload=function(){var item=null;var sid=null;try{UIEventManager.removeEvent(window,"unload",LEAP.popupMenu._unload);
ElementEventManager.removeEvent(LEAP.popupMenu.d,"OnClick");if(null!=LEAP.popupMenu.it){for(sid in LEAP.popupMenu.it.keys){LEAP.popupMenu.dispose(LEAP.popupMenu.it.getvalue(sid));}}for(sid in LEAP.popupMenu){eval("LEAP.popupMenu."+sid+"=null;");}}finally{item=sid=null;}};LEAP.popupMenu._init=function(){var F=null;
var D=null;var B=null;var E=null;var H=null;var C=null;var G=null;var A=null;try{LEAP.addEvent(document.body,"click",LEAP.popupMenu.uiProcess,null,null,true);UIEventManager.removeEvent(window,"load",LEAP.popupMenu._init);F=LEAP.getElements("[ctf=pop_item]");if(null!=F){for(D=0;D<F.length;D++){F[D].onmouseover=function(){this.className+=(this.className.length>0?" ":"")+"sfhover";
};F[D].onmouseout=function(){this.className=this.className.replace(new RegExp("( ?|^)sfhover\\b"),"");};}}F=LEAP.getElements("ul[ct=popupmenu]");if(null!=F){LEAP.popupMenu.it=new hashtable();for(D=0;D<F.length;D++){E=F[D].getAttribute("ut");if(null!=E){C=LEAP.getElements("[popupmenubtn]");if(null!=C){for(B=0;
B<C.length;B++){G=C[B].getAttribute("popupmenubtn");if(null!=G){G=G.split(" ");if(E==G[0]){if(null!=G[1]){A={p:G[1],obj:F[D]};}else{A={p:null,obj:F[D]};}LEAP.addEvent(C[B],"click",LEAP.popupMenu.click,A,null,true);}}}}LEAP.popupMenu.it.add(E,F[D]);}}}}finally{A=C=G=E=H=D=B=F=null;}};LEAP.popupMenu.click=function(A){var C=0;
var D=0;var E=null;var B=null;try{if(null==A){return ;}if(null==A.arg){return ;}if(null==A.arg.obj){return ;}if(null!=A.arg.p){E=LEAP.getElement("[popupmenusl="+A.arg.p+"]");}if(null==E){E=A.caller;}B=E;while(true){if(null==B){break;}C+=B.offsetLeft;D+=B.offsetTop;B=B.offsetParent;}A.arg.obj.style.display="block";
A.arg.obj.style.left=((C+A.arg.obj.offsetWidth)>document.body.offsetWidth?(C+E.offsetWidth-A.arg.obj.offsetWidth):C)+"px";A.arg.obj.style.top=((D+E.offsetHeight+A.arg.obj.offsetHeight)>document.body.offsetHeight?(D-A.arg.obj.offsetHeight):D+E.offsetHeight)+"px";}finally{C=D=A=null;}};LEAP.popupMenu.uiProcess=function(L){var A=null;
var E=null;var F=null;var B=null;var G=null;var D=null;var H=null;var K=false;var J=null;var I=null;var C=null;try{A=L.e.srcElement;if(null==A){return ;}G=LEAP._match(A,LEAP.popupMenu.d);if(null!=LEAP.popupMenu.it){if(null==LEAP.popupMenu.currentut){for(B in LEAP.popupMenu.it.keys){F=LEAP.popupMenu.it.getvalue(B);
if(null!=F){C=A.getAttribute("popupmenubtn");if(null!=C){C=C.split(" ");if(B!=C[0]&&!K){F.style.display="none";}}else{F.style.display="none";}}}}else{for(B in LEAP.popupMenu.it.keys){F=LEAP.popupMenu.it.getvalue(B);if(null!=F){if(B!=LEAP.popupMenu.currentut){F.style.display="none";}}}LEAP.popupMenu.currentut=null;
}}if(null==G){return ;}while(true){if(null==A){break;}if("BODY"==A.tagName){break;}if("pop_item"==A.getAttribute("ctf")){H=A.getAttribute("itemname");break;}A=A.parentNode;}if(null!=H){ElementEventManager.handleEvent(G,"OnClick",{itemname:H,data:A.data,eventobj:A});}}finally{C=J=I=K=G=D=B=E=A=null;}};
LEAP.popupMenu.getPop=function(B,D){var C=null;try{if(null==B||""==B){B="_globle_popbutton_v1.0";}C=LEAP.getElement("ul[ut="+B+"][ct=popupmenu]");if(null!=C){return C;}if(null==D){if("CSS1Compat"==document.compatMode){D="nav_pop_DOCTYPE";}else{if(LEAP.isIE){D="nav_pop";}else{D="nav_pop_DOCTYPE";}}}C=document.createElement("UL");
document.body.appendChild(C);C.setAttribute("ut",B);C.setAttribute("ct","popupmenu");C.className=D;if(null==LEAP.popupMenu.it){LEAP.popupMenu.it=new hashtable();}LEAP.popupMenu.it.add(B,C);return C;}catch(A){return null;}finally{D=C=B=null;}};LEAP.popupMenu.rf=function(){var D=null;var F=null;var I=null;
var G=null;var L=null;var H=null;var O=null;var C=null;var B=null;var A=null;var J=null;var E=0;var P=0;var M=null;var N=null;try{if(null!=LEAP.popupMenu.it){for(D in LEAP.popupMenu.it.keys){H=LEAP.popupMenu.it.getvalue(D);if(null==H){continue;}L=H[ElementEventManager.e];if(null==L){LEAP.addEvent(H,"OnClick",LEAP.popupMenu.itemclick);
}else{if(0==L.keys.length){LEAP.addEvent(H,"OnClick",LEAP.popupMenu.itemclick);}}}}O=LEAP.getElements("[popupmenuicon]");if(null!=O){for(I=0;I<O.length;I++){A=false;if(null!=LEAP.popupMenu.icons){for(G=0;G<LEAP.popupMenu.icons.length;G++){if(O[I]==LEAP.popupMenu.icons[G]){A=true;break;}}}if(A){continue;
}C=O[I].getAttribute("popupmenuicon");B=C.split(" ");C=null;if(2>B.length){continue;}J=document.createElement("div");O[I].parentNode.insertBefore(J,O[I]);if(null!=B[3]&&""!=B[3]){J.className=B[3];}else{J.className="nav_pop_icon";}J.style.display="block";J.setAttribute("title","选择常用语");J.setAttribute("iconposition",B[2]);
J.style.width="16px";J.style.height="16px";if(null==LEAP.popupMenu.icons){LEAP.popupMenu.icons=new Array();}LEAP.popupMenu.icons.add(O[I]);LEAP.addEvent(J,"click",LEAP.popupMenu.icclick,{pic:B[0],pm:B[1]},null,true);if(null==O[I].onresize){LEAP.addEvent(O[I],"resize",LEAP.popupMenu.icresize,{obj:J,trgobj:O[I],type:B[2]},null,true);
}E=0;P=0;if("CSS1Compat"==document.compatMode||!LEAP.isIE){M=O[I];while(true){if(null==M){break;}E+=M.offsetLeft;P+=M.offsetTop;M=M.offsetParent;}M=null;}switch(B[2]){case"lefttop":J.style.left=E+"px";J.style.top=P+"px";break;case"righttop":J.style.left=(E+O[I].offsetWidth-J.offsetWidth)+"px";J.style.top=P+"px";
break;case"bottomleft":J.style.left=E+"px";J.style.top=(P+O[I].offsetHeight-J.offsetHeight)+"px";break;case"bottomright":J.style.left=(E+O[I].offsetWidth-J.offsetWidth)+"px";J.style.top=(P+O[I].offsetHeight-J.offsetHeight)+"px";break;default:J.style.left=(E+O[I].offsetWidth-J.offsetWidth)+"px";J.style.top=P+"px";
}F=LEAP.getElements("[popupmenuvalue="+B[0]+"]");if(null!=F){H=LEAP.getElement("UL[ut="+B[1]+"][ct=popupmenu]");if(null!=H){if(1<F.length){J.setAttribute("isprivite",false);for(G=0;G<F.length;G++){if(null==F[G].onfocus){F[G].tag_obj=H;LEAP.addEvent(F[G],"focus",LEAP.popupMenu.ckv,null,null,true);}}}else{J.setAttribute("isprivite",true);
}}H=null;}}}}catch(K){}finally{N=B=M=J=A=O=L=I=G=F=D=null;}};LEAP.popupMenu.icresize=function(A){var E=null;var F=null;var B=0;var D=0;try{if(null==A){return ;}if(null==A.arg){return ;}if(null==A.arg.obj){return ;}if(null==A.arg.trgobj){return ;}if("CSS1Compat"==document.compatMode){F=A.arg.trgobj;while(true){if(null==F){break;
}B+=F.offsetLeft;D+=F.offsetTop;F=F.offsetParent;}F=null;}switch(A.arg.type){case"lefttop":A.arg.obj.style.left=B+"px";A.arg.obj.style.top=D+"px";break;case"righttop":A.arg.obj.style.left=(B+A.arg.trgobj.offsetWidth-A.arg.obj.offsetWidth)+"px";A.arg.obj.style.top=D+"px";break;case"bottomleft":A.arg.obj.style.left=B+"px";
A.arg.obj.style.top=(D+A.arg.trgobj.offsetHeight-A.arg.obj.offsetHeight)+"px";break;case"bottomright":A.arg.obj.style.left=(B+A.arg.trgobj.offsetWidth-A.arg.obj.offsetWidth)+"px";A.arg.obj.style.top=(D+A.arg.trgobj.offsetHeight-A.arg.obj.offsetHeight)+"px";break;default:A.arg.obj.style.left=(B+A.arg.trgobj.offsetWidth-A.arg.obj.offsetWidth)+"px";
A.arg.obj.style.top=D+"px";}}catch(C){}finally{F=E=A=null;}};LEAP.popupMenu.icclick=function(A){var E=null;var C=null;var D=null;try{if(null==A.caller){return ;}if(null==A.arg||""==A.arg){return ;}if(null==A.arg.pm||""==A.arg.pm){return ;}E=LEAP.getElement("UL[ut="+A.arg.pm+"][ct=popupmenu]");if(null==E){return ;
}E.iconbtn=A.caller;if(A.caller.getAttribute("isprivite")){if(null==A.arg.pic||""==A.arg.pic){return ;}C=LEAP.getElement("[popupmenuvalue="+A.arg.pic+"]");if(null==C){return ;}E.tag_obj=C;}D=A.caller.getAttribute("iconposition");switch(D){case"lefttop":LEAP.popupMenu.show(E,A.caller,null,"leftbottomright");
break;case"righttop":LEAP.popupMenu.show(E,A.caller,null,"rightbottomleft");break;case"bottomleft":LEAP.popupMenu.show(E,A.caller,null,"lefttopright");break;case"bottomright":LEAP.popupMenu.show(E,A.caller,null,"righttopleft");break;default:LEAP.popupMenu.show(E,A.caller,null,"rightbottomleft");}}catch(B){}finally{E=A=null;
}};LEAP.popupMenu.itemclick=function(A){var B=null;try{if(null==A){return ;}if(null==A.caller){return ;}if(null==A.arg2){return ;}if(null==A.arg2.eventobj){return ;}if(null==A.caller.tag_obj){return ;}B=LEAP.popupMenu.getText(A.arg2.eventobj);B=null==B?"":B;if(null!=A.caller.tag_obj.value){A.caller.tag_obj.value+=B;
}else{A.caller.tag_obj.innerText+=B;}if(null==A.caller.iconbtn){return ;}if(!A.caller.iconbtn.getAttribute("isprivite")){A.caller.tag_obj=null;}}catch(C){return ;}finally{B=A=null;}};LEAP.popupMenu.ckv=function(A){try{if(null==A){return ;}if(null==A.caller){return ;}if(null==A.caller.tag_obj){return ;
}A.caller.tag_obj.tag_obj=A.caller;}catch(B){return ;}finally{A=null;}};LEAP.popupMenu.getText=function(C){var B=null;var D=null;try{D=LEAP._match(C,LEAP.popupMenu.d);if(null==D){return null;}B=LEAP.getElement("[ctf=pop_text]",C);if(null==B){return null;}return B.innerText;}catch(A){return null;}finally{C=B=D=null;
}};LEAP.popupMenu.show=function(G,A,I,J){var C=null;var F=null;var D=0;var K=0;var E=null;var B=null;try{G=LEAP._match(G,LEAP.popupMenu.d);if(null==G){return ;}C=G.getAttribute("ut");if(null==C){return ;}E="CSS1Compat"==document.compatMode?document.documentElement:document.body;if(null!=A&&"object"==typeof (A)){if(null!=I&&"object"==typeof (I)){I.setAttribute("popupmenubtn",C);
}else{A.setAttribute("popupmenubtn",C);}F=A;while(true){if(null==F){break;}D+=F.offsetLeft;K+=F.offsetTop;F=F.offsetParent;}G.style.display="block";switch(J){case"lefttopleft":G.style.left=(D>G.offsetWidth?D-G.offsetWidth:D)+"px";G.style.top=(K>G.offsetHeight?K-G.offsetHeight:K+A.offsetHeight)+"px";break;
case"lefttopright":G.style.left=(D+G.offsetWidth>E.offsetWidth?D-G.offsetWidth:D)+"px";G.style.top=(K>G.offsetHeight?K-G.offsetHeight:K+A.offsetHeight)+"px";break;case"righttopleft":G.style.left=(D+A.offsetWidth>G.offsetWidth?D+A.offsetWidth-G.offsetWidth:D+A.offsetWidth)+"px";G.style.top=(K>G.offsetHeight?K-G.offsetHeight:K+A.offsetHeight)+"px";
break;case"righttopright":G.style.left=(D+A.offsetWidth+G.offsetWidth>E.offsetWidth?D+A.offsetWidth-G.offsetWidth:D+A.offsetWidth)+"px";G.style.top=(K>G.offsetHeight?K-G.offsetHeight:K+A.offsetHeight)+"px";break;case"rightbottomleft":G.style.left=(D+A.offsetWidth>G.offsetWidth?D+A.offsetWidth-G.offsetWidth:D+A.offsetWidth)+"px";
G.style.top=(K+A.offsetHeight+G.offsetHeight>E.offsetHeight?K-G.offsetHeight:K+A.offsetHeight)+"px";break;case"rightbottomright":G.style.left=(D+A.offsetWidth+G.offsetWidth>E.offsetWidth?D+A.offsetWidth-G.offsetWidth:D+A.offsetWidth)+"px";G.style.top=(K+A.offsetHeight+G.offsetHeight>E.offsetHeight?K-G.offsetHeight:K+A.offsetHeight)+"px";
break;case"leftbottomleft":G.style.left=(D>G.offsetWidth?D-G.offsetWidth:D)+"px";G.style.top=(K+A.offsetHeight+G.offsetHeight>E.offsetHeight?K-G.offsetHeight:K+A.offsetHeight)+"px";break;case"leftbottomright":G.style.left=(D+G.offsetWidth>E.offsetWidth?D-G.offsetWidth:D)+"px";G.style.top=(K+A.offsetHeight+G.offsetHeight>E.offsetHeight?K-G.offsetHeight:K+A.offsetHeight)+"px";
break;default:G.style.left=((D+G.offsetWidth)>E.offsetWidth?(D+A.offsetWidth-G.offsetWidth):D)+"px";G.style.top=((K+A.offsetHeight+G.offsetHeight)>E.offsetHeight?(K-G.offsetHeight):K+A.offsetHeight)+"px";}}else{B=LEAP.popupMenu._getEvent();LEAP.popupMenu.currentut=C;G.style.display="block";G.style.left=((G.offsetWidth+B.clientX>window.screen.width?B.clientX-G.offsetWidth:B.clientX)+E.scrollLeft)+"px";
G.style.top=((G.offsetHeight+B.clientY>window.screen.height?B.clientY-G.offsetHeight:B.clientY)+E.scrollTop)+"px";}}catch(H){}finally{B=E=D=K=F=C=G=A=I=null;}};LEAP.popupMenu._getEvent=function(){var C=null;try{if(LEAP.isIE){return window.event;}C=LEAP.popupMenu._getEvent.caller;while(C!=null){var B=C.arguments[0];
if(B){if((B.constructor==Event||B.constructor==MouseEvent)||(typeof (B)=="object"&&B.preventDefault&&B.stopPropagation)){return B;}}C=C.caller;}return null;}catch(A){}finally{C=null;}};LEAP.popupMenu.setWidth=function(E,A){var B=null;var D=null;try{E=LEAP._match(E,LEAP.popupMenu.d);if(null==E){return false;
}E.style.width=A+"px";B=LEAP.getElements("LI",E);if(null!=B){for(D=0;D<B.length;D++){B[D].style.width=A+"px";}}B=LEAP.getElements("[ctf=pop_text]",E);if(null!=B){for(D=0;D<B.length;D++){B[D].style.width=A+"px";}}return true;}catch(C){return false;}finally{D=B=E=A=null;}};LEAP.popupMenu.setHeight=function(C,B){try{C=LEAP._match(C,LEAP.popupMenu.d);
if(null==C){return false;}C.style.overflowY="auto";if(!LEAP.isIE){C.style.overflowX="hidden";}C.style.height=B+"px";}catch(A){return false;}finally{C=B=null;}};LEAP.popupMenu.getChildNodesCount=function(B){try{B=LEAP._match(B,LEAP.popupMenu.d);if(null==B){return 0;}return B.childNodes.length;}catch(A){return 0;
}finally{B=null;}};LEAP.popupMenu._getnewitem=function(E,C,B){var F=null;var A=null;try{if(null!=LEAP.popupMenu.tp&&""!=LEAP.popupMenu.tp){F=document.createElement("ul");F.innerHTML=LEAP.popupMenu.tp;F=F.childNodes[0];}else{F=document.createElement("LI");}F.style.width=E.style.width;F.setAttribute("ctf","pop_item");
F.setAttribute("itemname",C);F.setAttribute("title",B);A=LEAP.getElement("A[ctf=pop_text]",F);if(null==A){A=document.createElement("A");A.className="nav_pop_a";A.setAttribute("ctf","pop_text");A.style.width=E.style.width;F.appendChild(A);}A.appendChild(document.createTextNode(B));if(null==F.onmouseover){F.onmouseover=function(){this.className+=(this.className.length>0?" ":"")+"sfhover";
};}if(null==F.onmouseout){F.onmouseout=function(){this.className=this.className.replace(new RegExp("( ?|^)sfhover\\b"),"");};}return F;}catch(D){return null;}finally{F=E=C=B=null;}};LEAP.popupMenu.insertBefore=function(G,C,B,F){var H=null;var A=null;var E=null;try{G=LEAP._match(G,LEAP.popupMenu.d);if(null==G){return false;
}H=LEAP.popupMenu._getnewitem(G,C,B);if(null==H){return false;}A=LEAP.getElement("LI[itemname="+F+"]",G);if(null==A){return false;}E=A.parentNode;if(null==E){return false;}if("UL"!=E.tagName){return false;}E.insertBefore(H,A);return true;}catch(D){return false;}finally{E=A=H=G=C=B=F=null;}};LEAP.popupMenu.addItem=function(I,A,D,H){var B=null;
var E=null;var F=null;var C=null;try{E=LEAP._match(I,LEAP.popupMenu.d);if(null==E){return null;}if(LEAP.popupMenu.d==I.getAttribute("ct")){F=E;}else{for(C=0;C<I.childNodes.length;C++){if("UL"==I.childNodes[C].tagName){F=I.childNodes[C];break;}}if(null==F){F=document.createElement("UL");I.appendChild(F);
}}if(null==F){return null;}if("UL"!=F.tagName){return null;}B=LEAP.popupMenu._getnewitem(E,A,D);if(null==B){return null;}if(null!=H){B.data=H;}F.appendChild(B);return B;}catch(G){return null;}finally{C=H=B=F=E=A=D=I=null;}};LEAP.popupMenu.removeItem=function(E,A){var F=null;var D=null;var C=null;try{E=LEAP._match(E,LEAP.popupMenu.d);
if(null==E){return false;}F=LEAP.getElement("LI[itemname="+A+"]",E);if(null==F){return false;}D=F.parentNode;if(null==D){return false;}for(C=0;C<F.childNodes.length;C++){if("UL"==F.childNodes[C].tagName){LEAP.popupMenu._removeF(F.childNodes[C]);}}F.onmouseout=null;F.onmouseover=null;D.removeChild(F);
return true;}catch(B){return false;}finally{C=F=E=A=null;}};LEAP.popupMenu.dispose=function(D){var A=null;var C=null;try{D=LEAP._match(D,LEAP.popupMenu.d);if(null==D){return ;}C=D.getAttribute("ut");A=D.parentNode;if(null==A){return ;}LEAP.popupMenu._removeF(D);A.removeChild(D);if(null!=LEAP.popupMenu.it){LEAP.popupMenu.it.remove(C);
}}catch(B){}finally{D=null;}};LEAP.popupMenu.removeAll=function(C){var B=null;try{C=LEAP._match(C,LEAP.popupMenu.d);if(null==C){return ;}LEAP.popupMenu._removeF(C);for(B=C.childNodes.length-1;B>=0;B--){C.removeChild(C.childNodes[B]);}}catch(A){return false;}finally{B=C=null;}};LEAP.popupMenu.removeChild=function(D,A){var E=null;
var C=null;try{D=LEAP._match(D,LEAP.popupMenu.d);if(null==D){return false;}E=LEAP.getElement("LI[itemname="+A+"]",D);if(null==E){return false;}for(C=E.childNodes.length-1;C>=0;C--){if("UL"==E.childNodes[C].tagName){LEAP.popupMenu._removeF(E.childNodes[C]);E.removeChild(E.childNodes[C]);}}return true;
}catch(B){return false;}finally{C=E=D=A=null;}};LEAP.popupMenu.updateText=function(E,B,D){var F=null;var A=null;try{E=LEAP._match(E,LEAP.popupMenu.d);if(null==E){return false;}F=LEAP.getElement("LI[itemname="+B+"]",E);if(null==F){return false;}A=F.getElementsByTagName("A");if(null==A){if(null!=F.firstChild){F.firstChild.nodeValue=D;
}else{F.innerText=D;}}else{if(A.length>0){A[0].innerText=D;}else{if(null!=F.firstChild){F.firstChild.nodeValue=D;}else{F.innerText=D;}}}return true;}catch(C){return false;}finally{A=F=E=B=D=null;}};LEAP.popupMenu._removeF=function(D){var A=null;var C=null;try{if(null==D){return false;}A=LEAP.getElements("LI[ctf=pop_item]",D);
if(null==A){return false;}for(C=0;C<A.length;C++){A[C].onmouseout=null;A[C].onmouseover=null;}}catch(B){return false;}finally{C=A=D=null;}};LEAP.popupMenu.init();LEAP.upload={};LEAP.upload.d="upload";LEAP.upload.s=null;LEAP.upload.p="LEAP/Resource/HTML/Control/upload.html";LEAP.upload.r=true;LEAP.upload.control="[ct=upload]";
LEAP.upload.z="<TABLE isnew=1 class='upload_photolist_item' cellSpacing=0 cellPadding=0 border=0>  <TR><TD class='upload_photolist_item_imgtd'><div style='position:relative;height:94px;width:100px;overflow:auto'><div ctf='upload_btn_delete' class='upload_btn upload_btn_delete' style='position:absolute;left:0px;top:0px;' ctt='upload_control_photolist' title='删除'></div><img align=absmiddle class='upload_photolist_item_imgview' style='height:94px;width:100px;' ctf='upload_control_photo_view' ctt=upload_control_photolist src='@src'/></td></TD></TR><TR><TD class='upload_photolist_item_text'>@showname</TD></TR></TABLE>";
LEAP.upload.l=null;LEAP.upload.u=null;LEAP.upload._init=function(){UIEventManager.removeEvent(window,"load",LEAP.upload._init);LEAP.addEvent(document.body,"click",LEAP.upload.uiProcess,null,null,true);LEAP.addCodeType("upload_receipt",[{codeid:"0",codevalue:"未收"},{codeid:"1",codevalue:"已收"}]);LEAP.addCodeType("upload_mustreceipt",[{codeid:"0",codevalue:"可选件"},{codeid:"1",codevalue:"必收件"}]);
};LEAP.upload.init=function(){if(document!=null&&document.body!=null){LEAP.upload._init();}else{UIEventManager.addEvent(window,"load",LEAP.upload._init);}ElementEventManager.addManagedEventType(LEAP.upload.d,"uploadComplete");}();LEAP.upload.ScanComplate=function(){var A=LEAP.getElement("[ctf=upload_file]");
A.focus();scanner.sendpath();A=null;};LEAP.upload.compressComplate=function(){var A=LEAP.getElement("[ctf=upload_file]");A.focus();scanner.sendpath();A=null;LEAP.upload.compressok=0;};LEAP.upload.download=function(A){if(A!=null){window.open(LEAP.upload.getPath(A.nameedPath,A.name,A.uuid));}};LEAP.upload.getPath=function(B,D,C){if(LEAP.upload.u==null){LEAP.upload.u=leapconfig.server+"LEAP/Download/";
}var A=LEAP.upload.u;if(B!=null){A+=encodeURIComponent(encodeURIComponent(escape(B)))+"/";}if(D!=null){if(C==null||C.Trim()==""){A+=encodeURIComponent(encodeURIComponent(escape(D)));}else{A+=C+"_"+encodeURIComponent(encodeURIComponent(escape(D)));}}return A;};LEAP.upload.getShowPath=function(A){var B=null;
if(A.viewName!=null){B=LEAP.upload.getPath(A.nameedPath,A.viewName,A.uuid);}else{if(A.name!=null){B=LEAP.upload.getPath(A.nameedPath,A.name,A.uuid);}}return B;};LEAP.upload.onCompete=function(O){var Q=O.arg2.object;var F=LEAP.getElement(LEAP.upload.l);if(F!=null){var G=F.getAttribute(commfields.ct);if(G!=null){if(G=="upload_control_photo"){F[commfields.value]=Q;
var I=LEAP.getElement("[ctf=upload_control_photo_view]",F);I.src="";I.removeAttribute("src");if(I!=null){var B=LEAP.upload.getShowPath(Q);I.src=B;LEAP.upload.setShowImg(Q,I);try{F.focus();}catch(E){}I=null;}}else{if(G=="upload_control_list"){var C=Q.showName;var P=LEAP.getElement(LEAP.upload.lr,F);var H=LEAP.getElement("[ctf=upload_status]",P);
H.className="upload_status_ok";P[commfields.value]=Q;var D=LEAP.getElement("[ctf=upload_receipt]",P);if(D!=null){var L=D.innerText;var N=LEAP.getCodeIDByValue("upload_receipt",L);if(N!=null){if(N=="0"){N="1";D.innerText=LEAP.getCodeText("upload_receipt",N);}D.className="upload_receipt1";D.parentNode.innerHTML=D.outerHTML;
LEAP.removeElement(D);}D=null;}try{F.focus();}catch(E){}P=H=null;}else{if(G=="upload_control_tree"){var C=Q.showName;var J=LEAP.getElement(LEAP.upload.lr,F);var K=LEAP.tree.addItem(LEAP.getElement("[ct=tree]",F),J,C+'<A style="RIGHT: 30px;position: absolute;" href="javascript:void(0)" ctf="upload_btn_download" ctt="upload_control_tree">下载</A><A style="RIGHT: 0px;position: absolute;" href="javascript:void(0)" ctf="upload_btn_delete" ctt="upload_control_tree">删除</A>',Q,null,"LEAP/Resource/images/itemstyle/upload/download.gif");
Q.parent=J.getAttribute("_value");LEAP.getElement(K)["up__"+commfields.value]=Q;try{K.focus();}catch(E){}J=K=null;}else{if(G=="upload_control_photolist"){var C=Q.showName;var B=LEAP.upload.getShowPath(Q);var A=document.createElement("div");F.appendChild(A);A.innerHTML=LEAP.upload.z.replace("@showname",C).replace("@src",B);
LEAP.upload.setShowImg(Q,LEAP.getElement("[ctf=upload_control_photo_view]",A));var M=LEAP.getElement(">table:first",A);F.appendChild(M);M["up__"+commfields.value]=Q;try{F.focus();}catch(E){}LEAP.removeElement(A);}}}}}LEAP.upload.hide();F=null;}Q=null;};LEAP.upload.fixImg=function(N,M){N.src=M;var I=-1;
if(LEAP.isIE&&M.indexOf("http://")==-1&&M.indexOf("https://"==-1)){var J=new Image();J.src=M;var B=N.parentNode.clientWidth-10;var E=N.parentNode.clientHeight-10;var D=1;var C=0,L=0;if(J.readyState=="complete"){C=J.width;L=J.height;}else{(J.complete);}C=J.width;L=J.height;D=C/L;if(C>B){C=B;L=C/D;if(L>E){L=E;
C=L*D;}}if(L>E){L=E;C=L*D;}if(L==0){L=E;}if(C==0){C=B;}N.style.width=C+"px";N.style.height=L+"px";if(LEAP.isIE){I=J.fileSize*1;if(I==-1&&(M.toLowerCase().indexOf("jpg")>-1||M.toLowerCase().indexOf("jpeg")>-1||M.toLowerCase().indexOf("png")>-1||M.toLowerCase().indexOf("bmp")>-1)){for(var G=0;G<999999;
G++){if(I<0){I=J.fileSize*1;}if(I>-1){break;}}}if(I!=null&&I!=NaN&&I>-1&&I/1024>100){if(scanner!=null&&M!=null&&M.Trim()!=""){if(M.toLowerCase().indexOf("jpg")>-1||M.toLowerCase().indexOf("jpeg")>-1||M.toLowerCase().indexOf("png")>-1||M.toLowerCase().indexOf("bmp")>-1){LEAP.upload.compressok=0;LEAP.upload.lastCompressFile=null;
var A=M.replaceall("\\\\","@@").replaceall("\\","@@").replaceall("@@","\\\\").substr(8).replaceall("/","\\\\");var H=M.lastIndexOf("/");var F=M.lastIndexOf("\\");if(F>H){H=F;}var K="c:\\\\"+UUID.randomUUID()+"_"+M.substr(F+1);LEAP.upload.lastCompressFile=K;LEAP.upload.compressok=scanner.compressPic(A,K,900,900,50);
}}}}J=null;}N=null;return I;};LEAP.upload.changecelltext=function(C,A){if(A!=null){var D=A.innerText;var B=LEAP.getCodeIDByValue(C,D);if(B!=null){if(B=="1"){B="0";}else{if(B=="0"){B="1";}}A.innerText=LEAP.getCodeText(C,B);A.className=C+B;}A=null;}};LEAP.upload.uiProcess=function(G){var H=G.e.srcElement;
var D=G.e.type;var B=H.getAttribute(commfields.ctf);try{var C=LEAP._match(H,"upload_control_list");if(C==null){C=LEAP._match(H,"upload_control_photo");}if(C==null){C=LEAP._match(H,"upload_control_tree");}if(C==null){C=LEAP._match(H,"upload_control_photolist");}if(C!=null){if(C.getAttribute("readonly")==1){return ;
}}if(B=="upload_btn"&&D=="click"){var J=LEAP.getElement("[ctf=upload_file]").value;if(J!=null&&J!=""){H.disabled=true;LEAP.addEvent(LEAP.upload.control,"uploadComplete",LEAP.upload.onCompete);try{LEAP.getElement("[ctf=upload_form]").submit();}catch(F){LEAP.removeEvent(LEAP.upload.control,"uploadComplete",LEAP.upload.onCompete);
alert(F.message);}}else{alert("请选择文件");}return ;}if(B=="upload_scan_btn"&&scanner!=null){LEAP.upload.lastScanFile=UUID.cID();var S="c:\\scan\\scan_"+LEAP.upload.lastScanFile+".pdf";scanner.scan(10,S);}if(B=="upload_receipt"){LEAP.upload.changecelltext("upload_receipt",H);row=null;return ;}if(B=="upload_mustreceipt"){if(C.getAttribute("mustreceiptreadonly")==1){return ;
}LEAP.upload.changecelltext("upload_mustreceipt",H);row=null;}if(B=="upload_btn_upload"){var R=H.getAttribute("ctt");if(R!=null){if(C!=null){var K=C.getAttribute("ctid");if(K==null){K=UUID.cID();C.setAttribute("ctid",K);}LEAP.upload.l="[ctid="+K+"]";LEAP.upload.lr=null;var Q=null;var T=null;var E=null;
var O=C.getAttribute("maxsize");if(O!=null&&O!=""){O=O*1;}if(R=="upload_control_tree"){Q=H.parentNode.getAttribute("ctid");var M=LEAP._match(H,"upload_control_tree");E=M.getAttribute("autopathtype");T=M.getAttribute("uploadpath");M=null;}else{if(C.getAttribute("ct")=="upload_control_photolist"){E=C.getAttribute("autopathtype");
T=C.getAttribute("uploadpath");Q=C.getAttribute("ctid");}else{Q=H.parentNode.parentNode.getAttribute("ctid");T=H.parentNode.parentNode.getAttribute("uploadpath");E=H.parentNode.parentNode.getAttribute("autopathtype");}}if(Q==null){Q=UUID.cID();if(R=="upload_control_tree"){H.parentNode.setAttribute("ctid",Q);
}else{if(C.getAttribute("ct")=="upload_control_photolist"){C.setAttribute("ctid",Q);}else{H.parentNode.parentNode.setAttribute("ctid",Q);}}}LEAP.upload.lr="[ctid="+Q+"]";var L=false;var U=null;if(R=="upload_control_list"){U=H.parentNode.parentNode.getAttribute("cttag");var M=LEAP._match(H,"upload_control_list");
T=M.getAttribute("uploadpath");E=M.getAttribute("autopathtype");L=true;M=null;}if(T==null||T.Trim()==""){T=null;}if(E==null||E.Trim()==""){E=null;}LEAP.upload.show(U,L,T,E,O);C=null;}}return ;}if(B=="upload_btn_delete"){var R=H.getAttribute("ctt");if(R!=null){var C=LEAP._match(H,R);if(C!=null){if(R=="upload_control_tree"){if(window.confirm("确认删除该文件?")){LEAP.tree.removeItem(LEAP.getElement("[ct=tree]",C),H.parentNode,true);
}}else{if(R=="upload_control_photolist"){if(window.confirm("确认删除该文件?")){LEAP.removeElement(H.parentNode.parentNode.parentNode.parentNode.parentNode);}}else{C["value"]=null;var I=LEAP.getElement("[ctf="+R+"_view]",C);I.removeAttribute("src");I=null;C=null;}}}}return ;}if(B=="upload_control_photo_view"||B=="upload_btn_download"){var R=H.getAttribute("ctt");
if(R!=null){if(R=="upload_control_list"){var P=H.parentNode.parentNode[commfields.value];if(P!=null){LEAP.upload.download(P);C=null;return ;}}else{if(R=="upload_control_tree"){var P=H.parentNode["up__"+commfields.value];if(P!=null){LEAP.upload.download(P);C=null;return ;}}else{if(R=="upload_control_photolist"){var P=H.parentNode.parentNode.parentNode.parentNode.parentNode["up__"+commfields.value];
if(P!=null){LEAP.upload.download(P);C=null;return ;}}else{var C=LEAP._match(H,R);if(C!=null){var P=C[commfields.value];if(P!=null){LEAP.upload.download(P);C=null;return ;}}}}}}return ;}if(B=="upload_file"&&D=="change"){var I=LEAP.getElement("[ctf=upload_showimg]");I.display="block";var U=LEAP.getElement("[ctf=upload_title]");
if(H.value){var A="file:///"+H.value.replace("\\","/");I.style.display="block";I.border=1;if(H.value!=null&&H.value!=""&&LEAP.upload.r){U.value=H.value.substr(H.value.lastIndexOf("\\")+1);}if(A.toLowerCase().indexOf("jpg")>-1||A.toLowerCase().indexOf("jpeg")>-1||A.toLowerCase().indexOf("gif")>-1||A.toLowerCase().indexOf("png")>-1||A.toLowerCase().indexOf("bmp")>-1||A.toLowerCase().indexOf("tif")>-1){var N=LEAP.upload.fixImg(I,A);
if(scanner==null&&LEAP.upload.maxFileSize!=null&&LEAP.upload.maxFileSize>0&&N!=null&&N!="-1"&&N!=-1&&N*1>0&&N>LEAP.upload.maxFileSize*1024){LEAP.getElement("[ctf=upload_btn]").setAttribute("disabled",1);if(scanner==null){alert("文件超出最大限制["+Math.round(N/1024*100)/100+"k/"+LEAP.upload.maxFileSize+"k]");
}}else{LEAP.getElement("[ctf=upload_btn]").removeAttribute("disabled");}}}I=U=null;}}finally{H=null;}};LEAP.upload.Complete=function(B){LEAP.getElement("[ctf=upload_btn]").disabled=false;var A=LEAP.getElement("[ct=upload]");ElementEventManager.handleEvent(A,"uploadComplete",{object:B});ElementEventManager.removeEvent(A,"uploadComplete");
alert("上传成功");LEAP.upload.reset();};LEAP.upload.reset=function(){var B=LEAP.getElement("[ctf=upload_form]");B.reset();var A=LEAP.getElement("[ctf=upload_showimg]");A.style.display="none";A.removeAttribute("src");LEAP.getElement("[ctf=upload_btn]").disabled=false;A=from=null;};var ____hasinitscanbtn=false;
LEAP.upload.show=function(G,A,F,C,E){LEAP.upload.maxFileSize=E;if(LEAP.upload.s==null){LEAP.upload.s=LEAP.form.create(null,"文件上传",500,500).form;LEAP.form.setContent(LEAP.upload.s,leapclient.load(LEAP.upload.p));LEAP.addEvent(LEAP.upload.s,"formHided",LEAP.upload.reset);LEAP.addEvent("[ctf=upload_file]","change",LEAP.upload.uiProcess);
LEAP.getElement("[ctf=upload_form]").action=leapconfig.server+"LEAP/Service/RPC/RPC.DO?type=3";}LEAP.upload.r=true;if(F==null){F="";}var B="";if(F!=""){B=leapconfig.server+"LEAP/Service/RPC/RPC.DO?type=3&path="+F;}else{B=leapconfig.server+"LEAP/Service/RPC/RPC.DO?type=3";}if(C!=null){B+="&autopathtype="+C;
}LEAP.getElement("[ctf=upload_form]").action=B;if(G!=null){LEAP.getElement("[ctf=upload_title]").value=G;if(A!=null&&A!=false){LEAP.getElement("[ctf=upload_title]").readOnly=true;}else{LEAP.getElement("[ctf=upload_title]").readOnly=false;}LEAP.upload.r=false;}if(!____hasinitscanbtn){try{if(scanner==null){LEAP.getElement("[ctf=upload_scan_btn]").style.display="none";
}}catch(D){LEAP.getElement("[ctf=upload_scan_btn]").style.display="none";scanner=null;}____hasinitscanbtn=true;}LEAP.form.show(LEAP.upload.s);};LEAP.upload.hide=function(){LEAP.upload.reset();LEAP.form.hide(LEAP.upload.s);};LEAP.upload.setShowImg=function(E,C){if(E.height!=null&&E.width!=null&&E.height!=0&&E.width!=0){var F=C.parentNode.clientHeight;
var B=C.parentNode.clientWidth;var D=E.width;var A=E.height;scale=D/A;if(D>B){D=B;A=D/scale;if(A>F){A=F;D=A*scale;}}if(A>F){A=F;D=A*scale;}C.style.width=D;C.height.height=A;}};LEAP.upload.getValue=function(B){if(B==null){return ;}if(typeof (B)=="string"){B=LEAP.getElement(B);}if(B==null){return ;}var C=B.getAttribute("ct");
if(C==null){return ;}if(C=="upload_control_photo"){var M=B["value"];B=null;if(M!=null&&M!=""){return JSON.stringify(M);}}else{if(C=="upload_control_tree"){var J=LEAP.getElements("[up__value]",B);if(J!=null){var N=J.length;var S=[];for(var O=0;O<N;O++){S.add(J[O]["up__value"]);}J=null;return JSON.stringify(S);
}}else{if(C=="upload_control_photolist"){var H=LEAP.getElements(">table",B);if(H!=null){var S=[];var N=H.length;for(var O=0;O<N;O++){S.add(H[O]["up__value"]);}H=null;return JSON.stringify(S);}}else{if(C=="upload_control_list"){var J=LEAP.getElements("[ctf=table_row]",B);var Q=false;var E=LEAP.getElement("[md=mustreceipt]",B);
if(E!=null){Q=true;}else{var D=LEAP.getElement("[md=receipt]",B);if(D!=null){Q=true;}}B=null;if(J!=null){var N=J.length;var S=null;for(var O=0;O<N;O++){var F=J[O];var L=F[commfields.value];if(!Q){if(L!=null){if(S==null){S=[];}S.add(L);}}else{if(S==null){S=[];}if(L==null){L=new Object();}var A=LEAP.getElement("[ctf=upload_receipt]",F);
if(A!=null){var P=A.innerText;var I=LEAP.getCodeIDByValue("upload_receipt",P);L.receipt=I;}var K=LEAP.getElement("[ctf=upload_mustreceipt]",F);if(K!=null){var G=K.innerText;var R=LEAP.getCodeIDByValue("upload_mustreceipt",G);L.mustreceipt=R;}L.showName=F.getAttribute("cttag");S.add(L);}F=null;}if(S!=null){S=JSON.stringify(S);
}J=null;return S;}}}}}};LEAP.upload.setValue=function(element,value){if(element==null){return ;}if(typeof (element)=="string"){element=LEAP.getElement(element);}if(element==null){return ;}var ct=element.getAttribute("ct");if(ct==null){return ;}if(ct=="upload_control_photo"){try{element["value"]=value;
if(typeof (value)=="string"&&value.Trim()!=""){try{element["value"]=eval("("+value+")");}catch(err){element["value"]=null;}}value=element["value"];var showImg=LEAP.getElement("[ctf=upload_control_photo_view]",element);element=null;showImg.removeAttribute("src");if(value.name!=null){if(showImg!=null){showImg.src=LEAP.upload.getShowPath(value);
}}LEAP.upload.setShowImg(value,showImg);showImg=null;}catch(err){}}else{if(ct=="upload_control_photolist"){element.innerHTML="<div style='position: absolute; right: 0px; top: 0px;' ctf='upload_btn_upload' class='upload_btn upload_btn_upload' ctt='upload_control_photolist' title='上传'></div>";if(value!=null){var _value=value;
if(typeof (value)=="string"&&value.Trim()!=""){try{_value=eval("("+value+")");}catch(err){_value=null;}}if(_value!=null){var l=_value.length;for(var i=0;i<l;i++){var result=_value[i];var n=result.showName;var url=LEAP.upload.getShowPath(result);var div=document.createElement("div");element.appendChild(div);
div.innerHTML=LEAP.upload.z.replace("@showname",n).replace("@src",url);LEAP.upload.setShowImg(result,LEAP.getElement("[ctf=upload_control_photo_view]",div));var table=LEAP.getElement(">table:first",div);element.appendChild(table);table["up__"+commfields.value]=result;LEAP.removeElement(div);div=table=null;
}}}}else{if(ct=="upload_control_list"){var isextend=false;var _a=LEAP.getElement("[md=mustreceipt]",element);if(_a!=null){isextend=true;}else{var _b=LEAP.getElement("[md=receipt]",element);if(_b!=null){isextend=true;}}var _value=value;if(typeof (value)=="string"&&value.Trim()!=""){try{_value=eval("("+value+")");
}catch(err){_value=null;}}var rows=LEAP.getElements("[ctf=table_row]",element);if(rows!=null){if(_value!=null){var l=_value.length;var ret=null;for(var i=0;i<l;i++){var v=_value[i];var n=v.showName;var row=LEAP.getElement("[cttag="+n+"]",element);if(row!=null){var e=LEAP.getElement("[ctf=upload_status]",row);
if(v.nameedPath!=null){e.className="upload_status_ok";row[commfields.value]=v;}else{e.className="upload_status";row[commfields.value]=null;}if(isextend){LEAP.upload._setRow(row,v);}rows.remove(row);}row=e=null;}}if(rows!=null){for(var i=0;i<rows.length;i++){var row=rows[i];var e=LEAP.getElement("[ctf=upload_status]",rows[i]);
e.className="upload_status";row[commfields.value]=null;if(isextend){LEAP.upload._setRow(row,v);}row=e=null;}rows=null;}element=null;if(ret!=null){ret=JSON.stringify(ret);}rows=null;return ret;}}else{if(ct=="upload_control_tree"){var rows=LEAP.getElements("[up__value]",element);if(rows!=null){var l=rows.length;
var tree=LEAP.getElement("[ct=tree]",element);for(var i=0;i<l;i++){LEAP.tree.removeItem(tree,rows[i],true);}tree=rows=null;}if(value!=null){var _value=value;var tree=LEAP.getElement("[ct=tree]",element);if(typeof (value)=="string"&&value.Trim()!=""){try{_value=eval("("+value+")");}catch(err){_value=null;
}}if(_value!=null){var showDel=true;_str='<A style="RIGHT: 30px;position: absolute;" href="javascript:void(0)" ctf="upload_btn_download" ctt="upload_control_tree">下载</A>';if(element.getAttribute("showDelButton")=="0"){showDel=false;}if(showDel){_str=_str+'<A style="RIGHT: 0px;position: absolute;" href="javascript:void(0)" ctf="upload_btn_delete" ctt="upload_control_tree">删除</A>';
}var l=_value.length;for(var i=0;i<l;i++){var result=_value[i];var parent=LEAP.tree.getItemByValue(tree,result.parent);var li=LEAP.tree.addItem(tree,parent,result.showName+_str,result,null,"LEAP/Resource/images/itemstyle/upload/download.gif");LEAP.getElement(li)["up__"+commfields.value]=result;parent=li=null;
}}tree=value=_value=null;}}}}}element=null;};LEAP.upload._setRow=function(E,B){var C=LEAP.getElement("[ctf=upload_receipt]",E);if(C!=null){var A="0";if(B!=null&&B.receipt!=null){A=B.receipt+"";}C.className="upload_receipt"+A;C.innerText=LEAP.getCodeText("upload_receipt",A);C.parentNode.innerHTML=C.outerHTML;
LEAP.removeElement(C);C=null;}var D=LEAP.getElement("[ctf=upload_mustreceipt]",E);if(D!=null){var A="0";if(B!=null&&B.mustreceipt!=null){A=B.mustreceipt+"";}D.className="upload_mustreceipt"+A;D.innerText=LEAP.getCodeText("upload_mustreceipt",A);D.parentNode.innerHTML=D.outerHTML;LEAP.removeElement(D);
D=null;}};