

/** /EmpScriptV2/EWA_STYLE/js/js_jquery/EWA_ALL.min.2.0.js **/


/*
     ,@@@@~   :@@#,    .@.     =@    !@@-     -@@@@=   .!=#@@@  @@@@@@@@        -@@@@@@    :@~        *@@,  @~     $@   
    @@@*:@@ ;@@@@@@@    @@.    @*  ~@@@@@-   *@#..=@@  @@@@@@@  @@@@@@@@       .@@@@@@=    @@@      ;@@@@@  @@     @;   
   @@-      .;@   .@@    @@   @@   @@        @!    -@, ,@          @=           @!        -@ @@     @#      .@,   @@    
  -@          @     @;    @@ @@   .@        @@      @@  @          @=           @!        @@ ,@    ,@        #@  @@     
  @@          @     @@     @@@.    @@.      @~      $@ .@   :-     @=           @!        @,  @#    @@.       @@@@      
  @*  @@@@@*  @     *@     :@#      @@@@!   @       #@ @@@@@@$     @=           @@@@@@   !@   ,@    .@@@@:     @@~      
  @@  ,;;!@   @     @@    .@@@-       .$@$  @       @! .@          @=           @$;;-.   @@@@@@@@@     ,@@*    ~@       
  #@     ,@   @     @$    @@ $@         ;@  @      -@  .@          @=           @!       @~----@@.       =@    ~@       
   @=    ,@   @    @@    @@   @@  .:    ,@  @#     @@  .@          @=           @!      ,@     .@  ,-    -@    ~@       
   :@@  -@@   @.-@@@.   @@     @# ;@@. .@@  ~@$  .@@   .@          @=           @@=$@@@ @@      @, $@@. .@@    ~@       
    ~@@@@@    @@@@=    .@      =@  ~@@@@@    !@@@@@    .@          @=           =@@@@@~ @=      @;  ;@@@@@     -@       
       .                              ,.       .-       .                                              ,                
                                                                                                                        
                                                                                                                        
                                          -@            @   .-:;!*   *@@@:                                              
                                          -@     @=     @, @@@@@@@  @@#=@@*                                             
                                           @$    @@    .@  :@       =@   ;@                                             
                                           $@    @@.   @@  ~@        @   :@                                             
                                            @.  @@@@   @*  ~@        @  @@*                                             
                                            @#  @#:@   @   ~@@@@@*   @@@@@                                              
                                            ~@  @  @~ @@   ~@@@#=    @  ~@@  .                                          
                                             @~#@  @@ @:   ~@        @    @~ .                                          
                                             @@@:  -@,@    ~@        @    @~                                            
                                             :@@    @@@    ~@...;@   @  ,@@                                             
                                              @@    =@     -@@@@@@  .@@@@@                                              
                                              *      =               ..                                                 
                                                                                                                        
                                                                                                                        
            @        *@@@.    -@@@;            ....        .      !$               ....      ~@@,    .       @          
           #@@     -@@@$@@;  @@@$@@@  @=      :@@@@$    .@@@@     @@:   ;@@@@@@@@ !@@@@=   -@@@@@@   @@     ,@          
           @*@:    ~@    @@  @.   .@, @=        !@     =@@~ @@   $@$@    ...@:.     =@     @@    @@  @@@    ,@          
          =@ #@    ~@     @, @.    @@ @=        !@    :@*        @# @=      @:      =@    @@      @  @@@@   ,@          
          @!  @;   ~@     @- @.    #@ @=        !@    @#        ,@  ;@      @:      =@    @,      @- @$-@@  ,@          
         .@   @@   ~@    ~@  @.    @* @=        !@   .@         @@   @*     @:      =@   ,@       @- @$ =@, ,@          
         @@**==@=! @@. .=@$ !@-  ;@@  @=        !@   ;@         @@**=@@=    @:      =@   :@       @. @$  @@ -@          
         @@@@@@@@@ @@@@@@!  !@@@@@@   @=        !@   :@        -@@@@@@@@~   @:      =@   :@      -@  @$   @@-@          
         @     :@  ,@        @.       @=        !@    @     #- #@     @@    @:      =@   .@      @@  @$   .@@@          
        =@      @  ,@        @.       @=        !@    @@   :@- @;     $@    @:      =@    @@    @@   @$    @@@          
        @#      @: ,@        @.       @@@@@@@ ~@@@@#   @@@@@$  @.     ,@    @:    ;@@@@=  ,@@#$@@-   @$     @@          
        !       =. .@        @        :***!!;  --~-     =@@-   $       @    @.     --~-     *@@=     =:     -=          
*//* EWA.min.js */
var $jscomp=$jscomp||{};$jscomp.scope={};$jscomp.checkStringArgs=function(a,b,c){if(null==a)throw new TypeError("The 'this' value for String.prototype."+c+" must not be null or undefined");if(b instanceof RegExp)throw new TypeError("First argument to String.prototype."+c+" must not be a regular expression");return a+""};$jscomp.ASSUME_ES5=!1;$jscomp.ASSUME_NO_NATIVE_MAP=!1;$jscomp.ASSUME_NO_NATIVE_SET=!1;
$jscomp.defineProperty=$jscomp.ASSUME_ES5||"function"==typeof Object.defineProperties?Object.defineProperty:function(a,b,c){a!=Array.prototype&&a!=Object.prototype&&(a[b]=c.value)};$jscomp.getGlobal=function(a){return"undefined"!=typeof window&&window===a?a:"undefined"!=typeof global&&null!=global?global:a};$jscomp.global=$jscomp.getGlobal(this);
$jscomp.polyfill=function(a,b,c,d){if(b){c=$jscomp.global;a=a.split(".");for(d=0;d<a.length-1;d++){var e=a[d];e in c||(c[e]={});c=c[e]}a=a[a.length-1];d=c[a];b=b(d);b!=d&&null!=b&&$jscomp.defineProperty(c,a,{configurable:!0,writable:!0,value:b})}};
$jscomp.polyfill("String.prototype.startsWith",function(a){return a?a:function(b,a){var c=$jscomp.checkStringArgs(this,b,"startsWith");b+="";var e=c.length,g=b.length;a=Math.max(0,Math.min(a|0,c.length));for(var h=0;h<g&&a<e;)if(c[a++]!=b[h++])return!1;return h>=g}},"es6","es3");
$jscomp.polyfill("String.prototype.endsWith",function(a){return a?a:function(b,a){var c=$jscomp.checkStringArgs(this,b,"endsWith");b+="";void 0===a&&(a=c.length);a=Math.max(0,Math.min(a|0,c.length));for(var e=b.length;0<e&&0<a;)if(c[--a]!=b[--e])return!1;return 0>=e}},"es6","es3");for(window.EWA={VERSION:2.6,LANG:"zhcn",SHOW_ERROR:!0,__p:window.location.pathname,__inc:0};0==EWA.__p.indexOf("//")&&!(EWA.__p=EWA.__p.replace("//","/"),EWA.__inc++,100<EWA.__inc););EWA.CP="/"+EWA.__p.split("/")[1]+"/";
var userAgent=window.navigator.userAgent.toLowerCase();EWA.B={VERSION:(userAgent.match(/.+(?:rv|it|ra|ie)[\/: ]([\d.]+)/)||[])[1],SAFAIR:/webkit/.test(userAgent),OPERA:/opera/.test(userAgent),IE:(/msie/.test(userAgent)||/traaaaaident/.test(userAgent))&&!/opera/.test(userAgent),MOZILLA:/mozilla/.test(userAgent)&&!/(compatible|webkit)/.test(userAgent),GOOGLE:/chrome/.test(userAgent),PAD:/ipad|iphone|android|mobile/.test(userAgent),IS_ANDROID:/android/.test(userAgent)};var EWA_Utils={};
EWA.C={Utils:EWA_Utils,Ajax:EWA_AjaxClass,Xml:EWA_XmlClass,Url:EWA_UrlClass};EWA_Utils.ShowPic=function(a){a=a.src;0<a.indexOf("pic_no.jpg")||(a=a.replace("_SMAILL.","."),a=a.replace("small","a"),window.open(a))};EWA_Utils.ShowBgPic=function(a){if(a=$(a).css("background-image"))if(a=a.slice(4,a.length-1)){if(a.startsWith('"')||a.startsWith("'"))a=a.slice(1,a.length-1);0<a.indexOf("pic_no.jpg")||(a=a.replace("_SMAILL.",".").split("$resized")[0],a=a.replace("small","a"),window.open(a))}};
EWA_Utils.RunCmd=function(a,b){"string"==typeof a?(b=a,EWA.LastMenuMsg=""):(b=a.getAttribute("EWA_CMD"),EWA.LastMenuMsg=GetInnerText(a).trimEx());null!=b&&0<b.trim().length&&eval(b)};EWA_Utils.ReloadValidCodeImage=function(){for(var a=document.getElementsByTagName("IMG"),b=0;b<a.length;b+=1){var c=a[b];0<c.src.indexOf("/cgi-bin/_co_/")&&(c.src=c.src)}alert(_EWA_EVENT_MSG.ValidCodeError)};
EWA_Utils.JsRegisters=function(a){var b=/addEvent\([^\)]+\){1}/ig;a=a.match(/<[\s]*?script[^>]*?>[\s\S]*?<[\s]*?\/[\s]*?script[\s]*?>/ig);if(null!=a){for(var c=[],d=0;d<a.length;d++){var e=a[d];e=e.replace(/<[\s]*?script[^>]*?>/ig,"");e=e.replace(/<[\s]*?\/[\s]*?script[\s]*?>/ig,"");e=e.trim();if(0<e.length){try{EWA.C.Utils.JsRegister(e)}catch(l){alert(l)}try{var g=e.match(b);if(g)for(var h=0;h<g.length;h++){var k=g[h].split(",");if(3==k.length){var m=k[2].replace(")","");c.push(m)}}}catch(l){console.log(e)}}else e=
document.createElement("div"),e.innerHTML=a[d],e=e.getElementsByTagName("script")[0].src,EWA_Utils.JsRegisterSrc(e,!1)}for(d=0;d<c.length;d++)if(!(0<=c[d].indexOf("function")))try{eval(c[d]+"()")}catch(l){console.log(l)}}};EWA_Utils.JsRegisterSrc=function(a,b){var c="ewa_js_register_"+a.hashCode();if(!b||!$X(c)){b=document.getElementsByTagName("head")[0];var d=document.createElement("script");d.type="text/javascript";d.language="javascript";d.id=c;try{d.src=a,b.appendChild(d)}catch(e){alert(e)}}};
EWA_Utils.JsRegister=function(a){var b=document.getElementsByTagName("head")[0],c=document.createElement("script");c.type="text/javascript";c.language="javascript";try{c.text=a,b.appendChild(c)}catch(d){alert(d)}};
EWA_Utils.LazyBackgroundLoad=function(a,b){var c=b||("CSS1Compat"==document.compatMode?document.documentElement.clientHeight:document.body.clientHeight)+document.body.scrollTop+50;(a||$(".EWA_GRID_BG_IMG[is_lazy_load=true]")).each(function(){var b=$(this);if(b.offset().top<c){b.removeAttr("is_lazy_load");var a=b.attr("ori_src");b.css("background-image",'url("'+a+'")')}})};
EWA_Utils.ImageAdjust=function(a,b,c){if(null!=b&&null!=c&&(b=parseInt(b.replace("px","")),c=parseInt(c.replace("px","")),!(null==a||0>=b||0>=c||isNaN(b)&&isNaN(c))))if(isNaN(b))a.height=c;else if(isNaN(c))a.width=b;else{var d=a.width,e=a.height;0!=d&&0!=e&&(b/=d,c/=e,b>c?(d*=c,e*=c):(d*=b,e*=b),0<d&&0<e&&(a.width=d,a.height=e))}};
EWA_Utils.tempId=function(a){this.__TMPIDS||(this.__TMPIDS={});for(var b=a||"__ewatmpid__",c=0;1E3>c;c++)if(a=b+Math.random(),a=a.replace(".","GdX"),!this.__TMPIDS[a])return this.__TMPIDS[a]=1,a;a=b+"\u6267\u884c1000\u6b21\u91cd\u590d\u7684\u7f16\u53f7";console.log("\u6267\u884c1000\u6b21\u91cd\u590d\u7684\u7f16\u53f7");return a};
function $F(a,b,c,d){a=a.getElementsByTagName(b);b=[];d=d.toUpperCase().trim().split(",");for(var e=0;e<a.length;e++){var g=a[e],h=g.getAttribute(c);if(null!=h&&""!=h){h=h.toUpperCase();for(var k=0;k<d.length;k++)h==d[k]&&b.push(g)}}return b}function $J2MAP(a,b,c){b=b.split(",");var d={};c=null==c?",":c;for(var e=0;e<a.length;e++){for(var g=a[e],h=[],k=0;k<b.length;k++)h.push(g[b[k]]);d[h.join(c)]=g}return d}
function $J2MAP1(a,b,c){b=b.split(",");var d={};c=null==c?",":c;for(var e=0;e<a.length;e++){for(var g=a[e],h=[],k=0;k<b.length;k++)h.push(g[b[k]]);h=h.join(c);d[h]||(d[h]=[]);d[h].push(g)}return d}
function GetOuterHTML(a){if(a.outerHTML)return a.outerHTML;var b=a.attributes,c=[];c.push("<"+a.tagName.toLowerCase());for(var d=0;d<b.length;d++){var e=b[d];if(e.specified){var g=e.value.replace(/"/ig,"&quot;");c.push(" "+e.name+'="'+g+'"')}}e=a.innerHTML;null==e&&(e="");c.push(">"+e+"</"+a.tagName.toLowerCase()+">");return c.join("")}function GetInnerText(a){return a.innerText||a.textContent||""}function SetInnerText(a,b){EWA.B.IE?a.innerText=b:a.textContent=b}
"undefined"==typeof document.readyState&&(EWA.B._T=window.setInterval(function(){EWA.CP&&(window.clearInterval(EWA.B._T),document.readyState="complete")},10));function UrlParas(){var a=GetUrlParas(),b=[],c;for(c in a){var d=c.toUpperCase();"XMLNAME"==d||"ITEMNAME"==d||0<=d.indexOf("EWA")||b.push(c+"="+a[c])}return b.join("&")}var $U=UrlParas;
function $U2(a,b,c,d){if(!a||!b)return alert("xmlname and itemname not blank"),"xmlname and itemname not blank";a=EWA.CP+"/EWA_STYLE/cgi-bin/?xmlname="+a+"&itemname="+b;c&&(a=0==c.indexOf("&")?a+c:a+("&"+c));d&&(a+="&"+$U());return a}function GetUrlParas(a){var b={},c=window.location.href.split("?");if(1==c.length)return b;c=c[1].split("&");for(var d=0;d<c.length;d++){var e=c[d].split("=");if(1!=e.length){var g=e[0];a&&(g=g.toUpperCase());b[g]=e[1]}}return b}
function GetTopWin(){for(var a=window,b=0;a!=a.parent;){a=a.parent;if(20<b)return null;b++}return a}function addEvent(a,b,c){a.attachEvent?a.attachEvent("on"+b,c):a.addEventListener(b,c,!1)}function AddEvent(a,b,c){addEvent(a,b,c)}String.prototype.lTrim=function(){return this.replace(/(^\s*)/g,"")};String.prototype.rTrim=function(){return this.replace(/(\s*$)/g,"")};String.prototype.trimEx=function(){return this.trim().replace(/(^\u3000*)|(\u3000*$)/g,"")};
String.prototype.startsWith||(String.prototype.trim=function(){return this.replace(/(^\s*)|(\s*$)/g,"")},String.prototype.startsWith=function(a){return null==a||this.length<a.length?!1:this==a||this.substring(0,a.length)==a?!0:!1},String.prototype.endsWith=function(a){return null==a||this.length<a.length?!1:this==a||this.substring(this.length-a.length)==a?!0:!1});String.prototype.toURL=function(){return encodeURIComponent(this)};
String.prototype.toInputValue=function(){return null==this||""==this?this:this.replace(/</ig,"&lt;").replace(/>/ig,"&gt;").replace(/"/ig,"&quot;")};String.prototype.unURL=function(){return decodeURIComponent(this)};
String.prototype.toMoney=function(){if(null==this||""==this)return this;var a=1*this;if(isNaN(a))return a;var b=(this+"").split(".");a=b[0];if(999>=1*a)return this;b=2==b.length?"."+b[1]:"";for(var c=a.length/3,d=0;d<c;d++){var e=a.substring(a.length-3);0<d&&(b=","+b);b=e+b;a=a.substring(0,a.length-3)}0<a.length&&(b=a+","+b);return b};String.prototype.hashCode=function(){for(var a=0,b=this.length,c=0;c<b;c++)a=31*a+this.charCodeAt(c),2147483647<a&&(a%=2147483648);return a};
Number.prototype.fm=function(a,b,c,d){a=isNaN(a=Math.abs(a))?2:a;b=void 0!==b?b:"";c=c||",";d=d||".";var e=this,g=0>e?"-":"",h=parseInt(e=Math.abs(+e||0).toFixed(a),10)+"",k=3<(k=h.length)?k%3:0;return b+g+(k?h.substr(0,k)+c:"")+h.substr(k).replace(/(\d{3})(?=\d)/g,"$1"+c)+(a?d+Math.abs(e-h).toFixed(a).slice(2):"")};function $X(a){return document.getElementById(a)}
function $XUC(a,b){if(b){c=$('input[ucid="'+a+'"][ucuid="'+b+'"]');if(0<c.length)return c[0];c=$('select[ucid="'+a+'"][ucuid="'+b+'"]')}else{var c=$('input[ucid="'+a+'"]');if(0<c.length)return c[0];c=$('select[ucid="'+a+'"]')}return 0<c.length?c[0]:document.getElementById(a)}function $N(a){return document.getElementsByName(a)}function $T(a,b){null==b&&(b=document);return b.getElementsByTagName(a)}function T$(a,b){return $T(a,b)}
function $GMap(a){null!=a&&a instanceof Function?window.google?a():(EWA._____set_google_map||(setTimeout(function(){var b=document.createElement("script");b.src=EWA.RV_STATIC_PATH?EWA.RV_STATIC_PATH+"/EWA_STYLE/js/js_jquery/EWA_GOOGLE_MAP.js":"/EmpScriptV2/EWA_STYLE/js/js_jquery/EWA_GOOGLE_MAP.js";document.body.appendChild(b)},123),EWA._____set_google_map=!0),setTimeout(function(){$GMap(a)},100)):alert("\u9700\u8981\u4f20\u7edf\u52a0\u8f7d\u5b8c\u6210\u8c03\u7528\u65b9\u6cd5")}
function $JS_RUN_CHANGE(a){if(a&&a.onchange){var b=a.onchange.toString(),c=b.indexOf("{"),d=b.lastIndexOf("}");b=b.substring(c+1,d);c="OBJ_"+Math.random();c=c.replace(".","GdX");window[c]=a;b=b.replace(/this/ig,c);try{eval(b)}catch(e){console.log(b),document.title=e}window[c]=null;delete window[c]}}
function EWA_AjaxClass(a){this.ResutValue=this._Http=null;this._WaittingId="EWA_AJAX_WAITING";this.LoadingType="text";this._Parameters={};this._ParentId=null;this.IsShowWaitting=!0;this._RunEndTime=null;this._IsAsync=(this._IsAsync=a)?!0:!1;this._ShowWaitting=function(){if(this.IsShowWaitting){var b=document.getElementById(this._WaittingId);null==b?("text"==this.LoadingType.trim().toLowerCase()&&this._CreateWaittingText(),"image"==this.LoadingType.trim().toLowerCase()&&this._CreateWaittingImg()):
(b.style.display="",b.style.top=(document.documentElement.scrollTop?document.documentElement.scrollTop:document.body.scrollTop)+"px")}};this._CreateWaittingText=function(){var b=document.createElement("DIV");b.id=this._WaittingId;cssText="width:70px; height:20px; background-color:darkred; font-size:12px; color:white; position:absolute;left:0px;top:"+(document.documentElement.scrollTop?document.documentElement.scrollTop:document.body.scrollTop)+"px";EWA.B.IE?b.style.cssText=cssText:b.setAttribute("style",
cssText);b.innerHTML="Waiting...";document.body.appendChild(b)};this._CreateWaittingImg=function(){var b=document.createElement("TABLE");b.id=this._WaittingId;cssText="position:absolute;width:90%; height:80%;left:2px;top:0px";EWA.B.IE?b.style.cssText=cssText:b.setAttribute("style",cssText);var a=b.insertRow(-1).insertCell(-1);a.align="center";a.innerHTML="<img src='"+(null==EWA.RV_STATIC_PATH?EWA.CP:EWA.RV_STATIC_PATH)+"/EWA_STYLE/images/loading4.gif'>";document.body.appendChild(b)};this.HiddenWaitting=
function(){var b=document.getElementById(this._WaittingId);null!=b&&(b.style.display="none")};this._InitHttp=function(){this._Http=window.XMLHttpRequest?new XMLHttpRequest:new ActiveXObject("Microsoft.XMLHTTP");if(null==window._EWA_AJAX_LIST||200<window._EWA_AJAX_LIST.length)window._EWA_AJAX_LIST=[];window._EWA_AJAX_LIST.push(this)};this.Get=function(b,a){null==b?console.log("ajax url not null"):(b.href&&(b=b.href),0<=b.indexOf("|")&&(b=b.replace(/\|/ig,"%7c")),this._Http.onreadystatechange=a,b.endsWith(".txt")||
b.endsWith(".TXT")||(b=0<b.indexOf("?")?b+"&___R="+Math.random():b+"?___R="+Math.random()),b=b.replace("&&","&"),b=b.replace("?&","?"),0==EWA.B.IE?(this._Http.open("GET",b,!this._IsAsync),this._Http.send(null)):(this._Http.open("GET",b,!this._IsAsync),this._Http.send()),this._IsAsync||this._ShowWaitting())};this.Post=function(b,a,d){null==b?console.log("ajax url not null"):(b.href&&(b=b.href),0<=b.indexOf("|")&&(b=b.replace(/\|/ig,"%7c")),this._ShowWaitting(),null!=d&&(this._Http.onreadystatechange=
d),b=b.replace("&&","&"),b=b.replace("?&","?"),this._Http.open("POST",b,!this._IsAsync),this._Http.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),this._Http.send(a),this._IsAsync||this._ShowWaitting())};this.PostNew=function(b,a){var c=[],e;for(e in this._Parameters){var g=this._Parameters[e];null!=g&&c.push(e+"="+g)}this.Post(b,c.join("&"),a)};this.GetReturnValue=function(){return this._Http.responseText};this.AddParameter=function(b,a,d){this._Parameters[b]=d?a:encodeURIComponent(a)};
this._InitHttp();this.Install=function(b,a,d,e,g){var c=this,k="string"==typeof d?$X(d):d;null==k?alert("Object ["+d+"] not found"):(g||$(k).html("<img class='ewa-ajax-install-waitting' src='"+(null==EWA.RV_STATIC_PATH?EWA.CP:EWA.RV_STATIC_PATH)+"/EWA_STYLE/images/loading4.gif' style='width:16px;'>"),this.Post(b,a,function(){if(c.IsRunEnd()){var g=c.GetRst();if(c.IsError())$(k)[0].innerHTML=g;else{$(k)[0].innerHTML=g;try{EWA.C.Utils.JsRegisters(g)}catch(l){console.log(l)}}null!=e&&e(b,a,d,g)}}),this.HiddenWaitting())};
this.IsRunEnd=function(){if(4!=this._Http.readyState)return!1;this.HiddenWaitting();this._RunEndTime||(this._RunEndTime=(new Date).getTime());window.setTimeout(function(){for(var b=window._EWA_AJAX_LIST.length-1;0<=b;b--){var a=window._EWA_AJAX_LIST[b];if(null!=a&&1231<a.GetEndPastTime()){try{a.Dispose()}catch(d){}window._EWA_AJAX_LIST[b]=null}}},1);return!0};this.Dispose=function(){this._Http=null};this.GetEndPastTime=function(){return this._RunEndTime?(new Date).getTime()-this._RunEndTime:-1};this.IsError=
function(){return 200==this._Http.status?!1:!0};this.GetRst=function(){return this.IsRunEnd()?this.IsError()?this._Http.statusText:this._Http.responseText:null}}function $JA(a,b){for(var c=new EWA_AjaxClass(!0),d=[],e=2;e<arguments.length;e++)d.push(arguments[e]);c.Get(a,function(){_$J_HandleRst(c,b,d,!0)});return c}function $J2A(a,b){for(var c=new EWA_AjaxClass(!0),d=[],e=2;e<arguments.length;e++)d.push(arguments[e]);c.Get(a,function(){_$J_HandleRst(c,b,d,!1)});return c}
function $JPA(a,b,c){for(var d=new EWA_AjaxClass(!0),e=[],g=3;g<arguments.length;g++)e.push(arguments[g]);if(b)for(var h in b)d.AddParameter(h,b[h]);d.PostNew(a,function(){_$J_HandleRst(d,c,e,!0)});return d}function $J(a,b){for(var c=[],d=2;d<arguments.length;d++)c.push(arguments[d]);return __$J(!1,a,b,c,!0)}function $J1(a,b){for(var c=[],d=2;d<arguments.length;d++)c.push(arguments[d]);return __$J(!1,a,b,c,!0,!0)}
function $J2(a,b){new EWA_AjaxClass;for(var c=[],d=2;d<arguments.length;d++)c.push(arguments[d]);return __$J(!1,a,b,c,!1,!1)}function $J3(a,b){new EWA_AjaxClass;for(var c=[],d=2;d<arguments.length;d++)c.push(arguments[d]);return __$J(!1,a,b,c,!1,!0)}function $JP1(a,b,c,d,e,g,h,k,m){$JP(a,b,c,d,e,g,h,k,m).HiddenWaitting()}
function $JP(a,b,c){for(var d=new EWA_AjaxClass,e=[],g=3;g<arguments.length;g++)e.push(arguments[g]);if(b)for(var h in b)d.AddParameter(h,b[h]);d.PostNew(a,function(){_$J_HandleRst(d,c,e,!0)});return d}function $JP2(a,b,c){for(var d=new EWA_AjaxClass,e=[],g=2;g<arguments.length;g++)e.push(arguments[g]);if(b)for(var h in b)d.AddParameter(h,b[h]);d.PostNew(a,function(){_$J_HandleRst(d,c,e,!1)});return d}
function __$J(a,b,c,d,e,g){var h=new EWA_AjaxClass(a);h.Get(b,function(){_$J_HandleRst(h,c,d,e)});g&&h.HiddenWaitting();return h}
function _$J_HandleRst(a,b,c,d){if(a.IsRunEnd())if(a.IsError())window.EWA_AjaxErr&&window.EWA_AjaxErr(a.GetRst());else{a=a.GetRst();if(d)try{a=eval("var _zz="+a+"; _zz")}catch(m){console.log("_$J_HandleRst-JSON"+m);return}if(null==b)alert("\u5bf9\u8c61\u6ca1\u6709\u53d1\u73b0");else if(b instanceof Function||"function"==typeof b)b(a,c);else if("string"==typeof b)$X(b);else if("SELECT"==b.tagName)if(d)if(2>c.length)alert("\u53c2\u6570\u4e0d\u8db3\uff0c\u9700\u8981textName,valueName\u7684\u5b9a\u4e49");
else{d=c[0];var e=c[1],g=!0;2<c.length&&(g=c[2]);var h="";3<c.length&&(h=c[3]);var k=null;4<c.length&&(k=c[4]);_$J_SELECT(a,b,d,e,g,h,k)}else alert("SELECT\u9700\u8981\u6620\u5c04\u4e3aJSON");else console.log("not define callback")}}
function _$J_SELECT(a,b,c,d,e,g,h){b.options.length=0;e&&(b.options[0]=new Option("",""),e instanceof Array&&(b.options[0].text=e[0],b.options[0].value=e[1]));for(e=0;e<a.length;e++){var k=a[e],m=b.options[b.options.length]=new Option(k[c],k[d]),l;for(l in k)k[l]&&m.setAttribute("para_"+l.toLowerCase(),k[l]);m.setAttribute("json",JSON.stringify(k))}g&&(b.value=g);$JS_RUN_CHANGE(b);h&&h(b)}
$Install=function(a,b,c,d){var e=new EWA_UrlClass;e.SetUrl(a);e.GetParameter("EWA_AJAX")||(a=e.AddParameter("EWA_AJAX","INSTALL"));(new EWA_AjaxClass).Install(a,"",b,c,d)};
function EWA_JSONXmlClass(){this._JSon=new EWA_JSONClass;this.toJSON=function(a){return this.createNode(a)};this.createNode=function(a){var b=[];b.push(this._JSon.ToJSONString(a.tagName));b.push(": {");for(var c=0;c<a.attributes.length;c++){var d=this.createAttribute(a.attributes[c]);0<c&&b.push(",");b.push(d)}for(c=0;c<a.childNodes.length;c++)(0<c||0<a.attributes.length)&&b.push(",\r\n"),b.push(this.createNode(a.childNodes[c]));b.push("}");return b.join(" ")};this.createAttribute=function(a){var b=
[];b.push(this._JSon.ToJSONString(a.name));b.push(":");b.push(this._JSon.ToJSONString(a.value));return b.join(" ")}}
function EWA_JSONClass(){this._Escapeable=/["\\\x00-\x1f\x7f-\x9f]/g;this._Meta={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"};this.ToJSONDate=function(a){return null==a?"null":a.getUTCFullYear()+"-"+f(a.getUTCMonth()+1)+"-"+f(a.getUTCDate())+"T"+f(a.getUTCHours())+":"+f(a.getUTCMinutes())+":"+f(a.getUTCSeconds())+"Z"};this.ToJSONString=function(a){return'"'+(this._Escapeable.test(a)?a.replace(escapeable,function(b){var a=meta[b];if("string"===typeof a)return a;a=b.charCodeAt();
return"\\u00"+Math.floor(a/16).toString(16)+(a%16).toString(16)}):a)+'"'};this.ToJSONArray=function(a){for(var b=a.length,c=[],d=0;d<b;d+=1)c[d]=this.ToJSON(a[d]);return 0===c.length?"[]":"["+c.join(", ")+"]"};this.ToJSONObject=function(a){var b,c=[];for(b in a){var d=a[b];if(!("parent"==b||"_"==b.substring(0,1)||null==d||d instanceof Function)){var e=this.ToJSONString(b)+": ",g=typeof d;"string"===g||"number"===g||"boolean"===g||d instanceof Date?c.push(e+this.ToJSON(d)):"object"===g&&c.push(e+this.ToJSON(d))}}return 0===
c.length?"{}":"{"+c.join(", ")+"}"};this.ToJSON=function(a){var b=typeof a;if(a instanceof Date)return this.ToJSONDate(a);if("string"===b)return this.ToJSONString(a);if("number"===b)return isFinite(a)?String(a):"null";if("boolean"===b||"null"===b)return String(a);if("object"===b)return"number"!==typeof a.length||a.propertyIsEnumerable("length")?this.ToJSONObject(a):this.ToJSONArray(a)};this.Parse=function(a){return eval("("+a+")")}}
JSON=window.JSON||function(){function a(b){return 10>b?"0"+b:b}function b(b){return d.test(b)?'"'+b.replace(d,function(b){var a=h[b];if("string"===typeof a)return a;a=b.charCodeAt();return"\\u00"+Math.floor(a/16).toString(16)+(a%16).toString(16)})+'"':'"'+b+'"'}function c(a,d){var h=e;(d=d[a])&&"object"===typeof d&&"function"===typeof d.toJSON&&(d=d.toJSON(a));switch(typeof d){case "string":return b(d);case "number":return isFinite(d)?String(d):"null";case "boolean":case "null":return String(d);case "object":if(!d)return"null";
e+=g;var l=[];if("number"===typeof d.length&&!d.propertyIsEnumerable("length")){var m=d.length;for(a=0;a<m;a+=1)l[a]=c(a,d)||"null";var n=0===l.length?"[]":e?"[\n"+e+l.join(",\n"+e)+"\n"+h+"]":"["+l.join(",")+"]";e=h;return n}if("object"===typeof k)for(m=k.length,a=0;a<m;a+=1){var p=k[a];"string"===typeof p&&(n=c(p,d,k))&&l.push(b(p)+(e?": ":":")+n)}else for(p in d)(n=c(p,d,k))&&l.push(b(p)+(e?": ":":")+n);n=0===l.length?"{}":e?"{\n"+e+l.join(",\n"+e)+"\n"+h+"}":"{"+l.join(",")+"}";e=h;return n}}
Date.prototype.toJSON=function(){return this.getUTCFullYear()+"-"+a(this.getUTCMonth()+1)+"-"+a(this.getUTCDate())+"T"+a(this.getUTCHours())+":"+a(this.getUTCMinutes())+":"+a(this.getUTCSeconds())+"Z"};var d=/["\\\x00-\x1f\x7f-\x9f]/g,e,g,h={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},k;return{stringify:function(b,a,d){var h;g=e="";if(d)if("number"===typeof d)for(h=0;h<d;h+=1)g+=" ";else"string"===typeof d&&(g=d);if(a)if("function"===typeof a||"object"===typeof a&&
"number"===typeof a.length)k=a;else throw Error("JSON.stringify");else k=function(b,a){if(Object.hasOwnProperty.call(this,b))return a};return c("",{"":b})},parse:function(b,a){function c(b,d){var e,g=b[d];if(g&&"object"===typeof g)for(e in g)if(Object.hasOwnProperty.call(g,e)){var h=c(g,e);void 0!==h?g[e]=h:delete g[e]}return a.call(b,d,g)}if(/^[\],:{}\s]*$/.test(b.replace(/\\["\\\/bfnrtu]/g,"@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,"]").replace(/(?:^|:|,)(?:\s*\[)+/g,
"")))return b=eval("("+b+")"),"function"===typeof a?c({"":b},""):b;throw new SyntaxError("JSON.parse");},quote:b}}();EWA.JSON=JSON;
function EWA_DateClass(a){this._Date=a?EWA_Utils.Date(a)._Date:new Date;this._Days=[31,28,31,30,31,30,31,31,30,31,30,31];this.PastMilliseconds=function(b){return b._Date-this._Date};this.PastSeconds=function(b){return this.PastMilliseconds(b)/1E3};this.GetYear=function(){return this._Date.getFullYear()};this.GetMonth=function(){return this._Date.getMonth()+1};this.GetDay=function(){return this._Date.getDate()};this.GetBenYear=function(){var b=this.GetYear();return[b+"-01-01",b+"-12-31"]};this.GetBenMonth=
function(){var b=this.GetYear(),a=this.GetMonth(),d=this._Days[a-1];2==a&&(0==(b-1992)%4&&0!=(b-1900)%100||0==(b-2E3)%400)&&(d=29);10>a&&(a="0"+a);10>d&&(d="0"+d);return[b+"-"+a+"-01",b+"-"+a+"-"+d]};this.GetBenWeek=function(b){var a=this._Date.getDay(),d=this.GetDay();b?(b=a,a=6-a):(b=a-1,a=7-a);var e=this.Clone();e.setDate(d-b);b=this.Clone();b.setDate(d+a);return[this.GetDateString(e),this.GetDateString(b)]};this.GetBenQ=function(){var b=this.GetMonth();if(3>=b){var a=1;b=3}else 6>=b?(a=4,b=6):
9>=b?(a=7,b=9):(a=10,b=12);var d=this.GetYear();a=this.CreateDate(d,a,1);b=this.CreateDate(d,b,this._Days[b-1]);return[this.GetDateString(a),this.GetDateString(b)]};this.GetDateString=function(b){return this.FormatDateTime(null,b)};this.GetDateTimeString=function(b){return this.FormatDate(null,b)};this.Clone=function(){return this.CreateDate(this.GetYear(),this.GetMonth(),this.GetDay())};this.AddDays=function(b){var a=this._Date.getDate();this._Date.setDate(a+1*b);return this.GetDateString()};this.AddDaysFt=
function(a,c){var b=this._Date.getDate();this._Date.setDate(b+1*a);return this.FormatDate(c)};this.CreateDate=function(a,c,d,e,g,h){var b=new Date;null==e&&(e=0);null==g&&(g=0);null==h&&(h=0);b.setDate(1);b.setFullYear(a);b.setMonth(c-1);b.setDate(d);b.setHours(e);b.setMinutes(g);b.setSeconds(h);b.setMilliseconds(0);return b};this.SetDate=function(b,a,d,e,g,h){this._Date=null==a?EWA_Utils.Date(b)._Date:this.CreateDate(b,a,d,e,g,h)};this.GetWeekName=function(){return _EWA_G_SETTINGS.WEEKS.split(",")[this._Date.getDay()]};
this.FormatDate=function(a,c){!a&&_EWA_G_SETTINGS&&_EWA_G_SETTINGS.DATE&&(a=_EWA_G_SETTINGS.DATE);a||(a="yyyy-MM-dd");var b=c||this._Date,e=c=b.getMonth()+1,g=b.getDate();10>e&&(e="0"+c);10>g&&(g="0"+g);b=b.getFullYear();var h,k="Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec".split(" ");"MM/dd/yyyy"==a?h=e+"/"+g+"/"+b:"dd/MM/yyyy"==a?h=g+"/"+e+"/"+b:"yyyy-MM-dd"==a?h=b+"-"+e+"-"+g:"MM/dd"==a?h=e+"/"+g+"/"+b:"dd/MM"==a?h=g+"/"+e+"/"+b:"MM-dd"==a?h=e+"-"+g:"MMM dd"==a?h=k[c-1]+" "+g:"dd-MMM"==a?h=
g+"-"+k[c-1]:"ddMMM"==a?h=g+k[c-1]:"MMMdd"==a?h=k[c-1]+g:"MM\u6708dd\u65e5"==a?h=c+g+"\u65e5":"yyyyMMdd"==a&&(h=b+""+e+g);return h};this.FormatDateTime=function(a,c){return this.FormatDate(a,c)+" "+this.GetTimeStr(c)};this.GetTimeStr=function(a){var b=a||this._Date;a=b.getHours();var d=b.getMinutes();b=b.getSeconds();return(10>a?"0":"")+a+":"+(10>d?"0":"")+d+":"+(10>b?"0":"")+b};this.GetDateDiff=function(a){var b=this._Date;a=a?a instanceof Date?a:EWA_Utils.Date(a)._Date:new Date;b=b.getTime();a=
a.getTime();return((b-a)/864E5).toFixed(0)}}
EWA_Utils.Date=function(a){if(!a)return new EWA_DateClass;var b=a,c="";if(0<a.indexOf(" ")){var d=a.split(" ");b=d[0];c=d[1]}if(8==a.length)b=a.substring(0,4),d=a.substring(4,6),a=a.substring(6,8);else{if(0<b.indexOf("/")){var e=b.split("/");b=e[2];_EWA_G_SETTINGS&&"MM/dd/yyyy"==_EWA_G_SETTINGS.DATE?(d=e[0],a=e[1]):(d=e[1],a=e[0])}else e=b.split("-"),b=e[0],d=e[1],a=e[2];var g=e=0,h=0;0<c.length&&(c=c.split(":"),g=c[0],e=c[1],2<c.length&&(h=c[2]))}c=new EWA_DateClass;c.SetDate(b,d,a,g,e,h);return c};
function EWA_XmlClass(){this.XmlDoc=null;this.LoadXmlFile=function(a){this._InitXmlDoc();this.XmlDoc.load(a)};this.LoadXml=function(a){EWA.B.IE&&!EWA.B.MOZILLA?(this._InitXmlDoc(),this.XmlDoc?this.XmlDoc.loadXML(a):alert("xml is null")):(this.XmlDoc=null,this.XmlDoc=(new DOMParser).parseFromString(a,"text/xml"))};this.GetXml=function(a){null==a&&(a=this.XmlDoc);return EWA.B.IE?a.xml:(new XMLSerializer).serializeToString(a)};this.GetAttributeValue=function(a,b,c){return this.GetElement(a,c).getAttribute(b)};
this.GetElementText=function(a){if(null!=a&&0<a.childNodes.length){for(var b="",c=0;c<a.childNodes.length;c++)b+=a.childNodes[c].nodeValue;return b}return null};this.GetElementAttribute=function(a,b){return a.getAttribute(b)};this.GetText=function(a,b){a=this.GetElement(a,b);return this.GetElementText(a)};this.GetElements=function(a,b){a=a.split("/");var c=null==b?this.XmlDoc:b;for(b=0;b<a.length-1;b+=1){c=c.getElementsByTagName(a[b]);if(null==c||0==c.length)return null;c=c[0]}return null==c||0==
c.length?null:c.getElementsByTagName(a[a.length-1])};this.GetElement=function(a,b){a=this.GetElements(a,b);return null==a?null:a[0]};this.SetAttribute=function(a,b,c){null==b?c.setAttribute(a,""):c.setAttribute(a,b)};this.GetOrCreateElement=function(a,b){a=a.split("/");b=null==b?this.XmlDoc:b;for(var c=0;c<a.length;c+=1){var d=b.getElementsByTagName(a[c]);b=null==d||0==d.length?this.NewChild(a[c],b):d[0]}return b};this.NewChild=function(a,b){a=this.XmlDoc.createElement(a);b.appendChild(a);return a};
this.NewChilds=function(a,b){a=a.split("/");for(var c=0;c<a.length;c++)b=this.NewChild(a[c].trim(),b);return b};this.SetText=function(a,b){b.text=a};this.AppendText=function(a,b){a=this.XmlDoc.createTextNode(a);b.appendChild(a)};this.SetCData=function(a,b){null!=a&&(a=this.XmlDoc.createCDATASection(a),b.appendChild(a))};this._InitXmlDoc=function(){if(!this.XmlDoc){if(EWA.B.IE)for(var a=["MSXML4.DOMDocument","MSXML3.DOMDocument","MSXML2.DOMDocument","MSXML.DOMDocument","Microsoft.XmlDom"],b=0;b<a.length;b++){try{this.XmlDoc=
new ActiveXObject(a[b])}catch(c){this.XmlDoc=null}if(null!=this.XmlDoc)break}if(!this.XmlDoc)try{this.XmlDoc=document.implementation.createDocument("","doc",null)}catch(c){}if(this.XmlDoc)try{this.XmlDoc.async=!1}catch(c){}else alert("XML init failed")}};this._InitXmlDoc()}
function EWA_UrlClass(a){this._URL="";this._Paras={};this._Root="";this.SetUrl=function(a){this._URL=a=null==a?window.location.href:a.href?a.href:a.toString();this._Paras={};this._Root=a.split("?")[0];if(!(0>a.indexOf("?"))){a=a.split("?")[1].split("&");for(var b=0;b<a.length;b++){var d=a[b].split("=");2==d.length?this._Paras[d[0].toUpperCase()]=d[1]:this._Paras[d[0].toUpperCase()]=""}}};this.RemoveEwa=function(){for(var a in this._Paras){var c=a.toLowerCase();if("xmlname"==c||"itemname"==c||0==c.indexOf("ewa_"))this._Paras[a]=
null}return this.GetUrl()};this.GetParameter=function(a){return this._Paras[a.toUpperCase().trim()]};this.GetParas=function(a){var b=[],d;for(d in this._Paras){var e=this._Paras[d];a&&(d=d.toLowerCase());d&&null!=e&&b.push(d+"="+e)}return b.join("&")};this.SetRoot=function(a){this._Root=a};this.GetUrl=function(a){a=this.GetParas(a);var b="";0<a.length&&(b=0<=this._Root.indexOf("?")?"&":"?");return this._Root+b+a};this.AddParameter=function(a,c,d){a=a.toUpperCase().trim();this._Paras[a]=d?c:encodeURIComponent(c);
return this.GetUrl()};this.RemoveParameter=function(a){a=a.toUpperCase().trim();this._Paras[a]=null;return this.GetUrl()};this.SetUrl(a||window.location.href)}
EWA_Tanslator_Providers={BAIDU:{http:"/cm/back_admin/common/trans_baidu.jsp",Trans:function(a,b,c,d,e){var g=c.get_text(a);$X("EWA_Tanslator_Providers_baidu")||$("body").append('<div id="EWA_Tanslator_Providers_baidu" style="display:none"></div>');$("#EWA_Tanslator_Providers_baidu").html(g);g=$("#EWA_Tanslator_Providers_baidu").text().trim();document.createElement("script");$JP(this.http+"?from="+d+"&to="+e,{q:g},EWA_Tanslator_Providers.BAIDU.__transCallBack,a,b,c)},__transCallBack:function(a,b){var c=
b[2];if(a.trans_result&&a.trans_result.data){b=b[1];for(var d=[],e=0;e<a.trans_result.data.length;e++)d.push(a.trans_result.data[e].dst);rst=d.join("\n");if(b&&("string"==typeof b&&(b=$X(b)),b))if(a=b.tagName,null==a&&(a=""),a=a.toUpperCase(),""==a)console.log("trans-error:"+b);else if("SELECT"==a||"INPUT"==a||"TEXTAREA"==a){if(b.value=rst,b.setAttribute("ewa_trans_end","ok"),null!=b.onblur)b.onblur()}else b.setAttribute("ewa_trans_end","ok"),b.innerHTML=rst}c.idx_ok++;c.check_complete()},TransToEn:function(a,
b,c){EWA_Tanslator_Providers.BAIDU.Trans(a,b,c,"zh","en")},TransToCn:function(a,b,c){EWA_Tanslator_Providers.BAIDU.Trans(a,b,c,"en","zh")}},BING:{key:"50F7C8D4BC00A6E047C046D012F334DEC61FA003",http:"//api.microsofttranslator.com/V2/Ajax.svc/Translate?appid=50F7C8D4BC00A6E047C046D012F334DEC61FA003",Trans:function(a,b,c,d,e){var g="___GDX_BING_"+c.idx;window[g]={id:g,is_run:!0,to_obj:b,from_call_class:c,from_obj:a,provider_call_back:function(a){EWA_Tanslator_Providers.BING.trans_call_back(a,this)}};
b=c.get_text(a);a=document.createElement("script");d=this.http+"&oncomplete=window."+g+".provider_call_back&from="+d+"&to="+e+"&text="+b.toURL();a.src=d;document.getElementsByTagName("head")[0].appendChild(a)},TransToEn:function(a,b,c){EWA_Tanslator_Providers.BING.Trans(a,b,c,"zh-CHS","en")},TransToCn:function(a,b,c){EWA_Tanslator_Providers.BING.Trans(a,b,c,"en","zh-CHS")},trans_call_back:function(a,b){var c=b.to_obj;window[b.id]=null;b.is_run=!1;b.from_call_class.idx_ok++;b.from_call_class.check_complete();
b.from_call_class.call_item_callback(b.from_obj,a);if(c&&("string"==typeof c&&(c=$X(c)),c)){var d=c.tagName;null==d&&(d="");d=d.toUpperCase();if(""==d)console.log("trans-error:"+c);else if("SELECT"==d||"INPUT"==d||"TEXTAREA"==d){if(c.value=a,c.setAttribute("ewa_trans_end","ok"),null!=c.onblur)c.onblur()}else c.setAttribute("ewa_trans_end","ok"),c.innerHTML=a}for(var e in b)b[e]=null}},YOUDAO:{key:"1597375709",http:"//fanyi.youdao.com/openapi.do?keyfrom=wwwoneworldcc&key=1597375709&type=data&doctype=<doctype>&version=1.1&q="}};
function EWA_TanslatorCalss(){this.PROVIDER="BAIDU";this.SKIP_EXISTS=!0;this.transAll=function(a,b,c,d){this.idx_ok=this.idx=0;null==a?alert("\u5bf9\u8c61objs_ch\u4e0d\u80fd\u4e3a\u7a7a"):(this._objs_ch=a,this._objs_en=b,this._transCompleteCallback=d,this._transCompleteItemCallBack=c,this.start_trans("en"))};this.transAllToCn=function(a,b,c,d){this.idx_ok=this.idx=0;null==a?alert("\u5bf9\u8c61objs_ch\u4e0d\u80fd\u4e3a\u7a7a"):(this._objs_ch=a,this._objs_en=b,this._transCompleteCallback=d,this._transCompleteItemCallBack=
c,this.start_trans("cn"))};this.start_trans=function(a){if(this.idx<=this._objs_ch.length-1){var b=this._objs_ch[this.idx],c=null;if(this._objs_en&&(c=this._objs_en[this.idx],this.SKIP_EXISTS&&this.get_text(c))){this.idx++;this.start_trans(a);return}this.idx++;this.trans_item(b,c,a);var d=this;setTimeout(function(){d.start_trans(a)},123)}};this.trans_item=function(a,b,c){null==this.trans&&(this.trans=EWA_Tanslator_Providers[this.PROVIDER]);"cn"==c?this.trans.TransToCn(a,b,this):this.trans.TransToEn(a,
b,this)};this.get_text=function(a){if("string"==typeof a)var b=a;else{var c=a.tagName;null==c&&(c="");c=c.toUpperCase();"SELECT"==c||"INPUT"==c||"TEXTAREA"==c?b=a.value:""!=c?b=a.innerHTML:(console.log("trans_err"),console.log(a))}return b||""};this.call_item_callback=function(a,b){this._transCompleteItemCallBack&&this._transCompleteItemCallBack(a,b)};this.check_complete=function(){return this._objs_ch.length==this.idx_ok?($Tip("\u7ffb\u8bd1\u5b8c\u6210"),this._transCompleteCallback&&this._transCompleteCallback(),
!0):!1}}
EWA_ImageCalss={defaultRatio:.7,resize:function(a,b,c,d,e){b=a.naturalWidth/b;c=a.naturalHeight/c;c=b>c?b:c;b=a.naturalWidth/c;c=a.naturalHeight/c;d=d?d:"image/jpeg";e=e||this.defaultRatio;if(isNaN(e)||1<e)e=this.defaultRatio;var g=document.createElement("canvas");g.width=b;g.height=c;ctx1=g.getContext("2d");ctx1.drawImage(a,0,0,a.naturalWidth,a.naturalHeight,0,0,g.width,g.height);return g.toDataURL(d,e)},dataURItoBlob:function(a){var b=a.split(",");a=b[0].match(/:(.*?);/)[1];b=window.atob(b[1]);for(var c=
new Uint8Array(b.length),d=0;d<b.length;d++)c[d]=b.charCodeAt(d);return new Blob([c],{type:a})},resizeAsBlob:function(a,b,c,d,e){a=this.resize(a,b,c,d,e);return this.dataURItoBlob(a)}};function EWA_AddEvent(a,b){if(!top.EWA||!top.EWA.MQE){var c=new EWA_MqeListenerClass;c.CheckId=a;c.FuncName=b;top.EWA.MQE.AddListener(c)}}function EWA_MqeClass(){this.Data=this.Type=this.FromId=null;this.Paras=GetUrlParas(!0);this.IsServer=!1}
function EWA_MqeListenerClass(){this.Win=window;this.FuncName=this.CheckId=null;this.Paras=GetUrlParas(!0);this.LastMsg=null;this.LastResult=!1}
function EWA_MqeManagerClass(){this._Listeners=[];this.UrlServer=null;this.LastTimer=-1;this.Stop=!1;this.AddListener=function(a){this._Listeners.push(a)};this.AddMqe=function(a){window.status=a.FromId+","+a.Type;for(var b=0;b<this._Listeners.length;b++){var c=this._Listeners[b];if(null!=c)for(var d=c.CheckId.split(","),e=0;e<d.length;e++)if(a.FromId==d[e]){var g=this._DoEvent(c,a);!0===g?this._Listeners[b].LastResult=!0:null===g?this._Listeners[b]=null:(this._Listeners[b].LastMsg=g,this._Listeners[b].LastResult=
!1)}}};this._DoEvent=function(a,b){try{var c=eval("w."+a.FuncName);c(b.Type,b.Paras,b.IsServer);return!0}catch(d){return d}};this.CreateServer=function(a,b){var c=new EWA_UrlClass;c.SetUrl(a);c.AddParameter("UNID",b);this.UrlServer=c.GetUrl()};this._GetEvents=function(){var a=new EWA_AjaxClass,b=EWA.MQE,c=b.UrlServer+"&T="+b.LastTimer;a.IsShowWaitting=!1;a.Get(c,function(){if(a.IsRunEnd()){var c=a.GetRst();a.IsError()?window.EWA_AjaxErr&&window.EWA_AjaxErr(c):(c=c.trim(),b.ParseMsg(c),b.Mon())}})};
this.Mon=function(){if(!(0<userAgent.indexOf("ipad")||0<userAgent.indexOf("iphone"))){var a=EWA.MQE;void 0!=a.RunStopParaName&&(a.Stop=!eval("window."+a.RunStopParaName));a.Stop?window.setTimeout(a.Mon,1250):window.setTimeout(a._GetEvents,1250)}};this.ParseMsg=function(a){try{eval("evts="+a)}catch(d){this.Stop=!0;return}if(!(void 0).E)this.Stop=!0;else if(!((void 0).T<this.LastTimer)&&(this.LastTimer=(void 0).T,0!=(void 0).V.length)){var b={};for(a=(void 0).V.length-1;0<=a;a--){var c=(void 0).V[a];
c=c.ID+"--GDX--"+c.TP+"---GDX---"+c.V;b[c]||(b[c]=!0)}for(a=0;a<(void 0).V.length;a++)c=(void 0).V[a],null!=c&&(eval("m1="+c.V),b=new EWA_MqeClass,b.FromId=c.ID,b.Type=c.TP,b.Paras=void 0,b.IsServer=!0,this.AddMqe(b))}}}function EWA_MqeCreate(a,b,c){null==b||0==b.trim().length?alert("unid is blank"):(EWA.MQE=new EWA_MqeManagerClass,EWA.MQE.CreateServer(a,b),void 0!=c&&(EWA.MQE.RunStopParaName=c),EWA.MQE.Mon())};
/* EWA_UI.min.js */
var $jscomp=$jscomp||{};$jscomp.scope={};$jscomp.findInternal=function(a,b,c){a instanceof String&&(a=String(a));for(var d=a.length,e=0;e<d;e++){var f=a[e];if(b.call(c,f,e,a))return{i:e,v:f}}return{i:-1,v:void 0}};$jscomp.ASSUME_ES5=!1;$jscomp.ASSUME_NO_NATIVE_MAP=!1;$jscomp.ASSUME_NO_NATIVE_SET=!1;$jscomp.defineProperty=$jscomp.ASSUME_ES5||"function"==typeof Object.defineProperties?Object.defineProperty:function(a,b,c){a!=Array.prototype&&a!=Object.prototype&&(a[b]=c.value)};
$jscomp.getGlobal=function(a){return"undefined"!=typeof window&&window===a?a:"undefined"!=typeof global&&null!=global?global:a};$jscomp.global=$jscomp.getGlobal(this);$jscomp.polyfill=function(a,b,c,d){if(b){c=$jscomp.global;a=a.split(".");for(d=0;d<a.length-1;d++){var e=a[d];e in c||(c[e]={});c=c[e]}a=a[a.length-1];d=c[a];b=b(d);b!=d&&null!=b&&$jscomp.defineProperty(c,a,{configurable:!0,writable:!0,value:b})}};
$jscomp.polyfill("Array.prototype.find",function(a){return a?a:function(a,c){return $jscomp.findInternal(this,a,c).v}},"es6","es3");$jscomp.checkStringArgs=function(a,b,c){if(null==a)throw new TypeError("The 'this' value for String.prototype."+c+" must not be null or undefined");if(b instanceof RegExp)throw new TypeError("First argument to String.prototype."+c+" must not be a regular expression");return a+""};
$jscomp.polyfill("String.prototype.startsWith",function(a){return a?a:function(a,c){var b=$jscomp.checkStringArgs(this,a,"startsWith");a+="";var e=b.length,f=a.length;c=Math.max(0,Math.min(c|0,b.length));for(var g=0;g<f&&c<e;)if(b[c++]!=a[g++])return!1;return g>=f}},"es6","es3");
$jscomp.polyfill("String.prototype.endsWith",function(a){return a?a:function(a,c){var b=$jscomp.checkStringArgs(this,a,"endsWith");a+="";void 0===c&&(c=b.length);c=Math.max(0,Math.min(c|0,b.length));for(var e=a.length;0<e&&0<c;)if(b[--c]!=a[--e])return!1;return 0>=e}},"es6","es3");"undefined"==typeof EWA&&(EWA={});EWA.UI=EWA.UI||{};
EWA.UI.Postion=function(a){if(null==a)return null;var b=a,c;var d=c=0;do d+=1*b.offsetLeft,c+=1*b.offsetTop,"DIV"==b.tagName&&(d-=b.scrollLeft,c-=b.scrollTop),b=b.offsetParent;while(null!=b&&"BODY"!=b.tagName&&"HTML"!=b.tagName);b=c+1*a.offsetHeight;return{X:d,Y:b,Left:d,Top:c,Width:a.offsetWidth,Height:a.offsetHeight,Right:d+a.offsetWidth,Bottom:b}};
var EWA$UI$COMMON$Move={OnMouseDown:function(a,b,c,d,e){a.setAttribute("D",1);b=EWA$UI$COMMON.Move._Event(a,b);c=EWA$UI$COMMON.Move._EventXY(b);if(null==d||d)a.setAttribute("X",c.X),a.setAttribute("SX",c.X);if(null==e||e)a.setAttribute("Y",c.Y),a.setAttribute("SY",c.Y);"undefined"!=typeof b.preventDefault&&b.preventDefault();"undefined"!=typeof b.stopPropagation?b.stopPropagation():b.cancelBubble=!0},OnMouseUp:function(a){a.setAttribute("D",0)},OnMouseOut:function(a){"1"==a.getAttribute("D")&&a.setAttribute("D",
0)},OnMouseMove:function(a,b){if("1"==a.getAttribute("D")){b=EWA$UI$COMMON.Move._Event(a,b);var c=EWA$UI$COMMON.Move._EventXY(b);if(null!=a.getAttribute("X")){var d=1*a.getAttribute("X");d=c.X-d;a.style.left=1*a.style.left.replace("px","")+d+"px";a.setAttribute("X",c.X)}null!=a.getAttribute("Y")&&(d=1*a.getAttribute("Y"),d=c.Y-d,a.style.top=1*a.style.top.replace("px","")+d+"px",a.setAttribute("Y",c.Y));"undefined"!=typeof b.preventDefault&&b.preventDefault();"undefined"!=typeof b.stopPropagation?
b.stopPropagation():b.cancelBubble=!0}},_Event:function(a,b){return b?b:a.ownerDocument.parentWindow.event},_EventXY:function(a){return EWA.B.IE?{X:a.x,Y:a.y}:{X:a.pageX,Y:a.pageY}}},EWA$UI$COMMON={Move:EWA$UI$COMMON$Move,GetMousePosition:function(a){null==a&&(a=event);return EWA.B.IE?{X:a.x,Y:a.y}:{X:a.pageX,Y:a.pageY}},CreateObject:function(a,b,c,d){a=a.document.createElement(b);null!=c&&0<c.trim().length&&(EWA.B.IE?a.style.cssText=c:a.setAttribute("style",c));null!=d&&d.appendChild(a);return a},
SetStyle:function(a,b){EWA.B.IE?a.style.cssText=b:a.setAttribute("style",b)},GetPosition:function(a){var b=a,c;var d=c=0;do d+=1*b.offsetLeft,c+=1*b.offsetTop,"DIV"==b.tagName&&(d-=b.scrollLeft,c-=b.scrollTop),b=b.offsetParent;while(null!=b&&"BODY"!=b.tagName&&"HTML"!=b.tagName);c+=1*a.offsetHeight;return{X:d,Y:c}},Dispose:function(a){if(EWA.B.IE){if(null!=a.attributes)for(var b=0;b<a.attributes.length;b+=1)null!=a.attributes[b]&&"function"==typeof a.attributes[b]&&(a.attributes[b]=null);for(b=0;b<
a.childNodes.length;b+=1)EWA$UI$COMMON.Dispose(a.childNodes[b])}},Drop:function(a){EWA$UI$COMMON.Dispose(a);a.parentNode.removeChild(a)},AniExpand:function(a,b,c,d,e){if(null==d||0>=d)d=10;var f=0,g=b/(1*d),h=c/(1*d),k=a.clientWidth+b,m=a.clientHeight+c,l=window.setInterval(function(){var b=EWA$UI$COMMON.GetObjSize(a);if(f<d-1){var c=b.H+h,n=b.W+g;c>m&&(c=m);n>k&&(n=k);EWA$UI$COMMON.SetSize(a,n,c)}else EWA$UI$COMMON.SetSize(a,k,m);n=EWA$UI$COMMON.GetObjSize(a);c=n.W-b.W;n=n.H-b.H;b=EWA$UI$COMMON.GetPosition(a);
b.Y=b.Y-a.clientHeight-1*a.style.borderTopWidth.replace("px","")-1*a.style.borderBottomWidth.replace("px","");"LEFT_TOP"!=e&&("LEFT_BOTTOM"==e?(n=b.Y-n,c=b.X,EWA$UI$COMMON.MoveTo(a,c,n)):"RIGHT_TOP"==e?(n=b.Y,c=b.X-c,EWA$UI$COMMON.MoveTo(a,c,n)):"RIGHT_BOTTOM"==e?(n=b.Y-n,c=b.X-c,EWA$UI$COMMON.MoveTo(a,c,n)):(n=1*b.Y-n/2,c=1*b.X-c/2,EWA$UI$COMMON.MoveTo(a,c,n),EWA._TmpAniObj=a));f++;f>=d&&(window.clearInterval(l),EWA.UI.Utils.AniExpandCompleateFunction&&(EWA.UI.Utils.AniExpandCompleateFunction(),
EWA.UI.Utils.AniExpandCompleateFunction=null))},12)},AniExpandTo:function(a,b,c,d,e){if(null==d||0>=d)d=10;var f=EWA$UI$COMMON.GetObjSize(a);this.AniExpand(a,b-f.W,c-f.H,d,e)},SetSize:function(a,b,c){a.style.width=b+"px";a.style.height=c+"px"},MoveTo:function(a,b,c){a.style.left=b+"px";a.style.top=c+"px"},MoveCenter:function(a){var b=this._GetOwnerWindow(a),c=this.GetObjSize(a);b=this.GetDocSize(b);this.MoveTo(a,(b.W-c.W)/2,(b.H-c.H)/2)},GetObjSize:function(a){return{H:a.clientHeight,W:a.clientWidth}},
GetDocSize:function(a){null==a&&(a=window);var b=a.document;return{W:b.body.clientWidth,H:"CSS1Compat"==b.compatMode?b.documentElement.clientHeight:b.body.clientHeight,SH:a.document.body.scrollTop,SW:a.document.body.scrollLeft}},_GetOwnerWindow:function(a){return EWA.B.IE?a.ownerDocument.parentWindow:a.ownerDocument.defaultView}};EWA.UI.Utils=EWA$UI$COMMON;EWA.UI.ImgResize=function(a,b,c){};
function EWA_ChkIframeOk(a,b){var c=a.contentWindow;c.location&&"about:blank"!=c.location.href&&c.document&&"complete"==c.document.readyState?b&&b(c,a):setTimeout(function(){EWA_ChkIframeOk(a,b)},111)}
EWA.UI.Utils.FadeIn=function(a,b,c,d,e){a!=b&&(b.setAttribute("alpha",100),a.style.display="",a.style.zIndex=-1E3,a.style.filter="Alpha(Opacity=100)",a.style.opacity=1,b.style.zIndex=1E3,b.style.display="",b.style.filter="Alpha(Opacity=100)",b.style.opacity=1,EWA.UI.Utils.FADE_IN_OBJ=a,EWA.UI.Utils.FADE_OUT_OBJ=b,EWA.UI.Utils.FADE_STEP=c,EWA.UI.Utils.FADE_TIME_SPAN=d,EWA.UI.Utils.FADE_AFTER=e,window.setTimeout(EWA.UI.Utils.FadeInTimer,EWA.UI.Utils.FADE_TIME_SPAN))};
EWA.UI.Utils.FadeInTimer=function(){try{var a=1*EWA.UI.Utils.FADE_OUT_OBJ.getAttribute("alpha")-EWA.UI.Utils.FADE_STEP;EWA.UI.Utils.FADE_OUT_OBJ.setAttribute("alpha",a);if(0>=a){EWA.UI.Utils.FADE_OUT_OBJ.style.display="none";EWA.UI.Utils.FADE_OUT_OBJ.setAttribute("alpha",0);EWA.UI.Utils.FADE_OUT_OBJ.style.filter="Alpha(Opacity=100)";EWA.UI.Utils.FADE_OUT_OBJ.style.opacity=1;EWA.UI.Utils.FADE_AFTER.ChangeAfter();EWA.UI.Utils.FADE_IN_OBJ=null;EWA.UI.Utils.FADE_OUT_OBJ=null;EWA.UI.Utils.FADE_STEP=null;
EWA.UI.Utils.FADE_TIME_SPAN=null;EWA.UI.Utils.FADE_AFTER=null;return}EWA.UI.Utils.FADE_OUT_OBJ.style.filter="Alpha(Opacity="+a+")";EWA.UI.Utils.FADE_OUT_OBJ.style.opacity=1*a/100}catch(b){}window.setTimeout(EWA.UI.Utils.FadeInTimer,EWA.UI.Utils.FADE_TIME_SPAN)};
function EWA_UI_ExcelClass(){this._Tb=null;this._HeaderRowSize=1;this._ClassName="";this._LeftColSize=1;this._ScrollParent=this._LeftHeader=this._DivLeft=this._DivTop=this._Height=this._Left=this._Top=null;this.Init=function(a,b,c,d,e){this._Tb=a;var f=$(a).offset();this._Top=f.top;this._Left=f.left;this._Height=$(a).parent()[0].clientHeight;this._HeaderRowSize=b;this._LeftColSize=c;this._ClassName=d;this._ScrollParent=e||document.body;this._Create()};this._Create=function(){var a=this._Tb,b=a.cloneNode(!0);
b.removeAttribute("onmouseout");b.removeAttribute("onmousedown");b.removeAttribute("onmouseover");$(b).css("width",$(a).width());for(var c=b.rows.length-1;c>=this._HeaderRowSize;c--)b.deleteRow(c);for(var d=0;d<this._HeaderRowSize;d++){var e=b.rows[d],f=a.rows[d];for(c=0;c<e.cells.length;c++){var g=f.cells[c];$(e.cells[c]).css("width",$(g).width())}}this._DivTop=document.createElement("div");this._DivTop.id="tb_header_con"+this._ClassName;c={position:"fixed",display:"none",top:0,left:this._Left+0,
overflow:"hidden"};$(this._DivTop).css(c);$(this._DivTop).append(b);$(this._Tb).parent().append(this._DivTop);this._LeftHeader=this._Left+0;b=a.cloneNode(!0);b.removeAttribute("onmouseout");b.removeAttribute("onmousedown");b.removeAttribute("onmouseover");$(b).find("td").attr("id",null);a=a.rows[0].cells[0].offsetWidth+2;this._DivLeft=document.createElement("div");this._DivLeft.id="tb_sidebar_con"+this._ClassName;this._DivLeft.appendChild(b);this._DivLeft.style.position="fixed";this._DivLeft.style.top=
this._Top+"px";this._DivLeft.style.left=this._Left+"px";this._DivLeft.style.overflow="hidden";this._DivLeft.style.width=a+"px";this._DivLeft.style.height=this._Height+"px";$(this._Tb).parent().append(this._DivLeft);var h=this;try{this._ScrollParent.onscroll=function(){try{h.OnScroll()}catch(k){console.log(k)}}}catch(k){console.log(k)}console.log(this._ScrollParent.onscroll)};this.OnScroll=function(){this._ScrollParent.scrollTop>this._Top&&(this._ScrollParent.scrollTop<this._Top+this._Height||this._ScrollParent!=
document.body)?(this._DivTop.style.display="",$(this._DivTop).css({left:this._LeftHeader-this._ScrollParent.scrollLeft})):this._DivTop.style.display="none";$(this._DivLeft).css({top:this._Top-this._ScrollParent.scrollTop,height:this._Height+this._ScrollParent.scrollTop})}}
EWA.UI.Move=function(){this._BackgroundObjectList=[];this._MoveObjectList=[];this._MaxIndex=199999;this.IsMoveY=this.IsMoveX=!0;this.MoveStep=1;this.Init=function(a){addEvent(document.body,"mousedown",function(b){a.OnMouseDown(b)});addEvent(document.body,"mousemove",function(b){a.OnMouseMove(b)});addEvent(document.body,"mouseup",function(b){a.OnMouseUp(b)});EWA_COMMON_MV_OBJECT=null};this.AddBackgroundObjs=function(a){for(var b=0;b<a.length;b++)this.AddBackgroundObj(a[b])};this.ReCalcBackgroundObjs=
function(){for(var a=0;a<this._BackgroundObjectList.length;a++){var b=this._BackgroundObjectList[a],c=EWA.UI.Utils.GetPosition(b.obj),d=EWA.UI.Utils.GetObjSize(b.obj);b.x0=c.X;b.x1=c.X+d.W;b.y0=c.Y-d.H;b.y1=c.Y}};this.AddBackgroundObj=function(a){var b=EWA.UI.Utils.GetPosition(a),c=EWA.UI.Utils.GetObjSize(a);this._BackgroundObjectList.push({x0:b.X,x1:b.X+c.W,y0:b.Y-c.H,y1:b.Y,obj:a})};this.CheckBackgroundObj=function(a,b){for(var c in this._BackgroundObjectList){var d=this._BackgroundObjectList[c];
if(d.x0<=a&&d.x1>=a&&d.y0<=b&&d.y1>=b)return d}};this.ClearLastBackgroundObj=function(){this.LastCheckedBackground&&(this.LastCheckedBackground.obj.style.backgroundColor=this.LastCheckedBackground.obj.getAttribute("_mv_last_bc"),this.LastCheckedBackground=null)};this.ClearAll=function(){for(var a=0;a<this._MoveObjectList.length;a++){var b=this._MoveObjectList[a];b.B.parentNode&&b.B.parentNode.removeChild(b.B)}this._MoveObjectList=[]};this.AddMoveObject=function(a,b,c,d,e,f){a.setAttribute("ewa_move",
1);a.setAttribute("ewa_move_type","MOVE");d=null==d?null:EWA.UI.Postion(d);this._MoveObjectList.push({A:a,B:b,JS:c,T:"MOVE",MOVE_X:!0,MOVE_Y:!0,L:d,JSM:e,JS_MOUSE_DOWN:f})};this.AddMoveObjectX=function(a,b,c,d,e,f){a.setAttribute("ewa_move",1);a.setAttribute("ewa_move_type","MOVE");d=null==d?null:EWA.UI.Postion(d);this._MoveObjectList.push({A:a,B:b,JS:c,T:"MOVE",MOVE_X:!0,MOVE_Y:!1,L:d,JSM:e,JS_MOUSE_DOWN:f})};this.AddMoveObjectY=function(a,b,c,d,e,f){a.setAttribute("ewa_move",1);a.setAttribute("ewa_move_type",
"MOVE");d=null==d?null:EWA.UI.Postion(d);this._MoveObjectList.push({A:a,B:b,JS:c,T:"MOVE",MOVE_X:!1,MOVE_Y:!0,L:d,JSM:e,JS_MOUSE_DOWN:f})};this.AddSizeObject=function(a,b,c,d,e,f,g){a.setAttribute("ewa_move",1);a.setAttribute("ewa_move_type","SIZE");b.style.width=b.clientWidth+"px";d=null==d?null:EWA.UI.Postion(d);e=e?EWA.UI.Postion(b):null;this._MoveObjectList.push({A:a,B:b,JS:c,T:"SIZE",L:d,M:e,JSM:f,JS_MOUSE_DOWN:g})};this.OnMouseDown=function(a){var b=this._GetEventTarget(a);null!=b&&(b=this._GetObject(b),
null!=b&&"1"==b.A.getAttribute("ewa_move")&&(a=this._GetEventXY(a),this._MaxIndex++,b.B.style.zIndex=this._MaxIndex,b.B.setAttribute("_EWA_MOUSE_DOWN",1),b.B.setAttribute("_EWA_MOUSE_X",a.X),b.B.setAttribute("_EWA_MOUSE_Y",a.Y),"absolute"!=$(b.B).css("position")&&(a=$(b.B).position(),b.B.style.position="absolute",b.B.style.left=a.left+"px",b.B.style.top=a.top-b.B.clientHeight+"px"),EWA_COMMON_MV_OBJECT=b,this.ReCalcBackgroundObjs(),b.JS_MOUSE_DOWN&&b.JS_MOUSE_DOWN(b)))};this.OnMouseMove=function(a){if(null!=
EWA_COMMON_MV_OBJECT){var b=EWA_COMMON_MV_OBJECT,c=b.B;if("1"==c.getAttribute("_EWA_MOUSE_DOWN")){a=this._GetEventXY(a);var d=1*c.getAttribute("_EWA_MOUSE_X"),e=1*c.getAttribute("_EWA_MOUSE_Y"),f=a.X-d,g=a.Y-e;if(!(Math.abs(f)<this.MoveStep&&Math.abs(g)<this.MoveStep)){e=b.L;d=1*$(c).css("left").replace("px","")+f;var h=1*$(c).css("top").replace("px","")+g;if("MOVE"==b.T)null==e?(0>d&&(d=0),0>h&&(h=0)):(f=c.offsetWidth,g=c.offsetHeight,d<e.Left?d=e.Left:d+f>e.Right&&(d=e.Right-f),h<e.Top?h=e.Top:
h+g>e.Bottom&&(h=e.Bottom-g)),this.IsMoveX&&b.MOVE_X&&(c.style.left=d+"px"),this.IsMoveY&&b.MOVE_Y&&(c.style.top=h+"px");else{var k=1*c.style.width.replace("px","")+f,m=1*c.style.height.replace("px","")+g;10>k&&(k=10);10>m&&(m=10);if(null!=e)if(null!=b.M){var l=1*b.M.Width/b.M.Height;if(1==l){c.style.width.replace("px","");a=Math.sqrt(f*f+g*g);if(0<g||0>f)a*=-1;a={left:$(c).position().left-a/4,top:$(c).position().top-a/4,width:$(c).width()+a/2,height:$(c).height()+a/2};if(a.height+a.top>e.Bottom||
a.top<e.Top||a.left+a.width>e.Right||a.left<e.Left||50>a.width)return;$(c).css(a);b.JSM&&b.JSM(b.B,b.A);return}f=k/m;f>l?m=k/l:f<l&&(k=m*l);d+k>e.Right&&(k=e.Right-d,m=k/l);h+m>e.Bottom&&(m=e.Bottom-h,k=m*l)}else d+k>e.Right&&(k=e.Right-d),h+m>e.Bottom&&(m=e.Bottom-h);this.IsMoveX&&(c.style.width=k+"px");this.IsMoveY&&(c.style.height=m+"px")}c.setAttribute("_EWA_MOUSE_X",a.X);c.setAttribute("_EWA_MOUSE_Y",a.Y);b.JSM&&b.JSM(b.B,b.A);(b=this.CheckBackgroundObj(a.X,a.Y))?b!=this.LastCheckedBackground&&
(this.LastCheckedBackground&&(this.LastCheckedBackground.obj.style.backgroundColor=this.LastCheckedBackground.obj.getAttribute("_mv_last_bc")),this.LastCheckedBackground=b,b.obj.setAttribute("_mv_last_bc",b.obj.style.backgroundColor),b.obj.style.backgroundColor="lightyellow"):this.LastCheckedBackground&&(this.LastCheckedBackground.obj.style.backgroundColor=this.LastCheckedBackground.obj.getAttribute("_mv_last_bc"))}}}};this.OnMouseUp=function(a){a=EWA_COMMON_MV_OBJECT;if(null!=a){for(var b=0;b<this._MoveObjectList.length;b++)this._MoveObjectList[b].B.setAttribute("_EWA_MOUSE_DOWN",
0);null!=a.JS&&a.JS(a.B,a.A);EWA_COMMON_MV_OBJECT=null}};this._GetObject=function(a){for(var b=0;b<this._MoveObjectList.length;b++){var c=this._MoveObjectList[b].A;if(c==a)return this._MoveObjectList[b]}for(b=0;b<this._MoveObjectList.length;b++){c=this._MoveObjectList[b].A;c=c.getElementsByTagName(a.tagName);for(var d=0;d<c.length;d++){var e=this._MoveObjectList[b];if(c[d]==a)return e}}return null};this._GetEventTarget=function(a){return EWA.B.IE?event.srcElement:a.target};this._GetEventXY=function(a){return EWA.B.IE?
{X:a.x,Y:a.y}:{X:a.pageX,Y:a.pageY}}};function EWA_UI_MenuItemClass(){this.Group=this.Cmd=this.Txt=this.Img=null}
function EWA_UI_MenuClass(a){this.ClassName=a;this.MenuShowType="";this.Dialog=null;this.Dialogs=[];this._ItemsDiv=this._LastObj=null;this.Click=function(a,c){"LEFT"!=this.MenuShowType&&(null!=this._LastObj&&(this._LastObj.className=this._LastObj.className.replace("_mv1","")),this._LastObj=null,"undefined"!=typeof a.stopPropagation?a.stopPropagation():a.cancelBubble=!0,this._HiddenDialogs());EWA.C.Utils.RunCmd(c)};this.OnClick=function(a,c){if("LEFT"==this.MenuShowType){var b=c.parentNode,e=c.parentNode.parentNode.childNodes[1];
if(null==e)return;0==e.childNodes.length?(this._LastCkObj&&(this._LastCkObj.style.backgroundColor=""),b.style.backgroundColor="#ccc",this._LastCkObj=b):(e.style.display="none"==e.style.display?"":"none",window.event?a.cancelBubble=!0:a.stopPropagation())}else if(""==c.getAttribute("EWA_MF_PID")&&(this._HiddenDialogs(),0>=this.Dialogs.length&&this.Dialogs.push(this._CreateDialog()),0<this._ShowPullDownMenu(c,this.Dialogs[0]))){this.ShowByObject(c,this.Dialogs[0],0);return}this.Click(a,c)};this._CalcLevel=
function(a){for(var b=0;""!=a.getAttribute("EWA_MF_PID");)if(b+=1,a=document.getElementById(a.getAttribute("EWA_MF_PID")),null==a)return null;return b};this._ShowPullDownMenu=function(a,c){for(var b=$X(c.FrameContent).childNodes[0].rows[0].cells[0];0<b.childNodes.length;)this._ItemsDiv.appendChild(b.childNodes[0]);for(var e=[],f=0;f<this._ItemsDiv.childNodes.length;f++){var g=this._ItemsDiv.childNodes[f];0<g.innerHTML.toUpperCase().indexOf("<HR")||(g.style.paddingRight="10px");g.getAttribute("EWA_MF_PID")==
a.id&&e.push(g)}a=e.length;for(f=0;f<e.length;f++){b.appendChild(e[f]);if(this._CheckChildren(e[f].id)){g=e[f].childNodes[0].rows[0].cells[2];if(null==g.getAttribute("gdx")||""==g.getAttribute("gdx"))g.innerHTML+=" +",g.setAttribute("gdx","gdx");e[f].setAttribute("EWA_MF_CHILD","1")}else e[f].setAttribute("EWA_MF_CHILD","0");e[f]=null}e.length=0;$X(c.FrameContent).childNodes[0].style.height="auto";return a};this._CheckChildren=function(a){for(var b=0;b<this._ItemsDiv.childNodes.length;b++)if(this._ItemsDiv.childNodes[b].getAttribute("EWA_MF_PID")==
a)return!0;return!1};this.InstallMenus=function(a,c,d){if("METRO"==d){var b=[],f={};$(".ewa_menu_m").each(function(){var a=$(this),c={};c.id=a.attr("id");c.pid=a.attr("EWA_MF_PID");c.url=a.attr("EWA_CMD");c.icon=a.find(".ewa_menu_m0").attr("class");c.title=a.text().trim();c.icon&&(c.icon=c.icon.replace("ewa_menu_m0","").trim());""==c.pid?(c.pid="0",c.subs=[],f[c.id]=c,b.push(c)):f[c.pid].subs.push(c)});EWA_UI_Metro.menus=b;EWA_UI_Metro.add_menus(b,"EWA_FRAME_MAIN","item",null,null,!0)}else{this.MenuShowType=
d;d=$X(a);var g=$X(c);if(null==g)alert("MenuShow defined error ("+c+")");else{this._ItemsDiv=d;c=[];g.innerHTML="<table onselectstart='return false' style='cursor:pointer;-moz-user-select:none;' border=0 cellspacing=0 cellpadding=0></table>";g=g.childNodes[0];for(var h=0;h<d.childNodes.length;h++){var k=d.childNodes[h];"DIV"==k.tagName&&""==k.getAttribute("EWA_MF_PID")&&c.push(k)}if(""==this.MenuShowType||"TOP"==this.MenuShowType)for(g.insertRow(-1),h=0;h<c.length;h++)g.rows[0].insertCell(-1).appendChild(c[h]);
else g.style.width="100%",this._InstallMenusLeft(g,d,c,a);c.length=0;c=null}}};this._InstallMenusLeft=function(a,c,d,e){for(var b=0;b<d.length;b++){var g=a.insertRow(-1).insertCell(-1);e=document.createElement("div");e.innerHTML='<div class="ewa_lmenu_bar" des="rq1"></div><div  des="rq2"></div>';e.childNodes[1].style.paddingLeft="5px";g.appendChild(e);d[b].style.height="100%";e.childNodes[0].appendChild(d[b]);0<b&&(e.childNodes[1].style.display="none")}for(a=c.childNodes;0<c.childNodes.length;)d=
a[0],b=d.getAttribute("EWA_MF_PID"),e=document.createElement("div"),e.innerHTML='<div class="ewa_lmenu_bar1"></div><div style="padding-left:4px;display:none"></div>',$X(b).parentNode.parentNode.childNodes[1].appendChild(e),e.childNodes[0].appendChild(d)};this._CreateDialog=function(){var a=new EWA_UI_DialogClass;a.Create();a.SetHtml("<table class='ewa_menu_down' border=0 width=100 cellspacing=0 cellpadding=0 onmousemove='window."+this.ClassName+".IsOut=false;' onmouseout='window."+this.ClassName+
".IsOut=true; window.setTimeout(function(){var a=window."+this.ClassName+";a.AutoHidden();},1410);' onselectstart='return false' style='cursor:pointer;-moz-user-select:none;' ><tr><td></td></tr></table>");return a};this.AutoHidden=function(){this.IsOut&&this._HiddenDialogs()};this.Create=function(a){if(null!=a&&0!=a.length){this.Dialog=new EWA_UI_DialogClass;this.Dialog.Create();var b=[];b.push("<div class='ewa_menu_box' onmousemove='window."+this.ClassName+".IsOut=false;' onmouseout='window."+this.ClassName+
".IsOut=true; var t1=new Date().getTime(); if(t1-$(this).attr(&quot;open_time&quot;)>1000){ window.setTimeout(function(){var a=window."+this.ClassName+";a.AutoHidden(this);},1410);}'  onselectstart='return false' style='width:120px;cursor:pointer;-moz-user-select:none;'>");for(var d=0;d<a.length;d+=1){var e=a[d];b.push("<div class='ewa_menu_m' EWA_MG=\""+e.Group+"\" style='cursor:pointer' EWA_CMD=\""+e.Cmd+"\" onclick='"+this.ClassName+".Click(event,this);' onmouseover='"+this.ClassName+".MouseOver(this);'><table boder=0 width=100% cellpadding=0 cellspacing=0>");
0<=e.Txt.toUpperCase().indexOf("<HR")?b.push("<tr><td colspan=2 style='white-space:nowrap'>"+e.Txt+"</td></tr></table></div>"):(b.push("<tr><td class='ewa_menu_m0'>"),e=a[d].Img,null!=e&&0>e.indexOf("index=0,size=0")&&0<e.trim().length&&(0<=e.indexOf("fa")?b.push('<i class="'+e+'"></i>'):b.push('<img src="'+a[d].Img+'">')),b.push("</td><td class='ewa_menu_m1' style='white-space:nowrap'>"+a[d].Txt+"</td></tr></table></div>"))}b.push("</div>");this.Dialog.SetHtml(b.join(""))}};this.HiddenMemu=function(){this.Dialog.Show(!1);
EWA.UI.CurMenu=null};this.ShowByObject=function(a,c,d){var b=EWA.UI.Utils.GetPosition(a);this.SHOW_BY_OBJECT=a;c=c||this.Dialog;null==d||0==d?c.Move(b.X,b.Y):c.Move(b.X+a.offsetWidth-5,b.Y-a.offsetHeight+4);c.Show(!0);$(c.GetFrame()).find(".ewa_menu_box").attr("open_time",(new Date).getTime());c.ResizeByContent()};this.ShowByMouse=function(a,c){var b=0,e=$X(this.Dialog.FrameContent).childNodes[0];if(null==c)b=e.childNodes.length;else for(var f=0;f<e.childNodes.length;f++)e.childNodes[f].getAttribute("EWA_MG")==
c||null==c||""==c?(e.childNodes[f].style.display="",b++):e.childNodes[f].style.display="none";0<b?(c=a.x?a.x:a.pageX,a=a.y?a.y:a.pageY,a+=document.body.scrollTop,c+=document.body.scrollLeft,this.Dialog.Move(c,a),this.Dialog.Show(!0),this.Dialog.ResizeByContent()):this.Dialog.Show(!1)};this.MouseOver=function(a){null!=this._LastObj&&("LEFT"==this.MenuShowType?this._LastObj.parentNode.className=this._LastObj.parentNode.className.replace("_mv",""):this._LastObj.className=this._LastObj.className.replace("_mv1",
""));if("LEFT"==this.MenuShowType)this._LastObj=a,this._LastObj.parentNode.className+="_mv";else{this._LastObj=a;this.IsOut=!1;this._LastObj.className+="_mv1";null==EWA.UI.CurMenu&&(EWA.UI.CurMenu=this);var b=this._CalcLevel(a);"1"==a.getAttribute("EWA_MF_CHILD")&&(this.Dialogs.length<=b&&this.Dialogs.push(this._CreateDialog()),this._ShowPullDownMenu(a,this.Dialogs[b]),this.ShowByObject(a,this.Dialogs[b],b))}};this._HiddenDialogs=function(){null!=this.Dialog&&this.Dialog.Show(!1);for(var a=0;a<this.Dialogs.length;a++){this.Dialogs[a].Show(!1);
for(var c=$X(this.Dialogs[a].FrameContent).childNodes[0].rows[0].cells[0];0<c.childNodes.length;)this._ItemsDiv.appendChild(c.childNodes[0])}};this._InitEvent=function(){"LEFT"!=this.MenuShowType&&(EWA.B.IE?document.body.attachEvent("onclick",function(){"undefined"!=typeof EWA.UI.CurMenu&&EWA.UI.CurMenu._HiddenDialogs()}):document.body.addEventListener("click",function(){"undefined"!=typeof EWA.UI.CurMenu&&EWA.UI.CurMenu._HiddenDialogs()}))}}
var EWA_UI_Metro={show_title:function(a){if(""==a.getAttribute("_title")||null==a.getAttribute("_title")){var b=a.title;if(""==b||null==b)return;a.setAttribute("_title",b);a.title=""}$(".pop_title div").html(a.getAttribute("_title"));b=$(a).offset();a=$(a).width();var c=$(".pop_title").height(),d=$(".pop_title").width();$(".pop_title").css("top",b.top-c-8);$(".pop_title").show();$(".pop_title").css("left",b.left-(d-a)/2)},item_click:function(a){var b=$(a);a=b.attr("u");b=b.attr("_title");a&&(a.startsWith("js:")?
(a=a.replace("js:",""),eval(a)):(0<a.indexOf("/")||(a=0<=a.indexOf("?")?EWA.CP+"/EWA_STYLE/cgi-bin/"+a:EWA.CP+"/EWA_STYLE/cgi-bin/?"+a),top.AddTab(a,b)))},add_menus:function(a,b,c,d,e,f){this.g_menu_cols=window.g_menu_cols||6;this.g_menu_rows=window.g_menu_rows||3;this.menuLoadInRight=window.menuLoadInRight||!1;d=d||this.g_menu_cols;e=e||this.g_menu_rows;for(var g=0;g<a.length;g++){var h=a[g];if(h&&h.icon&&0<h.icon.indexOf("gear")){a[g]=null;a[d*e-1]=h;break}}var k=document.createElement("table");
$X(b).innerHTML="";$X(b).className="ewa-metro-menu";$X(b).appendChild(k);$($X(b)).append('<div class="pop_title" style="display: none;"><div>-</div><p></p></div>');$($X(b)).css("background","transparent").css("border",0);k.align="center";var m=0,l=[];for(g=0;g<e;g++){var p=b+"_htr_"+g;h=k.insertRow(-1);h.id=p;var q=h.insertCell(-1);q.colSpan=d;h.style.display="none";q.id=p+"a";q=k.insertRow(-1);for(var n=0;n<d;n++){h=a[m];m++;var r=this.add_menu_item(q,h,f,m,c,p);h&&(r.id="M_"+h.id);r&&h&&(null==
h.all||1==h.all)&&l.push(r.innerHTML)}}!this._is_load_main_menu&&this.menuLoadInRight&&(parent.$("#RIGHT").html(l.join("")),parent.$("#RIGHT .item").each(function(){$(this).append($(this).attr("_title"));$(this).attr("onmouseout",null);$(this).attr("onmouseover",null);$(this).attr("onclick","EWA_UI_Metro.right_show_menu_sub(this,event)")}));this._is_load_main_menu=!0},add_menu_item:function(a,b,c,d,e,f){if(c||b){var g=a.insertCell(-1);g.innerHTML="<div class='"+e+"'><i id='memu_item_"+d+"'></i></div>"}if(b)return a=
$(g).find("i"),c=a.parent(),b.icon&&0<b.icon.trim().length?0==b.icon.indexOf("fa")?a.attr("class",b.icon):(c.append("<table width=100% height=100%><tr><td align=center><img style='max-width:90%;max-height:90%' src='"+b.icon+"' /></td></tr></table>"),a.hide()):b.img&&(c.append("<table width=100% height=100%><tr><td align=center><img  src='"+b.img+"' /></td></tr></table>"),a.hide()),c.attr("_title",b.title),c.attr("onmouseover","EWA_UI_Metro.show_title(this)"),c.attr("onmouseout","$('.pop_title').hide()"),
c.attr("hid",f),b.url?(c.attr("u",b.url),c.attr("onclick","EWA_UI_Metro.item_click(this,event)")):b.subs&&(c.attr("subs",JSON.stringify(b.subs)),c.attr("onclick","EWA_UI_Metro.show_menu_sub(this,event)")),g.id="M_"+b.id,g},show_menu_sub:function(a){var b=$(a),c=b.attr("class"),d=b.attr("hid");window.last_open&&window.last_open!=a&&window.last_open.click();if(1==b.attr("is_open"))b.attr("is_open","0"),$X(d).style.display="none",window.last_open=null,b.attr("class",c.split(" ")[0]);else{b.attr("is_open",
"1");var e=JSON.parse(a.getAttribute("subs"));$X(d).style.display="";$X(d).style.opacity=0;EWA_UI_Metro.add_menus(e,d+"a","item_sub",9,Math.round(e.length/9+.4),!1);b.attr("class",c+" open");$($X(d)).animate({opacity:1},300);window.last_open=a;EWA_UI_Metro.load_msg_sub()}this.show_menu_sub_after&&this.show_menu_sub_after(a)},css:function(){if(!this._css_setted){var a=[];a.push(".nav_box {");a.push("margin: auto;");a.push("margin-top: 50px;");a.push("}");a.push(".nav_box .item {");a.push("margin: 5px;");
a.push("background-color: #08c;");a.push("width: 140px;");a.push("height: 140px;");a.push("text-align: center;");a.push("color: #fff;");a.push("transition-duration: 0.3s;");a.push("-webkit-transition-duration: 0.3s;");a.push("cursor: pointer;");a.push("position: relative;");a.push("}");a.push(".nav_box .item .msg {");a.push("position: absolute;");a.push("top: -8px;");a.push("right: -8px;");a.push("height: 18px;");a.push("border-radius: 10px;");a.push("background-color: red;");a.push("color: #fff;");
a.push("line-height: 18px;");a.push("text-align: center;");a.push("min-width: 18px;");a.push("padding: 2px;");a.push("box-shadow: 1px 1px 13px rgba(0, 0, 245, 0.7);");a.push("}");a.push(".nav_box .open {");a.push("-webkit-transform: rotate(45deg) scale(0.7);");a.push("-webkit-transition-duration: 0.7s;");a.push("transform: rotate(45deg) scale(0.7);");a.push("transition-duration: 0.7s;");a.push("}");a.push(".nav_box .open i {");a.push("transform: rotate(-45deg);");a.push("-webkit-transform: rotate(-45deg);");
a.push("}");a.push(".nav_box .item:hover {");a.push("background-color: #fff;");a.push("color: #08c;");a.push("-webkit-transition-duration: 0.3s;");a.push("transition-duration: 0.3s;");a.push("}");a.push(".nav_box .item i {");a.push("line-height: 140px;");a.push("font-size: 60px;");a.push("}");a.push(".nav_box .item img {");a.push("max-height: 100px;");a.push("max-width: 100px;");a.push("}");a.push(".nav_box .item_sub {");a.push("margin: 12px;");a.push("background-color: darkorange;");a.push("width: 70px;");
a.push("height: 70px;");a.push("text-align: center;");a.push("color: #fff;");a.push("-webkit-transition-duration: 0.3s;");a.push("transition-duration: 0.3s;");a.push("cursor: pointer;");a.push("position: relative;");a.push("}");a.push(".nav_box .item_sub .msg {");a.push("position: absolute;");a.push("top: -8px;");a.push("right: -8px;");a.push("height: 18px;");a.push("border-radius: 10px;");a.push("background-color: #fff;");a.push("color: red;");a.push("line-height: 18px;");a.push("text-align: center;");
a.push("min-width: 18px;");a.push("padding: 2px;");a.push("box-shadow: 1px 1px 13px rgba(255, 0, 0, 0.7);");a.push("}");a.push(".nav_box .item_sub i {");a.push("line-height: 70px;");a.push("font-size: 30px;");a.push("}");a.push(".nav_box .item_sub:hover {");a.push("background-color: #fff;");a.push("color: darkorange;");a.push("-webkit-transition-duration: 0.3s;");a.push("transition-duration: 0.3s;");a.push("}");a.push(".pop_title{ position: absolute;min-width: 50px;display: none;z-index: 212;white-space: nowrap;}");
a.push(".pop_title div {position: relative;width: 100%;z-index: 2;height: 30px;line-height: 30px;text-align: center;background-color: #8D8804;padding: 0 4px;border-radius: 5px;color: #fff;}");a.push(".pop_title p {");a.push("position: relative;");a.push("padding: 0px;");a.push("height: 12px;");a.push("width: 12px;");a.push("transform: rotate(45deg);");a.push("-webkit-transform: rotate(45deg);");a.push("margin: auto;");a.push("margin-top: -6px;");a.push("z-index: 1;");a.push("background-color: #8D8804;");
a.push("}");var b=document.createElement("style");b.textContent=a.join("\n");document.getElementsByTagName("head")[0].appendChild(b);this._css_setted=!0}},right_show_menu_sub:function(a,b){b=b||event;if("item"==(b.target||b.srcElement).className){b=$(a);var c=this.right_add_menu_subs(a);window.last_open&&window.last_open!=a&&window.last_open.click();1==b.attr("is_open")?(b.attr("is_open","0"),c&&(c.style.display="none"),window.last_open=null):(b.attr("is_open","1"),c&&(c.style.display=""),window.last_open=
a)}},right_add_menu_subs:function(a){var b=("M_"+Math.random()).replace(".","");a.id=a.id||b;var c=a.id+"_s";if($X(c))return $X(c);var d;(b=a.getAttribute("subs"))&&(d=JSON.parse(b));if(d&&0!=d.length){b=document.createElement("div");b.id=c;a.appendChild(b);for(a=0;a<d.length;a++){c=d[a];var e=document.createElement("p");$(e).attr({onclick:"EWA_UI_Metro.right_item_click(this)",_title:c.title,u:c.url});e.innerHTML="<b class='"+c.icon+"'></b><span>"+c.title+"</span>";b.appendChild(e)}return b}this.right_item_click(a)},
right_item_click:function(a){var b=$(a);a=b.attr("u");b=b.attr("_title");a&&(0<a.indexOf("/")||(a=0<=a.indexOf("?")?EWA.CP+"/EWA_STYLE/cgi-bin/"+a:EWA.CP+"/EWA_STYLE/cgi-bin/?"+a),AddTab(a,b))},load_msg_sub:function(){}},__Menu={C:EWA_UI_MenuClass,OnMouseOver:function(a){null!=__Menu._LastObj&&(__Menu._LastObj.style.backgroundColor="");__Menu._LastObj=a;a.style.backgroundColor="#DDD"},OnClick:function(a,b){null!=__Menu._LastObj&&(__Menu._LastObj.style.backgroundColor="");__Menu._LastObj=null;"undefined"!=
typeof a.stopPropagation?a.stopPropagation():a.cancelBubble=!0;if(0<b.id.indexOf("_EWA_MF_")&&0<b.id.indexOf("*")){a=b.id.split("*")[0];a=document.getElementById(a);for(var c=0;c<a.childNodes.length;c++){var d=a.childNodes[c];d.getAttribute("EWA_MF_PID")==a.id&&alert(d.innerHTML)}}EWA.C.Utils.RunCmd(b)}};EWA.UI.Menu=__Menu;var __EMP_TIP_TIMER_SHOW,__EMP_TIP_CLASS;function EMP_TIP_HIDE(){window.clearInterval(__EMP_TIP_TIMER_SHOW);__EMP_TIP_CLASS._Hidden();__EMP_TIP_TIMER_SHOW=null}
function EWA_UI_TipClass(a){this.ParentWindow=window;this.TipFrame=null;this.Alpha=0;this.IsShow=!0;this._Id="__EWA_TIP_"+a;this._BakFrame=this._BakTable=this._ForTable=this._ShowDocument=null;this._InitTipFrame=function(){var a=this._InitDiv(),c=this._InitTable();this._ForTable=c;this._InitTableImgForground(c);a.appendChild(c);this._BakTable=c=this._InitTable();this._InitTableImgBackground(c);a.appendChild(c);this.TipFrame=a;this.ParentWindow.document.body.appendChild(a);__EMP_TIP_CLASS=this};this._InitDiv=
function(){var a=this.ParentWindow.document.createElement("div");a.id=this._Id;a.style.zIndex="1998";a.style.display="none";a.className="ewa-tip";a.innerHTML=EWA.B.IE?"<iframe src='javascript:false' style=\"position:absolute; visibility:inherit; top:0px; left:0px; width:1px; height:1px; z-index:-1; filter='progid:DXImageTransform.Microsoft.Alpha(style=0,opacity=0)';\"></iframe>":'<div style="position:absolute; visibility:inherit; top:0px; left:0px; width:1px; height:1px; z-index:-1;"></div>';this._BakFrame=
a.childNodes[0];return a};this._CreateImgHtml=function(a,c,d){return"<img src='"+((null==EWA.RV_STATIC_PATH?EWA.CP:EWA.RV_STATIC_PATH)+"/EWA_STYLE/images/tip/"+a)+"' width="+c+" height="+d+">"};this._SetBackgound=function(a,c){a.style.backgroundImage="url('"+((null==EWA.RV_STATIC_PATH?EWA.CP:EWA.RV_STATIC_PATH)+"/EWA_STYLE/images/tip/"+c)+"')";a.style.backgroundRepeat="repeat-x"};this._InitTableImgForground=function(a){a.className="ewa-tip-for";a.rows[2].cells[1].onmouseover=function(){window.clearInterval(__EMP_TIP_TIMER_SHOW);
__EMP_TIP_TIMER_SHOW=null;this.bgColor="#FFCC66"};a.onmouseout=function(){window.clearInterval(__EMP_TIP_TIMER_SHOW);__EMP_TIP_TIMER_SHOW=null;__EMP_TIP_CLASS.HiddenTip();this.rows[2].cells[1].bgColor="white"};a.rows[0].cells[0].className="ewa-tip-arrow";a.rows[1].cells[0].className="ewa-tip-tl";a.rows[1].cells[1].className="ewa-tip-tm";a.rows[1].cells[2].className="ewa-tip-tr";a.rows[2].cells[0].className="ewa-tip-l";a.rows[2].cells[1].className="ewa-tip-m";a.rows[2].cells[2].className="ewa-tip-r";
a.rows[3].cells[0].className="ewa-tip-bl";a.rows[3].cells[1].className="ewa-tip-bm";a.rows[3].cells[2].className="ewa-tip-br"};this._InitTableImgBackground=function(a){};this._InitTable=function(){var a=this.ParentWindow.document.createElement("table"),c=a.insertRow(-1);c.insertCell(-1);for(var d=0;3>d;d++){c=a.insertRow(-1);for(var e=0;3>e;e++)c.insertCell(-1).style.fontSize=1==d&&1==e?"12px":"1px"}c=a.insertRow(-1);c.insertCell(-1);a.border=0;a.cellSpacing=0;a.cellPadding=0;a.style.fontSize="1px";
a.rows[0].cells[0].colSpan=3;a.rows[4].cells[0].colSpan=3;return a};this.ShowTip=function(a,c,d){window.clearInterval(__EMP_TIP_TIMER_SHOW);__EMP_TIP_TIMER_SHOW=null;this.TipFrame.style.display="";this._ForTable.rows[2].cells[1].innerHTML=a;a=this._ForTable.offsetWidth;this._ForTable.style.width=this._ForTable.rows[2].cells[1].offsetWidth+12+"px";var b=c-a/4+14;0>b?b=12:null!=this._ShowDocument&&a+b>this._ShowDocument.body.offsetWidth&&(b=this._ShowDocument.body.offsetWidth-a-2);this.TipFrame.style.left=
b+"px";this.TipFrame.style.top=d+3+"px";b=c-b;c=b+3;var f="/EWA_STYLE/images/tip/image048.gif";d="/EWA_STYLE/images/tip/image013.png";b<a/2&&0<b-32&&(f="/EWA_STYLE/images/tip/image050.gif",d="/EWA_STYLE/images/tip/image015.png",b-=32,0>b&&(b=4),c=b-3);a=document.all?6:9;var g=null==EWA.RV_STATIC_PATH?EWA.CP:EWA.RV_STATIC_PATH;this._ForTable.rows[0].cells[0].innerHTML="<img src='"+g+f+"' width=32 height=21 style='position: relative; left: "+b+"px; top: "+a+"px'>";b="<img src='"+g+d+"' width=37 height=21 style='position: relative; left: "+
c+"px; top: "+a+"px'>";document.all&&(b="<div style=\"filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+(g+d)+"', sizingMethod='scale'); position: relative; left: "+c+"px; top: "+a+'px; width:37px; height:21px"></DIv>');this._BakTable.rows[0].cells[0].innerHTML=b;this.TipFrame.style.display=""};this.HiddenTip=function(){__EMP_TIP_CLASS=this;null!=__EMP_TIP_TIMER_SHOW&&window.clearInterval(__EMP_TIP_TIMER_SHOW);__EMP_TIP_TIMER_SHOW=window.setInterval(EMP_TIP_HIDE,500)};this.GetObjectLocation=
function(a,c){a=EWA.UI.Utils.GetPosition(a);return[a.X,a.Y]};this._Hidden=function(){this.TipFrame.style.display="none"};this._InitTipFrame()}
function EWA_UI_LinkClass(a,b){this.LinkObj1=a;this.LinkObj2=b;this.LinkObj=null;this._Style="2px solid blue";this.getSize=function(a){var b=EWA$UI$COMMON.GetPosition(a);return{X:b.X,Y:b.Y,W:a.offsetWidth,H:a.offsetHeight}};this._CreateLinkObj=function(){var a=document.createElement("table");EWA.B.IE?a.style.cssText="position: absolute; width: 100px; height: 100px; z-index: -11; left: 693px; top: 174px;font-size:1px;":a.setAttribute("style","position: absolute; width: 100px; height: 100px; z-index: -11; left: 693px; top: 174px;font-size:1px;");
a.cellSpacing=0;for(var b=a.cellPadding=0;2>b;b++)for(var e=a.insertRow(-1),f=0;2>f;f++)e.insertCell(-1).innerHTML="&nbsp;";document.body.appendChild(a);this.LinkObj=a};this.Link=function(){null==this.LinkObj&&this._CreateLinkObj();this.LinkObj.rows[0].cells[0].style.border="";this.LinkObj.rows[0].cells[1].style.border="";this.LinkObj.rows[1].cells[0].style.border="";this.LinkObj.rows[1].cells[1].style.border="";var a=this.getSize(this.LinkObj1),b=this.getSize(this.LinkObj2);if(a.X+a.W<b.X){var e=
a.X+a.W;var f=b.X-a.X-a.W;this.LinkObj.rows[0].cells[0].style.width=f/2+"px"}else a.X<b.X?(e=a.X-20,f=b.X-a.X+20,this.LinkObj.rows[0].cells[0].style.width="20px"):a.X>=b.X&&a.X<b.X+b.W?(e=b.X-20,f=a.X-b.X+20,this.LinkObj.rows[0].cells[0].style.width="20px"):(e=b.X+b.W,f=a.X-b.X-b.W,this.LinkObj.rows[0].cells[0].style.width=f/2+"px");if(a.Y<b.Y){var g=b.Y-b.H/2-a.Y+a.H/2;var h=a.Y-a.H/2}else g=a.Y-a.H/2-b.Y+b.H/2,h=b.Y-b.H/2;this.LinkObj.style.width=f+"px";this.LinkObj.style.height=g+"px";this.LinkObj.style.left=
e+"px";this.LinkObj.style.top=h+"px";h=this.LinkObj.rows[0].cells[0];e=this.LinkObj.rows[0].cells[1];g=this.LinkObj.rows[1].cells[0];f=this.LinkObj.rows[1].cells[1];a.Y<b.Y?a.X+a.W<b.X?(h.style.borderTop=this._Style,h.style.borderRight=this._Style,g.style.borderRight=this._Style,f.style.borderBottom=this._Style):(a.X<b.X?(h.style.borderTop=this._Style,h.style.borderLeft=this._Style,g.style.borderLeft=this._Style,f.style.borderBottom=this._Style):a.X>=b.X&&a.X<b.X+b.W?(h.style.borderTop=this._Style,
h.style.borderLeft=this._Style,g.style.borderLeft=this._Style,e.style.borderTop=this._Style):(e.style.borderTop=this._Style,h.style.borderRight=this._Style,g.style.borderRight=this._Style),g.style.borderBottom=this._Style):a.X+a.W<b.X?(e.style.borderTop=this._Style,h.style.borderRight=this._Style,g.style.borderRight=this._Style,g.style.borderBottom=this._Style):a.X<b.X?(h.style.borderTop=this._Style,e.style.borderTop=this._Style,h.style.borderLeft=this._Style,g.style.borderLeft=this._Style,g.style.borderBottom=
this._Style):a.X>=b.X&&a.X<b.X+b.W?(h.style.borderTop=this._Style,h.style.borderLeft=this._Style,g.style.borderLeft=this._Style,f.style.borderBottom=this._Style,g.style.borderBottom=this._Style):(h.style.borderTop=this._Style,h.style.borderRight=this._Style,g.style.borderRight=this._Style,f.style.borderBottom=this._Style)}}
function EWA_UI_TabsClass(a){this._ClassName=a;this._Index=0;this._ContentsParent=this._TabsParent=null;this._IdTabTag="__EWA_TAB_HEAD_";this._IdFrameTag="__EWA_TAB_FRAME_";this.CurrentWindow=null;this._CurId="";this.CreateTab=function(a,c){var b=this._CheckExist(a);null==b&&(b=this._Index,this._CreateTabHead(a,c),this._CreateIframe(a),this._Index++);this.ShowTab(b)};this._CreateTabHead=function(a,c){var b=this._Index,e=this._TabsParent.ownerDocument.createElement("table");e.cellPadding=0;e.cellSpacing=
0;e.border=0;e.setAttribute("ewa_tab_url",a);e.title="\u53cc\u51fb\u5173\u95ed\u7a97\u53e3\r\n\u53f3\u952e\u5237\u65b0\u5f53\u524d\u7a97\u53e3";a=e.insertRow(-1);a.insertCell(-1).className="bg_l";var f=a.insertCell(-1);f.className="bg_c";f.innerHTML="<nobr><span>"+c+"</span>&nbsp;&nbsp;<b>[X]</b></nobr></div>";f.getElementsByTagName("b")[0].onclick=function(){var a=this.parentNode.parentNode.parentNode.parentNode.parentNode,b=a.id.split("_");b=b[b.length-1];eval("window."+a.getAttribute("ewa_class_name")).RemoveTab(b)};
a.insertCell(-1).className="bg_r";e.id=this._IdTabTag+b;e.className="ewa_tab_act";e.setAttribute("ewa_class_name",this._ClassName);e.onclick=function(){if(0==e.getAttribute("ewa_tab_act")){var a=this.id.split("_");a=a[a.length-1];eval("window."+this.getAttribute("ewa_class_name")).ShowTab(a)}};e.ondblclick=function(){var a=this.id.split("_");a=a[a.length-1];eval("window."+this.getAttribute("ewa_class_name")).RemoveTab(a)};e.onselectstart=function(){return!1};e.oncontextmenu=function(a){this.onclick();
EWA.B.IE?window.event.returnValue=!1:a.preventDefault();a=this.id.split("_");var b="__EWA_TAB_FRAME_"+a[a.length-1];a=new EWA_UrlClass;b=$X(b).contentWindow;a.SetUrl(b.location.href);a.RemoveParameter("________r");a.AddParameter("________r",Math.random());b.location.href=a.GetUrl();return!1};EWA.B.IE||(e.onmousedown=function(a){"undefined"!=typeof a.preventDefault&&a.preventDefault()});this._TabsParent.appendChild(e)};this._CreateIframe=function(a){var b=this._ContentsParent.ownerDocument.createElement("IFRAME");
b.frameBorder=0;b.width="100%";b.height="100%";b.src=a;b.id=this._IdFrameTag+this._Index;this._ContentsParent.appendChild(b)};this.RemoveCurrentTab=function(){this.RemoveTab(this._CurId)};this.RemoveTab=function(a){for(var b=9999999999999,d,e=this._ContentsParent.getElementsByTagName("iframe"),f=null,g=0;g<e.length;g++){var h=e[g];h.id!=this._IdFrameTag+a?b>1*h.getAttribute("ewa_tab_show_seq")&&(b=1*h.getAttribute("ewa_tab_show_seq"),d=h.id):f=h}this._ContentsParent.removeChild(f);a=this._TabsParent.ownerDocument.getElementById(this._IdTabTag+
a);this._TabsParent.removeChild(a);null!=d&&(d=d.split("_"),d=d[d.length-1],null!=this._ContentsParent.ownerDocument.getElementById(this._IdTabTag+d)&&this.ShowTab(d))};this._CheckExist=function(a){for(var b=this._TabsParent.childNodes,d=0;d<b.length;d++){var e=b[d];if(e.getAttribute("ewa_tab_url")==a)return a=e.id.split("_"),a[a.length-1]}return null};this.ShowTab=function(a){this._CurId=a;var b=this._ContentsParent.getElementsByTagName("iframe");this.CurrentWindow=null;for(var d=0;d<b.length;d++){var e=
b[d],f=e.id.split("_");f=e.ownerDocument.getElementById(this._IdTabTag+f[f.length-1]);if(e.id==this._IdFrameTag+a)e.style.display="",e.setAttribute("ewa_tab_show_seq",0),f.className="ewa_tab_act",f.setAttribute("ewa_tab_act",1),this.CurrentWindow=e.contentWindow;else{e.style.display="none";var g=1*e.getAttribute("ewa_tab_show_seq")+1;e.setAttribute("ewa_tab_show_seq",g);f.className="ewa_tab_dact";f.setAttribute("ewa_tab_act",0)}}};this.Init=function(a,c){if(!EWA.B.IE)try{a.style.MozUserFocus="ignore",
a.style.MozUserInput="disabled",a.style.MozUserSelect="none"}catch(e){}var b=a.ownerDocument.createElement("table");b.style.width="100%";b.style.height="100%";b.onselectstart=function(){return!1};b.cellSpacing=0;b.cellPadding=0;b.insertRow(-1).insertCell(-1).vAlign="bottom";b.className="ewa_tab";a.appendChild(b);this._ContentsParent=c;this._TabsParent=b.rows[0].cells[0];b=null}}
function EWA_UI_DialogClass(){this.zIndex=999;this.Id=null;this.Height=this.Width="200px";this.Top=this.Left="-1000px";this.Offset="5";this.ShadowColor="#777777";this.IsShowTitle=!1;this.IsCanMove=!0;this.AutoSize=this.IsCover=!1;this.DisposeOnClose=!0;this._WindowIndex=this._CreateWindowIndex=this.CreateWindow=this.FrameTitle=this.FrameContent=this.Frame=null;this.GetFrame=function(){return this.GetObject(this.Frame)};this.GetFrameContent=function(){return this.GetObject(this.FrameContent)};this.GetFrameTitle=
function(){return this.GetObject(this.FrameTitle)};this.GetObject=function(a){return null==a?null:this.CreateWindow.$X(a)};this.SetHtml=function(a){this.GetFrameContent().innerHTML=a};this.SetObject=function(a){this.GetFrameContent().appendChild(a)};this.SetTitle=function(a){null!=this.GetFrameTitle()&&(this.GetFrameTitle().innerHTML=a)};this.ScrollMoveDiv=function(){var a=this.GetFrame();if(null!=a){var b=a.ownerDocument,c=b.body.scrollLeft;b=b.body.scrollTop;var d=1*a.getAttribute("_SCROLL_X"),
e=1*a.getAttribute("_SCROLL_Y");a.style.left=c-d+$X(this.Frame).offsetLeft+"px";a.style.top=b-e+$X(this.Frame).offsetTop+"px";a.setAttribute("_SCROLL_X",c);a.setAttribute("_SCROLL_Y",b)}};this.MoveBottom=function(a){var b=$(a).offset();b.Y=b.top+$(a).height();b.X=b.left;var c=a.ownerDocument,d=c.parentWindow?c.parentWindow:c.defaultView;if(d==this.CreateWindow){var e=document.body.clientWidth;c=document.body.clientHeight;var f=b.X;d=b.Y;var g=1*(this.Height+"").replace("px",""),h=1*(this.Width+"").replace("px",
"");b.Y+a.clientHeight+g>c&&(d=b.Y-a.clientHeight-g);b.X+h>e&&(f=e-h-a.clientWidth);EWA.B.PAD&&(f=0);this.Move(f,d+4)}else f=d._EWA_DialogWnd._Dialog.GetFrame(),e=f.offsetLeft,c=f.offsetTop,g=this.GetFrame(),g.setAttribute("_SCROLL_X",f.getAttribute("_SCROLL_X")),g.setAttribute("_SCROLL_Y",f.getAttribute("_SCROLL_Y")),a=$(a).height(),f=b.X+e,EWA.B.PAD&&(f=0),e=d._EWA_DialogWnd._Dialog.GetFrameTitle().clientHeight,this.Move(f,b.Y+c+a+e)};this.Move=function(a,b){var c=this.GetFrame();null!=c&&EWA.UI.Utils.MoveTo(c,
a,0>b?0:b)};this.MoveCenter=function(){var a=this.GetFrame(),b=a.clientWidth,c=a.clientHeight,d=EWA.UI.Utils.GetDocSize(this.CreateWindow);c=(d.H-c)/2-40;b=(d.W-b)/2;0>b&&(b=0);0>c&&(c=0);var e=d.SH;d=d.SW;a.setAttribute("_SCROLL_X",d);a.setAttribute("_SCROLL_Y",e);this.Move(b+d,c+e)};this.ResizeByContent=function(){var a=this.GetFrame(),b=this.GetFrameContent().childNodes[0];if("IFRAME"==b.tagName){var c=b.contentWindow;c&&c.document&&c.document.body&&(c=c.document.getElementById("Test1"))&&(b=c)}c=
this.GetFrameContent().parentNode.parentNode.parentNode;var d=1*$(c).css("border-left-width").replace("px","")+1*$(c).css("border-right-width").replace("px","");var e=1*$(c).css("border-top-width").replace("px","")+1*$(c).css("border-bottom-width").replace("px","");this._calc_frame_table=d;c=$(b).width();c+=d;b=$(b).height()+e;d=1*a.style.left.replace("px","");a=1*a.style.top.replace("px","");c+d>this.CreateWindow.document.body.clientWidth&&this.Move(this.CreateWindow.document.body.clientWidth-c-
20,a);this.Resize(c,b,!0)};this.Resize=function(a,b,c){if(this.IsShowTitle){var d=this.GetFrameTitle();b+=$(d).parent().height()}var e=d=0;c||(c=this.GetFrameContent().parentNode.parentNode.parentNode,this._calc_frame_table=d=1*$(c).css("border-left-width").replace("px","")+1*$(c).css("border-right-width").replace("px",""),e=1*$(c).css("border-top-width").replace("px","")+1*$(c).css("border-bottom-width").replace("px",""));a+=d;b+=e;c=this.GetFrame();c.style.width=a+"px";c.style.height=b+"px";for(d=
0;d<c.childNodes.length;d+=1)e=c.childNodes[d],e.style.width=a+"px",e.style.height=b+"px",0<e.id.indexOf("divContent")&&(e.style.overflow="hidden");this.GetFrameContent();a=this.GetObject(this._DivCover);$(a).css("background-image","none");$(a).attr("background-image","none")};this.Show=function(a){var b=this.GetFrame();a?(b.style.display="",this.IsShowTitle&&this.AutoSize&&(_EWA_DIALOG_ON_TIMER=this,this.TimerHandle=window.setInterval(function(){var a=_EWA_DIALOG_ON_TIMER;window.clearInterval(a.TimerHandle);
var b=a.GetFrame(),e=a.GetFrameContent(),f=e.childNodes[0].offsetWidth,g=a.GetObject(a._FrameFore).offsetHeight;b.style.width=f+"px";b.style.height=g+"px";a.GetObject(a._FrameBack1)&&(a.GetObject(a._FrameBack1).style.width=f+"px",a.GetObject(a._FrameBack1).style.height=g+"px");a.GetObject(a._FrameBack2)&&(a.GetObject(a._FrameBack2).style.width=f+"px",a.GetObject(a._FrameBack2).style.height=g+3+"px");if(a=e.childNodes[0])a.style.width=f-2+"px",a.style.height=g-2+"px";a=_EWA_DIALOG_ON_TIMER=null;f=
a.GetObject(this._DivCover);$(f).css("background-image","none");$(f).attr("background-image","none")},32))):b.style.display="none";b=oCover=null};this.Dispose=function(){this.CreateWindow&&(this.CreateWindow._EWA_DIALOGS[this._CreateWindowIndex]=null,_EWA_DIALOGS[this._WindowIndex]=null,null!=this._DivCover&&(EWA$UI$COMMON.Drop(this.GetObject(this._DivCover)),this._DivCover=null),this.GetObject(this.Frame).innerHTML="",EWA$UI$COMMON.Drop(this.GetObject(this.Frame)),this.CreateWindow=null,EWA.B.IE&&
CollectGarbage())};this.SetZIndex=function(a){this.CreateWindow._EWA_UI_DIALOG_COVERINDEX+=a;this.zIndex=this.CreateWindow._EWA_UI_DIALOG_COVERINDEX;this.GetObject(this.Frame).style.zIndex=this.zIndex};this.CreateId=function(){var a=Math.random();return(new Date).getTime()+"_"+a};this.Create=function(){null==this.CreateWindow&&(this.CreateWindow=window);this.IsCover&&this._CreateCover();var a=this.CreateId(),b=this.CreateWindow;null==b._EWA_UI_DIALOG_COVERINDEX&&(b._EWA_UI_DIALOG_COVERINDEX=0);b._EWA_UI_DIALOG_COVERINDEX+=
1;this.zIndex=b._EWA_UI_DIALOG_COVERINDEX;var c=EWA$UI$COMMON.CreateObject(b,"div","display:none; "+(window.EWA_UI_DIALOG_FIXED?"position:fixed":"position:absolute")+"; width:"+this.Width+"; height:"+this.Height+"; z-index:"+this.zIndex+"; left:"+this.Left+"; top:"+this.Top+";",b.document.body);c.setAttribute("EWA_NAME","DIV_FRAME");c.className="ewa-dialog";c.id=a+"divFrame";this.Frame=c.id;var d=EWA$UI$COMMON.CreateObject(b,"div","position: absolute; width: 100%; height: 100%; left: 0px; top: 0px;",
c);d.setAttribute("EWA_NAME","DIV_BACK1");d.id=a+"divBack1";this._FrameBack1=d.id;if(null!=this.ShadowColor&&""!=this.ShadowColor){var e=EWA$UI$COMMON.CreateObject(b,"div","position: absolute; background-color:"+this.ShadowColor+"; width:100%; height:100%; left:"+this.Offset+"px; top: "+(1*this.Offset+2)+"px;",c);e.style.filter="alpha(opacity=50)";e.style.opacity=.5;e.id=a+"divBack2";this._FrameBack2=e.id}EWA.B.IE&&(d.innerHTML="<iframe src='javascript:false' style=\"position:absolute;top:0px;left:0px;width:100%; height:100%; z-index:-1; filter='progid:DXImageTransform.Microsoft.Alpha(style=0,opacity=0)';\"></iframe>",
null!=this.ShadowColor&&""!=this.ShadowColor&&(e.innerHTML="<iframe src='javascript:false' style=\"position:absolute;top:0px;left:0px;width:100%; height:100%; z-index:-1; filter='progid:DXImageTransform.Microsoft.Alpha(style=0,opacity=0)';\"></iframe>"));c.setAttribute("_SCROLL_X",0);c.setAttribute("_SCROLL_Y",0);this._CreateContent();$(c).append("<i style='z-index:"+this.zIndex+"0' onclick='this.parentNode.style.display=\"none\"' class='ewa-dialog-close'></i>");this.CreateWindow._EWA_DIALOGS||(this.CreateWindow._EWA_DIALOGS=
[],addEvent(this.CreateWindow,"scroll",EWA.UI.DialogOnScroll));window._EWA_DIALOGS||(_EWA_DIALOGS=[],addEvent(window,"scroll",EWA.UI.DialogOnScroll));this._CreateWindowIndex=this.CreateWindow._EWA_DIALOGS.length;this.CreateWindow._EWA_DIALOGS[this._CreateWindowIndex]=this;this._WindowIndex=_EWA_DIALOGS.length;_EWA_DIALOGS[this._WindowIndex]=this};this._CreateContent=function(){var a=this.CreateId(),b=EWA$UI$COMMON.CreateObject(null==this.CreateWindow?window:this.CreateWindow,"div","position: absolute; width: 100%; height: 100%; z-index: 2; left: 0px; top: 0px;  background-color:white",
this.GetFrame());b.setAttribute("EWA_NAME","CONTENT");b.className="EWA_POP_MAIN";b.id=a+"divContent";if(this.IsShowTitle){var c=" EWA_WND_ID='"+this.Id+"'",d="this.ownerDocument.parentWindow";EWA.B.IE||(d="this.ownerDocument.defaultView");if(this.IsCanMove){var e=d+"._EWA_UI_WINDOW_LIST[this.getAttribute('EWA_WND_ID')]._OpenerWindow.EWA$UI$COMMON$Move.";c=c+(' onmousedown="'+e+'OnMouseDown(this.parentNode.parentNode,event,true,true);"')+(' onmousemove="'+e+'OnMouseMove(this.parentNode.parentNode,event,true,true);"')+
(' onmouseup="'+e+'OnMouseUp(this.parentNode.parentNode);"')+(' onmouseout="try{'+e+'OnMouseOut(this.parentNode.parentNode);}catch(e){}"')+" style='cursor:pointer' "}e="<img src='"+(null==EWA.RV_STATIC_PATH?"/EmpScriptV2":EWA.RV_STATIC_PATH)+"/EWA_STYLE/images/dialog/but_1.gif' style='cursor:pointer'  onmouseover=\"var m=this.src.lastIndexOf('.');var s = this.src.substring(0, m);if(s.substring(s.length - 1).toUpperCase() == 'C'){return;}s+='c'+this.src.substring(m);this.src = s;\"";if(this.DisposeOnClose){var f=
' ondblclick="'+d+"._EWA_UI_WINDOW_LIST['"+this.Id+"'].CloseWindow();\"";d=' onclick="'+d+"._EWA_UI_WINDOW_LIST['"+this.Id+"'].CloseWindow();\""}else f=' ondblclick="'+d+"._EWA_UI_WINDOW_LIST['"+this.Id+"']._Dialog.Show(false);\"",d=' onclick="'+d+"._EWA_UI_WINDOW_LIST['"+this.Id+"']._Dialog.Show(false);\"";c="<table unselectable='on' onselectstart='return false;' style='cursor:pointer;margin-bottom:1px;width:100%;height:100%;-moz-user-select:none;' cellpadding='0' cellspacing='0' "+c+">"+("<tr><td "+
f+" class='EWA_POP_TITLE_L'>...</td><td class='EWA_POP_TITLE_R' align=\"right\">")+(e+" onmouseout =\"var m=this.src.lastIndexOf('.');var s = this.src.substring(0, m - 1);s = s + this.src.substring(m);this.src = s;\""+(d+" />")+'</td></tr><tr><td class=\'EWA_POP_CNT\' colspan="2" style="background-color:white" valign=top></td></tr></table>');b.innerHTML=c;c=a+"FrameContent";this.FrameContent=b.childNodes[0].rows[1].cells[0].id=c;a+="FrameTitle";this.FrameTitle=b.childNodes[0].rows[0].cells[0].id=
a;this._FrameFore=b.id}else this.FrameContent=b.id};this._CreateCover=function(){var a=this.CreateWindow;null==a._EWA_UI_DIALOG_COVERINDEX&&(a._EWA_UI_DIALOG_COVERINDEX=1E7);a._EWA_UI_DIALOG_COVERINDEX+=1;var b=a.document.createElement("div");b.style.cssText="display:block; width:100%; height:100%; ";b.setAttribute("style","display:block; width:100%; height:100%; ");b.style.zIndex=a._EWA_UI_DIALOG_COVERINDEX;b.className="ewa-ui-dialog-cover";b.id=this.CreateId()+"_DivCover";this._DivCover=b.id;a.document.body.appendChild(b)}}
function EWA_UI_PopWindowClass(a,b){this._DivCover=null;this._Dialog=new EWA_UI_DialogClass;this._Dialog.DisposeOnClose=b;this.OpendDialogs=[];this.ClassName=this._Name=this.Id=null;this._Url="about:blank";this._ParentWindow=a;this._OpenerWindow=window;this.OpendObject=EWA.B.IE?window.event?window.event.srcElement:null:null;this._CallBack=null;this.SetCallBack=function(a){this._CallBack=a};this._ReturnBack=null;this.SetReturnBack=function(a){this._ReturnBack=a};this.GetReturnBack=function(){return this._ReturnBack};
this.Show=function(a){this._Dialog.Show(a)};this.Hidden=function(){this._Dialog.Show(!1)};this.CloseWindow=function(){for(var a=0;a<this.OpendDialogs.length;a+=1)this.OpendDialogs[a].Dispose(),this.OpendDialogs[a]=null;this._Dialog.Dispose();if(this._OpenerWindow)try{this._OpenerWindow.document.body.focus(),this.OpendObject&&this.OpendObject.focus()}catch(d){}this.Dispose()};this.Dispose=function(){if(null!=this._CallBack)try{this._CallBack.Dispose()}catch(d){}if(null!=this._ReturnBack)try{this._ReturnBack.Dispose()}catch(d){}try{var a=
this.GetIframeWindow();a&&(a._EWA_DialogWnd=null)}catch(d){}if(this._OpenerWindow)try{this._OpenerWindow.EWA.UI.Dialog.WND[this.Id]=null,this._ParentWindow._EWA_UI_WINDOW_LIST[this.Id]=null}catch(d){}try{this._Dialog.Dispose(),this._ReturnBack=this._CallBack=this.OpendObject=this._OpenerWindow=this._ParentWindow=this._Dialog=null}catch(d){}EWA.B.IE&&CollectGarbage()};this.SetNewSize=function(a,b){this._Dialog.Resize(a,b)};this.Move=function(a,b){this._Dialog.Move(a,b)};this.MoveCenter=function(){this._Dialog.MoveCenter()};
this.GetIframeWindow=function(){if(null!=this._ParentWindow){var a="__EMP_COMMON_IFRAME"+this._Name;if(EWA.B.IE)var b=this._ParentWindow.frames[a];else for(var e=0;e<this._ParentWindow.frames.length;e+=1)if(this._ParentWindow.frames[e].name==a){b=this._ParentWindow.frames[e];break}return b}};this.SetCaption=function(a){this._Dialog.SetTitle(a)};this.SetUrl=function(a){"about:blank"!=a&&(this.GetIframeWindow().location=a)};this.Create=function(a,b,e){this._Name=e;this._CreateDialog(a,b);null==this._ParentWindow._EWA_UI_WINDOW_LIST&&
(this._ParentWindow._EWA_UI_WINDOW_LIST={});this._ParentWindow._EWA_UI_WINDOW_LIST[this.Id]=this};this._CreateDialog=function(a,b){this._Dialog.Id=this.Id;this._Dialog.Width=a;this._Dialog.Height=b;this._Dialog.CreateWindow=this._ParentWindow;this._Dialog.IsShowTitle=!0;this._Dialog.IsCanMove=!0;this._Dialog.IsCover=!0;this._Dialog.Create();this._Dialog.Show(!0);this.SetHtml("<iframe style='width:100%;height:100%;' name='__EMP_COMMON_IFRAME"+this._Name+'\' frameborder=0 src="about:blank"></iframe>')};
this.SetHtml=function(a){this._Dialog.SetHtml(a)};this.ResizeByContent=function(){this._Dialog.ResizeByContent()}}EWA.UI.DialogOnScroll=function(){if(!window.EWA_UI_DIALOG_FIXED&&"undefined"!=typeof _EWA_DIALOGS)for(var a=0;a<_EWA_DIALOGS.length;a+=1)if(null!=_EWA_DIALOGS[a])try{_EWA_DIALOGS[a].ScrollMoveDiv()}catch(b){_EWA_DIALOGS[a]=null}};
function EWA_Command(){this.CmdWindow=window;this.Cmd=null;this.CmdArgus=[];this.IsRunAuto=!1;this.Run=function(){if("function"==(typeof this.Cmd).toLowerCase())this.Cmd(this.CmdArgus);else{var a=this.CmdWindow.eval(this.Cmd);null==a?alert("EWA_Command.Cmd undefined! Pls check call method"):a(this.CmdArgus)}};this.Dispose=function(){for(var a=0;a<this.CmdArgus.length;a++)this.CmdArgus[a]=null;this.CmdArgus.length=0;this.Cmd=this.CmdWindow=this.CmdArgus=null}}
var __Dialog={D:EWA_UI_DialogClass,C:EWA_UI_PopWindowClass,WND:{},WNDCUR:null,CMD:EWA_Command,Pop:function(a,b,c){b=new EWA_UI_PopWindowClass(window,!0);"undefined"!=typeof _EWA_DialogWnd&&(b.CreateWindow=_EWA_DialogWnd._ParentWindow);b.Width=172;b.Height=200;b.ShadowColor="";__Cal.WND=new EWA_CalendarClass;"undefined"==typeof _EWA_DialogWnd?b.CreateWindow=window:(b.CreateWindow=_EWA_DialogWnd._ParentWindow,_EWA_DialogWnd.OpendDialogs[_EWA_DialogWnd.OpendDialogs.length]=b);b.Create();b.SetHtml(a);
b.MoveCenter();b.Show(!0);return b},_GetTopWindow:function(){for(var a=window;a.parent!=a;)a=a.parent;return 0<=a.document.documentElement.innerHTML.toUpperCase().indexOf("<FRAMESET")?window:a},_DialogMointer:function(){var a=EWA.UI.Dialog.WNDCUR;__Dialog.TimerInc++;if(!(null==a&&100<__Dialog.TimerInc)&&null!=a){var b=a.GetIframeWindow();null==b?(window.clearInterval(a._TimerHandle),EWA.UI.Dialog.WNDCUR=null):b.location.href!=a._Url&&(b.document.readyState?"complete"==b.document.readyState&&(window.clearInterval(a._TimerHandle),
EWA.UI.Dialog._SetTitle(a)):null!=b.document.body&&(b=b.document.documentElement.innerHTML,b=b.toLowerCase(),0<b.indexOf("</body>")||0<b.indexOf("</html>"))&&(0==a._IncNoIe?a._IncNoIe=1:EWA.UI.Dialog._SetTitle(a)))}},_SetTitle:function(a){if(null!=a){var b=a.GetIframeWindow();b._EWA_DialogWnd=a;a._Url=b.location.href;a.SetCaption(b.document.title);b.document.getElementsByTagName("INPUT");b.document.body.onunload=function(){try{this._EWA_DialogWnd._Url=""}catch(d){}};var c=__Dialog._SetInputFocus(b.document);
c||__Dialog._SetTextAreaFocus(b.document);c||b.document.body.focus();__Dialog._SetClose(b.document);b.document.body.style.margin="0px";b.document.body.style.overflow="hidden";a._Dialog.ResizeByContent();a.MoveCenter();null!=a._CallBack&&a._CallBack.Run();b=null}},_SetClose:function(a){for(var b=a.getElementsByTagName("INPUT"),c=0;c<b.length;c+=1){var d=b[c].type.toLowerCase();"button"!=d&&"submit"!=d||__Dialog._SetCloseFunction(b[c])}b=a.getElementsByTagName("BUTTON");for(c=0;c<b.length;c++)__Dialog._SetCloseFunction(b[c])},
_SetCloseFunction:function(a){var b=a.value.trim().toLowerCase();"button"==a.tagName.toLowerCase()&&(b=a.innerHTML);!(0<=b.indexOf("\u5173\u95ed")||0<=b.indexOf("\u53d6\u6d88")||0<=b.indexOf("close")||0<=b.indexOf("cancel"))||null!=a.onclick&&0<=a.onclick.toString().indexOf("EWA")||(a.onclick=function(){var a=this.ownerDocument;(a.parentWindow?a.parentWindow:a.defaultView)._EWA_DialogWnd.CloseWindow()})},_SetInputFocus:function(a){a=a.getElementsByTagName("INPUT");for(var b=0;b<a.length;b+=1){var c=
a[b],d=c.type.toLowerCase();if("text"==d||"password"==d)if(d=c.parentNode.innerHTML,!(null!=d&&0<=d.toString().indexOf("EWA.F.I.Date")))try{return c.focus(),a=null,!0}catch(e){}}return!1},_SetTextAreaFocus:function(a){a=a.getElementsByTagName("TEXTAREA");for(var b=0;b<a.length;b+=1)try{return a[b].focus(),a=null,!0}catch(c){}return!1},OpenReloadClose:function(a,b,c,d,e,f,g){EWA.UI.Dialog.OpenFrame(a,b,c,d,e,"RELOAD_PARENT,CLOSE_SELF",f,g)},OpenReload:function(a,b,c,d,e,f,g){EWA.UI.Dialog.OpenFrame(a,
b,c,d,e,"RELOAD_PARENT",f,g)},OpenReloadClear:function(a,b,c,d,e,f,g){EWA.UI.Dialog.OpenFrame(a,b,c,d,e,"RELOAD_PARENT,CLEAR_SELF",f,g)},OpenFrame:function(a,b,c,d,e,f,g,h){null==f&&(f="");__Dialog[a]||(__Dialog[a]={});__Dialog[a].AfterMsg=null==g?"":g;if("yes"==h&&EWA.F&&EWA.F.FOS[a]&&EWA.F.FOS[a].Url){h=new EWA_UrlClass(EWA.F.FOS[a].Url);h.RemoveEwa();e=new EWA_UrlClass("a1?"+e);for(var k in e._Paras)g=e.GetParameter(k),h.AddParameter(k,g);e=h.GetParas()}f="EWA_P_BEHAVIOR="+f+"&EWA_PARENT_FRAME="+
a;a=EWA.UI.Dialog.GetUrl(b,c,e?e+"&"+f:f);EWA.UI.Dialog.OpenWindow(a,b+"-"+c,100,50,d)},OpenWindow:function(a,b,c,d,e,f,g,h){var k=void 0===h?!0:h;var m=e?window:EWA.UI.Dialog._GetTopWindow();e=a;null!=e&&"about:blank"!=e&&(e=0<a.indexOf("?")?e+("&_r="+Math.random()):e+("?_r="+Math.random()));e=e.replace(/\|/ig,"%7c");a="_EWA_UI_DIALOG_"+b;EWA.UI.Dialog.WND[a]=null;EWA.UI.Dialog.WND[a]=new EWA.UI.Dialog.C(m,k);k=EWA.UI.Dialog.WND[a];k.Id=a;k.DisposeOnClose=h;k.Create(c,d,b);null!=e&&k.SetUrl(e);null!=
f&&k.SetCallBack(f);null!=g&&k.SetReturnBack(g);__Dialog.TimerInc=0;k._TimerHandle=window.setInterval(EWA.UI.Dialog._DialogMointer,155);k._IncNoIe=0;EWA.UI.Dialog.WNDCUR=k;return EWA.UI.Dialog.WND[a]},GetUrl:function(a,b,c){return EWA.CP+"/EWA_STYLE/cgi-bin/?XMLNAME="+a.toURL()+"&ITEMNAME="+b.toURL()+"&"+c}};
EWA.OW={Dia:null,PWin:null,Frame:null,Close:function(){EWA.OW.Dia?EWA.OW.Dia.CloseWindow():alert("Dialog not Load")},Load:function(){EWA.OW.Dia=window._EWA_DialogWnd;EWA.OW.PWin=EWA.OW.Dia?EWA.OW.Dia._OpenerWindow:null;EWA.OW.Frame=EWA.OW.PWin?EWA.OW.PWin.EWA.F.FOS[EWA.OW.PWin.EWA.F.CID]:null}};EWA.UI.Dialog=__Dialog;
function EWA_UI_DiaNewClass(){this.Id=null;this._GetIndex=function(){var a=window;null==a._EWA_UI_DIALOG_COVERINDEX&&(a._EWA_UI_DIALOG_COVERINDEX=1E7);a._EWA_UI_DIALOG_COVERINDEX++;return a._EWA_UI_DIALOG_COVERINDEX};this._GetCover=function(){return $X(this.Id+"_cover")};this.Create=function(a,b,c,d,e,f){var g=this._GetIndex();this.Id=("_EWA_UI_DIA_"+Math.random()).replace(".","");var h=["<div id='"+this.Id+"' class='ewa-ui-dialog'>"];h.push("<div id='"+this.Id+"_cover'  class='ewa-ui-dialog-cover' style='position: fixed;z-index: "+
g+";'></div>");g=" EWA_WND_ID='"+this.Id+"'";g+=' onmousedown="window.EWA$UI$COMMON$Move.OnMouseDown(this.parentNode.parentNode,event,true,true);" onmousemove="window.EWA$UI$COMMON$Move.OnMouseMove(this.parentNode.parentNode,event,true,true);" onmouseup="window.EWA$UI$COMMON$Move.OnMouseUp(this.parentNode.parentNode);" onmouseout="window.EWA$UI$COMMON$Move.OnMouseOut(this.parentNode.parentNode);"';h.push("<div id='"+this.Id+"_box'  class='ewa-ui-dialog-box'  style='position: fixed;z-index: "+this._GetIndex()+
";'>");h.push("<div style='position:relative;'>");f?h.push("<div id='"+this.Id+"_title' class='ewa-ui-dialog-title-noheader' style=''><a href='javascript:class_"+this.Id+".Close();' class='fa' style='text-decoration:none;padding:2px 2px 3px 3px;display:block'>&#xf00d</a></div>"):h.push("<div  id='"+this.Id+"_title'  class='ewa-ui-dialog-title'"+g+" style=''><span style='margin-left: 5px;'></span><a href='javascript:class_"+this.Id+".Close();' class='fa' style=''>&#xf00d</a></div>");h.push("<div  id='"+
this.Id+"_content' class='ewa-ui-dialog-content' style='width: 100%;overflow: auto;'></div>");h.push("</div>");h.push("</div>");h.push("</div>");$("body").append(h.join(""));$(".ewa-ui-dialog-title a.fa").css({color:"#aaa"}).hover(function(){$(this).css({color:"orangered"})},function(){$(this).css({color:"#aaa"})});$("#"+this.Id+"_box");this.SetSize(a,b);this.SetTitle(c);this.ShowCover(!0);this.MoveCenter();window["class_"+this.Id]=this;this.SetContent(d,e);return this};this.SetSize=function(a,b){var c=
$("#"+this.Id+"_content");b=b?b:200;c.css("width",a?a:400);c.css("height",b);0<$("#"+this.Id+"_title span").length&&$("#"+this.Id+"_title").height()};this.SetTitle=function(a){a&&$("#"+this.Id+"_title span").html(a)};this.SetContent=function(a,b){var c=$("#"+this.Id+"_content");if(b){a='<iframe style="width:100%;height:100%" frameborder="0" src="'+a+'"></iframe>';c.css("overflow","hidden");var d=this;setTimeout(function(){d._ChkIframeLoaded()},222)}else $(this._GetCover()).css("background-image",
"none");c.html(a)};this.SetObject=function(a,b){var c=$("#"+this.Id+"_content");$(this._GetCover()).css("background-image","none");b||c.html("");c.append(a)};this._ChkIframeLoaded=function(){var a=$("#"+this.Id+"_content iframe");if(0!=a.length){a=a[0];try{if(a.contentWindow&&a.contentWindow.document&&"complete"==a.contentWindow.document.readyState&&a.contentWindow.$)try{this._IframeLoaded(a.contentWindow)}catch(c){this._IframeLoaded(a.contentWindow)}else{var b=this;setTimeout(function(){b._ChkIframeLoaded()},
222)}}catch(c){console.log(c)}}};this._IframeLoaded=function(a){a._EWA_DialogWnd=this;this.SetTitle(a.document.title);this.AutoSize();this.MoveCenter();var b=this;a=a.$.find("button,input");for(var c=0;c<a.length;c++){var d=a[c],e=!1;if(d.id&&0<=d.id.toLowerCase().indexOf("close"))e=!0;else{var f=d.value||d.innerHTML;f&&(0<=f.indexOf("\u5173\u95ed")||0<=f.indexOf("\u53d6\u6d88"))&&(e=!0)}e&&(d.onclick=function(){b.Close()})}$(this._GetCover()).css("background-image","none")};this.AutoSize=function(){var a=
$("#"+this.Id+"_content iframe");if(0==a.length){a=$("#"+this.Id+"_content");var b=a.find("#Test1");0<b.length?(a=b.outerWidth(),b=b.outerHeight()):(b=a[0].scrollHeight,a=a[0].scrollWidth);this.SetSize(a,b);this.MoveCenter()}else a=a[0].contentWindow,b=a.$("#Test1"),0<b.length&&(a=b.outerWidth(),b=b.outerHeight(),this.SetSize(a,b),this.MoveCenter())};this.getContent=function(){return $("#"+this.Id+"_content")[0]};this.ShowCover=function(a){var b=$("#"+this.Id+"_cover");if(a){a=$(window).width();var c=
$(window).height();b.css("width",a);b.css("height",c);b.show()}else b.hide()};this.MoveCenter=function(){var a=$(window).width(),b=$(window).height(),c=$("#"+this.Id+"_box"),d=c.width();c=c.height();a=(a-d)/2;b=(b-c)/2;0>a&&(a=0);0>b&&(b=0);this.Move(a,b)};this.Move=function(a,b){var c=$("#"+this.Id+"_box");c.css("top",b);c.css("left",a)};this.Close=function(){this.IsCloseAsHidden?$("#"+this.Id).hide():this.Dispose()};this.Dispose=function(){$("#"+this.Id).remove();window["class_"+this.Id]=null;delete window["class_"+
this.Id]};this.Show=function(){this.IsCloseAsHidden?$("#"+this.Id).show():alert("\u8bf7\u8bbe\u7f6e\u53c2\u6570 IsCloseAsHidden=true")}}$Dialog=function(a,b,c,d,e){var f=new EWA_UI_DiaNewClass;f.Create(c,d,b,a,!0,e);f.MoveCenter();return f};$DialogHtml=function(a,b,c,d,e){var f=new EWA_UI_DiaNewClass;f.Create(c,d,b,a,!1,e);f.MoveCenter();return f};
$DialogInstall=function(a,b,c,d,e){var f=EWA_Utils.tempId("dialogInstall"),g=$DialogHtml("<div id='"+f+"'></div>","",c,d,e);$Install(a,f,function(){g.AutoSize();if(!e&&!b){var a=g.getContent();a=$(a).find(".EWA_TABLE");0!=a.length&&a[0].id&&(a=a[0].id,a=a.replace("EWA_FRAME_","").replace("EWA_LF_",""),EWA&&EWA.F&&EWA.F.FOS&&EWA.F.FOS[a]&&(a=EWA.F.FOS[a].Title)&&g.SetTitle(a))}});return g};
function EWA_UI_CalendarYearClass(){this.Create=function(a,b,c,d,e){console.log(b,c,d);this.classId=("CY"+Math.random()).replace(".","");EWA.UI.CalendarYear=EWA.UI.CalendarYear||{};EWA.UI.CalendarYear[this.classId]=this;$($X(a)).append('<div class="ewa-ui-calendar-year" id="'+this.classId+'"></div>');a=$("#"+this.classId);var f=new EWA_CalendarClass,g=new Date;b&&c&&(g=new Date(b,c-1,1));b=c=g.getMonth();e||(b=3*Math.round(c/3-.5));e=g.getFullYear();if(!d||0>=d)d=12;for(g=1;g<=d;g++){if("enus"==EWA.LANG){var h=
b+1+"/"+e;f.SetDate("dd/MM/yyyy"==_EWA_G_SETTINGS.DATE?"01/"+(b+1)+"/"+e:b+1+"/01/"+e)}else h=e+"-"+(b+1),f.SetDate(h+"-01");c=f.CreateCalendar();var k=this.classId+"_"+e+"_"+b;c.id=k;c.setAttribute("yearmonth",e+(10>b?"0":"")+b);a.append(c);$(c.rows[3]).remove();$(c.rows[0].cells[1]).remove();h="<a href='javascript:EWA.UI.CalendarYear."+this.classId+'.chooeseMonth("'+k+"\",event)'>"+h+"</a>";$(c.rows[0].cells[0]).html(h);$(c).find("th").attr("onclick","EWA.UI.CalendarYear."+this.classId+".chooeseWeek('"+
k+"',this, event)");b++;12==b&&(b=0,e++);$(c).find("th:eq(0)").addClass("rq-sun");$(c).find("th:eq(6)").addClass("rq-sat")}a.append('<div style="clear:both"></div>');a.find(".ewa-ui-days td").attr("onclick","EWA.UI.CalendarYear."+this.classId+".Click(this,event)");_EWA_CALENDAR_ITEM=f};this.chooeseWeek=function(a,b,c){var d=b.cellIndex;a=$("#"+a).find(".ewa-ui-days")[0];for(var e=$(b).attr("chooese"),f=[],g=1;g<a.rows.length;g++){var h=a.rows[g].cells[d];0!=h.childNodes.length&&(e?$(h).removeClass("ewa-ui-calendar-year-chooese").attr("chooese",
null):$(h).addClass("ewa-ui-calendar-year-chooese").attr("chooese",1),f.push($(h).find("div:eq(0)").attr("title")))}e?$(b).attr("chooese",null):$(b).attr("chooese",1);this.ClickEvent&&this.ClickEvent(f,!e,c)};this.chooeseMonth=function(a,b){var c=$("#"+a),d=c.attr("all1"),e=[];d?(c.attr("all1",null),$("#"+a+" .ewa-ui-days .ewa-ui-calendar-year-chooese").each(function(){$(this).removeClass("ewa-ui-calendar-year-chooese").attr("chooese",null);e.push($(this).find("div:eq(0)").attr("title"))}),c.find("th").attr("chooese",
null)):(c.attr("all1","yes"),$("#"+a+" .ewa-ui-days tr:gt(0) td div[title]").parent().each(function(){$(this).addClass("ewa-ui-calendar-year-chooese").attr("chooese",1);e.push($(this).find("div:eq(0)").attr("title"))}),c.find("th").attr("chooese",1));this.ClickEvent&&this.ClickEvent(e,!d,b)};this.SetChooeses=function(a,b){for(var c in a){var d=a[c][b];d&&(d=d.split(" ")[0],$("#"+this.classId+" .ewa-ui-days td div[title='"+d+"']").parent().addClass("ewa-ui-calendar-year-chooese").attr("chooese",1))}$("#"+
this.classId+" .ewa-ui-date").each(function(){$(this).find(".ewa-ui-calendar-year-chooese").length==$(this).find("td div[title]").length&&($(this).attr("all1","yes"),$(this).find("th").attr("chooese","yes"))})};this.GetChooeses=function(a){var b=[];(a?$(a):$("#"+this.classId+" .ewa-ui-days")).find(".ewa-ui-calendar-year-chooese").each(function(){b.push($(this).find("div:eq(0)").attr("title"))});return b};this.GetUnChooeses=function(a){var b=[];(a?$(a):$("#"+this.classId+" .ewa-ui-days")).find("td").each(function(){if(!$(this).attr("chooese")){var a=
$(this).find("div:eq(0)").attr("title");a&&b.push(a)}});return b};this.Click=function(a,b){if(""!=a.innerHTML.trim()){if($(a).attr("chooese")){$(a).removeClass("ewa-ui-calendar-year-chooese").attr("chooese",null);var c=!1}else $(a).addClass("ewa-ui-calendar-year-chooese").attr("chooese",1),c=!0;this.ClickEvent&&(a=[$(a).find("div:eq(0)").attr("title")],this.ClickEvent(a,c,b))}};this.ClickEvent=function(a,b,c){console.log("overwrite xxx.ClickEvent(rqs,   isChecked, evt)")}}
function EWA_UI_CalendarYearGroupClass(){this.denysBefore=function(a){a=new EWA_DateClass(a);for(var b=1;1500>b;b++){var c=a.AddDays(-1);c=c.split(" ")[0];if(0==this.denyDay(c).length)break}};this.denysAfter=function(a){a=new EWA_DateClass(a);for(var b=1;1500>b;b++){var c=a.AddDays(1);c=c.split(" ")[0];if(0==this.denyDay(c).length)break}};this.denyDay=function(a){a=$("#"+this.classId).find(".ewa-ui-days td").find("div[title='"+a+"']").parent();a.addClass("ewa-ui-calendar-year-deny").attr("deny",1);
return a};this.unDenyDay=function(a){a=$("#"+this.classId).find(".ewa-ui-days td").find("div[title='"+a+"']").parent();a.removeClass("ewa-ui-calendar-year-deny").attr("deny",null);return a};this.CUR_GROUP_NAME=null;this.setGroupName=function(a){a?(this.CUR_GROUP_NAME="CYG_"+a.replace(/:|\?|\.|=|;|\(|\)|\-/ig,""),this.CUR_GROUP_NAME_O=a):this.CUR_GROUP_NAME_O=this.CUR_GROUP_NAME=null};this.Create=function(a,b,c,d,e,f,g){this.classId=("CY"+Math.random()).replace(".","");EWA.UI.CalendarYear=EWA.UI.CalendarYear||
{};EWA.UI.CalendarYear[this.classId]=this;$($X(a)).append('<div class="ewa-ui-calendar-year" id="'+this.classId+'"></div>');a=$("#"+this.classId);var h=new Date;b&&c&&(h=new Date(b,c-1,1));b=c=h.getMonth();e||(b=3*Math.round(c/3-.5));e=h.getFullYear();if(!d||0>=d)d=12;h=new EWA_CalendarClass;for(c=1;c<=d;c++){var k=b+1;if("enus"==EWA.LANG){var m=k+"/"+e;h.SetDate("dd/MM/yyyy"==_EWA_G_SETTINGS.DATE?"01/"+k+"/"+e:k+"/01/"+e)}else m=e+"-"+(b+1),h.SetDate(m+"-01");var l=h.CreateCalendar(),p=e+(10>k?"0":
"")+k;k=this.classId+"_"+p;l.id=k;l.setAttribute("yearmonth",p);a.append(l);$(l.rows[3]).remove();$(l.rows[0].cells[1]).remove();m="<a href='javascript:EWA.UI.CalendarYear."+this.classId+'.chooeseMonth("'+k+"\",event)'>"+m+"</a>";$(l.rows[0].cells[0]).html(m);$(l).find("th").attr("onclick","EWA.UI.CalendarYear."+this.classId+".chooeseWeek('"+k+"',this, event)");b++;12==b&&(b=0,e++);$(l).find("th:eq(0)").addClass("rq-sun");$(l).find("th:eq(6)").addClass("rq-sat")}a.append('<div style="clear:both"></div>');
a.find(".ewa-ui-days td").attr("onclick","EWA.UI.CalendarYear."+this.classId+".Click(this,event)");_EWA_CALENDAR_ITEM=h;f&&this.denysBefore(f);g&&this.denysAfter(g)};this.getChooeseName=function(){return this.CUR_GROUP_NAME?this.CUR_GROUP_NAME:"chooese"};this.addOrRemoveMark=function(a,b,c){var d=this.getChooeseName();b?($(a).find("."+d).remove(),$(a).attr(d,null),this.unMarkEvent&&this.unMarkEvent(a,c)):0==$(a).find("."+d).length&&($(a).append("<nobr class='ewa-ui-calendar-year-item "+d+"'></nobr>"),
$(a).attr(d,1),this.markEvent&&this.markEvent(a,c));$(a).removeClass("N1").removeClass("N2").removeClass("N3").removeClass("N4").removeClass("N5").removeClass("N6").removeClass("N7").removeClass("N8").removeClass("N9").removeClass("NP");b=$(a).find(".ewa-ui-calendar-year-item").length;0<b?($(a).addClass("ewa-ui-calendar-year-chooese"),b=10>b?"N N"+b:"N NP",$(a).addClass(b)):$(a).removeClass("ewa-ui-calendar-year-chooese").removeClass("N")};this.chooeseWeek=function(a,b,c){for(var d=$("#"+a).find(".ewa-ui-days")[0],
e=this.getChooeseName(),f=[],g=b.cellIndex,h=!0,k=!1,m=1;m<d.rows.length;m++){var l=d.rows[m].cells[g];if(0!=l.childNodes.length&&($(l).attr("deny")||(k=!0),$(l).attr(e)||(h=!1),k&&!h))break}if(!k)$Tip("\u6ca1\u6709\u53ef\u9009\u7684\u65e5\u671f");else if(!this.ClickBeforeEvent||this.ClickBeforeEvent(a,b,c,"WEEK")){for(m=1;m<d.rows.length;m++)l=d.rows[m].cells[g],0==l.childNodes.length||$(l).attr("deny")||(a=$(l).find("div:eq(0)").attr("title"),f.push(a),this.addOrRemoveMark(l,h,a));h?$(b).attr(e,
null):$(b).attr(e,1);this.ClickEvent&&this.ClickEvent(f,!h,c)}};this.chooeseMonth=function(a,b){for(var c=$("#"+a+" .ewa-ui-days")[0],d=this.getChooeseName(),e=!0,f=!1,g=1;g<c.rows.length;g++){for(var h=c.rows[g],k=0;k<h.cells.length;k++){var m=h.cells[k];0!=m.childNodes.length&&(f||$(m).attr("deny")||(f=!0),$(m).attr(d)||(e=!1))}if(!e&&f)break}if(!f)$Tip("\u6ca1\u6709\u53ef\u9009\u7684\u65e5\u671f");else if(!this.ClickBeforeEvent||this.ClickBeforeEvent(a,null,b,"MONTH")){a=[];for(g=1;g<c.rows.length;g++)for(h=
c.rows[g],k=0;k<h.cells.length;k++)m=h.cells[k],0==m.childNodes.length||$(m).attr("deny")||(d=$(m).find("div:eq(0)").attr("title"),a.push(d),this.addOrRemoveMark(m,e,d));this.ClickEvent&&this.ClickEvent(a,!e,b)}};this.SetChooeses=function(a,b,c,d){this._RQ_MAP=null;var e=$("#"+this.classId);e.find(".ewa-ui-days td");for(var f in a){var g=a[f],h=g[b];if(h){c&&this.setGroupName(g[c]);h=h.split(" ")[0];var k=this.findTdByRq(h);k&&0<k.length?(this.addOrRemoveMark(k,!1,h),d&&d(k[0],h,g)):console.log("\u65e0\u6548\u7684\u65e5\u671f"+
h)}}this._RQ_MAP=null;e.find(".ewa-ui-date").each(function(){$(this).find(".ewa-ui-calendar-year-chooese").length==$(this).find("td div[title]").length&&($(this).attr("all1","yes"),$(this).find("th").attr("chooese","yes"))})};this.findTdByRq=function(a){if(!a)return null;if(!this._RQ_MAP)this._RQ_MAP={};else if(this._RQ_MAP[a])return this._RQ_MAP[a];var b=a.replace(/-/ig,""),c=b.substring(0,6);c=$("#"+this.classId+" table[yearmonth='"+c+"']");if(0==c.length)return this._RQ_MAP[a]=null;this._RQ_MAP[a]=
c.find("div[date='"+b+"']").parent();return this._RQ_MAP[a]};this.GetChooeses=function(a){var b=[];(a?$(a):$("#"+this.classId+" .ewa-ui-days")).find(".ewa-ui-calendar-year-chooese").each(function(){b.push($(this).find("div:eq(0)").attr("title"))});return b};this.GetUnChooeses=function(a){var b=[];(a?$(a):$("#"+this.classId+" .ewa-ui-days")).find("td").each(function(){if(!$(this).attr("chooese")){var a=$(this).find("div:eq(0)").attr("title");a&&b.push(a)}});return b};this.Click=function(a,b){if(!$(a).attr("deny")&&
""!=a.innerHTML.trim()&&(!this.ClickBeforeEvent||this.ClickBeforeEvent(a.id,a,b,"DAY"))){var c=$(a).find("div:eq(0)").attr("title"),d=this.getChooeseName();d=$(a).attr(d);this.addOrRemoveMark(a,d,c);this.ClickEvent&&this.ClickEvent([c],!d,b)}};this.ClickBeforeEvent=function(a,b,c,d){console.log("overwrite xxx.ClickBeforeEvent(id, obj, evt, type)");return!0};this.ClickEvent=function(a,b,c){console.log("overwrite xxx.ClickEvent(rqs,   isChecked, evt)")}}
function EWA_CalendarClass(){this._Weeks=_EWA_G_SETTINGS.WEEKS.split(",");this._Days=[31,28,31,30,31,30,31,31,30,31,30,31];this._Months=_EWA_G_SETTINGS.MONTHS.split(",");this._CurDate=new Date;this._SelectMinute=this._SelectHour=this._SelectYear=this._SelectMonth=this._DaysTable=null;this.CreateWindow=window;this.IsShowTime=!1;this.Dialog=this.Object=null;this.ChangeDate=function(){this._SetNewDate(this._SelectYear.value,this._SelectMonth.value,1);this._WriteDays(!1)};this._SetNewDate=function(a,
b,c){if(!a){a=this._SelectYear.value;b=this._SelectMonth.value;c=this._DaysTable.getAttribute("EMP_CURRENT_DAY");var d=(0==(a-2008)%4&&0!=a%100||0==a%400)&&1==b?29:this._Days[b];c>d&&(c=d)}this._CurDate=new Date(a,b,c);this.IsShowTime&&(a=this._SelectMinute.value,this._CurDate.setHours(this._SelectHour.value),this._CurDate.setMinutes(a))};this.SetDate=function(a){a=a.split(" ");var b=a[0].split("-");3>b.length&&(b=a[0].split("/"));3>b.length&&(b=a[0].split("."));3==b.length&&(b[0]=parseInt(b[0]),
"0"==b[1].substring(0,1)&&(b[1]=b[1].substring(1)),"0"==b[2].substring(0,1)&&(b[2]=b[2].substring(1)),b[1]=parseInt(b[1]),b[2]=parseInt(b[2]),"NaN"!=b[0]+""&&"NaN"!=b[1]+""&&"NaN"!=b[2]+""&&("ENUS"==EWA.LANG.toUpperCase()?this._CurDate="dd/MM/yyyy"==_EWA_G_SETTINGS.DATE?new Date(b[2],b[1]-1,b[0]):new Date(b[2],b[0]-1,b[1]):this._CurDate=new Date(b[0],b[1]-1,b[2]),1<a.length&&(b=a[1].split(":"),this._CurDate.setHours(b[0]),1<b.length&&this._CurDate.setMinutes(b[1]),2<b.length&&this._CurDate.setSeconds(b[2].split(".")[0]))),
a=this._CurDate.getDate(),this._DaysTable&&this._DaysTable.setAttribute("EMP_CURRENT_DAY",a))};this._CreateTime=function(){var a=this._CurDate,b=this.CreateWindow.document.createElement("div"),c=this.CreateWindow.document.createElement("select"),d=this.CreateWindow.document.createElement("select"),e=this.CreateWindow.document.createElement("span");e.innerHTML="\u65f6\u95f4 ";var f=this.CreateWindow.document.createElement("span");f.innerHTML=":";for(var g=0;24>g;g++){var h=10>g?"0"+g:g+"";c.options[c.options.length]=
new Option(h,h)}c.value=a.getHours();b.appendChild(e);b.appendChild(c);b.appendChild(f);b.appendChild(d);c=this.CreateWindow.document.createElement("span");c.innerHTML="&nbsp;";e=this.CreateWindow.document.createElement("span");e.style.cursor="pointer";e.style.color="blue";e.setAttribute("IS_ALL",0);e.onclick=function(){d.options.length=0;if(1==this.getAttribute("IS_ALL")){for(var b=0;12>b;b++){var c=(100+5*b+"").substring(1);d.options[d.options.length]=new Option(c,c)}b=a.getMinutes();b=0==b%5?b:
5*(parseInt(b/5)+1);d.value=(100+b+"").substring(1);this.setAttribute("IS_ALL",0);this.innerHTML="\u5168\u90e8"}else{for(b=0;60>b;b++)c=(100+b+"").substring(1),d.options[d.options.length]=new Option(c,c);b=a.getMinutes();d.value=(100+b+"").substring(1);this.setAttribute("IS_ALL",1);this.innerHTML="\u6bcf5\u5206\u949f"}};b.appendChild(c);b.appendChild(e);return b};this.CreateTime=function(){var a=[];a.push("<table border=0 class='ewa-ui-date-picker' style='border:1px solid #aaa' bgcolor='#E1E1E1' onselectstart='return false'>");
a.push("<tr><td><nobr></nobr></td></tr>");a.push("</table>");var b=this.CreateWindow.document.createElement("DIV");b.innerHTML=a.join("");a=b.childNodes[0].rows[0].cells[0].childNodes[0];for(var c=this._CreateTime();0<c.childNodes.length;)a.appendChild(c.childNodes[0]);c=a.getElementsByTagName("span")[3];c.setAttribute("IS_ALL",1);c.click();c.style.display="none";c=this.CreateWindow.document.createElement("input");c.type="button";if("enus"==EWA.LANG.toLowerCase()){c.value="Ok";var d="Clear"}else c.value=
"\u786e\u5b9a",d="\u6e05\u9664";c.onclick=function(){var a=EWA.B.IE?this.ownerDocument.parentWindow:this.ownerDocument.defaultView,b=this.parentNode.getElementsByTagName("select"),c=a._EWA_CALENDAR_ITEM.Object.value;b=b[0].value+":"+b[1].value;a._EWA_CALENDAR_ITEM.Object.value=b;a._EWA_CALENDAR_ITEM.Dialog.Show(!1);c!=b&&($(a._EWA_CALENDAR_ITEM.Object).trigger("keyup"),$(a._EWA_CALENDAR_ITEM.Object).trigger("blur"))};a.appendChild(c);c="<a href='javascript:void(0)' style='margin:0 5px;color:#08c;font-size:12px;'>"+
d+"</a>";$(a).append(c);$(a).find("a").click(function(){var a=EWA.B.IE?this.ownerDocument.parentWindow:this.ownerDocument.defaultView,b=a._EWA_CALENDAR_ITEM.Object.value;a._EWA_CALENDAR_ITEM.Object.value="";a._EWA_CALENDAR_ITEM.Dialog.Show(!1);""!=b&&($(a._EWA_CALENDAR_ITEM.Object).trigger("keyup"),$(a._EWA_CALENDAR_ITEM.Object).trigger("blur"))});$(a).append("<b class='fa fa-close' style='color:#666;font-size:12px;'></b>");$(a).find("b").click(function(){(EWA.B.IE?this.ownerDocument.parentWindow:
this.ownerDocument.defaultView)._EWA_CALENDAR_ITEM.Dialog.Show(!1)});return b.childNodes[0]};this.CreateCalendar=function(a){this.IsShowTime=a;var b=[];b.push("<table border=0 class='ewa-ui-date' onselectstart='return false'>");b.push("<tr>");b.push("<td height=28>"+this._CreateMonth()+"</td>");b.push("<td align=right>"+this._CreateYear()+"</td>");b.push("</tr>");b.push("<tr><td colspan=2>"+this._CreateDaysTable()+"</td></tr>");b.push("<tr style='display:none'><td colspan=2></td></tr>");b.push("<tr><td colspan=2>"+
this._CreateToDay()+"</td></tr>");b.push("</table>");var c=this.CreateWindow.document.createElement("DIV");c.innerHTML=b.join("");this._DaysTable=c.childNodes[0].rows[1].cells[0].childNodes[0];b=c.getElementsByTagName("select");this._SelectMonth=b[0];this._SelectYear=b[1];this._WriteDays();if(a){a=c.childNodes[0].rows[2];a.style.display="";a=a.cells[0];for(b=this._CreateTime();0<b.childNodes.length;)a.appendChild(b.childNodes[0]);a.getElementsByTagName("span")[3].click();this._SelectHour=a.getElementsByTagName("select")[0];
this._SelectMinute=a.getElementsByTagName("select")[1]}return c.childNodes[0]};this._CreateToDay=function(){var a={};"enus"==EWA.LANG.toLowerCase()?(a.today="Today",a.empty_title="Empty",a.empty="Empty",a.close="Close"):(a.today="\u8bbe\u7f6e\u4e3a\u4eca\u5929",a.empty_title="\u6e05\u7a7a\u65e5\u671f",a.empty="\u7a7a",a.close="\u5173\u95ed");var b="<div class='ewa-ui-date-today-day' title='"+a.today+"' onclick='_EWA_CALENDAR_ITEM.Object.value=this.innerHTML;if(_EWA_CALENDAR_ITEM.Object.onkeyup!=null)_EWA_CALENDAR_ITEM.Object.onkeyup();if(_EWA_CALENDAR_ITEM.Object.onblur!=null)_EWA_CALENDAR_ITEM.Object.onblur();_EWA_CALENDAR_ITEM.Dialog.Show(false);'>"+
this.GetDate(new Date)+"</div>";var c="<table border=0 class='ewa-ui-date-today' width=100%><tr>"+("<td class='ewa-ui-date-today-day' onclick='_EWA_CALENDAR_ITEM.Object.value=$(this).next().text();if(_EWA_CALENDAR_ITEM.Object.onkeyup!=null)_EWA_CALENDAR_ITEM.Object.onkeyup();if(_EWA_CALENDAR_ITEM.Object.onblur!=null)_EWA_CALENDAR_ITEM.Object.onblur();_EWA_CALENDAR_ITEM.Dialog.Show(false);'>"+_EWA_G_SETTINGS.Today+"</td>");c=c+("<td>"+b+"</td>")+("<td><div class='ewa-ui-date-today-clear' title='"+
a.empty_title+"' onclick='_EWA_CALENDAR_ITEM.Object.value=\"\";if(_EWA_CALENDAR_ITEM.Object.onkeyup!=null)_EWA_CALENDAR_ITEM.Object.onkeyup();if(_EWA_CALENDAR_ITEM.Object.onblur!=null)_EWA_CALENDAR_ITEM.Object.onblur();_EWA_CALENDAR_ITEM.Dialog.Show(false);'>"+a.empty+"</div></td>");c+="<td align=right><div class='ewa-ui-date-close' title='"+a.close+"' onclick='_EWA_CALENDAR_ITEM.Hidden()'><b>X</b></div></td>";return c+"</tr></table>"};this.MarkDay=function(){for(var a=1*this._DaysTable.getAttribute("EMP_CURRENT_DAY"),
b=1;b<this._DaysTable.rows.length;b+=1)for(var c=this._DaysTable.rows[b],d=0;d<c.cells.length;d+=1){var e=c.cells[d];0<e.childNodes.length&&1*GetInnerText(e.childNodes[0])==a?this.MarkSelected(e):this.MarkUnSelected(e)}};this.MarkSelected=function(a){$(a).addClass("ewa-ui-date-selected")};this.MarkUnSelected=function(a){$(a).removeClass("ewa-ui-date-selected")};this.MarkBlur=function(a){$(a).addClass("ewa-ui-date-blur")};this.MarkUnBlur=function(a){$(a).removeClass("ewa-ui-date-blur")};this._CreateMonth=
function(){for(var a=this._CreatePervNext(),b="<select onchange='_EWA_CALENDAR_ITEM.ChangeDate();'>",c=this._CurDate.getMonth(),d=0;d<this._Months.length;d+=1)b=d==c?b+("<option value='"+d+"' selected>"+this._Months[d]+"</option>"):b+("<option value='"+d+"'>"+this._Months[d]+"</option>");return a=a.replace("[$]",b+"</select>")};this._CreateYear=function(){for(var a=this._CurDate.getFullYear(),b=this._CreatePervNext(),c=["<select onchange='_EWA_CALENDAR_ITEM.ChangeDate();'>"],d=1900;2050>=d;d+=1)d==
a?c.push("<option value='"+d+"' selected>"+d+"</option>"):c.push("<option value='"+d+"'>"+d+"</option>");c.push("</select>");return b=b.replace("[$]",c.join(""))};this._CreatePervNext=function(){return"<table cellpadding=0 cellspacing=0 border=0><tr><td><div class='ewa-ui-date-prev'  onclick='var o=this.parentNode;var o1=o.nextSibling.childNodes[0];if(o1.selectedIndex>0){o1.value=o1.value*1-1;o1.onchange();}o=o1=null'><b class='fa fa-caret-left'></b></div></td><td>[$]</td><td><div class='ewa-ui-date-next' onclick='var o=this.parentNode;var o1=o.previousSibling.childNodes[0];if(o1.options.length-1>o1.selectedIndex){o1.value=o1.value*1+1;o1.onchange();}o=o1=null'><b class='fa fa-caret-right'></div></td></tr></table>"};
this._WriteDays=function(a){if(this.__LAST__WriteDaysDate!=this._CurDate){this.__LAST__WriteDaysDate=this._CurDate;var b=this._CreateDays();this._CurDate.getDate();var c=this._CurDate.getMonth(),d=this._CurDate.getFullYear();this._SelectMonth.value=c;this._SelectYear.value=d;var e=c+1;10>e&&(e="0"+e);c=d+"-"+e+"-DD";var f=this._CurDate.getFullYear()+""+e;null!=EWA.LANG&&"ENUS"==EWA.LANG.toUpperCase()&&(c="dd/MM/yyyy"==_EWA_G_SETTINGS.DATE?"DD/"+e+"/"+d:e+"/DD/"+d);for(e=1;e<this._DaysTable.rows.length;e+=
1){for(var g=this._DaysTable.rows[e],h=0;h<g.cells.length;h+=1)d=g.cells[h],d.innerHTML=null==b[e]||null==b[e][h]?"":"<div date='"+(f+b[e][h])+"' title='"+c.replace("DD",b[e][h])+"'>"+b[e][h]+"</div>",this.MarkUnSelected(d);""==$(g).text()?$(g).hide():$(g).show()}}a&&this.MarkDay()};this._CreateDaysTable=function(){var a=[];a[0]="<table class='ewa-ui-days' align ='center' border=0 cellpadding=1 cellspacing=1 EMP_CURRENT_DAY='"+this._CurDate.getDate()+"'>";for(var b=0;7>b;b+=1){a.push("<tr>");for(var c=
0;7>c;c+=1)0==b?a.push("<th>"+this._Weeks[c]+"</th>"):(a.push("<td onmouseover='if(this.innerHTML.length>0)_EWA_CALENDAR_ITEM.MarkBlur(this);'"),a.push(" onmouseout='if(this.innerHTML.length>0)_EWA_CALENDAR_ITEM.MarkUnBlur(this);'"),a.push(" onclick='_EWA_CALENDAR_ITEM.Clicked(this);'></td>"));a.push("</tr>")}a.push("</table>");return a.join("")};this.Clear=function(){this.Object.value="";this.Hidden()};this.Hidden=function(a){if(null!=this.Object.onblur&&!a)this.Object.onblur();this.Object=null;
this.Dialog.Show(!1)};this.Clicked=function(a){if(0<a.innerHTML.length){this._DaysTable.setAttribute("EMP_CURRENT_DAY",a.childNodes[0].innerHTML);this._SetNewDate();this.MarkDay();this.Object.value=this.GetDate();if(null!=this.Object.onkeyup)this.Object.onkeyup();if(null!=this.Object.onblur)this.Object.onblur();if(null!=this.Object.onchange)this.Object.onchange();this.Hidden(!0)}};this.GetDate=function(a){var b=_EWA_G_SETTINGS.DATE;null==a&&(a=this._CurDate);var c=a.getFullYear(),d=a.getMonth()+1,
e=a.getDate();10>d&&(d="0"+d);10>e&&(e="0"+e);b=b.replace("yyyy",c);b=b.replace("MM",d);b=b.replace("dd",e);this.IsShowTime&&(d=a.getHours(),a=a.getMinutes(),b+=" "+(10>d?"0"+d:d)+":"+(10>a?"0"+a:a));return b};this._CreateDays=function(){var a=(new Date(this._CurDate.getFullYear(),this._CurDate.getMonth(),1)).getDay(),b=1,c=[];c[0]=this._Weeks;for(var d=1,e=this._getCurMonthDays(),f=0;49>f;f+=1){if(0==f||7==a)c[d]=[],d+=1;7==a&&(a=0);if(b<=e)c[d-1][a]=10>b?"0"+b:b+"";else break;b+=1;a+=1}return c};
this._getCurMonthDays=function(){return(0==(this._CurDate.getFullYear()-2008)%4&&0!=(this._CurDate.getFullYear()-400)%100||0==(this._CurDate.getFullYear()-400)%400)&&1==this._CurDate.getMonth()?29:this._Days[this._CurDate.getMonth()]}}
var __Cal={C:EWA_CalendarClass,WND:null,WND_PARENT:null,WND_DIA:null,Pop:function(a,b){var c="WND_PARENT/Pop/"+b;__Cal[c]||(__Cal[c]={});c=__Cal[c];c.OBJ=a;if(null==c.WND){console.log("create instance");var d=c.WND_DIA=new EWA_UI_DialogClass;d.Width=172;d.Height=200;d.ShadowColor="";c.WND=new EWA_CalendarClass;"undefined"==typeof _EWA_DialogWnd?d.CreateWindow=window:(d.CreateWindow=_EWA_DialogWnd._ParentWindow,_EWA_DialogWnd.OpendDialogs[_EWA_DialogWnd.OpendDialogs.length]=d);d.CreateWindow._EWA_CALENDAR_ITEM=
c.WND;d.Create();c.WND.CreateWindow=d.CreateWindow;c.WND.SetDate(a.value);b=c.WND.CreateCalendar(b);d.SetObject(b);c.WND.Dialog=d}console.log("show instance");c.WND.SetDate(a.value);c.WND._WriteDays(!0);c.WND.Dialog.SetZIndex(10);c.WND.Object=a;c.WND_DIA.MoveBottom(a);c.WND_DIA.Show(!0)},PopTime:function(a){__Cal["WND_PARENT/PopTime/"]||(__Cal["WND_PARENT/PopTime/"]={});var b=__Cal["WND_PARENT/PopTime/"];b.OBJ=a;if(null==b.WND){var c=b.WND_DIA=new EWA_UI_DialogClass;c.Width=180;c.Height=20;c.ShadowColor=
"";b.WND=new EWA_CalendarClass;"undefined"==typeof _EWA_DialogWnd?c.CreateWindow=window:(c.CreateWindow=_EWA_DialogWnd._ParentWindow,_EWA_DialogWnd.OpendDialogs[_EWA_DialogWnd.OpendDialogs.length]=c);c.CreateWindow._EWA_CALENDAR_ITEM=b.WND;c.Create();b.WND.CreateWindow=c.CreateWindow;b.WND.SetDate(a.value);var d=b.WND.CreateTime();c.SetObject(d);b.WND.Dialog=c}b.WND.CreateWindow._EWA_CALENDAR_ITEM.Object=a;b.WND.CreateWindow._EWA_CALENDAR_ITEM.Dialog=b.WND_DIA;b.WND.SetDate(a.value);b.WND.Dialog.SetZIndex(10);
b.WND.Object=a;b.WND_DIA.MoveBottom(a);b.WND_DIA.Show(!0)}};EWA.UI.Calendar=__Cal;
function EWA_UI_MsgClass(a,b){this._IsSelfWindow=b;this._Dialog=null;this._Msg=a;this._Buttons=[];this._Caption=null;this._Icon="MSG_ICON";this.SetIcon=function(a){this._Icon=a};this.SetCaption=function(a){this._Caption=a};this.AddButton=function(a,b){this._Buttons.push({Text:a,Event:b})};this.AddButtons=function(a){if(null!=a)for(var b=0;b<a.length;b++)this._Buttons.push(a[b])};this._Init=function(){this._Dialog=__Dialog.OpenWindow("about:blank",Math.random(),500,200,this._IsSelfWindow);this._Dialog._FromMsgClass=
this;this._Dialog.SetHtml(this._CreateHtml());this._Dialog.SetCaption(this._Caption);var a=this._Dialog._Dialog.GetFrameContent().getElementsByTagName("table")[0],b=this._Dialog._Dialog.GetFrame();b.style.width=a.clientWidth+"px";b.style.height=a.clientHeight+"px"};this._CreateHtml=function(){var a=[];a.push("<table border=0 class='MSG_INFO'>");a.push("<tr><td rowspan=2 style='width:130px;' align='center'>");a.push("<div class='"+this._Icon+"'>&nbsp;</div></td>");a.push("<td class='MSG_TEXT'>");a.push(this._Msg);
a.push("</td></tr>");a.push("<tr><td class='MSG_BUTS'>");var b=this._CloseWindowJs();if(0<this._Buttons.length){a.push("<hr><table><tr>");for(var e=0;e<this._Buttons.length;e++){var f=this._Buttons[e];a.push("<td>");var g="<button _ewa_msg_default='"+(f.Default?1:0)+"'  type='button' _ewa_dialog_='"+this._Dialog.Id+"' ";g=f.Event&&"function"==typeof f.Event?g+(" onclick=\"_EWA_UI_WINDOW_LIST[this.getAttribute('_ewa_dialog_')]._FromMsgClass.fire("+e+')">'+f.Text+"</button>"):g+(' onclick="'+(f.Event?
f.Event+";"+b:b)+'">'+f.Text+"</button>");a.push(g);a.push("</td>")}a.push("</tr></table>")}a.push("</td></tr></table>");return a.join("")};this.fire=function(a){if((a=this._Buttons[a])&&a.Event)try{a.Event(this)}catch(d){console.log(d)}this.Hidden()};this._CloseWindowJs=function(){return"var a=this.getAttribute('_ewa_dialog_'); _EWA_UI_WINDOW_LIST[a].CloseWindow();"};this.Show=function(a,b){null==this._Dialog&&this._Init();if(a)if(a=this._Dialog._ParentWindow.document.getElementsByTagName("button"),
b){var c=[];for(b=0;b<a.length;b++){var d=$(a[b]);d.attr("_ewa_dialog_")==this._Dialog.Id&&(d.prop("disabled",!0),c.push(d))}setTimeout(function(){for(var a in c)c[a].prop("disabled",!1)},435)}else for(this._Dialog.ResizeByContent(),this._Dialog.MoveCenter(),b=0;b<a.length;b++)if(1==a[b].getAttribute("_ewa_msg_default")&&a[b].getAttribute("_ewa_dialog_")==this._Dialog.Id){a[b].focus();break}};this.Hidden=function(){this.Show(!1);this._Dialog.CloseWindow()}}
EWA.UI.Msg={IS_IN_APP:!1,C:EWA_UI_MsgClass,Show:function(a,b,c,d){if(0<a.indexOf("(")&&0<a.indexOf(")"))try{a=eval(a)}catch(e){console.log(a)}a=new EWA_UI_MsgClass(a);a.SetCaption(c);a.AddButtons(b);a.SetIcon(d);a.Show(!0,EWA.UI.Msg.IS_IN_APP);return a},ShowInfo:function(a,b,c){__EWA_MSG__=EWA.UI.Msg.Show(a,b,c,"MSG_ICON");$(__EWA_MSG__._Dialog._Dialog.GetFrame()).addClass("ewa-msg-info");return __EWA_MSG__},ShowError:function(a,b){var c=[];c[0]={Text:_EWA_INFO_MSG["BUT.OK"],Event:null,Default:!0};
__EWA_MSG__=EWA.UI.Msg.Show(a,c,b,"ERR_ICON");$(__EWA_MSG__._Dialog._Dialog.GetFrame()).addClass("ewa-msg-err");return __EWA_MSG__},Alter:function(a,b){var c=[];c[0]={Text:_EWA_INFO_MSG["BUT.OK"],Event:null,Default:!0};__EWA_MSG__=EWA.UI.Msg.Show(a,c,b,"MSG_ICON");$(__EWA_MSG__._Dialog._Dialog.GetFrame()).addClass("ewa-msg-alert");return __EWA_MSG__},Alert:function(a,b){var c=[];c[0]={Text:_EWA_INFO_MSG["BUT.OK"],Event:null,Default:!0};__EWA_MSG__=EWA.UI.Msg.Show(a,c,b,"MSG_ICON");$(__EWA_MSG__._Dialog._Dialog.GetFrame()).addClass("ewa-msg-alert");
return __EWA_MSG__},Confirm:function(a,b,c,d){var e=[];e[0]={Text:_EWA_INFO_MSG["BUT.YES"],Event:c};e[1]={Text:_EWA_INFO_MSG["BUT.NO"],Event:d,Default:!0};__EWA_MSG__=EWA.UI.Msg.Show(a,e,b,"QUS_ICON");$(__EWA_MSG__._Dialog._Dialog.GetFrame()).addClass("ewa-msg-confirm");return __EWA_MSG__},_Tip:function(a,b,c,d){var e=document.createElement("table");document.body.appendChild(e);$(e).css(b);b=e.insertRow(-1).insertCell(-1);$(b).css(c);if(d&&d instanceof Function){b.innerHTML='<i class="fa fa-refresh fa-spin"></i> '+
a;var f=setInterval(function(){d()&&(window.clearInterval(f),$(e).animate({opacity:0},200,function(){$(e).remove()}))},300)}else{b.innerHTML=a;if(!d||isNaN(d))d=1500;setTimeout(function(){$(e).animate({opacity:0},200,function(){$(e).remove()})},d)}},Tip:function(a,b){var c={width:300,height:80,padding:10,"background-color":"rgba(10,20,30,0.7)",position:"fixed",top:"50%",left:"50%","margin-left":-150,"margin-top":-60,"border-radius":10,"z-index":window._EWA_UI_DIALOG_COVERINDEX?window._EWA_UI_DIALOG_COVERINDEX+
10:1E6,color:"#fff"};EWA.B.IE&&9>1*EWA.B.VERSION&&(c.filter="progid:DXImageTransform.Microsoft.Gradient(GradientType=0,StartColorStr='#77000000',EndColorStr='#77000000')");EWA.UI.Msg._Tip(a,c,{"text-align":"center","font-size":16,"line-height":1.5},b)},TipBR:function(a,b){var c={height:20,padding:2,"background-color":"rgba(222,222,0,0.7)",position:"fixed",bottom:5,right:5,"border-radius":1,"z-index":window._EWA_UI_DIALOG_COVERINDEX?window._EWA_UI_DIALOG_COVERINDEX+10:1E6,color:"#111"};EWA.B.IE&&9>
1*EWA.B.VERSION&&(c.filter="progid:DXImageTransform.Microsoft.Gradient(GradientType=0,StartColorStr='#66000000',EndColorStr='#66000000')");EWA.UI.Msg._Tip(a,c,{"text-align":"center","font-size":12,"line-height":1.5},b)},TipBL:function(a,b){var c={height:20,padding:2,"background-color":"rgba(222,222,0,0.7)",position:"fixed",bottom:5,left:5,"border-radius":1,"z-index":window._EWA_UI_DIALOG_COVERINDEX?window._EWA_UI_DIALOG_COVERINDEX+10:1E6,color:"#111"};EWA.B.IE&&9>1*EWA.B.VERSION&&(c.filter="progid:DXImageTransform.Microsoft.Gradient(GradientType=0,StartColorStr='#66000000',EndColorStr='#66000000')");
EWA.UI.Msg._Tip(a,c,{"text-align":"center","font-size":12,"line-height":1.5},b)},TipTL:function(a,b){var c={height:20,padding:2,"background-color":"rgba(222,222,0,0.7)",position:"fixed",top:5,left:5,"border-radius":1,"z-index":window._EWA_UI_DIALOG_COVERINDEX?window._EWA_UI_DIALOG_COVERINDEX+10:1E6,color:"#111"};EWA.B.IE&&9>1*EWA.B.VERSION&&(c["background-color"]="filter:progid:DXImageTransform.Microsoft.Gradient(GradientType=0,StartColorStr='#00000000',EndColorStr='#66000000')");EWA.UI.Msg._Tip(a,
c,{"text-align":"center","font-size":12,"line-height":1.5},b)},TipTR:function(a,b){var c={height:20,padding:2,"background-color":"rgba(222,222,0,0.7)",position:"fixed",top:5,right:5,"border-radius":1,"z-index":window._EWA_UI_DIALOG_COVERINDEX?window._EWA_UI_DIALOG_COVERINDEX+10:1E6,color:"#111"};EWA.B.IE&&9>1*EWA.B.VERSION&&(c["background-color"]="filter:progid:DXImageTransform.Microsoft.Gradient(GradientType=0,StartColorStr='#00000000',EndColorStr='#66000000')");EWA.UI.Msg._Tip(a,c,{"text-align":"center",
"font-size":12,"line-height":1.5},b)}};$Mark=function(a,b){var c=1E3*b||3E3,d="<div class='ewa-mark' style='transition-duration:"+(b||3)+"s;'></div>";$(a).each(function(){var a=$(d),b=$(this).position();b={left:b.left+2,top:b.top-2,width:$(this).outerWidth(),height:$(this).outerHeight()};a.css(b);$("body").append(a);setTimeout(function(){a.css("opacity",0)},10);setTimeout(function(){a.remove()},c+10)})};$Confirm=EWA.UI.Msg.Confirm;$Tip=EWA.UI.Msg.Tip;$TipBR=EWA.UI.Msg.TipBR;$TipBL=EWA.UI.Msg.TipBL;
$TipTR=EWA.UI.Msg.TipTR;$TipTL=EWA.UI.Msg.TipTL;
function EWA_UI_FlowChartClass(){this.DEF_CHART_WIDTH=200;this.DEF_CHART_HEIGHT=50;this.DEF_BG_COLOR="#08c";this.DEF_COLOR="#fff";this.Create=function(a,b,c,d,e,f,g,h){this.PID=a;this.FIELD_ID=c;this.FIELD_TEXT=d;this.CHART_WIDTH=e||this.DEF_CHART_WIDTH;this.CHART_HEIGHT=f||this.DEF_CHART_HEIGHT;this.BG_COLOR=g||this.DEF_BG_COLOR;this.COLOR=h||this.DEF_COLOR;this.OFF=Math.round(this.CHART_HEIGHT*Math.sqrt(2)/2);this._CreateCss();c=["<div style='z-index:1;padding-left:"+this.OFF+"px;height:"+this.CHART_HEIGHT+
"px;position:relative;margin:auto;width:"+(this.CHART_WIDTH*b.length-(this.OFF-4)*(b.length-1)+4)+"px'>"];for(d=0;d<b.length;d++)e=this._CreateChart(b[d],d,d==b.length-1),c.push(e);c.push("</div>");$X(a)?$($X(a)).append(c.join("")):$("body").append(c.join(""))};this._CreateCss=function(){var a=this.CHART_HEIGHT,b=this.OFF,c=Math.round(b);this.CSS={main:"position:relative;margin-left:-"+(b-4)+"px;float:left;z-index:[ZINDEX];height:"+a+"px;width:[WIDTH]px;overflow:hidden;",leftbox:"background-color:[BGCOLOR];float:left;width:"+
c+"px;height:"+a+"px;overflow:hidden",leftarrow:"background: #fff;margin-left: -"+b+"px;width:"+a+"px;height:"+a+"px;-webkit-transform: rotate(45deg);transform: rotate(45deg);",center:"height:"+a+"px;float:left;text-overflow: ellipsis;overflow: hidden;line-height:"+a+"px;background-color:[BGCOLOR];width:"+(this.CHART_WIDTH-2*c)+"px;text-align:center;font-size:16px",centertd:"color:[COLOR];text-overflow: ellipsis;overflow: hidden;width:100%;text-align:center;font-size:16px",rightbox:"float:right;width:"+
c+"px;height:"+a+"px;overflow:hidden",rightarrow:"background:[BGCOLOR];margin-left: -"+c+"px;width:"+a+"px;height:"+a+"px;-webkit-transform: rotate(45deg);transform: rotate(45deg);"}};this._CreateChart=function(a,b,c){console.log(a);var d=[],e=this.CSS.main.replace("[ZINDEX]",1E3-b).replace("[LEFT]",(this.CHART_WIDTH-20)*b);e=e.replace("[WIDTH]",this.CHART_WIDTH);d.push("<div id='"+a[this.FIELD_ID]+"' style='"+e+"'>");var f=a.bgColor||this.BG_COLOR;e=this.CSS.leftbox.replace("[BGCOLOR]",f);var g=
this.CSS.center.replace("[BGCOLOR]",f);f=this.CSS.rightarrow.replace("[BGCOLOR]",f);var h=this.CSS.centertd.replace("[COLOR]",a.color||this.COLOR);d.push("<div style='"+e+"'>");d.push("<div style='"+this.CSS.leftarrow+"'></div>");d.push("</div>");d.push("<table border=0 cellpadding=0 cellspacing=0  style='"+g+"'><tr><td style='"+h+"'>");"function"==typeof this.FIELD_TEXT?(a=this.FIELD_TEXT(a,b,c),d.push(a)):d.push(a[this.FIELD_TEXT]);d.push("</td></tr></table>");d.push("<div style='"+this.CSS.rightbox+
"'>");d.push("<div style='"+f+"'></div>");d.push("</div>");d.push("</div>");return d.join("")}}
EWA_UI_HtmlEditorConfig={OPT_PopImgProperties:!0,OPT_ImageResizes:null,fonts:[{name:"\u5fae\u8f6f\u96c5\u9ed1",font:"Microsoft YaHei"},{name:"\u5b8b\u4f53",font:"\u5b8b\u4f53"},{name:"Arial",font:"Arial"},{name:"STHeiti",font:"STHeiti"}],formats:[{name:"H1",format:"h1"},{name:"H2",format:"h2"},{name:"H3",format:"h3"},{name:"H4",format:"h4"},{name:"H5",format:"h5"},{name:"\u666e\u901a",format:"p"}],sizes:[{name:"\u8d85\u5927",size:"7"},{name:"\u7279\u5927",size:"6"},{name:"\u5927",size:"5"},{name:"\u6807\u51c6",
size:"4"},{name:"\u5c0f",size:"3"},{name:"\u7279\u5c0f",size:"2"},{name:"\u7279\u5c0f",size:"1"}],css:"img{max-width:100%}html{background:#2f2f2f}body{width: 800px; padding: 20px; margin: auto; box-shadow: rgb(241, 241, 241) 1px 1px 13px; overflow-y: scroll;   font-family: 'Microsoft YaHei', STHeiti, \u5fae\u8f6f\u96c5\u9ed1, tahoma, Verdana, Arial, sans-serif, \u5b8b\u4f53; background: rgb(255, 255, 255);}",colors:"#ffffff #000000 #eeece1 #1f497d #4f81bd #c0504d #9bbb59 #8064a2 #4bacc6 #f79646 #f2f2f2 #7f7f7f #ddd9c3 #c6d9f0 #dbe5f1 #f2dcdb #ebf1dd #e5e0ec #dbeef3 #fdeada #d8d8d8 #595959 #c4bd97 #8db3e2 #b8cce4 #e5b9b7 #d7e3bc #ccc1d9 #b7dde8 #fbd5b5 #bfbfbf #3f3f3f #938953 #548dd4 #95b3d7 #d99694 #c3d69b #b2a2c7 #92cddc #fac08f #a5a5a5 #262626 #494429 #17365d #366092 #953734 #76923c #5f497a #31859b #e36c09 #7f7f7f #0c0c0c #1d1b10 #0f243e #244061 #632423 #4f6128 #3f3151 #205867 #974806 #c00000 #ff0000 #ffc000 #ffff00 #92d050 #00b050 #00b0f0 #0070c0 #002060 #7030a0".split(" "),
buts:{FormatBlock:{id:"fn_FormatBlock",cmd:"PopFormatBlock",title:"\u683c\u5f0f","class":"fa fa-header"},FontSize:{id:"fn_FontSize",cmd:"PopFontSize",title:"\u5b57\u9ad4\u5927\u5c0f","class":"fa fa-text-height"},FontName:{id:"fn_FontName",cmd:"PopFont",title:"\u5b57\u4f53","class":"fa fa-font"},BOLD:{id:"st_bold",cmd:"BOLD",title:"BOLD","class":"fa fa-bold"},ITALIC:{id:"st_italic",cmd:"ITALIC",title:"ITALIC","class":"fa fa-italic"},UNDERLINE:{id:"st_underline",cmd:"UNDERLINE",title:"UNDERLINE","class":"fa fa-underline"},
InsertOrderedList:{id:"st_insertorderedlist",cmd:"InsertOrderedList",title:"InsertOrderedList","class":"fa fa-list-ol"},InsertunOrderedList:{id:"st_insertunorderedlist",cmd:"InsertunOrderedList",title:"InsertunOrderedList","class":"fa fa-list-ul"},INDENT:{id:"st_indent",cmd:"INDENT",title:"INDENT","class":"fa fa-indent"},Outdent:{id:"st_outdent",cmd:"Outdent",title:"Outdent","class":"fa fa-outdent"},JustifyLEFT:{id:"st_justifyleft",cmd:"JustifyLEFT",title:"\u5de6\u5bf9\u9f50","class":"fa fa-align-left"},
JustifyCENTER:{id:"st_justifycenter",cmd:"JustifyCENTER",title:"\u5c45\u4e2d","class":"fa fa-align-center"},JustifyRIGHT:{id:"st_justifyright",cmd:"JustifyRIGHT",title:"\u53f3\u5bf9\u9f50","class":"fa fa-align-right"},CreateLink:{id:"st_createlink",cmd:"CreateLink",title:"\u521b\u5efa\u94fe\u63a5","class":"fa fa-chain"},CODE_TXT:{id:"code_txt",cmd:"CODE_TXT",title:"\u6e90\u4ee3\u7801","class":"fa fa-html5"},eraser:{id:"eraser",cmd:"eraser",title:"\u6e05\u9664\u683c\u5f0f","class":"fa fa-eraser"},
ForColor:{id:"fn_ForColor",cmd:"PopForColor",title:"\u5b57\u9ad4\u984f\u8272","class":"fa fa-font ewa-editor-for"},BackColor:{id:"fn_BackColor",cmd:"PopBackColor",title:"\u80cc\u666f\u984f\u8272","class":"fa fa-font ewa-editor-bg"},Img:{id:"fn_Img",cmd:"PopImg",title:"\u5716\u7247","class":"fa fa-camera"},FullScreen:{id:"fn_FullScreen",cmd:"FullScreen",title:"\u5168\u5c4f","class":"fa fa-square-o"},Word2Html:{id:"fn_Word2Html",cmd:"Word2Html",title:"\u8f6c\u6362Word","class":"fa fa-file-word-o"}},
defaultConf:[["FontName","FormatBlock","FontSize"],["BOLD","ITALIC","UNDERLINE"],["InsertOrderedList","InsertunOrderedList"],["JustifyLEFT","JustifyCENTER","JustifyRIGHT"],["INDENT","Outdent"],["CreateLink","eraser"],["ForColor","BackColor"],["Word2Html","Img","FullScreen"],["CODE_TXT"]],pop:function(a,b){for(var c in __Cal)0==c.indexOf("EDITOR_Pop_")&&__Cal[c].WND.Show(!1);c="EDITOR_Pop_"+(a?a.id:"");__Cal[c]||(__Cal[c]={});var d=__Cal[c];d.OBJ=a;if(null==d.WND){var e=d.WND=new EWA_UI_DialogClass;
e.Width=172;e.Height=50;e.ShadowColor="";e.CreateWindow=window;e.CreateWindow._EWA_CALENDAR_ITEM=d.WND;e.Create();e.SetHtml(b);$(e.GetFrameContent()).find("a").attr("onclick",'__Cal["'+c+'"].WND.Show(false);');$('div[ewa_name="DIV_BACK1"]').hide()}d.WND.SetZIndex(10);a?(d.WND.Object=a,d.WND.MoveBottom(a)):d.WND.MoveCenter();d.WND.Show(!0);return d},pop1:function(a,b,c,d){a="EDITOR_Pop_"+a;__Cal[a]||(__Cal[a]={});var e=__Cal[a];if(null==e.WND){var f=e.WND=new EWA_UI_DialogClass;f.Width=c;f.Height=
d;f.ShadowColor="";"undefined"==typeof _EWA_DialogWnd?f.CreateWindow=window:(f.CreateWindow=_EWA_DialogWnd._ParentWindow,_EWA_DialogWnd.OpendDialogs[_EWA_DialogWnd.OpendDialogs.length]=f);f.CreateWindow._EWA_CALENDAR_ITEM=e.WND;f.Create()}e.WND.SetHtml(b);$(e.WND.GetFrameContent()).find("#butClose").attr("onclick",'__Cal["'+a+'"].WND.Show(false);');e.WND.SetZIndex(10);e.WND.MoveCenter();e.WND.Show(!0);return e}};
function EWA_UI_HtmlEditorClass(){this.DEF_CHART_WIDTH=200;this.DEF_CHART_HEIGHT=50;this.DEF_BG_COLOR="#08c";this.DEF_COLOR="#fff";this.OBJ_REPLACE=null;this._CreateFonts=function(){for(var a=["<table class='ewa-editor-pop'>"],b=0;b<EWA_UI_HtmlEditorConfig.fonts.length;b++){var c=EWA_UI_HtmlEditorConfig.fonts[b];a.push("<tr><td>");a.push("<a style='font-size:16px;line-height:1.5;font-family:"+c.font+"' href='javascript:"+this.Id+'.executeSetFont("'+c.font+"\")'>"+c.name+"</a>");a.push("</td></tr>")}a.push("</table>");
return a.join("\n")};this._CreateFormats=function(){for(var a=["<table class='ewa-editor-pop'>"],b=0;b<EWA_UI_HtmlEditorConfig.formats.length;b++){var c=EWA_UI_HtmlEditorConfig.formats[b];a.push("<tr><td>");a.push("<"+c.format+"><a href='javascript:"+this.Id+'.executeSetFormat("'+c.format+"\")'>"+c.name+"</a></"+c.format+">");a.push("</td></tr>")}a.push("</table>");return a.join("\n")};this._CreateFontSizes=function(){for(var a=["<table class='ewa-editor-pop'>"],b=0;b<EWA_UI_HtmlEditorConfig.sizes.length;b++){var c=
EWA_UI_HtmlEditorConfig.sizes[b];a.push("<tr><td>");a.push("<font size="+c.size+"><a href='javascript:"+this.Id+'.executeFontSize("'+c.size+"\")'>"+c.name+"</a></font>");a.push("</td></tr>")}a.push("</table>");return a.join("\n")};this.executeFontSize=function(a){$("#"+this.BoxId+" iframe:eq(0)");this.execDocumentCommand("FontSize",!1,a)};this.executeSetFont=function(a){$("#"+this.BoxId+" iframe:eq(0)");this.execDocumentCommand("FontName",!1,a)};this.executeSetFormat=function(a){$("#"+this.BoxId+
" iframe:eq(0)");this.execDocumentCommand("FormatBlock",!1,a)};this.executeForColor=function(a){$("#"+this.BoxId+" iframe:eq(0)");this.execDocumentCommand("ForeColor",!1,a)};this.executeBackColor=function(a){var b=$("#"+this.BoxId+" iframe:eq(0)")[0].contentWindow;this.execDocumentCommand("BackColor",!1,a);$(b.document.body).css("background","#fff")};this.execDocumentCommand=function(a,b,c){$("#"+this.BoxId+" iframe:eq(0)")[0].contentWindow.document.execCommand(a,b,c);this.executeAfterEvent(a,c)};
this.executeImages=function(a){for(var b=$("#"+this.BoxId+" iframe:eq(0)")[0].contentWindow,c=0,d=0,e=this,f=0;f<a.files.length;f++){var g=a.files[f];g.type&&0==g.type.indexOf("image/")&&c++;if(g.type&&0==g.type.indexOf("image/")){var h=new FileReader;h.onloadend=function(a){var f=new Image;f.src=a.target.result;f.style.maxWidth="100%";b.document.body.appendChild(f);d++;d==c&&(EWA_MiscPasteTool.processAsHtml(),EWA_MiscPasteTool.process());e.executeAfterEvent("executeImages",f)};h.readAsDataURL(g)}}};
this.executeWord=function(a){for(var b=$("#"+this.BoxId+" iframe:eq(0)")[0].contentWindow,c=EWA.CP+(EWA.CP.endsWith("/")?"":"/")+"EWA_STYLE/cgi-bin/_re_/?method=2Html",d=this,e=0;e<a.files.length;e++){var f=a.files[e],g=f.name.lastIndexOf(".");if(0<g){if(g=f.name.substring(g).toLowerCase(),".doc"!=g&&".docx"!=g&&".xls"!=g&&".xlsx"!=g&&".odt"!=g){$Tip("\u4ec5\u652f\u6301 doc/docx/xls/xlsx/odt\u6587\u4ef6");break}}else{$Tip("\u4ec5\u652f\u6301 doc/docx/xls/xlsx/odt\u6587\u4ef6");break}g=new FileReader;
g.onloadend=function(a){var e={};e.src=a.target.result;c+="&name="+f.name.toURL();a=$X(d.BoxId).parentNode;var g=d.BoxId+"_cover",h='<div id="'+g+'" style="width:100%;height:100%" class="ewa-ui-dialog-cover"></div>';$(a).css("position","relative").append(h);$JP(c,e,function(a){a.rst?(b.document.body.innerHTML=a.cnt,$(b.document.body).find("img").each(function(){$(this).attr("src",a.img_root+$(this).attr("src"))}),$("#"+g).remove(),$Tip("\u5904\u7406\u5b8c\u6210"),d.executeAfterEvent("executeWord",
a)):$Tip(a.msg)})};g.readAsDataURL(f)}};this.PopFontSize=function(a){var b=this._CreateFontSizes();EWA_UI_HtmlEditorConfig.pop(a,b)};this.PopFont=function(a){var b=this._CreateFonts();EWA_UI_HtmlEditorConfig.pop(a,b)};this.PopFormatBlock=function(a){var b=this._CreateFormats();EWA_UI_HtmlEditorConfig.pop(a,b)};this.PopForColor=function(a){var b=this._CreateColorBox("executeForColor");EWA_UI_HtmlEditorConfig.pop(a,b)};this.PopBackColor=function(a){var b=this._CreateColorBox("executeBackColor");EWA_UI_HtmlEditorConfig.pop(a,
b)};this.PopImg=function(){};this.FullScreen=function(){var a=$("#"+this.BoxId);if(a.attr("isfull")){var b=a.attr("old_css");a.attr("style",b).attr("isfull","")}else{window._EWA_UI_DIALOG_COVERINDEX?_EWA_UI_DIALOG_COVERINDEX++:_EWA_UI_DIALOG_COVERINDEX=999;var c=_EWA_UI_DIALOG_COVERINDEX;b=a.attr("style");a.attr("old_css",b).attr("isfull","1");a.css({position:"fixed",left:0,top:0,right:0,bottom:0,width:"100%",height:"100%","z-index":c})}};this._CreateColorBox=function(a){for(var b=["<table class='ewa-editor-pop'><tr>"],
c=0;c<EWA_UI_HtmlEditorConfig.colors.length;c++){0<c&&0==c%10&&b.push("</tr><tr>");var d=EWA_UI_HtmlEditorConfig.colors[c];b.push("<td><a href='javascript:"+this.Id+"."+a+'("'+d+"\")' class='ewa-edit-pop-color' style='background:"+d+"'>&nbsp;</a></td>")}b.push("</table>");return b.join("\n")};this.Word2Html=function(){};this.GetHtml=function(){var a=$("#"+this.BoxId+" iframe:eq(0)")[0].contentWindow,b=$("#"+this.BoxId+" iframe:eq(1)")[0].contentWindow;return"none"==$("#"+this.BoxId+" iframe:eq(0)").css("display")?
a.document.body.innerHTML=b.getText():a.document.body.innerHTML};this.GetText=function(){var a=$("#"+this.BoxId+" iframe:eq(0)")[0].contentWindow,b=$("#"+this.BoxId+" iframe:eq(1)")[0].contentWindow;return"none"==$("#"+this.BoxId+" iframe:eq(0)").css("display")?a.document.body.innerHTML=b.getText():a.document.body.innerText};this.Create=function(a){this.OBJ_REPLACE=a;this.Id=("EWA_Html_"+Math.random()).replace(".","_");this.BoxId=this.Id+"box";window[this.Id]=this;EWA.F.FOS[this.Id]=this;var b=a.value||
a.innerHTML,c=$(a).height(),d={border:"1px solid #ccc",position:"relative",width:$(a).width(),height:c,overflow:"hidden"};"1"==a.getAttribute("EWA_DHTML")&&(d.width="100%");c=document.createElement("table");c.id=this.BoxId;$(c).css(d).addClass("ewa-editor").attr("cellpadding",0).attr("cellspacing",0);d=c.insertRow(-1).insertCell(-1);d.className="ewa-editor-buts";var e=c.insertRow(-1).insertCell(-1);$(e).css("position","static").css("opacity",1).addClass("ewa-ui-dialog-cover");var f=[],g=EWA_UI_HtmlEditorConfig.defaultConf,
h;for(h in g){0<h&&f.push("<span class='ewa-editor-but-spt '>|</span>");for(var k in g[h]){var m=this._CreateButton(EWA_UI_HtmlEditorConfig.buts[g[h][k]]);f.push(m)}}d.innerHTML=f.join("");a.parentNode.insertBefore(c,a);a.style.display="none";this._CreateIframe(e,b,a);a="<input onchange='"+this.Id+".executeImages(this)' multiple accept='image/jpeg,image/png,image/bmp' type=file  style='width:30px;height:30px;position:absolute;top:4px;left:0px;opacity:0.0'>";$("#"+this.BoxId).find("a[id=fn_Img]").append(a);
a="<input onchange='"+this.Id+".executeWord(this)' accept='doc,docx,odt' type=file  style='width:30px;height:30px;position:absolute;top:4px;left:0px;opacity:0.0'>";$("#"+this.BoxId).find("a[id=fn_Word2Html]").append(a);this.executeAfterEvent("init","ok");if(window.__Cal)for(h in __Cal)0==h.indexOf("EDITOR_Pop_")&&delete window.__Cal[h]};this._CreateIframe=function(a,b,c){a.innerHTML="<iframe id='"+this.Id+"cntent' frameborder=0 width=100% height=100%></iframe><iframe id='"+this.Id+"code' src0='"+
(EWA.RV_STATIC_PATH||"/EmpScriptV2")+"/EWA_STYLE/editor/CodeMirror/index.html' style='display: none; width: 100%; height: 100%' frameborder=0></iframe>";var d=this;setTimeout(function(){var a=$("#"+d.BoxId+" iframe:eq(0)"),c=a[0].contentWindow,g=c.document;g.body.style.minHeight=a.height()+"px";840>a.width()&&(g.body.style.boxSizing="border-box",g.body.style.width="100%");a=g.createElement("style");a.textContent=EWA_UI_HtmlEditorConfig.css;g.getElementsByTagName("head")[0].appendChild(a);a=EWA.CP+
(EWA.CP.endsWith("/")?"":"/")+"EWA_STYLE/cgi-bin/_re_/index.jsp?method=HtmlImages";EWA_UI_HtmlEditorConfig.OPT_ImageResizes&&(a+="&ImageReiszes="+EWA_UI_HtmlEditorConfig.OPT_ImageResizes.toURL());EWA_MiscPasteTool.bind(c.document.body,a,function(a){d.executeAfterEvent("HtmlImages",a)});g.contentEditable=!0;g.designMode="on";g.body.innerHTML=b;$(g.body).css(EWA_UI_HtmlEditorConfig.css);EWA_UI_HtmlEditorConfig.OPT_PopImgProperties&&(g.onmousedown=function(a){a=a||event;a=a.target||a.srcElement;"IMG"==
a.tagName&&d.PopImgProperties(a)});$(g.body).bind("cut",function(){setTimeout(function(){d.executeAfterEvent("cut")},10)});$(g.body).bind("keyup",function(){d.executeAfterEvent("keyup")});$(g.body).bind("paste",function(){setTimeout(function(){d.executeAfterEvent("paste")},10)});$(g.body).bind("undo",function(){d.executeAfterEvent("undo")});$(g.body).bind("redo",function(){d.executeAfterEvent("redo")})},411)};this.PopImgProperties=function(a){var b=["<table style='background:rgba(0,0,0,0.77);color:#f1f1f1;' border=0 width=300 height=140>"];
b.push("</tr><td colspan=2 align=center>\u8bbe\u5b9a\u56fe\u7247\u5c5e\u6027</td></tr>");b.push("<tr><td>\u5c3a\u5bf8\uff1a</td><td><input name='width' value='"+a.width+"' size=4 maxlength=4> x ");b.push("<input name='height' value='"+a.height+"' size=4 maxlength=4>");b.push("</td></tr>");b.push("<tr><td>\u6d6e\u52a8\uff1a</td><td><select name='float'><option value=''></option>");b.push("<option value='left'>\u5de6</option>");b.push("<option value='right'>\u53f3</option>");b.push("</select></td></tr>");
b.push("<tr><td>\u8fb9\u754c\uff1a</td><td><input name='margin' value='2' size=4 maxlength=2> \u50cf\u7d20 ");b.push("</td></tr>");b.push("<tr><td>\u8fb9\u754c\uff1a</td><td><input type='checkbox' name='bt'> \u8bbe\u4e3a\u6807\u9898\u56fe ");b.push("</td></tr>");b.push("</tr><td colspan=2 align=center><input type=button value='\u786e\u5b9a' id='butOk'>&nbsp;");b.push("<input type=button onclick='$(this).parentsUntil(\"div[ewa_name=DIV_FRAME]\").last().parent().hide()' value='\u5173\u95ed'></td></tr>");
b.push("</table>");var c=EWA_UI_HtmlEditorConfig.pop1(a.getAttribute("_tmp_id"),b.join(""),300,150).WND.GetFrameContent(),d=this;$(c).find("#butOk").bind("click",function(){$(this.parentNode).find("#butClose").click();var b=$(c).find("[name=width]").val();""!=b?a.width=b:$(a).attr("width",null);b=$(c).find("[name=height]").val();""!=b?a.height=b:$(a).attr("height",null);b=$(c).find("[name=float]").val();$(a).css("float",b);$(a).css("margin",$(c).find("[name=margin]").val()+"px");$(c).find("[name=bt]")[0].checked&&
(b=a.src.replace(location.origin,""),b=b.replace("//","/"),$("#NWS_HEAD_PIC").val(b),d.userSetHeaderPic&&d.userSetHeaderPic(b))})};this._CreateButton=function(a){try{return"<a href='javascript:void(0)' class='btn "+a["class"]+"' onclick='"+this.Id+".execute(this)' id='"+a.id+"' cmd='"+a.cmd+"' title='"+a.title+"'></a>"}catch(b){return console.log(a),""}};this.showCode=function(a){var b=$("#"+this.BoxId+" iframe:eq(0)")[0].contentWindow,c=$("#"+this.BoxId+" iframe:eq(1)")[0].contentWindow;b=c.style_html(b.document.body.innerHTML,
4," ",80);a.setAttribute("tag","txt");c.editor?c.editor.setValue(b):(__VAL__=b,__TYPE__="html",c.aa())};this.execute=function(a){var b=$("#"+this.BoxId+" iframe:eq(0)")[0].contentWindow,c=$("#"+this.BoxId+" iframe:eq(1)")[0].contentWindow,d=b.document,e=a.getAttribute("cmd");if(0==a.id.indexOf("st_"))"CreateLink"==e?d.execCommand(e,!0,null):d.execCommand(e,!1,null);else if(0==a.id.indexOf("fn_"))this[e](a);else if("eraser"==e)this.executeEraser();else if("CODE_TXT"==e){var f=a.getAttribute("tag"),
g=$("#"+this.BoxId+" iframe:eq(0)");d=$("#"+this.BoxId+" iframe:eq(1)");if(f)g.show(),d.hide(),a.setAttribute("tag",""),b.document.body.innerHTML=c.getText();else if(g.hide(),d.show(),d.attr("src0")){b=d.attr("src0");d.attr("src",b);d.removeAttr("src0");var h=this;this._WAIT_CODE_LOAD_COMPLETE=setInterval(function(){"complete"==c.document.readyState&&(window.clearInterval(h._WAIT_CODE_LOAD_COMPLETE),h._WAIT_CODE_LOAD_COMPLETE=null,h.showCode(a))},100)}else this.showCode(a)}else"IMG"==a.id?insertImg(window):
("CreateLink"==a.id?b.document.execCommand(a.id,!0,null):b.document.execCommand(a.id,!1,null),b.document.body.focus());this.executeAfterEvent(e)};this.executeEraser=function(){var a=$("#"+this.BoxId+" iframe:eq(0)")[0].contentWindow.document.body;$(a).find("p,h1,h2,h3,h4,h5").each(function(){0==$(this).find("img").length&&(this.innerText=this.innerText,""==this.innerText.trimEx()&&$(this).remove())});$(a).find("div,font,span,a").each(function(){0==$(this).find("img").length&&""==this.innerText.trimEx()&&
$(this).remove()});$(a).find("script").remove();$(a).find("style").remove();$(a).find("link").remove();$(a).find("meta").remove();$(a).find("title").remove();$(a).find("colgroup").remove();$(a).find("*").attr("style",null).attr("class",null).attr("face",null).attr("size",null).attr("href",null).attr("onerror",null).attr("onload",null).attr("onclick",null).attr("onmousedown",null).attr("onmouseover",null).attr("onmouseout",null).attr("color",null).attr("className",null);this.OBJ_REPLACE.value=a.innerHTML=
a.innerHTML.replace(/\x3c!--[\w\W\r\n]*?--\x3e/gim,"")};this.executeAfterEvent=function(a,b){var c=$("#"+this.BoxId+" iframe:eq(0)")[0].contentWindow.document.body;if("init"!=a||"ok"!=b)this.OBJ_REPLACE.value=c.innerHTML;this.userAfterEvent&&this.userAfterEvent(a,b,c)};this.userAfterEvent=function(a,b,c){}}
var EWA_MiscPasteTool={target:document.body,handleUrl:null,images:[],paste:function(a){if((a=a.originalEvent)&&a.clipboardData&&a.clipboardData.items&&0<a.clipboardData.items.length)for(var b=0;b<a.clipboardData.items.length;b++){var c=a.clipboardData.items[b];if("image/png"==c.type)EWA_MiscPasteTool.processAsPaste(c);else if("text/html"==c.type){a.clipboardData.getData("text/html")&&setTimeout(function(){EWA_MiscPasteTool.processAsHtml();EWA_MiscPasteTool.process()},311);break}}},processAsPaste:function(a){var b=
new FileReader;b.onloadend=function(){var a=null,b={};$(EWA_MiscPasteTool.target).find("img").each(function(){b[this.src]=!0});EWA_MiscPasteTool.target.ownerDocument.execCommand("InsertImage",!1,this.result);$(EWA_MiscPasteTool.target).find("img").each(function(){null!=a||b[this.src]||(a=this)});if(a){var e=EWA_MiscPasteTool.tmpId(a);EWA_MiscPasteTool.images.push({id:e,src:a.src,mode:"base64"});EWA_MiscPasteTool.process()}else alert("not img")};b.readAsDataURL(a.getAsFile())},processAsHtml:function(){var a=
this.target;$(a).find("img").each(function(){if(!this.getAttribute("_tmp_id")){var a=EWA_MiscPasteTool.tmpId(this);this.src&&0!=this.src.indexOf(location.origin)&&EWA_MiscPasteTool.images.push({id:a,src:this.src,mode:0==this.src.indexOf("data:image")?"base64":"normal"})}});this.processRemoveComments();$(a).find("*").each(function(){var a=$(this).css("background-image");a&&(a=a.replace("url(","").replace(")",""))&&a.startsWith("http://")&&EWA_MiscPasteTool.images.push({id:EWA_MiscPasteTool.tmpId(this),
src:a,mode:"background"});$(this).attr({onclick:null,onload:null,onkeydown:null,onkeyup:null,onerror:null,onmousedown:null,onmouseout:null,onmouseover:null,onkeypress:null,onblur:null,onscroll:null})})},processRemoveComments:function(a){null==a&&(a=this.target);var b=[],c;for(c in a.childNodes){var d=a.childNodes[c];8==d.nodeType||"SCRIPT"==d.tagName||"LINK"==d.tagName||"STYLE"==d.tagName||"IFRAME"==d.tagName?b.push(d):"SPAN"==d.tagName&&(GetInnerText(d)||b.push(d))}for(c in b)a.removeChild(b[c]);
for(c in a.childNodes)d=a.childNodes[c],1==d.nodeType&&d.childNodes&&this.processRemoveComments(d)},tmpId:function(a){if(a.getAttribute("_tmp_id"))return a.getAttribute("_tmp_id");var b=("r_"+Math.random()).replace(".","");a.setAttribute("_tmp_id",b);$(a).css("max-width","100%");return b},process:function(){if(0!=EWA_MiscPasteTool.images.length){var a={d:JSON.stringify(EWA_MiscPasteTool.images)};EWA_MiscPasteTool.images=[];$JP(this.handleUrl,a,function(a){if(a.rst)for(var b=0;b<a.rsts.length;b++){var d=
a.rsts[b],e=d.id,f=d.local;"background"==d.mode?$(EWA_MiscPasteTool.target).find('[_tmp_id="'+e+'"]').css("background-image","url("+f+")"):$(EWA_MiscPasteTool.target).find('img[_tmp_id="'+e+'"]').attr("src",f)}else $Tip("\u5904\u7406\u9519\u8bef");EWA_MiscPasteTool.handleUrlAfterEvent&&EWA_MiscPasteTool.handleUrlAfterEvent(a)})}},bind:function(a,b,c){b?(EWA_MiscPasteTool.handleUrl=b,EWA_MiscPasteTool.images=[],EWA_MiscPasteTool.target=a,$(document).ready(function(){$(a).bind("paste",EWA_MiscPasteTool.paste)}),
this.handleUrlAfterEvent=c?c:null):alert("\u8bf7\u5b9a\u4e49\u63d0\u4ea4\u5730\u5740")}};
function EWA_UI_MapClass(a,b){this.cfg=a;this._FromId=b;this.showFull=function(){var a="div$"+this._FromId+"$MAP1",b=a+"d";if(!$X(a)){var e="<div class='ewa-map-full' id='"+a+"'><div class='ewa-map-full-cnt' id='"+b+"'></div><p title='\u9000\u51fa\u5168\u5c4f' onclick='$(this.parentNode).hide();' class='fa fa-power-off' id='"+a+"1p'></p></div>";$("body").append(e)}$($X(a)).show();this.gps1=new EWA_GMapClass;this.gps1.init(14);e=this.getLngLat();a=e[0];e=e[1];a&&e?this.gps1.showMap(b,a,e,$X(this._FromId).value):
this.search_addr($X(this._FromId),this.gps1,b)};this.getLngLat=function(){if(this.cfg.lng)var a=$X(this.cfg.lng).value;else(a=$($X(this._FromId+"_LNG")).val())||(home_lang=$($X(this._FromId.split("_")[0]+"_LNG")).val());if(this.cfg.lat)var b=$X(this.cfg.lat).value;else(b=$($X(this._FromId+"_LAT")).val())||(b=$($X(this._FromId.split("_")[0]+"_LAT")).val());return[a,b]};this.init=function(){var a=this._FromId+"$MAPClass",b="div$"+this._FromId+"$MAP",e=this;addEvent($X(this._FromId),"blur",function(){e.search_addr(this,
e.gps,b)});var f=$X(this._FromId).parentNode.parentNode,g=f.parentNode.insertRow(f.rowIndex+1).insertCell(-1);g.innerHTML="<div class='ewa-map-small'><div class='ewa-map-small-cnt' id='"+b+"'></div><div class='ewa-map-full-but' title='\u5168\u5c4f\u67e5\u770b' onclick='"+a+".showFull()'><b class='fa fa-square-o'></b></div></div>";g.colSpan=f.cells.length;g.className="ewa-map-small-td";this.gps=new EWA_GMapClass;this.gps.init(10);f=this.getLngLat();a=f[0];f=f[1];a&&f?this.gps.showMap(b,a,f,$X(this._FromId).value):
this.search_addr($X(this._FromId),this.gps,b)};this.setSearchResult=function(a,b,e){this.cfg.lng?$X(this.cfg.lng).value=a.Q_LNG:($X(this._FromId+"_LNG")&&($X(this._FromId+"_LNG").value=a.Q_LNG),$X(this._FromId.split("_")[0]+"_LNG")&&($X(this._FromId.split("_")[0]+"_LNG").value=a.Q_LNG));this.cfg.lat?$X(this.cfg.lat).value=a.Q_LAT:($X(this._FromId+"_LAT")&&($X(this._FromId+"_LAT").value=a.Q_LAT),$X(this._FromId.split("_")[0]+"_LAT")&&($X(this._FromId.split("_")[0]+"_LAT").value=a.Q_LAT));this.cfg.zip?
$X(this.cfg.zip).value=a.Q_ZIP||"":($X(this._FromId+"_ZIP")&&($X(this._FromId+"_ZIP").value=a.Q_ZIP),$X(this._FromId.split("_")[0]+"_ZIP")&&($X(this._FromId.split("_")[0]+"_ZIP").value=a.Q_ZIP));this.cfg.province?$X(this.cfg.province).value=a.Q_STATE||"":($X(this._FromId+"_STATE")&&($X(this._FromId+"_STATE").value=a.Q_STATE),$X(this._FromId.split("_")[0]+"_STATE")&&($X(this._FromId.split("_")[0]+"_STATE").value=a.Q_STATE));this.cfg.city&&($X(this.cfg.city).value=a.Q_CITY||"");this.cfg.country&&($X(this.cfg.country).value=
a.Q_COUNTRY||"");e=b.showMap(e,a.Q_LNG,a.Q_LAT,a.Q_SEARCH);b.map.setCenter(e);this.searchResultAfter&&this.searchResultAfter(a)};this.search_addr=function(a,b,e){a=a.value;if(""!=a){var c=this;a=[a];c.cfg.city&&a.push($X(c.cfg.city).value);c.cfg.province&&a.push($X(c.cfg.province).value);c.cfg.country&&a.push($X(c.cfg.country).value);a=a.join(", ");b.getGpsFromAddress(a,function(a,d,f){c.setSearchResult(f,b,e)})}}}
function EWA_UI_PicViewClass(){this.id=("EWAUIPicView"+Math.random()).replace(".","Gdx");this.t_start=-1;this.dist_base=0;this.is_move=!1;this.table=null;this.prevIdx=-1;this.setImg=function(a){$(a).attr("mw",a.width).attr("mh",a.height).css("margin-left",0).css("margin-top","0");$(a).parent().css("background-image","none")};this.addPic=function(a){var b=this.table.rows[0].cells.length,c=this.table.rows[0].insertCell(b);c.align="center";var d="<img style='max-width:100%;max-height:100%' onload='"+
this.id+".setImg(this)' id='"+(this.id+"_"+b)+"' ";d+=" src1='"+a+"'>";$(c).hide().css({"background-image":"url('/static/images/loading2.gif')","background-position":"center center","background-repeat":"no-repeat"});c.innerHTML=d;$(this.table1).find("td").append("<b>&bull;</b>");0==b?this.changePhoto(0):$(this.table1).show();this.total=b+1};this.changePhoto=function(a){if(this.prevIdx!=a){if(0<=this.prevIdx){var b=$("#"+this.id+"_"+this.prevIdx);$(b).parent().hide();$(this.table1).find("b:eq("+this.prevIdx+
")").css("color","#ccc")}this.prevIdx=a;b=$("#"+this.id+"_"+a);if(b.attr("src1"))b.attr("src",b.attr("src1")),b.attr("scr1",""),b[0].setAttribute("src1","");else{try{if(b.attr("mw")){var c=1*b.attr("mw");b.attr("mh");b.css("width",c).css("height".mh)}}catch(d){console.log(d)}b.css("margin-left",0).css("margin-top",0).attr("r",null).attr("rold",null).css("transform","scale(1)")}b.parent().show();$(this.table1).find("b:eq("+a+")").css("color","yellow")}};this.close=function(){$(this.table).parent().remove();
delete window[this.id]};this.create=function(){window[this.id]=this;var a=document.createElement("div"),b=document.createElement("table");b.insertRow(-1);var c=document.createElement("table");c.insertRow(-1).insertCell(-1).align="center";var d=document.createElement("div");d.innerHTML="<b class='fa fa-close'></b>";$(a).css({position:"fixed",top:0,left:0,width:"100%",height:"100%","z-index":99999999,background:"rgba(0, 0, 0, 0.9)"});$(b).css({position:"absolute",left:0,top:0,height:"100%",width:"100%",
"table-layout":"fixed"});$(c).css({position:"absolute",left:0,height:30,width:"100%",overflow:"hidden",bottom:"5px","z-index":3,color:"#ccc","font-size":"30px",display:"none"});$(d).css({position:"absolute",right:20,top:30,height:40,width:40,"line-height":"40px",overflow:"hidden","z-index":4,color:"darkred","font-size":"30px","text-align":"center",display:"block"}).attr("onclick",this.id+".close()");this.table=b;this.table1=c;$(a).append(b);$(a).append(c);$(a).append(d);$("body").append(a);var e=
this;b.ontouchstart=function(a){1==a.targetTouches.length?e.t_start=a:2==a.targetTouches.length&&(e.t_start1=a,e.dist_base=0);e.is_move=!1;a.preventDefault();a.stopPropagation()};b.ontouchmove=function(a){if(2==a.targetTouches.length){e.t_start1a=a;var b=a.targetTouches[0].pageX-e.t_start1.pageX,c=a.targetTouches[0].pageY-e.t_start1.pageY,d=a.targetTouches[1].pageX-e.t_start1.pageX,f=a.targetTouches[1].pageY-e.t_start1.pageY;c=Math.sqrt((b-d)*(b-d)+(c-f)*(c-f));0==e.dist_base?e.dist_base=c:(c/=e.dist_base,
b=$(a.target).attr("rold"),c*=b?1*b:1,1>=c&&(c=1),5<c&&(c=5),$(a.target).css("transform","scale("+c+")").attr("r",c),1==c&&$(a.target).css("margin-left",0).css("margin-top",0))}else if(1==a.targetTouches.length){c=$(a.target).attr("r");if(null==c||1==c)return;b=a.pageX-e.t_start.pageX;c=a.pageY-e.t_start.pageY;f=1*$(a.target).css("margin-left").replace("px","");d=1*$(a.target).css("margin-top").replace("px","");b=f+b;c=d+c;$(a.target).css("margin-left",b).css("margin-top",c);e.t_start=a;e.is_move=
!0}a.preventDefault();a.stopPropagation()};b.ontouchend=function(a){a.preventDefault();a.stopPropagation();if(e.t_start){var b=a.pageX-e.t_start.pageX,c=a.timeStamp-e.t_start.timeStamp;-50>b&&244>c?(b=e.prevIdx,b++,b==e.total&&(b=0),e.changePhoto(b)):50<b&&244>c?(b=e.prevIdx,b--,0>b&&(b=e.total-1),e.changePhoto(b)):10>Math.abs(b)&&150>c&&!e.is_move&&e.click_page()}console.log(e.t_start1);e.t_start1&&(b=$(a.target).attr("r"),console.log(b),$(a.target).attr("rold",b));e.t_start=null;e.t_start1=null}}}
function EWA_UI_H5FrameSet(){this.Create=function(a,b){this.Id=a;this.FrameType=b;this.LOC_ID="EWA_UI_H5FrameSet_"+this.Id;this.ParentDiv=$("#F0_"+this.Id).parent();this.objOne=this.ParentDiv.find(".ewa-frameset-one");this.objTwo=this.ParentDiv.find(".ewa-frameset-two");this.objSplit=this.ParentDiv.find(".ewa-frameset-split");this.objCover=this.ParentDiv.find(".ewa-frameset-cover");"H5"==b?this.CreateMoveH5():this.CreateMoveV5();window.localStorage[this.LOC_ID]&&this.ChangeLocation(1*window.localStorage[this.LOC_ID])};
this._GetMoveInstance=function(){if(window.__EWA_MOVE_EWA_UI_H5FrameSetInstance)return window.__EWA_MOVE_EWA_UI_H5FrameSetInstance;window.__EWA_MOVE_EWA_UI_H5FrameSetInstance=new EWA.UI.Move;window.__EWA_MOVE_EWA_UI_H5FrameSetInstance.NAME="__EWA_MOVE_EWA_UI_H5FrameSetInstance";window.__EWA_MOVE_EWA_UI_H5FrameSetInstance.Init(window.__EWA_MOVE_EWA_UI_H5FrameSetInstance);return window.__EWA_MOVE_EWA_UI_H5FrameSetInstance};this.CreateMoveV5=function(){this.mv1=this._GetMoveInstance();var a=this.objSplit[0],
b=this;this.mv1.AddMoveObjectY(a,a,function(a){b.objCover.hide();b.objSplit.css("z-index",1)},document.body,function(a,d){a=1*$(a).css("top").replace("px","");b.ChangeLocation(a);window.localStorage[b.LOC_ID]=a},function(){b.objCover.show()})};this.CreateMoveH5=function(){this.mv1=this._GetMoveInstance();var a=this.objSplit[0],b=this;this.mv1.AddMoveObjectX(a,a,function(a){b.objCover.hide();b.objSplit.css("z-index",1)},document.body,function(a,d){a=1*$(a).css("left").replace("px","");b.ChangeLocation(a);
window.localStorage[b.LOC_ID]=a},function(){b.objCover.show()})};this.ChangeLocation=function(a){"H5"==this.FrameType?(this.objOne.css("width",a),this.objTwo.css("left",a+1),this.objSplit.css("left",a)):(this.objOne.css("height",a),this.objTwo.css("top",a+1),this.objSplit.css("top",a))}}
var EWA_Behavior={RELOAD_PARENTA:function(a){var b=window.parent;try{b.EWA.F.FOS[a]&&b.EWA.F.FOS[a].Reload?b.EWA.F.FOS[a].Reload():b.location=b.location.href}catch(c){b.location=b.location.href}},RELOAD_PARENT:function(a){if(null!=_EWA_DialogWnd){var b=_EWA_DialogWnd._OpenerWindow;if(null==b.EWA.F.FOS)_EWA_DialogWnd.CloseWindow(),b.location.href=b.location.href;else try{b.EWA.F.FOS[a]&&b.EWA.F.FOS[a]?b.EWA.F.FOS[a].Reload():b.location=b.location.href}catch(c){b.location=b.location.href}}},CLOSE_SELF:function(){null==
_EWA_DialogWnd?self.close():_EWA_DialogWnd.CloseWindow()},CLEAR_SELF:function(){self.document.forms[0].reset()}};
function EWA_PostBehavior(a,b){if(0>a.indexOf("RELOAD_PARENTA"))try{if(!_EWA_DialogWnd){console.log("not parent window");return}if(window.STOP_RELOAD){window.STOP_RELOAD=!1;return}var c=_EWA_DialogWnd._OpenerWindow,d=c.__Dialog[b];d&&null!=d.AfterMsg&&0<d.AfterMsg.length&&c.EWA.UI.Msg.Alert(d.AfterMsg,_EWA_INFO_MSG["EWA.SYS.CHOOSE_ITEM_TITLE"])}catch(e){console.log(e)}a=a.split(",");for(c=0;c<a.length;c+=1)EWA_Behavior[a[c]](b)}EWA.UI.Ext=EWA.UI.Ext||{};
EWA.UI.Ext.FileIco=function(a){var b=EWA.RV_STATIC_PATH+"/EWA_STYLE/images/file_png/",c="gnote.png";null==a&&(a="");a=a.toLowerCase();0>a.indexOf(".")&&(a="."+a);".doc"==a||".docx"==a?c="MSWD.png":".xls"==a||".xlsx"==a?c="XCEL.png":".ppt"==a||".pptx"==a?c="PPT3.png":".txt"==a||".cvs"==a||".pom"==a?c="Edit.png":".zip"==a||".rar"==a||".7z"==a?c="zip.png":".pdf"==a?c="ACR_App.png":".odt"==a?c="openoffice.png":".html"==a&&(c="html.png");return b+c};
EWA.UI.Ext.FileExt=function(a){if(null==a)return"";a=a.toLowerCase();var b=a.lastIndexOf("."),c="";0<b&&(c=a.substring(b));return c};EWA.UI.Ext.FileLen=function(a){return null==a||isNaN(a)?a||"":1073741824<a?Math.round(a/1073741824*100)/100+"G":1048576<a?Math.round(a/1048576*100)/100+"M":1024<a?Math.round(a/1024*100)/100+"K":a+"B"};
EWA.UI.Ext.Mobile=function(a){if(a){var b=a.id||"R"+Math.random();a.id=b;b="__mobile_"+b;$(a).attr("mobile_id",b);if(!$X(b)){var c=[];c.push("<table class='ewa-text-help-box' border=0 cellpadding=3 cellspacing=0 id='"+b+"'>");c.push("<tr><td>");c.push(EWA.UI.Ext.IdCard1(3));c.push("</td><td>-</td><td>");c.push(EWA.UI.Ext.IdCard1(4));c.push("</td><td>-</td><td>");c.push(EWA.UI.Ext.IdCard1(4));c.push("</td><td><i></i></td></tr></table>");$("body").append(c.join(""));c=$X(b);$(c).find("td").css("background-color",
"#fff").attr("align","center");$(a).attr("maxLength",11)}c=$X(b);addEvent(a,"focus",function(){var a=$(this).attr("mobile_id");a=$($X(a)).show();a.css("top",$(this).offset().top-a.height()-7);a.css("left",$(this).offset().left);EWA.UI.Ext.Mobile2(this)});addEvent(a,"blur",function(){var a=$(this).attr("mobile_id");$($X(a)).hide()});addEvent(a,"keyup",function(){EWA.UI.Ext.Mobile2(this)})}};
EWA.UI.Ext.Mobile2=function(a){var b=$(a).attr("mobile_id");b=$($X(b));a=a.value;var c=b.find("div");c.html("");for(var d=!0,e=0;e<a.length;e++){var f=a.substring(e,e+1),g="";isNaN(f)&&(g="red",d=!1);c[e]&&(c[e].innerHTML="<span style='font-size:16px;color:"+g+"'>"+f+"</span>")}a.length==c.length&&d?b.find("i").html("<font color=green>\u6b63\u786e</font>"):b.find("i").html("<font color=red>\u9519\u8bef</font>")};
EWA.UI.Ext.IdCard=function(a){if(a){var b=a.id||"R"+Math.random();a.id=b;b="__sfz_"+b;$(a).attr("sfz_id",b);if(!$X(b)){var c=[];c.push("<table class='ewa-text-help-box' border=0 cellpadding=1 cellspacing=1 id='"+b+"'>");c.push("</tr><td height=18>\u5730\u533a</td><td >\u5e74</td><td>\u6708</td><td>\u65e5</td><td>\u987a\u5e8f\u53f7</td></tr>");c.push("<tr><td>");c.push(EWA.UI.Ext.IdCard1(6));c.push("</td><td>");c.push(EWA.UI.Ext.IdCard1(4));c.push("</td><td>");c.push(EWA.UI.Ext.IdCard1(2));c.push("</td><td>");
c.push(EWA.UI.Ext.IdCard1(2));c.push("</td><td>");c.push(EWA.UI.Ext.IdCard1(4));c.push("</td></tr><tr><td colspan=5>\u72b6\u6001 <i></i></td></tr></table>");$("body").append(c.join(""));c=$X(b);$(c).find("td").css("background-color","#fff").attr("align","center");$(a).attr("maxLength",18)}c=$X(b);addEvent(a,"focus",function(){var a=$(this).attr("sfz_id");a=$($X(a)).show();a.css("top",$(this).offset().top-a.height()-8);a.css("left",$(this).offset().left);EWA.UI.Ext.IdCard2(this)});addEvent(a,"blur",
function(){var a=$(this).attr("sfz_id");$($X(a)).hide()});addEvent(a,"keyup",function(){EWA.UI.Ext.IdCard2(this)})}};EWA.UI.Ext.IdCard1=function(a){for(var b=[],c=0;c<a;c++)b.push("<div></div>");return b.join("")};
EWA.UI.Ext.IdCard2=function(a){var b=[1,31,28,31,30,31,30,31,31,30,31,30,31],c=$(a).attr("sfz_id");c=$($X(c)).show();var d=a.value,e=c.find("div");e.html("");for(var f=!0,g=[],h=[],k=[],m=[],l=0;l<d.length;l++){var p=d.substring(l,l+1),q="";6>l?g.push(p):6<=l&&10>l?h.push(p):10<=l&&12>l?k.push(p):12<=l&&14>l&&m.push(p);17>l?isNaN(p)&&(q="red",f=!1):"x"!=p&&"X"!=p&&isNaN(p)&&(q="red",f=!1);e[l]&&(e[l].innerHTML="<span style='font-size:16px;color:"+q+"'>"+p+"</span>")}g=h.join("");h=[];if(isNaN(g))f=
!1,h.push("\u5e74:"+g);else{if(1900>g||2100<g){f=!1;for(l=6;10>l;l++)$(e[l]).find("span").css("color","red");h.push("\u5e74:"+g)}b[2]=0==(g-1996)%4?29:28}k=k.join("");ismonth1=!0;if(isNaN(k))f=ismonth1=!1,h.push("\u6708:"+k);else if(1>k||12<k){ismonth1=f=!1;for(l=10;12>l;l++)$(e[l]).find("span").css("color","red");h.push("\u6708:"+k)}m=m.join("");if(isNaN(m))f=!1;else if(ismonth1&&(1>m||m>b[1*k])){f=!1;for(l=12;14>l;l++)$(e[l]).find("span").css("color","red");h.push("\u65e5:"+m)}d.length==e.length&&
f?(c.find("i").html("<font color=green>\u6b63\u786e</font>"),b={YEAR:g,MONTH:k,DAY:m,SEX:1*$(e[16]).text()%2},$(a).attr("sfz_json",JSON.stringify(b))):c.find("i").html("<font color=red>"+h.join(", ")+"\u9519\u8bef</font>")};
/* EWA_FRAME.min.js */
var $jscomp=$jscomp||{};$jscomp.scope={};$jscomp.findInternal=function(a,b,c){a instanceof String&&(a=String(a));for(var d=a.length,e=0;e<d;e++){var f=a[e];if(b.call(c,f,e,a))return{i:e,v:f}}return{i:-1,v:void 0}};$jscomp.ASSUME_ES5=!1;$jscomp.ASSUME_NO_NATIVE_MAP=!1;$jscomp.ASSUME_NO_NATIVE_SET=!1;$jscomp.defineProperty=$jscomp.ASSUME_ES5||"function"==typeof Object.defineProperties?Object.defineProperty:function(a,b,c){a!=Array.prototype&&a!=Object.prototype&&(a[b]=c.value)};
$jscomp.getGlobal=function(a){return"undefined"!=typeof window&&window===a?a:"undefined"!=typeof global&&null!=global?global:a};$jscomp.global=$jscomp.getGlobal(this);$jscomp.polyfill=function(a,b,c,d){if(b){c=$jscomp.global;a=a.split(".");for(d=0;d<a.length-1;d++){var e=a[d];e in c||(c[e]={});c=c[e]}a=a[a.length-1];d=c[a];b=b(d);b!=d&&null!=b&&$jscomp.defineProperty(c,a,{configurable:!0,writable:!0,value:b})}};
$jscomp.polyfill("Array.prototype.find",function(a){return a?a:function(a,c){return $jscomp.findInternal(this,a,c).v}},"es6","es3");"undefined"==typeof EWA&&(EWA={});
EWA.F={FOS:{},GetFOSOne:function(){for(var a in EWA.F.FOS)return EWA.F.FOS[a]},F:{CUR:null,C:EWA_FrameClass,FI:EWA_FrameItemClass},M:{CUR:null,C:EWA_MultiGridClass},L:{CUR:null,C:EWA_ListFrameClass},T:{CUR:null,C:EWA_TreeClass,Node:EWA_TreeNodeClass},U:{WND:null},Cmd:function(){this.EWA_ACTION=null;this.EWA_NO_CONTENT=this.EWA_AJAX="1";this.EWA_TREE_TEXT=this.EWA_TREE_PARENT_KEY=this.EWA_TREE_KEY=null;this.EWA_AFTER_EVENT=""},Install:function(a,b,c,d,e){b=(window.EWA_CGI?window.EWA_CGI:EWA.CP+"/EWA_STYLE/cgi-bin/")+
"?xmlName="+b+"&itemName="+c+"&EWA_FRAMESET_NO=1&EWA_AJAX=INSTALL&"+d;(new EWA.C.Ajax).Install(b,"_r=1",a,e)},InstallHtml:function(a,b,c){var d=$X(a);if(null==d)alert("Object ["+a+"] not found");else{d.innerHTML=b;try{EWA.C.Utils.JsRegisters(rst)}catch(e){console.log(e)}if(null!=c)try{c(a)}catch(e){console.log(e)}}}};
EWA.F.POP={AJAX:null,PostBehavior:function(a,b,c){var d=EWA.F.FOS[a];if(null==d)alert("Object EWA.F.FOS."+a+" not exists!");else if(d=null==d.Url?d._Url:d.Url,null==d)alert("Object EWA.F.FOS."+a+".Url not exists!");else{a="EWA_AJAX=1&EWA_NO_CONTENT=1&EWA_ACTION="+c;if(null!=b)for(c=0;c<b.length;c+=1){var e=b[c].Name,f=b[c].Value;null!=e&&""!=e&&null!=f&&""!=f&&(f=encodeURIComponent(f),a=a+"&"+e+"="+f)}EWA.F.POP.AJAX=new EWA.C.Ajax;EWA.F.POP.AJAX.LoadingType="image";EWA.F.POP.AJAX.Post(d,a,EWA.F.POP.CallBack)}},
CallBack:function(){var a=EWA.F.POP.AJAX;if(4==a._Http.readyState)if(a.HiddenWaitting(),200==a._Http.status){if(a=a._Http.responseText,EWA.F.CheckCallBack(a))try{eval(a)}catch(b){alert(a)}}else alert("ERROR:\r\n"+a._Http.statusText)}};
EWA.F.CheckCallBack=function(a){if(0<=a.indexOf("\x3c!--EWA_ERROR_INFOMATION--\x3e")){if(1==EWA.SHOW_ERROR){var b=EWA.UI.Dialog.OpenWindow("","ERROR",800,400),c=b.GetIframeWindow();c.document.designMode="on";c.document.open();c.document.write(a);c.document.close();c.document.designMode="off";b.SetCaption("ERROR Information")}return!1}return!0};EWA.F.ST={};
EWA.F.ST.SaveStatus=function(a,b){var c=EWA.CP+"/EWA_STYLE/cgi-bin/_st_/";c=c.replace("//","/");var d=new EWA.C.Ajax;d.AddParameter("U",document.location.href);d.AddParameter("T",b);d.AddParameter("V",a);d.AddParameter("M","1");d.PostNew(c,function(){});d.HiddenWaitting()};
EWA.F.ST.GetStatus=function(a,b){var c=EWA.CP+"/EWA_STYLE/cgi-bin/_st_/";c=c.replace("//","/");EWA.F.ST.Ajax=new EWA.C.Ajax;EWA.F.ST.Ajax.AddParameter("U",document.location.href);EWA.F.ST.Ajax.AddParameter("T",a);EWA.F.ST.Ajax.AddParameter("M","0");EWA.F.ST.Ajax.FrameClass=b;EWA.F.ST.Ajax.PostNew(c,EWA.F.GetStatusCallBack)};
EWA.F.GetStatusCallBack=function(){var a=EWA.F.ST.Ajax;4==a._Http.readyState&&(a.HiddenWaitting(),200==a._Http.status?(eval(a._Http.responseText),a.FrameClass.LoadStatus()):alert("ERROR:\r\n"+a._Http.statusText),EWA.F.ST.Ajax=null)};
EWA.F.Ajax={TIMER_ID:null,AJAX_LIST:[],_GetId:function(a){var b=this.AJAX_LIST.length;this.AJAX_LIST[b]=a;return b},_StartMonitor:function(){null==this.TIMER_ID&&(this.TIMER_ID=window.setInterval(this._Moninter,100))},_Moninter:function(){for(var a=!0,b=0;b<EWA.F.Ajax.AJAX_LIST.length;b++){var c=EWA.F.Ajax.AJAX_LIST[b];null==c||c.isStop||EWA.F.Ajax._CallBack(c)||(a=!1)}a&&(window.clearInterval(EWA.F.Ajax.TIMER_ID),EWA.F.Ajax.TIMER_ID=null)},_CallBack:function(a){var b=a.ajax;if(4!=b._Http.readyState)return!1;
a.isStop=!0;b.HiddenWaitting();a.ret=200==b._Http.status?b._Http.responseText:"ERROR:\r\n"+b._Http.statusText;a.ReplaceObject();return!0},Install:function(a,b){this.replaceId=b;this.CLASS_NAME="EWA.F.Ajax.Install";this.ajax=new EWA.C.Ajax;this.ret=null;this.isStop=!0;this.id=EWA.F.Ajax._GetId(this);this.ajax.Get(a,function(){});this.isStop=!1;EWA.F.Ajax._StartMonitor();this.ReplaceObject=function(){$X(this.replaceId).innerHTML=this.ret;this.AddScripts()};this.AddScripts=function(){var a=this.ret.match(/<script(.|\n|\r)*?>(.|\n|\r)*?<\/script(.|\n|\r)*?>/ig);
if(null!=a)for(var b=document.getElementsByTagName("head")[0]||document.documentElement,e=0;e<a.length;e++){var f=a[e];f=f.replace(/<script(.|\n|\r)*?>/ig,"").replace(/<\/script(.|\n|\r)*?>/ig,"").trim();if(0!=f.length)try{var g=document.createElement("script");g.type="text/javascript";EWA.B.IE?g.text=f:g.appendChild(document.createTextNode(f));b.insertBefore(g,b.firstChild);b.removeChild(g)}catch(h){}}}}};
EWA.F.U.Upload=function(a,b,c){var d=new EWA.UI.Dialog.CMD;d.CmdArgus[0]=c;d.CmdArgus[1]="UPFILE";EWA.UI.Dialog.OpenWindow(EWA.CP+"/EWA_STYLE/cgi-bin/_up_/?xmlName="+a+"&ITEMNAME="+b+"&FROMITEM="+c.id,"upfile",420,310,!1,null,d)};EWA.F.Tip=function(a){var b=_EWA_INFO_MSG[a];null==b&&(b=a);null!=b&&""!=b.trim()&&alert(b)};EWA.F.I={};
EWA.F.I.DropList=function(a){null==EWA.F.FOS[a.id]&&(EWA.F.FOS[a.id]=new EWA_FrameItemClass);EWA.F.FOS[a.id].DropList(a);$(a).next().val("");a.getAttribute("_check_blank")||(a.setAttribute("_check_blank","haha"),addEvent(a,"blur",function(){if(""==$(this).next().val()){this.value="";var a=$(this).next().attr("afterevent");if(a)window[a]("","",$(this).next()[0],this)}}))};EWA.F.I.Date=function(a,b){EWA.F.FOS[a.id]=new EWA.UI.Calendar.Pop(a,b)};
function EWA_Parameters(){this.ParaNames=[];this.ParaValues=[];this.Add=function(a,b){null!=a&&""!=a.trim()&&(this.ParaNames[this.ParaNames.length]=a.trim(),this.ParaValues[this.ParaValues.length]=b)};this.GetString=function(){for(var a="",b=0;b<this.ParaNames.length;b=1+b)0<a.length&&(a+="&"),a+=encodeURIComponent(this.ParaValues[b]);return a}}
function EWA_FrameInstallClass(a,b,c,d){this.Xml=new EWA.C.Xml;this.XmlName=b;this.ItemName=c;this.Parameters=d;this.Install=function(b){null==b&&(b=this.GetUrl());this.Xml.LoadXmlFile(b);var c=this.Xml.GetElement("FrameData"),d=this.Xml.GetElementAttribute(c,"Type"),e=this.Xml.GetElementAttribute(c,"ClassName");c=this.Xml.GetElement("Css",c);c=this.Xml.GetElementText(c);document.write(c);"TREE"==d.toUpperCase()&&(b=new EWA.F.T.C(a,e,b),eval(e+"=c"),EWA.F.FOS[e]=b,b.CreateByXml(this.Xml))};this.GetUrl=
function(){var a=EWA.CP+"/EWA_STYLE/cgi-bin/?XMLNAME=";a+=this.XmlName.toURL()+"&ITEMNAME="+this.ItemName.toURL();a+="&EWA_AJAX=XML";null!=this.Parameters&&(a+="&"+this.Parameters.GetString());return a}}
function EWA_FrameCommonItems(){this._ClassXml=null;this.Items={};this._EWA_JS_ALERT_DEFAULT={MaxMinLength:"\u957f\u5ea6\u5e94\u5728{MinLength}-{MaxLength}\u4e4b\u95f4 ",MaxMinValue:"\u503c\u5e94\u5728({MinValue} - {MaxValue})\u4e4b\u95f4",IsMustInput:"*"};this.Init=function(a){this._ClassXml=a;a=a.GetElements("root/XItem");var b=!1;if(this.F){var c=new EWA_UrlClass;c.SetUrl(this.F.Url);"M"==c.GetParameter("EWA_MTYPE")&&(b=!0)}for(c=0;c<a.length;c++){var d=this.GetItemValue(a[c],"Name","Name"),e=
d.toUpperCase(),f=a[c];this.Items[e]=f;var g=this.GetItemValue(f,"DataItem","Valid");g&&"MOBILE"==g.toUpperCase()?EWA.UI.Ext.Mobile($X(e)):g&&"IDCARD"==g.toUpperCase()&&EWA.UI.Ext.IdCard($X(e));b&&(e=this.GetItemValue(f,"DataItem","DisableOnModify"))&&"YES"==e.toUpperCase()&&(d=$X(d))&&(d.setAttribute("disabled","disabled"),d.getAttribute("DlsShow")&&$(d).prev().attr("disabled","disabled"))}};this.GetItem=function(a){a=a.toUpperCase().trim();return this.Items[a]};this.GetItemValue=function(a,b,c){if(null==
a)return null;a=this._ClassXml.GetElement(b+"/Set",a);return null==a?null:a.getAttribute(c)};this.GetDescription=function(a){a=$(this.GetItem(a)).find("DescriptionSet Set[Lang="+EWA.LANG+"]");return{Info:a.attr("Info"),Memo:a.attr("Memo")}};this.GetValue=function(a,b,c){a=this.GetItem(a);return this.GetItemValue(a,b,c)};this.CheckValid=function(a,b){if("SPAN"==a.tagName||"IMG"==a.tagName)return!0;var c=this.GetItem(a.id),d=[];if(null==b)return!0;var e=this._CheckMustInput(a,b,c);e?d.push(e):EWA_FrameRemoveAlert(a);
(e=this._CheckMaxMinLength(a,b,c))?d.push(e):EWA_FrameRemoveAlert(a);(e=this._CheckDataValid(a,b,c))?d.push(e):EWA_FrameRemoveAlert(a);(e=this._CheckDataType(a,b,c))?d.push(e):EWA_FrameRemoveAlert(a);(e=this._CheckMaxMinValue(a,b,c))?d.push(e):EWA_FrameRemoveAlert(a);(e=this._CheckPassword(a,b,c))?d.push(e):EWA_FrameRemoveAlert(a);(e=this._CheckExtent(a,b,c))?d.push(e):EWA_FrameRemoveAlert(a);if(0==d.length)return EWA_FrameRemoveAlert(a),!0;EWA_FrameShowAlert(a,d.join(", "));return!1};this._CheckExtent=
function(a,b,c){b=null;a=a.getAttribute("EWA_VALID_EX");a=null==a?"":a;0<a.length&&(b=a);return b};this._CheckDataType=function(a,b,c){if(""==b.trim())return null;var d=null;c=this.GetItemValue(c,"DataItem","DataType");null==c||"NUMBER"!=c.toUpperCase()&&"INT"!=c.toUpperCase()||(0<=b.indexOf(",")&&(b=b.replace(/,/ig,""),a.value=b),/^[0-9.-]{0,120}$/.test(b)||(d=_EWA_INFO_MSG["EWA.SYS.INVALID_NUMBER_FORMAT"]));return d};this._CheckPassword=function(a,b,c){if("input"!=a.tagName.toLowerCase()||"password"!=
a.type.toLowerCase())return null;c=$("#USR_PWD").parentsUntil("form").last().find("input[type=password]");b=null;for(var d=a.id,e=0;e<c.length;e+=1)if("password"==c[e].type&&c[e]!=a&&c[e].id==d+"1"){b=c[e];break}c=null;null!=b&&(b.value!=a.value?(isok=!1,c=_EWA_INFO_MSG["EWA.F.PASSWORD"]):EWA_FrameRemoveAlert(b));return c};this._CheckMustInput=function(a,b,c){var d=null;"1"==this.GetItemValue(c,"IsMustInput","IsMustInput")&&0==b.length&&(d=(d=_EWA_JS_ALERT.IsMustInput)?d.replace("{Name}",a.id):"*");
return d};this._CheckMaxMinLength=function(a,b,c){if(!b)return null;var d=this.GetItemValue(c,"MaxMinLength","MaxLength");c=this.GetItemValue(c,"MaxMinLength","MinLength");d=null==d?-1:parseInt(d);c=null==c?-1:parseInt(c);var e=!0;!isNaN(d)&&0<d&&b.length>d&&(e=!1);e&&!isNaN(c)&&0<c&&b.length<c&&(e=!1);b=null;e||(b=_EWA_JS_ALERT.MaxMinLength||this._EWA_JS_ALERT_DEFAULT.MaxMinLength,b=b.replace("{Name}",a.id),b=b.replace("{MaxLength}",d),b=b.replace("{MinLength}",c));return b};this._CheckDataValid=
function(a,b,c){a=this.GetItemValue(c,"DataItem","Valid");if(null==a||""==a.trim())return"";if(0<b.length)return a=_EWA_VALIDS[a.toUpperCase().trim()],null==a?"":a.REGEX.test(b)?"":a.MSG};this._CheckMaxMinValue=function(a,b,c){a=this.GetItemValue(c,"MaxMinValue","MaxValue");c=this.GetItemValue(c,"MaxMinValue","MinValue");var d=null==a||""==a.trim()?null:1*a,e=null==c||""==c.trim()?null:1*c,f=!0;null!=d&&(f=1*b<=d?!0:!1);null!=e&&(f=1*b>=e?f&1:!1);if(f)return"";errorInfo=_EWA_JS_ALERT.MaxMinValue||
this._EWA_JS_ALERT_DEFAULT.MaxMinValue;errorInfo=errorInfo.replace("{MaxValue}",a);return errorInfo=errorInfo.replace("{MinValue}",c)};this.GetObjectValue=function(a){var b=a.tagName.toUpperCase(),c=a,d="";if("DIV"==b&&"REPT"==a.getAttribute("TAG")){a=a.getElementsByTagName("input");for(var e=0;e<a.length;e+=1)a[e].checked&&(0<d.length&&(d+=","),d+=a[e].value);return d}if("DIV"==b&&"1"==a.getAttribute("EWA_DHTML"))return d=a.getElementsByTagName("iframe")[0].contentWindow,c=d.document.getElementsByTagName("textarea"),
d=0<c.length&&"none"!=c[0].style.display?c[0].value:d.frames[0].document.body.innerHTML,null!=location.search&&0>location.search.toUpperCase().indexOf("EWA_DHTML_HOST")&&(e="http:\\/\\/"+eval("document.location.host")),e=eval("/"+e+"/ig"),d=d.replace(e,""),a=a.getElementsByTagName("input")[0],a.value=d,a.value;if("SELECT"==b)return d="",0<=c.options.selectedIndex&&(d=c.options[c.options.selectedIndex].value),d;if("TEXTAREA"==b&&"none"==c.style.display)d=a.value;else if("INPUT"==b&&"IMG_UPLOAD"==c.getAttribute("ewa_tag"))d=
"/"!=EWA.CP?c.value.replace(EWA.CP,""):c.value,d=d.replace("//","/");else if("INPUT"==b&&"ht5upload"==c.getAttribute("ewa_tag")){a=c.getAttribute("val_ref");try{d=eval("(function(){var a="+a+";return a;})()")}catch(f){console.log(a),console.log(f),d=""}}else d="INPUT"!=b||"checkbox"!=c.type&&"radio"!=c.type?c.value:c.checked?c.value:"";return d}}function EWA_FrameResourceDescription(){this.Memo=this.Info=this.Lang=null}
function EWA_FrameResoure(){this.Name=null;this.Descriptions={};this.GetDescription=function(){var a=this.Descriptions[EWA.LANG];if(null==a)for(var b in this.Description)return this.Description[b];return a};this.GetInfo=function(){var a=this.GetDescription();return null==a?null:a.Info};this.GetMemo=function(){var a=this.GetDescription();return null==a?null:a.Memo}}
function EWA_FrameResoures(){this.Init=function(a){var b=a.GetElements("root/PageInfo");if(null!=b){for(var c=0;c<b.length;c+=1){var d=new EWA_FrameResoure;d.Name=b[c].getAttribute("Name");for(var e=a.GetElements("Set",b[c]),f=0;f<e.length;f++){var g=new EWA_FrameResourceDescription;g.Info=e[f].getAttribute("Info");g.Memo=e[f].getAttribute("Memo");g.Lang=e[f].getAttribute("Lang");d.Descriptions[g.Lang]=g}this[d.Name]=d}this.ReplaceResById();this.ReplaceRes()}};this.ReplaceResById=function(){for(var a in this){var b=
this[a],c=$X(a);c&&("input"==c.tagName.toLowerCase()?c.value=b.GetInfo():c.innerHTML=b.GetInfo(),c.title=b.GetMemo())}};this.ReplaceRes=function(){var a=[];a.push(document.getElementsByTagName("div"));a.push(document.getElementsByTagName("span"));a.push(document.getElementsByTagName("input"));a.push(document.getElementsByTagName("button"));for(var b=0;b<a.length;b++)for(var c=a[b],d=0;d<c.length;d+=1){var e=c[d].getAttribute("res");if(null!=e&&(e=e.trim(),0==e.indexOf("EWA.F.FOS")&&(0<e.indexOf(".Resources.")||
0<e.indexOf(".Resources[")))){var f="";try{f=eval(e)}catch(g){f=g.message}"INPUT"==c[d].tagName?c[d].value=f:c[d].innerHTML=f}}a.length=0}}
function EWA_FrameClass(){this._Ajax=this.Xml=null;this.ItemList=new EWA_FrameCommonItems;this.Resources={};this.ReloadAfter=this._Id=this._ValidExObj=this._ValidExFail=this._ValidExOk=this.Url=null;this.isShowPostWaitting=!0;this.createFilterCheckbox=function(a,b,c,d,e,f,g){var h=this;$J(d,function(d){h.createFilterCheckboxByData(a,b,c,d,e,f,g)})};this.createFilterCheckboxByData=function(a,b,c,d,e,f,g){var h={},k=k?"[]":c.split(",");c={};for(var l in k)c[k[l]]=1;k=[];var m=[],n=a.id;for(l in d){var q=
d[l],r=q[e];r&&(r=r.replace(/</ig,"&lt;"));var p=q[f];p&&(p=p.replace(/</ig,"&lt;"));var u=q[g],w=c[r],v=[];v.push("<nobr class='ewa-filter-chk' style='float:left;margin-right:4px'>");v.push('<input class="ewa-filter-chkbox" type="checkbox" ');w&&v.push(" checked ");q=n+"_"+l;v.push(' value="'+r+'" id="'+q+'" name="'+n+'"><label ');v.push(' for="'+q+'">'+p+"</label></nobr>");w?m.push(v.join("")):k.push(v.join(""));b&&(r=u?u.substring(0,1).toUpperCase():"",h[r]||(h[r]=[]),h[r].push(q))}a.innerHTML=
m.join(" ")+" "+k.join(" ");if(b){d=['<a href="javascript:void(0)">ALL</a>'];for(l="A".charCodeAt();l<="Z".charCodeAt();l++)e=String.fromCharCode(l),h[e]&&d.push('<a href="javascript:void(0)">'+e+"</a>");b.innerHTML=d.join(" ");$(b).find("a").each(function(){var b=$(this).text();"ALL"!=b&&$(this).attr("ids",h[b].join(","));$(this).on("click",function(){if("ALL"==$(this).text())$(a).find("nobr.ewa-filter-chk").show();else{var b=$(this).attr("ids").split(","),c={},d;for(d in b)c[b[d]]=1;$(a).find("input.ewa-filter-chkbox").each(function(){this.checked||
c[this.id]?$(this).parent().show():$(this).parent().hide()})}})})}};this.hiddenNoContentRow=function(){var a=$("#EWA_FRAME_"+this._Id);a.find(".EWA_TD_M").each(function(){if(""==$(this).text()&&0==$(this).find("img,a,input[type=text],input[type=button],textarea").length){$(this).parent().hide();var b=$(this).find("*:eq(0)").attr("id");b&&a.find(".ewa-row-"+b).hide().attr("hiddennocontentrow",1)}})};this._checkSelectOptionsChange=function(){if(this._SelectFilters){var a=this;this.isSelectFilter&&setTimeout(function(){a._checkSelectOptionsChange()},
311);for(var b in this._SelectFilters){var c=this._SelectFilters[b];$($X(c.id)).html()!=c.html&&this.initSelectFilter(c.id,c.filterType,c.filterFrom)}setTimeout(function(){a._checkSelectOptionsChange()},311)}};this.itemReload=function(a,b,c){if(a){var d=new EWA_UrlClass(this.Url);d.AddParameter("EWA_AJAX","SELECT_RELOAD");d.AddParameter("EWA_RELOAD_ID",a);d=d.GetUrl();$J(d,function(d){if(d.RST){var e=d.ITEM.LST,g=$X(a);g.options.length=0;for(var h in e){var k=e[h];k=new Option(k.T,k.V);g.options[g.options.length]=
k}b&&(g.value=b);if(c)try{c(d,g)}catch(l){console.log(l)}}else $Tip(d.ERR)})}};this.initSelectFilter=function(a,b,c){if(!this["INIT_SELECT_FILTER"+a]){this["INIT_SELECT_FILTER"+a]=!0;var d=$("#EWA_FRAME_"+this._Id+" select#"+a),e=$("#EWA_FRAME_"+this._Id+" .ewa-row-"+a+" .EWA_TD_M"),f=this._Id+"-"+a+"-filter",g=this._Id+"-"+a+"-filter2",h=this._Id+"-"+a+"-filter-table";$X(h)&&(e.append(d),$($X(h)).remove());e.addClass("ewa-select-filter");f=["<table id='"+h+"' cellpadding=0 cellspacing=0 width=100%><tr><td class='ewa-select-filter-char'><select class='EWA_SELECT' style='margin-right:4px' id='"+
f+"' onchange='EWA.F.FOS[\""+this._Id+'"]._chCode(this,"'+b+'","'+c+"\")'><option value=''>ALL</option>"];for(h="A".charCodeAt();h<="Z".charCodeAt();h++){var k=String.fromCharCode(h);f.push('<option value="'+k+'">'+k+"</option>")}f.push("</select><select id='"+g+"' style='display:none'></select></td><td class='ewa-select-filter-target'></td></tr></table>");e.prepend(f.join(""));e.find(".ewa-select-filter-target").append(d);this._SelectFilters||(this._SelectFilters={});e={};e.html=d.html();e.id=a;
e.filterType=b;e.filterFrom=c;this._SelectFilters[e.id]=e}};this._chCode=function(a,b,c){this.isSelectFilter=!0;var d=$(a).next(),e=$(a).parent().parent().find(".ewa-select-filter-target select");0==d[0].options.length&&d.html(e.html());if(""==a.value)e.html(d.html());else{for(var f=["<option></option>"],g=1;g<d[0].options.length;g++){var h=d[0].options[g];this._chCodeFilter(h,b,c,a.value)&&f.push(GetOuterHTML(h))}e.html(f.join(""));this._SelectFilters[e[0].id].html=e.html();this.isSelectFilter=!1}};
this._chCodeFilter=function(a,b,c,d){"json"==b?(a=JSON.parse(a.getAttribute("json"))[c],"ADM_LID"==c&&(c=a.split("."),a=c[c.length-1])):a="text"==b?a.text:a.value;return a?a.substring(0,d.length).toUpperCase()==d.toUpperCase()?!0:!1:!1};this.setUnMust=function(a){(a=this.ItemList.Items[a])&&a.getElementsByTagName("IsMustInput")[0].getElementsByTagName("Set")[0].setAttribute("IsMustInput",0)};this.setMust=function(a){(a=this.ItemList.Items[a])&&a.getElementsByTagName("IsMustInput")[0].getElementsByTagName("Set")[0].setAttribute("IsMustInput",
1)};this.RedrawCreateSpans=function(){for(var a=$("#EWA_FRAME_"+this._Id+" tr"),b=0;b<a.length;b++){var c=a[b];if("none"!=c.style.display)for(var d=0,e=!1,f=c.cells.length-1;0<=f;f--){var g=c.cells[f];"none"==g.style.display?e?d++:(d=1,e=!0):e&&(g.colSpan=d+1,e=!1)}}EWA_FrameShowAlert=EWA_FrameShowAlert1;EWA_FrameRemoveAlert=EWA_FrameRemoveAlert1;$("#EWA_FRAME_"+this._Id+" .ewa_d1").each(function(){this.title=this.innerHTML});for(var h in this.ItemList.Items)a=this.ItemList.GetDescription(h).Memo,
null!=a&&0<a.trim().length&&($("#"+h).attr("placeHolder",a),$("#"+h).attr("title",a));this.RedrawChangWidth()};this.ShowPlaceHolder=function(a){$("#EWA_FRAME_"+this._Id).addClass("ewa-frame-cols-"+a);for(var b in this.ItemList.Items){var c=this.ItemList.GetValue(b,"Name","Name");if(c=this.GetObject(c)){c=$(c);var d=this.ItemList.GetDescription(b),e=d.Memo;d=d.Info;var f=null;1==a?(f=d,null!=e&&0<e.trim().length&&e!=f&&(f=f+", "+e),c.hasClass("ewa-switch")&&c.prepend("<div class='ewa-switch-info'>"+
f+"</div>")):2==a&&null!=e&&0<e.trim().length&&(f=e);f&&("hidden"==c[0].type?c.prev().attr("placeholder",f):"SELECT"==c[0].tagName?0<c[0].options.length&&""==c[0].options[0].value&&(c[0].options[0].text="-- "+f+" --",c[0].options[0].value=""):(c.attr("placeHolder",f),c.attr("title",f)))}}};this.RedrawChangWidth=function(){var a=$("#EWA_FRAME_"+this._Id),b=a.find(".ewa_msg_box")[0].colSpan/2,c=(a.width()-90*b)/b;$(a).find(".ewa_redraw_ctl").each(function(){var a=this.colSpan||1;$(this).css("width",
c*a)});var d=this;addEvent(window,"size",function(){d.RedrawChangWidth()})};this.Mearge=function(a,b,c){console.log("\u62fc\u5199\u9519\u8bef\uff1a\u8bf7\u7528 Merge");this.Merge(a,b,c)};this.Merge=function(a,b,c){if(a||b){var d=$("#EWA_FRAME_"+this._Id),e=d.find("#"+a),f=d.find("#"+b);if(0==e.length)alert("Mearge:"+a+"\u4e0d\u5b58\u5728");else if(0==f.length)alert("Mearge:"+b+"\u4e0d\u5b58\u5728");else{var g=!1,h=d.find(".ewa-row-"+b+" .EWA_TD_M"),k=null;0==h.length&&(g=!0,h=d.find(".ewa-row-"+b+
" .EWA_TD_1"),k=d.find(".ewa-row-"+b+" .EWA_TD"),1==k.length&&(g=!0),b=k.html(),k.html("<table cellpadding=0 cellspacing=0 width=100%><tr><td style='width:50%'></td><td style='display:none'></td><td style='width:50%'></td></tr></table>"),k.find("td:eq(0)").html(b));if(0==h.length)alert("target parent not exists");else{var l="border-box"==e.css("box-sizing")?0:1*e.css("padding-left").replace("px","")+1*e.css("padding-right").replace("px",""),m="border-box"==e.css("box-sizing")?0:1*f.css("padding-left").replace("px",
"")+1*f.css("padding-right").replace("px","");d.find(".ewa-row-"+a).hide();null==c&&(c=" - ");var n=h.width(),q=e[0].tagName,r=f[0].tagName;e.parent().hasClass("ewa-select-filter-target")&&(e=d.find(".ewa-row-"+a+" .EWA_TD_M table:eq(0)"),q="SELECT_WITH_FILTER");var p=0;b=null;c&&(h.append('<span class="mearge-span">'+c+"</span>"),g&&k.find("table:eq(0) td:eq(1)").html('<span class="mearge-span">'+c+"</span>").show(),b=h.find(".mearge-span"),p=b.width()+1+1*b.css("padding-left").replace("px","")+
1*b.css("padding-right").replace("px","")+1*b.css("margin-left").replace("px","")+1*b.css("margin-right").replace("px",""));q==r?(c=(n-p)/2-l-2,e.css("width",c),f.css("width",c),g&&k.find("table:eq(0) td:eq(2), table:eq(0) td:eq(0)").css("width",c)):"SELECT"==q?(e.css("width",100),f.css("width",n-p-l-m-2-2-e.width())):"SELECT_WITH_FILTER"==q?(e.css("width",200),f.css("width",n-p-l-m-2-2-e.width())):"SELECT"==r&&(f.css("width",100),e.css("width",n-p-l-m-2-2-e.width()));f.css("float","left");b&&b.css("float",
"left");e.css("float","right");h.append(e);h.addClass("ewa-frame-merge");g&&(a=d.find(".ewa-row-"+a+" .EWA_TD").html(),k.find("table:eq(0) td:eq(2)").html(a))}}}};this.MergeExp=function(a,b,c,d){if(b){var e=b.match(/@@[a-zA-Z0-9\-\._:]*\b/ig),f=[],g=b;b={};for(var h=$("#EWA_FRAME_"+this._Id),k=0;k<e.length;k++){var l=e[k];f.push(l);var m=l.replace("@@","");g=g.replace(l,"<span class='ewa-row-merge ewa-row-merge-"+m+"' mid=\""+l+'"></span>');m!=a&&h.find(".ewa-row-"+m).hide();b[m]=this.ItemList.GetDescription(m).Info}e=
document.createElement("div");e.style.display="none";e.innerHTML=g;document.body.appendChild(e);l=h.find('[id="'+a+'"]');if(0==l.length)console.log("not find "+a);else{a=l.parent();for(var n in f)k=f[n],l=k.replace("@@",""),g=h.find('[id="'+l+'"]'),0==g.length?console.log("not found [id="+l+"]"):(k=$(e).find('span[mid="'+k+'"]'),"placeholder"==c?g.attr("placeholder",b[l]):c&&(k.append("<span class='ewa-row-merge-memo'></span>"),k.find(".ewa-row-merge-memo").text(b[l])),k.append(g));for(;0<e.childNodes.length;)a.append(e.childNodes[0]);
$(e).remove();d&&d(a)}}else console.log("mergeExp \u6ca1\u6709\u8bbe\u7f6e")};this.MergeItems=function(){for(var a in this.MeargeMap){var b=this.MeargeMap[a],c=$X("_ewa_tr$"+a);if(c){for(var d=c.cells.length,e=$(c.cells[0]);1<c.cells.length;)e.append(c.cells[1].innerHTML),c.removeChild(c.cells[1]);c.cells[0].colSpan=d;c=[];for(d=0;d<b.length;d++){for(var f=$X("_ewa_tr$"+b[d]),g=["<nobr>"],h=0;h<f.cells.length;h++)g.push(f.cells[h].innerHTML);g.push("</nobr>");c.push(g.join(" "));f.parentNode.removeChild(f)}e.append(c.join(" "))}}};
this.LoadJson=function(a,b){null!=a&&$J(this.Url+"&EWA_ACTION="+a+"&EWA_AJAX=JSON",b)};this.DoAction=function(a,b,c,d,e,f){EWA.F.CID=this._Id;if(null!=b&&""!=b.trim()){if(null!=c&&0<c.trim().length)if(a=_EWA_INFO_MSG[c],null!=a&&""!=a){if(!window.confirm(a))return}else if(!window.confirm(c))return;this.DoPostBefore();this._Ajax=this.CreateAjax(null,!0);this._Ajax.LoadingType="image";this._Ajax.AddParameter("EWA_AJAX","1");this._Ajax.AddParameter("EWA_ACTION",b);this._Ajax.AddParameter("EWA_ID",this._Id);
this._Ajax.AddParameter("EWA_NO_CONTENT","1");this._Ajax.AddParameter("EWA_ACTION_TIP",d);null!=f&&0<f.trim().length?(this._Ajax.AddParameter("EWA_AFTER_EVENT",f),this.StopAjaxAfterReload=!0,this._Ajax.AddParameter("EWA_ACTION_RELOAD","0")):this.StopAjaxAfterReload=!1;if(null!=e&&0<e.length)for(b=0;b<e.length;b+=1)this._Ajax.AddParameter(e[b].Name,e[b].Value);e=new EWA.C.Url;e.SetUrl(this.Url);e=e.RemoveParameter("EWA_ACTION");this._Ajax.PostNew(e,EWA.F.FOS[EWA.F.CID]._CallBackJs)}};this.GuideShowCreate=
function(a){this._GroupInfos=a;var b=$X("EWA_FRAME_"+this._Id);a=a.length-1;b.setAttribute("EWA_GUIDE_IDX","0");b.setAttribute("EWA_GUIDE_IDX_MAX",a);b.rows[b.rows.length-1].style.display="none";100<b.clientHeight&&(b.parentNode.style.height=b.clientHeight+"px");a=document.createElement("input");a.id="ewa_but_"+Math.random();a.type="button";a.value="\u4e0a\u4e00\u6b65";a.style.display="none";a.onclick=function(){var a=b.getAttribute("EWA_GUIDE_IDX");if(0==1*a)$Tip("\u5230\u5934\u4e86");else{var c=
b.id.replace("EWA_FRAME_","");EWA.F.FOS[c].GuidePrevBefore&&EWA.F.FOS[c].GuidePrevBefore(a,this,b);EWA.F.FOS[c].GuideShow(1*a-1);EWA.F.FOS[c].GuidePrevAfter&&EWA.F.FOS[c].GuidePrevAfter(a,this,b)}};var c=document.createElement("input");c.id="ewa_but_"+Math.random();c.type="submit";c.value="\u4e0b\u4e00\u6b65";c.onclick=function(){var a=b.getAttribute("EWA_GUIDE_IDX"),c=b.id.replace("EWA_FRAME_","");EWA.F.FOS[c].GuideShowCheck(a)&&(EWA.F.FOS[c].GuideNextBefore&&EWA.F.FOS[c].GuideNextBefore(a,this,
b),"ok"==this.getAttribute("ewa_guide_method")?$F(b,"input","type","submit")[0].click():EWA.F.FOS[c].GuideShow(1*a+1),EWA.F.FOS[c].GuideNextAfter&&EWA.F.FOS[c].GuideNextAfter(a,this,b))};var d=b.parentNode.parentNode.parentNode.parentNode.insertRow(-1).insertCell(-1);d.appendChild(a);d.appendChild(c);d.className="EWA_FRAME_GROUP_BUTTONS";tdTitle=b.parentNode.parentNode.parentNode.parentNode.insertRow(0).insertCell(-1);d="ewa_title_"+Math.random();for(var e=[],f=0;f<this._GroupInfos.length;f++)e.push('<div style="float:left" id="ewa_'+
this._Id+"_"+f+'">'+(f+1)+". "+this._GroupInfos[f].DES+"</div>");tdTitle.innerHTML="<div style='text-align:left'>"+e.join(" <div style='float:left;color:#aaa'>&nbsp;&gt;&nbsp;</div> ")+"</div><div id='"+d+"'></div>";tdTitle.className="EWA_FRAME_GROUP_TITLE";b.setAttribute("EWA_GUIDE_ID_PREV",a.id);b.setAttribute("EWA_GUIDE_ID_NEXT",c.id);b.setAttribute("EWA_GUIDE_ID_TITLE",d);this.GuideShowTitle(0);a=document.createElement("div");100<b.clientHeight&&(a.style.width=b.clientWidth+"px",a.style.height=
b.clientHeight+20+"px",a.style.overflow="auto");b.parentNode.appendChild(a);a.appendChild(b);b.parentNode.className="EWA_GROUP_GUIDE"};this.GuideShowTitle=function(a){for(var b=$X("EWA_FRAME_"+this._Id).getAttribute("EWA_GUIDE_IDX_MAX"),c=0;c<=b;c++){var d="ewa_"+this._Id+"_"+c;c==a?($X(d).style.color="blue",$X(d).style.borderBottom="2px solid green"):($X(d).style.color="green",$X(d).style.borderBottom="2px")}};this.GuideShowCheck=function(a){var b=!0,c=null,d;for(d in this.ItemList.Items){var e=
this.ItemList.GetItemValue(this.ItemList.Items[d],"Name","Name"),f=$X(e);null==f?alert(e+" not exists"):(e=this._GetTr(f),null!=e&&e.getAttribute("groupindex")==a&&((b&=this.CheckValid(f))||null!=c||(c=f)))}null!=c&&c.focus();return b};this._GetTr=function(a){for(var b=0;100>b;){b++;a=a.parentNode;try{if("TR"==a.tagName.toUpperCase()&&null!=a.getAttribute("id")&&0==a.getAttribute("id").indexOf("_ewa_tr$"))return a}catch(c){break}}return null};this.GuideShow=function(a){this.GuideShowTitle(a);var b=
$X("EWA_FRAME_"+this._Id);if(b.getAttribute("EWA_GUIDE_IDX")!=a){var c=b.getAttribute("EWA_GUIDE_IDX_MAX"),d=b.getAttribute("EWA_GUIDE_ID_PREV"),e=b.getAttribute("EWA_GUIDE_ID_NEXT");a==c?($X(e).value="\u786e\u5b9a",$X(e).setAttribute("ewa_guide_method","ok")):($X(e).value="\u4e0b\u4e00\u6b65",$X(e).setAttribute("ewa_guide_method",""));0==a?$X(d).style.display="none":$X(d).style.display="";b.setAttribute("EWA_GUIDE_IDX",a);this._ShowHidenGroup(b,a)}};this._ShowHidenGroup=function(a,b){for(var c=0;c<
a.rows.length-1;c++){var d=a.rows[c];if(null!=d.getAttribute("groupIndex")&&""!=d.getAttribute("groupIndex")){var e=1*d.getAttribute("groupIndex");d.style.display=b==e?"":"none"}}};this.GroupShow=function(a,b){if(!(0<a.className.indexOf("1"))){this.GroupShowBefore&&this.GroupShowBefore(a,b);for(var c=$X("EWA_FRAME_"+this._Id),d=a.parentNode.parentNode,e=0;e<c.rows.length;e++){var f=c.rows[e];if(f!=d&&!(1==f.cells.length&&f.cells[0].className&&0<=f.cells[0].className.indexOf("EWA_TD_B"))&&"1"!=f.getAttribute("hiddennocontentrow")){var g=
0;null!=f.getAttribute("groupIndex")&&""!=f.getAttribute("groupIndex")&&(g=1*f.getAttribute("groupIndex"));f.style.display=b==g?"":"none"}}c=d.getElementsByTagName("div");for(e=0;e<c.length;e++)d=c[e],d.className=d==a?d.className+"1":d.className.replace("1","");this.GroupShowAfter&&this.GroupShowAfter(a,b)}};this.DoActionJSON=function(a,b,c,d){EWA.F.CID=this._Id;this._Ajax=new EWA.C.Ajax;this._Ajax.LoadingType="image";this._Ajax.AddParameter("EWA_AJAX","JSON");this._Ajax.AddParameter("EWA_ACTION",
a);this._Ajax.AddParameter("EWA_ID",this._Id);this._Ajax.AddParameter("EWA_JSON_NAME",b);this._AjaxJsonAfter=null!=d?d:null;if(null!=c&&0<c.length)for(a=0;a<c.length;a+=1)this._Ajax.AddParameter(c[a].Name,c[a].Value);c=new EWA.C.Url;c.SetUrl(this.Url);c=c.RemoveParameter("EWA_ACTION");this._Ajax.PostNew(c,EWA.F.FOS[EWA.F.CID]._CallBackJs)};this._CallBackJs=function(){var a=EWA.F.FOS[EWA.F.CID],b=a._Ajax;if(4==b._Http.readyState)if(b.HiddenWaitting(),200==b._Http.status){if(b=b._Http.responseText,
EWA.F.CheckCallBack(b)){eval(b);a._AjaxJsonAfter&&(a._AjaxJsonAfter(),a._AjaxJsonAfter=null);try{a.ReloadAfter&&a.ReloadAfter(b)}catch(c){alert(b)}}}else alert("ERROR:\r\n"+b._Http.statusText)};this.RewriteInfo=function(a,b,c,d){for(a=0;a<info.length;a++){var e=info[a],f=e[b];if($X(f)){var g="TD"==$X(f).parentNode.tagName?$X(f).parentNode:$X(f).parentNode.parentNode;"IMG_UPLOAD"==$X(f).getAttribute("ewa_tag")&&(g=$X(f).parentNode.parentNode.parentNode.parentNode.parentNode.parentNode);f=g.parentNode;
null==e[c]||""==e[c].trim()?f.style.display="none":3==f.cells.length?(f.cells[2].innerHTML=e[d],f.cells[0].innerHTML=e[c]):1==f.cells.length&&(f=f.previousSibling,3==f.nodeType&&(f=f.previousSibling),f.cells[1].innerHTML=e[d],f.cells[0].innerHTML=e[c])}}};this._HiddenMemo=function(a,b){var c=a.parentNode.parentNode;b=!1;"none"==c.style.display&&(b=!0);c.style.display="none";c.id="tr_"+a.id;c=c.previousSibling;3==c.nodeType&&(c=c.previousSibling);c.style.display="none";a="<span id=tab_"+a.id+' class="ewa_merge_tab" onclick="EWA.F.FOS[\''+
this._Id+"'].ShowMemo(this.id);\">"+c.cells[0].innerHTML+"</span>";return b?"":a};this.ShowMemo=function(a){for(var b=$X(this._Id+"__ewa_meger").getElementsByTagName("SPAN"),c=0;c<b.length;c++){var d=b[c].id.replace("tab_","tr_");"ewa_merge_tab1"==b[c].className&&(b[c].className="ewa_merge_tab",$X(d).style.display="none");b[c].id==a&&(b[c].className="ewa_merge_tab1",$X(d).style.display="")}};this.MergeMemo=function(){var a=$X("EWA_FRAME_"+this._Id).getElementsByTagName("textarea");if(0!=a.length&&
"1"!=a[0].getAttribute("ewa_merge")){for(var b=[],c=0;c<a.length;c++){var d=this._HiddenMemo(a[c]);d="<nobr>"+d.replace("\u2022 ","").trim()+"</nobr>";b.push(d)}a=a[0];c=a.parentNode.parentNode;d=c.previousSibling;3==d.nodeType&&(d=d.previousSibling);d.id=this._Id+"__ewa_meger";d.cells[0].colSpan=3;d.cells[0].innerHTML=b.join("");d.cells[0].style.width="100%";d.cells[0].style.height="25px";d.style.display="";c.style.display="";$X("tab_"+a.id).className="ewa_merge_tab1";null!=window._EWA_DialogWnd&&
EWA.UI.Dialog._SetTitle(window._EWA_DialogWnd)}};this.DoValidEx=function(a,b,c,d,e,f){""!=a.value&&(this._ValidExOk=this.Resources[e],this._ValidExFail=this.Resources[f],this._ValidExObj=a,"action"==b.toLowerCase().trim()?this._DoValidExAction(a,d,this.Resources[e].GetInfo(),this.Resources[f].GetInfo()):eval(c)?(EWA_FrameShowAlert(a,this._ValidExOk.GetInfo()),a.setAttribute("EWA_VALID_EX","")):(EWA_FrameShowAlert(a,this._ValidExFail.GetInfo()),a.setAttribute("EWA_VALID_EX",this._ValidExFail.GetInfo())))};
this._DoValidExAction=function(a,b,c,d){if(null!=a&&!$(a).is(":hidden"))if(null==b||""==b.trim())alert("action not value");else{var e=a.id+","+a.value;if(this.DoValidExAction_RETS&&null!=this.DoValidExAction_RETS[e])0==this.DoValidExAction_RETS[e]?(EWA_FrameRemoveAlert(a,c),a.setAttribute("EWA_VALID_EX","")):(EWA_FrameShowAlert(a,d),a.setAttribute("EWA_VALID_EX",d));else{var f=new EWA.C.Ajax;f.LoadingType="image";f.AddParameter("EWA_AJAX","HAVE_DATA");f.AddParameter("EWA_ACTION",b);f.AddParameter("EWA_ID",
this._Id);f.AddParameter("EWA_NO_CONTENT","1");f.AddParameter(a.id,a.value);this.DoValidExAction_RETS||(this.DoValidExAction_RETS={});var g=this;f.PostNew(this.Url,function(){if(4==f._Http.readyState){f.HiddenWaitting();if(200==f._Http.status){var b=f._Http.responseText;if(EWA.F.CheckCallBack(b))try{var k=parseInt(b.trim());g.DoValidExAction_RETS[e]=k;0==k?(EWA_FrameRemoveAlert(a,c),a.setAttribute("EWA_VALID_EX","")):(EWA_FrameShowAlert(a,d),a.setAttribute("EWA_VALID_EX",d))}catch(l){alert(l+","+
b)}}else alert("ERROR:\r\n"+f._Http.statusText);f=null}})}}};this.ValidCodeError=function(a){$(".ewa-valid-code-img").each(function(){this.click()});a||($Tip(_EWA_EVENT_MSG.ValidCodeError),$(".ewa-valid-code-img").parent().parent().find("input").focus().select())};this.Init=function(a){this.Xml=new EWA.C.Xml;this.Xml.LoadXml(a);this.ItemList.F=this;this.ItemList.Init(this.Xml);this.Resources=new EWA_FrameResoures;this.Resources.Init(this.Xml);"enus"==EWA.LANG&&$(".ewa-ipt-droplist").attr("placeholder",
"Input character selection");this._InitTranslations();this._GetDropListValue();this._InitMustInputs();this._InitEncyptions()};this._InitMustInputs=function(){var a=$("#EWA_FRAME_"+this._Id),b;for(b in this.ItemList.Items){var c=this.ItemList.Items[b],d=this.ItemList.GetItemValue(c,"Name","Name");0<$(c).find('IsMustInput Set[IsMustInput="1"]').length&&(c="#"+d,a.find(".ewa-row-"+d).addClass("ewa-row-must"),d=a.find(c),d.addClass("ewa-row-item-must"),0<d.length&&d.attr("type")&&"hidden"==d.attr("type").toLowerCase()&&
d.prev().addClass("ewa-row-item-must"))}};this._InitEncyptions=function(){var a=$("#EWA_FRAME_"+this._Id),b;for(b in this.ItemList.Items){var c=this.ItemList.Items[b],d=this.ItemList.GetItemValue(c,"Name","Name");c=$(c).find("DispEnc Set");if(0!=c.length&&(d=a.find("#"+d),0!=d.length&&c.attr("EncType"))){if("INPUT"==d[0].tagName||"TEXTAREA"==d[0].tagName){if(!d.val())continue;d.prop("disabled",!0);d.attr("ewa_encyrption","yes")}var e=$("<div class='ewa-enc-cover' style='position:absolute;left:0;top:0;width:100%;height:100%;'><div></div></div>");
d.parent().append(e);d.parent().css("position","relative");if(c=c.attr("EncShowUrl")){e.find("div").html("\u70b9\u51fb\u67e5\u770b").css({position:"absolute",height:30,"line-height":"30px",top:"50%","margin-top":"-15px",right:10,"text-align":"right"});c=new EWA_UrlClass(c);e=new EWA_UrlClass(this.Url);for(var f in e._Paras)if(!c.GetParameter(f)){var g=e._Paras[f];null!=g&&(g=g.unURL());c.AddParameter(f,g)}c.AddParameter("EWA_ENCY_FROM_ID",d.attr("id"));c=c.GetUrl();d.parent().attr("enc_url",c).attr("fid",
d.attr("id"));d.parent().on("click",function(){if(!$(this).attr("enc_ok")){var a=$(this).attr("t")||100,b=(new Date).getTime();if(!(400>b-a)){$(this).attr("t",b);a=$(this).attr("enc_url");var c=$(this).find("#"+$(this).attr("fid"));$J(a,function(a){a.RST?(c.prop("disabled",!1),c.removeAttr("ewa_encyrption"),c.val(a.VALUE),$(c).parent().find(".ewa-enc-cover").remove(),$(c).parent().attr("enc_ok","1")):(a.ERR||a.MSG)&&$Tip(a.ERR||a.MSG)})}}})}}}};this._InitTranslations=function(){var a="EWA.F.FOS[&quot;"+
this._Id+"&quot;]._Trans(this)",b;for(b in this.ItemList.Items){var c=this.ItemList.Items[b],d=this.ItemList.GetItemValue(c,"Name","Name"),e=$(c).find("DataItem Set[Translation]");if(c=e.attr("Translation")){e=e.attr("TransTarget");var f="en2zh"==c?" \u82f1\u8bd1\u4e2d":" \u4e2d\u8bd1\u82f1";"enus"==EWA.LANG&&(f="en2zh"==c?" En-Zh":" Zh-En");c=$('<a class="ewa-but-trans" href="javascript:void(0)" onclick="'+a+'" _transf="'+d+'" _transp="'+c+'" _transt="'+e+'">'+f+"</a>");e=$("#EWA_FRAME_"+this._Id+
" .ewa-row-"+d+" .EWA_TD_L");0==e.length&&(e=$("#EWA_FRAME_"+this._Id+" .ewa-row-"+d+" .EWA_TD"));0==e.length&&(e=$("#EWA_FRAME_"+this._Id+" #"+d).parent().prev().find(".ewa_d1"));0==e.length&&(e=$("#EWA_FRAME_"+this._Id+" #"+d).parent(),e.css("position","relative"),c.addClass("ewa-but-trans-float"));e.append(c)}}};this._Trans=function(a){if(a){var b=$(a).attr("_transf"),c=$(a).attr("_transp");a=$(a).attr("_transt");b=$("#EWA_FRAME_"+this._Id+" #"+b);a=$("#EWA_FRAME_"+this._Id+" #"+a);if(0==b.length||
0==a.length)console.log("trans ex:",b,a);else{var d=b[0].tagName.toLowerCase();if(b="input"==d||"textarea"==d||"hidden"==d?b.val():b.text()){var e=new EWA_TransClass;"en2zh"==c?e.TransToCn(b,a[0]):e.TransToEn(b,a[0]);$Tip("enus"==EWA.LANG?"Translating...":"\u7ffb\u8bd1\u4e2d...",function(){return!e.IsRun})}}}};this._GetDropListValue=function(){var a=$X("EWA_FRAME_"+this._Id);if(null!=a){for(var b=a.getElementsByTagName("input"),c=0;c<b.length;c++){var d=b[c];if("droplist"==d.getAttribute("ewa_class")){var e=
d.nextSibling;"INPUT"==e.tagName.toUpperCase()&&"HIDDEN"==e.type.toUpperCase()&&this._GetDropListValue1(d,e)}}a=a.getElementsByTagName("select");for(c=0;c<a.length;c++)if(d=a[c],b=d.getAttribute("_ListFilterType"))e=d.getAttribute("_ListFilterField"),this.initSelectFilter(d.id,b,e);this._SelectFilters&&this._checkSelectOptionsChange()}};this._GetDropListValue1=function(a,b){if(""==b.value)b.setAttribute("setvalue",1);else{var c=b.getAttribute("DlsShow");if(null==c||""==c)b.setAttribute("canopen",
0),a.value=b.value,b.setAttribute("canopen",1);else{var d=new EWA_AjaxClass,e=b.getAttribute("xmlName"),f=b.getAttribute("itemName"),g=b.getAttribute("paraName"),h=b.getAttribute("DlsAction");d=new EWA.C.Ajax;var k=b.value;var l=window.EWA_CGI?window.EWA_CGI:EWA.CP+"/EWA_STYLE/cgi-bin/";l=(l+("?XMLNAME="+e+"&ITEMNAME="+f+"&EWA_AJAX=JSON")).replace("//","/");l=l.replace("//","/");l=l.replace("//","/");d.AddParameter(g,k);null!=h&&0<h.trim().length&&(d.AddParameter("EWA_ACTION",h),d.AddParameter(b.id,
b.value));d.PostNew(l,function(){if(d.IsRunEnd()){var e=d.GetRst(),f="__json"+Math.random();try{eval('window["'+f+'"]='+e)}catch(u){b.setAttribute("canopen",0);a.value=u;b.setAttribute("canopen",1);return}e=window[f];if(0!=e.length){f=e[0];var g=[];e={};for(var h in f)g.push(f[h]),e["@"+h.toUpperCase()]=f[h],f[h]&&b.setAttribute("para_"+h.toLowerCase(),f[h]);if(null==c||""==c)e=g.join("/");else{h=c.match(/@[a-zA-Z0-9\-\._:]*\b/ig);for(f=0;f<h.length;f++){g=h[f];var k=e[g.toUpperCase()];c=c.replace(g,
k)}e=c}b.setAttribute("canopen",0);a.value=e;b.id=null==b.id||""==b.id?Math.random():b.id;"yes"==b.getAttribute("isdlseventload")&&(EWA.F.FOS[b.id]=new EWA_FrameItemClass,EWA.F.FOS[b.id].DropList(a),EWA.F.FOS[b.id].CallAfterEvent());b.setAttribute("canopen",1);b.setAttribute("setvalue",1)}}})}}};this.DoPostEx=function(){EWA.F.F.CUR=this;if(this.CheckValidAll(document.forms[0])){this._Ajax=new EWA.C.Ajax;this._Ajax.LoadingType="image";this._Ajax.AddParameter("EWA_AJAX","1");this._Ajax.AddParameter("EWA_POST",
"1");this._Ajax.AddParameter("EWA_NO_CONTENT","1");for(var a=document.getElementsByTagName("input"),b=0;b<a.length;b+=1){var c=a[b],d=""==c.name?c.id:c.name;null!=d&&""!=d&&this._Ajax.AddParameter(d,c.value)}a=document.getElementsByTagName("select");for(b=0;b<a.length;b+=1)c=a[b],d=""==c.name?c.id:c.name,null!=d&&""!=d&&this._Ajax.AddParameter(d,c.value);a=document.getElementsByTagName("textarea");for(b=0;b<a.length;b+=1)c=a[b],d=""==c.name?c.id:c.name,null!=d&&""!=d&&this._Ajax.AddParameter(d,c.value);
this._Ajax.PostNew(this.Url,EWA.F.F.CUR._CallBack)}};this.CreateAjax=function(a,b){EWA.F.F.CUR=this;null==a&&(a=$("#f_"+this._Id)[0]);if(!b&&!this.CheckValidAll(a))return null;b=new EWA.C.Ajax;for(var c in this.ItemList.Items){var d=this.ItemList.GetItemValue(this.ItemList.Items[c],"Name","Name"),e=this.GetObject(d,a);if(null!=e&&!$(e).attr("ewa_encyrption")){var f=this._GetObjectValue(e);null!=f&&b.AddParameter(d,f);"DIV"==e.tagName.toUpperCase()&&"1"==e.getAttribute("EWA_DHTML")&&(f=$X("UP_IMG_"+
d).value,b.AddParameter(d+"_imgs_split",f));d=e.getAttribute("ewa_tag");if("swffile"==d||"IMG_UPLOAD"==d)if(f=e.getAttribute("UP_PARAS"),null!=f&&0<f.length){f=f.split(",");for(var g=0;g<f.length;g++){var h=f[g];b.AddParameter(h,e.getAttribute(h))}}else b.AddParameter("UP_URL",e.value);"markdown"==d&&(e=e.parentNode.getElementsByTagName("textarea"),1<e.length&&b.AddParameter(e[1].id,e[1].value))}}if(this.PostAddData)for(h in this.PostAddData)b.AddParameter(h,this.PostAddData[h]);return b};this.CreatePostData=
function(){var a=$("#f_"+this._Id)[0],b={},c;for(c in this.ItemList.Items){var d=this.ItemList.GetItemValue(this.ItemList.Items[c],"Name","Name"),e=this.GetObject(d,a);if(null!=e){var f=this._GetObjectValue(e);null!=f&&(b[d]=f);"DIV"==e.tagName.toUpperCase()&&"1"==e.getAttribute("EWA_DHTML")&&(f=$X("UP_IMG_"+d).value,b[d+"_imgs_split"]=f);d=e.getAttribute("ewa_tag");if("swffile"==d||"IMG_UPLOAD"==d)if(f=e.getAttribute("UP_PARAS"),null!=f&&0<f.length){f=f.split(",");for(var g=0;g<f.length;g++){var h=
f[g];b[h]=e.getAttribute(h)}}else b.UP_URL=e.value;"markdown"==d&&(e=e.parentNode.getElementsByTagName("textarea"),1<e.length&&(b[e[1].id]=e[1].value))}}return b};this.DoPostBefore=function(){return!0};this.isDoPostBeforeTimer=function(){return null!=this._checkStatusFristResult};this.DoPost=function(a,b,c){if(!c){c=this.DoPostBefore();if(c instanceof Array){var d=this;this._checkStatusInc=0;this._checkStatusFristResult=c;this._checkStatusTimer=window.setInterval(function(){var c=0==d._checkStatusInc?
d._checkStatusFristResult:d.DoPostBefore();d._checkStatusInc++;null!=c[0]&&(window.clearInterval(d._checkStatusTimer),d._checkStatusTimer=null,d._checkStatusInc=null,d._checkStatusFristResult=null,0==c[0]?c[2]?$Confirm(c[1],c[1],function(){c[0]=c[1]=null;d.DoPost(a,b,!0)},function(){}):$Tip(c[1]):(c[0]=c[1]=null,d.DoPost(a,b,!0)))},232);return}if(!c)return}var e=$(a).find("input[ewa_tag=ht5upload]");if(!(0<e.length)||this.uploadProcess||this.CheckValidAll(a)){for(c=0;c<e.length>0;c++){var f=e[c],
g=f.id;f=!1;g=window["h5u_"+this._Id+"$"+g];if(g.haveFile()){if("ok"!=g.UPLOAD_STATUS){f||(d=this,setTimeout(function(){d.DoPost(a,b)},700),f=!0);$X(g.WAIT_ID)||(g.createWaitBox(),g.submitUploads(),this.uploadProcess=!0);return}g.removeWaitBox()}}e=$(a).find("input[ewa_tag=ht5takephoto]");if(!(0<e.length)||this.uploadProcess||this.CheckValidAll(a)){for(c=0;c<e.length>0;c++){f=e[c];g=f.id;f=!1;g=window["h5takephoto_"+this._Id+"$"+g];if("ok"!=g.UPLOAD_STATUS){if(!$X(g.H5_UPLOAD.WAIT_ID)){try{g.submitUpload()}catch(k){console.log("ht5takephotos - ht5.submitUpload: "+
k);$Tip("\u60a8\u6ca1\u6709\u83b7\u53d6\u7167\u7247");return}g.H5_UPLOAD.createWaitBox();this.uploadProcess=!0}f||(d=this,setTimeout(function(){d.DoPost(a,b)},700),f=!0);return}g.H5_UPLOAD.removeWaitBox()}c=this.CreateAjax(a);if(null!=c){null==b&&(b=this.Url);if(""==b||null==b)b=window.location.href;this._Ajax=c;this._Ajax.AddParameter("EWA_AJAX","1");this._Ajax.AddParameter("EWA_POST","1");this._Ajax.AddParameter("EWA_NO_CONTENT","1");this._Ajax.LoadingType="image";this.DoPostStart&&this.DoPostStart(this._Ajax);
c=new EWA_UrlClass(b);for(var h in this._Ajax._Parameters)c.RemoveParameter(h);b=c.GetUrl();this._Ajax.PostNew(b,EWA.F.F.CUR._CallBack);this.isShowPostWaitting||this._Ajax.HiddenWaitting();$("#EWA_FRAME_"+this._Id+" input[type=submit]").attr("disabled","disabled")}}}};this._CallBack=function(){var a=EWA.F.F.CUR._Ajax;if(a.IsRunEnd())if($("#EWA_FRAME_"+EWA.F.F.CUR._Id+" input[type=submit]").attr("disabled",null),EWA.F.F.CUR.DoPostEnd&&EWA.F.F.CUR.DoPostEnd(a,a._Http.status,a._Http.responseText,a._Http.statusText),
200==a._Http.status){if(a=a._Http.responseText,EWA.F.CheckCallBack(a)){EWA.F.F.CUR.ValidCodeError(!0);try{EWA.F.F.CUR.ReloadAfter&&EWA.F.F.CUR.ReloadAfter(a),eval(a)}catch(b){alert(a)}}}else alert("ERROR:\r\n"+a._Http.statusText)};this.Reload=function(){};this.Reload1=function(){if($X("EWA_FRAME_"+this._Id)){var a=$("#EWA_FRAME_1102378159").parentsUntil("#EWA_FRAME_MAIN").last().parent();if(0!=a.length){var b="ewa_frame_relaod_"+Math.random();a.attr("id",b);a=new EWA_UrlClass;a.SetUrl(this.Url);a.AddParameter("ewa_ajax",
"install");(new EWA_AjaxClass).Install(a.GetUrl(),"",b,function(){})}}};this.CheckValidAll=function(a){var b=!0,c=null,d;for(d in this.ItemList.Items){var e=this.ItemList.GetItemValue(this.ItemList.Items[d],"Name","Name");e=this.GetObject(e,a);null!=e&&((b&=this.CheckValid(e))||null!=c||(c=e))}null!=c&&c.focus();return b};this.H5Type=function(){var a=$("#EWA_FRAME_"+this._Id),b;for(b in this.ItemList.Items){var c=this.ItemList.Items[b],d=this.ItemList.GetItemValue(c,"Name","Name");d=a.find('[id="'+
d+'"]');if(0!=d.length){var e=this.ItemList.GetItemValue(c,"Tag","Tag"),f=this.ItemList.GetItemValue(c,"DataItem","Valid");this.ItemList.GetItemValue(c,"DataItem","Format");c=this.ItemList.GetItemValue(c,"IsMustInput","IsMustInput");"Email"==f&&d.attr("type","email");"valid"==e&&d.attr("type","tel");1==c&&d.attr("required","required")}}};this.GetObject=function(a,b){b||(b=$("FORM#f_"+this._Id));a=$(b).find('[id="'+a+'"]');return 0<a.length?a[0]:null};this.CheckValid=function(a,b){if("SPAN"==a.tagName||
"IMG"==a.tagName)return!0;if(a&&b&&"DIV"==a.tagName&&"REPT"==a.getAttribute("tag")){b=b.target.tagName;if("LABEL"==b||"INPUT"==b){var c=this;setTimeout(function(){c._GetObjectValue(a);c.ItemList.CheckValid(a,d)},10)}return!0}var d=this._GetObjectValue(a);return this.ItemList.CheckValid(a,d)};this._GetObjectValue=function(a){return this.ItemList.GetObjectValue(a)};this.getUrlClass=function(){var a=new EWA_UrlClass;a.SetUrl(this.Url);return a}}var __EWA_ALTER_MSG=null;
function EWA_FrameShowAlert(a,b){if(1!=a.getAttribute("show_alert")){a.setAttribute("show_alert",1);var c=a;do if(c=c.parentNode,"BODY"==c.tagName){c=null;break}while("TR"!=c.tagName||1!=c.getAttribute("SHOW_MSG"));if(c)if(1==c.cells.length||"1"==c.parentNode.parentNode.getAttribute("error_show_type")){a=$(c);var d=a.next();if(!d.attr("error")){d=c.parentNode.insertRow(c.rowIndex+1);d.setAttribute("error",1);var e=d.insertCell(-1);e.colSpan=c.cells.length;e.className="ewa-tip-error";d=$(d);e.innerHTML=
'<div class="ewa-tip-error-info"></div>'}a.find("td").addClass("ewa-tip-error");d.find(".ewa-tip-error-info").html(b)}else 3==c.cells.length?(c.style.backgroundColor="lightyellow",null==a.getAttribute("ori_msg")&&(a.setAttribute("ori_msg",c.cells[2].innerHTML),a.setAttribute("ori_st",c.cells[2].style.borderLeft)),c.cells[2].innerHTML=a.getAttribute("ORI_MSG")+"(<font color=red>"+b+"</font>)",c.cells[2].style.borderLeft="2px solid red"):($(c).find("td").css("background-color","lightyellow"),a.focus(),
1==c.cells.length?(c=$(c).prev(),c.attr("id")&&0<c.attr("id").indexOf(a.id)?(null==a.getAttribute("ori_msg")&&a.setAttribute("ori_msg",c[0].cells[0].innerHTML),c[0].cells[0].innerHTML=a.getAttribute("ori_msg")+"(<font color=red>"+b+"</font>)"):(alert("\u8bf7\u8f93\u5165\uff1a"+b),a.focus())):(null==a.getAttribute("ori_msg")&&a.setAttribute("ori_msg",c.cells[0].innerHTML),c.cells[0].innerHTML=a.getAttribute("ori_msg")+"(<font color=red>"+b+"</font>)"));else b=$(a),b.attr("ori_bc",b.css("background-color")),
b.css("background-color","pink"),a.focus()}}
function EWA_FrameRemoveAlert(a){__EWA_ALTER_MSG&&(__EWA_ALTER_MSG.style.display="none");if(1==a.getAttribute("show_alert")){a.setAttribute("show_alert",0);var b=a;do if(b=b.parentNode,"BODY"==b.tagName){b=null;break}while("TR"!=b.tagName||1!=b.getAttribute("SHOW_MSG"));b?(b.style.backgroundColor="",1==b.cells.length||"1"==b.parentNode.parentNode.getAttribute("error_show_type")?(a=$(b),a.find("td").removeClass("ewa-tip-error"),a=a.next(),a.attr("error")&&a.remove()):3==b.cells.length?(b.cells[2].innerHTML=
a.getAttribute("ori_msg"),b.cells[2].style.borderLeft=a.getAttribute("ori_st")):1==b.cells.length?(b=$(b).prev(),b.attr("id")&&0<b.attr("id").indexOf(a.id)&&(b[0].cells[0].innerHTML=a.getAttribute("ori_msg"))):($(b).find("td").css("background-color",""),b.cells[0].innerHTML=a.getAttribute("ori_msg"))):(a=$(a),a.css("background-color",a.attr("ori_bc")))}}
function EWA_FrameShowAlert1(a,b){var c=a;do if(c=c.parentNode,"BODY"==c.tagName){c=null;break}while("TD"!=c.tagName||1!=c.getAttribute("SHOW_MSG")&&"ewa_redraw_info"!=c.className);if(c){var d=c.parentNode.parentNode.parentNode,e=c.previousElementSibling?c.previousElementSibling:c.previousSibling;c.style.backgroundColor="lightblue";e&&1==e.nodeType?(e.style.backgroundColor="lightblue",null==a.getAttribute("ori_msg")&&(a.setAttribute("ori_msg",e.innerHTML),a.setAttribute("ori_st",e.style.borderLeft)),
"*"==b&&(b=$(e).find(".ewa_d1").html()+"\uff1a\u9700\u8981\u8f93\u5165"),e.style.borderLeft="2px solid red"):c.style.borderLeft="2px solid red";a="ERR_"+a.id;c=$(d).find('.ewa_msg_err span[id="'+a+'"]');0<c.length?c.html(b+"&nbsp;"):$(d).find(".ewa_msg_err").append('<span id="'+a+'">'+b+"&nbsp;</span>")}else"*"==b&&(b=a.parentNode.innerText+"\uff1a\u9700\u8981\u8f93\u5165"),$(".ewa_msg_err").html(b),a.focus()}
function EWA_FrameRemoveAlert1(a){if(null!=a.getAttribute("ori_msg")){var b=a;do if(b=b.parentNode,"BODY"==b.tagName)return;while("TD"!=b.tagName||1!=b.getAttribute("SHOW_MSG")&&"ewa_redraw_info"!=b.className);var c=b.parentNode.parentNode.parentNode,d=b.previousElementSibling?b.previousElementSibling:b.previousSibling;b.style.backgroundColor="";d&&1==d.nodeType?(d.style.backgroundColor="",d.style.borderLeft=a.getAttribute("ori_st")):b.style.borderLeft=a.getAttribute("ori_st");a="ERR_"+a.id;$(c).find('.ewa_msg_err span[id="'+
a+'"]').remove()}}
function EWA_FrameItemClass(){this._Dialog=this._Object1=this._Object=this._Ajax=null;this._Items={};this._SelectedValue=this._LastMoveTr=null;this.DropList=function(a,b){var c=a.nextSibling;this._Object=a;this._Object1=c;if(""==a.value)c.value="";else if(0!=c.getAttribute("canopen"))if(b||null==this._SelectedValue||this._SelectedValue!=a.value){this._inputValue=a.value;var d=c.getAttribute("xmlName"),e=c.getAttribute("itemName");b=c.getAttribute("paraName");_EWA_FRAME_ITEM=this;var f=new EWA.C.Ajax;
f.LoadingType="none";var g="%"+a.value+"%";var h=window.EWA_CGI?window.EWA_CGI:EWA.CP+"/EWA_STYLE/cgi-bin/";h+="?XMLNAME="+d.toURL()+"&ITEMNAME="+e.toURL()+"&EWA_AJAX=NOJS&EWA_LF_NOHEADER=1";(d=$U())&&(h+="&"+d);$(a).attr("ewa_drop_list_para")?h+="&"+$(a).attr("ewa_drop_list_para"):$(c).attr("ewa_drop_list_para")&&(h+="&"+$(c).attr("ewa_drop_list_para"));a=new EWA_UrlClass(h);a.RemoveParameter(b);h=a.GetUrl();f.AddParameter(b,g);f.PostNew(h,function(){if(f.IsRunEnd()){var a=f.GetRst();_EWA_FRAME_ITEM.Show(!0);
_EWA_FRAME_ITEM.SetContent(a)}});this.SetContent(this._Items[c.value])}else this._SelectedValue=null};this.MouseOver=function(a){a=a?a:window.event;a=a.srcElement?a.srcElement:a.target;if("TD"==a.tagName){a=a.parentNode;if(null!=this._LastMoveTr)for(var b=0;b<this._LastMoveTr.cells.length;b+=1)this._LastMoveTr.cells[b].style.backgroundColor="";if("HEADER"==a.getAttribute("EWA_TAG"))this._LastMoveTr=null;else{for(b=0;b<a.cells.length;b+=1)a.cells[b].style.backgroundColor="#cccccc";this._LastMoveTr=
a}}};this.MouseDown=function(a){a=a?a:window.event;a=a.srcElement?a.srcElement:a.target;if("DIV"!=a.tagName){if("TR"==a.tagName)var b=a;else{var c=$(a).parentsUntil("tbody").last();if(0==c.length){console.log(a);return}b=c[0]}if(null==b)console.log(a);else if("TR"!=b.tagName)console.log(a);else if("HEADER"!=b.getAttribute("ewa_tag")){a=this._Object.nextSibling;a.setAttribute("canopen",0);c=[];for(var d={},e=0;e<b.cells.length;e+=1){var f=b.cells[e];f.style.backgroundColor="lightyellow";var g=GetInnerText(f).trim();
c[c.length]=g;f=f.childNodes[0].id;null!=f?(d["@"+f.toUpperCase()]=g,this._Object1.setAttribute("para_"+f.toLowerCase(),g)):d[e]=g}this._LastMoveTr=null;this._SelectedValue=c[0];this._Object1.value=c[0];b=this._Object1.getAttribute("DlsShow");if(null==b||""==b)this._Object.value=c[0];else{g=b.match(/@[a-zA-Z0-9\-\._:]*\b/ig);for(e=0;e<g.length;e++){f=g[e];var h=d[f.toUpperCase()];b=b.replace(f,h)}this._Object.value=b}this._Object.parentNode.setAttribute("title",c.join("\n"));this._Object1.getAttribute("afterEvent");
this.CallAfterEvent();this.Show(!1);a.setAttribute("canopen",1)}}};this.CallAfterEvent=function(){var a=this._Object1.getAttribute("afterEvent");if(null!=a&&0!=a.trim().length){var b=eval("window."+a);if("function"==typeof b)try{b(this._Object1.value,this._Object.value,this._Object1,this._Object)}catch(c){alert("\u5b9a\u4e49\u7684Js "+a+"\u6267\u884c\u9519\u8bef\uff1a"+c)}else alert("\u5b9a\u4e49\u7684Js "+a+"\u4e0d\u5b58\u5728, \u5bf9\u8c61\u4e3a"+typeof b)}};this.Show=function(a){if(null==this._Dialog){var b=
"500px",c="180px";null!=this._Object1.getAttribute("set-dialog-width")&&(b=this._Object1.getAttribute("set-dialog-width"));null!=this._Object1.getAttribute("set-dialog-height")&&(c=this._Object1.getAttribute("set-dialog-height"));EWA.B.PAD&&(b=document.documentElement.clientWidth+"px",c=document.documentElement.clientHeight-300+"px");this._Dialog=new EWA_UI_DialogClass;this._Dialog.Width=b;this._Dialog.Height=c;this._Dialog.ShadowColor="";"undefined"==typeof _EWA_DialogWnd?this._Dialog.CreateWindow=
window:(this._Dialog.CreateWindow=_EWA_DialogWnd._ParentWindow,_EWA_DialogWnd.OpendDialogs[_EWA_DialogWnd.OpendDialogs.length]=this._Dialog);this._Dialog.Create();b="<div style='position:absolute;width:"+b+";height:"+c+";overflow-y:scroll;overflow-x:hidden;border:1px solid #ccc;cursor:pointer'";b=EWA.B.PAD?b+" onclick='_EWA_FRAME_ITEM.MouseDown(event)' ></div>":b+" onmouseover='_EWA_FRAME_ITEM.MouseOver(event)'  onmousedown='_EWA_FRAME_ITEM.MouseDown(event)' ></div>";this._Dialog.SetHtml(b);$(this._Dialog.GetFrame()).addClass("ewa-ddl-list")}this._Dialog.ShowType=
a;this._Dialog.MoveBottom(this._Object);this._Dialog.Show(a);this._Dialog.CreateWindow._EWA_FRAME_ITEM=this;_EWA_FRAME_ITEM=this};this.SetContent=function(a){if(null!=a)if(a=a.replace(/onmouseout/ig,"z1"),a=a.replace(/onmousedown/ig,"z2"),a=a.replace(/onmouseover/ig,"z3"),null==this._Items[this._Object.value]&&(this._Items[this._Object.value]=a),this._Dialog.GetFrameContent().childNodes[0].innerHTML=a,a=this._Dialog.GetFrameContent().childNodes[0].getElementsByTagName("table")[0],a.style.position=
"absolute",1>=a.rows.length||0==this._Object.value.length)1>=a.rows.length&&this.Show(!1);else{try{for(var b=eval("/("+this._Object.value+")/ig"),c=1;c<a.rows.length;c+=1)for(var d=a.rows[c],e=0;e<d.cells.length;e++){var f=GetInnerText(d.cells[e].childNodes[0]);d.cells[e].childNodes[0].innerHTML=f.replace(b,"<font color=blue><b>$1</b></font>")}}catch(g){}this.Show(!0)}}}
function EWA_FrameMapToClass(){this.EWA=null;this.mapRef=function(a,b,c){this.POST_URL=c;this.EWA=b;var d=$("#EWA_FRAME_"+this.EWA._Id);this._Id=this.EWA._Id+"_MAPTO";EWA.F.FOS[this._Id]=this;var e=this;$(a).find("[ref]").each(function(){try{e.mapRefItem(this,d)}catch(f){console.log(f,this)}})};this.checkbox=function(a){a=$(a).parentsUntil('div[tag="REPT"]').last().parent();var b=[];a.find("input:checked").each(function(){b.push(this.value)});a={key:a.attr("id"),val:b.join(",")};$JP(this.POST_URL||
window.location.href,a,function(a){a.RST?$TipTL("\u4fdd\u5b58\u5b8c\u6bd5"):$Tip(a.ERR)})};this.showGpsMap=function(a,b){var c=a.attr("ref_map");if(c){var d=b.parent().parent().next().find(".ewa-map-small");if(0==d.length){var e=this;setTimeout(function(){e.showGpsMap(a,b)},100)}else 0==c.indexOf(".")||0==c.indexOf("#")?$(c).append(d.css("height","100%")):$("#"+c).append(d.css("height","100%"))}};this.mapRefItem=function(a,b){var c=$(a),d=c.attr("ref");d=b.find('[id="'+d+'"]');var e=!1,f=this,g="",
h="EWA.F.FOS['"+this._Id+"']";if("hidden"==d[0].type){if(!d.attr("setvalue")){setTimeout(function(){f.mapRefItem(a,b)},100);return}d=d.prev();g=d.val();c.attr("onclick",h+".modifyRef(this)").css("cursor","pointer")}else if("addressMap"==d.attr("ewa_tag"))g=d.val(),c.attr("onclick",h+".modifyRef(this)").css("cursor","pointer"),this.showGpsMap(c,d);else{if("REPT"==d.attr("tag")){c=$(a);c.offset();c.offset();c.outerWidth();c.append(d);d.find("input[type=checkbox]").attr("onclick",h+".checkbox(this)");
return}"1"==d.attr("ewa_dhtml")?(e=!0,g=d[0].textContent,c.attr("onclick",h+".modifyRefHtml(this)").css("cursor","pointer")):("SELECT"==d[0].tagName?g=d[0].options[d[0].selectedIndex].text:"TEXTAREA"==d[0].tagName?((g=d.val())&&(g="<div>"+g.replace(/</,"&lt;").replace(/>/,"&gt;").replace(/\n/ig,"</div><div>")+"</div>"),e=!0):g=d.val(),c.attr("onclick",h+".modifyRef(this)").css("cursor","pointer"))}g||(g="...................");e?c.html(g):c.text(g);c.append('<i style="margin-left:5px" class="fa fa-edit"></i>')};
this.createRefCaption=function(a,b,c,d){if($X(a+"_____tip"))e=$($X(a+"_____tip")),e.show();else{e=document.createElement("div");var e=$(e);e.css({position:"absolute",left:c,top:d-30,height:30,"line-height":"30px",background:"antiquewhite",padding:"0 10"}).text(b);e.attr("id",a+"_____tip");$("body").append(e)}return e};this.modifyRefHtml=function(a){var b=$(a),c=b.attr("ref"),d=$("#EWA_FRAME_"+this.EWA._Id).find('[id="'+c+'"]').prev(),e=b.offset().left,f=b.offset().top,g=b.outerWidth(),h=b.outerHeight();
g={position:"absolute",left:e,top:f,width:g,height:h,font:b.css("font"),border:"2px solid antiquewhite",outline:"none"};d.css(g);$(d.find("iframe")[0].contentWindow.document.body).css("width","auto").css("font",b.css("font"));oldv=window[d.attr("id").replace("box","")].GetHtml();d.attr("oldv",oldv);g=$($X("_ewa_tr$"+c).cells[0]).text();var k=this.createRefCaption(c,g,e,f);d.focus();var l=this;window.onmousedown=function(c){if(!l.checkInHtmlEditor(c.target)){c=d.attr("id").replace("box","");var e=
window[c].GetHtml();window.onmousedown=null;c=d.attr("oldv");e==c?($(d).attr("style",""),k.hide()):(c={key:$(a).attr("ref"),val:e},$JP(l.POST_URL||window.location.href,c,function(a){$(d).attr("style","");k.hide();a.RST?(""==e&&(e="............."),b.html(e),$TipTL("\u4fdd\u5b58\u5b8c\u6bd5"),b.append('<i style="margin-left:5px" class="fa fa-edit"></i>')):$Tip(a.ERR)}))}}};this.checkInHtmlEditor=function(a){a=$(event.target).parents();for(var b=0;b<a.length;b++){var c=$(a[b]);if(c.hasClass("ewa-editor")||
c.hasClass("ewa-editor-pop")||c.hasClass("ewa-dialog"))return!0}return!1};this.modifyRef=function(a){var b=$(a);a=b.attr("ref");var c=$("#EWA_FRAME_"+this.EWA._Id).find('[id="'+a+'"]');"hidden"==c[0].type&&(c=$(c).prev());var d=b.offset().left,e=b.offset().top,f=b.outerWidth(),g=b.outerHeight();"TEXTAREA"==c[0].tagName&&(g+=30);f={position:"absolute",left:d,top:e,width:f,height:g,font:b.css("font"),border:"2px solid antiquewhite",outline:"none"};c.css(f);f=c.val();c.attr("oldv",f);f=$($X("_ewa_tr$"+
a).cells[0]).text();var h=this.createRefCaption(a,f,d,e);c.focus();if(!c.attr("evtblur")){c.attr("evtblur","is_setted");var k=this;addEvent(c[0],"keydown",function(a){a=a.keyCode;13==a&&"TEXTAREA"!=c[0].tagName?this.blur():27==a&&(this.value=$(this).attr("oldv"),this.blur())});addEvent(c[0],"blur",function(){var a=$(this.parentNode.parentNode.cells[0]),c=a.css("background-color"),d=$(this).attr("onmousedown");if(d){var e=d.indexOf(".CheckValid");d=d.substring(0,e);if(eval(d).CheckValid(this))$(this).css("background",
"");else{this.focus();$(this).css("background","pink");return}}d=this.id;e=this.value;"droplist"==$(this).attr("ewa_class")&&(e=$(this).next().val(),d=$(this).next().attr("id"));d={key:d,val:e};if("rgb(255, 255, 224)"==c)$Tip(a.html()),h.hide(),this.focus();else if(this.value==$(this).attr("oldv"))$(this).attr("style",""),h.hide();else{var f=this;$JP(k.POST_URL||window.location.href,d,function(a){$(f).attr("style","");h.hide();a.RST?(a="SELECT"==f.tagName?f.options[f.selectedIndex].text:f.value,"TEXTAREA"==
f.tagName?""==a?b.html("............."):(a=a.replace(/</ig,"&lt;").replace(/>/ig,"&gt;"),a="<div>"+a.split("\n").join("</div><div>")+"</div>",b.html(a)):(""==a&&(a="............."),b.text(a)),b.append('<i style="margin-left:5px" class="fa fa-edit"></i>'),$TipTL("\u4fdd\u5b58\u5b8c\u6bd5")):$Tip(a.ERR)})}})}}}
function EWA_ListFrameClass(){this._Ajax=this.Xml=null;this.ItemList=new EWA_FrameCommonItems;this._SortName=this._Sort=this._RecordCountName=this._PageCountName=this._PageSizeName=this._PageCurrentName=this._RecordCount=this._PageCount=this._PageSize=this._PageCurrent=null;this._SearchExp="";this._SearchHtml=null;this._SearchFields=[];this._Id=null;this._IsCheckedAll=!0;this._SearchDialog=null;this._SearchJson={};this.Resources={};this.GotoParas=[];this._CurTr=null;this._TrSelectMulti=!0;this.IsTrSelect=
!1;this.CheckedAllAfter=this.ReloadAfter=null;this.IsNotMDownAutoChecked=!1;this.ShowRecycle=function(){var a=$X("EWA_LF_"+this._Id);if(null!=a&&(a=$(a).parentsUntil("table").last().find(".ewa_lf_func_caption"),0!=a.length)){var b="\u56de\u6536\u7ad9";window._EWA_INFO_MSG&&window._EWA_INFO_MSG.RECYCLE&&(b=window._EWA_INFO_MSG.RECYCLE);b="<div class='ewa_lf_func_dact ewa-lf-func-recycle' onclick='EWA.F.FOS[\""+this._Id+"\"].ShowRecycle1(this)' ><b class='fa fa-recycle'></b>"+b+"</div>";a.parent().append(b)}};
this.ShowRecycle1=function(a){var b=new EWA_UrlClass(this.Url);$(a).attr("recycle")?(b=b.RemoveParameter("ewa_recycle"),$(a).attr("recycle",null).removeClass("ewa-lf-func-recycle-yes")):(b=b.AddParameter("ewa_recycle","1"),$(a).attr("recycle",1).addClass("ewa-lf-func-recycle-yes"));this.Url=b;this.Goto(1)};this.BindButton=function(a,b){$("#EWA_LF_"+this._Id+' tr[ewa_key] [id="'+a+'"]').each(function(){$(this).attr("onclick","$(this).parent().parent().find('[id=\""+b+"\"]')[0].click()");$(this).addClass("ewa-map-button")})};
this.Merge=function(a,b,c,d){$("#EWA_LF_"+this._Id+" tr[ewa_key]").each(function(){var e=$(this).find('[id="'+a+'"]');e.parent().hide();var f=$(this).find('[id="'+b+'"]').parentsUntil("tr").last();c||(c="<br>");0<=c.indexOf("<")?f.append(c):f.append("<span class='ewa-mearge-str'>"+c+"</span>");f.append(e);d&&d(f,this)});$("#EWA_LF_"+this._Id+' tr[ewa_tag="HEADER"] [id="'+a+'"]').parent().hide()};this.Mearge=function(a,b,c){console.log("\u62fc\u5199\u9519\u8bef\uff0c\u8bf7\u7528 Merge");this.Merge(a,
b,c)};this.MergeExp=function(a,b,c,d){if(b){var e=b.match(/@@[a-zA-Z0-9\-\._:]*\b/ig),f=[],g=b,h={};for(b=0;b<e.length;b++){var k=e[b];f.push(k);var l=k.replace("@@","");g=g.replace(k,"<span class='ewa-lf-mearge ewa-lf-mearge-"+l+"' mid=\""+k+'"></span>');l!=a&&$("#EWA_LF_"+this._Id+' tr[ewa_tag="HEADER"] [id="'+l+'"]').parent().hide();h[l]=$("#EWA_LF_"+this._Id+' tr[ewa_tag="HEADER"] [id="'+l+'"]').html()}$("#EWA_LF_"+this._Id+" tr[ewa_key]").each(function(){var b=document.createElement("div");b.style.display=
"none";b.innerHTML=g;document.body.appendChild(b);if(0==$(this).find('[id="'+a+'"]').length)console.log("not find "+a);else{var e=$(this).find('[id="'+a+'"]').parent(),k;for(k in f){var l=f[k],p=l.replace("@@",""),u=$(this).find('[id="'+p+'"]');0!=u.length&&(p!=a&&u.parent().hide(),l=$(b).find('span[mid="'+l+'"]'),c&&(l.append("<span class='ewa-lf-mearge-memo'></span>"),l.find(".ewa-lf-mearge-memo").html(h[p])),l.append(u))}for(;0<b.childNodes.length;)e.append(b.childNodes[0]);$(b).remove();d&&d(e,
this)}})}else console.log("mergeExp \u6ca1\u6709\u8bbe\u7f6e")};this.MeargeExp=function(a,b,c,d){console.log("\u62fc\u5199\u9519\u8bef\uff0c\u8bf7\u7528 MereExp");this.MergeExp(a,b,c,d)};this.SubBottoms=function(a){this.SubBottomsArray=a.split(",");this._SubBottoms()};this._SubBottoms=function(){var a=this.AddRow([]);$(a).find("td").addClass("ewa-lf-sub-td");for(var b in this.SubBottomsArray){var c=this.SubBottomsArray[b],d=0,e="#EWA_LF_"+this._Id+" span[id="+c+"]";0==$(e).length&&(e="#EWA_LF_"+this._Id+
" a[id="+c+"]");$(e).each(function(){var a=GetInnerText(this).replace(/,/ig,"");isNaN(a)||(d+=1*a)});$(a).find("td[id=ADD_ROW_"+c+"]").html("<nobr class='ewa-lf-sub'>"+d.fm()+"</nobr>")}};this.ChangeRowStyle=function(a,b,c){for(var d=$X("EWA_LF_"+this._Id),e=1;e<d.rows.length;e++){var f=d.rows[e];if(!(0==f.cells.length||f.cells.length<=a)){var g=f.cells[a].childNodes[0].getAttribute(b);if(null!=g&&c[g])for(var h=0;h<f.cells.length;h++)f.cells[h].style.cssText=f.cells[h].style.cssText+";"+c[g]}}if(null==
this.ReloadAfter){var k=this;this.ReloadAfter=function(){k.ChangeRowStyle(a,b,c)}}};this.MDownEvent=function(a,b){};this.LoadJson=function(a,b){null!=a&&$J(this.Url+"&EWA_ACTION="+a+"&EWA_AJAX=JSON",b)};this.Workflow=function(a,b,c,d,e,f){EWA.F.CID=this._Id;this._Ajax=this.CreateAjax();this._Ajax.AddParameter("EWA_AJAX","WORKFLOW");this._Ajax.AddParameter("EWA_ID",this._Id);this._Ajax.AddParameter("EWA_WF_NAME",b);null!=c?(a=this.GetRowKey(c),this._Ajax.AddParameter("EWA_ACTION_KEY",a),"true"==c.getAttribute("ewa_wf_control")?
this._Ajax.AddParameter("EWA_WF_CTRL",1):this._Ajax.AddParameter("EWA_WF_CTRL",0)):this._Ajax.AddParameter("EWA_WF_CTRL",1);null!=d&&this._Ajax.AddParameter("EWA_ACTION_KEY",d);e&&this._Ajax.AddParameter("EWA_WF_UOK",e);f&&this._Ajax.AddParameter("EWA_WF_UMSG",f);var g=this;this._Ajax.PostNew(this.Url,function(){g._CallBackJs()})};this.GetRowKey=function(a){a=this.GetRow(a);return null!=a?a.getAttribute("EWA_KEY"):null};this.GetRow=function(a){if(null==a||null==a.tagName||""==a.tagName)return null;
var b=0;for(a=a.parentNode;"TR"!=a.tagName||null==a.getAttribute("EWA_KEY");){a=a.parentNode;if("BODY"==a.tagName){a=null;break}b++;if(100<b){alert("\u5faa\u73af100\u6b21\uff0c\u672a\u53d1\u73b0TR");break}}return a};this.RecordModify=function(a,b,c){var d=this.SelectChecked();if(0==d.length)EWA.UI.Msg.Alter("\u8bf7\u5148\u9009\u62e9","\u4fee\u6539");else{var e="EWA_MTYPE=M";null!=c&&0<c.trim().length&&(e+="&"+c);EWA.UI.Dialog.OpenReloadClose(this._Id,a,b,!1,e+d)}};this.RecordNew=function(a,b,c){var d=
"EWA_MTYPE=N";null!=c&&0<c.trim().length&&(d+="&"+c);EWA.UI.Dialog.OpenReloadClose(this._Id,a,b,!1,d)};this.SelectSingle=function(){this.IsTrSelect=!0;this._TrSelectMulti=!1};this.SelectMulti=function(){this._TrSelectMulti=this.IsTrSelect=!0};this.MOver=function(a,b){if(this.IsTrSelect&&this._CurTr!=a&&(null!=this._CurTr&&("1"!=this._CurTr.getAttribute("__ewa_lf_mdown")?this._MSetBg(this._CurTr,""):this._MSetBg(this._CurTr,"down")),"1"!=a.getAttribute("__ewa_lf_mdown")?this._MSetBg(a,"over"):this._MSetBg(a,
"down"),this._CurTr=a,this.MOverEvent))try{this.MOverEvent(a,b)}catch(c){console.log(c,this.MOverEvent)}};this.MOut=function(a){if(this.IsTrSelect&&null!=this._CurTr&&"1"!=this._CurTr.getAttribute("__ewa_lf_mdown")){this._MSetBg(this._CurTr,"out");if(this.MOutEvent)try{this.MOutEvent(this._CurTr,a)}catch(b){console.log(b,this.MOutEvent)}this._CurTr=null}};this.MDownEnableCheck=function(a,b){return!0};this.MDown=function(a,b){if(this.IsTrSelect&&(b=null==b?event:b,this.MDownEnableCheck(a))){if(b){var c=
b.srcElement?b.srcElement:b.target;if(c&&"A"==c.tagName)return}var d=(new Date).getTime(),e=$(a).attr("mdown_time_last");if(!(null!=e&&500>d-e)){$(a).attr("mdown_time_last",d);d=null;if(!this.IsNotMDownAutoChecked){var f=a.getElementsByTagName("input");if("INPUT"!=c.tagName&&0<f.length)for(c=0;c<f.length;c++)if("CHECKBOX"==f[c].type.toUpperCase()||"RADIO"==f[c].type.toUpperCase()){d=f[c];d.click();break}}if("1"==a.getAttribute("__ewa_lf_mdown"))this._TrSelectMulti&&(d&&"CHECKBOX"==d.type.toUpperCase()&&
(d.checked=!1),this._MSetBg(a,""),a.removeAttribute("__ewa_lf_mdown"),$(a).removeClass("ewa-lf-mdown"));else{d&&(d.checked=!0);this._MSetBg(a,"down");a.setAttribute("__ewa_lf_mdown",1);$(a).addClass("ewa-lf-mdown");if(!this._TrSelectMulti)for(d=a.parentNode,c=0;c<d.rows.length;c++)e=d.rows[c],"1"==e.getAttribute("__ewa_lf_mdown")&&e!=a&&(e.removeAttribute("__ewa_lf_mdown"),$(e).removeClass("ewa-lf-mdown"),this._MSetBg(e,""));if(this.IsReShow)for(c=0;c<f.length;c++)"BUTTON"==f[c].type.toUpperCase()&&
(d=f[c],"true"==d.getAttribute("disabled")||1==d.getAttribute("disabled")||"true"==d.parentNode.getAttribute("disabled")||1==d.parentNode.getAttribute("disabled")?(this._ReshowButs[d.value].disabled=!0,this._ReshowButs[d.value].style.display="none"):(this._ReshowButs[d.value].disabled=!1,this._ReshowButs[d.value].style.display=""))}if(this._IsAddPreRow){if(f=a.getAttribute("ewa_key"),this.AddPreRowCheck(a,f,b)){d=a.parentNode.rows[a.rowIndex+1];if(null==d||1!=d.getAttribute("add_pre_row"))d=a.parentNode.parentNode,
c=d.rows[0].cells.length,d=d.insertRow(a.rowIndex+1),d.setAttribute("add_pre_row",1),e=d.insertCell(-1),e.innerHTML="",e.colSpan=c,e.className="",d.style.display="none",e.id=("EWA_LF_NR_"+this._Id+"_"+Math.random()).replace(".","G"),$(d).addClass("ewa-lf-add-pre-row");this.prevTr&&(this.AddPreRowCloseBeforeEvent&&this.AddPreRowCloseBeforeEvent(this._Id,a,f,this.prevTr,b),this.prevTr.style.display="none",this.prevTr.cells[0].innerHTML="",this.AddPreRowCloseEvent&&this.AddPreRowCloseEvent(this._Id,
a,f,this.prevTr,b));this.prevTr==d?this.prevTr=null:(this.prevTr=d,this.prevTr.style.display="",this.MDownEvent(this._Id,a,f,this.prevTr,b))}}else this.MDownEvent(a,b)}}};this.AddPreRow=function(a){this._IsAddPreRow||(this.MDownEvent=a);this._IsAddPreRow=!0};this.AddPreRowCheck=function(a,b,c){return!0};this.AddPreRowCloseBeforeEvent=function(a,b,c,d,e){};this.AddPreRowCloseEvent=function(a,b,c,d,e){};this._MSetBg=function(a,b){var c="EWA_TD_M";"down"==b?c="ewa_grid_down":"over"==b&&(c="ewa_grid_mover");
for(b=0;b<a.cells.length;b++)$(a.cells[b]).removeClass("ewa_grid_mover ewa_grid_down EWA_TD_M").addClass(c)};this._ReShowSearchQuick=function(){var a=this,b=EWA_ListFrameClass.prototype.RESOURCES.search_text_items,c,d,e;for(e in b){var f=b[e];"eq"==f.Id&&(c=f);"lk"==f.Id&&(d=f)}for(e in this._SearchJson){var g=this._SearchJson[e];g.isSearchQuick&&(b=$("#EWA_LF_"+this.Id+' .ewa-lf-data-row [id="'+e+'"]'),b.bind("click",function(){var b=$(this).attr("search_tag"),e=$(this).text(),f=e,g=$("table#"+a.Id+
'_SEARCH_ITEM .ewa-lf-search-item-ctl [name="'+this.id.toUpperCase()+'"]');if("number"==b||"date"==b)g=g.parentsUntil(".ewa-lf-search-item").last().find("input");var n=g.parentsUntil(".ewa-lf-search-item").last().find("a");console.log(g);if("date"==b)e=e.split(" ")[0],f=e+" 23:59:59";else if("fix"==b){var q=null;g.find("option").each(function(){this.text==e&&(q=this.value)});e=null===q?"":q}console.log(e,f);g.val()==e?("text"==b&&d&&0<n.length&&(n.attr("tag",d.Id),n.html("enus"==EWA.LANG?d.TxtEn:
d.Txt)),g.val("")):("text"==b&&c&&0<n.length&&(n.attr("tag",c.Id),n.html("enus"==EWA.LANG?c.TxtEn:c.Txt)),g.val(e),"date"==b&&(g[1].value=f))}),b.each(function(){$(this).text()&&$(this).addClass("ewa-lf-search-text-click").attr("search_tag",g.T)}))}};this.ReShowWithNoButtons=function(){var a=$X("EWA_LF_"+this._Id),b=[],c;for(c in this.ItemList.Items){var d=this.ItemList.Items[c],e=this._GetSubValue("Tag","Tag",d);if(null!=e&&"button"==e.trim().toLowerCase())for(e=0;e<a.rows[0].cells.length;e++)if(a.rows[0].cells[e].childNodes[0].id.toUpperCase()==
c){b.push(e);d.setAttribute("but_show","1");break}}this.ShowHiddenColumns(b,!1)};this.ReShow=function(a){this.IsReShow=!0;a=document.createElement("table");a.id=this._Id+"_RESHOW";a.cellSpacing="0";a.cellPadding="0";var b=!(0<this.Url.toUpperCase().indexOf("EWA_AJAX=INSTALL")||0<this.Url.toUpperCase().indexOf("EWA_CALL_METHOD=INNER_CALL")||0<this.Url.toUpperCase().indexOf(".JSP"));b?EWA.UI.Utils.SetStyle(a,"width:100%;height:100%;"):EWA.UI.Utils.SetStyle(a,"width:100%");var c=a.insertRow(-1),d=c.insertCell(-1),
e=a.insertRow(-1).insertCell(-1);e.className="ewa_lf_func";e.innerHTML='<div style="display:none"></div><div></div>';var f=a.insertRow(-1).insertCell(-1);f.vAlign="top";EWA.UI.Utils.SetStyle(f,"width:100%;");css="";f.innerHTML='<div id="_G_'+this._Id+'" style="'+css+'"></div>';var g=$X("EWA_LF_"+this._Id),h=g.parentNode.parentNode.parentNode;f.childNodes[0].appendChild(g.parentNode);var k="_G_"+this._Id;this.NewDivId=k;b&&(window.setTimeout(function(){$X("__EWA_DEBUG")&&f.childNodes[0].appendChild($X("__EWA_DEBUG"));
var a=$X(k);a.getElementsByTagName("table");var b=EWA.UI.Utils.GetDocSize(window),c=a.parentNode.parentNode.previousSibling.offsetHeight;a.style.top=c+"px";a.style.height=b.H-c+"px"},100),addEvent(window,"resize",function(){var a=$X(k),b=EWA.UI.Utils.GetDocSize(window),c=a.parentNode.parentNode.previousSibling.offsetHeight;a.style.top=c+"px";a.style.height=b.H-c+"px"}));for(;0<h.childNodes.length;)e.childNodes[0].appendChild(h.childNodes[0]);var l=EWA.UI.Utils.CreateObject(window,"div","cursor:pointer",
e.childNodes[1]);l.className="ewa_lf_func_caption";b=l;var m=[],n=!1,q=GetInnerText(e);q=q.trim();this._ReshowButs={};for(var r in this.ItemList.Items){l=this.ItemList.Items[r];var p=this._GetSubValue("Tag","Tag",l);if(null!=p&&("button"==p.trim().toLowerCase()||"butflow"==p.trim().toLowerCase()))for(p=0;p<g.rows[0].cells.length;p++)if(g.rows[0].cells[p].childNodes[0].id.toUpperCase()==r){m.push(p);n=!0;p=this._GetSubValue("DescriptionSet","Info",l);var u=this._GetSubValue("DescriptionSet","Memo",
l),w=this._GetSubValue("EventSet","EventName",l),v="";null!=w&&"ewa_click"==w.toLowerCase().trim()&&(v=this._GetSubValue("EventSet","EventValue",l));q=q.replace(p,"");l=this._ReShowButton(p,u,null);this._ReshowButs[p]=l;l.setAttribute("f_id",this._Id);e.childNodes[1].appendChild(l);""==v?l.onclick=function(){var a=this.getAttribute("f_id");a=EWA.F.FOS[a].SelectCheckedRows();if(null==a||0==a.length)EWA.UI.Msg.Alert(_EWA_INFO_MSG["EWA.SYS.CHOOSE_ITEM"],_EWA_INFO_MSG["EWA.SYS.CHOOSE_ITEM_TITLE"]);else{a=
a[0].getElementsByTagName("input");for(var b=0;b<a.length;b++){var c=a[b];if("button"==c.type&&c.value==this.childNodes[0].innerHTML){c.click();break}}}}:(l.setAttribute("ewa_click",v),l.onclick=function(){eval(this.getAttribute("ewa_click"))});break}}n&&this._ReShowSplit(e.childNodes[1]);m=e.getElementsByTagName("input");g={};for(p=0;p<m.length;p++){var t=m[p];t.style.display="none";if(null==t.id||""==t.id)t.id=("_tmp_"+Math.random()).replace(".","_");if("button"==t.type){if(l=this._ReShowButton(t.value,
t.title,t.id),n=t.nextSibling){var x="";3==n.nodeType&&(x=n.nodeValue.trimEx());"|"==x&&this._ReShowSplit(e.childNodes[1])}}else(n=t.nextSibling)&&(x=3==n.nodeType?n.nodeValue.replace("|",""):n.innerHTML),l=this._ReShowButton(x.trimEx(),t.title,t.id),l.id=("_tmp_"+Math.random()).replace(".","_"),g[t.name]||(g[t.name]=[]),g[t.name].push(l.id);e.childNodes[1].appendChild(l)}q=q.replace(/ /ig,"").replace(/\|/ig,"").trimEx();""!=q?0<=q.indexOf("if")?c.style.display="none":d.innerHTML=q.replace(/ /,""):
c.style.display="none";h.appendChild(a);for(r in g)for(x=g[r],p=0;p<x.length;p++)t=$X(x[p]),t.setAttribute("_r_ids",x.join(",")),t.onclick=function(){var a=this.getAttribute("_ewa_event_id");$X(a).click();a=this.getAttribute("_r_ids").split(",");for(var b=0;b<a.length;b++)t.id!=a[b]&&($X(a[b]).style.fontWeight="",$X(a[b]).style.color="");this.style.fontWeight="bold";this.style.color="blue"};b.innerHTML='<b>[<i class="fa fa-star-o"></i>&nbsp;'+this.Description+"]</b>"};this._ReShowSplit=function(a){EWA.UI.Utils.CreateObject(window,
"div","",a).className="ewa_lf_func_split"};this._ReShowButton=function(a,b,c){var d=EWA.UI.Utils.CreateObject(window,"div","cursor:pointer",document.body);d.innerHTML="<nobr>"+a+"</nobr>";null!=c&&(d.setAttribute("_ewa_event_id",c),d.onclick=function(){var a=this.getAttribute("_ewa_event_id");$X(a).click()});EWA.B.IE&&(d.onselectstart=function(){return!1});d.className="ewa_lf_func_dact";d.title=b;return d};this.CheckValid=function(a){var b=a.tagName.toLowerCase();if("span"==b||"img"==b||"div"==b)return!0;
b=this.ItemList.GetObjectValue(a);return this.ItemList.CheckValid(a,b)};this.ShowEdit=function(a){a.parentNode.style.width=a.clientWidth+"px";a.style.display="none";__show_obj__=a.nextSibling;__show_obj__.style.display="";var b=__show_obj__.childNodes[0];3==b.nodeType&&(b=__show_obj__.childNodes[1]);b.setAttribute("old",b.value);"SELECT"!=b.tagName||b.getAttribute("func")||(b.setAttribute("func",1),b.onchange=function(){EWA.F.FOS[this.getAttribute("__ewa_fid__")].EditAfter(this)});null==b.getAttribute("__ewa_fid__")&&
(b.setAttribute("__ewa_fid__",this._Id),b.onblur=function(){EWA.F.FOS[this.getAttribute("__ewa_fid__")].EditAfter(this)},b.onkeydown=function(a){a=null==a?window.event:a;var b=a.target?a.target:a.srcElement;13==a.keyCode&&"INPUT"==b.tagName&&EWA.F.FOS[this.getAttribute("__ewa_fid__")].EditAfter(this);27==a.keyCode&&EWA.F.FOS[this.getAttribute("__ewa_fid__")].EditReset(this)});setTimeout(function(){b.focus()},10)};this.EditReset=function(a){a.parentNode.style.display="none";var b=a.parentNode.previousSibling;
b.style.display="";b.innerHTML=a.getAttribute("old");"select"==a.tagName.toLowerCase()?b.innerHTML=a.options[a.selectedIndex].text:a.value=a.getAttribute("old").replace(/</ig,"&lt;").replace(/>/ig,"&gt;")};this.EditAfter=function(a){if(this.CheckValid(a))if(a.getAttribute("old")==a.value)this.EditReset(a);else{a.parentNode.style.display="none";var b=a.parentNode.previousSibling;b.style.display="";if("droplist"==a.getAttribute("ewa_class")){var c=a.parentNode.getElementsByTagName("input")[1].id;var d=
a.parentNode.getElementsByTagName("input")[1].value;b.innerHTML=a.parentNode.getElementsByTagName("input")[0].value}else"select"==a.tagName.toLowerCase()?(c=a.id,b.innerHTML=a.options[a.selectedIndex].text):(c=a.value.replace(/</ig,"&lt;").replace(/>/ig,"&gt;").replace(/\n/ig,"<br>"),b.innerHTML=c,c=a.id),d=a.value;b=a.getAttribute("action_name");if(""==b||null==b)b="OnListFrameUpdateCell";var e=a.getAttribute("action_confirm");e=null==e?"":e;var f=a.getAttribute("action_tip");null==f&&(f="");var g=
a.getAttribute("action_js"),h=[];h[0]={Name:"EWA_FIELD_ID",Value:c};h[1]={Name:"EWA_FIELD_VAL",Value:d};h[2]={Name:"EWA_ACTION_RELOAD",Value:"0"};h[3]={Name:a.id,Value:a.value};c=this.ItemList.GetValue(a.id,"DataItem","DataType");h[4]={Name:"EWA_DATA_TYPE",Value:c};h[5]={Name:"EWA_FIELD_VAL_OLD",Value:a.getAttribute("old")};this.EditEvent={FROM:a,OLD_VAL:a.getAttribute("old"),NEW_VAL:a.value};this.DoAction(a,b,e,f,h,g)}else a.focus()};this.RewriteInfo=function(a,b,c,d){$X("EWA_LF_"+this._Id);null==
this._INFO&&(this._INFO={},this._INFO.INFO=a,this._INFO.ID_NAME=b,this._INFO.INFO_NAME=c,this._INFO.INFO_MEMO=d);if(null!=this._INFO.INFO)for(a=0;a<this._INFO.INFO.length;a++)if(b=this._INFO.INFO[a],c=b[this._INFO.ID_NAME],$X(c))if(null==b[this._INFO.INFO_NAME]||""==b[this._INFO.INFO_NAME].trim())for(b="TD"==$X(c).parentNode.tagName?$X(c).parentNode:$X(c).parentNode.parentNode,c=0;c<b.parentNode.cells.length;c++)b.parentNode.cells[c]==b&&this.ShowHiddenColumn(c,!1);else $X(c).innerHTML=b[this._INFO.INFO_NAME]};
this.ShowHiddenColumn=function(a,b){var c=$X("EWA_LF_"+this._Id),d="";if(null==b||0==b||"none"==b)d="none";for(b=0;b<c.rows.length;b++)c.rows[b].cells.length==c.rows[0].cells.length&&(c.rows[b].cells[a].style.display=d)};this.ShowHiddenColumns=function(a,b){var c=$X("EWA_LF_"+this._Id),d="";if(null==b||0==b||"none"==b)d="none";b=c.rows[0].cells.length;for(var e=0;e<c.rows.length;e++){var f=c.rows[e];if(f.cells.length==b)for(var g=0;g<a.length;g++)f.cells[a[g]].style.display=d}};this.GroupShowHidden=
function(a){var b=$(a).attr("t"),c=(new Date).getTime();if(!(b&&333>c-b)){$(a).attr("t",c);b=a.parentNode.parentNode;c=b.getAttribute("ewa_group");""==c?(c="none",a.childNodes[0].innerHTML=" + "):(c="",a.childNodes[0].innerHTML=" - ");b.setAttribute("ewa_group",c);for(var d=b.parentNode.parentNode,e=0,f=b.rowIndex+1;f<d.rows.length;f++){b=d.rows[f];if("group"==b.getAttribute("ewa_tag"))break;b.style.display=c;e++}a.childNodes[a.childNodes.length-1].innerHTML=" ("+e+")"}};this.Sort=function(a){var b=
this._last_sort_timer||0,c=this._Sort||"",d=(new Date).getTime();c==a&&500>d-b||(this._last_sort_timer=d,this._Sort=a,this.Goto(1))};this.SearchClear=function(a){a=a.parentNode.parentNode.parentNode.parentNode;for(var b=0;b<a.rows.length;b+=1)for(var c=a.rows[b].getElementsByTagName("input"),d=0;d<c.length;d++){var e=c[d];if("text"==e.type)e.value="";else if("radio"==e.type||"checkbox"==e.type)e.checked=!1}};this.SearchGetExp=function(a){var b=[];$(a).find(".ewa-lf-search-item").each(function(){var a=
$(this).find("input");if(0==a.length&&(a=$(this).find("select"),0==a.length))return;var d=a[0],e=$(d).attr("t");if(1==a.length){var f=d.value;""!=d.value.trim()&&("text"==e&&(a=$(d.parentNode.parentNode).find("a").attr("tag"))&&(e=a),b.push("@!@"+d.name+"~!~"+e+"~!~"+f))}else if(("date"==e||"number"==e)&&2==a.length)f=d.value,a=a[1].value,""==a&&""==f||b.push("@!@"+d.name+"~!~"+e+"~!~"+f+"~!~"+a);else if("fix"==e&&"INPUT"==d.tagName){var g=[""];$(this).find("input").each(function(){this.checked&&
g.push(this.value)});1!=g.length&&b.push("@!@"+d.name+"~!~"+e+g.join("~!~"))}});return b.join("")};this.DoSearch=function(a){var b=!1;a.id==this.Id+"_SEARCH_ITEM"?a=$X(this.Id+"_SEARCH_ITEM").childNodes[0]:(a=a.parentNode.parentNode.parentNode.parentNode,b=!0);this._SearchExp=this.SearchGetExp(a);b&&(this._SearchHtml=a.parentNode.innerHTML,this._SearchDialog.Show(!1));this.Goto(1)};this.Search=function(a){null==this._SearchHtml?(this._SearchCreate(),this._SearchDialog=new EWA.UI.Dialog.OpenWindow("about:blank",
"aa",400,100,!0,null,null,!1),this._SearchDialog.SetCaption(_EWA_INFO_MSG["EWA.LF.SEARCH.BUT.TITLE"]),this._SearchDialog._Dialog.AutoSize=!0,this._SearchDialog._Dialog.SetHtml(this._SearchHtml),this._SearchDialog._Dialog.Show(!0),this._SearchDialog._Dialog.GetFrame().focus(),this._SearchDialog.MoveCenter()):(this._SearchDialog._Dialog.AutoSize=!1,this._SearchDialog.Show(!0))};this.ShowSearch=function(){$X(this.Id+"_SEARCH_ITEM")||this._SearchCreateItm();this._ReShowSearchQuick()};this.ChangeSearchTextType=
function(a){this._MENU_DATE_RANGE&&this._MENU_DATE_RANGE.HiddenMemu();this._MENU_TEXT_TYPE.ShowByObject(a,null,0)};this.ChangeSearchDateType=function(a){this._MENU_TEXT_TYPE&&this._MENU_TEXT_TYPE.HiddenMemu();this._MENU_DATE_RANGE.ShowByObject(a,null,0)};this.ChangeSearchTextTypeIt=function(a){var b=$(this._MENU_TEXT_TYPE.SHOW_BY_OBJECT).parentsUntil(".ewa-lf-search-item").last(),c=$J2MAP(this.RESOURCES.search_text_items,"Id")[a];c="enus"==EWA.LANG?c.TxtEn:c.Txt;b.find("a").attr("tag",a).html(c)};
this._GetInitSearchMap=function(){var a=new EWA_UrlClass(this.Url),b={},c=a.GetParameter("ewa_search");if(!c)return b;this.Url=a.RemoveParameter("ewa_search");c=c.unURL();a=c.split(",");for(var d in a){var e=a[d],f=e.indexOf("["),g=e.indexOf("]");0>f||g<f||(c=e.substring(0,f).trim(),0!=c.length&&(f=e.substring(f+1,g).trim().toLowerCase(),0!=f.length&&(e=e.substring(g+1).trim(),""!=e&&(b[c.toUpperCase()]||(b[c.toUpperCase()]={name:c,tag:f}),c=b[c.toUpperCase()],"lt"==f||"lte"==f?c.para2=e.unURL():
c.para1=e.unURL()))))}return b};this.SearchFilterDate=function(a){var b=$(this._MENU_DATE_RANGE.SHOW_BY_OBJECT).parentsUntil(".ewa-lf-search-item").last(),c=b.find("input")[0];b=b.find("input")[1];if("Clear"==a)$(c).val(""),$(b).val("");else{var d=EWA_Utils.Date(),e="",f="";"Today"==a?f=e=d.GetDateString():"Week"==a?(a=d.GetBenWeek(),e=a[0],f=a[1]):"Today-Weekend"==a?(a=d.GetBenWeek(),e=a[d.GetDateString()],f=a[1]):"Month"==a?(a=d.GetBenMonth(),e=a[0],f=a[1]):"Today-EOM"==a?(a=d.GetBenMonth(),e=a[d.GetDateString()],
f=a[1]):"Quarter"==a?(a=d.GetBenQ(),e=a[0],f=a[1]):"Today-EOQ"==a?(a=d.GetBenQ(),e=a[d.GetDateString()],f=a[1]):"Year"==a?(a=d.GetBenYear(),e=a[0],f=a[1]):"Today-EOY"==a&&(a=d.GetBenYear(),e=a[d.GetDateString()],f=a[1]);a=EWA_Utils.Date(e).FormatDate();d=EWA_Utils.Date(f).FormatDate();d+=" 23:59:59";$(c).val(a);$(b).val(d)}};this._SearchCreateDateRange=function(){var a="_MENU_DATE_RANGE"+this._Id;$("."+a).remove();var b="enus"==EWA.LANG.toLowerCase()?"TxtEn":"Txt",c=JSON.parse(JSON.stringify(this.RESOURCES.search_date_items)),
d="EWA.F.FOS[&quot;"+this._Id+"&quot;].SearchFilterDate",e;for(e in c){var f=c[e];f.Txt=f[b];f.Cmd=d+"(&quot;"+f.Id+"&quot;)"}b="EWA.F.FOS[&quot;"+this._Id+"&quot;]._MENU_DATE_RANGE";this._MENU_DATE_RANGE=new EWA_UI_MenuClass(b);this._MENU_DATE_RANGE.Create(c);$(this._MENU_DATE_RANGE.Dialog.GetFrame()).addClass("ewa-lf-search-menu "+a);return b};this._SearchCreateTextType=function(){var a="_MENU_TEXT_TYPE"+this._Id;$("."+a).remove();var b="enus"==EWA.LANG.toLowerCase()?"TxtEn":"Txt",c=JSON.parse(JSON.stringify(this.RESOURCES.search_text_items)),
d="EWA.F.FOS[&quot;"+this._Id+"&quot;].ChangeSearchTextTypeIt",e;for(e in c){var f=c[e];f.Txt=f[b];f.Cmd=d+"(&quot;"+f.Id+"&quot;)"}b="EWA.F.FOS[&quot;"+this._Id+"&quot;]._MENU_TEXT_TYPE";this._MENU_TEXT_TYPE=new EWA_UI_MenuClass(b);this._MENU_TEXT_TYPE.Create(c);$(this._MENU_TEXT_TYPE.Dialog.GetFrame()).addClass("ewa-lf-search-menu "+a);return b};this._SearchCreateItm=function(){var a=this.Id+"_SEARCH_ITEM",b=[],c=[],d=[],e={},f;for(f in this._SearchJson)this._SearchJson[f].ORI_NAME=f,e[f.toUpperCase()]=
this._SearchJson[f];this._SearchJson=e;var g="EWA.F.FOS[&quot;"+this._Id+"&quot;].ChangeSearchTextType(this)",h="EWA.F.FOS[&quot;"+this._Id+"&quot;].ChangeSearchDateType(this)",k=$J2MAP(this.RESOURCES.search_text_items,"Id");e=this._GetInitSearchMap();var l=!1,m=!1;for(f in this.ItemList.Items)if(null!=this._SearchJson[f]){var n=[],q=this._SearchJson[f],r=q.T,p=this._GetSubValue("DescriptionSet","Info",this.ItemList.Items[f]);n.push("<table class='ewa-lf-search-item ewa-ref-"+f+" ewa-lf-search-type-"+
r+"' cellspacing=0 cellpadding=0>");n.push("<tr><td class='ewa-lf-search-item-title' style='position:relative'><nobr><b>");n.push(p);var u=p="",w="lk";e[f.toUpperCase()]&&(u=e[f.toUpperCase()],w=u.tag,p=u.para1,u=u.para2);"text"==r?(m=k[w]||k.lk,m="enus"==EWA.LANG?m.TxtEn:m.Txt,n.push("<a class='ewa-lf-search-type' tag='"+w+"' href='javascript:void(0)' onclick='"+g+"'>"),n.push(m),n.push("</a>"),m=!0):"date"==r&&(n.push("<a  href='javascript:void(0)' class='fa fa-calendar-check-o'  onclick='"+h+"'></a>"),
l=!0);n.push(": </b></nobr></td><td class='ewa-lf-search-item-ctl'>");"text"==r?n.push(this._SearchSingle(f,p)):"date"==r?n.push(this._SearchDate(f,p,u)):"number"==r?n.push(this._SearchNumber(f,p,u)):"fix"==r&&(q="<div >"+this._SearchFix(f,q,"span",p)+"</div>",n.push(q));n.push("</td></tr></table>");"fix"==r?c.push(n.join("")):d.push(n.join(""))}if(0!=d.length+c.length){b.push('<table class="ewa-lf-search-main" id="'+a+'" cellspacing="0" cellpadding="0" style="width:100%">');b.push("<tr><td class='ewa-lf-search-des'></td><td>");
0<d.length&&b.push(" "+d.join("")+" ");if(0<c.length)for(d=0;d<c.length;d++)b.push(" "+c[d]+" ");b.push("</td></tr></table>");var v=document.createElement("div");this._SEARCH_BOX=v;v.className="ewa-lf-search";v.innerHTML=b.join("");b=$X("EWA_LF_"+this.Id).parentNode;b.parentNode.insertBefore(v,b);a=this.Id+"_SEARCH_ITEM";var t=this;l&&this._SearchCreateDateRange();m&&this._SearchCreateTextType();t._SEARCH_ITEM_EXP=this.SearchGetExp(v);"{}"!=JSON.stringify(e)&&(t._SearchExp=t._SEARCH_ITEM_EXP);this._TIMER_SEARCH=
window.setInterval(function(){try{if(!$X(a)){window.clearInterval(t._TIMER_SEARCH);return}}catch(y){window.clearInterval(t._TIMER_SEARCH);return}var b=t.SearchGetExp(v);b!=t._SEARCH_ITEM_EXP&&(t._SEARCH_ITEM_EXP=b,t.DoSearch($X(a)))},700)}};this._SearchSingle=function(a,b){var c=[];c.push('<input t="text" type="text" autocomplete="off" class="EWA_INPUT" maxlength="40" name="');c.push(a.toInputValue());c.push('"');null!=b&&(c.push(' value="'),a=b.toInputValue(),c.push(a),c.push('" '));c.push(" />");
return c.join("")};this._SearchDate=function(a,b,c){var d=[];d.push("<table border=0 cellpadding=0 cellspacing=0>");d.push('<td  ><input type="text" autocomplete="off" class="EWA_INPUT" t="date" readonly maxlength="8" onclick="EWA.UI.Calendar.Pop(this)" name="');d.push(a);d.push('"');b&&(b=b.toInputValue(),d.push(' value="'),d.push(b),d.push('"'));d.push(" /></td><td> - </td>");d.push('<td  ><input type="text" autocomplete="off" class="EWA_INPUT" t="date" readonly maxlength="8" onclick="EWA.UI.Calendar.Pop(this)" name="');
d.push(a);d.push('1"');c&&(b=c.toInputValue(),d.push(' value="'),d.push(b),d.push('"'));d.push("/></td></tr></table>");return d.join("")};this._SearchNumber=function(a,b,c){var d=[];d.push('<input type="text" t="number" size="10" name="');d.push(a);d.push('"');b&&(b*=1,d.push(' value="'),d.push(b),d.push('"'));d.push(" /> - ");d.push('<input type="text" t="number" size="10" name="');d.push(a);d.push('1"');c&&(b=1*c,d.push(' value="'),d.push(b),d.push('"'));d.push("/>");return d.join("")};this._SearchFix=
function(a,b,c,d){var e=[],f="radio";if("1"==b.M)f="checkbox";else if("2"==b.M)return this._SearchFix1(a,b,c,d);c="<"+c+"><nobr><input t='fix' [@CHK] id='@ID' value=\"@V\" type='"+f+"' name='"+a+"' /><label for='@ID'>@T</label></nobr></"+c+"> ";f={};if(d){d=d.split(";");for(var g in d)f[d[g].trim().toUpperCase()]=1}for(g=0;g<b.D.length;g++){var h=b.D[g];d=h[0];h=h[1];var k=this.Id+"_"+a+"_SearchFix_"+g,l=c.replace("@ID",k);l=l.replace("@ID",k);l=l.replace("@V",d);l=f[d.toUpperCase().trim()]?l.replace("[@CHK]",
"checked"):l.replace("[@CHK]","");l=l.replace("@T",h);e.push(l)}return e.join("")};this._SearchFix1=function(a,b,c,d){c=[];c.push("<select t='fix' name='"+a+"'><option></option>");for(var e=0;e<b.D.length;e++){var f=b.D[e],g="<option @CKD t='fix' id='@ID' value=\"@V\">@T</option> ".replace("@ID",this.Id+"_"+a+"_SearchFix_"+e);g=g.replace("@V",f[0]);g=g.replace("@T",f[1]);g=d&&f[0]==d?g.replace("@CKD","selected"):g.replace("@CKD","");c.push(g)}c.push("</select>");return c.join("")};this._SearchCreate=
function(){var a=[];a.push("<div><table border=0 style='margin:0px;' class=EWA_TABLE cellspacing=1>");for(var b in this.ItemList.Items)if(null!=this._SearchJson[b]){var c=this._SearchJson[b],d=c.T,e=this._GetSubValue("DescriptionSet","Info",this.ItemList.Items[b]);a.push("<tr><td class=EWA_TD_L width=140><nobr>"+e+"<nobr></td><td width=350 class=EWA_TD_M>");"text"==d?a.push(this._SearchSingle(b)):"date"==d?a.push(this._SearchDate(b)):"number"==d?a.push(this._SearchNumber(b)):"fix"==d&&a.push(this._SearchFix(b,
c,"div"));a.push("</td></tr>")}a.push("<tr><td class=EWA_TD_B colspan=2 align=right><input onclick='EWA.F.FOS[\""+this._Id+"\"].SearchClear(this);' type=button value='"+_EWA_INFO_MSG["EWA.LF.SEARCH.BUT.CLEAR"]+"'> <input type=submit value='"+_EWA_INFO_MSG["EWA.LF.SEARCH.BUT.SEARCH"]+"' onclick='EWA.F.FOS[\""+this._Id+"\"].DoSearch(this);'> <input type=button value='"+_EWA_INFO_MSG["EWA.LF.SEARCH.BUT.CLOSE"]+"' onclick='EWA.F.FOS[\""+this.Id+"\"]._SearchDialog.Show(false);'></td></tr>");a.push("</table></div>");
this._SearchHtml=a.join("")};this.SearchMark=function(){for(var a=this._SearchExp.split("@!@"),b=$X("EWA_LF_"+this._Id),c=0;c<a.length;c+=1){var d=a[c].split("~!~");if(!(3>d.length))for(var e=2;e<d.length;e++){var f=d[e];if(""!=f){if("fix"==d[1]){var g=d[0],h=d[2];$("table#"+this.Id+'_SEARCH_ITEM [name="'+g+'"]').find("option").each(function(){this.value==h&&(f=this.text)})}g=[];for(var k=0;k<f.length;k++){var l=f[k];"a"<=l&&"z">=l||"A"<=l&&"Z">=l||"0"<=l&&"9">=l?g.push(l):g.push("\\"+l)}f=g.join("");
g=d[0];this._SearchJson[g]&&(g=this._SearchJson[g].ORI_NAME);try{f=eval("/("+f+")/ig"),$(b).find('.EWA_TD_M [id="'+g+'"]').each(function(){0==this.children.length&&(this.innerHTML=this.innerHTML.replace(f,"<font color=red><b>$1</b></font>"))})}catch(m){console.log(m)}}}}};this.DblClick=function(a){this._IsDblClick=a;for(var b=$X("EWA_LF_"+this._Id),c=1;c<b.rows.length;c++)b.rows[c].ondblclick=function(){var b=this.getElementsByTagName("input");b.length>a&&0==b[a].disabled&&b[a].click()}};this.Init=
function(a){this.Xml=new EWA.C.Xml;this.Xml.LoadXml(a);this.ItemList.Init(this.Xml);this.Resources=new EWA_FrameResoures;this.Resources.Init(this.Xml);if((a=$X("EWA_LF_"+this._Id))&&"table"==a.tagName&&!(1>=a.rows.length)){a=a.rows[1].getElementsByTagName("input");for(var b=0;b<a.length;b++)if("RADIO"==a[b].type.toUpperCase()){this._TrSelectMulti=!1;break}}};this.SetPageParameters=function(a,b,c,d,e){this._PageCurrent=a;this._PageSize=c;this._PageCount=b;this._RecordCount=d;this._Sort=e};this.SetPageParametersName=
function(a,b,c,d,e){this._PageCurrentName=a;this._PageSizeName=c;this._PageCountName=b;this._RecordCountName=d;this._SortName=e};this.CheckedAll=function(){var a=document.getElementById("EWA_LF_"+this._Id);if(!(1>=a.rows.length)){for(var b=0;b<a.rows.length;b+=1){var c=a.rows[b].getElementsByTagName("input");0!=c.length&&(c[0].checked=this._IsCheckedAll)}this._IsCheckedAll=this._IsCheckedAll?!1:!0;this.CheckedAllAfter&&this.CheckedAllAfter(a)}};this.SelectChecked=function(){var a=$X("EWA_LF_"+this._Id);
if(!a||1>a.rows.length)return"";var b=[],c=$F(a,"input","type","radio,checkbox");if(0<c.length)for(var d=0;d<c.length;d++)c[d].checked&&b.push(c[d].value);else for(d=0;d<a.rows.length;d++)c=a.rows[d],1==c.getAttribute("__ewa_lf_mdown")&&b.push(c.getAttribute("EWA_KEY"));return b.join(",")};this.SelectCheckedInputs=function(){var a=[],b=$X("EWA_LF_"+this._Id);if(1>b.rows.length)return a;b=b.getElementsByTagName("input");a=[];for(var c=0;c<b.length;c++)("CHECKBOX"==b[c].type.toUpperCase()||"RADIO"==
b[c].type.toUpperCase())&&b[c].checked&&a.push(b[c]);return a};this.SelectCheckedRows=function(){for(var a=[],b=$X("EWA_LF_"+this._Id),c=0;c<b.rows.length;c++){var d=b.rows[c],e=d.getElementsByTagName("input");0!=e.length&&e[0].checked&&a.push(d)}if(0==a.length)for(c=0;c<b.rows.length;c++)d=b.rows[c],1==d.getAttribute("__ewa_lf_mdown")&&a.push(d);return a};this.Reload=function(){this.StopAjaxAfterReload?this.StopAjaxAfterReload=!1:this.Goto(this._PageCurrent)};this.DoAction=function(a,b,c,d,e,f){EWA.F.CID=
this._Id;if(b){if(a&&$(a).parent().hasClass("scroll-delete")){var g=$(a).attr("do-action-time")||0,h=(new Date).getTime();if(1E3>h-g)return;$(a).attr("do-action-time",h)}this._Ajax=new EWA.C.Ajax;this._Ajax.LoadingType="image";this._Ajax.AddParameter("EWA_AJAX","1");this._Ajax.AddParameter("EWA_ACTION",b);this._Ajax.AddParameter("EWA_ID",this._Id);this._Ajax.AddParameter("EWA_NO_CONTENT","1");this._Ajax.AddParameter("EWA_ACTION_TIP",d);null!=f&&0<f.trim().length?(this._Ajax.AddParameter("EWA_AFTER_EVENT",
f),this.StopAjaxAfterReload=!0,this._Ajax.AddParameter("EWA_ACTION_RELOAD","0")):this.StopAjaxAfterReload=!1;if(a&&a.getAttribute&&"yes"==a.getAttribute("box_menu_item")){if(this._Ajax.AddParameter("___CALL__FROM__","box"),a=a.parentNode)a=a.getAttribute("json_ref"),a=JSON.parse(a),a.EWA_KEY&&this._Ajax.AddParameter("EWA_ACTION_KEY",a.EWA_KEY)}else(a=this.GetRowKey(a))&&this._Ajax.AddParameter("EWA_ACTION_KEY",a);a=this.SelectChecked();this._Ajax.AddParameter("IDS_SPLIT",a);if(null!=e&&0<e.length)for(a=
0;a<e.length;a+=1)this._Ajax.AddParameter(e[a].Name,e[a].Value);e=new EWA.C.Url;e.SetUrl(this.Url);var k=e.RemoveParameter("EWA_ACTION"),l=this;c?((e=_EWA_INFO_MSG[c])||(e=c),$Confirm(e,"Confirm",function(){l._Ajax.PostNew(k,function(){l._CallBackJs()})})):this._Ajax.PostNew(k,function(){l._CallBackJs()})}};this.NewPageSize=function(a){this._PageSize!=a&&(this._PageSize=a,this.Goto(1))};this.Goto=function(a){EWA.F.CID=this._Id;this._PageCurrent=a;this._Ajax=this.CreateAjax();a=new EWA_UrlClass;a.SetUrl(null==
this.Url?document.location.href:this.Url);a.RemoveParameter("EWA_AJAX");var b=this;this._Ajax.PostNew(a.GetUrl(),function(){b._CallBack()})};this.CreateAjax=function(){var a=new EWA.C.Ajax;a.LoadingType="image";a.AddParameter(this._PageCurrentName,this._PageCurrent);a.AddParameter(this._PageSizeName,this._PageSize);null!=this._Sort&&a.AddParameter(this._SortName,this._Sort);null!=this._SearchExp&&""!=this._SearchExp&&a.AddParameter("EWA_LF_SEARCH",this._SearchExp);a.AddParameter("EWA_AJAX","LF_RELOAD");
if(null!=this.GotoParas&&0<this.GotoParas.length)for(var b=0;b<this.GotoParas.length;b+=1)a.AddParameter(this.GotoParas[b].Name,this.GotoParas[b].Value);return a};this.DownlodData=function(a,b){EWA.F.CID=this._Id;this._Ajax=new EWA.C.Ajax;this._Ajax.LoadingType="image";null!=this._Sort&&this._Ajax.AddParameter(this._SortName,this._Sort);null!=this._SearchExp&&""!=this._SearchExp&&this._Ajax.AddParameter("EWA_LF_SEARCH",this._SearchExp);this._Ajax.AddParameter("EWA_AJAX","DOWN_DATA");this._Ajax.AddParameter("EWA_AJAX_DOWN_TYPE",
a);b&&this._Ajax.AddParameter("EWA_ACTION",b);if(null!=this.GotoParas&&0<this.GotoParas.length)for(a=0;a<this.GotoParas.length;a+=1)this._Ajax.AddParameter(this.GotoParas[a].Name,this.GotoParas[a].Value);this._AjaxType="DOWN_DATA";a=new EWA_UrlClass;a.SetUrl(null==this.Url?document.location.href:this.Url);var c=this;this._Ajax.PostNew(a.GetUrl(),function(){c._CallBack()})};this.Get=function(a){EWA.F.CID=this._Id;this._Ajax=new EWA.C.Ajax;this._Ajax.LoadingType="image";var b=this;this._Ajax.Get(a,
function(){b._CallBack()})};this.Post=function(a,b){EWA.F.CID=this._Id;this._Ajax=new EWA.C.Ajax;this._Ajax.LoadingType="image";var c=this;this._Ajax.Post(a,b,function(){c._CallBackJs()})};this._CallBack=function(){var a=this._Ajax;if(4==a._Http.readyState){a.HiddenWaitting();if(top.EWA&&top.EWA.MQE){var b=new EWA_MqeClass;b.Data=a.GetRst();b.FromId=EWA.F.CID;b.Type="POST";top.EWA.MQE.AddMqe(b)}200==a._Http.status?(a=a._Http.responseText,EWA.F.CheckCallBack(a)&&("DOWN_DATA"==this._AjaxType?(this._AjaxType=
null,"DENY"==a.trim()?alert(_EWA_INFO_MSG["EWA.LF.DOWN_DATA.DENY"]):window.location.href=a.trim()):(b=$X("EWA_LF_"+this._Id).parentNode,$(b).replaceWith(a),this.SearchMark(),this.IsReShow&&this.ReShowWithNoButtons(),this._ReShowSearchQuick(),null!=this._IsDblClick&&this.DblClick(this._IsDblClick),this._IsAddPreRow&&this.AddPreRow(),this.SubBottomsArray&&this._SubBottoms(),this.ReloadAfter&&this.ReloadAfter(),this.ReloadAfterApp&&this.ReloadAfterApp()))):alert("ERROR:\r\n"+a._Http.statusText);this.RewriteInfo()}};
this._CallBackJs=function(){var a=this._Ajax;if(4==a._Http.readyState){if(top.EWA&&top.EWA.MQE){var b=new EWA_MqeClass;b.Data=a.GetRst();b.FromId=EWA.F.CID;b.Type="POST";top.EWA.MQE.AddMqe(b)}a.HiddenWaitting();200==a._Http.status?(a=a._Http.responseText,EWA.F.CheckCallBack(a)&&eval(a)):alert("ERROR:\r\n"+a._Http.statusText);this.EditAfterEvent&&this.EditAfterEvent()}};this.EditAfterEvent=function(){};this._GetItem=function(a){for(var b=this.ItemList,c=0;c<b.length;c+=1){var d=b[c],e=this._GetSubItem("Name",
d);if(this.Xml.GetElementAttribute(e,"Name")==a)return d}};this._GetSubItem=function(a,b){b=this.Xml.GetElements(a+"/Set",b);if(null==b||0==b.length)return null;if("DescriptionSet"==a)for(a=0;a<b.length;a+=1){var c=b[a].getAttribute("Lang");if(null!=c&&c.trim().toUpperCase()==EWA.LANG.trim().toUpperCase())return b[a]}return b[0]};this._GetSubValue=function(a,b,c){a=this._GetSubItem(a,c);return null==a?null:this.Xml.GetElementAttribute(a,b)};this.AddColumns=function(a,b,c,d,e,f,g,h){var k=$X("EWA_LF_"+
this._Id);null==h&&(h=k.rows[0].cells.length);for(var l=0;l<a.length;l++)for(var m=a[l],n=h+l,q=0;q<k.rows.length;q++){var r=k.rows[q].insertCell(n);if(0==q)r.className="EWA_TD_H",r.innerHTML='<nobr cellIdx="'+n+'" id="'+m[b]+'">'+m[c]+"</nobr>",r.title=m[d],r.width=100;else{var p=k.rows[q].getAttribute("EWA_KEY");r.className="EWA_TD_M";p=p+"_"+m[b];var u=this._GetAddControl(m[f]);null==u&&(u=e);var w=g.replace("[ID]",m[b]);u=0<=u.indexOf("<select")?u.replace("!!",w.replace("onblur=","onchange=")):
u.replace("!!",w);r.innerHTML=u;r.childNodes[0].id=p}}};this._GetAddControl=function(a){if(null==a)return null;a=a.toUpperCase().trim();return"SELECT"==a?"<select !!></select>":"DATE"==a?'<input type=text class=EWA_INPUT onclick="EWA.UI.Calendar.Pop(this,false);" readonly !!>':"TIME"==a?'<input type=text class=EWA_INPUT onclick="EWA.UI.Calendar.Pop(this,true);" readonly !!>':"STRING"==a||"NUMBER"==a?"<input type=text class=EWA_INPUT !!>":null};this.AddedValues=function(a,b,c,d,e){for(var f=0;f<a.length;f++){var g=
a[f],h=$X(g[b]+"_"+g[c]);if(!h)break;var k=h.tagName.toUpperCase();"INPUT"==k||"SELECT"==k||"TEXTAREA"==k?h.value=g[d]:h.innerHTML=g[d];e&&(this.GetRow(h).getElementsByTagName("input")[0].checked=!0)}};this.AddRow=function(a){for(var b=$X("EWA_LF_"+this._Id),c=b.insertRow(-1),d=0;d<b.rows[0].cells.length;d++){var e=c.insertCell(-1),f=b.rows[0].cells[d];e.className="EWA_TD_M";null!=a[d]&&(e.innerHTML=a[d]);e.style.display=f.style.display;e.id="ADD_ROW_"+f.childNodes[0].id}return c};this.Calc=function(a,
b,c,d){for(var e=$X("EWA_LF_"+this._Id),f={},g=0;g<a.length;g++)f[a[g]]=0;for(g=b;g<c;g++)for(a=e.rows[g],b=0;b<a.cells.length;b++)if(null!=f[b]){var h=a.cells[b],k=h.getElementsByTagName("input");0<k.length?f[b]+=1*k[0].value:(h=GetInnerText(h),""==h&&(h=0),f[b]+=1*h)}c=e.rows[d];for(g=0;g<c.cells.length;g++)null!=f[g]&&(h=Math.round(100*f[g])/100,d=GetInnerText(c.cells[g]),h!=1*d&&(this.IsCalcChanged=!0),c.cells[g].innerHTML=h.fm())};this.MeargeHeader=function(a,b,c){var d=$($X("EWA_LF_"+this._Id)),
e=d.find('tr[ewa_tag="HEADER"]');if(0!=e.length&&(a=e.find('nobr[id="'+a+'"]').parent(),0!=a.length)){var f=d.find("tr[ewa_mearge]");0==f.length&&(f=$(d[0].insertRow(1)),f.attr("ewa_mearge","gdx"));d=-1;for(var g=0;g<e[0].cells.length;g++){var h=e[0].cells[g];h==a[0]&&(d=g,h.colSpan=c);if(-1==d)"1"!=$(h).attr("ewa_tdmearged")&&(h.rowSpan=2);else if(d+c==g)d=-1;else{h.rowSpan=1;var k=f[0].insertCell(-1);k.innerHTML=h.innerHTML;h.style.display="none";k.className=h.className;$(h).attr("ewa_tdmearged",
1)}h==a[0]&&(h.innerHTML=b,h.style.display="")}}};this.getUrlClass=function(){var a=new EWA_UrlClass;a.SetUrl(this.Url);return a}}EWA.F.L.C=EWA_ListFrameClass;
EWA_ListFrameClass.prototype.RESOURCES={search_text_items:[{Id:"lk",Txt:"\u5305\u542b",TxtEn:"Like"},{Id:"llk",Txt:"\u5de6\u5305\u542b",TxtEn:"Left like"},{Id:"rlk",Txt:"\u53f3\u5305\u542b",TxtEn:"Right like"},{Id:"eq",Txt:"\u7b49\u4e8e",TxtEn:"Equals"}],search_date_items:[{Id:"Clear",Txt:"\u6e05\u7a7a",TxtEn:"Clear",Img:"fa fa-eraser"},{Id:"Today",Txt:"\u4eca\u5929",TxtEn:"Today"},{Id:"Week",Txt:"\u672c\u5468",TxtEn:"Week"},{Id:"Today-Weekend",Txt:"\u4eca\u5929\u81f3\u5468\u65e5",TxtEn:"Today-Weekend"},
{Id:"Month",Txt:"\u672c\u6708",TxtEn:"This Month"},{Id:"Today-EOM",Txt:"\u4eca\u5929\u81f3\u6708\u5e95",TxtEn:"Today-EOM"},{Id:"Quarter",Txt:"\u672c\u5b63\u5ea6",TxtEn:"This Quarter"},{Id:"Today-EOQ",Txt:"\u4eca\u5929\u81f3\u5b63\u672b",TxtEn:"Today-EOQ"},{Id:"Year",Txt:"\u672c\u5e74\u5ea6",TxtEn:"This Year"},{Id:"Today-EOY",Txt:"\u4eca\u5929\u81f3\u5e74\u5e95",TxtEn:"Today-EOY"}]};
function EWA_ListFrame_CellResizeClass(a){this._Name=a;this._Cover=this._Table=null;this._CellResize=[];this.Init=function(a){this._Table=a;this._Table.style.tableLayout="fixed";this._Table.style.width=this._Table.clientWidth+"px";this._Cover=this._CreateElement("div","width:100%; height:100%;background-color:blue; position:absolute; top:0px; left:0px; display:block; filter:alpha(opacity=0);opacity:0",document.body);for(a=0;a<this._Table.rows[0].cells.length-1;a++)this._CreateMarker(a);this._SetLocation()};
this._ShowCover=function(a){this._Cover.style.display=a?"block":"none"};this._EventX=function(a){return a.x?a.x:a.pageX};this._OnMouseDown=function(a,c){this._ShowCover(!0);a.childNodes[0].style.borderLeft="1px solid black";a.setAttribute("D",1);c=c?c:event;var b=this._EventX(c);a.setAttribute("X",b);a.setAttribute("SX",b);"undefined"!=typeof c.preventDefault&&c.preventDefault();"undefined"!=typeof c.stopPropagation?c.stopPropagation():c.cancelBubble=!0};this._OnMouseUp=function(a,c){a.childNodes[0].style.borderLeft=
"1px";a.setAttribute("D",0);c=c?c:event;var b=this._EventX(c)-1*a.getAttribute("SX");a=a.getAttribute("TDINDEX");a=this._Table.rows[0].cells[a];b=a.clientWidth+b;a.style.width=4>b?4:b+"px";this._SetLocation();"undefined"!=typeof c.preventDefault&&c.preventDefault();"undefined"!=typeof c.stopPropagation?c.stopPropagation():c.cancelBubble=!0};this._OnMouseOut=function(a,c){"1"==a.getAttribute("D")&&(a.style.left=a.getAttribute("SX")+"px",a.setAttribute("D",0),this._SetLocation(),a.childNodes[0].style.borderLeft=
"1px");this._ShowCover(!1)};this._OnMouseMove=function(a,c){this._ShowCover(!0);if("1"==a.getAttribute("D")){c=c?c:event;var b=this._EventX(c),e=1*a.getAttribute("X");e=b-e;a.style.left=1*a.style.left.replace("px","")+e+"px";a.setAttribute("X",b);"undefined"!=typeof c.preventDefault&&c.preventDefault();"undefined"!=typeof c.stopPropagation?c.stopPropagation():c.cancelBubble=!0}};this._CreateMarker=function(b){var c=this._CreateElement("div","width:40px; height:"+this._Table.clientHeight+"px; position:absolute;cursor:e-resize",
document.body);c.setAttribute("TDINDEX",b);c.setAttribute("instanceName",a);c.onmouseover=function(){var a=this.getAttribute("instanceName");eval("window."+a)._ShowCover(!0)};c.onmousedown=function(a){var b=this.getAttribute("instanceName");eval("window."+b)._OnMouseDown(this,a)};c.onmouseup=function(a){var b=this.getAttribute("instanceName");eval("window."+b)._OnMouseUp(this,a)};c.onmouseout=function(a){var b=this.getAttribute("instanceName");eval("window."+b)._OnMouseOut(this,a)};c.onmousemove=
function(a){var b=this.getAttribute("instanceName");eval("window."+b)._OnMouseMove(this,a)};this._CreateElement("div","width:1px;height:100%;position:absolute;top:0px;left:20px;border-Left:1px ;",c);this._CellResize[b]=c;c=null};this._SetLocation=function(){for(var a=0;a<this._Table.rows[0].cells.length-1;a++){var c=this._Table.rows[0].cells[a],d=this._Location(c);""!=c.style.width&&(c.style.width=c.clientWidth+"px");this._CellResize[a].style.left=d[0]+c.clientWidth-this._CellResize[a].clientWidth/
2+"px";this._CellResize[a].style.top=d[1]+"px"}};this._CreateElement=function(a,c,d){a=document.createElement(a);null!=c&&(a.style.cssText=c,a.setAttribute("style",c));null!=d&&d.appendChild(a);return a};this._Location=function(a){var b;var d=b=0;do d+=a.offsetLeft,b+=a.offsetTop,a=a.offsetParent;while("BODY"!=a.tagName);return[d,b]}}
function EWA_MultiGridClass(a,b){this.ClassName=a;this.Url=b;this._Id=this.TransParent=null;this.Resources={};this.Init=function(a){this.Xml=new EWA.C.Xml;this.Xml.LoadXml(a);this.Resources=new EWA_FrameResoures;this.Resources.Init(this.Xml)};this.CollapseCol=function(a,b){var c="",d=b.parentNode;null==d.getAttribute("expand")||1==d.getAttribute("expand")?(d.setAttribute("expand",0),b.innerHTML="+",c="none",d.setAttribute("col_span",d.colSpan),d.colSpan=1,d.style.fontStyle="italic",d.style.color=
"blue"):(d.setAttribute("expand",1),b.innerHTML="-",d.colSpan=d.getAttribute("col_span"),d.style.fontStyle="",d.style.color="#000");var g=document.getElementsByTagName(a);a=[];var h=[];for(b=0;b<g.length;b++){var k=g[b],l=k.parentNode.parentNode.rowIndex;null==a[l]&&(a[l]=[]);k=k.parentNode;a[l].push(k);"none"==c&&"none"==k.style.display&&h.push(k.id)}if("none"==c)d.setAttribute("ids","["+h.join("][")+"]");else{var m=d.getAttribute("ids");m=null==m?"":m}for(b=0;b<a.length;b++)if(null!=a[b]){for(g=
d=0;g<a[b].length;g++)h=a[b][g],d+=1*h.getAttribute("val"),l="["+h.id+"]",0<g&&(""==c?0>m.indexOf(l)&&(h.style.display=c):h.style.display=c);h=a[b][0];""==c?(l="["+h.id+"]",0>m.indexOf(l)&&(h.childNodes[0].innerHTML=h.getAttribute("val"),h.style.fontStyle="",h.style.color="#000")):(h.childNodes[0].innerHTML="EWA_GRID_H"==h.className?h.childNodes[0].innerHTML+"...":d,h.style.fontStyle="italic",h.style.color="blue")}};this.Trans=function(){var a=new EWA_UrlClass;a.SetUrl(this.Url);0<this.Url.indexOf("&EWA_GRID_TRANS=")?
a.RemoveParameter("EWA_GRID_TRANS"):a.AddParameter("EWA_GRID_TRANS","1");this.TransParent=$X("EWA_MG_"+this._Id).parentNode;this.Url=a.GetUrl();this._DoTrans(a.GetUrl())};this._DoTrans=function(a){EWA.F.CID=this._Id;this._Ajax=new EWA.C.Ajax;this._Ajax.LoadingType="image";this._Ajax.AddParameter("EWA_AJAX","1");this._Ajax.AddParameter("EWA_ID",this._Id);this._Ajax.PostNew(a,EWA.F.FOS[EWA.F.CID]._CallBackJs)};this.Reload=function(){var a=new EWA_UrlClass;a.SetUrl(this.Url);this.TransParent=$X("EWA_MG_"+
this._Id).parentNode;this.Url=a.GetUrl();this._DoTrans(a.GetUrl())};this.ReloadAfter=function(){};this.getUrlClass=function(){var a=new EWA_UrlClass;a.SetUrl(this.Url);return a};this._CallBackJs=function(){var a=EWA.F.FOS[EWA.F.CID]._Ajax;4==a._Http.readyState&&(a.HiddenWaitting(),200==a._Http.status?(a=a._Http.responseText,EWA.F.CheckCallBack(a)&&(EWA.F.FOS[EWA.F.CID].TransParent.innerHTML=a,EWA.F.FOS[EWA.F.CID].ReloadAfter&&EWA.F.FOS[EWA.F.CID].ReloadAfter())):alert("ERROR:\r\n"+a._Http.statusText))}}
EWA.UI.MultiGrid={COLOR_BG:"rgba(173, 216, 230, 0.25)",COLOR_FOCUS:"gold",MTbId:null,MTbs:{},MOut:function(a){a=a||event;var b=a.srcElement||a.target;if(null!=b){a.stopPropagation?a.stopPropagation():a.cancelBubble();a=0;try{for(;!(b&&b.tagName&&"TD"==b.tagName.toUpperCase()&&0<b.id.indexOf("$MGC_"));)if(b=b.parentNode,a++,5<a)return}catch(l){return}var c=b.id;if(c!=EWA.UI.MultiGrid.MTbId){EWA.UI.MultiGrid.MTbId=c;var d=c.split("_"),e=d[2];a=d[1];var f=b.parentNode.parentNode.parentNode;null==this.MTbs[f.id]&&
(this.MTbs[f.id]=[]);b=this.MTbs[f.id];for(var g=0;g<b.length;g++)this._restoreBg(b[g]);for(g=b.length=0;1E3>g;g++){var h=d[0]+"_"+g+"_"+d[2],k=$X(h);if(!k)break;h==c?this._setBg(k,this.COLOR_FOCUS):this._setBg(k,this.COLOR_BG);b.push(k)}for(g=0;1E3>g;g++){h=d[0]+"_"+d[1]+"_"+g;k=$X(h);if(!k)break;h!=c&&(b.push(k),this._setBg(k,this.COLOR_BG))}c=$(f).find("#MGA_"+e+"_0");0<c.length&&(k=c[0],this._setBg(k,this.COLOR_BG),b.push(k));a=$(f).find("#MGB_"+a+"_0");0<a.length&&(k=a[0],this._setBg(k,this.COLOR_BG),
b.push(k))}}},_setBg:function(a,b){a.setAttribute("oldbg",a.style.backgroundColor);a.style.backgroundColor=b},_restoreBg:function(a){var b=a.getAttribute("oldbg");a.style.backgroundColor=b}};
function EWA_TreeNodeClass(){this.Next=this.Prev=this.Parent=this.MenuGroup=this.Text=this.Key=null;this.AddParas=[];this.Children=[];this.Cmd=this.ChildLast=null;this.tagName="TREE_NODE";this.Object=null;this.IsMoreChildren=!1;this.Mark=function(a){var b=this.GetObject().rows[0].cells[2];a?(b.childNodes[0].style.backgroundColor="blue",b.childNodes[0].style.color="white"):(b.childNodes[0].style.backgroundColor="",b.childNodes[0].style.color="")};this.SetKey=function(a){var b=this.GetObject();this.Key=
a;b.id=a};this.SetText=function(a){this.Text=a;this.GetObject().rows[0].cells[2].childNodes[0].innerHTML=a};this.SetAddParameters=function(a){this.AddParas=a.split(",");a=this.GetObject();for(var b=0;b<this.AddParas.length;b+=1)a.rows[0].cells[2].childNodes[0].setAttribute("EWA_P"+b,this.AddParas[b].trim())};this.SetMenuGroup=function(a){this.GetObject().setAttribute("EWA_MG",a)};this.AddChild=function(a){a.Parent=this;this.ChildLast=this.Children[this.Children.length]=a;this.IsMoreChildren=!1};this.GetObject=
function(){null==this.Object&&(this.Object=document.getElementById(this.Key));return this.Object};this.AddBackground=function(a){this.GetObject().rows[1].cells[0].background=a};this.SetBookIcon=function(a){this.GetObject().rows[0].cells[1].className=a};this.NodeShow=function(a){if("EWA_TREE_ROOT"!=this.Key){var b=this.GetObject(),c=b.rows[0].cells[0];if(null==a){var d=this._GetTag(c);d="A"==d?"B":"A"}else d=a?"B":"A";c.className=this._GetClassNameNoTag(c)+d;2==b.rows.length&&0<b.rows[1].cells[1].childNodes.length&&
(b.rows[1].style.display="B"==d?"":"none");this.BookShow(a);this.IsMoreChildren&&(this.Object.setAttribute("EWA_TREE_MORE","0"),a=new EWA.F.Cmd,a.EWA_ACTION="OnTreeNodeMore",a.EWA_TREE_KEY=this.Key,EWA.CurUI._PostChange(a))}};this.BookShow=function(a){if("EWA_TREE_ROOT"!=this.Key){var b=this.GetObject().rows[0].cells[1];null==a?(tag=this._GetTag(b),tag="A"==tag?"B":"A"):tag=a?"B":"A";b.className=this._GetClassNameNoTag(b)+tag}};this.NodeClose=function(){this.NodeShow(!1)};this.NodeOpen=function(){this.NodeShow(!0)};
this.BookOpen=function(){this.BookShow(!0)};this.BookClose=function(){this.BookShow(!1)};this.NodeCross=function(a){var b=this.GetObject(),c=b.rows[0].cells[0];if("D"==this._GetTag(c)||a)c.className=this._GetClassNameNoTag(c)+"C";1==b.rows.length&&(a=b.insertRow(-1),a.insertCell(-1),a.insertCell(-1),a.cells[1].colSpan=2,a.style.display="none");c=b.rows[1].cells[0];c.className="TD10B"};this.NodeCrossEnd=function(a){var b=this.GetObject(),c=b.rows[0].cells[0],d=this._GetTag(c);if(1==b.rows.length){var e=
b.insertRow(-1);e.insertCell(-1);e.insertCell(-1);e.cells[1].colSpan=2}b.rows[1].style.display="none";if("C"==d||a)c.className=this._GetClassNameNoTag(c)+"D";c=b.rows[1].cells[0];c.className="TD10A"};this._GetTag=function(a){a=a.className;return a.substring(a.length-1)};this._GetClassNameNoTag=function(a){a=a.className;return a.substring(0,a.length-1)}}
function EWA_TreeClass(a,b,c){this.ParentObject=a;this.ClassName=b;this.Url=this._Url=c;this.Resources={};this.Icons=this.Menu=this._Ajax=null;this._CurNewNode=0;this.Fields={};this._LastFocus=this._Id=null;this._TempNode=document.createElement("DIV");this._MoveNode=document.createElement("DIV");this._HtmlTemplate1="<div oncontextmenu='"+this.ClassName+".ShowMenu(event);return false;' onclick='"+this.ClassName+".Click(event)'><table border=0 cellspacing=0 [ID] cellpadding=0 width=100% style='table-layout:fiexed'>";
this._HtmlTemplate1+="<tr><TD></TD><td class=CAPTION>&nbsp;&nbsp;&nbsp;</td><td width=99%><SPAN style='padding-left:4px'>[B]</SPAN></td></tr>";this._HtmlTemplate1+="<tr><td></td><td colspan=2></td></tr></table></div>";this._HtmlTemplate1+="<div style='display:none'><input style='margin:0px' type=text onblur='"+this.ClassName+".RenameBlur(this)'></div>";this._HtmlTemplate="<table border=0 EWA_MG=\"[EWA_MENU_GROUP]\" EWA_T=1 [EWA_MORE_CHILDREN] cellspacing=0 [ID] cellpadding=0 width=100% style='table-layout:fiexed'>";
this._HtmlTemplate+="<tr><td nowrap [A]><div>&nbsp;</div></td><td nowrap [B]><div>&nbsp;</div></td><td nowrap width=100%><SPAN EWA_CMD=1 [TMP_ADD_PARAS] style='cursor:pointer'>[C]</SPAN></td></tr>";this._HtmlTemplate+="<tr style='display:none'><td [A1]></td><td colspan=13></td></tr></table>";this.DoAction=function(a,b,c,g,h,k){EWA.F.CID=this._Id;if(null==b||""==b.trim())alert("action not value");else{if(null!=c&&0<c.trim().length)if(a=_EWA_INFO_MSG[c],null!=a&&""!=a){if(!window.confirm(a))return}else if(!window.confirm(c))return;
this._Ajax=new EWA.C.Ajax;this._Ajax.LoadingType="image";this._Ajax.AddParameter("EWA_AJAX","1");this._Ajax.AddParameter("EWA_ACTION",b);this._Ajax.AddParameter("EWA_ID",this._Id);this._Ajax.AddParameter("EWA_NO_CONTENT","1");this._Ajax.AddParameter("EWA_ACTION_TIP",g);null!=k&&0<k.trim().length?(this._Ajax.AddParameter("EWA_AFTER_EVENT",k),this.StopAjaxAfterReload=!0,this._Ajax.AddParameter("EWA_ACTION_RELOAD","0")):this.StopAjaxAfterReload=!1;if(null!=h&&0<h.length)for(b=0;b<h.length;b+=1)this._Ajax.AddParameter(h[b].Name,
h[b].Value);h=new EWA.C.Url;h.SetUrl(this.Url);h=h.RemoveParameter("EWA_ACTION");this._Ajax.PostNew(h,EWA.F.FOS[EWA.F.CID]._PostChangeCallback)}};this.OnMouseDown=function(a){};this.OnMouseUp=function(a){};this.OnMouseMove=function(a){};this.OnMouseOut=function(a){};this.MoveNode=function(a){};this.GetParentNode=function(a){a=a.GetObject().parentNode;a=this.GetNode(a);return"EWA_TREE_ROOT"==a.Key?null:a};this.CreateByXml=function(a){for(var b=a.GetElements("FrameData/Row"),c={},d,h=0;h<b.length;h+=
1){var k=this._CreateNodeFromXml(b[h],a);c[k.Key]=k;if(0==h)d=k;else{var l=c[""==k.ParentKey?"EWA_TREE_ROOT":k.ParentKey];null!=l&&l.AddChild(k)}}treeFirstNode=d;this.Create(d)};this.OnSelect=function(a){return"INPUT"!=a.srcElement.tagName?!1:!0};this.InitMenu=function(a){null!=a&&(this.Menu=new EWA_UI_MenuClass(b+".Menu"),this.Menu.Create(a))};this._PostChange=function(a){this.PostChangeType=a.EWA_ACTION;this.PostChangeKey=a.EWA_TREE_KEY;EWA.CurUI=this;this._Ajax=new EWA.C.Ajax;"OnTreeNodeMore"==
this.PostChangeType&&(a.EWA_AJAX="XML",a.EWA_TREE_MORE="1");for(var b in a)this._Ajax.AddParameter(b,a[b]);this._Ajax.PostNew(this._Url,EWA.CurUI._PostChangeCallback);this.IsPostChange=!0};this._PostChangeCallback=function(){var a=EWA.CurUI._Ajax;4==a._Http.readyState&&(a.HiddenWaitting(),200==a._Http.status?(a=a._Http.responseText,EWA.F.CheckCallBack(a)&&("OnTreeNodeMore"==EWA.CurUI.PostChangeType?EWA.CurUI.LoadChildrenAfter(a):"OnTreeNodeStatus"==EWA.CurUI.PostChangeType?EWA.CurUI.LoadChildrenStatus(a):
eval(a))):alert("ERROR:\r\n"+a._Http.statusText),EWA.CurUI.IsPostChange=!1,EWA.SHOW_ERROR=!0)};this.LoadChildrenStatus=function(a){var b=new EWA.C.Xml;b.LoadXml(a);var c=b.GetElements("FrameData/Row");if(null!=c){a=[];for(var d={},h=0;h<c.length;h=1+h){var k=this._CreateNodeFromXml(c[h],b);""==k.Key||$[k.ParentKey]||(a.push(k),d[k.Key]=k)}if(0!=a.length&&(b=this.GetNodeById(a[0].ParentKey),null!=b)){d[b.Key]=b;for(h=0;h<a.length;h+=1)d[a[h].ParentKey].AddChild(a[h]);b.GetObject().setAttribute("EWA_TREE_MORE",
"0");b.IsMoreChildren=!1;for(h=0;h<b.Children.length;h+=1)this.Create(b.Children[h]);b.NodeShow(!0);this.ShowNode(this.PostChangeKey)}}};this.LoadChildrenAfter=function(a){var b=new EWA.C.Xml;b.LoadXml(a);a=b.GetElements("FrameData/Row");if(null!=a&&0!=a.length){var c=this.GetNodeById(this.PostChangeKey),d={};d[c.Key]=c;for(var h=0;h<a.length;h=1+h){var k=this._CreateNodeFromXml(a[h],b);if("EWA_TREE_ROOT"!=k.Key){if(null==k.ParentKey||""==k.ParentKey)k.ParentKey=c.Key;d[k.Key]=k;var l=k.ParentKey;
null!=d[l]&&d[l].AddChild(k)}}if(0<c.Children.length)for(h=0;h<c.Children.length;h=1+h)this.Create(c.Children[h]);c.NodeShow(!0)}};this._CreateNodeFromXml=function(a,b){var c=new EWA_TreeNodeClass;c.Key=b.GetElementAttribute(a,"Key");c.ParentKey=b.GetElementAttribute(a,"ParentKey");c.Text=b.GetElementAttribute(a,"Text");c.IsMoreChildren="1"==b.GetElementAttribute(a,"IsMoreChildren")?!0:!1;c.MenuGroup=b.GetElementAttribute(a,"MenuGroup");for(var d=0;3>d;d+=1)c.AddParas[c.AddParas.length]=b.GetElementAttribute(a,
"AddPara"+d);return c};this.Rename=function(a,b,c,g){null==a&&(a=this._LastFocus);null!=a&&(this._RenameActionCmd=b,this._RenameRegex=c,this._RenameInfo=g,this._RenameNode="TREE_NODE"==a.tagName?a:this.GetNode(a),"EWA_TREE_ROOT"==this._RenameNode.Key?this._RenameNode=null:(a=this._RenameNode.GetObject(),a=a.rows[0].cells[a.rows[0].cells.length-1].childNodes[0],b=GetInnerText(a),a.style.display="none",c=this._GetInput(),a.parentNode.appendChild(c),c.value=b,c.setAttribute("EWA_OLD_VAL",b),c.style.width=
"300px",c.focus()))};this._GetInput=function(){for(var a=this.ParentObject.getElementsByTagName("div"),b=a.length-1;0<=b;b--)if(0<a[b].childNodes.length&&"INPUT"==a[b].childNodes[0].tagName&&0<a[b].innerHTML.indexOf("RenameBlur("))return this._InputDiv=a[b],a[b].childNodes[0]};this.RenameBlur=function(a){for(var b=a.getAttribute("EWA_OLD_VAL"),c=this._RenameNode,d=this.GetNode(c.GetObject().parentNode),h=0;h<d.Children.length;h+=1){var k=d.Children[h];if(k.Key!=c.Key&&k.Text.trim()==a.value.trim()){alert(_EWA_EVENT_MSG.OnTreeNodeNameRepeat);
a.focus();return}}d=a.parentNode.childNodes[0];this._InputDiv.appendChild(a);d.style.display="";if("NEW"==c.RenameType||b!=a.value){d.innerHTML=a.value;b=this._RenameActionCmd;null==b&&(b=new EWA.F.Cmd);if(null==b.EWA_ACTION||""==b.EWA_ACTION.trim())b.EWA_ACTION="NEW"==c.RenameType?"OnTreeNodeNew":"OnTreeNodeRename";"NEW"==c.RenameType&&(""==b.EWA_AFTER_EVENT&&(b.EWA_AFTER_EVENT='EWA.F.FOS["'+this._Id+'"].NewNodeAfter;'),d=this.GetNode(c.GetObject().parentNode),b.EWA_TREE_PARENT_KEY=d.Key);b.EWA_TREE_TEXT=
a.value;b.EWA_TREE_KEY=c.Key;this._PostChange(b);this._RenameActionCmd=null}};this.RenameKeyDown=function(a,b){a=a.keyCode?a.keyCode:a.which;13==a&&this.RenameBlur(b);27==a&&(a=b.getAttribute("EWA_OLD_VAL"),b.value=a,this.RenameBlur(b))};this.Delete=function(a,b){var c=this.GetNode(this._LastFocus);null!=c&&"EWA_TREE_ROOT"!=c.Key&&window.confirm(_EWA_EVENT_MSG.OnTreeNodeDelete)&&(!a&&(0<c.Children.length||c.IsMoreChildren)?(c.NodeShow(!0),alert(_EWA_EVENT_MSG.OnTreeNodeDeleteHaveChildren)):(a=b,null==
a&&(a=new EWA.F.Cmd,a.EWA_ACTION="OnTreeNodeDelete"),""==a.EWA_AFTER_EVENT&&(a.EWA_AFTER_EVENT='EWA.F.FOS["'+this._Id+'"].DeleteAfter();'),a.EWA_TREE_KEY=c.Key,this._PostChange(a)))};this.DeleteAfter=function(){var a=this.GetNode(this._LastFocus).GetObject(),b=a.parentNode;b.removeChild(a);a=this.GetNode(b);0==a.Children.length?this.GetNode(a.GetObject().parentNode).ChildLast.Key==a.Key?a.NodeCrossEnd(!0):a.NodeCross(!0):a.ChildLast.NodeCrossEnd();this._LastFocus=null};this.NewNode=function(a,b,c,
g){null!=this._LastFocus&&(this._NewNodeTemp={TEXT:a,CMD:b,REGEX:c,INFO:g},this.GetNode(this._LastFocus).NodeShow(!0),this.IsPostChange?this._NewNodeTimer=window.setInterval(function(){EWA.CurUI.IsPostChange||(window.clearInterval(EWA.CurUI._NewNodeTimer),EWA.CurUI._NewNode())},100):this._NewNode())};this._NewNode=function(){var a=this._NewNodeTemp.TEXT,b=this._NewNodeTemp.CMD,c=this._NewNodeTemp.REGEX,g=this._NewNodeTemp.INFO;this._NewNodeTemp=null;var h=new EWA_TreeNodeClass;this._CurNewNode+=1;
h.Key=this.ClassName+"__"+this._CurNewNode;h.RenameType="NEW";var k=_EWA_EVENT_MSG.OnTreeNodeNew+this._CurNewNode;null!=a&&0<a.trim().length&&(k=a.trim());h.Text=k;a=this.GetNode(this._LastFocus);0<a.Children.length&&a.Children[a.Children.length-1].NodeCross();a.AddChild(h);this.Create(h);a.NodeShow(!0);this.Rename(h,b,c,g)};this.NewNodeAfter=function(a,b,c){var d=this.GetNodeById(this.ClassName+"__"+this._CurNewNode);d.SetKey(a);d.SetAddParameters(null==b?"":b);d.SetMenuGroup(null==c?"":c);a=this.TestIcon(d);
d.SetBookIcon(a)};this.GetNodeById=function(a){a=document.getElementById(a);return this.GetNode(a)};this.GetFocusNode=function(){return this.GetNode(this._LastFocus)};this.GetNode=function(a){if(null==a||null==a.tagName)return null;for(var b=a;"TABLE"!=b.tagName&&"1"!=b.getAttribute("EWA_T");)if(b=b.parentNode,"BODY"==b.tagName)return null;a=new EWA_TreeNodeClass;a.Key=b.id;a.MenuGroup=b.getAttribute("EWA_MG");a.Object=b;var c=b.rows[0].cells[b.rows[0].cells.length-1];a.Text=GetInnerText(c);for(var d=
0;3>d;d+=1)a.AddParas[d]=c.childNodes[0].getAttribute("EWA_P"+d);d=b.getAttribute("EWA_TREE_MORE");a.IsMoreChildren="1"==d?!0:!1;if(1<b.rows.length){b=b.rows[1].cells[b.rows[1].cells.length-1];for(d=0;d<b.childNodes.length;d=1+d)3!=b.childNodes[d].nodeType&&a.Children.push(this.GetNode(b.childNodes[d]));0<a.Children.length&&(a.ChildLast=a.Children[a.Children.length-1])}return a};this.Click=function(a,b){if(!this.IsPostChange&&(EWA.CurUI=this,a=a.srcElement?a.srcElement:a.target,"INPUT"!=a.tagName))if("DIV"==
a.tagName&&(a=a.parentNode),"TD"==a.tagName&&0==a.className.indexOf("TD00")){var c=this.GetNode(a);c.NodeShow()}else{for(;("SPAN"!=a.tagName||null==a.getAttribute("EWA_CMD"))&&"1"!=a.getAttribute("EWA_TREE_TOP");)if(a=a.parentNode,"BODY"==a.tagName)return;c=this.GetNode(a);if("SPAN"==a.tagName&&(null!=a.getAttribute("EWA_CMD")||"1"==a.getAttribute("EWA_TREE_TOP"))){null!=this._LastFocus&&(this.GetNode(this._LastFocus).Mark(!1),this._LastFocus=null);"1"!=a.getAttribute("EWA_TREE_TOP")&&c.Mark(!0);
this._LastFocus=a;if(b)return a;EWA.F.ST.SaveStatus(c.Key,"TREE");this._RunCmd(c);this.MoveNode(c.GetObject())}}};this._RunCmd=function(a){var b=this.GetNode(a.GetObject().parentNode);b='link("'+a.Key+'","'+b.Key+'","'+a.Text+'"';for(var c=0;c<a.AddParas.length;c+=1)b=null==a.AddParas[c]?b+",null":b+(',"'+a.AddParas[c]+'"');EWA.C.Utils.RunCmd(b+");")};this.ShowMenu=function(a){EWA.CurUI=this;var b=this.Click(a,!0);null!=this.Menu&&null!=b&&(b=this.GetNode(b),this.Menu.ShowByMouse(a,b.MenuGroup))};
this.TestIcon=function(a){if(null==this.Icons)return"TD01A";for(var b in this.Icons){var c=this.Icons[b],d=null;switch(c.TEST.toUpperCase()){case "KEY":d=a.Key;break;case "PARENTKEY":d=a.Parent.Key;break;case "TEXT":d=a.Text;break;case "P0":d=a.AddParas[0];break;case "P1":d=a.AddParas[1];break;case "P2":d=a.AddParas[2];break;case "MG":d=a.MenuGroup}if(null!=d&&eval("/"+c.FILTER+"/ig").test(d))return c.NAME+"A"}return"TD01A"};this.Create=function(a){if(null!=a)if(null==a.Parent)this._CreateFirst(a);
else{for(var b=this._HtmlTemplate.replace("[ID]",'id="'+a.Key+'"'),c="",d=0;d<a.AddParas.length;d+=1)a.AddParas[d]&&(c+="EWA_P"+d+'="'+a.AddParas[d]+'" ');b=b.replace("[TMP_ADD_PARAS]",c);b=b.replace("[EWA_MENU_GROUP]",a.MenuGroup);c=this.TestIcon(a);b=b.replace("[B]","class='"+c+"'");b=b.replace("[C]",a.Text);b=a.IsMoreChildren?b.replace("[EWA_MORE_CHILDREN]","EWA_TREE_MORE='1'"):b.replace("[EWA_MORE_CHILDREN]","");0<a.Children.length||a.IsMoreChildren?(b=b.replace("[A]","class='TD00A'"),b=a!=a.Parent.ChildLast?
b.replace("[A1]","class='TD10B'"):b.replace("[A1]","class='TD10A'")):b=a==a.Parent.ChildLast?b.replace("[A]","class='TD00D'"):b.replace("[A]","class='TD00C'");c=a.Parent.GetObject();1==c.rows.length&&(d=c.insertRow(-1),d.insertCell(-1),d.insertCell(-1),d.cells[1].colSpan=2);this._TempNode.innerHTML=b;c.rows[1].cells[c.rows[1].cells.length-1].appendChild(this._TempNode.childNodes[0]);c.parentNode.childNodes[c.parentNode.childNodes.length-1]!=c&&(c.rows[1].cells[0].className="TD10B");for(d=0;d<a.Children.length;d+=
1)this.Create(a.Children[d])}};this._CreateFirst=function(a){var b=this._HtmlTemplate1.replace("[ID]","id='"+a.Key+"'");b=b.replace("[B]",a.Text);this.ParentObject.innerHTML=b;for(b=0;b<a.Children.length;b+=1)this.Create(a.Children[b])};this.Init=function(a){var b=new EWA.C.Xml;b.LoadXml(a);this.Resources=new EWA_FrameResoures;this.Resources.Init(b);-1==this.Url.toUpperCase().indexOf("EWA_TREE_INIT_KEY")&&EWA.F.ST.GetStatus("TREE",this)};this.LoadStatus=function(){EWA.SHOW_ERROR=!1;this.ShowNode(_EWA_STATUS_VALUE)};
this.ShowNode=function(a){if(null!=a&&""!=a&&"EWA_TREE_ROOT"!=a){var b=this.GetNodeById(a);null==b?(b=new EWA.F.Cmd,b.EWA_ACTION="OnTreeNodeStatus",b.EWA_AJAX="XML",b.EWA_TREE_KEY=a,b.EWA_TREE_STATUS="1",this._PostChange(b)):(this._StatusNode=b,this.ShowNodeA())}};this.ShowNodeA=function(){var a=this._StatusNode;this._StatusNode=null;for(var b=a.GetObject().parentNode,c=this.GetNode(b);"EWA_TREE_ROOT"!=c.Key;)c.NodeShow(!0),c=this.GetNode(c.GetObject().parentNode);a.Mark(!0);this._LastFocus=a.GetObject();
this._RunCmd(a);window.setTimeout(function(){b.focus()},0)};this.getUrlClass=function(){var a=new EWA_UrlClass;a.SetUrl(this.Url);return a};this.Reload=function(){}}function EWA_Treelink(a,b,c,d,e,f){alert("key="+a+"\r\nparentKey="+b+"\r\ntext="+c+"\r\naddPara1="+d+"\r\naddPara2="+e+"\r\naddPara3="+f+"\r\n\r\n\u60a8\u9700\u8981\u8986\u76d6\u8fd9\u4e2a\u65b9\u6cd5\r\nlink(key, parentKey, text, addPara1, addPara2, addPara3)")}"undefined"==typeof link&&(link=EWA_Treelink);
function EWA_Html5UploadClass(){this.uploadIframes=[];this.files=[];this.UPLOAD_STATUS=this.POST_REF=this.POST_NAME=this.POST_ITEMNAME=this.POST_XMLNAME="";this.WAIT_ID=("ht5upload_wait_"+Math.random()).replace(".","G");this.haveFile=function(){for(var a=0;a<this.files.length;a++)if(""!=this.files[a].value)return!0;return!1};this.getValue=function(){if(0==this.uploadIframes.length&&0==this.files.length)return"";for(var a=[],b=0;b<this.uploadIframes.length;b++){var c=eval("(function(){var __json="+
this.uploadIframes[b]+"; return __json;})()"),d;for(d in c)a.push(c[d])}return JSON.stringify(a)};this.fileIco=function(a,b){a=EWA.UI.Ext.FileExt(a.name);$X(b).src=EWA.UI.Ext.FileIco(a)};this.showPreview=function(a){var b=a.parentNode,c=b.outerHTML;b.style.display="none";a.setAttribute("ok",1);gFileReaders={};for(var d=0;d<a.files.length;d++){var e=a.files[d];this.showPreview1(b,e);this.files.push(e)}"yes"==this.UpMulti&&$(b).before(c)};this.addOther=function(a){for(var b=$X(this.POST_NAME).parentNode.getElementsByTagName("input")[1].parentNode,
c=0;c<a.length;c++)this.showPreview1(b,a[c]);this.uploadIframes.push(JSON.stringify(a))};this.showPreviewExists=function(){var a=$("#EWA_FRAME_"+this.SYS_FRAME_UNID+" input#"+this.POST_NAME).val();if(""!=a){try{EWA.F.FOS[this.SYS_FRAME_UNID].setUnMust(this.POST_NAME)}catch(f){}var b=$("#EWA_FRAME_"+this.SYS_FRAME_UNID+" input#"+this.POST_NAME).parent().find(".ewa_app_upload_form")[0],c="_upload_"+Math.random();c=c.replace(".","G");var d=document.createElement("img");d.id=c;c=document.createElement("table");
c.cellPadding=0;c.cellSpacing=0;c.className="ewa_app_upload_form1";b.parentNode.appendChild(c);b=c.insertRow(-1).insertCell(-1);b.align="center";b.appendChild(d);b.className="img";b.vAlign="middle";b=c.insertRow(-1).insertCell(-1);c=a.split("/");c=c[c.length-1];b.innerHTML="<div title='"+c+"'>"+c+"</div>";b.className="name";d.src=a;var e=this;d.onerror=function(){e.fileIco({name:this.src},this.id)}}};this.showPreview1=function(a,b){var c="_upload_"+Math.random();c=c.replace(".","G");b.ref=c;var d=
document.createElement("img");d.id=c;var e=document.createElement("table");e.cellPadding=0;e.cellSpacing=0;e.className="ewa_app_upload_form1";a.parentNode.appendChild(e);a=e.insertRow(-1).insertCell(-1);a.align="center";a.appendChild(d);a.className="img";a.vAlign="middle";a=e.insertRow(-1).insertCell(-1);a.innerHTML="<div>"+b.name+"</div><div id='"+c+"_process1' class='ewa-app-upload-process1'></div><div id='"+c+"_process' class='ewa-app-upload-process'>0%</div>";a.className="name";if(b.type&&0==
b.type.indexOf("image/")){d.src=EWA.RV_STATIC_PATH+"/EWA_STYLE/images/loading2.gif";d=new FileReader;gFileReaders[c]=d;var f=this;d.onloadend=function(a){for(var b in gFileReaders)gFileReaders[b]==a.target&&($X(b).src=a.target.result,f.showPreviewAfter&&f.showPreviewAfter($X(b),a))};d.readAsDataURL(b)}else this.fileIco(b,c),this.showPreviewAfter&&this.showPreviewAfter($X(c),b)};this.submitUploads=function(a){if(window.FormData){this.uploadIframes=[];var b=this;this.UPLOAD_STATUS="start";this.action=
EWA.CP+"/EWA_STYLE/cgi-bin/_up_/?xmlname="+this.POST_XMLNAME+"&ITEMNAME="+this.POST_ITEMNAME+"&NAME="+this.POST_NAME+"&EWA_UP_TYPE=SWFUPLOAD&EWA_UP_REF="+this.POST_REF;try{$("input[type=file][ok=1]").each(function(a){a=this.id.split("$")[1];if(b.POST_NAME==a)for(a=0;a<this.files.length;a++)b.uploadIframes.push({file:this.files[a]})})}catch(c){alert(c)}0<this.uploadIframes.length?(a=$X("f_"+this.SYS_FRAME_UNID),$(a).find(".ewa-app-upload-process,.ewa-app-upload-process1").show(),b.UPLOAD_STATUS="checking",
this.asyncUpload()):this.UPLOAD_STATUS="nofile"}else this.submitUploads_old(a)};this.asyncUpload=function(){var a=this,b=null,c;for(c in this.uploadIframes){var d=this.uploadIframes[c];if("string"!=typeof d){b=d;break}}null!=b?(b.submitting||(b.submitting=!0,this.submitUpload(b)),setTimeout(function(){a.asyncUpload()},111)):this.uploadsCompleted&&this.uploadsCompleted(this.uploadIframes)};this.createFormData=function(){var a=new FormData,b=new EWA_UrlClass;b.SetUrl(EWA.F.FOS[this.SYS_FRAME_UNID].Url);
for(var c in b._Paras)0!=c.toUpperCase().indexOf("EWA")&&a.append(c,b._Paras[c]);if(b=$X("f_"+this.SYS_FRAME_UNID))for(c=0;c<b.length;c++){var d=b[c],e=d.name||d.id;"file"!=d.type&&"button"!=d.type&&"submit"!=d.type&&("radio"!=d.type&&"checkbox"!=d.type||d.checked)&&"ht5upload"!=$(d).attr("ewa_tag")&&a.append(e,d.value)}return a};this.submitUpload=function(a){var b=a.file,c=this.createFormData();c.append(this.POST_NAME,b,b.name);var d=$('img[id="'+b.ref+'"]');this.createNewSizes(d[0],c);var e=this,
f=$('div[id="'+b.ref+'_process"]');f.show().html("0%");var g=$('div[id="'+b.ref+'_process1"]');g.css("width",0).show();b=new XMLHttpRequest;b.upload.addEventListener("progress",function(a){a.lengthComputable?(a=Math.round(100*a.loaded/a.total-10),0>a&&(a=0),f.html(a.toString()+"%"),g.css("width",a.toString()+"%")):f.html("unable to compute")},!1);b.addEventListener("load",function(a){f.html("100%");g.css("width","100%");for(var b in e.uploadIframes)if(e.uploadIframes[b].xhr==a.target){e.uploadIframes[b]=
a.target.responseText;break}e.chkAllXhrComplete()},!1);b.addEventListener("error",function(a){console.log(a);f.html(a);e.UPLOAD_STATUS="error"},!1);b.addEventListener("abort",function(a){f.html("The upload has been canceled by the user or the browser dropped the connection.");console.log(a);e.UPLOAD_STATUS="abort"},!1);b.open("POST",this.action,!0);b.send(c);a.xhr=b;delete a.file};this.createNewSizes=function(a,b){if(this.UpNewSizes&&"server"!=this.NewSizesIn){if(!this.siezs){var c=this.UpNewSizes.split(",");
this.siezs=[];for(var d in c){var e=c[d],f=e.split("x");2==f.length&&(e=f[0],f=f[1],isNaN(e)||isNaN(f)||this.siezs.push({w:1*e,h:1*f}))}}if(0!=this.siezs.length)for(d in this.siezs)e=this.siezs[d],c=EWA_ImageCalss.resizeAsBlob(a,e.w,e.h),b.append(this.POST_NAME,c,"resized$"+e.w+"x"+e.h+".jpg")}};this.chkAllXhrComplete=function(){for(var a=0,b=0;b<this.uploadIframes.length;b++)"string"==typeof this.uploadIframes[b]&&a++;a==this.uploadIframes.length&&(this.UPLOAD_STATUS="ok")};this.submitUploads_old=
function(a){this.uploadIframes=[];var b=this;this.UPLOAD_STATUS="start";try{$("input[type=file][ok=1]").each(function(a){var c=this.id.split("$")[1];b.POST_NAME==c&&b.submitUpload_old(a,this)})}catch(c){alert(c)}0<this.uploadIframes.length?window.setTimeout(function(){b.UPLOAD_STATUS="checking";b.chkframeSubmt()},400):this.UPLOAD_STATUS="nofile"};this.submitUpload_old=function(a,b){a="GDX"+a;var c=document.createElement("iframe");c.id=a;c.name=a;document.body.appendChild(c);c=$(c);c.hide();var d=
document.createElement("form");document.body.appendChild(d);d.method="post";d.enctype="multipart/form-data";d.innerHTML="<input type=submit>";var e=$(d);e.hide();d=EWA.CP+"/EWA_STYLE/cgi-bin/_up_/?xmlname="+this.POST_XMLNAME+"&ITEMNAME="+this.POST_ITEMNAME+"&NAME="+this.POST_NAME+"&EWA_UP_TYPE=SWFUPLOAD&EWA_UP_REF="+this.POST_REF;var f=b.id.split("_")[1].split("$")[0],g=EWA.F.FOS[f].Url,h=new EWA_UrlClass;h.SetUrl(g);for(var k in h._Paras)0!=k.toUpperCase().indexOf("EWA")&&(d+="&"+k+"="+h._Paras[k]);
if(k=$X("f_"+f))for(f=0;f<k.length;f++)g=k[f],"file"!=g.type&&"button"!=g.type&&"submit"!=g.type&&("radio"!=g.type&&"checkbox"!=g.type||g.checked)&&(d+="&"+(g.name||g.id)+"="+g.value.toURL());e.attr("action",d);e.append(b);e.attr("target",a);this.uploadIframes.push(c[0]);setTimeout(function(){e.submit()},400)};this.chkframeSubmt=function(){for(var a=0,b=0;b<this.uploadIframes.length;b++){var c=this.uploadIframes[b];if("string"==typeof c)a++;else if(c.contentDocument&&c.contentDocument.body){var d=
GetInnerText(c.contentDocument.body);if(0<=d.indexOf("]")&&0<=d.indexOf("["))$("form[target="+c.id+"]").remove(),$(c).remove(),this.uploadIframes[b]=d;else if(""!=d.trim()){alert("\u7cfb\u7edf\u6267\u884c\u9519\u8bef\uff1a"+d);return}}}if(a==this.uploadIframes.length)this.UPLOAD_STATUS="ok";else{var e=this;window.setTimeout(function(){e.chkframeSubmt()},100)}};this.createWaitBox=function(){if(!$X(this.WAIT_ID)){var a=document.createElement("div");a.id=this.WAIT_ID;var b=$("body");$(a).css({width:300,
height:100,"line-height":"100px","font-size":"16px",position:"fixed",top:b.height()/2-35,left:b.width()/2-150,"z-index":12838,"background-color":"f0f0f0",color:"#08c","border-radius":"10px",opacity:.9}).addClass("ewa-upload-wait-box");a.innerHTML="<table height=100% align=center><tr><td><img src='"+EWA.RV_STATIC_PATH+"/EWA_STYLE/images/loading2.gif'></td><td>"+("enus"==EWA.LANG?"Please waitting ...":"\u8bf7\u7b49\u5f85\u6587\u4ef6\u4e0a\u4f20\u5b8c\u6bd5...")+"</td></table>";b.append(a);this.noWaitBox&&
$(a).hide()}};this.removeWaitBox=function(){$("#"+this.WAIT_ID).remove()}}
function EWA_Html5TakePhotoClass(){this._wait_end=!0;this.UPLOAD_STATUS="NO";this.H5_UPLOAD=new EWA_Html5UploadClass;this.res={zhcn:{TAKE_PHOTO:"\u70b9\u51fb\u83b7\u53d6\u7167\u7247",RE_TAKE:"\u91cd\u65b0\u83b7\u53d6"},enus:{TAKE_PHOTO:"Take photo",RE_TAKE:"Re take"}};this.getRes=function(){return"enus"==EWA.LANG?this.res.enus:this.res.zhcn};this.getValue=function(){return this.responseText?this.responseText:""};this.init=function(a){this.objName=a;var b="#h5TakePhoto_"+a,c="h5TakePhotoVod_"+a;a=
$X("h5TakePhotoCan_"+a);a.height=$(b).height();a.width=$(b).width();this.context=a.getContext("2d");this.video=$X(c);$(this.video).show();c={video:!0};var d=this;navigator.getUserMedia?navigator.getUserMedia(c,function(a){d.video.src=a;d.video.play()},d.errBack):navigator.webkitGetUserMedia?navigator.webkitGetUserMedia(c,function(a){d.video.src=(window.URL||window.webkitURL).createObjectURL(a);d.video.play()},d.errBack):navigator.mozGetUserMedia&&navigator.mozGetUserMedia(c,function(a){d.video.src=
window.URL.createObjectURL(a);d.video.play()},d.errBack);$(b).find("button").html(this.getRes().TAKE_PHOTO)};this.errBack=function(a){EWA.UI.Msg.ShowError("\u6d4f\u89c8\u5668\u4e0d\u652f\u6301\u5728\u7ebf\u62cd\u6444<br>"+a.message,"\u6d4f\u89c8\u5668\u4e0d\u652f\u6301\u5728\u7ebf\u62cd\u6444");console.log(a)};this.takePhoto=function(a){if(this._wait_end){var b="#h5TakePhotoVod_"+this.objName,c=$(b).width();b=$(b).height();this.context.drawImage(this.video,0,0,c,b);this.createPic();this.setPhotoStatus("img");
if(a){var d=this;a.innerHTML=this.getRes().RE_TAKE;a.onclick=function(){d.showVideo(this)};$(a).show();$(a).parent().show()}}else $Tip("\u8fd0\u884c\u4e2d...")};this.showVideo=function(a){if(this._wait_end){if(this.setPhotoStatus("video"),a){var b=this;a.innerHTML=this.getRes().TAKE_PHOTO;a.onclick=function(){b.takePhoto(this)};$(a).show();$(a).parent().show()}}else $Tip("\u8fd0\u884c\u4e2d...")};this.setPhotoStatus=function(a){var b="#h5TakePhoto_"+this.objName,c="#h5TakePhotoCan_"+this.objName,
d="#h5TakePhotoVod_"+this.objName,e="#h5TakePhotoImg_"+this.objName;$(b).find("*").hide();"img"==a?(this._photo_status="img",$(b).css({border:"1px solid green"}),$(e).show()):"video"==a?(this._photo_status="video",$(b).css({border:"1px solid red"}),$(d).show()):"canvas"==a&&(this._photo_status="canvas",$(b).css({border:"1px solid blue"}),$(c).show())};this.createPic=function(){var a="#h5TakePhotoImg_"+this.objName,b=$X("h5TakePhotoCan_"+this.objName).toDataURL("image/jpeg",.7);$(a).attr("src",b);
this.setPhotoStatus("img");return $(a)[0]};this.submitUpload=function(){var a="#h5TakePhotoImg_"+this.objName,b=this.H5_UPLOAD.createFormData();a=$(a)[0];a=EWA_ImageCalss.resizeAsBlob(a,a.width,a.height);b.append(this.objName,a,this.objName+".jpg");a="#h5TakePhoto_"+this.objName;var c=this,d=$(a).find(".ewa-h5-take-photo-process");d.show();d.find("span").show().html("0%");var e=$(a).find(".ewa-h5-take-photo-process1");e.css("width",0).show();var f=new XMLHttpRequest;c=this;f.upload.addEventListener("progress",
function(a){a.lengthComputable?(a=Math.round(100*a.loaded/a.total-10),0>a&&(a=0),d.find("span").html(a.toString()+"%"),e.css("width",a.toString()+"%")):d.html("unable to compute")},!1);f.addEventListener("load",function(a){d.find("span").html("100%");e.css("width","100%");$("#EWA_FRAME_"+c.H5_UPLOAD.SYS_FRAME_UNID+" #"+c.objName).val(a.target.responseText);c.responseText=a.target.responseText;c.UPLOAD_STATUS="ok"},!1);f.addEventListener("error",function(a){console.log(a);d.html(a);c.UPLOAD_STATUS=
"error"},!1);f.addEventListener("abort",function(a){d.html("The upload has been canceled by the user or the browser dropped the connection.");console.log(a);c.UPLOAD_STATUS="abort"},!1);var g=EWA.CP+"/EWA_STYLE/cgi-bin/_up_/?xmlname="+this.H5_UPLOAD.POST_XMLNAME+"&ITEMNAME="+this.H5_UPLOAD.POST_ITEMNAME+"&NAME="+this.H5_UPLOAD.POST_NAME+"&EWA_UP_TYPE=SWFUPLOAD&EWA_UP_REF="+this.H5_UPLOAD.POST_REF;$(a).find("button").hide();f.open("POST",g,!0);f.send(b);this.xhr=f}}
function EWA_UI_BoxClass(){this._ClassName=("_eWAbOX"+Math.random()).replace(".","$");window[this._ClassName]=this;this._Cfg=this._JSON_URL=this._REF_DATA=null;this.Create=function(a){this._Cfg=a;if(EWA.F&&EWA.F.FOS)for(var b in EWA.F.FOS)a=EWA.F.FOS[b],a.BOX_CLASS==this&&(this.FOS=a);this.FOS&&(a=new EWA_UrlClass(this.FOS.Url),a.GetParameter("EWA_BOX_PARENT_ID")&&(a=a.GetParameter("EWA_BOX_PARENT_ID"),$X(a)&&(this._Cfg.parent_id=a)));if(this._Cfg.parent_id){a=this._Cfg.parent_id.split(",");for(var c=
0;c<a.length;c++){var d=a[c].trim();if($X(d)){$($X(d)).html("waiting...");this._Cfg.parent_id_init=this._Cfg.parent_id;this._Cfg.parent_id=d;break}}if(this._Cfg.parent_id_init){this.initBoxSize();a=new EWA_UrlClass;a.SetUrl(this.FOS.Url);c=a.GetParameter("EWA_PAGESIZE");d=a.GetParameter("EWA_PAGECUR");c&&!isNaN(c)?this._Cfg.EWA_PAGESIZE=c:this._Cfg.EWA_PAGESIZE=this._Cfg.EWA_PAGESIZE||10;d&&!isNaN(d)?this._Cfg.EWA_PAGECUR=d:this._Cfg.EWA_PAGECUR=this._Cfg.EWA_PAGECUR||1;c={};for(b in a._Paras)c["@"+
b.toUpperCase()]=a._Paras[b];this._REF_DATA=c;this.load_box_data()}else alert("parent_id["+this._Cfg.parent_id+"]\u627e\u4e0d\u5230\u5b9a\u4e49\u7684\u5bf9\u8c61")}else alert("parent_id\u672a\u5b9a\u4e49")};this.initBoxSize=function(){if(this._Cfg.page_width){if(isNaN(this._Cfg.page_width)){var a=this._ClassName+"_check_size";var b="<div id='"+a+"' style='height:1px;width:"+this._Cfg.page_width+"'></div>";$("body").append(b);b=$($X(a));a=b.width();b.remove()}else a=1*this._Cfg.page_width;if(!(50>=
a)){b={};b.width=a;var c=a-10-20-5;b.box_title=c;b.box_title_img=c-30-5;a-=10;b.box_txt=a;b.box_des1=a-2-58;this._Cfg._Fix=b}}};this.load_box_data=function(){var a;if(null==this.FOS){var b=[EWA.CP+"/EWA_STYLE/cgi-bin/?EWA_AJAX=JSON_EXT1&ewa_frameset_no=1"];for(a in this._Cfg){var c=a.toUpperCase();if("XMLNAME"==c||"ITEMNAME"==c||0==c.indexOf("EWA_")){var d=this._Cfg[a];d&&b.push(c+"="+d)}}b.push($U());this._JSON_URL=a=b.join("&")}else{b=new EWA_UrlClass;b.SetUrl(this.FOS.Url);b.AddParameter("EWA_AJAX",
"JSON_EXT1");b.AddParameter("ewa_frameset_no","1");for(a in this._Cfg)c=a.toUpperCase(),0==c.indexOf("EWA_")&&(d=this._Cfg[a])&&b.AddParameter(c,d);this._JSON_URL=a=b.GetUrl()}$J(a,this.load_box_data1,this)};this.load_box_data1=function(a,b){var c=b[b.length-1];b=c._Cfg;var d=c._Cfg.parent_id;EWA.F.FOS[a.FRAME_UNID]||(EWA_Utils.JsRegister(a.JSFRAME),EWA_Utils.JsRegister(a.JS));EWA.F.FOS[a.FRAME_UNID].Reload=function(){c.Create(c._Cfg)};EWA.F.FOS[a.FRAME_UNID].Goto=function(a){var b=new EWA_UrlClass;
b.SetUrl(c._JSON_URL);b.RemoveParameter("ewa_pagecur");b.AddParameter("ewa_pagecur",a);a=b.GetUrl();console.log(a);$J(a,c.load_box_data1,c._REF_DATA,a,c);this._JSON_URL=a};var e="___NeW_____"+b.parent_id;$X(e)||(b.new_parent_id=e,c.createToolbar(a));c.setPageInfo(a);c.enq_op_main_sub_boxs(a);1==b.autofocus&&(a=$X(d),a=$(a).offset().top,$("body").animate({scrollTop:a-30},300));if(b.callback)try{"function"==typeof b.callback?b.callback(c):eval(b.callback)}catch(g){console.log("EWA_UI_BoxClass->tmp.callback"+
g),console.log(b.callback)}if(EWA&&EWA.F&&EWA.F.FOS)for(var f in EWA.F.FOS)if(b=EWA.F.FOS[f],b.BOX_CLASS==c&&b.ReloadAfter)try{b.ReloadAfter(c)}catch(g){console.log("EWA_UI_BoxClass->EWA->ReloadAfter"+g),console.log(b.ReloadAfter)}};this.createToolbar=function(a){var b=this._Cfg,c=$($X(b.parent_id)),d=[];d.push('<div onselectstart="return false;" class="box-tool-bar">');for(var e=" onclick='"+this._ClassName+".toolBarClick(this)' ",f=["fa-table","fa-list aa","fa-sort aa","fa-search aa"],g=0;g<f.length;g++)d.push("<i class='fa "+
f[g]+"' "+e+"></i>");d.push("&nbsp;&nbsp;");f=["fa-fast-backward aa","fa-backward aa","fa-forward aa","fa-fast-forward aa"];for(g=0;g<f.length;g++)d.push("<i class='fa "+f[g]+"' "+e+"></i>"),1==g&&(d.push("<span class='aa' id='"+this._ClassName+"_records'></span>"),d.push("<select class='aa' id='"+this._ClassName+"_page' onchange='"+this._ClassName+".do_page(this)'><option value=5>5</option><option value=10>10</option><option value=20>20</option><option value=50>50</option><option value=100>100</option><option value=150>150</option><option value=200>200</option><option value=300>300</option><option value=500>500</option></select>"));
g=this.create_filter(a);e=g[0];g=g[1];d.push("<div class='sort_items' id='"+this._ClassName+"_search'>");d.push(e.join(""));d.push(g.join(""));d.push("</div>");a=this.create_sort(a);d.push("<div class='sort_items' id='"+this._ClassName+"_sort'>");d.push(a);d.push("</div>");d.push('</div><div id="'+b.new_parent_id+'"></div>');c.html(d.join(""));$X(this._ClassName+"_page").value=this._Cfg.EWA_PAGESIZE};this.setPageInfo=function(a){var b=1*a.RECORDS/this._Cfg.EWA_PAGESIZE,c=Math.round(b);c<b&&c++;this._Cfg._TOTALPAGE=
c;a=" ["+this._Cfg.EWA_PAGECUR+"/ <b >"+c+"</b> ("+a.RECORDS+")] ";if(b=$X(this._ClassName+"_records"))b.innerHTML=a};this.create_sort=function(a){var b=$J2MAP(a.CFG,"NAME"),c=[];for(d in EWA.F.FOS[a.FRAME_UNID].ItemList.Items)"1"==$(EWA.F.FOS[a.FRAME_UNID].ItemList.Items[d]).find("OrderSearch Set").attr("IsOrder")&&c.push(d);var d=[];d.push('<p class="sort-item" onclick="'+this._ClassName+'.do_sort(null,this)">\u6e05\u9664\u6392\u5e8f<b class="fa fa-times"></b></p>');for(var e=0;e<c.length;e++){var f=
c[e];b[f]&&(a=b[f].DES,d.push('<div  class="sort-item" onclick="'+this._ClassName+".do_sort(&quot;"+f+'&quot;,this)"><nobr><i class="fa fa-circle-o"></i>&nbsp;'+a+'&nbsp;<b class="fa"></b></nobr></div>'))}return d.join("")};this.do_sort=function(a,b){var c=$(".sort_items")[1];$(c).find(".sort-item i").attr("class","fa fa-circle-o");$(c).find(".sort-item b").attr("class","fa");if(a){var d=$(b).attr("desc");null==d||""==d?(a+=" DESC",$(b).attr("desc","desc"),d="fa fa-caret-down"):($(b).attr("desc",
""),d="fa fa-caret-up");$(b).find("i").attr("class","fa fa-dot-circle-o");$(b).find("b").attr("class",d)}this._Cfg.EWA_LF_ORDER=a;this._Cfg.EWA_PAGECUR=1;this.load_box_data();c.style.display="none";c.setAttribute("show","")};this.create_filter=function(a){var b=EWA.F.FOS[a.FRAME_UNID]._SearchJson,c=[],d=$J2MAP(a.CFG,"NAME"),e=[],f;for(f in b){var g=b[f];try{if("fix"==g.T){c.push("<select onchange='"+this._ClassName+".do_filter(this)' search_type='"+g.T+"' search_tag='"+f+"'>");c.push("<option value=''>--"+
d[f].DES+"--</option>");for(var h=0;h<g.D.length;h++)a=g.D[h],c.push('<option value="'+a[0]+'">'+a[1]+"</option>");c.push("</select>")}else if("text"==g.T)e.push("<div class='search_input'><input search_type='"+g.T+"' old='' onblur='"+this._ClassName+".checkTextChange(this)' search_tag='"+f+"' type=text placeholder=\""+d[f].DES+'"/></div>');else if("date"==g.T){var k=("D"+Math.random()).replace(".","A");e.push("<div class='search_input'><input style='width:43%' id='"+k+"' onclick=\"EWA.UI.Calendar.Pop(this)\" search_tag='"+
f+"' search_type='"+g.T+"' old='' onblur='"+this._ClassName+".checkTextChange(this)' type=text placeholder=\""+d[f].DES+"\"/> <input style='width:43%' id='"+k+"_1' old='' onblur='"+this._ClassName+'.checkTextChange(this)\' onclick="EWA.UI.Calendar.Pop(this)" type=text placeholder="'+d[f].DES+'"/></div>')}}catch(l){console.log(l),console.log(f),console.log(g)}}return[c,e]};this.toolBarClick=function(a){var b=a.className;if(0<b.indexOf("fa-table"))this.last_but!=a&&(this.last_but=a,$(a).parent().find(".aa").show(),
this.load_box_data());else if(0<b.indexOf("fa-list"))this.last_but!=a&&(this.last_but=a,$(a).parent().find(".aa").hide(),a=new EWA_UrlClass,a.SetUrl(this._JSON_URL),a.RemoveParameter("ewa_ajax"),a.AddParameter("ewa_ajax","install"),a.RemoveParameter("ewa_box"),a.RemoveParameter("xmlname"),a.AddParameter("xmlname","|"+this._Cfg.xmlname),(new EWA.C.Ajax).Install(a.GetUrl(),"",this._Cfg.new_parent_id,function(){}));else if(0<b.indexOf("fa-search")){b=this._ClassName+"_search";b=$($X(b));var c=$(a).offset(),
d=c.left;a=c+$(a).height+20;b.css({top:a,left:d,"z-index":1E4}).show()}else 0<b.indexOf("fa-sort")?(b=this._ClassName+"_sort",b=$($X(b)),c=$(a).offset(),d=c.left,a=c+$(a).height+20,b.css({top:a,left:d,"z-index":1E4}).show()):0<b.indexOf("fa-fast-forward")?(this._Cfg.EWA_PAGECUR=this._Cfg._TOTALPAGE,this.load_box_data()):0<b.indexOf("fa-forward")?(a=1*this._Cfg.EWA_PAGECUR+1,a>this._Cfg._TOTALPAGE?$Tip("\u5df2\u7ecf\u5230\u9875\u5c3e\u4e86"):(this._Cfg.EWA_PAGECUR=a,this.load_box_data())):0<b.indexOf("fa-backward")?
(a=1*this._Cfg.EWA_PAGECUR-1,0==a?$Tip("\u5df2\u7ecf\u5230\u9875\u5934\u4e86"):(this._Cfg.EWA_PAGECUR=a,this.load_box_data())):0<b.indexOf("fa-fast-backward")&&(this._Cfg.EWA_PAGECUR=1,this.load_box_data())};this.checkTextChange=function(a){var b=a.getAttribute("old"),c=a.value.trim();b!=c&&(a.setAttribute("old",c),this.do_filter(a.parentNode))};this.do_page=function(a){a=a.value;this._Cfg.EWA_PAGESIZE=a;this.FOS&&(this.FOS._PageSize=a);this._Cfg.EWA_PAGECUR=1;this.load_box_data()};this.do_filter=
function(a){a=$(".sort_items")[0];for(var b=$(a).find("[search_tag]"),c={},d=0;d<b.length;d++){var e=b[d],f=e.getAttribute("search_type");if(""!=e.value||"date"==f)if("date"==f){var g=e.value,h=$X(e.id+"_1").value;if(""!=g||""!=h)f="@!@"+e.getAttribute("search_tag")+"~!~"+f,c[f]||(c[f]=""),c[f]+="~!~"+g+"~!~"+h}else f="@!@"+e.getAttribute("search_tag")+"~!~"+f,c[f]||(c[f]=""),c[f]+="~!~"+e.value}b=[];for(var k in c)b.push(k),b.push(c[k]);this._Cfg.EWA_LF_SEARCH=b.join("");console.log(this.filterExp);
a.style.display="none";a.setAttribute("show","");this._Cfg.EWA_PAGECUR=1;this.load_box_data()};this.enq_op_main_sub_boxs=function(a){var b=$J2MAP(a.CFG,"NAME"),c=a.DATA,d=a.WF,e=this._Cfg,f=this._REF_DATA,g=$X(e.new_parent_id);if(g){g.innerHTML="";if(e.first){var h=this.enq_op_main_sub_tb();g.appendChild(h);var k=$(h.rows[0].cells[0]);k.attr({valign:"",align:"center"});k.append(e.first);$(h).addClass("ewa-box-first")}else this.enq_op_main_sub_box_but(g);g.setAttribute("sys_frame_unid",a.FRAME_UNID);
for(k=0;k<c.length;k++){h=this.enq_op_main_sub_tb();h.id=a.FRAME_UNID+"$"+c[k].EWA_KEY;g.appendChild(h);h=$(h.rows[0].cells[0]);if(e.chk&&e.chk_icons){var l=this.enq_op_main_sub_box_chk(b,c[k],e,f,d,a.FRAME_UNID);h.append(l)}l=this.enq_op_main_sub_title(b,c[k],e,f);h.append(l);l=this.enq_op_main_sub_box(b,c[k],e,f);h.append(l[0]);h.attr("json",JSON.stringify(l[1]));h.attr("json_ref",JSON.stringify(c[k]))}$(g).find(".box_des1").each(function(){this.title=GetInnerText(this)});$(g).append('<div style="clear:both"></div>')}};
this.enq_op_main_sub_box_but=function(a){var b=$(a).parentsUntil("table[id=Test1]").find(".ewa_lf_func_dact"),c=this.enq_op_main_sub_tb();a.appendChild(c);var d=$(c.rows[0].cells[0]),e=d.width()/3-10;d.attr("valign","middle");b.each(function(){var a=document.createElement("div");a.innerHTML=this.innerHTML;a.className="box_but";this.id=this.id||("sdo"+Math.random()).replace(".","P");a.id="K"+this.id;$(a).attr("fid",this.id);$(a).attr("onclick","$X(this.getAttribute('fid')).click()");$(a).css("width",
e);d.append(a)});return c};this.enq_op_main_sub_box_chk=function(a,b,c,d,e,f){var g=document.createElement("div");g.className="status";if(c.chk&&c.chk instanceof Function)try{var h=c.chk(b);var k=c.chk_icons[h];"function"==typeof k&&(k=k())}catch(l){k=l}if(null==k||""==k)k=c.icon;if(null==k||""==k)k="fa fa-gear";c=c.icon_color;"object"==typeof k&&(c=k.color,k=k.icon);0==k.trim().indexOf("fa")?g.innerHTML="<li class='"+k+"' "+(c?" style='color:"+c+"'":"")+"></li>":g.innerHTML=k;a=this.enq_op_main_sub_menu(a,
b,d,e,f);0<a.childNodes.length&&(g.setAttribute("onclick",this._ClassName+".enq_op_main_sub_menu_show(this)"),g.appendChild(a));return g};this.enq_op_main_sub_menu_show=function(a){var b=$(a).find(".box_menus")[0];if(!this.enq_op_main_sub_last_menu){var c=document.createElement("div");c.className="box_menus";c.setAttribute("onselectstart","return false");document.body.appendChild(c);this.enq_op_main_sub_last_menu=$(c);this.enq_op_main_sub_last_menu.css("z-index",1E6)}this.enq_op_main_sub_last_menu.html(b.innerHTML);
this.enq_op_main_sub_last_menu.attr("json_ref",a.parentNode.getAttribute("json_ref"));a=$(a).offset();this.enq_op_main_sub_last_menu.show();b=this.enq_op_main_sub_last_menu.height();c=$("body").height();this.enq_op_main_sub_last_menu.css({left:a.left-110,top:a.top+b>c?a.top-b-10:a.top,width:110})};this.enq_op_main_sub_menu=function(a,b,c,d,e){var f=document.createElement("div");f.className="box_menus";$(f).hide();var g=null;for(m in a){var h=a[m],k=h._ONCLICK||h.EWA_ONCLICK||h.EWA_CLICK;if(null!=
k&&""!=k)if("BUTDELETE"==h.NAME.toUpperCase())g=h;else{var l="BUTMODIFY"==h.NAME.toUpperCase()?"<b class='fa fa-edit'></b>"+h.DES:"BUTADD"==h.NAME.toUpperCase()?"<b class='fa fa-plus'></b>"+h.DES:"<b class='fa'></b>"+h.DES;k=this.replace_parameter(b,k,c);l=this.enq_op_main_sub_menu_item(l,k);l.setAttribute("refid",h.NAME);f.appendChild(l)}}if(g){var m=document.createElement("hr");f.appendChild(m);l="<b class='fa fa-trash-o'></b>&nbsp;"+g.DES;k=this.replace_parameter(b,g._ONCLICK,c);l=this.enq_op_main_sub_menu_item(l,
k);f.appendChild(l)}d&&(k=this.enq_op_main_wf_js(a,b,c,d,e)[0],l=enq_op_main_sub_menu_item("\u6d41\u7a0b\u63a7\u5236/\u5ba1\u6279",k),l.setAttribute("flow",1),l.setAttribute("onclick",this._ClassName+".enq_op_main_close_menu(event,this);eval('window.___wf_json_para='+this.parentNode.parentNode.parentNode.getAttribute('json'))"),f.appendChild(l));a="<b onclick='"+this._ClassName+".enq_op_main_close_menu(event,this)' class='fa fa-power-off close'></b>";f.setAttribute("onselectstart","return false;");
$(f).append(a);return f};this.enq_op_main_wf_js=function(a,b,c,d,e){for(var f=d.P,g=[],h=0;h<d.RID.length;h++)g.push("@"+d.RID[h]);f=f.replace(/\[RID\]/ig,g.join(","));d="EWA.UI.Dialog.OpenReloadClose('"+e+"','"+d.X+"','"+d.I+"',false,'"+(f+"&fjson=___wf_json_para")+"')";d=this.replace_parameter(b,d,c);c=[];for(h=a.length-1;0<=h;h--)e=a[h],f=e.NAME,(f=b[f+"_HTML"]||b[f])&&c.push({DES:e.DES,VAL:f});return[d,c]};this.enq_op_main_sub_menu_item=function(a,b){var c=document.createElement("a");c.innerHTML=
a;c.href="javascript:void(0)";c.setAttribute("onclick",b+";"+this._ClassName+".enq_op_main_close_menu(event,this);");c.setAttribute("box_menu_item","yes");return c};this.enq_op_main_close_menu=function(a,b){a=a||window.event;a.stopPropagation();a.cancelBubble=!0;b.parentNode.style.display="none"};this.enq_op_main_sub_box=function(a,b,c,d){d=["<table  onselectstart='return true' class='box_txt' "+(this._Cfg._Fix?"style='width:"+this._Cfg._Fix.box_txt+"px'":"")+" cellspacing=0 cellpadding=0>"];for(var e=
this._Cfg._Fix?"style='width:"+this._Cfg._Fix.box_des1+"px'":"",f=[],g=0;g<c.txt.length;g++){var h=c.txt[g],k=h.t;h=h.n;if(0==h.indexOf("<hr"))d.push("<tr><td class='box_subject' colspan=2>"),d.push(h),d.push("</td></tr>");else{if((k=this.replace_parameter(b,k))&&0<=k.indexOf("(")&&0<k.indexOf(")"))try{k=eval(k)}catch(m){}var l=a[h]?a[h].DES:h;d.push("<tr class='ewa-box-"+h+"'><td class='box_subject'><div class='box_subject1'><nobr>");d.push(l);d.push("</nobr><i class='fa fa-caret-right' style='color:#ccc'></i></div></td>");
d.push("<td class='box_des'><div class='box_des1' "+e+">");d.push(k+"</div></td></tr>");f.push({DES:l,VAL:k})}}return[d.join(""),f]};this.enq_op_main_sub_tb=function(){var a=document.createElement("table");a.className="box";a.cellSpacing=0;a.cellPadding=0;a.insertRow(-1).insertCell(-1).vAlign="top";a.setAttribute("onselectstart","return false;");this._Cfg._Fix&&$(a).css("width",this._Cfg._Fix.width);this._Cfg.page_color&&$(a).css("background",this._Cfg.page_color);this._Cfg.page_radius&&$(a).css("border-radius",
this._Cfg.page_radius);this._Cfg.page_height&&$(a).css("height",this._Cfg.page_height);return a};this.replace_parameter=function(a,b,c){var d=b,e=[];for(f in a)e["@"+f.toUpperCase()]=a[f];if(c)for(f in c)e[f]||(e[f]=c[f]);if(a=b.match(/@[a-zA-Z0-9\-\._:]*\b/ig))for(b=0;b<a.length;b++){c=a[b];var f=c.toUpperCase();d=d.replace(c,e[f+"_HTML"]||e[f]||"")}return d};this.enq_op_main_sub_title=function(a,b,c,d){if(!c.title)return"";a=[];if(c.img){a.push("<div class='box_img'>");var e="function"==typeof c.img?
c.img(b):b[c.img];var f="",g="_blank",h="";e&&""!=e?f=e.replace("_SMAILL",""):e=EWA.RV_STATIC_PATH+"/EWA_STYLE/images/pic_no.jpg";c.img_click&&(h=this.replace_parameter(b,c.img_click.toString(),d),g="");a.push("<a class='imgtb' style='background-image:url("+e+")' ");h?a.push(" href='javascript:void(0)' onclick=\""+h+'" '):""!=f&&a.push(" target='"+g+"' href=\""+f+'" ');a.push("></a>");a.push("</div>")}c.title&&(d="box_title",e="",c.img&&(d="box_title_img"),this._Cfg._Fix&&(e="width:"+this._Cfg._Fix[d]+
"px; "),c.title_color&&(e+="color:"+c.title_color),a.push("<div class='"+d+"' style='"+e+"'>"),b=this.replace_parameter(b,c.title),a.push(b),a.push("</div>"));return a.join("")};this.add_box_style=function(){}}
var EWA_UI_BoxExt={getFileLen:function(a){return null==a||isNaN(a)?a||"":1073741824<a?Math.round(a/1073741824*100)/100+"G":1048576<a?Math.round(a/1048576*100)/100+"M":1024<a?Math.round(a/1024*100)/100+"K":a+"B"},openInBox:function(a,b,c){if(!$X("EWA_UI_BoxExt_OpenInBox")){var d=[];d.push("#EWA_UI_BoxExt_OpenInBox {left: 10px;right: 10px;bottom: 10px;top: 10px;position: fixed; background-color: rgba(127, 127, 127, 0.7);display: none;padding: 5px;z-index: 1010;}");d.push("#EWA_UI_BoxExt_OpenInBox .title {height: 30px;background-color: #cdcdcd;font-size: 14px;padding: 4px;}");
d.push("#open_box .title b {color: #08c;cursor: pointer;}");var e=document.createElement("style");e.textContent=d.join("\n");document.getElementsByTagName("head")[0].appendChild(e);d=[];d.push("<div id='EWA_UI_BoxExt_OpenInBox'>");d.push("<table width=100% height=100% cellpadding=0 cellspacing=0>");d.push("<tr>");d.push('<td class="title"><b class="fa fa-power-off fa-border"');d.push(" onclick=\"$('#EWA_UI_BoxExt_OpenInBox').hide();isStopMouseWheel = false;\"></b>&nbsp;<span></span></td>");d.push("</tr>");
d.push("<tr>");d.push("<td class=\"cnt\" valign=top><div id='open_box_cnt'");d.push(" style='overflow: auto; width: 100%; height: 100%'></div></td>");d.push("</tr>");d.push("</table>");d.push("</div>");$("body").append(d.join(""))}$("#EWA_UI_BoxExt_OpenInBox").show();$("#EWA_UI_BoxExt_OpenInBox .title span").html(b);a="<iframe width=100% height=100% src='"+a+"' frameborder=0></iframe>";$("#EWA_UI_BoxExt_OpenInBox .cnt").html(a);c&&c()}};
EWA_UI_BoxExt={getFileLen:function(a){return EWA.UI.Ext.FileLen(a)},openInBox:function(a,b,c){if(!$X("EWA_UI_BoxExt_OpenInBox")){var d=[];d.push("#EWA_UI_BoxExt_OpenInBox {left: 10px;right: 10px;bottom: 10px;top: 10px;position: fixed; background-color: rgba(127, 127, 127, 0.7);display: none;padding: 5px;z-index: 1010;}");d.push("#EWA_UI_BoxExt_OpenInBox .title {height: 30px;background-color: #cdcdcd;font-size: 14px;padding: 4px;}");d.push("#open_box .title b {color: #08c;cursor: pointer;}");var e=
document.createElement("style");e.textContent=d.join("\n");document.getElementsByTagName("head")[0].appendChild(e);d=[];d.push("<div id='EWA_UI_BoxExt_OpenInBox'>");d.push("<table width=100% height=100% cellpadding=0 cellspacing=0>");d.push("<tr>");d.push('<td class="title"><b class="fa fa-power-off fa-border"');d.push(" onclick=\"$('#EWA_UI_BoxExt_OpenInBox').hide();isStopMouseWheel = false;\"></b>&nbsp;<span></span></td>");d.push("</tr>");d.push("<tr>");d.push("<td class=\"cnt\" valign=top><div id='open_box_cnt'");
d.push(" style='overflow: auto; width: 100%; height: 100%'></div></td>");d.push("</tr>");d.push("</table>");d.push("</div>");$("body").append(d.join(""))}$("#EWA_UI_BoxExt_OpenInBox").show();$("#EWA_UI_BoxExt_OpenInBox .title span").html(b);a="<iframe width=100% height=100% src='"+a+"' frameborder=0></iframe>";$("#EWA_UI_BoxExt_OpenInBox .cnt").html(a);c&&c()}};
function EWA_UI_LeftClass(){this.searchExp=this.sortExp=this.instanceName=this.objContent=this.objRecords=this.objSearchGrp=this.objSearch=this.parentId=this.lastmd=this.map=this.crm_cfg=null;this.Create=function(a){this.parentId=("EWA_UI_LeftClass"+Math.random()).replace(".","m");EWA.F.FOS[this.parentId]=this;this._Id=this.parentId;this.map=a;this.map.des=this.map.des.split(",");this.map.order=this.map.order.split(",");window!=parent&&$("body").css("background-color","transparent");a=['<link rel="stylesheet" rev="stylesheet" type="text/css" href=\''+
EWA.RV_STATIC_PATH+"/EWA_STYLE/skins/complex.css' />"];a.push("<table cellpadding=0 cellspacing=0 width=100% height=100%>");a.push("<tr>");a.push("<td width=230><div id='div_"+this.parentId+'\' class="items"></div></td>');var b="";this.map["default"]&&(b=' src="'+this.map["default"]+'" ');a.push("<td id=\"cnt\"><iframe frameborder=0 id='a2a2' "+b+' name="a2a2"');a.push("height=100% width=100%></iframe></td>");a.push("</tr>");a.push("</table>");$("body").html(a.join(""));this.instanceName="EWA.F.FOS."+
this.parentId;this.objContent=$X("div_"+this.parentId);a='<div class="search_box" onselectstart="return false">'+this.create_grp()+'<div class=" fa fa-search" style="width:100%"><input class="search" onkeyup="'+this.instanceName+".do_search()\" placeholder=\"search\"  onselectstart=\"return true\"></div></div><div class='search_records'><b class='fa fa-quote-left'></b>&nbsp;\u8bb0\u5f55\u6570\uff1a<i></i><b class='fa fa-chevron-up records-gotop'></b></div>";$("body").append(a);this.objSearch=$(".search")[0];
this.map.grp&&0<this.map.grp.length?this.objSearchGrp=$(".search-grp")[0]:(this.objContent.style.top="31px",$(".search_box").css("height",30));this.objRecords=$(".search_records i")[0];$(".search_records .records-gotop").click(function(){$(".items").first().scrollTop(0)});this.page_size=50;this.page_size=this.map.page_size?this.map.page_size:50;this.load_data();this.current_page=1};this.scroll_check=function(a){a.scrollHeight-a.scrollTop>1.2*a.clientHeight||this.current_page*this.page_size>=this.total_records||
this.is_load_data||this.load_more()};this.load_more=function(){this.current_page?this.current_page++:this.current_page=2;this._load_datas()};this.create_grp=function(){if(!this.map.grp||0==this.map.grp.length)return"";for(var a=["<div ><i class='fa fa-filter'></i><select onchange='"+this.instanceName+".do_grp(this)' class='search-grp'>"],b=0;b<this.map.grp.length;b++){var c=this.map.grp[b];a.push("<option value='"+c[1]+"'>"+c[0]+"</option>")}a.push("</select></div>");return a.join("")};this.create_sort=
function(){if(null!=this.map.order&&0!=this.map.order.length){var a=$J2MAP(this.crm_cfg,"NAME"),b=["<div openbox=1 class='sort' onclick='"+this.instanceName+".show_sort(this.childNodes[0],event)'><i openbox=1 style='line-height:16px' class='fa fa-gear'></i><table cellpadding=1 cellspacing=1 class='sort_items'><tr><td valign=top>"];b.push('<p onclick="'+this.instanceName+'.do_sort(null,this)">\u6e05\u9664\u6392\u5e8f<b class="fa fa-times"></b></p>');for(var c=0;c<this.map.order.length;c++){var d=this.map.order[c];
a[d]&&b.push('<div  class="sort_item" onclick="'+this.instanceName+".do_sort(&quot;"+d+'&quot;,this)"><nobr><i class="fa fa-circle-o"></i>&nbsp;'+a[d].DES+'&nbsp;<b class="fa"></b></nobr></div>')}b.push("</td><td valign=top></td><td valign=top></td></tr></table></div><div onclick='"+this.instanceName+".hide(this)' class='hide_but'><b style='line-height:16px' class='fa fa-caret-left'></b></div>");return b.join("")}};this.hide=function(a){this.objContent.style.display="none";this.objContent.parentNode.style.backgroundColor=
"#f1f1f1";this.objSearch.parentNode.parentNode.style.display="none";this.objRecords.parentNode.style.display="none";var b=this;this.objContent.parentNode.onclick=function(){b.show()};this.objContent.parentNode.appendChild(a);this.hideButton=a;$(this.objContent.parentNode).animate({width:"30px"},300)};this.show=function(){this.objSearch.parentNode.appendChild(this.hideButton);var a=this;$(this.objContent.parentNode).animate({width:"230px"},300,function(){a.objContent.parentNode.style.backgroundColor=
"";a.objContent.style.display="";a.objRecords.parentNode.style.display="";a.objSearch.parentNode.parentNode.style.display=""})};this.do_sort=function(a,b){var c=$(".sort_items")[0];$(c).find(".sort_item i").attr("class","fa fa-circle-o");$(c).find(".sort_item b").attr("class","fa");if(a){var d=$(b).attr("desc");null==d||""==d?(a+=" DESC",$(b).attr("desc","desc"),d="fa fa-caret-down"):($(b).attr("desc",""),d="fa fa-caret-up");$(b).find("i").attr("class","fa fa-dot-circle-o");$(b).find("b").attr("class",
d)}this.sortExp=a;this.current_page=1;this._load_datas();c.style.display="none";c.setAttribute("show","")};this.do_grp=function(a){this.current_page=1;this._load_datas()};this.do_filter=function(a){a=$(".sort_items")[0];for(var b=$(a).find("[search_tag]"),c={},d=0;d<b.length;d++){var e=b[d],f=e.getAttribute("search_type");if(""!=e.value||"date"==f)if("date"==f){var g=e.value,h=$X(e.id+"_1").value;if(""!=g||""!=h)f="@!@"+e.getAttribute("search_tag")+"~!~"+f,c[f]||(c[f]=""),c[f]+="~!~"+g+"~!~"+h}else f=
"@!@"+e.getAttribute("search_tag")+"~!~"+f,c[f]||(c[f]=""),c[f]+="~!~"+e.value}b=[];for(var k in c)b.push(k),b.push(c[k]);this.filterExp=b.join("");a.style.display="none";a.setAttribute("show","");this.current_page=1;this._load_datas()};this.do_search=function(){var a=$(this.objSearch),b=a.val(),c=a.attr("old_val");b!=c&&(a.attr("old_val",b),this.searchExp="@!@"+this.map.search+"~!~text~!~"+b,this.current_page=1,this._load_datas())};this._load_datas=function(){this.is_load_data=!0;var a=$U2(this.map.XMLNAME,
this.map.ITEMNAME,this.map._URL_PARAS,!0);this.sortExp&&""!=this.sortExp&&(a+="&EWA_LF_ORDER="+this.sortExp.toURL());var b="";this.searchExp&&""!=this.searchExp&&(b=this.searchExp);this.filterExp&&""!=this.filterExp&&(b+=this.filterExp);""!=b&&(a+="&EWA_LF_SEARCH="+b.toURL());this.objSearchGrp&&(a+="&"+this.objSearchGrp.value);this.current_page&&(a+="&EWA_PAGECUR="+this.current_page);a+="&EWA_PAGESIZE="+this.page_size;var c=this,d=(new Date).getTime();this._load_datas_post_time=d;$J(a,function(a){d==
c._load_datas_post_time&&(c.total_records=a.RECORDS,c.show_pages(),c.show_data(a.DATA,[!0]),c.is_load_data=!1)})};this.show_sort=function(a,b){b=b||event;1==(b.srcElement||b.target).getAttribute("openbox")&&(a=$(a).next(),null==a.attr("show")||""==a.attr("show")?(a.show(),a.css({top:20,right:4}),a.attr("show",1)):(a.hide(),a.attr("show","")))};this.load_data=function(){if(EWA&&EWA.F&&EWA.F.FOS)for(var a in EWA.F.FOS){var b=EWA.F.FOS[a];if(b.LEFT_CLASS==this){var c=b;break}}b={};if(c){c=c.Url;var d=
new EWA_UrlClass;d.SetUrl(c);for(a in d._Paras)"XMLNAME"!=a&&"ITEMNAME"!=a&&"EWA_LEFT"!=a&&(b[a]=d._Paras[a])}d=new EWA_UrlClass;d.SetUrl(window.location.href);for(a in d._Paras)"XMLNAME"!=a&&"ITEMNAME"!=a&&"EWA_LEFT"!=a&&(b[a]=d._Paras[a]);b.EWA_FRAMESET_NO=1;b.EWA_AJAX="json_ext1";c=[];for(a in b)c.push(a+"="+((b[a]||"")+"").toURL());this.map._URL_PARAS=c.join("&");a=$U2(this.map.XMLNAME,this.map.ITEMNAME,this.map._URL_PARAS,!0);this.objSearchGrp&&(a+="&"+this.objSearchGrp.value);a+="&EWA_PAGESIZE="+
this.page_size;$J(a,this.load_data1,this)};this.create_filter=function(a){var b=[],c=$J2MAP(this.crm_cfg,"NAME"),d=[],e;for(e in a){var f=a[e];if("fix"==f.T){b.push("<select onchange='"+this.instanceName+".do_filter(this)' search_type='"+f.T+"' search_tag='"+e+"'>");b.push("<option value=''>--"+c[e].DES+"--</option>");for(var g=0;g<f.D.length;g++){var h=f.D[g];b.push('<option value="'+h[0]+'">'+h[1]+"</option>")}b.push("</select>")}else"text"==f.T?d.push("<div class='search_input'><input search_type='"+
f.T+"' old='' onblur='"+this.instanceName+".checkTextChange(this)' search_tag='"+e+"' type=text placeholder=\""+c[e].DES+'"/></div>'):"date"==f.T&&(g=("D"+Math.random()).replace(".","A"),d.push("<div class='search_input'><input style='width:43%' id='"+g+"' onclick=\"EWA.UI.Calendar.Pop(this)\" search_tag='"+e+"' search_type='"+f.T+"' old='' onblur='"+this.instanceName+".checkTextChange(this)' type=text placeholder=\""+c[e].DES+"\"/> <input style='width:43%' id='"+g+"_1' old='' onblur='"+this.instanceName+
'.checkTextChange(this)\' onclick="EWA.UI.Calendar.Pop(this)" type=text placeholder="'+c[e].DES+'"/></div>'))}return[b,d]};this.checkTextChange=function(a){var b=a.getAttribute("old"),c=a.value.trim();b!=c&&(a.setAttribute("old",c),this.do_filter(a.parentNode))};this.load_data1=function(a,b){b=b[0];0==a.DATA.length&&b.noDataFunc&&b.noDataFunc();b.crm_cfg=a.CFG;var c=$J2MAP(b.crm_cfg,"NAME");b.CFG_MAP=c;b.WF=a.WF;b.FRAME_UNID=a.FRAME_UNID;b.show_data(a.DATA);b.total_records=a.RECORDS;b.show_pages();
c=b.create_sort();$(b.objSearch).parent().append(c);c=a.FRAME_UNID;EWA_Utils.JsRegister(a.JSFRAME);a=b.create_filter(EWA.F.FOS[c]._SearchJson);c=1;var d=$(b.objSearch).parent().find(".sort_items");if(0<a[0].length){var e='<p on1click="'+this.instanceName+'.do_sort(null,this)">\u7b5b\u9009</p>';d.find("td:eq(1)").css("width",140).append(e+a[0].join(""));c++}else d.find("td:eq(1)").hide();0<a[1].length?(e='<p on1click="'+this.instanceName+'.do_sort(null,this)">\u68c0\u7d22</p>',d.find("td:eq(2)").css("width",
140).html(e+a[1].join("")),c++):d.find("td:eq(2)").hide();d.css("width",144*c);b.init_scroll||(b.init_scroll=!0,b.objContent.setAttribute("onscroll",b.instanceName+".scroll_check(this)"))};this.show_pages=function(){this.objRecords.innerHTML=this.total_records+", "+this.current_page+"/ "+Math.ceil(this.total_records/this.page_size)};this.load_after=function(){};this.show_data=function(a,b){var c=$(this.objContent);1==this.current_page&&null!=b&&0<b.length&&1==b[0]&&c.find(".item").remove();for(b=
0;b<a.length;b++){var d=this.show_data1(a[b],b);c.append(d)}this.load_after&&this.load_after()};this.show_data1=function(a,b){var c=document.createElement("div");c.setAttribute("fid",("ITEM_"+Math.random()).replace(".","k"));c.className="item";var d=document.createElement("h1"),e=this.replace_parameter(a,this.map.title),f=$(this.objSearch).val();f&&""!=f&&(e=e.replace(f,"<span style='color:red'>"+f+"</span>"));f=this.total_records?this.total_records:this.page_size;f=8*((10>f?10:f)+"").split("").length+
2;d.innerHTML="<span class=idx style='width:"+f+"px'>"+(b+1+(this.current_page-1)*this.page_size)+"</span>"+e;d.title=e;$(d).css({"white-space":"nowrap",overflow:"hidden","text-overflow":"ellipsis"});c.appendChild(d);b=document.createElement("ol");for(var g in this.map.des)if(d=this.map.des[g],this.CFG_MAP[d]){e=document.createElement("li");f=this.CFG_MAP[d].NAME;var h=a[f+"_HTML"];if(null==h||""==h)h=a[f];null!=h&&""!=h&&(e.innerHTML=this.CFG_MAP[d].DES+":&nbsp; "+h,b.appendChild(e))}c.appendChild(b);
$(b).css({"white-space":"nowrap",overflow:"hidden","text-overflow":"ellipsis",margin:4,padding:"4px 18px"});g=this.replace_parameter(a,this.map.key);c.id=g;c.setAttribute("onmousedown",this.instanceName+".md(this)");this.WF&&(a=this.create_item_wf(a),c.appendChild(a));return c};this.create_item_wf=function(a){for(var b=this.WF,c=b.P,d=[],e=0;e<b.RID.length;e++)d.push("@"+b.RID[e]);c=c.replace(/\[RID\]/ig,d.join(","));c="EWA.UI.Dialog.OpenReloadClose('"+this.FRAME_UNID+"','"+b.X+"','"+b.I+"',false,'"+
(c+"&fjson=___wf_json_para")+"')";c=this.replace_parameter(a,c);b=document.createElement("a");b.innerHTML="\u6d41\u7a0b\u63a7\u5236/\u5ba1\u6279";b.setAttribute("flow",1);b.setAttribute("onclick","eval('window.___wf_json_para='+this.getAttribute('json'));"+c);c=[];for(var f in this.crm_cfg)d=this.crm_cfg[f],"span"==d.TAG&&(d={DES:d.DES,VAL:a[d.NAME+"_HTML"]||a[d.NAME]},d.VAL&&c.push(d));b.setAttribute("json",JSON.stringify(c));b.style.display="none";return b};this.md=function(a){this.lastmd&&(this.lastmd.className=
this.lastmd.className.replace(" md",""));a.className+=" md";this.lastmd=a;var b=this.map.u;if(b){0<this.map.u.indexOf("()")&&(b=eval(this.map.u));b=b+(0<b.indexOf("?")?"&":"?")+a.id+"&_fid_="+a.getAttribute("fid");if(this.objSearchGrp){var c=this.objSearchGrp.value;""!=c&&(b+="&"+c)}(c=$U())&&(b+="&"+c);this.AddTab?(a=GetInnerText($(a).find("h1")[0]),this.AddTab(b,a)):window.frames.a2a2.location.href=b}else window.frames[0].document.body.innerHTML='<h1 style="color:Red">json.u\u6ca1\u5b9a\u4e49,\u4e0d\u77e5\u9053\u8981\u5bfc\u822a\u5230\u54ea\u91cc</h1>'};
this.replace_parameter=function(a,b,c){var d=b,e=[];if(!a.____S2){for(var f in a)e["@"+f.toUpperCase()]=a[f];if(c)for(f in c)e[f]||(e[f]=c[f]);a.____S2=e}e=a.____S2;a=b.match(/@[a-zA-Z0-9\-\._:]*\b/ig);for(b=0;b<a.length;b++)c=a[b],f=(f=e[c.toUpperCase()])||"-",d=d.replace(c,f);return d}}
function EWA_ComplexClass(){this.Resources={};this.edit=function(a,b){var c=$X(a);$(c).offset();if(1!=c.getAttribute("is_open"))this.changeEdit(a,!1),b.innerHTML='<i class="fa fa-save"></i>',c.setAttribute("is_open",1),b.setAttribute("_title","enus"==EWA.LANG?"Save":"\u4fdd\u5b58");else{var d=$("#"+a).find("form")[0].id.replace("f_","");if(!EWA.F.FOS[d].DoPostBefore()||!EWA.F.FOS[d].CheckValidAll($("#f_"+d)[0]))return;$(c).find("input[id=butOk]").click();this.changeEdit(a,!0);b.innerHTML='<i class="fa fa-edit"></i>';
c.setAttribute("is_open",0);b.setAttribute("_title","enus"==EWA.LANG?"Edit":"\u7f16\u8f91")}this.focusObject(c)};this.focusObject=function(a,b){var c=$(a).offset();b?$("body").animate({scrollTop:c.top-40},300,b):$("body").animate({scrollTop:c.top-40},300);$(".pop_title").hide();a=$(a).prev().find(".fa-expand");0<a.length&&a.click()};this.goItem=function(a,b){var c=$X(a);if(null==c)alert("EWA_ComplexClass.goItem "+a+" not found");else{var d=$(c).offset();$("body").animate({scrollTop:d.top+30},300);
b?b():window["__timer_"+a]=setInterval(function(){b&&(window.clearInterval(window["__timer_"+a]),b())},111);this.focusObject($(c))}};this.changeEdit=function(a,b){a=$X(a);b&&$(a).hasClass("disabled-true")||($(a).find(".EWA_TD_B").hide(),$(a).find("select").attr("disabled",b),$(a).find("input").attr("disabled",b),$(a).find("textarea").each(function(){var a=$(this).parent();a.hasClass("ewa_redraw_info")&&0==a.find(".textarea-tip").length&&(a.css("position","relative").append("<span class='textarea-tip'>"+
$(this).attr("placeholder")+"</span>"),a.hover(function(){a.find(".textarea-tip").show()},function(){a.find(".textarea-tip").hide()}));if(0==a.find(".hide-textarea-content").length){var b="<div class='hide-textarea-content' style='display:none;overflow:auto;height:"+$(this).height()+"'>"+$(this).val()+"</div>";$(this).after(b)}a.find(".hide-textarea-content").hover(function(){$(this).parent().find(".textarea-tip").show()},function(){$(this).parent().find(".textarea-tip").hide()})}),$(a).find(".EWA_DHTML").each(function(){var a=
$(this).parent();if(a.hasClass("ewa_redraw_info")&&0==a.find(".textarea-tip").length){var b=$("#cpx_tab1 .EWA_TABLE").prop("id").replace("EWA_FRAME_",""),e=EWA.LANG?EWA.LANG.toLowerCase():"zhcn";b=$(EWA.F.FOS[b].ItemList.Items[this.id]).find("DescriptionSet Set[Lang='"+e+"']").attr("Info");a.css("position","relative").append("<span class='textarea-tip'>"+b+"</span>");a.hover(function(){a.find(".textarea-tip").show()},function(){a.find(".textarea-tip").hide()})}0==a.find(".hide-textarea-content").length&&
(b="<div class='hide-textarea-content' style='display:none;overflow:auto;height:"+$(this).height()+"'>"+$(this).find("input").val()+"</div>",$(this).after(b));a.find(".hide-textarea-content").hover(function(){$(this).parent().find(".textarea-tip").show()},function(){$(this).parent().find(".textarea-tip").hide()})}),b?($(a).addClass("disabled-true"),$(a).find("input").css("background-color","#eee"),$(a).find("textarea").hide(),$(a).find(".EWA_DHTML").hide(),$(a).find(".hide-textarea-content").show()):
($(a).removeClass("disabled-true"),$(a).find("input").css("background-color",""),$(a).find('input[ewa_class="droplist"]').css("background-color","lightyellow"),$(a).find("textarea").show(),$(a).find(".EWA_DHTML").show(),$(a).find(".hide-textarea-content").remove()))};this.textareaTip=function(a){var b=$(a).parent();0<b.find(".textarea-tip").length||(b.css("position","relative").append("<span class='textarea-tip' style=''>"+$(a).attr("placeholder")+"</span>"),b.hover(function(){b.find(".textarea-tip").show()},
function(){b.find(".textarea-tip").hide()}))};this._init=function(){this.Xml=new EWA.C.Xml;this.Xml.LoadXml(window["EWA_ITEMS_XML_"+this._Id]);this.Resources=new EWA_FrameResoures;this.Resources.Init(this.Xml);var a=window["_EWA_MENU_"+this._Id];$(".caption-info").attr("onselectstart","return false");this.add_doc_buts(a);this.init_lazy_frames_top();var b=this;addEvent(window,"scroll",function(){b.lazy_load()});this.mark_loc();this.lazy_load();document.body.style.overflow="hidden";EWA.B.MOZILLA?addEvent(window,
"DOMMouseScroll",this.my_mousewheel):addEvent(window,"mousewheel",this.my_mousewheel);a=this.getlocalStorage();for(var c in a)if("id"!=c&&a[c]&&$X(c)){var d=$($X(c)).prev().find(".fa-compress");0<d.length&&this.hide_frame(d[0])}window.open_in_box||(window.open_in_box=this.open_in_box);parent!=window&&(document.body.style.backgroundColor="transparent")};this.add_doc_buts=function(a){parent==window&&$("body").css("background-color","#ccc");if(a&&0!=a.length){for(var b=[],c=0;c<a.length;c++)b[c]=a[c];
b.push({Id:this._Id+"_comress_all",Txt:"enus"==EWA.LANG?"Hide All":"\u9690\u542b\u5168\u90e8",Cmd:"EWA.F.FOS['"+this._Id+"'].compress_all(this)",Img:"fa-compress"});for(c=b.length-1;0<=c;c--)if(a=b[c],null!=a){var d=$X("controls").rows[0].insertCell(1);d.innerHTML="<div id='"+a.Id+"' tag='"+a.Id+"' idx='"+c+"' onmouseover='EWA.F.FOS[\""+this._Id+"\"].show_title(this)' onmouseout=\"$('.pop_title').hide()\" class='but' _title=\""+a.Txt+'" '+(a.paras||"")+"><i class='fa "+a.Img+"'></i></div>";0<=a.Cmd.indexOf("function(")?
(d.childNodes[0].setAttribute("cmd",a.Cmd),d.childNodes[0].onclick=function(){var a=this.getAttribute("cmd");eval("("+a+")")(this)}):d.childNodes[0].setAttribute("onclick",a.Cmd);d.className="tdbut"}b=$("#controls").width();$("#dock").css("width",b).css("left","50%").css("margin-left",-1*b/2)}else $("#dock").hide()};this.init_lazy_frames_top=function(){this.lazy_frames=this.lazy_frames||{};var a=this;$("div[x]").each(function(){var b=$(this).offset().top;a.lazy_frames[this.id]?a.lazy_frames[this.id].top=
b:a.lazy_frames[this.id]={top:b}})};this._getBodyHeight=function(){return"CSS1Compat"==document.compatMode?document.documentElement.clientHeight:document.body.clientHeight};this.lazy_load=function(){var a=("CSS1Compat"==document.compatMode?document.documentElement.scrollTop:document.body.scrollTop)+this._getBodyHeight(),b;for(b in this.lazy_frames)this.lazy_frames[b].top<=a-10&&this.lazy_load_do(b);this.mark_loc()};this._getParas=function(){var a=new EWA_UrlClass(this.Url);a.RemoveEwa();return a.GetParas()};
this.lazy_load_do=function(a){if(!this.lazy_frames[a].ok){this.lazy_frames[a].ok=!0;var b=$("#"+a),c=b.attr("x"),d=this._getParas();d&&(d="&"+d);if(null!=c&&0<c.length){var e=b.attr("i"),f=b.attr("p"),g=b.attr("js");null==g||""==g.trim()?EWA.F.Install(a,c,e,f+d):EWA.F.Install(a,c,e,f+d,function(){eval(g)})}else{b=b.attr("u")+d+"&NO_NAV=1";var h=("iframe_lazy_"+Math.random()).replace(".","A");c="<iframe id='"+h+"' name='"+h+"' width=100% height=100% frameborder=0 src='"+b+"'></iframe>";$X(a).innerHTML=
c;var k=-1,l=0<b.indexOf("combine.jsp")?!0:!1;setInterval(function(){var a=window.frames[h];if(a&&a.document&&"complete"==a.document.readyState&&a.$){var b=l?$("[id=crm_main_box]:visible").height():a.document.body.offsetHeight;100>Math.abs(k-b)||(k=b,$("#"+h).css("height",b+10),a.document.body.style.overflow="hidden")}},777)}}};this.mark_loc=function(){for(var a=$(".fcaption"),b=$("#nav_left .top"),c=$("#nav_left .bottom"),d=$("#nav_left"),e=this._getBodyHeight(),f=0;f<a.length;f++){var g=a[f],h=
this.mark_loc_ref(g,f);g=$(g);g=g.offset().top-("CSS1Compat"==document.compatMode?document.documentElement.scrollTop:document.body.scrollTop);g>e-c.height()?c.append(h):g<b.height()?b.append(h):(h.css({bottom:"",top:g}),d.append(h))}};this.mark_loc_ref=function(a,b){if(null==a.id||""==a.id)a.id=Math.random();var c=a.id;a=$(a);var d=$X("zzz"+c),e='EWA.F.FOS["'+this._Id+'"].';if(!d){d="c"+b%5;a.attr("class",a.attr("class")+" "+d);a.html("<b onclick='"+e+"max_frame(this)' class='fa fa-thumb-tack '>&nbsp;</b>"+
a.html());var f=a.css("background-color");a.parent().css("border-bottom-color",f);d=document.createElement("div");d.style.backgroundColor=f;d.id="zzz"+c;$("#nav_left").append(d);d.onclick=function(){var a=this.id.replace("zzz","");a=$($X(a)).offset().top;"CSS1Compat"==document.compatMode?$(document.documentElement).animate({scrollTop:a},300):$("body").animate({scrollTop:a},300)};d.title=a.text();d.innerHTML=b+1;d.onmouseover=function(){$(".pop_title_left div").html(this.title);var a=$(this).offset();
$(".pop_title_left").show().css("top",a.top-10).css("right",45)};d.onmouseout=function(){$(".pop_title_left").hide()};a.append('&nbsp;<i class="fa fa-compress" onclick='+e+"hide_frame(this)></i>");a.append('&nbsp;<i class="fa fa-refresh" onclick='+e+"reload_frame(this)></i>")}return $(d)};window.isStopMouseWheel=!1;this.my_mousewheel=function(a){if(!isStopMouseWheel){a=a.wheelDelta||a.detail;var b="CSS1Compat"==document.compatMode?document.documentElement:document.body;b.scrollTop=EWA.B.MOZILLA?b.scrollTop+
3*a:b.scrollTop-a}};this.show_title=function(a){if(""==a.getAttribute("_title")||null==a.getAttribute("_title")){var b=a.title;if(""==b||null==b)return;a.setAttribute("_title",b);a.title=""}$(".pop_title div").html(a.getAttribute("_title"));b=$(a).offset();a=$(a).width();var c=$(".pop_title").height(),d=$(".pop_title").width();$(".pop_title").css("top",b.top-c-8);$(".pop_title").show();$(".pop_title").css("left",b.left-(d-a)/2)};this.compress_all=function(a){a=$(a);if(null==a.attr("compress")||""==
a.attr("compress")){a.attr("compress",1);a.find("i").attr("class","fa fa-expand");var b="fa-compress";a.attr("_title","enus"==EWA.LANG?"Show All":"\u663e\u793a\u5168\u90e8")}else a.attr("compress",""),a.find("i").attr("class","fa fa-compress"),b="fa-expand",a.attr("_title","enus"==EWA.LANG?"Hide All":"\u9690\u542b\u5168\u90e8");var c=this;$(".fcaption ."+b).each(function(){c.hide_frame(this)})};this.getlocalStorage=function(){var a="ROBERT_"+location.pathname;if(0<a.indexOf("/cgi-bin/")){var b=new EWA_UrlClass;
b.SetUrl(window.location.href);var c=b.GetParameter("xmlname");b=b.GetParameter("itemname");c&&b&&(a="EWA_"+c+"GdX"+b)}c={};if(window.localStorage[a])try{c=eval("__json="+window.localStorage[a]+"; __json;")}catch(d){c={}}c.id=a;return c};this.hide_frame=function(a){var b=$(a.parentNode.parentNode);b=b.next();var c=$(a);a=!1;null==c.attr("compress")||""==c.attr("compress")?(c.attr("compress",1),c.attr("class","fa fa-expand"),b.hide(),this.init_lazy_frames_top(),this.lazy_load(),a=!0):(c.attr("compress",
""),c.attr("class","fa fa-compress"),this.init_lazy_frames_top(),b.show());c=this.getlocalStorage();c[b.attr("id")]=a;window.localStorage[c.id]=JSON.stringify(c)};this.max_frame=function(a){a=$(a.parentNode.parentNode);$('<p id="_MAX_FRAME___"></p>').insertBefore(a);var b=a.next();isStopMouseWheel=!0;if(!$X("MAX_FRAME___")){var c=document.createElement("div");c.id="MAX_FRAME___";$(c).css({position:"fixed",left:10,right:10,top:10,bottom:10,"background-color":"rgba(255,255,255,0.9)","z-index":1E7,"padding-top":5,
overflow:"auto","border-radius":5});c.innerHTML='<div style="position:fixed;left:15px;top:15px;font-size:16px;color:#fff;cursor:pointer;width:20px;height:20px;border-radius:10px;text-align:center;background-color:#111;"  onclick=EWA.F.FOS["'+this._Id+'"].remove_max()><b style="line-height:20px" class="fa fa-times"></b></div>';document.body.appendChild(c)}c=$("#MAX_FRAME___");c.append(a);a.find(".fa").hide();c.append(b);b.show();c.show()};this.remove_max=function(){for(var a=$X("MAX_FRAME___"),b=$("#_MAX_FRAME___"),
c=0;1<a.childNodes.length;){var d=a.childNodes[1];$(d).insertBefore(b);$(d).find(".fa").show();c++;if(5<c)break}b.remove();$(a).hide();isStopMouseWheel=!1};this.reload_frame=function(a){a=a.parentNode.parentNode;a=a.nextElementSibling?a.nextElementSibling:a.nextSibling;var b=a.getAttribute("r");null!=b&&""!=b?eval(b):(b=$(a).find(".EWA_TABLE"),0<b.length?(b=b[0].id.replace("EWA_LF_","").replace("EWA_FRAME_",""),EWA.F.FOS[b]instanceof EWA_FrameClass?(b=EWA.F.FOS[b].Url,(new EWA_AjaxClass).Install(b,
"EWA_AJAX=INSTALL",a.id,function(){change_edit("disabled")})):EWA.F.FOS[b].Reload()):"grp_fin_all"==a.id?load_grp_fin_total():(a=a.getElementsByTagName("iframe"),0<a.length&&(a[0].src=a[0].src)))};this.open_in_box=function(a,b){$("#open_box").show();$("#open_box .title span").html(b);a=a.replace(/\|/ig,"%7c");a="<iframe width=100% height=100% src='"+a+"' frameborder=0></iframe>";$("#open_box .cnt").html(a);isStopMouseWheel=!0}}
function focus_object(a,b){var c=$(a).offset();b?$("body").animate({scrollTop:c.top-40},300,b):$("body").animate({scrollTop:c.top-40},300);$(".pop_title").hide();a=$(a).prev().find(".fa-expand");0<a.length&&a.click()}
function EWA_UI_ADListClass(){this._TimeOut=3E3;this._Width=515;this._Height=223;this._List=[];this._Object=null;this._CurIndex=0;this._GotoIndex=-1;this.ClassName=null;this.Timer=-1;this._CssSize="";this.IsAutoPaly=!0;this.SetSize=function(a,b){this._Width=a;this._Height=b;this._CssSize="width:"+this._Width+(isNaN(this._Width)?"":"px")+";height:"+this._Height+(isNaN(this._Height)?"":"px")};this.AddAd=function(a,b,c,d){var e={};e.ImgUrl=a;e.AdUrl=b;e.AdText=c;e.Target=d;this._List.push(e)};this.Change=
function(){window.clearTimeout(this.Timer);var a=this._Object.getElementsByTagName("a"),b=this._Object.getElementsByTagName("table")[0].rows[0];b.cells[1].childNodes[this._CurIndex].style.backgroundColor="#000";b.cells[1].childNodes[this._CurIndex].style.color="#fff";var c=a[this._CurIndex];-1==this._GotoIndex?(this._CurIndex++,this._CurIndex==this._List.length&&(this._CurIndex=0)):(this._CurIndex=this._GotoIndex,this._GotoIndex=-1);a=a[this._CurIndex];b.cells[1].childNodes[this._CurIndex].style.backgroundColor=
"white";b.cells[1].childNodes[this._CurIndex].style.color="#000";EWA.UI.Utils.FadeIn(a,c,10,80,this)};this.ChangeAfter=function(){var a=this._Object.getElementsByTagName("table")[0].rows[0].cells[0].childNodes[0];a.innerHTML=this._List[this._CurIndex].AdText;a.href=this._List[this._CurIndex].AdUrl;a.target=this._List[this._CurIndex].Target;this.IsAutoPaly&&(window.clearTimeout(this.Timer),this.Timer=window.setTimeout(this.ClassName+".Change()",this._TimeOut))};this.CreateByUrl=function(a,b){this._ParentId=
b;EWA.UI.Utils.FADE_AJAX=new EWA.C.Ajax;EWA.UI.Utils.FADE_AJAX.Get(a,eval(this.ClassName+".AjaxCallBack"));EWA.UI.Utils.FADE=this};this.AjaxCallBack=function(){var a=EWA.UI.Utils.FADE_AJAX;4==a._Http.readyState&&(a.HiddenWaitting(),200==a._Http.status?(EWA.UI.Utils.FADE._List=eval(a._Http.responseText),EWA.UI.Utils.FADE.Create()):alert("ERROR:\r\n"+a._Http.statusText),EWA.SHOW_ERROR=!0)};this.Create=function(a){null==a&&(a=this._ParentId);var b=$X(a);if(null==b)alert("ID("+a+") Not Exists!");else{a=
document.createElement("DIV");a.style.width=this._Width+(isNaN(this._Width)?"":"px");a.style.height=this._Height+(isNaN(this._Height)?"":"px");a.style.overflow="hidden";var c=[];c.push('<div style="position: relative;'+this._CssSize+'"><div style="z-index:0;position: absolute;'+this._CssSize+'"></div>');c.push('<div style="position: absolute; height: 20px; width: '+this._Width+"px; left: 0px; top:"+(this._Height-22)+'px; border: 1px black solid; background-color: #000; filter: Alpha(Opacity=20); opacity: 0.2;z-index:1"></div>');
c.push('<table style="z-index:2;position:absolute;height:20px; width:'+this._Width+(isNaN(this._Width)?"":"px")+"; left: 0px;top:"+(this._Height-22)+'px; font-size: 12px;color: white" cellpadding="0" cellspacing="0"><tr><td align="center"><a style="color:white"></a></td><td style="width:'+24*this._List.length+'px;"></td></tr></table>');c.push("</div>");a.innerHTML=c.join("");b.innerHTML="";b.appendChild(a);this._Object=a;this._CreateList();this.ChangeAfter()}};this._CreateList=function(){for(var a=
this._Object.getElementsByTagName("table")[0].rows[0].cells[1],b=0;b<this._List.length;b++){var c=this._List[b],d=document.createElement("div");d.style.cssText="filter:Alpha(Opacity=70);width: 18px; height: 18px; float: left; text-align: center; color: #fff; margin-right: 2px; font-family: arial; cursor: pointer; opacity: 0.7; border-radius: 9px;line-height: 18px; background-color: #000;";d.innerHTML=b+1;a.appendChild(d);d.setAttribute("instancename",this.ClassName);d.onclick=function(){var a=eval("window."+
this.getAttribute("instancename"));window.clearTimeout(a.Timer);a._GotoIndex=1*this.innerHTML-1;a.Change()};d=document.createElement("div");d.style.cssText="background-image:url('"+c.ImgUrl+"');  "+this._CssSize+";background-repeat: no-repeat; background-size: cover;-moz-background-size: cover;-webkit-background-size: cover;background-position: center center;";d.title=c.AdText;var e=document.createElement("a");e.style.cssText=this._CssSize;e.style.position="absolute";e.style.top="0em";e.style.left=
"0em";0<b&&(e.style.display="none");e.style.zIndex=b;e.href=c.AdUrl;e.target=null==c.Target?"_blank":c.Target;e.appendChild(d);this._Object.childNodes[0].childNodes[0].appendChild(e)}}}
function EWA_UI_ADFlagClass(){this._ClassName=null;this._List=[];this._Ads=[];this.AddAd=function(a,b,c,d,e,f,g){var h={};h.IMG_SRC=a;h.URL=b;h.TOP=c;h.LEFT=d;h.IMG_WIDTH=e;h.IMG_HEIGHT=f;h.IS_FROM_CENTER=g;this._List.push(h)};this.Create=function(a){for(var b=0;b<this._List.length;b++)this._CreateObj(this._List[b]);if(a){var c=this;document.onscroll=function(){if("undefined"!=typeof window.pageYOffset)var a=window.pageYOffset;else"undefined"!=typeof document.compatMode&&"BackCompat"!=document.compatMode?
a=document.documentElement.scrollTop:"undefined"!=typeof document.body&&(a=document.body.scrollTop);for(var b=0;b<c._Ads.length;b++)c._Ads[b].style.top=1*c._List[b].TOP+a+"px"}}};this._CreateObj=function(a){var b=1*a.LEFT;a.IS_FROM_CENTER&&(b=window.document.body.offsetWidth/2+b);var c=document.createElement("div");c.style.position="absolute";c.style.left=b+"px";c.style.top=a.TOP+"px";c.style.width=a.IMG_WIDTH+"px";c.style.height=a.IMG_HEIGHT+"px";c.innerHTML="<a href='"+a.URL+"' target='_blank'><img src='"+
a.IMG_SRC+"' border='0' width='"+a.IMG_WIDTH+"px' height='"+a.IMG_HEIGHT+"px' /></a><div style='cursor:pointer;font-size:12px;text-align:right;padding-top:2px' onclick='this.parentNode.style.display=\"none\"'>\u5173\u95ed</div>";document.body.appendChild(c);this._Ads.push(c)}}
function EWA_CombineClass(){this.EWA_COMBINES_HTML=[];this.EWA_COMBINES=[];this.ewa_lf_func_index=this.curCombineIndex=0;this.MEAGER_ITEMS=[];this._init=function(){for(var a=0;a<this.EWA_COMBINES_HTML.length;a++)this.installCfgMoveButton1(this.EWA_COMBINES_HTML[a]);if(0==this.EWA_COMBINES.length){for(a=0;a<this.MEAGER_ITEMS.length;a++)this.meargeItems(this.MEAGER_ITEMS[a]);window.lastDo&&lastDo()}else this.installCfg()};this.installCfgMoveButton1=function(a){var b=$("#"+a).find(".ewa_lf_func");if(0!=
b.length&&(b=b[0],$X(a).getElementsByTagName("table")[0].style.height="",b.style.display="none",b=b.childNodes[1],0<b.getElementsByTagName("div").length))for(b.getElementsByTagName("div")[0].style.display="none";0<b.childNodes.length;)$X("DES_"+a).appendChild(b.childNodes[0])};this.installCfg=function(){if(this.curCombineIndex<this.EWA_COMBINES.length){if(0<this.curCombineIndex){if(!$X("EWA_FRAME_MAIN")){setTimeout(installCfg,51);return}$X("EWA_FRAME_MAIN").id="a"}var a=this.EWA_COMBINES[this.curCombineIndex],
b=this;EWA.F.Install(a.id,a.x,a.i,a.p,function(a,d,e,f){b.installOk(a,d,e,f)});this.curCombineIndex++}else{for(a=0;a<this.MEAGER_ITEMS.length;a++)this.meargeItems(this.MEAGER_ITEMS[a]);window.lastDo&&lastDo()}};this.installOk=function(a,b,c,d){this.installCfgMoveButton1(c);this.installCfg()};this.showFull=function(a){var b=$("#"+a).parent("div"),c=b.find(".left"),d=$("#"+a).find(".show"),e=b.attr("full");if(null!=e&&"1"==e)b.attr("full","0"),$(document.body).css("overflow","auto"),eval("ori="+b.attr("ori")),
b.animate(r,"fast","swing",function(){b[0].style.cssText="";var e=1*b.attr("st");document.body.scrollTop=e;1==$("#crm_left_box").attr("show")&&$("#crm_left_box").show();b.css("display",b.attr("dsp"));0<d.length&&"DES_plugin"!=a?d[0].click():(e=$X(a.replace("DES_","")),e.style.width=e.parentNode.clientWidth-10+"px",e.style.height=r.height-30+"px",c.find('div[id="EWA_FRAME_MAIN"]').css("height",r.height-150))});else{b.attr("full","1");b.attr("st",document.body.scrollTop);b.attr("dsp",b.css("display"));
var f=document.documentElement.clientHeight;e=document.documentElement.clientWidth-10;var g=f-20,h=document.documentElement.clientWidth-30,k=f-20-20-15;f=b.offset();var l=b.position(),m=f.left-l.left,n=b.width(),q=b.height();var r={width:n,height:q,"margin-left":m,left:l.left,top:l.top};b.attr("ori",JSON.stringify(r));b.css({"margin-left":"0px",top:f.top,left:f.left,position:"absolute",display:"",overflow:"auto"});b.animate({width:e,height:g,left:10,top:0},"fast","swing",function(){c.css("width",
h);c.css("height",k);b.find("iframe").css("height",k);b.find('div[id="EWA_FRAME_MAIN"]').css("height",k-30);0<d.length&&"DES_plugin"!=a&&d[0].click()});document.body.scrollTop=0;"none"!=$("#crm_left_box").css("display")&&($("#crm_left_box").hide(),$("#crm_left_box").attr("show",1));$(document.body).css("overflow","hidden")}};this.meargeItems=function(a){a=a.split(",");for(var b,c,d,e=0;e<a.length;e++){var f=a[e].trim();if($X(f)){var g=$X(f.replace("DES_",""));$("#"+f);var h=[];if(0==e){b=$X(f);d=
document.createElement("div");d.id="KK_"+f;d.style.cssText="clear:both;height:25px;border-top:1px solid #cdcdcd";d.setAttribute("but","1");c=g;for(var k=1;k<$X(f).childNodes.length;k++)if(g=$X(f).childNodes[k],1<k)g.id="M"+Math.random(),h.push(g.id);else{var l=g;l.className="ewa_lf_func_caption show";if(null==l.id||""==l.id)l.id="MAx"+Math.random();l.parentNode.setAttribute("lid",l.id)}for(;2<$X(f).childNodes.length;)g=$X(f).childNodes[2],d.appendChild(g)}else for(g.parentNode.style.display="none",
c.parentNode.appendChild(g),g.style.display="none",k=0;1<$X(f).childNodes.length;)g=$X(f).childNodes[1],0<k?(g.style.display="none",g.id="M"+Math.random(),h.push(g.id),d.appendChild(g)):(l=g,b.appendChild(g)),k++;l.setAttribute("ids",h.join(","));l.setAttribute("lst",f);l.setAttribute("menu_id",d.id);var m=this;addEvent(l,"click",function(){m.meargeItems_ck(this)})}else if(0==e)return}0<d.childNodes.length&&(b.appendChild(d),b.style.height="50px")};this.meargeItems_ck=function(a){var b=a.getAttribute("menu_id"),
c=a.parentNode.getAttribute("lid");null!=c&&0<c.length&&($X(c).className="ewa_lf_func_caption hide");a.className="ewa_lf_func_caption show";if(null==a.id||""==a.id)a.id="MAx"+Math.random();a.parentNode.setAttribute("lid",a.id);$("#"+b).children("div").each(function(){$(this).hide()});$(a).parent("div").parent("div").children(".ewa_cb_left").each(function(){$(this).hide()});b=a.getAttribute("ids");if(""!=b)for(b=b.split(","),c=0;c<b.length;c++)"ewa_lf_func_caption"!=$X(b[c]).className&&($X(b[c]).style.display=
"");a=a.getAttribute("lst");a=$X(a.replace("DES_",""));a.style.display="";a.style.width=a.parentNode.clientWidth-20+"px"};this.actIframe=function(a){var b=$("#"+a).find("iframe");if(0==b.length)alert(a+" not iframe");else{var c=b[0].contentWindow,d=c.document.body.scrollHeight,e=c.document.body.scrollWidth;if(c.$){var f=0;0<c.document.body.innerHTML.indexOf("EWA.F.F.C")?(f=c.$("#Test1").height(),e=c.$("#Test1").width()):(c.$(".ewa_table").parent().parent().children().each(function(){f+=$(this).height()}),
e=c.$(".ewa_table").width());d=f}e>$("#"+a).width()&&(d+=40);300>d&&(d=330);$("#"+a).css("height",d);var g=this;"0"!=b.attr("_src")?(b.attr("src",b.attr("_src")),b.attr("_src","0"),setTimeout(function(){g.chkFrameLazyLoaded(a)},199)):(g.setFrameCss(a,c),g.afterFrameLazyLoaded(a))}};this.setFrameCss=function(a,b){if(1!=$("#"+a).attr("lnk")){var c=b.document.createElement("link");c.type="text/css";c.rel="stylesheet";c.rev="stylesheet";c.href="../../css/main.css";b.document.getElementsByTagName("head")[0].appendChild(c);
b.document.body.style.backgroundColor="#fff";$("#"+a).attr("lnk",1)}};this.afterFrameLazyLoaded=function(a){};this.chkFrameLazyLoaded=function(a){var b=$("#"+a).find("iframe")[0].contentWindow;if(b&&b.document&&b.document.body&&b.$&&"complete"==b.document.readyState){var c=[],d=$("#"+a).parent().find("div[but=1]");0<d.length&&(b.$(".ewa_lf_func_dact").each(function(b){var e=document.createElement("div");e.className="ewa_lf_func_dact";e.style.cursor="pointer";e.innerHTML=this.innerHTML;""==this.id&&
(this.id=a+"|"+Math.random());e.id=this.id;d[0].appendChild(e);e.onclick=function(){this.id.split("|");$("#"+a).find("iframe")[0].contentWindow.$X(this.id).click()};c.push(e.id);0==b&&(this.parentNode.parentNode.style.display="none")}),d.parent().find(".show").attr("ids",c.join(",")));this.actIframe(a)}else{var e=this;setTimeout(function(){e.chkFrameLazyLoaded(a)},101)}};this.showInPlugin=function(a,b){if(0<a.indexOf(".jsp"))a='<iframe width=100% height=100% frameborder=0 src="'+a+'"></iframe>',$("#plugin").html(a),
this.showFull("DES_plugin"),document.body.scrollTop=0,$X("subject_plugin").innerHTML=b;else{var c=this;(new EWA.C.Ajax).Install(a+"&EWA_AJAX=install&EWA_FRAMESET_NO=1","_r=1","plugin",function(){c.showFull("DES_plugin");document.body.scrollTop=0;$X("subject_plugin").innerHTML=b})}}}
installCfgMoveButton1=function(a){var b=$("#"+a).find(".ewa_lf_func");if(0!=b.length&&(b=b[0],$X(a).getElementsByTagName("table")[0].style.height="",b.style.display="none",b=b.childNodes[1],0<b.getElementsByTagName("div").length))for(b.getElementsByTagName("div")[0].style.display="none";0<b.childNodes.length;)$X("DES_"+a).appendChild(b.childNodes[0])};
/* EWA_MISC.min.js */
var $jscomp=$jscomp||{};$jscomp.scope={};$jscomp.findInternal=function(a,b,c){a instanceof String&&(a=String(a));for(var d=a.length,e=0;e<d;e++){var f=a[e];if(b.call(c,f,e,a))return{i:e,v:f}}return{i:-1,v:void 0}};$jscomp.ASSUME_ES5=!1;$jscomp.ASSUME_NO_NATIVE_MAP=!1;$jscomp.ASSUME_NO_NATIVE_SET=!1;$jscomp.defineProperty=$jscomp.ASSUME_ES5||"function"==typeof Object.defineProperties?Object.defineProperty:function(a,b,c){a!=Array.prototype&&a!=Object.prototype&&(a[b]=c.value)};
$jscomp.getGlobal=function(a){return"undefined"!=typeof window&&window===a?a:"undefined"!=typeof global&&null!=global?global:a};$jscomp.global=$jscomp.getGlobal(this);$jscomp.polyfill=function(a,b,c,d){if(b){c=$jscomp.global;a=a.split(".");for(d=0;d<a.length-1;d++){var e=a[d];e in c||(c[e]={});c=c[e]}a=a[a.length-1];d=c[a];b=b(d);b!=d&&null!=b&&$jscomp.defineProperty(c,a,{configurable:!0,writable:!0,value:b})}};
$jscomp.polyfill("Array.prototype.find",function(a){return a?a:function(a,c){return $jscomp.findInternal(this,a,c).v}},"es6","es3");
var EWA_UT_TansAll={tall:function(a,b){this.idx=0;this._objs_ch=a;this._objs_en=b;this.start_trans()},start_trans:function(){idx<=this._objs_ch.length-1?(this.trans_item(ipts[this.idx]),this.idx++,setTimeout(bb,123)):setTimeout(this.post_server,1231)},trans_item:function(a,b){null==this.trans&&(this.trans=new EWA_UT_TRANS);if("string"==typeof a)var c=a;else{var d=a.tagName;null==d&&(d="");d=d.toUpperCase();"SELECT"==d||"INPUT"==d||"TEXTAREA"==d?(c=a.value,a.setAttribute("ewa_trans_end","no")):""!=
d?(a.setAttribute("ewa_trans_end","no"),c=func.innerHTML):(console.log("trans_err"),console.log(a))}this.trans.TransToEn(c,b)},post_server:function(){for(var a=[],b=[],c=0;c<ipts.length;c++){var d=ipts[c].parentNode.parentNode,e=d.cells[4].getElementsByTagName("span")[0];"ok"==e.getAttribute("ewa_trans_end")&&(a.push(GetInnerText(d.cells[0])),b.push(GetInnerText(e)))}if(0!=a.length){var f=new EWA_AjaxClass;f.AddParameter("ids",a.join("`"));f.AddParameter("vals",b.join("`"));f.AddParameter("EWA_ACTION",
"EXTENDACTION2");f.AddParameter("EWA_AJAX","JSON");f.PostNew(window.location.href,function(){f.IsRunEnd()&&alert("ok")})}}};
function EWA_TransClass(){this.bingAppId="50F7C8D4BC00A6E047C046D012F334DEC61FA003";this.bingTrans="//api.microsofttranslator.com/V2/Ajax.svc/Translate?appid="+this.bingAppId;this.youdaoTrans="//fanyi.youdao.com/openapi.do?keyfrom=wwwoneworldcc&key=1597375709&type=data&doctype=jsonp&version=1.1";this._Id=("EWA_UT_TRANS"+Math.random()).replace(".","_");window[this._Id]=this;this._Trans="bing";this._IDX=0;this.IsRun=!1;this.TransToEn=function(a,b){null==a||""==a.trim()?b instanceof Function&&b(null):
(this.IsRun=!0,"bing"==this._Trans?this._trans_bing(a,b,!0):"youdao"==this._Trans?this._trans_youdao(a,b):console.log("\u6ca1\u6709\u6307\u5b9a\u7ffb\u8bd1\u5f15\u64ce"))};this.TransToCn=function(a,b){null==a||""==a.trim()?b instanceof Function&&b(null):(this.IsRun=!0,"bing"==this._Trans?this._trans_bing(a,b,!1):"youdao"==this._Trans?this._trans_youdao(a,b):console.log("\u6ca1\u6709\u6307\u5b9a\u7ffb\u8bd1\u5f15\u64ce"))};this._trans_youdao=function(a,b){var c=this._get_func_name(),d=c+"AAAAA",e=
this.transback_youdao_tmp.toString().replace("transback_youdao_tmp",""),f=this._get_user_func_str(c,d);e=e.replace("{","{"+f);eval("window."+c+"="+e);window[d]=b;b=document.createElement("script");a=a.replace(/\n/ig,"[GDX]").replace(/\r/ig,"");a=this.youdaoTrans+"&callback="+c+"&q="+a.toURL();b.src=a;document.getElementsByTagName("head")[0].appendChild(b)};this._trans_bing=function(a,b,c){var d=this._get_func_name(),e=d+"AAAAA",f=this.transback_bing_tmp.toString().replace("trans_en_back_bing_tmp",
""),g=this._get_user_func_str(d,e);f=f.replace("{","{"+g);eval("window."+d+"="+f);window[e]=b;b=document.createElement("script");d=this.bingTrans+"&oncomplete="+d;d=c?d+("&from=zh-CHS&to=en&text="+a.toURL()):d+("&from=en&to=zh-CHS&text="+a.toURL());b.src=d;document.getElementsByTagName("head")[0].appendChild(b)};this._get_user_func_str=function(a,b){return"var fromClass=window['"+this._Id+"'];\n var func=window['"+b+"']; \n var _fname='"+a+"'; \n var _fname1='"+b+"'; \n "};this._get_func_name=function(){this._IDX++;
return"___GDX_T_"+this._IDX};this.transback_bing_tmp=function(a){try{fromClass.transBackCallCommon(a,func)}catch(b){console.log(b)}delete window[_fname1];delete window[_fname]};this.transback_youdao_tmp=function(a){try{if(a&&a.errorCode){console.log(a);func instanceof Function&&func("\u7ffb\u8bd1\u5f15\u64ce\u9519\u8bef");return}if(a&&a.translation&&0<a.translation.length)a=a.translation[0];else{func instanceof Function&&func(a);console.log(a);return}fromClass.transBackCallCommon(a,func)}catch(b){console.log(b)}delete window[_fname1];
delete window[_fname]};this.transBackCallCommon=function(a,b){this.IsRun=!1;if(null==b)console.log(a);else if(b instanceof Function)b(a);else{"string"==typeof b&&(b=$X(b));var c=b.tagName;null==c&&(c="");c=c.toUpperCase();if("SELECT"==c||"INPUT"==c||"TEXTAREA"==c){if(b.value=a,b.setAttribute("ewa_trans_end","ok"),null!=b.onblur)b.onblur()}else"DIV"==c||"SPAN"==c?"DIV"==c&&$(b).attr("EWA_DHTML")?($(b).find("iframe")[0].contentWindow.frames[0].document.body.innerHTML=a,$(b).find("input[type=hidden]")[0].value=
a):(b.setAttribute("ewa_trans_end","ok"),b.innerHTML=a):console.log(a)}}}EWA_UT_TRANS=EWA_TransClass;
var EWAC_WfOrg=function(){this.Depts={};this.Posts={};this.Users={};this.GetMaster=function(a){var b=this.Users[a];if(null==b)alert(("enus"==EWA.LANG?"NONE of ":"\u6ca1\u6709\u554a")+a);else{a=b.Dept;for(var c in a.Users){b=a.Users[c];for(var d in b.Posts)if(b.Posts[d].IsMaster)return b}alert("enus"==EWA.LANG?"\tNo manager":"\u6ca1\u6709\u7ba1\u7406\u8005")}};this.IsMaster=function(a){var b=this.GetMaster(a);return null==b?!1:b.Id==a};this.InitDepts=function(a,b,c,d,e,f){for(var g=0;g<a.length;g++){var h=
a[g];if(null==this.Depts[h[b]]){var k={};k.Id=h[b];k.Name=h[c];k.Lvl=h[d];k.Ord=h[e];k.Pid=h[f];k.Posts={};k.Users={};k.Children={};this.Depts[k.Id]=k}}for(var n in this.Depts)h=this.Depts[n],this.Depts[h.Pid]?(a=this.Depts[h.Pid],h.Parent=a,a.Children[h.Id]=h):null==this.DeptRoot&&(this.DeptRoot=h)};this.InitPosts=function(a,b,c,d,e){for(var f=0;f<a.length;f++){var g=a[f],h=g[b];if(null==this.Posts[h]){var k={};k.Id=h;k.Name=g[c];k.DeptId=g[e];g=g[d];g=null==g?"":g.trim().toLowerCase();k.IsMaster=
"y"==g||"yes"==g||"true"==g||"1"==g?!0:!1;this.Depts[k.DeptId]&&(k.Dept=this.Depts[k.DeptId],null==k.Dept.Posts[k.Id]&&(k.Dept.Posts[k.Id]=k));this.Posts[h]=k}}};this.InitUsers=function(a,b,c,d,e){for(var f=0;f<a.length;f++){var g=a[f],h=g[b];if(null!=this.Users[h])var k=this.Users[h];else k={},k.Id=h,k.Name=g[c],k.DeptId=g[d],k.Posts={},this.Depts[k.DeptId]&&(k.Dept=this.Depts[k.DeptId],null==k.Dept.Users[k.Id]&&(k.Dept.Users[k.Id]=k)),this.Users[h]=k;g=g[e];this.Posts[g]&&(k.Posts[g]=this.Posts[g])}}};
(function(){var a=[];a.push('<table gdx="LINE" style="border-collapse: collapse;width:100%;height:100%;font-size:0px" cellspacing="0" cellpadding="0"><tr>');a.push('<td style="font-size: 1px; width: 50%;" valign="top">&nbsp;</td>');a.push('<td style="font-size: 1px;" valign="top">&nbsp;</td></tr>');a.push('<tr><td style="font-size: 1px" valign="bottom">&nbsp;</td>');a.push('<td style="font-size: 1px;" valign="bottom">&nbsp;</td></tr></table>');EWAC_WF_CNN_TMP=a.join("")})();
function EWAC_WfUnit(a){this.Id=a;this.Type="normal";this.IsSelected=!1;this.tagName="wfunit";this.CnnsFrom={};this.CnnsFromLength=0;this.CnnsTo={};this.CnnsToLength=0;this.IsDelete=!1;this.ChangeType=function(a){var b=$X(this.Id),d="ewa_wf_unit_img";"control"==a?d="ewa_wf_unit_img1":"end"==a&&(d="ewa_wf_unit_img2");b.getElementsByTagName("img")[0].className=d};this.ChangeDes=function(a){var b=$X(this.Id);SetInnerText(b.getElementsByTagName("td")[1].childNodes[0],a)};this.GetDes=function(){return GetInnerText($X(this.Id).getElementsByTagName("span")[0]).trimEx()};
this.Delete=function(){if(!this.IsDelete){for(var a in this.CnnsFrom)this.CnnsFrom[a].Delete();for(a in this.CnnsTo)this.CnnsTo[a].Delete();a=$X(this.Id);a.parentNode.removeChild(a)}this.IsDelete=!0};this.Log=function(a,c,d){var b=null==EWA.RV_STATIC_PATH?EWA.CP:EWA.RV_STATIC_PATH;b+="/EWA_STYLE/";var f=$X(this.Id),g=f.getElementsByTagName("img")[0];g.src=b+"images/workflow/wf_ok.png?a=1";g.style.width="38px";g.style.height="38px";g.className="";b=g.nextSibling;null!=d&&0<d.trim().length&&(f.title=
d);d="";try{d=(new EWA_Utils.Date(c)).FormatDate()}catch(h){}b.innerHTML+='<div style="font-size:9px;color:darkblue">'+a+"<br><nobr>"+d+"</nobr></div>";f.style.backgroundColor="lightyellow"};this.LogCur=function(a){var b=$X(this.Id),d=b.getElementsByTagName("img")[0],e=d.nextSibling,f=null;a&&window.parent&&window.parent.$X(a)&&(f=window.parent.$X(a),f.options.length=0,f.options[f.options.length]=new Option("",""));a=!0;for(var g in this.CnnsFrom){a=!1;var h=this.CnnsFrom[g];h.IsStop||(h.Selected(),
h=EWAC_WfUtil.WF.Units[h.To],h.LogTo(),f&&(f.options[f.options.length]=new Option(h.GetDes(),h.Id)))}d.style.width="38px";d.style.height="38px";d.className="";g=null==EWA.RV_STATIC_PATH?EWA.CP:EWA.RV_STATIC_PATH;g+="/EWA_STYLE/";a?(e.innerHTML="enus"==EWA.LANG?e.innerHTML+"<i><b>Finished</b></i>":e.innerHTML+"<i><b>\u6267\u884c\u7ed3\u675f</b></i>",d.src=g+"images/workflow/wf_no.png?A=1"):(e.innerHTML="enus"==EWA.LANG?e.innerHTML+"<i><b>Current</b></i>":e.innerHTML+"<i><b>\u5f53\u524d\u8282\u70b9</b></i>",
f&&2==f.options.length&&(f.selectedIndex=1),b.style.backgroundColor="lightblue",b.style.color="white",d.src=g+"images/workflow/wf_cur.png?A=1")};this.LogTo=function(){var a=null==EWA.RV_STATIC_PATH?EWA.CP:EWA.RV_STATIC_PATH;a+="/EWA_STYLE/";var c=$X(this.Id);c.style.backgroundColor="lightyellow";c=c.getElementsByTagName("img")[0];c.src=a+"images/workflow/wf_next.png?A=2";c.style.width="38px";c.style.height="38px";c.className=""};this.Create=function(b){var c=EWAC_WfUtil.CUR_OBJ,d=document.createElement("TABLE");
d.id=this.Id;d.className="ewa_wf_box";var e=d.insertRow(-1);e=e.insertCell(-1);e.innerHTML='<img style="cursor:pointer" class="ewa_wf_unit_img" src="'+((null==EWA.RV_STATIC_PATH?EWA.CP:EWA.RV_STATIC_PATH)+"/EWA_STYLE/")+'/images/transparent.png" id="Atom_Img_'+a+'"><div a=1></div>';e.align="center";e=d.insertRow(-1);e=e.insertCell(-1);e.align="center";e.innerHTML='<span onselectstart="return true" onkeypress="EWAC_WfUtil.AtomNameKeyPress(this)" onblur="EWAC_WfUtil.AtomChangedName(this)" ondblclick="EWAC_WfUtil.AtomChangeName(this)">\u4e1a\u52a1\u5143'+
b+"</span>";document.body.appendChild(d);d.style.position="absolute";d.style.left=c?c.style.left:120*b+"px";d.style.top=c?c.style.top:"90px";c&&(c.style.position="static")};this.MoveTo=function(a,c){var b=this.GetObj();b.style.left=1*b.style.left.replace("px","")+a+"px";b.style.top=1*b.style.top.replace("px","")+c+"px";for(var e in this.CnnsFrom)this.CnnsFrom[e].IsDelete||(this.CnnsFrom[e].Show(),this.CnnsFrom[e].Disp());for(e in this.CnnsTo)this.CnnsTo[e].IsDelete||(this.CnnsTo[e].Show(),this.CnnsTo[e].Disp())};
this.GetObj=function(){return $X(this.Id)};this.UnSelect=function(){$X(this.Id).getElementsByTagName("img")[0].className="ewa_wf_unit_img";this.IsSelected=!1;EWAC_WfUtil.SELECTED=null};this.Selected=function(){$X(this.Id).getElementsByTagName("img")[0].className="ewa_wf_unit_img1";this.IsSelected=!0;EWAC_WfUtil.SELECTED=this}}
function EWAC_WfCnn(){this.IsSelect=!1;this.To=this.From=this.Type=this.Id=null;this.tagName="wfcnn";this.IsDelete=!1;this.ChangeStyle=function(a,b){a=$X(this.Id).getElementsByTagName("td");for(b=0;b<a.length;b++);};this.Delete=function(){var a=$X(this.Id);this.IsDelete||a.parentNode.removeChild(a);this.IsDelete=!0};this._CreateObject=function(a,b){a=document.createElement("div");a.id=this.Id;a.style.width=10;a.style.height=10;a.style.position="absolute";a.style.zIndex=0;a.innerHTML=EWAC_WF_CNN_TMP;
document.body.appendChild(a)};this.Create=function(a,b){this.Id=a.Id+"G"+b.Id;this.From=a.Id;this.To=b.Id;a.CnnsFrom[this.Id]=this;a.CnnsFromLength++;b.CnnsTo[this.Id]=this;b.CnnsToLength++;this._CreateObject(a,b);this.Show()};this.Show=function(){$X(this.Id);var a=$X(this.From),b=$X(this.To),c=a.offsetLeft,d=c+a.offsetWidth,e=a.offsetTop,f=e+a.offsetHeight,g=b.offsetLeft,h=g+b.offsetWidth,k=b.offsetTop,n=k+b.offsetHeight;a=0;d<g?(b=d,d=g-d,f<k?(c=f,f=k-f,e="0T,1L,3LBA"):f>k&&f<n?(c=e,f=n-e,e="0T,1L,3LBA"):
(e>n?(c=n,f=e-n):(c=k,f-=k),e="2B,3L,1LTA"),e+="\u7b2c\u4e00"):h<c?(b=h,d=c-h,f<k?(c=f,f=k-f,e="1T,0R,2RBA"):f>k&&f<n?(c=e,f=n-e,e="2BA,3L,1LT"):e>n?(c=n,f=e-n,e="0TA,1L,3LB(\u4e09)"):(c=k,f-=k,e="0TA,1L,3LB(\u56db)"),e+="\u7b2c\u4e8c"):c>g&&c<h?(b=h,d=d-h+20,f<k?(c=f,f=k-f,a=20,e="1TR,3RB,2BA(\u5927)"):(c=n,f=e-n,a=20,e="0TA,1TR,3RB(##)")):(b=d,d=h-d+20,f<k?(c=f,f=k-f,a=20,e="0T,1TR,3RBA(\u58eb)"):(c=n,f=e-n,a=20,e="1TRA,3RB,2B(#)"));null==e&&(e="\u672a\u53d1\u73b0");document.title=e;this.Drawline(e,
b,c,d,f,a);this.Disp(1)};this.Drawline=function(a,b,c,d,e,f){var g=$X(this.Id);0>d||0>e||(g.setAttribute("type",a),g.style.left=b+"px",g.style.top=c+"px",g.style.height=e+"px",g.style.width=d+"px",0==d||0>d-f||(a=g.childNodes[0].rows[0].cells[0],g=g.childNodes[0].rows[0].cells[1],0<f?(g.style.width=f+"px",a.style.width=d-f+"px"):(g.style.width="50%",a.style.width="50%")))};this.Disp=function(a,b){var c=$X(this.Id),d=null==a?1:a;a=c.getAttribute("type");var e=c.getAttribute("w");c.childNodes[0].setAttribute("type",
a);c.childNodes[0].setAttribute("w",e);for(e=c.getElementsByTagName("img");0<e.length;)e[0].parentNode.removeChild(e[0]),e=c.getElementsByTagName("img");for(var f=0;f<e.length;f++)e[f].style.display="none";e=c.getElementsByTagName("td");for(f=0;f<e.length;f++)e[f].style.border="0px";b=(null==b?"#000":b)+" "+d+"px solid";for(f=0;f<a.length;f++)if(c=a.substring(f,f+1),""!=c.trim())if(isNaN(c))"T"==c?g.style.borderTop=b:"L"==c?g.style.borderLeft=b:"R"==c?g.style.borderRight=b:"B"==c?g.style.borderBottom=
b:"A"==c&&(3==h?"0px"!=g.style.borderLeftWidth?(c="arraw_t00.gif",g.style.textAlign="right"):(c="arraw_t01.gif",g.style.textAlign="left"):2==h?(c="arraw_t01.gif",g.style.textAlign="left"):1==h?"0px"!=g.style.borderLeftWidth?(c="arraw_t10.gif",g.style.textAlign="right"):(c="arraw_t11.gif",g.style.textAlign="left"):(c="arraw_t11.gif",g.style.textAlign="left"),d=null==EWA.RV_STATIC_PATH?EWA.CP:EWA.RV_STATIC_PATH,d+="/EWA_STYLE/",g.innerHTML='<img src="'+d+"images/workflow/"+c+'" />');else{var g=e[1*
c];var h=c}};this.UnSelect=function(){this.Disp(1);this.IsSelected=!1;EWAC_WfUtil.SELECTED=null};this.Selected=function(){this.Disp(3);this.IsSelected=!0;EWAC_WfUtil.SELECTED=this}}
function EWAC_Wf(){this.Ids=null;this._CurIdx=0;this.Units={};this.Cnns={};this.GetUnid=function(){var a=this.Ids[this._CurIdx];this._CurIdx++;return a};this._LodIds=function(){var a=EWA.CP+"/EWA_DEFINE/cgi-bin/xml/?TYPE=GUNID&NUM=100",b=new EWA_AjaxClass;b.Get(a,function(){b.IsRunEnd()&&eval("c.Ids="+b.GetRst())})};this.ClearSelects=function(){for(var a in this.Units)this.Units[a].UnSelect();EWAC_WfUtil.CUR_OBJ=null;EWAC_WfUtil.TWO=[null,null]};this.GetUnit=function(a){var b;"ewa_wf_box"==a.className?
b=a.id:-1<a.id.indexOf("Atom_Img_")&&(b=a.id.replace("Atom_Img_",""));return b?this.Units[b]:null};this.CreateUnit=function(a){a||(a=this.GetUnid());var b=new EWAC_WfUnit(a);b.Create(this._CurIdx);return this.Units[a]=b};this.CreateCnn=function(){var a=EWAC_WfUtil.TWO[0],b=EWAC_WfUtil.TWO[1];if(null==a||null==b)alert("\u9700\u8981\u4e24\u4e2a\u4e1a\u52a1\u5143");else{var c=new EWAC_WfCnn;c.Create(a,b);this.Cnns[c.Id]=c}};this.GetCnn=function(a){return this.Cnns[a.parentNode.id]}}
var EWAC_WfUtil={CUR_OBJ:null,TWO:[null,null],SELECTED:null,MouseDown:function(a){a=a?a:event;var b=EWA.B.IE?a.srcElement:a.target,c=b.tagName.toUpperCase();if("TD"==c&&"Test1"==b.parentNode.parentNode.parentNode.id)EWAC_WfUtil.WF.ClearSelects();else{var d=EWA.UI.Utils.GetMousePosition(a);EWAC_WfUtil.M_X=d.X;EWAC_WfUtil.M_Y=d.Y;if("IMG"==c)if("TEMP"==b.id)EWAC_WfUtil.CUR_OBJ=b;else{if(b=EWAC_WfUtil.WF.GetUnit(b),EWAC_WfUtil.CUR_OBJ=b)EWA.UI.Utils.GetMousePosition(a),EWAC_WfUtil.objSelectedDown(b),
EWAC_WfUtil.ShowUnitPara(b)}else"TD"==c&&(a=b.parentNode.parentNode.parentNode,"LINE"==a.getAttribute("gdx")&&(a=EWAC_WfUtil.WF.GetCnn(a),a.IsSelected?a.UnSelect():a.Selected()))}},MouseUp:function(a){a=EWAC_WfUtil.CUR_OBJ;null!=a&&("TEMP"==a.id&&EWAC_WfUtil.WF.CreateUnit(),EWAC_WfUtil.CUR_OBJ=null)},MouseMove:function(a){var b=EWAC_WfUtil.CUR_OBJ;if(null!=b){a=EWA.UI.Utils.GetMousePosition(a?a:event);var c=a.X-EWAC_WfUtil.M_X,d=a.Y-EWAC_WfUtil.M_Y;EWAC_WfUtil.M_X=a.X;EWAC_WfUtil.M_Y=a.Y;"IMG"==b.tagName?
(b.style.position="absolute",b.style.left=a.X+"px",b.style.top=a.Y+"px"):"wfunit"==b.tagName&&b.MoveTo(c,d)}},Delete:function(){var a=EWAC_WfUtil.SELECTED;null!=a&&(0==a.tagName.indexOf("wf")&&(a.Delete(),EWAC_WfUtil.TWO=[null,null],EWAC_WfUtil.SELECTED=null),EWAC_WfUtil.CUR_OBJ=null)},objSelectedDown:function(a){a.IsSelected?(a.UnSelect(),EWAC_WfUtil.TWO[0]==a&&(EWAC_WfUtil.TWO[0]=EWAC_WfUtil.TWO[1]),EWAC_WfUtil.TWO[1]=null):null==EWAC_WfUtil.TWO[1]&&(a.Selected(),null==EWAC_WfUtil.TWO[0]?EWAC_WfUtil.TWO[0]=
a:EWAC_WfUtil.TWO[1]=a)},AtomChangeName:function(a){a.contentEditable=!0;a.style.border="1px solid black"},AtomChangedName:function(a){a.contentEditable=!1;a.style.border=""},AtomNameKeyPress:function(a){13==event.keyCode&&AtomChangedName(a)},ShowUnitPara:function(a){}};function Init(){EWAC_WfUtil.WF=new EWAC_Wf;EWAC_WfUtil.WF._LodIds()}
function loadWfShow(a,b,c,d,e,f,g,h,k,n){_EWA_WF&&_EWA_WF.EN&&(_EWA_WF.EN1=$J2MAP(_EWA_WF.EN,"WF_UNIT_ID"));d=document.createElement("div");d.style.position="absolute";d.style.zIndex=123;d.innerHTML="ver: "+_EWA_WF.WF_DLV_VER;document.body.appendChild(d);var p=EWAC_WfUtil.WF,r=1000012,v=1000011;for(d=0;d<a.length;d++){var m=a[d],l=m.WF_UNIT_X,u=m.WF_UNIT_Y;null!=l&&1*l<r&&(r=1*l);null!=u&&1*u<v&&(v=1*u)}1000012==r&&(r=0);1000011==v&&(v=0);r-=10;v-=10;n={};var q;for(d=0;d<a.length;d++)m=a[d],p.Ids[d]=
m.WF_UNIT_ID,l=p.CreateUnit(),n[m.WF_UNIT_ID]=l,u=m.WF_UNIT_NAME,"enus"==EWA.LANG&&_EWA_WF.EN1&&_EWA_WF.EN1[m.WF_UNIT_ID]&&_EWA_WF.EN1[m.WF_UNIT_ID].WF_UNIT_NAME_EN&&(u=_EWA_WF.EN1[m.WF_UNIT_ID].WF_UNIT_NAME_EN),l.ChangeDes(u),l.ChangeType(m.WF_UNIT_TYPE),l.WF_UNIT_ADM=m.WF_UNIT_ADM,l.WF_UNIT_ADM_LST=m.WF_UNIT_ADM_LST,l=m.WF_UNIT_X,u=m.WF_UNIT_Y,m=$X(m.WF_UNIT_ID),null!=l&&(m.style.left=l-r+"px"),null!=u&&(m.style.top=u-v+"px");a={};for(d=0;d<b.length;d++)m=b[d],l=m.WF_UNIT_FROM,a[l]||(a[l]=[]),a[l].push(m);
for(d=0;d<b.length;d++)m=b[d],a=m.WF_UNIT_TO,l=m.WF_UNIT_FROM,l=p.Units[l],a=p.Units[a],r=new EWAC_WfCnn,r.Create(l,a),p.Cnns[r.Id]=r,m.IsHaveLogic&&!m.IsLogicOk&&(r.IsStop=!0);for(var w in p.Units)d=p.Units[w],null==q&&0==d.CnnsToLength&&(q=d);if(null==q)g="enus"==EWA.LANG?"No startup node was found, process definition error":"\u672a\u53d1\u73b0\u542f\u52a8\u8282\u70b9,\u6d41\u7a0b\u5b9a\u4e49\u9519\u8bef",alert(g);else{0==c.length&&(p.CurUnit=q);var x=[];w={};for(d=0;d<c.length;d++)b=c[d],p=b.SYS_STA_TAG,
l=n[p],null!=l&&(m=b.ADM_NAME,"enus"==EWA.LANG&&b.ADM_NAME_EN&&(m=b.ADM_NAME_EN),l.Log(m,b.SYS_STA_CDATE,b.SYS_STA_MEMO),w[p]||(w[p]=1,x.push({ID:p,DES:l.GetDes()})),p=b.SYS_STA_TAG+"G"+b.SYS_STA_VAL,EWAC_WfUtil.WF.Cnns[p]&&(EWAC_WfUtil.WF.Cnns[p].Disp(3,"blue"),l==q&&(l.ADM_ID=b.ADM_ID),d==c.length-1&&(p=n[b.SYS_STA_VAL],p.WF_UNIT_ADM_LST=b.ROLE_IDS,p.WF_UNIT_ADM=b.ROLE_TYPE,EWAC_WfUtil.WF.CurUnit=p)));null!=k&&0<k.length&&n[k]&&(EWAC_WfUtil.WF.CurUnit=n[k]);EWAC_WfUtil.WF.CurUnit.LogCur(e);k=!1;
l=EWAC_WfUtil.WF.CurUnit;c=[];if(q==l)k=!0;else if("WF_ADM_ADM"==l.WF_UNIT_ADM)if(q=","+l.WF_UNIT_ADM_LST+",",0<=q.indexOf(","+f+","))k=!0;else for(d in f=$J2MAP1(top.org,"ADM_ID"),g=l.WF_UNIT_ADM_LST.split(","),g){h=f[g[d]];for(var t in h)c.push(h[t].ADM_NAME)}else if("WF_ADM_DEPT"==l.WF_UNIT_ADM)if(q=","+l.WF_UNIT_ADM_LST+",",0<=q.indexOf(","+g+","))k=!0;else for(d in f=$J2MAP1(top.org,"DEP_ID"),g=l.WF_UNIT_ADM_LST.split(","),g)for(t in h=f[g[d]],h)c.push(h[t].ADM_NAME);else if("WF_ADM_POST"==l.WF_UNIT_ADM)if(q=
","+l.WF_UNIT_ADM_LST+",",0<=q.indexOf(","+h+","))k=!0;else for(d in f=$J2MAP1(top.org,"POS_ID"),g=l.WF_UNIT_ADM_LST.split(","),g)for(t in h=f[g[d]],h)c.push(h[t].ADM_NAME);else if("WF_ADM_START"==l.WF_UNIT_ADM){if(q==l||f==q.ADM_ID)k=!0}else"WF_ADM_MANAGER"==l.WF_UNIT_ADM&&(t=q.ADM_ID,top||top.ORG||(g="enus"==EWA.LANG?"No organization":"\u6ca1\u6709\u7ec4\u7ec7\u673a\u6784",alert(g),k=!1),k=top.ORG.GetMaster(t).Id==f?!0:!1);e&&window.parent&&window.parent.$X(e)&&(t=window.parent.$X(e).parentNode.parentNode.parentNode,
k?0<x.length&&(f=t.rows[t.rows.length-1].cells[0],g=window.parent.document.createElement("input"),g.type="button",g.value="enus"==EWA.LANG?"Back":"\u6253\u56de",g.onclick=function(){var a=window.parent.$X(e);a.options.length=1;for(var b=0;b<x.length;b++){var c=x[b];a.options[a.length]=new Option(c.DES,c.ID);this.style.display="none"}a.parentNode.parentNode.cells[0].innerHTML="enus"==EWA.LANG?'<div style="color:red">Back steps</div>':'<div style="color:red">\u8fd4\u56de\u6b65\u9aa4</div>'},f.insertBefore(g,
f.getElementsByTagName("input")[1])):(0==c.length?(g="enus"==EWA.LANG?"Only view":"\u60a8\u53ea\u80fd\u67e5\u770b",window.parent.$X(e).parentNode.innerHTML="<b>"+g+"</b>"):(g="enus"==EWA.LANG?"Waitting":"\u7b49\u5f85",f="enus"==EWA.LANG?"or":"\u6216",window.parent.$X(e).parentNode.innerHTML="<b>"+g+':<span style="color:blue">'+c.join("</span> "+f+' <span style="color:blue">')+"</span></b>"),window.parent.$X("butOk").style.display="none"),showControls(t,_EWA_WF.WF_SHOW))}}
function showControls(a,b){for(var c=a.rows.length-5;0<=c;c--)0!=a.rows[c].id.indexOf("_ewa_tr$EWA_WF_")&&(a.rows[c].style.display="none");var d={},e=!1;for(c=0;c<b.length;c++)for(var f=b[c].XITEMS.split(","),g=0;g<f.length;g++){var h=f[g].trim();""==h||d[h]||(d[h]=1,e=!0)}if(e)for(var k in d)if(b=a.ownerDocument.getElementById("_ewa_tr$"+k))b.style.display=""}
function loadWf(a,b){for(var c=EWAC_WfUtil.WF,d=1000012,e=1000011,f=0;f<a.length;f++){var g=a[f],h=g.WF_UNIT_X,k=g.WF_UNIT_Y;h<d&&(d=h);k<e&&(e=k)}for(f=0;f<a.length;f++)g=a[f],c.Ids[f]=g.WF_UNIT_ID,h=c.CreateUnit(),h.ChangeDes(g.WF_UNIT_NAME),h.ChangeType(g.WF_UNIT_TYPE),h=g.WF_UNIT_X,k=g.WF_UNIT_Y,g=$X(g.WF_UNIT_ID),null!=h&&(g.style.left=h+"px"),null!=k&&(g.style.top=k+"px");for(f=0;f<b.length;f++){g=b[f];a=c.Units[g.WF_UNIT_FROM];g=c.Units[g.WF_UNIT_TO];h=new EWAC_WfCnn;try{h.Create(a,g),c.Cnns[h.Id]=
h}catch(n){alert(n)}}}
function loadByDefined(){for(var a=window.parent._EWAC_User.WorkflowTableSet,b=EWAC_WfUtil.WF,c=0;c<a.Count();c++){var d=a.GetItem(c);b.Ids[c]=d.Name;var e=b.CreateUnit(),f=d.Tables.GetItem("descriptionset").SearchValue("lang=zhcn","info");e.ChangeDes(f);d=d.Tables.GetItem("WfType").GetSingleValue();e.ChangeType(d)}for(c=0;c<a.Count();c++)e=a.GetItem(c),d=e.Tables.GetItem("WfType").GetSingleValue(),"end"!=d&&(EWAC_WfUtil.TWO[0]=b.Units[e.Name],e=e.Tables.GetItem("WfAction"),d=e.GetValue("WFANextYes"),
null==d||""==d?(d=a.GetItem(c+1),EWAC_WfUtil.TWO[1]=b.Units[d.Name]):(alert(d),EWAC_WfUtil.TWO[1]=b.Units[d]),b.CreateCnn(),d=e.GetValue("WFANextNo"),null!=d&&""!=d&&(alert(d),EWAC_WfUtil.TWO[1]=b.Units[d]),b.CreateCnn());EWAC_WfUtil.TWO[0]=EWAC_WfUtil.TWO[1]=null}
function CreateExp(){var a=new EWA_XmlClass;a.LoadXml("<EwaWf><Units /><Cnns /><Draw /></EwaWf>");for(var b=a.GetElement("Units"),c=a.GetElement("Cnns"),d=document.getElementsByTagName("TABLE"),e=[],f=0;f<d.length;f++){var g=d[f];if(0==g.id.indexOf("Atom_Table_")||"none"==g.style.display){var h=a.NewChild("Unit",b);h.setAttribute("Unid",g.getAttribute("sid"));h.setAttribute("Type",g.getAttribute("type"));h.setAttribute("Des",GetInnerText(g).trim());e.push(GetOuterHTML(g))}}b=document.getElementsByTagName("DIV");
for(f=0;f<b.length;f++)if(d=b[f],0==d.id.indexOf("Atom_Table_")){h=d.id.split("G");g=h[0].replace("Atom_Table_","");var k=h[1].replace("Atom_Table_","");h=a.NewChild("Cnn",c);h.setAttribute("Unid",d.id);h.setAttribute("From",g);h.setAttribute("To",k);h.setAttribute("Logic","");e.push(GetOuterHTML(d))}c=a.GetElement("Draw");a.SetCData(e.join("\r\n"),c);alert(a.GetXml())}
function SetAtomName(a){""!=CurSelectedID&&(window.arrayAtoms[CurSelectedID][2]=a,$X("Atom_Table_"+CurSelectedID).rows[1].cells[0].innerText=a)}function SetAtomType(a){if(""!=CurSelectedID){var b=null==EWA.RV_STATIC_PATH?EWA.CP:EWA.RV_STATIC_PATH;b+="/EWA_STYLE/";window.arrayAtoms[CurSelectedID][1]=a;var c=$X("Atom_Table_"+CurSelectedID);c.type=a;c.rows[0].cells[0].childNodes[0].src=0==a?b+"images/workflow/nulla.gif":b+"images/workflow/nullaico.gif"}}
function loadParentInfoJson(a,b,c){a=a[b];for(var d in a){var e=c.insertRow(0);b=e.insertCell(-1);b.className="EWA_TD_L";e=e.insertCell(-1);e.className="EWA_TD_M";var f=a[d].VAL;b.innerHTML='<span style="color:111"><i>'+a[d].DES+"</i></span>";e.innerHTML=f}}
function loadParentInfo(){EWA.OW.Load();if(EWA.OW.PWin){for(var a,b=document.getElementsByTagName("table"),c=0;c<b.length;c++){var d=b[c];if(0==d.id.indexOf("EWA_FRAME_")){a=d;break}}if(null!=a)if(c=a.parentNode.parentNode.offsetHeight,b=a.offsetHeight,d=document.createElement("div"),d.style.height=c-b+"px",d.style.overflow="auto",d.innerHTML="<table broder=0 cellpadding=1 cellspacing=1 class=EWA_TABLE></table>",a.parentNode.insertBefore(d,a),a=d.childNodes[0],c=EWA.OW.PWin,b=new EWA_UrlClass,b.SetUrl(window.location.href),
d=b.GetParameter("fjson"),null!=d)loadParentInfoJson(c,d,a);else{b._Paras.COMBINE_ID&&c.$("#"+b._Paras.COMBINE_ID).find("li").each(function(b){0==b%2&&(g=a.insertRow(0),h=g.insertCell(-1),h.className="EWA_TD_L",h.innerHTML='<span style="color:111"><i>'+$(this).text()+"</i></span>");1==b%2&&(b=g.insertCell(-1),b.className="EWA_TD_M",b.innerHTML=$(this).text())});for(f in c.EWA.F.FOS)if(f==b.GetParameter("EWA_PARENT_FRAME")){var e=c.EWA.F.FOS[f];break}if(e&&(e=e.SelectCheckedRows(),0!=e.length)){e=
e[0];var f=e.parentNode.rows[0];for(c=e.cells.length-1;1<=c;c--)if(!(0<e.cells[c].getElementsByTagName("input")||0<e.cells[c].getElementsByTagName("img")||0<e.cells[c].getElementsByTagName("a"))&&(b=GetInnerText(f.cells[c]),d=GetInnerText(e.cells[c]),null!=b&&""!=b.trim()&&null!=d&&""!=d.trim()&&(b=b.replace("?","").trim(),b.trim()!=d.trim()))){var g=a.insertRow(0),h=g.insertCell(-1);h.className="EWA_TD_L";var k=g.insertCell(-1);k.className="EWA_TD_M";h.innerHTML='<span style="color:111"><i>'+b+"</i></span>";
k.innerHTML=d}}}}else window.setTimeout(loadParentInfo,300)}
function getSpJson(){for(var a=null,b=document.getElementsByTagName("table"),c=0;c<b.length;c++)if(0==b[c].id.indexOf("EWA_FRAME_")){a=b[c];break}c="EWA_ITEMS_XML_"+a.id.replace("EWA_FRAME_","");a=[];a.push("[");b=new EWA_XmlClass;b.LoadXml(window[c]);b=b.XmlDoc.getElementsByTagName("XItem");for(c=0;c<b.length;c++){0<c&&a.push(",");var d=getSpItem(b[c]);eval("o="+d);if("select"==(void 0).TAG){for(var e=$X((void 0).NAME),f=[],g=0;g<e.options.length;g++){var h=e.options[g];f.push(h.text+"gdx|z"+h.value.replace(/"/ig,
""))}d=d.replace('"} ','"A":"'+f.join("!@1`")+"}");$X("EWA_WF_UMSG").value=d}a.push(d)}a.push("]");alert(a.join(""))}
function getSpItem(a){var b=a.getElementsByTagName("Tag")[0].getElementsByTagName("Set")[0].getAttribute("Tag"),c=a.getElementsByTagName("Name")[0].getElementsByTagName("Set")[0].getAttribute("Name");a=a.getElementsByTagName("DescriptionSet")[0].getElementsByTagName("Set")[0].getAttribute("Info");return'{"TAG":"'+b+'", "NAME":"'+c.replace(/"/ig,"")+'", "DES":"'+a.replace(/"/ig,"")+'"} '}
function EWA_DocWordClass(){this.docks=[];this.pics=[];this.liNum=0;this.defaultFontEnglish="Century Gothic";this.defaultFontChinese="Microsoft YaHei";this.walker=function(a,b){3==a.nodeType?this.walkerTxt(a):1==a.nodeType&&this.walkerEle(a)};this.walkerEle=function(a){if("none"!=a.style.display){var b=a.tagName,c=!1;if("LI"==b){var d=this.createP(a);var e=this.getDockTable();e.appendChild(d);this.docks.push(d);c=!0;this.createLi(a)}else if("BR"==b){d=this.createBr(a);e=this.getDock();if("w:p"!=e.tagName){var f=
this.createP(a.parentNode),g=this.createSpan(a.parentNode);f.appendChild(g);f.appendChild(d);e.appendChild(f);this.docks.push(f)}else e.appendChild(d);this.lastWR=null}else if("IMG"==b)e=this.getDock(),d=this.createPic(a),"w:p"!=e.tagName?(f=this.createP(a.parentNode),g=this.createSpan(a.parentNode),f.appendChild(g),f.appendChild(d),e.appendChild(f),this.docks.push(f)):e.appendChild(d),this.lastWR=null;else if("TABLE"==b)g=this.getDockTable(),d=a.previousElementSibling,null!=d&&"TABLE"==d.tagName&&
(e=this.createPVanish(),g.appendChild(e[0])),d=this.createTable(a),null!=d&&(c=!0,g.appendChild(d),this.docks.push(d));else if("TBODY"==b)d=this.createTbody(a),this.getDock().appendChild(d);else if("TR"==b)d=this.createTr(a),this.getDock().appendChild(d),this.docks.push(d),c=!0;else if("TD"==b)d=this.createTd(a),this.getDock().appendChild(d),this.docks.push(d),c=!0;else if("HR"==b)e=this.getDockTable(),d=this.createP(a),g=this.createSpan(a),d.appendChild(g),f=this.createHr(),g.appendChild(f),this.lastWR=
null,e.appendChild(d);else if("LI"==a.parentNode.tagName||"H1"!=b&&"H2"!=b&&"H3"!=b&&"P"!=b&&"CENTER"!=b&&"DIV"!=b){if("SCRIPT"==b)return;"BODY"!=b&&"OL"!=b&&"UL"!=b&&(e=this.getDock(),d=this.createSpan(a),"w:p"!=e.tagName?(f=this.createP(a.parentNode),f.appendChild(d),e.appendChild(f),this.docks.push(f)):e.appendChild(d))}else e=this.getDockTable(),d=this.createP(a),e.appendChild(d),this.docks.push(d),c=!0;for(e=0;e<a.childNodes.length;e++)this.walker(a.childNodes[e]);c&&(this.docksPop(d),this.lastWR=
null);"TD"==b&&1==d.childNodes.length?(f=this.createEle("w:p"),d.appendChild(f)):"TABLE"==b&&null==d.nextSibling&&"w:tc"==d.parentNode.tagName&&(f=this.createEle("w:p"),d.parentNode.appendChild(f))}};this.walkerTxt=function(a){if(""!=a.nodeValue.trimEx()){var b=this.createText(a),c=this.getDock();if("w:p"!=c.tagName){var d=this.createP(a.parentNode);a=this.createSpan(a.parentNode);d.appendChild(a);a.appendChild(b);c.appendChild(d);this.docks.push(d)}else this.lastWR||(a=this.createSpan(a.parentNode),
c.appendChild(a)),this.lastWR.parentNode.appendChild(b)}this.lastWR=null};this.createEle=function(a){return this.doc.XmlDoc.createElement(a)};this.createEles=function(a){a=a.split(",");for(var b=[],c=0;c<a.length;c++){var d=this.createEle(a[c].trim());b.push(d);0<c&&b[0].appendChild(d)}return b};this.createElesLvl=function(a){a=a.split(",");for(var b=[],c=0;c<a.length;c++){var d=this.createEle(a[c].trim());b.push(d);0<c&&b[c-1].appendChild(d)}return b};this.createElesSameLvl=function(a,b){a=a.split(",");
for(var c=[],d=0;d<a.length;d++){var e=this.createEle(a[d].trim());c.push(e);b.appendChild(e)}return c};this.createText=function(a){if(""!=a.nodeValue.trim()){var b=this.createEle("w:t");EWA.B.IE?b.text=a.nodeValue:b.textContent=a.nodeValue;return b}};this.createHr=function(){var a=this.createElesLvl("w:pict,v:rect");a[0].setAttribute("w14:anchorId",this.getParaId());this.setAtts(a[1],{style:"width:.05pt;height:1pt","o:hralign":"center","o:hrstd":"t","o:hrnoshade":"t","o:hr":"t",fillcolor:"black [3213]",
stroked:"f"});return a[0]};this.createLi=function(a){var b=this.createEles("w:numPr,w:ilvl,w:numId");"OL"==a.parentNode.tagName?(a==a.parentNode.getElementsByTagName("li")[0]&&this.liNum++,b[1].setAttribute("w:val",0),b[2].setAttribute("w:val",this.liNum)):(b[1].setAttribute("w:val",0),b[2].setAttribute("w:val",22));a=this.createEle("w:spacing");a.setAttribute("w:line",270);a.setAttribute("w:lineRule","atLeast");var c=this.getDock();c.getElementsByTagName("w:pPr")[0].appendChild(b[0]);c.getElementsByTagName("w:pPr")[0].appendChild(a)};
this.createSpan=function(a){var b=this.createEle("w:r");a=$(a);var c=this.createEle("w:rPr");this.lastWR=c;b.appendChild(c);if(""!=a.css("color")){var d=this.createEle("w:color"),e=this.rgb1(a.css("color"));d.setAttribute("w:val",e);c.appendChild(d)}if(""!=a.css("font-family")){a.css("font-family").replace(/'/ig,"").split(",");d=this.createEle("w:rFonts");var f=/[\u4E00-\u9FA5]|[\uFE30-\uFFA0]/gi.test(a.text())?this.defaultFontChinese:this.defaultFontEnglish;this.setAtts(d,{"w:ascii":f,"w:eastAsia":f,
"w:hAnsi":f,"w:hint":"eastAsia","w:cs":this.defaultFontEnglish});c.appendChild(d)}""!=a.css("font-size")&&(d=a.css("font-size"),f=this.fontSize(d),null!=f&&(d=this.createEle("w:sz"),d.setAttribute("w:val",2*f),c.appendChild(d),e=this.createEle("w:szCs"),e.setAttribute("w:val",2*f),c.appendChild(e)));d=a.css("font-weight");if("B"==a.tagName||""!=d&&"normal"!=d&&"400"!=d)d=this.createEle("w:b"),c.appendChild(d);"I"==a.tagName&&(d=this.createEle("w:i"),c.appendChild(d));return b};this.createBr=function(a){a=
this.createEle("w:r");var b=this.createEle("w:br");a.appendChild(b);return a};this.createTable=function(a){var b=this.createEle("w:tbl"),c=this.createEle("w:tblPr"),d=this.createEle("w:tblStyle");d.setAttribute("w:val","a4");c.appendChild(d);d=this.createWidth(a,"tblW");c.appendChild(d);a.setAttribute("ww",d.getAttribute("w:w"));b.appendChild(c);return b};this.createTbody=function(){return this.createEle("w:tblGrid")};this.createTr=function(a){var b=this.createElesLvl("w:tr,w:trPr");this.setAtts(b[0],
{"w:rsidR":"003D2D54","w14:textId":"77777777","w14:paraId":this.getParaId()});a=this.createHeight(a,"trHeight");b[1].appendChild(a);return b[0]};this.paraId=0;this.getParaId=function(){var a="0000"+this.paraId;a=a.substring(a.length-4);this.paraId++;return"F0C0"+a};this.createTd=function(a){thisTr=a.parentNode;var b=thisTr.parentNode.parentNode,c=a.getAttribute("vmerge"),d=0;if(null!=c&&""!=c){var e=this.createEle("w:tc"),f=this.createEle("w:tcPr"),g=this.createEle("w:vMerge");f.appendChild(g);e.appendChild(f);
this.getDock().appendChild(e);d=this.createEle("w:p");e.appendChild(d);e=c.split(",");e=b.rows[e[0]].cells[e[1]];f.appendChild(this.createTdBorders(e));d=1*e.getAttribute("wwtd")}e=this.createEle("w:tc");f=this.createEle("w:tcPr");e.appendChild(f);if(1<a.rowSpan)for(g=this.createEle("w:vMerge"),g.setAttribute("w:val","restart"),f.appendChild(g),g=0;g<a.rowSpan-1;g++)(c=b.rows[g+1+thisTr.rowIndex])&&(c=c.cells[a.cellIndex])&&c.setAttribute("vmerge",thisTr.rowIndex+","+a.cellIndex);1<a.colSpan&&(b=
this.createEle("w:gridSpan"),b.setAttribute("w:val",a.colSpan),f.appendChild(b));f.appendChild(this.createTdBorders(a));g=this.createWidth(a,"tcW");c=a.parentNode;b=c.getAttribute("wwtr");if(null==b||""==b)b=c.parentNode.parentNode,b=b.getAttribute("ww");var h=g.getAttribute("w:w");a!=a.parentNode.cells[a.parentNode.cells.length-1]?(a.setAttribute("wwtd",h),c.setAttribute("wwtr",1*b-1*h-d)):(g.setAttribute("w:w",0),g.setAttribute("w:type","auto"));f.appendChild(g);a=$(a).css("vertical-align");"middle"==
a?(a=this.createEle("w:vAlign"),a.setAttribute("w:val","center"),f.appendChild(a)):"bottom"==a&&(a=this.createEle("w:vAlign"),a.setAttribute("w:val","bottom"),f.appendChild(a));return e};this.createWidth=function(a,b){b=this.createEle("w:"+b);a=15*$(a).width();b.setAttribute("w:w",a);b.setAttribute("w:type","dxa");return b};this.createHeight=function(a,b){b=this.createEle("w:"+b);a=15*$(a).height();b.setAttribute("w:val",a);return b};this.createTdBorders=function(a){for(var b=this.createEle("w:tcBorders"),
c=0;c<this.EWA_DocTmp.borders.length;c++){var d=this.createBorder(a,this.EWA_DocTmp.borders[c]);b.appendChild(d)}return b};this.createBorder=function(a,b){var c=$(a).css("border-"+b+"-width"),d=this.createEle("w:"+b);"0px"==c?d.setAttribute("w:val","nil"):(d.setAttribute("w:val","single"),a=$(a).css("border-"+b+"-color"),a=this.rgb1(a),d.setAttribute("w:color",a),d.setAttribute("w:sz",6));return d};this.createPVanish=function(){return this.createElesLvl("w:p,w:pPr,w:rPr,w:vanish")};this.createP=function(a){var b=
this.createEle("w:p"),c=this.createEle("w:pPr");b.appendChild(c);c=this.createElesSameLvl("w:pStyle,w:jc",c);var d=c[1],e=$(a).css("text-align");e=null==e?"":e;0<=e.indexOf("center")?d.setAttribute("w:val","center"):0<=e.indexOf("right")?d.setAttribute("w:val","right"):d.setAttribute("w:val","left");d=c[0];d.setAttribute("w:val","a");0==a.tagName.indexOf("H")&&d.setAttribute("w:val",a.tagName.replace("H",""));this.createElesLvl("w:rFonts",c[2])[0].setAttribute("w:hint","eastAsia");this.lastWR=null;
this.setAtts(b,{"w:rsidR":"003D2D54","w14:textId":"77777777","w14:paraId":this.getParaId(),"w:rsidRDefault":"0057281A"});return b};this.createPic=function(a){var b=$(a),c=a.src;this.pics.push(a.src);a=c.lastIndexOf("/");c=c.substring(a+1);a=this.px2emu(b.width());b=this.px2emu(b.height());var d=this.createElesLvl("w:r,w:rPr,w:noProof")[0],e=this.createElesLvl("w:drawing,wp:inline,wp:extent");d.appendChild(e[0]);wExtent=e[2];this.setAtts(wExtent,{cx:a,cy:b});e=e[1];this.setAtts(e,{distT:"0",distB:"0",
distL:"0",distR:"0"});var f=this.createElesSameLvl("wp:effectExtent,wp:docPr,wp:cNvGraphicFramePr",e);this.setAtts(f[0],{l:"0",t:"0",r:"0",b:"0"});this.setAtts(f[1],{id:"0",name:c});var g=this.createEleNs("a:graphicFrameLocks","http://schemas.openxmlformats.org/drawingml/2006/main");f[2].appendChild(g);this.setAtts(g,{noChangeAspect:1});f=this.createEleNs("a:graphic","http://schemas.openxmlformats.org/drawingml/2006/main");g=this.createEle("a:graphicData");g.setAttribute("uri","http://schemas.openxmlformats.org/drawingml/2006/picture");
var h=this.createEleNs("pic:pic","http://schemas.openxmlformats.org/drawingml/2006/picture");f.appendChild(g);g.appendChild(h);e.appendChild(f);e=this.createElesSameLvl("pic:nvPicPr,pic:blipFill,pic:spPr",h);this.setAtts(e[1],{rotWithShape:"1"});this.setAtts(e[2],{bwMode:"auto"});f=this.createElesSameLvl("pic:cNvPr,pic:cNvPicPr",e[0]);this.setAtts(f[0],{id:"0",name:c});f=this.createElesSameLvl("a:blip,a:srcRect,a:stretch",e[1]);this.setAtts(f[0],{"r:embed":"pic"+(this.pics.length-1)});this.setAtts(f[1],
{l:"0",t:"0",r:"0",b:"0"});c=this.createEles("a:extLst,a:ext");f[0].appendChild(c[0]);c[1].setAttribute("uri","{28A0092B-C50C-407E-A947-70E740481C1C}");f=this.createEleNs("a14:useLocalDpi","http://schemas.microsoft.com/office/drawing/2010/main");f.setAttribute("val",0);c[1].appendChild(f);c=this.createElesSameLvl("a:xfrm,a:prstGeom,a:ln,a:extLst",e[2]);this.setAtts(c[1],{prst:"rect"});e=this.createElesSameLvl("a:off,a:ext",c[0]);this.setAtts(e[0],{x:0,y:0});this.setAtts(e[1],{cx:a,cy:b});this.createElesSameLvl("a:avLst",
c[1]);this.createElesSameLvl("a:noFill",c[2]);return d};this.createEleNs=function(a,b){return this.doc.XmlDoc.createElementNS(b,a)};this.setAtts=function(a,b){for(var c in b)a.setAttribute(c,b[c])};this.fontSize=function(a){0<a.indexOf("px")&&(a=this.EWA_DocTmp.f[a],a=null==a?"9pt":a);return a.replace("pt","")};this.rgb1=function(a){a=a.replace("rgb(","").replace(")","").split(",");return this.rgb(1*a[0],1*a[1],1*a[2]).toUpperCase()};this.rgb=function(a,b,c){a=a.toString(16);b=b.toString(16);c=c.toString(16);
return(2>a.length?"0":"")+a+(2>b.length?"0":"")+b+(2>c.length?"0":"")+c};this.init=function(){this.doc=new EWA_XmlClass;this.doc.LoadXml(this.EWA_DocTmp.document);EWA.B.IE?this.docks.push(this.doc.XmlDoc.getElementsByTagName("w:body")[0]):this.docks.push(this.doc.XmlDoc.childNodes[0].childNodes[0])};this.getDock=function(){return this.docks[this.docks.length-1]};this.idx=0;this.docksPop=function(a){for(;1!=this.docks.length&&this.docks.pop()!=a;);};this.getDockTable=function(){for(var a=this.docks.length-
1;0<=a;a--){var b=this.docks[a];if("w:body"==b.tagName||"w:tc"==b.tagName)return b}};this.px2emu=function(a){return parseInt(a/96*914400)};this.EWA_DocTmp={document:'<?xml version="1.0" encoding="UTF-8" standalone="yes"?><w:document\t\t\t\txmlns:wpc="http://schemas.microsoft.com/office/word/2010/wordprocessingCanvas"\t\t\t\txmlns:mo="http://schemas.microsoft.com/office/mac/office/2008/main"\t\t\t\txmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"\t\t\t\txmlns:mv="urn:schemas-microsoft-com:mac:vml" xmlns:o="urn:schemas-microsoft-com:office:office"\t\t\t\txmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships"\t\t\t\txmlns:m="http://schemas.openxmlformats.org/officeDocument/2006/math"\t\t\t\txmlns:v="urn:schemas-microsoft-com:vml"\t\t\t\txmlns:wp14="http://schemas.microsoft.com/office/word/2010/wordprocessingDrawing"\t\t\t\txmlns:wp="http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing"\t\t\t\txmlns:w10="urn:schemas-microsoft-com:office:word"\t\t\t\txmlns:w="http://schemas.openxmlformats.org/wordprocessingml/2006/main"\t\t\t\txmlns:w14="http://schemas.microsoft.com/office/word/2010/wordml"\t\t\t\txmlns:wpg="http://schemas.microsoft.com/office/word/2010/wordprocessingGroup"\t\t\t\txmlns:wpi="http://schemas.microsoft.com/office/word/2010/wordprocessingInk"\t\t\t\txmlns:wne="http://schemas.microsoft.com/office/word/2006/wordml"\t\t\t\txmlns:wps="http://schemas.microsoft.com/office/word/2010/wordprocessingShape"\t\t\t\tmc:Ignorable="w14 wp14"><w:body></w:body></w:document>',
r:'<w:r w:rsidR="00A0061C" w:rsidRPr="00A0061C"><w:rPr><w:rFonts w:ascii="[FONT]" w:eastAsia="[FONT]" w:hAnsi="[FONT]" w:hint="eastAsia" /><w:b /><w:i /><w:color w:val="FF0000" /><w:sz w:val="36" /><w:szCs w:val="36" /><w:u w:val="single" /></w:rPr><w:t>\u770b\u770b</w:t></w:r>',f:{"9px":"7pt","10px":"7.5pt","11px":"8.5pt","12px":"9pt","13px":"10pt","14px":"10.5pt","15px":"11.5pt","16px":"12pt","17px":"13pt","18px":"13.5pt","19px":"14.5pt","20px":"15pt","21px":"16pt","22px":"16.5pt","23px":"17.5pt",
"24px":"18pt","25px":"19pt","26px":"19.5pt","27px":"20.5pt","28px":"21pt","29px":"22pt","30px":"22.5pt","31px":"23.5pt","32px":"24pt","33px":"25pt","34px":"25.5pt","35px":"26.5pt","36px":"27pt","37px":"28pt","38px":"28.5pt","39px":"29.5pt","40px":"30pt","41px":"31pt","42px":"31.5pt","43px":"32.5pt","44px":"33pt","45px":"34pt","46px":"34.5pt","47px":"35.5pt","48px":"36pt","49px":"37pt","50px":"37.5pt","51px":"38.5pt","52px":"39pt","53px":"40pt","54px":"40.5pt","55px":"41.5pt","56px":"42pt","57px":"43pt",
"58px":"43.5pt","59px":"44.5pt","60px":"45pt","61px":"46pt","62px":"46.5pt","63px":"47.5pt","64px":"48pt","65px":"49pt","66px":"49.5pt","67px":"50.5pt","68px":"51pt","69px":"52pt","70px":"52.5pt","71px":"53.5pt","72px":"54pt","73px":"55pt","74px":"55.5pt","75px":"56.5pt","76px":"57pt","77px":"58pt","78px":"58.5pt","79px":"59.5pt","80px":"60pt","81px":"61pt","82px":"61.5pt","83px":"62.5pt","84px":"63pt","85px":"64pt","86px":"64.5pt","87px":"65.5pt","88px":"66pt","89px":"67pt","90px":"67.5pt","91px":"68.5pt",
"92px":"69pt","93px":"70pt","94px":"70.5pt","95px":"71.5pt","96px":"72pt","97px":"73pt","98px":"73.5pt","99px":"74.5pt"},borders:["top","bottom","right","left"]};this.postData=function(){return{xml:this.xml(),pics:this.pics.join(","),ols:this.liNum}};this.init();this.xml=function(){return this.doc.GetXml()}}
function EWA_OdtDocWordClass(){this.docks=[];this.pics=[];this.liNum=0;this.start=!1;this.defaultFontEnglish="Century Gothic";this.defaultFontChinese="Microsoft YaHei";this.walker=function(a){this.fixTable();this.walker1(a);this.unFixTable()};this.walker1=function(a){3==a.nodeType?this.walkerTxt(a):1==a.nodeType&&this.walkerEle(a)};this.walkerEle=function(a){if("none"!=a.style.display){var b=a.tagName,c=!1;if("DIV"==b&&(0<=a.className.indexOf("page-next-before")||0<=a.className.indexOf("page-next-after"))){var d=
this.createBreak();b=this.docks[0];console.log("break",d);b.appendChild(d);c=!0}else if("UL"==b||"OL"==b)d=this.createUl(a),b=this.getDockTable(),b.appendChild(d),this.docks.push(d),c=!0;else if("LI"==b)d=this.createLi(a),b=this.getDock(),b.appendChild(d),this.docks.push(d),c=!0;else if("BR"==b){d=this.createBr(a);b=this.getDock();if("text:p"!=b.tagName){var e=this.createP(a.parentNode);this.docks.push(e);e.appendChild(d)}else b.appendChild(d);this.lastWR=null}else if("IMG"==b)b=this.getDock(),d=
this.createPic(a),"text:p"!=b.tagName?(e=this.createP(a.parentNode),e.appendChild(d),b.appendChild(e),this.docks.push(e),c=!0):b.appendChild(d),this.lastWR=null;else if("TABLE"==b)b=this.getDockTable(),d=this.createTable(a),c=!0,b.appendChild(d),this.docks.push(d);else if("TBODY"!=b)if("TR"==b)d=this.createTr(a),this.getDock().appendChild(d),this.docks.push(d),c=!0;else if("TD"==b){d=this.createTd(a);this.getDock().appendChild(d);if("table:covered-table-cell"==d.tagName)return;this.docks.push(d);
c=!0}else if("HR"==b){b=this.getDockTable();d=this.createP(a);e=this.createSpan(a);d.appendChild(e);var f=this.createHr();e.appendChild(f);this.lastWR=null;b.appendChild(d)}else if("H1"==b||"H2"==b||"H3"==b||"P"==b||"CENTER"==b||"DIV"==b)b=this.getDockTable(),d=this.createP(a),b.appendChild(d),this.docks.push(d),c=!0;else if("SCRIPT"==b)return;for(b=0;b<a.childNodes.length;b++)this.walker1(a.childNodes[b]);c&&(this.docksPop(d),this.lastWR=null)}};this.walkerTxt=function(a){if(""==a.nodeValue.trimEx())this.lastWR=
null;else{var b=this.createSpan(a.parentNode),c=a.nodeValue.replace(/\u00a0/ig," ");if("TD"==a.parentNode.tagName||"P"==a.parentNode.tagName)c=c.trim();EWA.B.IE?b.text=c:b.textContent=c;c=this.getDock();"text:p"!=c.tagName?(a=this.createP(a.parentNode),a.appendChild(b),c.appendChild(a),this.docks.push(a)):c.appendChild(b)}};this.fixTable=function(){for(var a=$("td[colspan]").toArray(),b=0;b<a.length;b++){var c=a[b],d=c.parentNode,e=c.colSpan;c.setAttribute("m_colspan",e);for(var f=0;f<e-1;f++){var g=
d.insertCell(c.cellIndex+f+1);g.innerHTML=f;g.bgColor="blue";g.className="colspan";g.setAttribute("fixed","1");g.style.display="none"}}$("td[rowspan]").each(function(){for(var a=this.rowSpan,b=this.parentNode,c=b.parentNode.parentNode,d=0;d<a-1;d++){var e=c.rows[b.rowIndex+d+1].insertCell(this.cellIndex);e.innerHTML=d;e.bgColor="green";e.className="rowspan";e.setAttribute("fixed","1")}$(this).attr("m_rowspan",a);this.rowSpan=""})};this.unFixTable=function(){$("td[fixed]").each(function(){this.parentNode.removeChild(this)});
$("td[m_colspan]").each(function(){this.colSpan=this.getAttribute("m_colspan")});$("td[m_rowspan]").each(function(){this.rowSpan=this.getAttribute("m_rowspan")})};this.createEle=function(a){return this.doc.XmlDoc.createElement(a)};this.createEles=function(a){a=a.split(",");for(var b=[],c=0;c<a.length;c++){var d=this.createEle(a[c].trim());b.push(d);0<c&&b[0].appendChild(d)}return b};this.createElesLvl=function(a){a=a.split(",");for(var b=[],c=0;c<a.length;c++){var d=this.createEle(a[c].trim());b.push(d);
0<c&&b[c-1].appendChild(d)}return b};this.createElesSameLvl=function(a,b){a=a.split(",");for(var c=[],d=0;d<a.length;d++){var e=this.createEle(a[d].trim());c.push(e);b.appendChild(e)}return c};this.createHr=function(){var a=this.createElesLvl("w:pict,v:rect");a[0].setAttribute("w14:anchorId",this.getParaId());this.setAtts(a[1],{style:"width:.05pt;height:1pt","o:hralign":"center","o:hrstd":"t","o:hrnoshade":"t","o:hr":"t",fillcolor:"black [3213]",stroked:"f"});return a[0]};this.createUl=function(a){var b=
this.createEle("text:list");b.setAttribute("text:style-name","OL"==a.tagName?"L1":"L2");return b};this.createLi=function(a){return this.createEle("text:list-item")};this.createStyle=function(a){var b=this.createEle("style:style");b.setAttribute("style:family","text");a=$(a);var c=this.createEle("style:text-properties");b.appendChild(c);if(""!=a.css("font-family")){a.css("font-family").replace(/'/ig,"").split(",");var d=this.defaultFontEnglish,e=this.defaultFontChinese,f=this.fontSize(a.css("font-size"));
this.setAtts(c,{"style:font-name":d,"style:font-name-asian":e,"fo:font-size":f,"style:font-size-complex":f,"style:font-size-asian":f})}""!=a.css("color")&&(d="#"+this.rgb1(a.css("color")).toLowerCase(),c.setAttribute("fo:color",d));d=a.css("font-weight");if("B"==a.tagName||""!=d&&"normal"!=d&&"400"!=d)c.setAttribute("fo:font-weight","bold"),c.setAttribute("style:font-weight-complex","bold"),c.setAttribute("style:font-weight-asian","bold");"I"==a.tagName&&(c.setAttribute("fo:font-style","italic"),
c.setAttribute("style:font-style-complex","italic"),c.setAttribute("style:font-style-asian","italic"));return this.checkExistsStyle(b)};this.createStyleBreak=function(){var a=this.createEle("style:style");a.setAttribute("style:family","paragraph");var b=this.createEle("style:paragraph-properties");a.appendChild(b);this.setAtts(b,{"fo:break-before":"page"});return this.checkExistsStyle(a)};this.createStyleP=function(a){var b=this.createEle("style:style");b.setAttribute("style:family","paragraph");
var c=this.createEle("style:paragraph-properties");b.appendChild(c);a=$(a);var d=a.css("text-align");d=null==d?"":d;d=0<=d.indexOf("center")?"center":0<=d.indexOf("right")?"end":"";""!=d&&this.setAtts(c,{"fo:text-align":d});d=a.css("margin-left").replace("px","");a=a.css("margin-right").replace("px","");d=this.px2cm(d)+"cm";a=this.px2cm(a)+"cm";this.setAtts(c,{"fo:margin-left":d,"fo:margin-right":a,"fo:text-indent":"0cm","style:justify-single-word":"false"});return this.checkExistsStyle(b)};this.checkExistsStyle=
function(a){var b=a.outerHTML;if(this.fontMap[b])return this.fontMap[b];var c=this.getStyleName();this.setAtts(a,{"style:name":c});this.fontMap[b]=c;b=this.doc.XmlDoc.getElementsByTagName("automatic-styles");0==b.length&&(b=this.doc.XmlDoc.getElementsByTagName("office:automatic-styles"));b[0].appendChild(a);return c};this.createStyleTd=function(a){var b=this.createEle("style:style");this.setAtts(b,{"style:family":"table-cell","style:data-style-name":"NO"});var c=this.createEle("style:table-cell-properties");
b.appendChild(c);this.setAtts(c,{"fo:background-color":"transparent","fo:padding":"0.097cm"});for(var d=0;d<this.EWA_DocTmp.borders.length;d++){var e=this.EWA_DocTmp.borders[d],f=this.createBorder(a,e);c.setAttribute("fo:border-"+e,f)}a=$(a).css("vertical-align");"middle"==a?c.setAttribute("style:vertical-align","middle"):"bottom"==a&&c.setAttribute("style:vertical-align","bottom");return this.checkExistsStyle(b)};this.createStyleCol=function(a){var b=this.createEle("style:style");this.setAtts(b,
{"style:family":"table-column"});var c=this.createEle("style:table-column-properties");b.appendChild(c);a=$(a).width();a=this.px2cm(a);c.setAttribute("style:column-width",a+"cm");return this.checkExistsStyle(b)};this.createStyleTable=function(a){var b=this.createEle("style:style");this.setAtts(b,{"style:family":"table"});var c=this.createEle("style:table-properties");b.appendChild(c);a=$(a).width();a=this.px2cm(a);c.setAttribute("style:width",a+"cm");c.setAttribute("style:shadow","none");return this.checkExistsStyle(b)};
this.getStyleName=function(){this.fontIndex++;return"ST"+this.fontIndex};this.fontIndex=0;this.fontMap={};this.createSpan=function(a){var b=this.createEle("text:span");a=this.createStyle(a);b.setAttribute("text:style-name",a);return b};this.createBr=function(a){return this.createEle("text:line-break")};this.createTable=function(a){var b=this.createEle("table:table");b.setAttribute("table:name","gdx"+Math.random());for(var c=null,d=-1,e=0;e<a.rows.length;e++){for(var f=a.rows[e],g=0,h=0;h<f.cells.length;h++)f.cells[h].getAttribute("fixed")||
g++;g>d&&(d=g,c=f)}if(c)for(e=0;e<c.cells.length;e++)d=this.createEle("table:table-column"),f=this.createStyleCol(c.cells[e]),d.setAttribute("table:style-name",f),b.appendChild(d);a=this.createStyleTable(a);b.setAttribute("table:style-name",a);return b};this.createTr=function(a){return this.createEle("table:table-row")};this.paraId=0;this.getParaId=function(){var a="0000"+this.paraId;a=a.substring(a.length-4);this.paraId++;return"F0C0"+a};this.createTd=function(a){if("rowspan"==a.className||"colspan"==
a.className)return this.createEle("table:covered-table-cell");var b=this.createEle("table:table-cell");1<a.getAttribute("m_rowspan")&&b.setAttribute("table:number-rows-spanned",a.getAttribute("m_rowspan"));1<a.getAttribute("m_colspan")&&b.setAttribute("table:number-columns-spanned",a.getAttribute("m_colspan"));b.setAttribute("office:value-type","string");a=this.createStyleTd(a);b.setAttribute("table:style-name",a);return b};this.createWidth=function(a,b){b=this.createEle("w:"+b);a=15*$(a).width();
b.setAttribute("w:w",a);b.setAttribute("w:type","dxa");return b};this.createHeight=function(a,b){b=this.createEle("w:"+b);a=15*$(a).height();b.setAttribute("w:val",a);return b};this.createBorder=function(a,b){var c=$(a).css("border-"+b+"-width");this.createEle("w:"+b);"0px"==c?c="none":(c="0.002cm "+$(a).css("border-"+b+"-style"),a=$(a).css("border-"+b+"-color"),a=this.rgb1(a).toLowerCase(),c+=" #"+a);return c};this.createPVanish=function(){return this.createElesLvl("w:p,w:pPr,w:rPr,w:vanish")};this.createP=
function(a){var b=this.createEle("text:p");a=this.createStyleP(a);b.setAttribute("text:style-name",a);return b};this.createBreak=function(){var a=this.createEle("text:p"),b=this.createStyleBreak();a.setAttribute("text:style-name",b);return a};this.createPic=function(a){var b=$(a),c=a.src;this.pics.push(a.src);a=c.lastIndexOf("/");c.substring(a+1);c=this.px2cm(b.width());b=this.px2cm(b.height());a=this.createElesLvl("draw:frame,draw:image");this.setAtts(a[0],{"svg:width":c+"cm","svg:height":b+"cm",
"draw:z-index":"0","draw:style-name":"fr1","text:anchor-type":"as-char"});this.setAtts(a[1],{"xlink:type":"simple","xlink:show":"embed","xlink:actuate":"onLoad","xlink:href":"{[PIC"+(this.pics.length-1)+"]}"});return a[0]};this.createEleNs=function(a,b){return this.doc.XmlDoc.createElementNS(b,a)};this.setAtts=function(a,b){for(var c in b)a.setAttribute(c,b[c])};this.fontSize=function(a){0<a.indexOf("px")&&(a=this.EWA_DocTmp.f[a],a=null==a?"9pt":a);return a.replace("pt","")};this.rgb1=function(a){a=
a.replace("rgb(","").replace(")","").split(",");return this.rgb(1*a[0],1*a[1],1*a[2]).toUpperCase()};this.rgb=function(a,b,c){a=a.toString(16);b=b.toString(16);c=c.toString(16);return(2>a.length?"0":"")+a+(2>b.length?"0":"")+b+(2>c.length?"0":"")+c};this.init=function(){this.doc=new EWA_XmlClass;this.doc.LoadXml(this.EWA_DocTmp.document);var a=this.doc.XmlDoc.getElementsByTagName("text");0==a.length&&(a=this.doc.XmlDoc.getElementsByTagName("office:text"));this.docks.push(a[0])};this.getDock=function(){return this.docks[this.docks.length-
1]};this.idx=0;this.docksPop=function(a){for(;1!=this.docks.length&&this.docks.pop()!=a;);};this.getDockTable=function(){for(var a=this.docks.length-1;0<=a;a--){var b=this.docks[a];if(b&&("office:text"==b.tagName||"table:table-cell"==b.tagName||"text:list-item"==b.tagName))return b}};this.px2cm=function(a){return null==a||""==a?0:a/96*2.539999918};this.EWA_DocTmp={document:'<?xml version="1.0" encoding="UTF-8"?><office:document-content xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0"   xmlns:style="urn:oasis:names:tc:opendocument:xmlns:style:1.0"   xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0"  xmlns:table="urn:oasis:names:tc:opendocument:xmlns:table:1.0"   xmlns:draw="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0" xmlns:fo="urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:meta="urn:oasis:names:tc:opendocument:xmlns:meta:1.0" xmlns:number="urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0" xmlns:svg="urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0" xmlns:chart="urn:oasis:names:tc:opendocument:xmlns:chart:1.0" xmlns:dr3d="urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0"  xmlns:math="http://www.w3.org/1998/Math/MathML" xmlns:form="urn:oasis:names:tc:opendocument:xmlns:form:1.0"  xmlns:script="urn:oasis:names:tc:opendocument:xmlns:script:1.0" xmlns:ooo="http://openoffice.org/2004/office" xmlns:ooow="http://openoffice.org/2004/writer" xmlns:oooc="http://openoffice.org/2004/calc" xmlns:dom="http://www.w3.org/2001/xml-events" xmlns:xforms="http://www.w3.org/2002/xforms" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:rpt="http://openoffice.org/2005/report" xmlns:of="urn:oasis:names:tc:opendocument:xmlns:of:1.2" xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:grddl="http://www.w3.org/2003/g/data-view#" xmlns:tableooo="http://openoffice.org/2009/table" xmlns:field="urn:openoffice:names:experimental:ooo-ms-interop:xmlns:field:1.0" office:version="1.2"><office:scripts/> <office:font-face-decls><style:font-face style:name="OpenSymbol" svg:font-family="OpenSymbol"/><style:font-face style:name="\u5fae\u8f6f\u96c5\u9ed1" svg:font-family="\u5fae\u8f6f\u96c5\u9ed1"/><style:font-face style:name="Lucida Sans1" svg:font-family="&apos;Lucida Sans&apos;" style:font-family-generic="swiss"/><style:font-face style:name="\u5b8b\u4f53" svg:font-family="\u5b8b\u4f53" style:font-pitch="variable"/><style:font-face style:name="\u9ed1\u4f53" svg:font-family="\u9ed1\u4f53" style:font-pitch="variable"/><style:font-face style:name="Times New Roman" svg:font-family="&apos;Times New Roman&apos;"  style:font-family-generic="roman" style:font-pitch="variable"/><style:font-face style:name="Century Gothic" svg:font-family="Century Gothic" style:font-family-generic="swiss" style:font-pitch="variable"/><style:font-face style:name="Lucida Sans" svg:font-family="&apos;Lucida Sans&apos;" style:font-family-generic="system" style:font-pitch="variable"/><style:font-face style:name="\u5fae\u8f6f\u96c5\u9ed11" svg:font-family="\u5fae\u8f6f\u96c5\u9ed1" style:font-family-generic="system" style:font-pitch="variable"/></office:font-face-decls><office:automatic-styles><style:style style:name="fr1" style:family="graphic" style:parent-style-name="Graphics"><style:graphic-properties style:vertical-pos="top" style:vertical-rel="baseline" style:horizontal-pos="center" style:horizontal-rel="paragraph" style:shadow="none" style:mirror="none" fo:clip="rect(0cm, 0cm, 0cm, 0cm)" draw:luminance="0%" draw:contrast="0%" draw:red="0%" draw:green="0%" draw:blue="0%" draw:gamma="100%" draw:color-inversion="false" draw:image-opacity="100%" draw:color-mode="standard"/></style:style><text:list-style style:name="L1"><text:list-level-style-number text:level="1" text:style-name="Numbering_20_Symbols" style:num-suffix="." style:num-format="1"><style:list-level-properties text:list-level-position-and-space-mode="label-alignment"><style:list-level-label-alignment text:label-followed-by="listtab" text:list-tab-stop-position="1.27cm" fo:text-indent="-0.635cm" fo:margin-left="1.27cm"/></style:list-level-properties></text:list-level-style-number><text:list-level-style-number text:level="2" text:style-name="Numbering_20_Symbols" style:num-suffix="." style:num-format="1"><style:list-level-properties text:list-level-position-and-space-mode="label-alignment"> <style:list-level-label-alignment text:label-followed-by="listtab" text:list-tab-stop-position="1.905cm" fo:text-indent="-0.635cm" fo:margin-left="1.905cm"/></style:list-level-properties></text:list-level-style-number><text:list-level-style-number text:level="3" text:style-name="Numbering_20_Symbols" style:num-suffix="." style:num-format="1"> <style:list-level-properties text:list-level-position-and-space-mode="label-alignment"><style:list-level-label-alignment text:label-followed-by="listtab" text:list-tab-stop-position="2.54cm" fo:text-indent="-0.635cm" fo:margin-left="2.54cm"/></style:list-level-properties></text:list-level-style-number><text:list-level-style-number text:level="4" text:style-name="Numbering_20_Symbols" style:num-suffix="." style:num-format="1"><style:list-level-properties text:list-level-position-and-space-mode="label-alignment"><style:list-level-label-alignment text:label-followed-by="listtab" text:list-tab-stop-position="3.175cm" fo:text-indent="-0.635cm"  fo:margin-left="3.175cm"/></style:list-level-properties></text:list-level-style-number><text:list-level-style-number text:level="5" text:style-name="Numbering_20_Symbols" style:num-suffix="." style:num-format="1"><style:list-level-properties text:list-level-position-and-space-mode="label-alignment"> <style:list-level-label-alignment text:label-followed-by="listtab"  text:list-tab-stop-position="3.81cm" fo:text-indent="-0.635cm" fo:margin-left="3.81cm"/></style:list-level-properties></text:list-level-style-number><text:list-level-style-number text:level="6" text:style-name="Numbering_20_Symbols" style:num-suffix="." style:num-format="1"> <style:list-level-properties text:list-level-position-and-space-mode="label-alignment"> <style:list-level-label-alignment text:label-followed-by="listtab" text:list-tab-stop-position="4.445cm" fo:text-indent="-0.635cm" fo:margin-left="4.445cm"/> </style:list-level-properties></text:list-level-style-number><text:list-level-style-number text:level="7" text:style-name="Numbering_20_Symbols" style:num-suffix="." style:num-format="1"><style:list-level-properties text:list-level-position-and-space-mode="label-alignment"><style:list-level-label-alignment text:label-followed-by="listtab" text:list-tab-stop-position="5.08cm" fo:text-indent="-0.635cm"  fo:margin-left="5.08cm"/> </style:list-level-properties></text:list-level-style-number><text:list-level-style-number text:level="8" text:style-name="Numbering_20_Symbols" style:num-suffix="." style:num-format="1"><style:list-level-properties text:list-level-position-and-space-mode="label-alignment"><style:list-level-label-alignment text:label-followed-by="listtab" text:list-tab-stop-position="5.715cm" fo:text-indent="-0.635cm" fo:margin-left="5.715cm"/> </style:list-level-properties></text:list-level-style-number><text:list-level-style-number text:level="9" text:style-name="Numbering_20_Symbols" style:num-suffix="." style:num-format="1"> <style:list-level-properties text:list-level-position-and-space-mode="label-alignment"><style:list-level-label-alignment text:label-followed-by="listtab" text:list-tab-stop-position="6.35cm" fo:text-indent="-0.635cm" fo:margin-left="6.35cm"/> </style:list-level-properties></text:list-level-style-number><text:list-level-style-number text:level="10" text:style-name="Numbering_20_Symbols" style:num-suffix="." style:num-format="1"><style:list-level-properties text:list-level-position-and-space-mode="label-alignment"><style:list-level-label-alignment text:label-followed-by="listtab" text:list-tab-stop-position="6.985cm" fo:text-indent="-0.635cm" fo:margin-left="6.985cm"/></style:list-level-properties></text:list-level-style-number></text:list-style><text:list-style style:name="L2"><text:list-level-style-bullet text:level="1" text:style-name="Bullet_20_Symbols" text:bullet-char="\u2022"><style:list-level-properties text:list-level-position-and-space-mode="label-alignment"><style:list-level-label-alignment text:label-followed-by="listtab" text:list-tab-stop-position="1.27cm" fo:text-indent="-0.635cm" fo:margin-left="1.27cm"/></style:list-level-properties></text:list-level-style-bullet> <text:list-level-style-bullet text:level="2" text:style-name="Bullet_20_Symbols" text:bullet-char="\u25e6">     <style:list-level-properties text:list-level-position-and-space-mode="label-alignment">         <style:list-level-label-alignment text:label-followed-by="listtab" text:list-tab-stop-position="1.905cm" fo:text-indent="-0.635cm" fo:margin-left="1.905cm"/>     </style:list-level-properties> </text:list-level-style-bullet> <text:list-level-style-bullet text:level="3" text:style-name="Bullet_20_Symbols" text:bullet-char="\u25aa">     <style:list-level-properties text:list-level-position-and-space-mode="label-alignment">         <style:list-level-label-alignment text:label-followed-by="listtab" text:list-tab-stop-position="2.54cm" fo:text-indent="-0.635cm" fo:margin-left="2.54cm"/>     </style:list-level-properties> </text:list-level-style-bullet> <text:list-level-style-bullet text:level="4" text:style-name="Bullet_20_Symbols" text:bullet-char="\u2022">     <style:list-level-properties text:list-level-position-and-space-mode="label-alignment">         <style:list-level-label-alignment text:label-followed-by="listtab" text:list-tab-stop-position="3.175cm" fo:text-indent="-0.635cm" fo:margin-left="3.175cm"/>     </style:list-level-properties> </text:list-level-style-bullet> <text:list-level-style-bullet text:level="5" text:style-name="Bullet_20_Symbols" text:bullet-char="\u25e6">     <style:list-level-properties text:list-level-position-and-space-mode="label-alignment">         <style:list-level-label-alignment text:label-followed-by="listtab" text:list-tab-stop-position="3.81cm" fo:text-indent="-0.635cm" fo:margin-left="3.81cm"/>     </style:list-level-properties> </text:list-level-style-bullet> <text:list-level-style-bullet text:level="6" text:style-name="Bullet_20_Symbols" text:bullet-char="\u25aa">     <style:list-level-properties text:list-level-position-and-space-mode="label-alignment">         <style:list-level-label-alignment text:label-followed-by="listtab" text:list-tab-stop-position="4.445cm" fo:text-indent="-0.635cm" fo:margin-left="4.445cm"/>     </style:list-level-properties> </text:list-level-style-bullet> <text:list-level-style-bullet text:level="7" text:style-name="Bullet_20_Symbols" text:bullet-char="\u2022">     <style:list-level-properties text:list-level-position-and-space-mode="label-alignment">         <style:list-level-label-alignment text:label-followed-by="listtab" text:list-tab-stop-position="5.08cm" fo:text-indent="-0.635cm" fo:margin-left="5.08cm"/>     </style:list-level-properties> </text:list-level-style-bullet> <text:list-level-style-bullet text:level="8" text:style-name="Bullet_20_Symbols" text:bullet-char="\u25e6">     <style:list-level-properties text:list-level-position-and-space-mode="label-alignment">         <style:list-level-label-alignment text:label-followed-by="listtab" text:list-tab-stop-position="5.715cm" fo:text-indent="-0.635cm" fo:margin-left="5.715cm"/>     </style:list-level-properties> </text:list-level-style-bullet> <text:list-level-style-bullet text:level="9" text:style-name="Bullet_20_Symbols" text:bullet-char="\u25aa">     <style:list-level-properties text:list-level-position-and-space-mode="label-alignment">         <style:list-level-label-alignment text:label-followed-by="listtab" text:list-tab-stop-position="6.35cm" fo:text-indent="-0.635cm" fo:margin-left="6.35cm"/>     </style:list-level-properties> </text:list-level-style-bullet> <text:list-level-style-bullet text:level="10" text:style-name="Bullet_20_Symbols" text:bullet-char="\u2022">     <style:list-level-properties text:list-level-position-and-space-mode="label-alignment">         <style:list-level-label-alignment text:label-followed-by="listtab" text:list-tab-stop-position="6.985cm" fo:text-indent="-0.635cm" fo:margin-left="6.985cm"/>     </style:list-level-properties> </text:list-level-style-bullet>        </text:list-style><number:number-style style:name="N0"> <number:number number:min-integer-digits="1"/></number:number-style></office:automatic-styles><office:body><office:text /></office:body></office:document-content>',
f:{"9px":"7pt","10px":"7.5pt","11px":"8.5pt","12px":"9pt","13px":"10pt","14px":"10.5pt","14.8px":"10.5pt","15px":"11.5pt","16px":"12pt","17px":"13pt","18px":"13.5pt","19px":"14.5pt","20px":"15pt","21px":"16pt","22px":"16.5pt","23px":"17.5pt","24px":"18pt","25px":"19pt","26px":"19.5pt","27px":"20.5pt","28px":"21pt","29px":"22pt","30px":"22.5pt","31px":"23.5pt","32px":"24pt","33px":"25pt","34px":"25.5pt","35px":"26.5pt","36px":"27pt","37px":"28pt","38px":"28.5pt","39px":"29.5pt","40px":"30pt","41px":"31pt",
"42px":"31.5pt","43px":"32.5pt","44px":"33pt","45px":"34pt","46px":"34.5pt","47px":"35.5pt","48px":"36pt","49px":"37pt","50px":"37.5pt","51px":"38.5pt","52px":"39pt","53px":"40pt","54px":"40.5pt","55px":"41.5pt","56px":"42pt","57px":"43pt","58px":"43.5pt","59px":"44.5pt","60px":"45pt","61px":"46pt","62px":"46.5pt","63px":"47.5pt","64px":"48pt","65px":"49pt","66px":"49.5pt","67px":"50.5pt","68px":"51pt","69px":"52pt","70px":"52.5pt","71px":"53.5pt","72px":"54pt","73px":"55pt","74px":"55.5pt","75px":"56.5pt",
"76px":"57pt","77px":"58pt","78px":"58.5pt","79px":"59.5pt","80px":"60pt","81px":"61pt","82px":"61.5pt","83px":"62.5pt","84px":"63pt","85px":"64pt","86px":"64.5pt","87px":"65.5pt","88px":"66pt","89px":"67pt","90px":"67.5pt","91px":"68.5pt","92px":"69pt","93px":"70pt","94px":"70.5pt","95px":"71.5pt","96px":"72pt","97px":"73pt","98px":"73.5pt","99px":"74.5pt"},borders:["top","bottom","right","left"]};this.postData=function(){return{xml:this.xml(),pics:this.pics.join(","),ols:this.liNum}};this.init();
this.xml=function(){return this.doc.GetXml()}};


/** /EmpScriptV2/thrid-party/jquery/jquery-1.12.3.min.js **/


/*! jQuery v1.12.3 | (c) jQuery Foundation | jquery.org/license */
!function(a,b){"object"==typeof module&&"object"==typeof module.exports?module.exports=a.document?b(a,!0):function(a){if(!a.document)throw new Error("jQuery requires a window with a document");return b(a)}:b(a)}("undefined"!=typeof window?window:this,function(a,b){var c=[],d=a.document,e=c.slice,f=c.concat,g=c.push,h=c.indexOf,i={},j=i.toString,k=i.hasOwnProperty,l={},m="1.12.3",n=function(a,b){return new n.fn.init(a,b)},o=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,p=/^-ms-/,q=/-([\da-z])/gi,r=function(a,b){return b.toUpperCase()};n.fn=n.prototype={jquery:m,constructor:n,selector:"",length:0,toArray:function(){return e.call(this)},get:function(a){return null!=a?0>a?this[a+this.length]:this[a]:e.call(this)},pushStack:function(a){var b=n.merge(this.constructor(),a);return b.prevObject=this,b.context=this.context,b},each:function(a){return n.each(this,a)},map:function(a){return this.pushStack(n.map(this,function(b,c){return a.call(b,c,b)}))},slice:function(){return this.pushStack(e.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(a){var b=this.length,c=+a+(0>a?b:0);return this.pushStack(c>=0&&b>c?[this[c]]:[])},end:function(){return this.prevObject||this.constructor()},push:g,sort:c.sort,splice:c.splice},n.extend=n.fn.extend=function(){var a,b,c,d,e,f,g=arguments[0]||{},h=1,i=arguments.length,j=!1;for("boolean"==typeof g&&(j=g,g=arguments[h]||{},h++),"object"==typeof g||n.isFunction(g)||(g={}),h===i&&(g=this,h--);i>h;h++)if(null!=(e=arguments[h]))for(d in e)a=g[d],c=e[d],g!==c&&(j&&c&&(n.isPlainObject(c)||(b=n.isArray(c)))?(b?(b=!1,f=a&&n.isArray(a)?a:[]):f=a&&n.isPlainObject(a)?a:{},g[d]=n.extend(j,f,c)):void 0!==c&&(g[d]=c));return g},n.extend({expando:"jQuery"+(m+Math.random()).replace(/\D/g,""),isReady:!0,error:function(a){throw new Error(a)},noop:function(){},isFunction:function(a){return"function"===n.type(a)},isArray:Array.isArray||function(a){return"array"===n.type(a)},isWindow:function(a){return null!=a&&a==a.window},isNumeric:function(a){var b=a&&a.toString();return!n.isArray(a)&&b-parseFloat(b)+1>=0},isEmptyObject:function(a){var b;for(b in a)return!1;return!0},isPlainObject:function(a){var b;if(!a||"object"!==n.type(a)||a.nodeType||n.isWindow(a))return!1;try{if(a.constructor&&!k.call(a,"constructor")&&!k.call(a.constructor.prototype,"isPrototypeOf"))return!1}catch(c){return!1}if(!l.ownFirst)for(b in a)return k.call(a,b);for(b in a);return void 0===b||k.call(a,b)},type:function(a){return null==a?a+"":"object"==typeof a||"function"==typeof a?i[j.call(a)]||"object":typeof a},globalEval:function(b){b&&n.trim(b)&&(a.execScript||function(b){a.eval.call(a,b)})(b)},camelCase:function(a){return a.replace(p,"ms-").replace(q,r)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toLowerCase()===b.toLowerCase()},each:function(a,b){var c,d=0;if(s(a)){for(c=a.length;c>d;d++)if(b.call(a[d],d,a[d])===!1)break}else for(d in a)if(b.call(a[d],d,a[d])===!1)break;return a},trim:function(a){return null==a?"":(a+"").replace(o,"")},makeArray:function(a,b){var c=b||[];return null!=a&&(s(Object(a))?n.merge(c,"string"==typeof a?[a]:a):g.call(c,a)),c},inArray:function(a,b,c){var d;if(b){if(h)return h.call(b,a,c);for(d=b.length,c=c?0>c?Math.max(0,d+c):c:0;d>c;c++)if(c in b&&b[c]===a)return c}return-1},merge:function(a,b){var c=+b.length,d=0,e=a.length;while(c>d)a[e++]=b[d++];if(c!==c)while(void 0!==b[d])a[e++]=b[d++];return a.length=e,a},grep:function(a,b,c){for(var d,e=[],f=0,g=a.length,h=!c;g>f;f++)d=!b(a[f],f),d!==h&&e.push(a[f]);return e},map:function(a,b,c){var d,e,g=0,h=[];if(s(a))for(d=a.length;d>g;g++)e=b(a[g],g,c),null!=e&&h.push(e);else for(g in a)e=b(a[g],g,c),null!=e&&h.push(e);return f.apply([],h)},guid:1,proxy:function(a,b){var c,d,f;return"string"==typeof b&&(f=a[b],b=a,a=f),n.isFunction(a)?(c=e.call(arguments,2),d=function(){return a.apply(b||this,c.concat(e.call(arguments)))},d.guid=a.guid=a.guid||n.guid++,d):void 0},now:function(){return+new Date},support:l}),"function"==typeof Symbol&&(n.fn[Symbol.iterator]=c[Symbol.iterator]),n.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),function(a,b){i["[object "+b+"]"]=b.toLowerCase()});function s(a){var b=!!a&&"length"in a&&a.length,c=n.type(a);return"function"===c||n.isWindow(a)?!1:"array"===c||0===b||"number"==typeof b&&b>0&&b-1 in a}var t=function(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u="sizzle"+1*new Date,v=a.document,w=0,x=0,y=ga(),z=ga(),A=ga(),B=function(a,b){return a===b&&(l=!0),0},C=1<<31,D={}.hasOwnProperty,E=[],F=E.pop,G=E.push,H=E.push,I=E.slice,J=function(a,b){for(var c=0,d=a.length;d>c;c++)if(a[c]===b)return c;return-1},K="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",L="[\\x20\\t\\r\\n\\f]",M="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",N="\\["+L+"*("+M+")(?:"+L+"*([*^$|!~]?=)"+L+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+M+"))|)"+L+"*\\]",O=":("+M+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+N+")*)|.*)\\)|)",P=new RegExp(L+"+","g"),Q=new RegExp("^"+L+"+|((?:^|[^\\\\])(?:\\\\.)*)"+L+"+$","g"),R=new RegExp("^"+L+"*,"+L+"*"),S=new RegExp("^"+L+"*([>+~]|"+L+")"+L+"*"),T=new RegExp("="+L+"*([^\\]'\"]*?)"+L+"*\\]","g"),U=new RegExp(O),V=new RegExp("^"+M+"$"),W={ID:new RegExp("^#("+M+")"),CLASS:new RegExp("^\\.("+M+")"),TAG:new RegExp("^("+M+"|[*])"),ATTR:new RegExp("^"+N),PSEUDO:new RegExp("^"+O),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+L+"*(even|odd|(([+-]|)(\\d*)n|)"+L+"*(?:([+-]|)"+L+"*(\\d+)|))"+L+"*\\)|)","i"),bool:new RegExp("^(?:"+K+")$","i"),needsContext:new RegExp("^"+L+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+L+"*((?:-\\d)?\\d*)"+L+"*\\)|)(?=[^-]|$)","i")},X=/^(?:input|select|textarea|button)$/i,Y=/^h\d$/i,Z=/^[^{]+\{\s*\[native \w/,$=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,_=/[+~]/,aa=/'|\\/g,ba=new RegExp("\\\\([\\da-f]{1,6}"+L+"?|("+L+")|.)","ig"),ca=function(a,b,c){var d="0x"+b-65536;return d!==d||c?b:0>d?String.fromCharCode(d+65536):String.fromCharCode(d>>10|55296,1023&d|56320)},da=function(){m()};try{H.apply(E=I.call(v.childNodes),v.childNodes),E[v.childNodes.length].nodeType}catch(ea){H={apply:E.length?function(a,b){G.apply(a,I.call(b))}:function(a,b){var c=a.length,d=0;while(a[c++]=b[d++]);a.length=c-1}}}function fa(a,b,d,e){var f,h,j,k,l,o,r,s,w=b&&b.ownerDocument,x=b?b.nodeType:9;if(d=d||[],"string"!=typeof a||!a||1!==x&&9!==x&&11!==x)return d;if(!e&&((b?b.ownerDocument||b:v)!==n&&m(b),b=b||n,p)){if(11!==x&&(o=$.exec(a)))if(f=o[1]){if(9===x){if(!(j=b.getElementById(f)))return d;if(j.id===f)return d.push(j),d}else if(w&&(j=w.getElementById(f))&&t(b,j)&&j.id===f)return d.push(j),d}else{if(o[2])return H.apply(d,b.getElementsByTagName(a)),d;if((f=o[3])&&c.getElementsByClassName&&b.getElementsByClassName)return H.apply(d,b.getElementsByClassName(f)),d}if(c.qsa&&!A[a+" "]&&(!q||!q.test(a))){if(1!==x)w=b,s=a;else if("object"!==b.nodeName.toLowerCase()){(k=b.getAttribute("id"))?k=k.replace(aa,"\\$&"):b.setAttribute("id",k=u),r=g(a),h=r.length,l=V.test(k)?"#"+k:"[id='"+k+"']";while(h--)r[h]=l+" "+qa(r[h]);s=r.join(","),w=_.test(a)&&oa(b.parentNode)||b}if(s)try{return H.apply(d,w.querySelectorAll(s)),d}catch(y){}finally{k===u&&b.removeAttribute("id")}}}return i(a.replace(Q,"$1"),b,d,e)}function ga(){var a=[];function b(c,e){return a.push(c+" ")>d.cacheLength&&delete b[a.shift()],b[c+" "]=e}return b}function ha(a){return a[u]=!0,a}function ia(a){var b=n.createElement("div");try{return!!a(b)}catch(c){return!1}finally{b.parentNode&&b.parentNode.removeChild(b),b=null}}function ja(a,b){var c=a.split("|"),e=c.length;while(e--)d.attrHandle[c[e]]=b}function ka(a,b){var c=b&&a,d=c&&1===a.nodeType&&1===b.nodeType&&(~b.sourceIndex||C)-(~a.sourceIndex||C);if(d)return d;if(c)while(c=c.nextSibling)if(c===b)return-1;return a?1:-1}function la(a){return function(b){var c=b.nodeName.toLowerCase();return"input"===c&&b.type===a}}function ma(a){return function(b){var c=b.nodeName.toLowerCase();return("input"===c||"button"===c)&&b.type===a}}function na(a){return ha(function(b){return b=+b,ha(function(c,d){var e,f=a([],c.length,b),g=f.length;while(g--)c[e=f[g]]&&(c[e]=!(d[e]=c[e]))})})}function oa(a){return a&&"undefined"!=typeof a.getElementsByTagName&&a}c=fa.support={},f=fa.isXML=function(a){var b=a&&(a.ownerDocument||a).documentElement;return b?"HTML"!==b.nodeName:!1},m=fa.setDocument=function(a){var b,e,g=a?a.ownerDocument||a:v;return g!==n&&9===g.nodeType&&g.documentElement?(n=g,o=n.documentElement,p=!f(n),(e=n.defaultView)&&e.top!==e&&(e.addEventListener?e.addEventListener("unload",da,!1):e.attachEvent&&e.attachEvent("onunload",da)),c.attributes=ia(function(a){return a.className="i",!a.getAttribute("className")}),c.getElementsByTagName=ia(function(a){return a.appendChild(n.createComment("")),!a.getElementsByTagName("*").length}),c.getElementsByClassName=Z.test(n.getElementsByClassName),c.getById=ia(function(a){return o.appendChild(a).id=u,!n.getElementsByName||!n.getElementsByName(u).length}),c.getById?(d.find.ID=function(a,b){if("undefined"!=typeof b.getElementById&&p){var c=b.getElementById(a);return c?[c]:[]}},d.filter.ID=function(a){var b=a.replace(ba,ca);return function(a){return a.getAttribute("id")===b}}):(delete d.find.ID,d.filter.ID=function(a){var b=a.replace(ba,ca);return function(a){var c="undefined"!=typeof a.getAttributeNode&&a.getAttributeNode("id");return c&&c.value===b}}),d.find.TAG=c.getElementsByTagName?function(a,b){return"undefined"!=typeof b.getElementsByTagName?b.getElementsByTagName(a):c.qsa?b.querySelectorAll(a):void 0}:function(a,b){var c,d=[],e=0,f=b.getElementsByTagName(a);if("*"===a){while(c=f[e++])1===c.nodeType&&d.push(c);return d}return f},d.find.CLASS=c.getElementsByClassName&&function(a,b){return"undefined"!=typeof b.getElementsByClassName&&p?b.getElementsByClassName(a):void 0},r=[],q=[],(c.qsa=Z.test(n.querySelectorAll))&&(ia(function(a){o.appendChild(a).innerHTML="<a id='"+u+"'></a><select id='"+u+"-\r\\' msallowcapture=''><option selected=''></option></select>",a.querySelectorAll("[msallowcapture^='']").length&&q.push("[*^$]="+L+"*(?:''|\"\")"),a.querySelectorAll("[selected]").length||q.push("\\["+L+"*(?:value|"+K+")"),a.querySelectorAll("[id~="+u+"-]").length||q.push("~="),a.querySelectorAll(":checked").length||q.push(":checked"),a.querySelectorAll("a#"+u+"+*").length||q.push(".#.+[+~]")}),ia(function(a){var b=n.createElement("input");b.setAttribute("type","hidden"),a.appendChild(b).setAttribute("name","D"),a.querySelectorAll("[name=d]").length&&q.push("name"+L+"*[*^$|!~]?="),a.querySelectorAll(":enabled").length||q.push(":enabled",":disabled"),a.querySelectorAll("*,:x"),q.push(",.*:")})),(c.matchesSelector=Z.test(s=o.matches||o.webkitMatchesSelector||o.mozMatchesSelector||o.oMatchesSelector||o.msMatchesSelector))&&ia(function(a){c.disconnectedMatch=s.call(a,"div"),s.call(a,"[s!='']:x"),r.push("!=",O)}),q=q.length&&new RegExp(q.join("|")),r=r.length&&new RegExp(r.join("|")),b=Z.test(o.compareDocumentPosition),t=b||Z.test(o.contains)?function(a,b){var c=9===a.nodeType?a.documentElement:a,d=b&&b.parentNode;return a===d||!(!d||1!==d.nodeType||!(c.contains?c.contains(d):a.compareDocumentPosition&&16&a.compareDocumentPosition(d)))}:function(a,b){if(b)while(b=b.parentNode)if(b===a)return!0;return!1},B=b?function(a,b){if(a===b)return l=!0,0;var d=!a.compareDocumentPosition-!b.compareDocumentPosition;return d?d:(d=(a.ownerDocument||a)===(b.ownerDocument||b)?a.compareDocumentPosition(b):1,1&d||!c.sortDetached&&b.compareDocumentPosition(a)===d?a===n||a.ownerDocument===v&&t(v,a)?-1:b===n||b.ownerDocument===v&&t(v,b)?1:k?J(k,a)-J(k,b):0:4&d?-1:1)}:function(a,b){if(a===b)return l=!0,0;var c,d=0,e=a.parentNode,f=b.parentNode,g=[a],h=[b];if(!e||!f)return a===n?-1:b===n?1:e?-1:f?1:k?J(k,a)-J(k,b):0;if(e===f)return ka(a,b);c=a;while(c=c.parentNode)g.unshift(c);c=b;while(c=c.parentNode)h.unshift(c);while(g[d]===h[d])d++;return d?ka(g[d],h[d]):g[d]===v?-1:h[d]===v?1:0},n):n},fa.matches=function(a,b){return fa(a,null,null,b)},fa.matchesSelector=function(a,b){if((a.ownerDocument||a)!==n&&m(a),b=b.replace(T,"='$1']"),c.matchesSelector&&p&&!A[b+" "]&&(!r||!r.test(b))&&(!q||!q.test(b)))try{var d=s.call(a,b);if(d||c.disconnectedMatch||a.document&&11!==a.document.nodeType)return d}catch(e){}return fa(b,n,null,[a]).length>0},fa.contains=function(a,b){return(a.ownerDocument||a)!==n&&m(a),t(a,b)},fa.attr=function(a,b){(a.ownerDocument||a)!==n&&m(a);var e=d.attrHandle[b.toLowerCase()],f=e&&D.call(d.attrHandle,b.toLowerCase())?e(a,b,!p):void 0;return void 0!==f?f:c.attributes||!p?a.getAttribute(b):(f=a.getAttributeNode(b))&&f.specified?f.value:null},fa.error=function(a){throw new Error("Syntax error, unrecognized expression: "+a)},fa.uniqueSort=function(a){var b,d=[],e=0,f=0;if(l=!c.detectDuplicates,k=!c.sortStable&&a.slice(0),a.sort(B),l){while(b=a[f++])b===a[f]&&(e=d.push(f));while(e--)a.splice(d[e],1)}return k=null,a},e=fa.getText=function(a){var b,c="",d=0,f=a.nodeType;if(f){if(1===f||9===f||11===f){if("string"==typeof a.textContent)return a.textContent;for(a=a.firstChild;a;a=a.nextSibling)c+=e(a)}else if(3===f||4===f)return a.nodeValue}else while(b=a[d++])c+=e(b);return c},d=fa.selectors={cacheLength:50,createPseudo:ha,match:W,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(a){return a[1]=a[1].replace(ba,ca),a[3]=(a[3]||a[4]||a[5]||"").replace(ba,ca),"~="===a[2]&&(a[3]=" "+a[3]+" "),a.slice(0,4)},CHILD:function(a){return a[1]=a[1].toLowerCase(),"nth"===a[1].slice(0,3)?(a[3]||fa.error(a[0]),a[4]=+(a[4]?a[5]+(a[6]||1):2*("even"===a[3]||"odd"===a[3])),a[5]=+(a[7]+a[8]||"odd"===a[3])):a[3]&&fa.error(a[0]),a},PSEUDO:function(a){var b,c=!a[6]&&a[2];return W.CHILD.test(a[0])?null:(a[3]?a[2]=a[4]||a[5]||"":c&&U.test(c)&&(b=g(c,!0))&&(b=c.indexOf(")",c.length-b)-c.length)&&(a[0]=a[0].slice(0,b),a[2]=c.slice(0,b)),a.slice(0,3))}},filter:{TAG:function(a){var b=a.replace(ba,ca).toLowerCase();return"*"===a?function(){return!0}:function(a){return a.nodeName&&a.nodeName.toLowerCase()===b}},CLASS:function(a){var b=y[a+" "];return b||(b=new RegExp("(^|"+L+")"+a+"("+L+"|$)"))&&y(a,function(a){return b.test("string"==typeof a.className&&a.className||"undefined"!=typeof a.getAttribute&&a.getAttribute("class")||"")})},ATTR:function(a,b,c){return function(d){var e=fa.attr(d,a);return null==e?"!="===b:b?(e+="","="===b?e===c:"!="===b?e!==c:"^="===b?c&&0===e.indexOf(c):"*="===b?c&&e.indexOf(c)>-1:"$="===b?c&&e.slice(-c.length)===c:"~="===b?(" "+e.replace(P," ")+" ").indexOf(c)>-1:"|="===b?e===c||e.slice(0,c.length+1)===c+"-":!1):!0}},CHILD:function(a,b,c,d,e){var f="nth"!==a.slice(0,3),g="last"!==a.slice(-4),h="of-type"===b;return 1===d&&0===e?function(a){return!!a.parentNode}:function(b,c,i){var j,k,l,m,n,o,p=f!==g?"nextSibling":"previousSibling",q=b.parentNode,r=h&&b.nodeName.toLowerCase(),s=!i&&!h,t=!1;if(q){if(f){while(p){m=b;while(m=m[p])if(h?m.nodeName.toLowerCase()===r:1===m.nodeType)return!1;o=p="only"===a&&!o&&"nextSibling"}return!0}if(o=[g?q.firstChild:q.lastChild],g&&s){m=q,l=m[u]||(m[u]={}),k=l[m.uniqueID]||(l[m.uniqueID]={}),j=k[a]||[],n=j[0]===w&&j[1],t=n&&j[2],m=n&&q.childNodes[n];while(m=++n&&m&&m[p]||(t=n=0)||o.pop())if(1===m.nodeType&&++t&&m===b){k[a]=[w,n,t];break}}else if(s&&(m=b,l=m[u]||(m[u]={}),k=l[m.uniqueID]||(l[m.uniqueID]={}),j=k[a]||[],n=j[0]===w&&j[1],t=n),t===!1)while(m=++n&&m&&m[p]||(t=n=0)||o.pop())if((h?m.nodeName.toLowerCase()===r:1===m.nodeType)&&++t&&(s&&(l=m[u]||(m[u]={}),k=l[m.uniqueID]||(l[m.uniqueID]={}),k[a]=[w,t]),m===b))break;return t-=e,t===d||t%d===0&&t/d>=0}}},PSEUDO:function(a,b){var c,e=d.pseudos[a]||d.setFilters[a.toLowerCase()]||fa.error("unsupported pseudo: "+a);return e[u]?e(b):e.length>1?(c=[a,a,"",b],d.setFilters.hasOwnProperty(a.toLowerCase())?ha(function(a,c){var d,f=e(a,b),g=f.length;while(g--)d=J(a,f[g]),a[d]=!(c[d]=f[g])}):function(a){return e(a,0,c)}):e}},pseudos:{not:ha(function(a){var b=[],c=[],d=h(a.replace(Q,"$1"));return d[u]?ha(function(a,b,c,e){var f,g=d(a,null,e,[]),h=a.length;while(h--)(f=g[h])&&(a[h]=!(b[h]=f))}):function(a,e,f){return b[0]=a,d(b,null,f,c),b[0]=null,!c.pop()}}),has:ha(function(a){return function(b){return fa(a,b).length>0}}),contains:ha(function(a){return a=a.replace(ba,ca),function(b){return(b.textContent||b.innerText||e(b)).indexOf(a)>-1}}),lang:ha(function(a){return V.test(a||"")||fa.error("unsupported lang: "+a),a=a.replace(ba,ca).toLowerCase(),function(b){var c;do if(c=p?b.lang:b.getAttribute("xml:lang")||b.getAttribute("lang"))return c=c.toLowerCase(),c===a||0===c.indexOf(a+"-");while((b=b.parentNode)&&1===b.nodeType);return!1}}),target:function(b){var c=a.location&&a.location.hash;return c&&c.slice(1)===b.id},root:function(a){return a===o},focus:function(a){return a===n.activeElement&&(!n.hasFocus||n.hasFocus())&&!!(a.type||a.href||~a.tabIndex)},enabled:function(a){return a.disabled===!1},disabled:function(a){return a.disabled===!0},checked:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&!!a.checked||"option"===b&&!!a.selected},selected:function(a){return a.parentNode&&a.parentNode.selectedIndex,a.selected===!0},empty:function(a){for(a=a.firstChild;a;a=a.nextSibling)if(a.nodeType<6)return!1;return!0},parent:function(a){return!d.pseudos.empty(a)},header:function(a){return Y.test(a.nodeName)},input:function(a){return X.test(a.nodeName)},button:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&"button"===a.type||"button"===b},text:function(a){var b;return"input"===a.nodeName.toLowerCase()&&"text"===a.type&&(null==(b=a.getAttribute("type"))||"text"===b.toLowerCase())},first:na(function(){return[0]}),last:na(function(a,b){return[b-1]}),eq:na(function(a,b,c){return[0>c?c+b:c]}),even:na(function(a,b){for(var c=0;b>c;c+=2)a.push(c);return a}),odd:na(function(a,b){for(var c=1;b>c;c+=2)a.push(c);return a}),lt:na(function(a,b,c){for(var d=0>c?c+b:c;--d>=0;)a.push(d);return a}),gt:na(function(a,b,c){for(var d=0>c?c+b:c;++d<b;)a.push(d);return a})}},d.pseudos.nth=d.pseudos.eq;for(b in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})d.pseudos[b]=la(b);for(b in{submit:!0,reset:!0})d.pseudos[b]=ma(b);function pa(){}pa.prototype=d.filters=d.pseudos,d.setFilters=new pa,g=fa.tokenize=function(a,b){var c,e,f,g,h,i,j,k=z[a+" "];if(k)return b?0:k.slice(0);h=a,i=[],j=d.preFilter;while(h){c&&!(e=R.exec(h))||(e&&(h=h.slice(e[0].length)||h),i.push(f=[])),c=!1,(e=S.exec(h))&&(c=e.shift(),f.push({value:c,type:e[0].replace(Q," ")}),h=h.slice(c.length));for(g in d.filter)!(e=W[g].exec(h))||j[g]&&!(e=j[g](e))||(c=e.shift(),f.push({value:c,type:g,matches:e}),h=h.slice(c.length));if(!c)break}return b?h.length:h?fa.error(a):z(a,i).slice(0)};function qa(a){for(var b=0,c=a.length,d="";c>b;b++)d+=a[b].value;return d}function ra(a,b,c){var d=b.dir,e=c&&"parentNode"===d,f=x++;return b.first?function(b,c,f){while(b=b[d])if(1===b.nodeType||e)return a(b,c,f)}:function(b,c,g){var h,i,j,k=[w,f];if(g){while(b=b[d])if((1===b.nodeType||e)&&a(b,c,g))return!0}else while(b=b[d])if(1===b.nodeType||e){if(j=b[u]||(b[u]={}),i=j[b.uniqueID]||(j[b.uniqueID]={}),(h=i[d])&&h[0]===w&&h[1]===f)return k[2]=h[2];if(i[d]=k,k[2]=a(b,c,g))return!0}}}function sa(a){return a.length>1?function(b,c,d){var e=a.length;while(e--)if(!a[e](b,c,d))return!1;return!0}:a[0]}function ta(a,b,c){for(var d=0,e=b.length;e>d;d++)fa(a,b[d],c);return c}function ua(a,b,c,d,e){for(var f,g=[],h=0,i=a.length,j=null!=b;i>h;h++)(f=a[h])&&(c&&!c(f,d,e)||(g.push(f),j&&b.push(h)));return g}function va(a,b,c,d,e,f){return d&&!d[u]&&(d=va(d)),e&&!e[u]&&(e=va(e,f)),ha(function(f,g,h,i){var j,k,l,m=[],n=[],o=g.length,p=f||ta(b||"*",h.nodeType?[h]:h,[]),q=!a||!f&&b?p:ua(p,m,a,h,i),r=c?e||(f?a:o||d)?[]:g:q;if(c&&c(q,r,h,i),d){j=ua(r,n),d(j,[],h,i),k=j.length;while(k--)(l=j[k])&&(r[n[k]]=!(q[n[k]]=l))}if(f){if(e||a){if(e){j=[],k=r.length;while(k--)(l=r[k])&&j.push(q[k]=l);e(null,r=[],j,i)}k=r.length;while(k--)(l=r[k])&&(j=e?J(f,l):m[k])>-1&&(f[j]=!(g[j]=l))}}else r=ua(r===g?r.splice(o,r.length):r),e?e(null,g,r,i):H.apply(g,r)})}function wa(a){for(var b,c,e,f=a.length,g=d.relative[a[0].type],h=g||d.relative[" "],i=g?1:0,k=ra(function(a){return a===b},h,!0),l=ra(function(a){return J(b,a)>-1},h,!0),m=[function(a,c,d){var e=!g&&(d||c!==j)||((b=c).nodeType?k(a,c,d):l(a,c,d));return b=null,e}];f>i;i++)if(c=d.relative[a[i].type])m=[ra(sa(m),c)];else{if(c=d.filter[a[i].type].apply(null,a[i].matches),c[u]){for(e=++i;f>e;e++)if(d.relative[a[e].type])break;return va(i>1&&sa(m),i>1&&qa(a.slice(0,i-1).concat({value:" "===a[i-2].type?"*":""})).replace(Q,"$1"),c,e>i&&wa(a.slice(i,e)),f>e&&wa(a=a.slice(e)),f>e&&qa(a))}m.push(c)}return sa(m)}function xa(a,b){var c=b.length>0,e=a.length>0,f=function(f,g,h,i,k){var l,o,q,r=0,s="0",t=f&&[],u=[],v=j,x=f||e&&d.find.TAG("*",k),y=w+=null==v?1:Math.random()||.1,z=x.length;for(k&&(j=g===n||g||k);s!==z&&null!=(l=x[s]);s++){if(e&&l){o=0,g||l.ownerDocument===n||(m(l),h=!p);while(q=a[o++])if(q(l,g||n,h)){i.push(l);break}k&&(w=y)}c&&((l=!q&&l)&&r--,f&&t.push(l))}if(r+=s,c&&s!==r){o=0;while(q=b[o++])q(t,u,g,h);if(f){if(r>0)while(s--)t[s]||u[s]||(u[s]=F.call(i));u=ua(u)}H.apply(i,u),k&&!f&&u.length>0&&r+b.length>1&&fa.uniqueSort(i)}return k&&(w=y,j=v),t};return c?ha(f):f}return h=fa.compile=function(a,b){var c,d=[],e=[],f=A[a+" "];if(!f){b||(b=g(a)),c=b.length;while(c--)f=wa(b[c]),f[u]?d.push(f):e.push(f);f=A(a,xa(e,d)),f.selector=a}return f},i=fa.select=function(a,b,e,f){var i,j,k,l,m,n="function"==typeof a&&a,o=!f&&g(a=n.selector||a);if(e=e||[],1===o.length){if(j=o[0]=o[0].slice(0),j.length>2&&"ID"===(k=j[0]).type&&c.getById&&9===b.nodeType&&p&&d.relative[j[1].type]){if(b=(d.find.ID(k.matches[0].replace(ba,ca),b)||[])[0],!b)return e;n&&(b=b.parentNode),a=a.slice(j.shift().value.length)}i=W.needsContext.test(a)?0:j.length;while(i--){if(k=j[i],d.relative[l=k.type])break;if((m=d.find[l])&&(f=m(k.matches[0].replace(ba,ca),_.test(j[0].type)&&oa(b.parentNode)||b))){if(j.splice(i,1),a=f.length&&qa(j),!a)return H.apply(e,f),e;break}}}return(n||h(a,o))(f,b,!p,e,!b||_.test(a)&&oa(b.parentNode)||b),e},c.sortStable=u.split("").sort(B).join("")===u,c.detectDuplicates=!!l,m(),c.sortDetached=ia(function(a){return 1&a.compareDocumentPosition(n.createElement("div"))}),ia(function(a){return a.innerHTML="<a href='#'></a>","#"===a.firstChild.getAttribute("href")})||ja("type|href|height|width",function(a,b,c){return c?void 0:a.getAttribute(b,"type"===b.toLowerCase()?1:2)}),c.attributes&&ia(function(a){return a.innerHTML="<input/>",a.firstChild.setAttribute("value",""),""===a.firstChild.getAttribute("value")})||ja("value",function(a,b,c){return c||"input"!==a.nodeName.toLowerCase()?void 0:a.defaultValue}),ia(function(a){return null==a.getAttribute("disabled")})||ja(K,function(a,b,c){var d;return c?void 0:a[b]===!0?b.toLowerCase():(d=a.getAttributeNode(b))&&d.specified?d.value:null}),fa}(a);n.find=t,n.expr=t.selectors,n.expr[":"]=n.expr.pseudos,n.uniqueSort=n.unique=t.uniqueSort,n.text=t.getText,n.isXMLDoc=t.isXML,n.contains=t.contains;var u=function(a,b,c){var d=[],e=void 0!==c;while((a=a[b])&&9!==a.nodeType)if(1===a.nodeType){if(e&&n(a).is(c))break;d.push(a)}return d},v=function(a,b){for(var c=[];a;a=a.nextSibling)1===a.nodeType&&a!==b&&c.push(a);return c},w=n.expr.match.needsContext,x=/^<([\w-]+)\s*\/?>(?:<\/\1>|)$/,y=/^.[^:#\[\.,]*$/;function z(a,b,c){if(n.isFunction(b))return n.grep(a,function(a,d){return!!b.call(a,d,a)!==c});if(b.nodeType)return n.grep(a,function(a){return a===b!==c});if("string"==typeof b){if(y.test(b))return n.filter(b,a,c);b=n.filter(b,a)}return n.grep(a,function(a){return n.inArray(a,b)>-1!==c})}n.filter=function(a,b,c){var d=b[0];return c&&(a=":not("+a+")"),1===b.length&&1===d.nodeType?n.find.matchesSelector(d,a)?[d]:[]:n.find.matches(a,n.grep(b,function(a){return 1===a.nodeType}))},n.fn.extend({find:function(a){var b,c=[],d=this,e=d.length;if("string"!=typeof a)return this.pushStack(n(a).filter(function(){for(b=0;e>b;b++)if(n.contains(d[b],this))return!0}));for(b=0;e>b;b++)n.find(a,d[b],c);return c=this.pushStack(e>1?n.unique(c):c),c.selector=this.selector?this.selector+" "+a:a,c},filter:function(a){return this.pushStack(z(this,a||[],!1))},not:function(a){return this.pushStack(z(this,a||[],!0))},is:function(a){return!!z(this,"string"==typeof a&&w.test(a)?n(a):a||[],!1).length}});var A,B=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,C=n.fn.init=function(a,b,c){var e,f;if(!a)return this;if(c=c||A,"string"==typeof a){if(e="<"===a.charAt(0)&&">"===a.charAt(a.length-1)&&a.length>=3?[null,a,null]:B.exec(a),!e||!e[1]&&b)return!b||b.jquery?(b||c).find(a):this.constructor(b).find(a);if(e[1]){if(b=b instanceof n?b[0]:b,n.merge(this,n.parseHTML(e[1],b&&b.nodeType?b.ownerDocument||b:d,!0)),x.test(e[1])&&n.isPlainObject(b))for(e in b)n.isFunction(this[e])?this[e](b[e]):this.attr(e,b[e]);return this}if(f=d.getElementById(e[2]),f&&f.parentNode){if(f.id!==e[2])return A.find(a);this.length=1,this[0]=f}return this.context=d,this.selector=a,this}return a.nodeType?(this.context=this[0]=a,this.length=1,this):n.isFunction(a)?"undefined"!=typeof c.ready?c.ready(a):a(n):(void 0!==a.selector&&(this.selector=a.selector,this.context=a.context),n.makeArray(a,this))};C.prototype=n.fn,A=n(d);var D=/^(?:parents|prev(?:Until|All))/,E={children:!0,contents:!0,next:!0,prev:!0};n.fn.extend({has:function(a){var b,c=n(a,this),d=c.length;return this.filter(function(){for(b=0;d>b;b++)if(n.contains(this,c[b]))return!0})},closest:function(a,b){for(var c,d=0,e=this.length,f=[],g=w.test(a)||"string"!=typeof a?n(a,b||this.context):0;e>d;d++)for(c=this[d];c&&c!==b;c=c.parentNode)if(c.nodeType<11&&(g?g.index(c)>-1:1===c.nodeType&&n.find.matchesSelector(c,a))){f.push(c);break}return this.pushStack(f.length>1?n.uniqueSort(f):f)},index:function(a){return a?"string"==typeof a?n.inArray(this[0],n(a)):n.inArray(a.jquery?a[0]:a,this):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(a,b){return this.pushStack(n.uniqueSort(n.merge(this.get(),n(a,b))))},addBack:function(a){return this.add(null==a?this.prevObject:this.prevObject.filter(a))}});function F(a,b){do a=a[b];while(a&&1!==a.nodeType);return a}n.each({parent:function(a){var b=a.parentNode;return b&&11!==b.nodeType?b:null},parents:function(a){return u(a,"parentNode")},parentsUntil:function(a,b,c){return u(a,"parentNode",c)},next:function(a){return F(a,"nextSibling")},prev:function(a){return F(a,"previousSibling")},nextAll:function(a){return u(a,"nextSibling")},prevAll:function(a){return u(a,"previousSibling")},nextUntil:function(a,b,c){return u(a,"nextSibling",c)},prevUntil:function(a,b,c){return u(a,"previousSibling",c)},siblings:function(a){return v((a.parentNode||{}).firstChild,a)},children:function(a){return v(a.firstChild)},contents:function(a){return n.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:n.merge([],a.childNodes)}},function(a,b){n.fn[a]=function(c,d){var e=n.map(this,b,c);return"Until"!==a.slice(-5)&&(d=c),d&&"string"==typeof d&&(e=n.filter(d,e)),this.length>1&&(E[a]||(e=n.uniqueSort(e)),D.test(a)&&(e=e.reverse())),this.pushStack(e)}});var G=/\S+/g;function H(a){var b={};return n.each(a.match(G)||[],function(a,c){b[c]=!0}),b}n.Callbacks=function(a){a="string"==typeof a?H(a):n.extend({},a);var b,c,d,e,f=[],g=[],h=-1,i=function(){for(e=a.once,d=b=!0;g.length;h=-1){c=g.shift();while(++h<f.length)f[h].apply(c[0],c[1])===!1&&a.stopOnFalse&&(h=f.length,c=!1)}a.memory||(c=!1),b=!1,e&&(f=c?[]:"")},j={add:function(){return f&&(c&&!b&&(h=f.length-1,g.push(c)),function d(b){n.each(b,function(b,c){n.isFunction(c)?a.unique&&j.has(c)||f.push(c):c&&c.length&&"string"!==n.type(c)&&d(c)})}(arguments),c&&!b&&i()),this},remove:function(){return n.each(arguments,function(a,b){var c;while((c=n.inArray(b,f,c))>-1)f.splice(c,1),h>=c&&h--}),this},has:function(a){return a?n.inArray(a,f)>-1:f.length>0},empty:function(){return f&&(f=[]),this},disable:function(){return e=g=[],f=c="",this},disabled:function(){return!f},lock:function(){return e=!0,c||j.disable(),this},locked:function(){return!!e},fireWith:function(a,c){return e||(c=c||[],c=[a,c.slice?c.slice():c],g.push(c),b||i()),this},fire:function(){return j.fireWith(this,arguments),this},fired:function(){return!!d}};return j},n.extend({Deferred:function(a){var b=[["resolve","done",n.Callbacks("once memory"),"resolved"],["reject","fail",n.Callbacks("once memory"),"rejected"],["notify","progress",n.Callbacks("memory")]],c="pending",d={state:function(){return c},always:function(){return e.done(arguments).fail(arguments),this},then:function(){var a=arguments;return n.Deferred(function(c){n.each(b,function(b,f){var g=n.isFunction(a[b])&&a[b];e[f[1]](function(){var a=g&&g.apply(this,arguments);a&&n.isFunction(a.promise)?a.promise().progress(c.notify).done(c.resolve).fail(c.reject):c[f[0]+"With"](this===d?c.promise():this,g?[a]:arguments)})}),a=null}).promise()},promise:function(a){return null!=a?n.extend(a,d):d}},e={};return d.pipe=d.then,n.each(b,function(a,f){var g=f[2],h=f[3];d[f[1]]=g.add,h&&g.add(function(){c=h},b[1^a][2].disable,b[2][2].lock),e[f[0]]=function(){return e[f[0]+"With"](this===e?d:this,arguments),this},e[f[0]+"With"]=g.fireWith}),d.promise(e),a&&a.call(e,e),e},when:function(a){var b=0,c=e.call(arguments),d=c.length,f=1!==d||a&&n.isFunction(a.promise)?d:0,g=1===f?a:n.Deferred(),h=function(a,b,c){return function(d){b[a]=this,c[a]=arguments.length>1?e.call(arguments):d,c===i?g.notifyWith(b,c):--f||g.resolveWith(b,c)}},i,j,k;if(d>1)for(i=new Array(d),j=new Array(d),k=new Array(d);d>b;b++)c[b]&&n.isFunction(c[b].promise)?c[b].promise().progress(h(b,j,i)).done(h(b,k,c)).fail(g.reject):--f;return f||g.resolveWith(k,c),g.promise()}});var I;n.fn.ready=function(a){return n.ready.promise().done(a),this},n.extend({isReady:!1,readyWait:1,holdReady:function(a){a?n.readyWait++:n.ready(!0)},ready:function(a){(a===!0?--n.readyWait:n.isReady)||(n.isReady=!0,a!==!0&&--n.readyWait>0||(I.resolveWith(d,[n]),n.fn.triggerHandler&&(n(d).triggerHandler("ready"),n(d).off("ready"))))}});function J(){d.addEventListener?(d.removeEventListener("DOMContentLoaded",K),a.removeEventListener("load",K)):(d.detachEvent("onreadystatechange",K),a.detachEvent("onload",K))}function K(){(d.addEventListener||"load"===a.event.type||"complete"===d.readyState)&&(J(),n.ready())}n.ready.promise=function(b){if(!I)if(I=n.Deferred(),"complete"===d.readyState||"loading"!==d.readyState&&!d.documentElement.doScroll)a.setTimeout(n.ready);else if(d.addEventListener)d.addEventListener("DOMContentLoaded",K),a.addEventListener("load",K);else{d.attachEvent("onreadystatechange",K),a.attachEvent("onload",K);var c=!1;try{c=null==a.frameElement&&d.documentElement}catch(e){}c&&c.doScroll&&!function f(){if(!n.isReady){try{c.doScroll("left")}catch(b){return a.setTimeout(f,50)}J(),n.ready()}}()}return I.promise(b)},n.ready.promise();var L;for(L in n(l))break;l.ownFirst="0"===L,l.inlineBlockNeedsLayout=!1,n(function(){var a,b,c,e;c=d.getElementsByTagName("body")[0],c&&c.style&&(b=d.createElement("div"),e=d.createElement("div"),e.style.cssText="position:absolute;border:0;width:0;height:0;top:0;left:-9999px",c.appendChild(e).appendChild(b),"undefined"!=typeof b.style.zoom&&(b.style.cssText="display:inline;margin:0;border:0;padding:1px;width:1px;zoom:1",l.inlineBlockNeedsLayout=a=3===b.offsetWidth,a&&(c.style.zoom=1)),c.removeChild(e))}),function(){var a=d.createElement("div");l.deleteExpando=!0;try{delete a.test}catch(b){l.deleteExpando=!1}a=null}();var M=function(a){var b=n.noData[(a.nodeName+" ").toLowerCase()],c=+a.nodeType||1;return 1!==c&&9!==c?!1:!b||b!==!0&&a.getAttribute("classid")===b},N=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,O=/([A-Z])/g;function P(a,b,c){if(void 0===c&&1===a.nodeType){var d="data-"+b.replace(O,"-$1").toLowerCase();if(c=a.getAttribute(d),"string"==typeof c){try{c="true"===c?!0:"false"===c?!1:"null"===c?null:+c+""===c?+c:N.test(c)?n.parseJSON(c):c}catch(e){}n.data(a,b,c)}else c=void 0;
}return c}function Q(a){var b;for(b in a)if(("data"!==b||!n.isEmptyObject(a[b]))&&"toJSON"!==b)return!1;return!0}function R(a,b,d,e){if(M(a)){var f,g,h=n.expando,i=a.nodeType,j=i?n.cache:a,k=i?a[h]:a[h]&&h;if(k&&j[k]&&(e||j[k].data)||void 0!==d||"string"!=typeof b)return k||(k=i?a[h]=c.pop()||n.guid++:h),j[k]||(j[k]=i?{}:{toJSON:n.noop}),"object"!=typeof b&&"function"!=typeof b||(e?j[k]=n.extend(j[k],b):j[k].data=n.extend(j[k].data,b)),g=j[k],e||(g.data||(g.data={}),g=g.data),void 0!==d&&(g[n.camelCase(b)]=d),"string"==typeof b?(f=g[b],null==f&&(f=g[n.camelCase(b)])):f=g,f}}function S(a,b,c){if(M(a)){var d,e,f=a.nodeType,g=f?n.cache:a,h=f?a[n.expando]:n.expando;if(g[h]){if(b&&(d=c?g[h]:g[h].data)){n.isArray(b)?b=b.concat(n.map(b,n.camelCase)):b in d?b=[b]:(b=n.camelCase(b),b=b in d?[b]:b.split(" ")),e=b.length;while(e--)delete d[b[e]];if(c?!Q(d):!n.isEmptyObject(d))return}(c||(delete g[h].data,Q(g[h])))&&(f?n.cleanData([a],!0):l.deleteExpando||g!=g.window?delete g[h]:g[h]=void 0)}}}n.extend({cache:{},noData:{"applet ":!0,"embed ":!0,"object ":"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"},hasData:function(a){return a=a.nodeType?n.cache[a[n.expando]]:a[n.expando],!!a&&!Q(a)},data:function(a,b,c){return R(a,b,c)},removeData:function(a,b){return S(a,b)},_data:function(a,b,c){return R(a,b,c,!0)},_removeData:function(a,b){return S(a,b,!0)}}),n.fn.extend({data:function(a,b){var c,d,e,f=this[0],g=f&&f.attributes;if(void 0===a){if(this.length&&(e=n.data(f),1===f.nodeType&&!n._data(f,"parsedAttrs"))){c=g.length;while(c--)g[c]&&(d=g[c].name,0===d.indexOf("data-")&&(d=n.camelCase(d.slice(5)),P(f,d,e[d])));n._data(f,"parsedAttrs",!0)}return e}return"object"==typeof a?this.each(function(){n.data(this,a)}):arguments.length>1?this.each(function(){n.data(this,a,b)}):f?P(f,a,n.data(f,a)):void 0},removeData:function(a){return this.each(function(){n.removeData(this,a)})}}),n.extend({queue:function(a,b,c){var d;return a?(b=(b||"fx")+"queue",d=n._data(a,b),c&&(!d||n.isArray(c)?d=n._data(a,b,n.makeArray(c)):d.push(c)),d||[]):void 0},dequeue:function(a,b){b=b||"fx";var c=n.queue(a,b),d=c.length,e=c.shift(),f=n._queueHooks(a,b),g=function(){n.dequeue(a,b)};"inprogress"===e&&(e=c.shift(),d--),e&&("fx"===b&&c.unshift("inprogress"),delete f.stop,e.call(a,g,f)),!d&&f&&f.empty.fire()},_queueHooks:function(a,b){var c=b+"queueHooks";return n._data(a,c)||n._data(a,c,{empty:n.Callbacks("once memory").add(function(){n._removeData(a,b+"queue"),n._removeData(a,c)})})}}),n.fn.extend({queue:function(a,b){var c=2;return"string"!=typeof a&&(b=a,a="fx",c--),arguments.length<c?n.queue(this[0],a):void 0===b?this:this.each(function(){var c=n.queue(this,a,b);n._queueHooks(this,a),"fx"===a&&"inprogress"!==c[0]&&n.dequeue(this,a)})},dequeue:function(a){return this.each(function(){n.dequeue(this,a)})},clearQueue:function(a){return this.queue(a||"fx",[])},promise:function(a,b){var c,d=1,e=n.Deferred(),f=this,g=this.length,h=function(){--d||e.resolveWith(f,[f])};"string"!=typeof a&&(b=a,a=void 0),a=a||"fx";while(g--)c=n._data(f[g],a+"queueHooks"),c&&c.empty&&(d++,c.empty.add(h));return h(),e.promise(b)}}),function(){var a;l.shrinkWrapBlocks=function(){if(null!=a)return a;a=!1;var b,c,e;return c=d.getElementsByTagName("body")[0],c&&c.style?(b=d.createElement("div"),e=d.createElement("div"),e.style.cssText="position:absolute;border:0;width:0;height:0;top:0;left:-9999px",c.appendChild(e).appendChild(b),"undefined"!=typeof b.style.zoom&&(b.style.cssText="-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;margin:0;border:0;padding:1px;width:1px;zoom:1",b.appendChild(d.createElement("div")).style.width="5px",a=3!==b.offsetWidth),c.removeChild(e),a):void 0}}();var T=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,U=new RegExp("^(?:([+-])=|)("+T+")([a-z%]*)$","i"),V=["Top","Right","Bottom","Left"],W=function(a,b){return a=b||a,"none"===n.css(a,"display")||!n.contains(a.ownerDocument,a)};function X(a,b,c,d){var e,f=1,g=20,h=d?function(){return d.cur()}:function(){return n.css(a,b,"")},i=h(),j=c&&c[3]||(n.cssNumber[b]?"":"px"),k=(n.cssNumber[b]||"px"!==j&&+i)&&U.exec(n.css(a,b));if(k&&k[3]!==j){j=j||k[3],c=c||[],k=+i||1;do f=f||".5",k/=f,n.style(a,b,k+j);while(f!==(f=h()/i)&&1!==f&&--g)}return c&&(k=+k||+i||0,e=c[1]?k+(c[1]+1)*c[2]:+c[2],d&&(d.unit=j,d.start=k,d.end=e)),e}var Y=function(a,b,c,d,e,f,g){var h=0,i=a.length,j=null==c;if("object"===n.type(c)){e=!0;for(h in c)Y(a,b,h,c[h],!0,f,g)}else if(void 0!==d&&(e=!0,n.isFunction(d)||(g=!0),j&&(g?(b.call(a,d),b=null):(j=b,b=function(a,b,c){return j.call(n(a),c)})),b))for(;i>h;h++)b(a[h],c,g?d:d.call(a[h],h,b(a[h],c)));return e?a:j?b.call(a):i?b(a[0],c):f},Z=/^(?:checkbox|radio)$/i,$=/<([\w:-]+)/,_=/^$|\/(?:java|ecma)script/i,aa=/^\s+/,ba="abbr|article|aside|audio|bdi|canvas|data|datalist|details|dialog|figcaption|figure|footer|header|hgroup|main|mark|meter|nav|output|picture|progress|section|summary|template|time|video";function ca(a){var b=ba.split("|"),c=a.createDocumentFragment();if(c.createElement)while(b.length)c.createElement(b.pop());return c}!function(){var a=d.createElement("div"),b=d.createDocumentFragment(),c=d.createElement("input");a.innerHTML="  <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",l.leadingWhitespace=3===a.firstChild.nodeType,l.tbody=!a.getElementsByTagName("tbody").length,l.htmlSerialize=!!a.getElementsByTagName("link").length,l.html5Clone="<:nav></:nav>"!==d.createElement("nav").cloneNode(!0).outerHTML,c.type="checkbox",c.checked=!0,b.appendChild(c),l.appendChecked=c.checked,a.innerHTML="<textarea>x</textarea>",l.noCloneChecked=!!a.cloneNode(!0).lastChild.defaultValue,b.appendChild(a),c=d.createElement("input"),c.setAttribute("type","radio"),c.setAttribute("checked","checked"),c.setAttribute("name","t"),a.appendChild(c),l.checkClone=a.cloneNode(!0).cloneNode(!0).lastChild.checked,l.noCloneEvent=!!a.addEventListener,a[n.expando]=1,l.attributes=!a.getAttribute(n.expando)}();var da={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],area:[1,"<map>","</map>"],param:[1,"<object>","</object>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:l.htmlSerialize?[0,"",""]:[1,"X<div>","</div>"]};da.optgroup=da.option,da.tbody=da.tfoot=da.colgroup=da.caption=da.thead,da.th=da.td;function ea(a,b){var c,d,e=0,f="undefined"!=typeof a.getElementsByTagName?a.getElementsByTagName(b||"*"):"undefined"!=typeof a.querySelectorAll?a.querySelectorAll(b||"*"):void 0;if(!f)for(f=[],c=a.childNodes||a;null!=(d=c[e]);e++)!b||n.nodeName(d,b)?f.push(d):n.merge(f,ea(d,b));return void 0===b||b&&n.nodeName(a,b)?n.merge([a],f):f}function fa(a,b){for(var c,d=0;null!=(c=a[d]);d++)n._data(c,"globalEval",!b||n._data(b[d],"globalEval"))}var ga=/<|&#?\w+;/,ha=/<tbody/i;function ia(a){Z.test(a.type)&&(a.defaultChecked=a.checked)}function ja(a,b,c,d,e){for(var f,g,h,i,j,k,m,o=a.length,p=ca(b),q=[],r=0;o>r;r++)if(g=a[r],g||0===g)if("object"===n.type(g))n.merge(q,g.nodeType?[g]:g);else if(ga.test(g)){i=i||p.appendChild(b.createElement("div")),j=($.exec(g)||["",""])[1].toLowerCase(),m=da[j]||da._default,i.innerHTML=m[1]+n.htmlPrefilter(g)+m[2],f=m[0];while(f--)i=i.lastChild;if(!l.leadingWhitespace&&aa.test(g)&&q.push(b.createTextNode(aa.exec(g)[0])),!l.tbody){g="table"!==j||ha.test(g)?"<table>"!==m[1]||ha.test(g)?0:i:i.firstChild,f=g&&g.childNodes.length;while(f--)n.nodeName(k=g.childNodes[f],"tbody")&&!k.childNodes.length&&g.removeChild(k)}n.merge(q,i.childNodes),i.textContent="";while(i.firstChild)i.removeChild(i.firstChild);i=p.lastChild}else q.push(b.createTextNode(g));i&&p.removeChild(i),l.appendChecked||n.grep(ea(q,"input"),ia),r=0;while(g=q[r++])if(d&&n.inArray(g,d)>-1)e&&e.push(g);else if(h=n.contains(g.ownerDocument,g),i=ea(p.appendChild(g),"script"),h&&fa(i),c){f=0;while(g=i[f++])_.test(g.type||"")&&c.push(g)}return i=null,p}!function(){var b,c,e=d.createElement("div");for(b in{submit:!0,change:!0,focusin:!0})c="on"+b,(l[b]=c in a)||(e.setAttribute(c,"t"),l[b]=e.attributes[c].expando===!1);e=null}();var ka=/^(?:input|select|textarea)$/i,la=/^key/,ma=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,na=/^(?:focusinfocus|focusoutblur)$/,oa=/^([^.]*)(?:\.(.+)|)/;function pa(){return!0}function qa(){return!1}function ra(){try{return d.activeElement}catch(a){}}function sa(a,b,c,d,e,f){var g,h;if("object"==typeof b){"string"!=typeof c&&(d=d||c,c=void 0);for(h in b)sa(a,h,c,d,b[h],f);return a}if(null==d&&null==e?(e=c,d=c=void 0):null==e&&("string"==typeof c?(e=d,d=void 0):(e=d,d=c,c=void 0)),e===!1)e=qa;else if(!e)return a;return 1===f&&(g=e,e=function(a){return n().off(a),g.apply(this,arguments)},e.guid=g.guid||(g.guid=n.guid++)),a.each(function(){n.event.add(this,b,e,d,c)})}n.event={global:{},add:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,o,p,q,r=n._data(a);if(r){c.handler&&(i=c,c=i.handler,e=i.selector),c.guid||(c.guid=n.guid++),(g=r.events)||(g=r.events={}),(k=r.handle)||(k=r.handle=function(a){return"undefined"==typeof n||a&&n.event.triggered===a.type?void 0:n.event.dispatch.apply(k.elem,arguments)},k.elem=a),b=(b||"").match(G)||[""],h=b.length;while(h--)f=oa.exec(b[h])||[],o=q=f[1],p=(f[2]||"").split(".").sort(),o&&(j=n.event.special[o]||{},o=(e?j.delegateType:j.bindType)||o,j=n.event.special[o]||{},l=n.extend({type:o,origType:q,data:d,handler:c,guid:c.guid,selector:e,needsContext:e&&n.expr.match.needsContext.test(e),namespace:p.join(".")},i),(m=g[o])||(m=g[o]=[],m.delegateCount=0,j.setup&&j.setup.call(a,d,p,k)!==!1||(a.addEventListener?a.addEventListener(o,k,!1):a.attachEvent&&a.attachEvent("on"+o,k))),j.add&&(j.add.call(a,l),l.handler.guid||(l.handler.guid=c.guid)),e?m.splice(m.delegateCount++,0,l):m.push(l),n.event.global[o]=!0);a=null}},remove:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,o,p,q,r=n.hasData(a)&&n._data(a);if(r&&(k=r.events)){b=(b||"").match(G)||[""],j=b.length;while(j--)if(h=oa.exec(b[j])||[],o=q=h[1],p=(h[2]||"").split(".").sort(),o){l=n.event.special[o]||{},o=(d?l.delegateType:l.bindType)||o,m=k[o]||[],h=h[2]&&new RegExp("(^|\\.)"+p.join("\\.(?:.*\\.|)")+"(\\.|$)"),i=f=m.length;while(f--)g=m[f],!e&&q!==g.origType||c&&c.guid!==g.guid||h&&!h.test(g.namespace)||d&&d!==g.selector&&("**"!==d||!g.selector)||(m.splice(f,1),g.selector&&m.delegateCount--,l.remove&&l.remove.call(a,g));i&&!m.length&&(l.teardown&&l.teardown.call(a,p,r.handle)!==!1||n.removeEvent(a,o,r.handle),delete k[o])}else for(o in k)n.event.remove(a,o+b[j],c,d,!0);n.isEmptyObject(k)&&(delete r.handle,n._removeData(a,"events"))}},trigger:function(b,c,e,f){var g,h,i,j,l,m,o,p=[e||d],q=k.call(b,"type")?b.type:b,r=k.call(b,"namespace")?b.namespace.split("."):[];if(i=m=e=e||d,3!==e.nodeType&&8!==e.nodeType&&!na.test(q+n.event.triggered)&&(q.indexOf(".")>-1&&(r=q.split("."),q=r.shift(),r.sort()),h=q.indexOf(":")<0&&"on"+q,b=b[n.expando]?b:new n.Event(q,"object"==typeof b&&b),b.isTrigger=f?2:3,b.namespace=r.join("."),b.rnamespace=b.namespace?new RegExp("(^|\\.)"+r.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,b.result=void 0,b.target||(b.target=e),c=null==c?[b]:n.makeArray(c,[b]),l=n.event.special[q]||{},f||!l.trigger||l.trigger.apply(e,c)!==!1)){if(!f&&!l.noBubble&&!n.isWindow(e)){for(j=l.delegateType||q,na.test(j+q)||(i=i.parentNode);i;i=i.parentNode)p.push(i),m=i;m===(e.ownerDocument||d)&&p.push(m.defaultView||m.parentWindow||a)}o=0;while((i=p[o++])&&!b.isPropagationStopped())b.type=o>1?j:l.bindType||q,g=(n._data(i,"events")||{})[b.type]&&n._data(i,"handle"),g&&g.apply(i,c),g=h&&i[h],g&&g.apply&&M(i)&&(b.result=g.apply(i,c),b.result===!1&&b.preventDefault());if(b.type=q,!f&&!b.isDefaultPrevented()&&(!l._default||l._default.apply(p.pop(),c)===!1)&&M(e)&&h&&e[q]&&!n.isWindow(e)){m=e[h],m&&(e[h]=null),n.event.triggered=q;try{e[q]()}catch(s){}n.event.triggered=void 0,m&&(e[h]=m)}return b.result}},dispatch:function(a){a=n.event.fix(a);var b,c,d,f,g,h=[],i=e.call(arguments),j=(n._data(this,"events")||{})[a.type]||[],k=n.event.special[a.type]||{};if(i[0]=a,a.delegateTarget=this,!k.preDispatch||k.preDispatch.call(this,a)!==!1){h=n.event.handlers.call(this,a,j),b=0;while((f=h[b++])&&!a.isPropagationStopped()){a.currentTarget=f.elem,c=0;while((g=f.handlers[c++])&&!a.isImmediatePropagationStopped())a.rnamespace&&!a.rnamespace.test(g.namespace)||(a.handleObj=g,a.data=g.data,d=((n.event.special[g.origType]||{}).handle||g.handler).apply(f.elem,i),void 0!==d&&(a.result=d)===!1&&(a.preventDefault(),a.stopPropagation()))}return k.postDispatch&&k.postDispatch.call(this,a),a.result}},handlers:function(a,b){var c,d,e,f,g=[],h=b.delegateCount,i=a.target;if(h&&i.nodeType&&("click"!==a.type||isNaN(a.button)||a.button<1))for(;i!=this;i=i.parentNode||this)if(1===i.nodeType&&(i.disabled!==!0||"click"!==a.type)){for(d=[],c=0;h>c;c++)f=b[c],e=f.selector+" ",void 0===d[e]&&(d[e]=f.needsContext?n(e,this).index(i)>-1:n.find(e,this,null,[i]).length),d[e]&&d.push(f);d.length&&g.push({elem:i,handlers:d})}return h<b.length&&g.push({elem:this,handlers:b.slice(h)}),g},fix:function(a){if(a[n.expando])return a;var b,c,e,f=a.type,g=a,h=this.fixHooks[f];h||(this.fixHooks[f]=h=ma.test(f)?this.mouseHooks:la.test(f)?this.keyHooks:{}),e=h.props?this.props.concat(h.props):this.props,a=new n.Event(g),b=e.length;while(b--)c=e[b],a[c]=g[c];return a.target||(a.target=g.srcElement||d),3===a.target.nodeType&&(a.target=a.target.parentNode),a.metaKey=!!a.metaKey,h.filter?h.filter(a,g):a},props:"altKey bubbles cancelable ctrlKey currentTarget detail eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(a,b){return null==a.which&&(a.which=null!=b.charCode?b.charCode:b.keyCode),a}},mouseHooks:{props:"button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(a,b){var c,e,f,g=b.button,h=b.fromElement;return null==a.pageX&&null!=b.clientX&&(e=a.target.ownerDocument||d,f=e.documentElement,c=e.body,a.pageX=b.clientX+(f&&f.scrollLeft||c&&c.scrollLeft||0)-(f&&f.clientLeft||c&&c.clientLeft||0),a.pageY=b.clientY+(f&&f.scrollTop||c&&c.scrollTop||0)-(f&&f.clientTop||c&&c.clientTop||0)),!a.relatedTarget&&h&&(a.relatedTarget=h===a.target?b.toElement:h),a.which||void 0===g||(a.which=1&g?1:2&g?3:4&g?2:0),a}},special:{load:{noBubble:!0},focus:{trigger:function(){if(this!==ra()&&this.focus)try{return this.focus(),!1}catch(a){}},delegateType:"focusin"},blur:{trigger:function(){return this===ra()&&this.blur?(this.blur(),!1):void 0},delegateType:"focusout"},click:{trigger:function(){return n.nodeName(this,"input")&&"checkbox"===this.type&&this.click?(this.click(),!1):void 0},_default:function(a){return n.nodeName(a.target,"a")}},beforeunload:{postDispatch:function(a){void 0!==a.result&&a.originalEvent&&(a.originalEvent.returnValue=a.result)}}},simulate:function(a,b,c){var d=n.extend(new n.Event,c,{type:a,isSimulated:!0});n.event.trigger(d,null,b),d.isDefaultPrevented()&&c.preventDefault()}},n.removeEvent=d.removeEventListener?function(a,b,c){a.removeEventListener&&a.removeEventListener(b,c)}:function(a,b,c){var d="on"+b;a.detachEvent&&("undefined"==typeof a[d]&&(a[d]=null),a.detachEvent(d,c))},n.Event=function(a,b){return this instanceof n.Event?(a&&a.type?(this.originalEvent=a,this.type=a.type,this.isDefaultPrevented=a.defaultPrevented||void 0===a.defaultPrevented&&a.returnValue===!1?pa:qa):this.type=a,b&&n.extend(this,b),this.timeStamp=a&&a.timeStamp||n.now(),void(this[n.expando]=!0)):new n.Event(a,b)},n.Event.prototype={constructor:n.Event,isDefaultPrevented:qa,isPropagationStopped:qa,isImmediatePropagationStopped:qa,preventDefault:function(){var a=this.originalEvent;this.isDefaultPrevented=pa,a&&(a.preventDefault?a.preventDefault():a.returnValue=!1)},stopPropagation:function(){var a=this.originalEvent;this.isPropagationStopped=pa,a&&!this.isSimulated&&(a.stopPropagation&&a.stopPropagation(),a.cancelBubble=!0)},stopImmediatePropagation:function(){var a=this.originalEvent;this.isImmediatePropagationStopped=pa,a&&a.stopImmediatePropagation&&a.stopImmediatePropagation(),this.stopPropagation()}},n.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(a,b){n.event.special[a]={delegateType:b,bindType:b,handle:function(a){var c,d=this,e=a.relatedTarget,f=a.handleObj;return e&&(e===d||n.contains(d,e))||(a.type=f.origType,c=f.handler.apply(this,arguments),a.type=b),c}}}),l.submit||(n.event.special.submit={setup:function(){return n.nodeName(this,"form")?!1:void n.event.add(this,"click._submit keypress._submit",function(a){var b=a.target,c=n.nodeName(b,"input")||n.nodeName(b,"button")?n.prop(b,"form"):void 0;c&&!n._data(c,"submit")&&(n.event.add(c,"submit._submit",function(a){a._submitBubble=!0}),n._data(c,"submit",!0))})},postDispatch:function(a){a._submitBubble&&(delete a._submitBubble,this.parentNode&&!a.isTrigger&&n.event.simulate("submit",this.parentNode,a))},teardown:function(){return n.nodeName(this,"form")?!1:void n.event.remove(this,"._submit")}}),l.change||(n.event.special.change={setup:function(){return ka.test(this.nodeName)?("checkbox"!==this.type&&"radio"!==this.type||(n.event.add(this,"propertychange._change",function(a){"checked"===a.originalEvent.propertyName&&(this._justChanged=!0)}),n.event.add(this,"click._change",function(a){this._justChanged&&!a.isTrigger&&(this._justChanged=!1),n.event.simulate("change",this,a)})),!1):void n.event.add(this,"beforeactivate._change",function(a){var b=a.target;ka.test(b.nodeName)&&!n._data(b,"change")&&(n.event.add(b,"change._change",function(a){!this.parentNode||a.isSimulated||a.isTrigger||n.event.simulate("change",this.parentNode,a)}),n._data(b,"change",!0))})},handle:function(a){var b=a.target;return this!==b||a.isSimulated||a.isTrigger||"radio"!==b.type&&"checkbox"!==b.type?a.handleObj.handler.apply(this,arguments):void 0},teardown:function(){return n.event.remove(this,"._change"),!ka.test(this.nodeName)}}),l.focusin||n.each({focus:"focusin",blur:"focusout"},function(a,b){var c=function(a){n.event.simulate(b,a.target,n.event.fix(a))};n.event.special[b]={setup:function(){var d=this.ownerDocument||this,e=n._data(d,b);e||d.addEventListener(a,c,!0),n._data(d,b,(e||0)+1)},teardown:function(){var d=this.ownerDocument||this,e=n._data(d,b)-1;e?n._data(d,b,e):(d.removeEventListener(a,c,!0),n._removeData(d,b))}}}),n.fn.extend({on:function(a,b,c,d){return sa(this,a,b,c,d)},one:function(a,b,c,d){return sa(this,a,b,c,d,1)},off:function(a,b,c){var d,e;if(a&&a.preventDefault&&a.handleObj)return d=a.handleObj,n(a.delegateTarget).off(d.namespace?d.origType+"."+d.namespace:d.origType,d.selector,d.handler),this;if("object"==typeof a){for(e in a)this.off(e,b,a[e]);return this}return b!==!1&&"function"!=typeof b||(c=b,b=void 0),c===!1&&(c=qa),this.each(function(){n.event.remove(this,a,c,b)})},trigger:function(a,b){return this.each(function(){n.event.trigger(a,b,this)})},triggerHandler:function(a,b){var c=this[0];return c?n.event.trigger(a,b,c,!0):void 0}});var ta=/ jQuery\d+="(?:null|\d+)"/g,ua=new RegExp("<(?:"+ba+")[\\s/>]","i"),va=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:-]+)[^>]*)\/>/gi,wa=/<script|<style|<link/i,xa=/checked\s*(?:[^=]|=\s*.checked.)/i,ya=/^true\/(.*)/,za=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,Aa=ca(d),Ba=Aa.appendChild(d.createElement("div"));function Ca(a,b){return n.nodeName(a,"table")&&n.nodeName(11!==b.nodeType?b:b.firstChild,"tr")?a.getElementsByTagName("tbody")[0]||a.appendChild(a.ownerDocument.createElement("tbody")):a}function Da(a){return a.type=(null!==n.find.attr(a,"type"))+"/"+a.type,a}function Ea(a){var b=ya.exec(a.type);return b?a.type=b[1]:a.removeAttribute("type"),a}function Fa(a,b){if(1===b.nodeType&&n.hasData(a)){var c,d,e,f=n._data(a),g=n._data(b,f),h=f.events;if(h){delete g.handle,g.events={};for(c in h)for(d=0,e=h[c].length;e>d;d++)n.event.add(b,c,h[c][d])}g.data&&(g.data=n.extend({},g.data))}}function Ga(a,b){var c,d,e;if(1===b.nodeType){if(c=b.nodeName.toLowerCase(),!l.noCloneEvent&&b[n.expando]){e=n._data(b);for(d in e.events)n.removeEvent(b,d,e.handle);b.removeAttribute(n.expando)}"script"===c&&b.text!==a.text?(Da(b).text=a.text,Ea(b)):"object"===c?(b.parentNode&&(b.outerHTML=a.outerHTML),l.html5Clone&&a.innerHTML&&!n.trim(b.innerHTML)&&(b.innerHTML=a.innerHTML)):"input"===c&&Z.test(a.type)?(b.defaultChecked=b.checked=a.checked,b.value!==a.value&&(b.value=a.value)):"option"===c?b.defaultSelected=b.selected=a.defaultSelected:"input"!==c&&"textarea"!==c||(b.defaultValue=a.defaultValue)}}function Ha(a,b,c,d){b=f.apply([],b);var e,g,h,i,j,k,m=0,o=a.length,p=o-1,q=b[0],r=n.isFunction(q);if(r||o>1&&"string"==typeof q&&!l.checkClone&&xa.test(q))return a.each(function(e){var f=a.eq(e);r&&(b[0]=q.call(this,e,f.html())),Ha(f,b,c,d)});if(o&&(k=ja(b,a[0].ownerDocument,!1,a,d),e=k.firstChild,1===k.childNodes.length&&(k=e),e||d)){for(i=n.map(ea(k,"script"),Da),h=i.length;o>m;m++)g=k,m!==p&&(g=n.clone(g,!0,!0),h&&n.merge(i,ea(g,"script"))),c.call(a[m],g,m);if(h)for(j=i[i.length-1].ownerDocument,n.map(i,Ea),m=0;h>m;m++)g=i[m],_.test(g.type||"")&&!n._data(g,"globalEval")&&n.contains(j,g)&&(g.src?n._evalUrl&&n._evalUrl(g.src):n.globalEval((g.text||g.textContent||g.innerHTML||"").replace(za,"")));k=e=null}return a}function Ia(a,b,c){for(var d,e=b?n.filter(b,a):a,f=0;null!=(d=e[f]);f++)c||1!==d.nodeType||n.cleanData(ea(d)),d.parentNode&&(c&&n.contains(d.ownerDocument,d)&&fa(ea(d,"script")),d.parentNode.removeChild(d));return a}n.extend({htmlPrefilter:function(a){return a.replace(va,"<$1></$2>")},clone:function(a,b,c){var d,e,f,g,h,i=n.contains(a.ownerDocument,a);if(l.html5Clone||n.isXMLDoc(a)||!ua.test("<"+a.nodeName+">")?f=a.cloneNode(!0):(Ba.innerHTML=a.outerHTML,Ba.removeChild(f=Ba.firstChild)),!(l.noCloneEvent&&l.noCloneChecked||1!==a.nodeType&&11!==a.nodeType||n.isXMLDoc(a)))for(d=ea(f),h=ea(a),g=0;null!=(e=h[g]);++g)d[g]&&Ga(e,d[g]);if(b)if(c)for(h=h||ea(a),d=d||ea(f),g=0;null!=(e=h[g]);g++)Fa(e,d[g]);else Fa(a,f);return d=ea(f,"script"),d.length>0&&fa(d,!i&&ea(a,"script")),d=h=e=null,f},cleanData:function(a,b){for(var d,e,f,g,h=0,i=n.expando,j=n.cache,k=l.attributes,m=n.event.special;null!=(d=a[h]);h++)if((b||M(d))&&(f=d[i],g=f&&j[f])){if(g.events)for(e in g.events)m[e]?n.event.remove(d,e):n.removeEvent(d,e,g.handle);j[f]&&(delete j[f],k||"undefined"==typeof d.removeAttribute?d[i]=void 0:d.removeAttribute(i),c.push(f))}}}),n.fn.extend({domManip:Ha,detach:function(a){return Ia(this,a,!0)},remove:function(a){return Ia(this,a)},text:function(a){return Y(this,function(a){return void 0===a?n.text(this):this.empty().append((this[0]&&this[0].ownerDocument||d).createTextNode(a))},null,a,arguments.length)},append:function(){return Ha(this,arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=Ca(this,a);b.appendChild(a)}})},prepend:function(){return Ha(this,arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=Ca(this,a);b.insertBefore(a,b.firstChild)}})},before:function(){return Ha(this,arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this)})},after:function(){return Ha(this,arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this.nextSibling)})},empty:function(){for(var a,b=0;null!=(a=this[b]);b++){1===a.nodeType&&n.cleanData(ea(a,!1));while(a.firstChild)a.removeChild(a.firstChild);a.options&&n.nodeName(a,"select")&&(a.options.length=0)}return this},clone:function(a,b){return a=null==a?!1:a,b=null==b?a:b,this.map(function(){return n.clone(this,a,b)})},html:function(a){return Y(this,function(a){var b=this[0]||{},c=0,d=this.length;if(void 0===a)return 1===b.nodeType?b.innerHTML.replace(ta,""):void 0;if("string"==typeof a&&!wa.test(a)&&(l.htmlSerialize||!ua.test(a))&&(l.leadingWhitespace||!aa.test(a))&&!da[($.exec(a)||["",""])[1].toLowerCase()]){a=n.htmlPrefilter(a);try{for(;d>c;c++)b=this[c]||{},1===b.nodeType&&(n.cleanData(ea(b,!1)),b.innerHTML=a);b=0}catch(e){}}b&&this.empty().append(a)},null,a,arguments.length)},replaceWith:function(){var a=[];return Ha(this,arguments,function(b){var c=this.parentNode;n.inArray(this,a)<0&&(n.cleanData(ea(this)),c&&c.replaceChild(b,this))},a)}}),n.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){n.fn[a]=function(a){for(var c,d=0,e=[],f=n(a),h=f.length-1;h>=d;d++)c=d===h?this:this.clone(!0),n(f[d])[b](c),g.apply(e,c.get());return this.pushStack(e)}});var Ja,Ka={HTML:"block",BODY:"block"};function La(a,b){var c=n(b.createElement(a)).appendTo(b.body),d=n.css(c[0],"display");return c.detach(),d}function Ma(a){var b=d,c=Ka[a];return c||(c=La(a,b),"none"!==c&&c||(Ja=(Ja||n("<iframe frameborder='0' width='0' height='0'/>")).appendTo(b.documentElement),b=(Ja[0].contentWindow||Ja[0].contentDocument).document,b.write(),b.close(),c=La(a,b),Ja.detach()),Ka[a]=c),c}var Na=/^margin/,Oa=new RegExp("^("+T+")(?!px)[a-z%]+$","i"),Pa=function(a,b,c,d){var e,f,g={};for(f in b)g[f]=a.style[f],a.style[f]=b[f];e=c.apply(a,d||[]);for(f in b)a.style[f]=g[f];return e},Qa=d.documentElement;!function(){var b,c,e,f,g,h,i=d.createElement("div"),j=d.createElement("div");if(j.style){j.style.cssText="float:left;opacity:.5",l.opacity="0.5"===j.style.opacity,l.cssFloat=!!j.style.cssFloat,j.style.backgroundClip="content-box",j.cloneNode(!0).style.backgroundClip="",l.clearCloneStyle="content-box"===j.style.backgroundClip,i=d.createElement("div"),i.style.cssText="border:0;width:8px;height:0;top:0;left:-9999px;padding:0;margin-top:1px;position:absolute",j.innerHTML="",i.appendChild(j),l.boxSizing=""===j.style.boxSizing||""===j.style.MozBoxSizing||""===j.style.WebkitBoxSizing,n.extend(l,{reliableHiddenOffsets:function(){return null==b&&k(),f},boxSizingReliable:function(){return null==b&&k(),e},pixelMarginRight:function(){return null==b&&k(),c},pixelPosition:function(){return null==b&&k(),b},reliableMarginRight:function(){return null==b&&k(),g},reliableMarginLeft:function(){return null==b&&k(),h}});function k(){var k,l,m=d.documentElement;m.appendChild(i),j.style.cssText="-webkit-box-sizing:border-box;box-sizing:border-box;position:relative;display:block;margin:auto;border:1px;padding:1px;top:1%;width:50%",b=e=h=!1,c=g=!0,a.getComputedStyle&&(l=a.getComputedStyle(j),b="1%"!==(l||{}).top,h="2px"===(l||{}).marginLeft,e="4px"===(l||{width:"4px"}).width,j.style.marginRight="50%",c="4px"===(l||{marginRight:"4px"}).marginRight,k=j.appendChild(d.createElement("div")),k.style.cssText=j.style.cssText="-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;margin:0;border:0;padding:0",k.style.marginRight=k.style.width="0",j.style.width="1px",g=!parseFloat((a.getComputedStyle(k)||{}).marginRight),j.removeChild(k)),j.style.display="none",f=0===j.getClientRects().length,f&&(j.style.display="",j.innerHTML="<table><tr><td></td><td>t</td></tr></table>",k=j.getElementsByTagName("td"),k[0].style.cssText="margin:0;border:0;padding:0;display:none",f=0===k[0].offsetHeight,f&&(k[0].style.display="",k[1].style.display="none",f=0===k[0].offsetHeight)),m.removeChild(i)}}}();var Ra,Sa,Ta=/^(top|right|bottom|left)$/;a.getComputedStyle?(Ra=function(b){var c=b.ownerDocument.defaultView;return c&&c.opener||(c=a),c.getComputedStyle(b)},Sa=function(a,b,c){var d,e,f,g,h=a.style;return c=c||Ra(a),g=c?c.getPropertyValue(b)||c[b]:void 0,""!==g&&void 0!==g||n.contains(a.ownerDocument,a)||(g=n.style(a,b)),c&&!l.pixelMarginRight()&&Oa.test(g)&&Na.test(b)&&(d=h.width,e=h.minWidth,f=h.maxWidth,h.minWidth=h.maxWidth=h.width=g,g=c.width,h.width=d,h.minWidth=e,h.maxWidth=f),void 0===g?g:g+""}):Qa.currentStyle&&(Ra=function(a){return a.currentStyle},Sa=function(a,b,c){var d,e,f,g,h=a.style;return c=c||Ra(a),g=c?c[b]:void 0,null==g&&h&&h[b]&&(g=h[b]),Oa.test(g)&&!Ta.test(b)&&(d=h.left,e=a.runtimeStyle,f=e&&e.left,f&&(e.left=a.currentStyle.left),h.left="fontSize"===b?"1em":g,g=h.pixelLeft+"px",h.left=d,f&&(e.left=f)),void 0===g?g:g+""||"auto"});function Ua(a,b){return{get:function(){return a()?void delete this.get:(this.get=b).apply(this,arguments)}}}var Va=/alpha\([^)]*\)/i,Wa=/opacity\s*=\s*([^)]*)/i,Xa=/^(none|table(?!-c[ea]).+)/,Ya=new RegExp("^("+T+")(.*)$","i"),Za={position:"absolute",visibility:"hidden",display:"block"},$a={letterSpacing:"0",fontWeight:"400"},_a=["Webkit","O","Moz","ms"],ab=d.createElement("div").style;function bb(a){if(a in ab)return a;var b=a.charAt(0).toUpperCase()+a.slice(1),c=_a.length;while(c--)if(a=_a[c]+b,a in ab)return a}function cb(a,b){for(var c,d,e,f=[],g=0,h=a.length;h>g;g++)d=a[g],d.style&&(f[g]=n._data(d,"olddisplay"),c=d.style.display,b?(f[g]||"none"!==c||(d.style.display=""),""===d.style.display&&W(d)&&(f[g]=n._data(d,"olddisplay",Ma(d.nodeName)))):(e=W(d),(c&&"none"!==c||!e)&&n._data(d,"olddisplay",e?c:n.css(d,"display"))));for(g=0;h>g;g++)d=a[g],d.style&&(b&&"none"!==d.style.display&&""!==d.style.display||(d.style.display=b?f[g]||"":"none"));return a}function db(a,b,c){var d=Ya.exec(b);return d?Math.max(0,d[1]-(c||0))+(d[2]||"px"):b}function eb(a,b,c,d,e){for(var f=c===(d?"border":"content")?4:"width"===b?1:0,g=0;4>f;f+=2)"margin"===c&&(g+=n.css(a,c+V[f],!0,e)),d?("content"===c&&(g-=n.css(a,"padding"+V[f],!0,e)),"margin"!==c&&(g-=n.css(a,"border"+V[f]+"Width",!0,e))):(g+=n.css(a,"padding"+V[f],!0,e),"padding"!==c&&(g+=n.css(a,"border"+V[f]+"Width",!0,e)));return g}function fb(b,c,e){var f=!0,g="width"===c?b.offsetWidth:b.offsetHeight,h=Ra(b),i=l.boxSizing&&"border-box"===n.css(b,"boxSizing",!1,h);if(d.msFullscreenElement&&a.top!==a&&b.getClientRects().length&&(g=Math.round(100*b.getBoundingClientRect()[c])),0>=g||null==g){if(g=Sa(b,c,h),(0>g||null==g)&&(g=b.style[c]),Oa.test(g))return g;f=i&&(l.boxSizingReliable()||g===b.style[c]),g=parseFloat(g)||0}return g+eb(b,c,e||(i?"border":"content"),f,h)+"px"}n.extend({cssHooks:{opacity:{get:function(a,b){if(b){var c=Sa(a,"opacity");return""===c?"1":c}}}},cssNumber:{animationIterationCount:!0,columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":l.cssFloat?"cssFloat":"styleFloat"},style:function(a,b,c,d){if(a&&3!==a.nodeType&&8!==a.nodeType&&a.style){var e,f,g,h=n.camelCase(b),i=a.style;if(b=n.cssProps[h]||(n.cssProps[h]=bb(h)||h),g=n.cssHooks[b]||n.cssHooks[h],void 0===c)return g&&"get"in g&&void 0!==(e=g.get(a,!1,d))?e:i[b];if(f=typeof c,"string"===f&&(e=U.exec(c))&&e[1]&&(c=X(a,b,e),f="number"),null!=c&&c===c&&("number"===f&&(c+=e&&e[3]||(n.cssNumber[h]?"":"px")),l.clearCloneStyle||""!==c||0!==b.indexOf("background")||(i[b]="inherit"),!(g&&"set"in g&&void 0===(c=g.set(a,c,d)))))try{i[b]=c}catch(j){}}},css:function(a,b,c,d){var e,f,g,h=n.camelCase(b);return b=n.cssProps[h]||(n.cssProps[h]=bb(h)||h),g=n.cssHooks[b]||n.cssHooks[h],g&&"get"in g&&(f=g.get(a,!0,c)),void 0===f&&(f=Sa(a,b,d)),"normal"===f&&b in $a&&(f=$a[b]),""===c||c?(e=parseFloat(f),c===!0||isFinite(e)?e||0:f):f}}),n.each(["height","width"],function(a,b){n.cssHooks[b]={get:function(a,c,d){return c?Xa.test(n.css(a,"display"))&&0===a.offsetWidth?Pa(a,Za,function(){return fb(a,b,d)}):fb(a,b,d):void 0},set:function(a,c,d){var e=d&&Ra(a);return db(a,c,d?eb(a,b,d,l.boxSizing&&"border-box"===n.css(a,"boxSizing",!1,e),e):0)}}}),l.opacity||(n.cssHooks.opacity={get:function(a,b){return Wa.test((b&&a.currentStyle?a.currentStyle.filter:a.style.filter)||"")?.01*parseFloat(RegExp.$1)+"":b?"1":""},set:function(a,b){var c=a.style,d=a.currentStyle,e=n.isNumeric(b)?"alpha(opacity="+100*b+")":"",f=d&&d.filter||c.filter||"";c.zoom=1,(b>=1||""===b)&&""===n.trim(f.replace(Va,""))&&c.removeAttribute&&(c.removeAttribute("filter"),""===b||d&&!d.filter)||(c.filter=Va.test(f)?f.replace(Va,e):f+" "+e)}}),n.cssHooks.marginRight=Ua(l.reliableMarginRight,function(a,b){return b?Pa(a,{display:"inline-block"},Sa,[a,"marginRight"]):void 0}),n.cssHooks.marginLeft=Ua(l.reliableMarginLeft,function(a,b){
return b?(parseFloat(Sa(a,"marginLeft"))||(n.contains(a.ownerDocument,a)?a.getBoundingClientRect().left-Pa(a,{marginLeft:0},function(){return a.getBoundingClientRect().left}):0))+"px":void 0}),n.each({margin:"",padding:"",border:"Width"},function(a,b){n.cssHooks[a+b]={expand:function(c){for(var d=0,e={},f="string"==typeof c?c.split(" "):[c];4>d;d++)e[a+V[d]+b]=f[d]||f[d-2]||f[0];return e}},Na.test(a)||(n.cssHooks[a+b].set=db)}),n.fn.extend({css:function(a,b){return Y(this,function(a,b,c){var d,e,f={},g=0;if(n.isArray(b)){for(d=Ra(a),e=b.length;e>g;g++)f[b[g]]=n.css(a,b[g],!1,d);return f}return void 0!==c?n.style(a,b,c):n.css(a,b)},a,b,arguments.length>1)},show:function(){return cb(this,!0)},hide:function(){return cb(this)},toggle:function(a){return"boolean"==typeof a?a?this.show():this.hide():this.each(function(){W(this)?n(this).show():n(this).hide()})}});function gb(a,b,c,d,e){return new gb.prototype.init(a,b,c,d,e)}n.Tween=gb,gb.prototype={constructor:gb,init:function(a,b,c,d,e,f){this.elem=a,this.prop=c,this.easing=e||n.easing._default,this.options=b,this.start=this.now=this.cur(),this.end=d,this.unit=f||(n.cssNumber[c]?"":"px")},cur:function(){var a=gb.propHooks[this.prop];return a&&a.get?a.get(this):gb.propHooks._default.get(this)},run:function(a){var b,c=gb.propHooks[this.prop];return this.options.duration?this.pos=b=n.easing[this.easing](a,this.options.duration*a,0,1,this.options.duration):this.pos=b=a,this.now=(this.end-this.start)*b+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),c&&c.set?c.set(this):gb.propHooks._default.set(this),this}},gb.prototype.init.prototype=gb.prototype,gb.propHooks={_default:{get:function(a){var b;return 1!==a.elem.nodeType||null!=a.elem[a.prop]&&null==a.elem.style[a.prop]?a.elem[a.prop]:(b=n.css(a.elem,a.prop,""),b&&"auto"!==b?b:0)},set:function(a){n.fx.step[a.prop]?n.fx.step[a.prop](a):1!==a.elem.nodeType||null==a.elem.style[n.cssProps[a.prop]]&&!n.cssHooks[a.prop]?a.elem[a.prop]=a.now:n.style(a.elem,a.prop,a.now+a.unit)}}},gb.propHooks.scrollTop=gb.propHooks.scrollLeft={set:function(a){a.elem.nodeType&&a.elem.parentNode&&(a.elem[a.prop]=a.now)}},n.easing={linear:function(a){return a},swing:function(a){return.5-Math.cos(a*Math.PI)/2},_default:"swing"},n.fx=gb.prototype.init,n.fx.step={};var hb,ib,jb=/^(?:toggle|show|hide)$/,kb=/queueHooks$/;function lb(){return a.setTimeout(function(){hb=void 0}),hb=n.now()}function mb(a,b){var c,d={height:a},e=0;for(b=b?1:0;4>e;e+=2-b)c=V[e],d["margin"+c]=d["padding"+c]=a;return b&&(d.opacity=d.width=a),d}function nb(a,b,c){for(var d,e=(qb.tweeners[b]||[]).concat(qb.tweeners["*"]),f=0,g=e.length;g>f;f++)if(d=e[f].call(c,b,a))return d}function ob(a,b,c){var d,e,f,g,h,i,j,k,m=this,o={},p=a.style,q=a.nodeType&&W(a),r=n._data(a,"fxshow");c.queue||(h=n._queueHooks(a,"fx"),null==h.unqueued&&(h.unqueued=0,i=h.empty.fire,h.empty.fire=function(){h.unqueued||i()}),h.unqueued++,m.always(function(){m.always(function(){h.unqueued--,n.queue(a,"fx").length||h.empty.fire()})})),1===a.nodeType&&("height"in b||"width"in b)&&(c.overflow=[p.overflow,p.overflowX,p.overflowY],j=n.css(a,"display"),k="none"===j?n._data(a,"olddisplay")||Ma(a.nodeName):j,"inline"===k&&"none"===n.css(a,"float")&&(l.inlineBlockNeedsLayout&&"inline"!==Ma(a.nodeName)?p.zoom=1:p.display="inline-block")),c.overflow&&(p.overflow="hidden",l.shrinkWrapBlocks()||m.always(function(){p.overflow=c.overflow[0],p.overflowX=c.overflow[1],p.overflowY=c.overflow[2]}));for(d in b)if(e=b[d],jb.exec(e)){if(delete b[d],f=f||"toggle"===e,e===(q?"hide":"show")){if("show"!==e||!r||void 0===r[d])continue;q=!0}o[d]=r&&r[d]||n.style(a,d)}else j=void 0;if(n.isEmptyObject(o))"inline"===("none"===j?Ma(a.nodeName):j)&&(p.display=j);else{r?"hidden"in r&&(q=r.hidden):r=n._data(a,"fxshow",{}),f&&(r.hidden=!q),q?n(a).show():m.done(function(){n(a).hide()}),m.done(function(){var b;n._removeData(a,"fxshow");for(b in o)n.style(a,b,o[b])});for(d in o)g=nb(q?r[d]:0,d,m),d in r||(r[d]=g.start,q&&(g.end=g.start,g.start="width"===d||"height"===d?1:0))}}function pb(a,b){var c,d,e,f,g;for(c in a)if(d=n.camelCase(c),e=b[d],f=a[c],n.isArray(f)&&(e=f[1],f=a[c]=f[0]),c!==d&&(a[d]=f,delete a[c]),g=n.cssHooks[d],g&&"expand"in g){f=g.expand(f),delete a[d];for(c in f)c in a||(a[c]=f[c],b[c]=e)}else b[d]=e}function qb(a,b,c){var d,e,f=0,g=qb.prefilters.length,h=n.Deferred().always(function(){delete i.elem}),i=function(){if(e)return!1;for(var b=hb||lb(),c=Math.max(0,j.startTime+j.duration-b),d=c/j.duration||0,f=1-d,g=0,i=j.tweens.length;i>g;g++)j.tweens[g].run(f);return h.notifyWith(a,[j,f,c]),1>f&&i?c:(h.resolveWith(a,[j]),!1)},j=h.promise({elem:a,props:n.extend({},b),opts:n.extend(!0,{specialEasing:{},easing:n.easing._default},c),originalProperties:b,originalOptions:c,startTime:hb||lb(),duration:c.duration,tweens:[],createTween:function(b,c){var d=n.Tween(a,j.opts,b,c,j.opts.specialEasing[b]||j.opts.easing);return j.tweens.push(d),d},stop:function(b){var c=0,d=b?j.tweens.length:0;if(e)return this;for(e=!0;d>c;c++)j.tweens[c].run(1);return b?(h.notifyWith(a,[j,1,0]),h.resolveWith(a,[j,b])):h.rejectWith(a,[j,b]),this}}),k=j.props;for(pb(k,j.opts.specialEasing);g>f;f++)if(d=qb.prefilters[f].call(j,a,k,j.opts))return n.isFunction(d.stop)&&(n._queueHooks(j.elem,j.opts.queue).stop=n.proxy(d.stop,d)),d;return n.map(k,nb,j),n.isFunction(j.opts.start)&&j.opts.start.call(a,j),n.fx.timer(n.extend(i,{elem:a,anim:j,queue:j.opts.queue})),j.progress(j.opts.progress).done(j.opts.done,j.opts.complete).fail(j.opts.fail).always(j.opts.always)}n.Animation=n.extend(qb,{tweeners:{"*":[function(a,b){var c=this.createTween(a,b);return X(c.elem,a,U.exec(b),c),c}]},tweener:function(a,b){n.isFunction(a)?(b=a,a=["*"]):a=a.match(G);for(var c,d=0,e=a.length;e>d;d++)c=a[d],qb.tweeners[c]=qb.tweeners[c]||[],qb.tweeners[c].unshift(b)},prefilters:[ob],prefilter:function(a,b){b?qb.prefilters.unshift(a):qb.prefilters.push(a)}}),n.speed=function(a,b,c){var d=a&&"object"==typeof a?n.extend({},a):{complete:c||!c&&b||n.isFunction(a)&&a,duration:a,easing:c&&b||b&&!n.isFunction(b)&&b};return d.duration=n.fx.off?0:"number"==typeof d.duration?d.duration:d.duration in n.fx.speeds?n.fx.speeds[d.duration]:n.fx.speeds._default,null!=d.queue&&d.queue!==!0||(d.queue="fx"),d.old=d.complete,d.complete=function(){n.isFunction(d.old)&&d.old.call(this),d.queue&&n.dequeue(this,d.queue)},d},n.fn.extend({fadeTo:function(a,b,c,d){return this.filter(W).css("opacity",0).show().end().animate({opacity:b},a,c,d)},animate:function(a,b,c,d){var e=n.isEmptyObject(a),f=n.speed(b,c,d),g=function(){var b=qb(this,n.extend({},a),f);(e||n._data(this,"finish"))&&b.stop(!0)};return g.finish=g,e||f.queue===!1?this.each(g):this.queue(f.queue,g)},stop:function(a,b,c){var d=function(a){var b=a.stop;delete a.stop,b(c)};return"string"!=typeof a&&(c=b,b=a,a=void 0),b&&a!==!1&&this.queue(a||"fx",[]),this.each(function(){var b=!0,e=null!=a&&a+"queueHooks",f=n.timers,g=n._data(this);if(e)g[e]&&g[e].stop&&d(g[e]);else for(e in g)g[e]&&g[e].stop&&kb.test(e)&&d(g[e]);for(e=f.length;e--;)f[e].elem!==this||null!=a&&f[e].queue!==a||(f[e].anim.stop(c),b=!1,f.splice(e,1));!b&&c||n.dequeue(this,a)})},finish:function(a){return a!==!1&&(a=a||"fx"),this.each(function(){var b,c=n._data(this),d=c[a+"queue"],e=c[a+"queueHooks"],f=n.timers,g=d?d.length:0;for(c.finish=!0,n.queue(this,a,[]),e&&e.stop&&e.stop.call(this,!0),b=f.length;b--;)f[b].elem===this&&f[b].queue===a&&(f[b].anim.stop(!0),f.splice(b,1));for(b=0;g>b;b++)d[b]&&d[b].finish&&d[b].finish.call(this);delete c.finish})}}),n.each(["toggle","show","hide"],function(a,b){var c=n.fn[b];n.fn[b]=function(a,d,e){return null==a||"boolean"==typeof a?c.apply(this,arguments):this.animate(mb(b,!0),a,d,e)}}),n.each({slideDown:mb("show"),slideUp:mb("hide"),slideToggle:mb("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(a,b){n.fn[a]=function(a,c,d){return this.animate(b,a,c,d)}}),n.timers=[],n.fx.tick=function(){var a,b=n.timers,c=0;for(hb=n.now();c<b.length;c++)a=b[c],a()||b[c]!==a||b.splice(c--,1);b.length||n.fx.stop(),hb=void 0},n.fx.timer=function(a){n.timers.push(a),a()?n.fx.start():n.timers.pop()},n.fx.interval=13,n.fx.start=function(){ib||(ib=a.setInterval(n.fx.tick,n.fx.interval))},n.fx.stop=function(){a.clearInterval(ib),ib=null},n.fx.speeds={slow:600,fast:200,_default:400},n.fn.delay=function(b,c){return b=n.fx?n.fx.speeds[b]||b:b,c=c||"fx",this.queue(c,function(c,d){var e=a.setTimeout(c,b);d.stop=function(){a.clearTimeout(e)}})},function(){var a,b=d.createElement("input"),c=d.createElement("div"),e=d.createElement("select"),f=e.appendChild(d.createElement("option"));c=d.createElement("div"),c.setAttribute("className","t"),c.innerHTML="  <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",a=c.getElementsByTagName("a")[0],b.setAttribute("type","checkbox"),c.appendChild(b),a=c.getElementsByTagName("a")[0],a.style.cssText="top:1px",l.getSetAttribute="t"!==c.className,l.style=/top/.test(a.getAttribute("style")),l.hrefNormalized="/a"===a.getAttribute("href"),l.checkOn=!!b.value,l.optSelected=f.selected,l.enctype=!!d.createElement("form").enctype,e.disabled=!0,l.optDisabled=!f.disabled,b=d.createElement("input"),b.setAttribute("value",""),l.input=""===b.getAttribute("value"),b.value="t",b.setAttribute("type","radio"),l.radioValue="t"===b.value}();var rb=/\r/g,sb=/[\x20\t\r\n\f]+/g;n.fn.extend({val:function(a){var b,c,d,e=this[0];{if(arguments.length)return d=n.isFunction(a),this.each(function(c){var e;1===this.nodeType&&(e=d?a.call(this,c,n(this).val()):a,null==e?e="":"number"==typeof e?e+="":n.isArray(e)&&(e=n.map(e,function(a){return null==a?"":a+""})),b=n.valHooks[this.type]||n.valHooks[this.nodeName.toLowerCase()],b&&"set"in b&&void 0!==b.set(this,e,"value")||(this.value=e))});if(e)return b=n.valHooks[e.type]||n.valHooks[e.nodeName.toLowerCase()],b&&"get"in b&&void 0!==(c=b.get(e,"value"))?c:(c=e.value,"string"==typeof c?c.replace(rb,""):null==c?"":c)}}}),n.extend({valHooks:{option:{get:function(a){var b=n.find.attr(a,"value");return null!=b?b:n.trim(n.text(a)).replace(sb," ")}},select:{get:function(a){for(var b,c,d=a.options,e=a.selectedIndex,f="select-one"===a.type||0>e,g=f?null:[],h=f?e+1:d.length,i=0>e?h:f?e:0;h>i;i++)if(c=d[i],(c.selected||i===e)&&(l.optDisabled?!c.disabled:null===c.getAttribute("disabled"))&&(!c.parentNode.disabled||!n.nodeName(c.parentNode,"optgroup"))){if(b=n(c).val(),f)return b;g.push(b)}return g},set:function(a,b){var c,d,e=a.options,f=n.makeArray(b),g=e.length;while(g--)if(d=e[g],n.inArray(n.valHooks.option.get(d),f)>-1)try{d.selected=c=!0}catch(h){d.scrollHeight}else d.selected=!1;return c||(a.selectedIndex=-1),e}}}}),n.each(["radio","checkbox"],function(){n.valHooks[this]={set:function(a,b){return n.isArray(b)?a.checked=n.inArray(n(a).val(),b)>-1:void 0}},l.checkOn||(n.valHooks[this].get=function(a){return null===a.getAttribute("value")?"on":a.value})});var tb,ub,vb=n.expr.attrHandle,wb=/^(?:checked|selected)$/i,xb=l.getSetAttribute,yb=l.input;n.fn.extend({attr:function(a,b){return Y(this,n.attr,a,b,arguments.length>1)},removeAttr:function(a){return this.each(function(){n.removeAttr(this,a)})}}),n.extend({attr:function(a,b,c){var d,e,f=a.nodeType;if(3!==f&&8!==f&&2!==f)return"undefined"==typeof a.getAttribute?n.prop(a,b,c):(1===f&&n.isXMLDoc(a)||(b=b.toLowerCase(),e=n.attrHooks[b]||(n.expr.match.bool.test(b)?ub:tb)),void 0!==c?null===c?void n.removeAttr(a,b):e&&"set"in e&&void 0!==(d=e.set(a,c,b))?d:(a.setAttribute(b,c+""),c):e&&"get"in e&&null!==(d=e.get(a,b))?d:(d=n.find.attr(a,b),null==d?void 0:d))},attrHooks:{type:{set:function(a,b){if(!l.radioValue&&"radio"===b&&n.nodeName(a,"input")){var c=a.value;return a.setAttribute("type",b),c&&(a.value=c),b}}}},removeAttr:function(a,b){var c,d,e=0,f=b&&b.match(G);if(f&&1===a.nodeType)while(c=f[e++])d=n.propFix[c]||c,n.expr.match.bool.test(c)?yb&&xb||!wb.test(c)?a[d]=!1:a[n.camelCase("default-"+c)]=a[d]=!1:n.attr(a,c,""),a.removeAttribute(xb?c:d)}}),ub={set:function(a,b,c){return b===!1?n.removeAttr(a,c):yb&&xb||!wb.test(c)?a.setAttribute(!xb&&n.propFix[c]||c,c):a[n.camelCase("default-"+c)]=a[c]=!0,c}},n.each(n.expr.match.bool.source.match(/\w+/g),function(a,b){var c=vb[b]||n.find.attr;yb&&xb||!wb.test(b)?vb[b]=function(a,b,d){var e,f;return d||(f=vb[b],vb[b]=e,e=null!=c(a,b,d)?b.toLowerCase():null,vb[b]=f),e}:vb[b]=function(a,b,c){return c?void 0:a[n.camelCase("default-"+b)]?b.toLowerCase():null}}),yb&&xb||(n.attrHooks.value={set:function(a,b,c){return n.nodeName(a,"input")?void(a.defaultValue=b):tb&&tb.set(a,b,c)}}),xb||(tb={set:function(a,b,c){var d=a.getAttributeNode(c);return d||a.setAttributeNode(d=a.ownerDocument.createAttribute(c)),d.value=b+="","value"===c||b===a.getAttribute(c)?b:void 0}},vb.id=vb.name=vb.coords=function(a,b,c){var d;return c?void 0:(d=a.getAttributeNode(b))&&""!==d.value?d.value:null},n.valHooks.button={get:function(a,b){var c=a.getAttributeNode(b);return c&&c.specified?c.value:void 0},set:tb.set},n.attrHooks.contenteditable={set:function(a,b,c){tb.set(a,""===b?!1:b,c)}},n.each(["width","height"],function(a,b){n.attrHooks[b]={set:function(a,c){return""===c?(a.setAttribute(b,"auto"),c):void 0}}})),l.style||(n.attrHooks.style={get:function(a){return a.style.cssText||void 0},set:function(a,b){return a.style.cssText=b+""}});var zb=/^(?:input|select|textarea|button|object)$/i,Ab=/^(?:a|area)$/i;n.fn.extend({prop:function(a,b){return Y(this,n.prop,a,b,arguments.length>1)},removeProp:function(a){return a=n.propFix[a]||a,this.each(function(){try{this[a]=void 0,delete this[a]}catch(b){}})}}),n.extend({prop:function(a,b,c){var d,e,f=a.nodeType;if(3!==f&&8!==f&&2!==f)return 1===f&&n.isXMLDoc(a)||(b=n.propFix[b]||b,e=n.propHooks[b]),void 0!==c?e&&"set"in e&&void 0!==(d=e.set(a,c,b))?d:a[b]=c:e&&"get"in e&&null!==(d=e.get(a,b))?d:a[b]},propHooks:{tabIndex:{get:function(a){var b=n.find.attr(a,"tabindex");return b?parseInt(b,10):zb.test(a.nodeName)||Ab.test(a.nodeName)&&a.href?0:-1}}},propFix:{"for":"htmlFor","class":"className"}}),l.hrefNormalized||n.each(["href","src"],function(a,b){n.propHooks[b]={get:function(a){return a.getAttribute(b,4)}}}),l.optSelected||(n.propHooks.selected={get:function(a){var b=a.parentNode;return b&&(b.selectedIndex,b.parentNode&&b.parentNode.selectedIndex),null},set:function(a){var b=a.parentNode;b&&(b.selectedIndex,b.parentNode&&b.parentNode.selectedIndex)}}),n.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){n.propFix[this.toLowerCase()]=this}),l.enctype||(n.propFix.enctype="encoding");var Bb=/[\t\r\n\f]/g;function Cb(a){return n.attr(a,"class")||""}n.fn.extend({addClass:function(a){var b,c,d,e,f,g,h,i=0;if(n.isFunction(a))return this.each(function(b){n(this).addClass(a.call(this,b,Cb(this)))});if("string"==typeof a&&a){b=a.match(G)||[];while(c=this[i++])if(e=Cb(c),d=1===c.nodeType&&(" "+e+" ").replace(Bb," ")){g=0;while(f=b[g++])d.indexOf(" "+f+" ")<0&&(d+=f+" ");h=n.trim(d),e!==h&&n.attr(c,"class",h)}}return this},removeClass:function(a){var b,c,d,e,f,g,h,i=0;if(n.isFunction(a))return this.each(function(b){n(this).removeClass(a.call(this,b,Cb(this)))});if(!arguments.length)return this.attr("class","");if("string"==typeof a&&a){b=a.match(G)||[];while(c=this[i++])if(e=Cb(c),d=1===c.nodeType&&(" "+e+" ").replace(Bb," ")){g=0;while(f=b[g++])while(d.indexOf(" "+f+" ")>-1)d=d.replace(" "+f+" "," ");h=n.trim(d),e!==h&&n.attr(c,"class",h)}}return this},toggleClass:function(a,b){var c=typeof a;return"boolean"==typeof b&&"string"===c?b?this.addClass(a):this.removeClass(a):n.isFunction(a)?this.each(function(c){n(this).toggleClass(a.call(this,c,Cb(this),b),b)}):this.each(function(){var b,d,e,f;if("string"===c){d=0,e=n(this),f=a.match(G)||[];while(b=f[d++])e.hasClass(b)?e.removeClass(b):e.addClass(b)}else void 0!==a&&"boolean"!==c||(b=Cb(this),b&&n._data(this,"__className__",b),n.attr(this,"class",b||a===!1?"":n._data(this,"__className__")||""))})},hasClass:function(a){var b,c,d=0;b=" "+a+" ";while(c=this[d++])if(1===c.nodeType&&(" "+Cb(c)+" ").replace(Bb," ").indexOf(b)>-1)return!0;return!1}}),n.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(a,b){n.fn[b]=function(a,c){return arguments.length>0?this.on(b,null,a,c):this.trigger(b)}}),n.fn.extend({hover:function(a,b){return this.mouseenter(a).mouseleave(b||a)}});var Db=a.location,Eb=n.now(),Fb=/\?/,Gb=/(,)|(\[|{)|(}|])|"(?:[^"\\\r\n]|\\["\\\/bfnrt]|\\u[\da-fA-F]{4})*"\s*:?|true|false|null|-?(?!0\d)\d+(?:\.\d+|)(?:[eE][+-]?\d+|)/g;n.parseJSON=function(b){if(a.JSON&&a.JSON.parse)return a.JSON.parse(b+"");var c,d=null,e=n.trim(b+"");return e&&!n.trim(e.replace(Gb,function(a,b,e,f){return c&&b&&(d=0),0===d?a:(c=e||b,d+=!f-!e,"")}))?Function("return "+e)():n.error("Invalid JSON: "+b)},n.parseXML=function(b){var c,d;if(!b||"string"!=typeof b)return null;try{a.DOMParser?(d=new a.DOMParser,c=d.parseFromString(b,"text/xml")):(c=new a.ActiveXObject("Microsoft.XMLDOM"),c.async="false",c.loadXML(b))}catch(e){c=void 0}return c&&c.documentElement&&!c.getElementsByTagName("parsererror").length||n.error("Invalid XML: "+b),c};var Hb=/#.*$/,Ib=/([?&])_=[^&]*/,Jb=/^(.*?):[ \t]*([^\r\n]*)\r?$/gm,Kb=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,Lb=/^(?:GET|HEAD)$/,Mb=/^\/\//,Nb=/^([\w.+-]+:)(?:\/\/(?:[^\/?#]*@|)([^\/?#:]*)(?::(\d+)|)|)/,Ob={},Pb={},Qb="*/".concat("*"),Rb=Db.href,Sb=Nb.exec(Rb.toLowerCase())||[];function Tb(a){return function(b,c){"string"!=typeof b&&(c=b,b="*");var d,e=0,f=b.toLowerCase().match(G)||[];if(n.isFunction(c))while(d=f[e++])"+"===d.charAt(0)?(d=d.slice(1)||"*",(a[d]=a[d]||[]).unshift(c)):(a[d]=a[d]||[]).push(c)}}function Ub(a,b,c,d){var e={},f=a===Pb;function g(h){var i;return e[h]=!0,n.each(a[h]||[],function(a,h){var j=h(b,c,d);return"string"!=typeof j||f||e[j]?f?!(i=j):void 0:(b.dataTypes.unshift(j),g(j),!1)}),i}return g(b.dataTypes[0])||!e["*"]&&g("*")}function Vb(a,b){var c,d,e=n.ajaxSettings.flatOptions||{};for(d in b)void 0!==b[d]&&((e[d]?a:c||(c={}))[d]=b[d]);return c&&n.extend(!0,a,c),a}function Wb(a,b,c){var d,e,f,g,h=a.contents,i=a.dataTypes;while("*"===i[0])i.shift(),void 0===e&&(e=a.mimeType||b.getResponseHeader("Content-Type"));if(e)for(g in h)if(h[g]&&h[g].test(e)){i.unshift(g);break}if(i[0]in c)f=i[0];else{for(g in c){if(!i[0]||a.converters[g+" "+i[0]]){f=g;break}d||(d=g)}f=f||d}return f?(f!==i[0]&&i.unshift(f),c[f]):void 0}function Xb(a,b,c,d){var e,f,g,h,i,j={},k=a.dataTypes.slice();if(k[1])for(g in a.converters)j[g.toLowerCase()]=a.converters[g];f=k.shift();while(f)if(a.responseFields[f]&&(c[a.responseFields[f]]=b),!i&&d&&a.dataFilter&&(b=a.dataFilter(b,a.dataType)),i=f,f=k.shift())if("*"===f)f=i;else if("*"!==i&&i!==f){if(g=j[i+" "+f]||j["* "+f],!g)for(e in j)if(h=e.split(" "),h[1]===f&&(g=j[i+" "+h[0]]||j["* "+h[0]])){g===!0?g=j[e]:j[e]!==!0&&(f=h[0],k.unshift(h[1]));break}if(g!==!0)if(g&&a["throws"])b=g(b);else try{b=g(b)}catch(l){return{state:"parsererror",error:g?l:"No conversion from "+i+" to "+f}}}return{state:"success",data:b}}n.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:Rb,type:"GET",isLocal:Kb.test(Sb[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Qb,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":n.parseJSON,"text xml":n.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(a,b){return b?Vb(Vb(a,n.ajaxSettings),b):Vb(n.ajaxSettings,a)},ajaxPrefilter:Tb(Ob),ajaxTransport:Tb(Pb),ajax:function(b,c){"object"==typeof b&&(c=b,b=void 0),c=c||{};var d,e,f,g,h,i,j,k,l=n.ajaxSetup({},c),m=l.context||l,o=l.context&&(m.nodeType||m.jquery)?n(m):n.event,p=n.Deferred(),q=n.Callbacks("once memory"),r=l.statusCode||{},s={},t={},u=0,v="canceled",w={readyState:0,getResponseHeader:function(a){var b;if(2===u){if(!k){k={};while(b=Jb.exec(g))k[b[1].toLowerCase()]=b[2]}b=k[a.toLowerCase()]}return null==b?null:b},getAllResponseHeaders:function(){return 2===u?g:null},setRequestHeader:function(a,b){var c=a.toLowerCase();return u||(a=t[c]=t[c]||a,s[a]=b),this},overrideMimeType:function(a){return u||(l.mimeType=a),this},statusCode:function(a){var b;if(a)if(2>u)for(b in a)r[b]=[r[b],a[b]];else w.always(a[w.status]);return this},abort:function(a){var b=a||v;return j&&j.abort(b),y(0,b),this}};if(p.promise(w).complete=q.add,w.success=w.done,w.error=w.fail,l.url=((b||l.url||Rb)+"").replace(Hb,"").replace(Mb,Sb[1]+"//"),l.type=c.method||c.type||l.method||l.type,l.dataTypes=n.trim(l.dataType||"*").toLowerCase().match(G)||[""],null==l.crossDomain&&(d=Nb.exec(l.url.toLowerCase()),l.crossDomain=!(!d||d[1]===Sb[1]&&d[2]===Sb[2]&&(d[3]||("http:"===d[1]?"80":"443"))===(Sb[3]||("http:"===Sb[1]?"80":"443")))),l.data&&l.processData&&"string"!=typeof l.data&&(l.data=n.param(l.data,l.traditional)),Ub(Ob,l,c,w),2===u)return w;i=n.event&&l.global,i&&0===n.active++&&n.event.trigger("ajaxStart"),l.type=l.type.toUpperCase(),l.hasContent=!Lb.test(l.type),f=l.url,l.hasContent||(l.data&&(f=l.url+=(Fb.test(f)?"&":"?")+l.data,delete l.data),l.cache===!1&&(l.url=Ib.test(f)?f.replace(Ib,"$1_="+Eb++):f+(Fb.test(f)?"&":"?")+"_="+Eb++)),l.ifModified&&(n.lastModified[f]&&w.setRequestHeader("If-Modified-Since",n.lastModified[f]),n.etag[f]&&w.setRequestHeader("If-None-Match",n.etag[f])),(l.data&&l.hasContent&&l.contentType!==!1||c.contentType)&&w.setRequestHeader("Content-Type",l.contentType),w.setRequestHeader("Accept",l.dataTypes[0]&&l.accepts[l.dataTypes[0]]?l.accepts[l.dataTypes[0]]+("*"!==l.dataTypes[0]?", "+Qb+"; q=0.01":""):l.accepts["*"]);for(e in l.headers)w.setRequestHeader(e,l.headers[e]);if(l.beforeSend&&(l.beforeSend.call(m,w,l)===!1||2===u))return w.abort();v="abort";for(e in{success:1,error:1,complete:1})w[e](l[e]);if(j=Ub(Pb,l,c,w)){if(w.readyState=1,i&&o.trigger("ajaxSend",[w,l]),2===u)return w;l.async&&l.timeout>0&&(h=a.setTimeout(function(){w.abort("timeout")},l.timeout));try{u=1,j.send(s,y)}catch(x){if(!(2>u))throw x;y(-1,x)}}else y(-1,"No Transport");function y(b,c,d,e){var k,s,t,v,x,y=c;2!==u&&(u=2,h&&a.clearTimeout(h),j=void 0,g=e||"",w.readyState=b>0?4:0,k=b>=200&&300>b||304===b,d&&(v=Wb(l,w,d)),v=Xb(l,v,w,k),k?(l.ifModified&&(x=w.getResponseHeader("Last-Modified"),x&&(n.lastModified[f]=x),x=w.getResponseHeader("etag"),x&&(n.etag[f]=x)),204===b||"HEAD"===l.type?y="nocontent":304===b?y="notmodified":(y=v.state,s=v.data,t=v.error,k=!t)):(t=y,!b&&y||(y="error",0>b&&(b=0))),w.status=b,w.statusText=(c||y)+"",k?p.resolveWith(m,[s,y,w]):p.rejectWith(m,[w,y,t]),w.statusCode(r),r=void 0,i&&o.trigger(k?"ajaxSuccess":"ajaxError",[w,l,k?s:t]),q.fireWith(m,[w,y]),i&&(o.trigger("ajaxComplete",[w,l]),--n.active||n.event.trigger("ajaxStop")))}return w},getJSON:function(a,b,c){return n.get(a,b,c,"json")},getScript:function(a,b){return n.get(a,void 0,b,"script")}}),n.each(["get","post"],function(a,b){n[b]=function(a,c,d,e){return n.isFunction(c)&&(e=e||d,d=c,c=void 0),n.ajax(n.extend({url:a,type:b,dataType:e,data:c,success:d},n.isPlainObject(a)&&a))}}),n._evalUrl=function(a){return n.ajax({url:a,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,"throws":!0})},n.fn.extend({wrapAll:function(a){if(n.isFunction(a))return this.each(function(b){n(this).wrapAll(a.call(this,b))});if(this[0]){var b=n(a,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){var a=this;while(a.firstChild&&1===a.firstChild.nodeType)a=a.firstChild;return a}).append(this)}return this},wrapInner:function(a){return n.isFunction(a)?this.each(function(b){n(this).wrapInner(a.call(this,b))}):this.each(function(){var b=n(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){var b=n.isFunction(a);return this.each(function(c){n(this).wrapAll(b?a.call(this,c):a)})},unwrap:function(){return this.parent().each(function(){n.nodeName(this,"body")||n(this).replaceWith(this.childNodes)}).end()}});function Yb(a){return a.style&&a.style.display||n.css(a,"display")}function Zb(a){while(a&&1===a.nodeType){if("none"===Yb(a)||"hidden"===a.type)return!0;a=a.parentNode}return!1}n.expr.filters.hidden=function(a){return l.reliableHiddenOffsets()?a.offsetWidth<=0&&a.offsetHeight<=0&&!a.getClientRects().length:Zb(a)},n.expr.filters.visible=function(a){return!n.expr.filters.hidden(a)};var $b=/%20/g,_b=/\[\]$/,ac=/\r?\n/g,bc=/^(?:submit|button|image|reset|file)$/i,cc=/^(?:input|select|textarea|keygen)/i;function dc(a,b,c,d){var e;if(n.isArray(b))n.each(b,function(b,e){c||_b.test(a)?d(a,e):dc(a+"["+("object"==typeof e&&null!=e?b:"")+"]",e,c,d)});else if(c||"object"!==n.type(b))d(a,b);else for(e in b)dc(a+"["+e+"]",b[e],c,d)}n.param=function(a,b){var c,d=[],e=function(a,b){b=n.isFunction(b)?b():null==b?"":b,d[d.length]=encodeURIComponent(a)+"="+encodeURIComponent(b)};if(void 0===b&&(b=n.ajaxSettings&&n.ajaxSettings.traditional),n.isArray(a)||a.jquery&&!n.isPlainObject(a))n.each(a,function(){e(this.name,this.value)});else for(c in a)dc(c,a[c],b,e);return d.join("&").replace($b,"+")},n.fn.extend({serialize:function(){return n.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var a=n.prop(this,"elements");return a?n.makeArray(a):this}).filter(function(){var a=this.type;return this.name&&!n(this).is(":disabled")&&cc.test(this.nodeName)&&!bc.test(a)&&(this.checked||!Z.test(a))}).map(function(a,b){var c=n(this).val();return null==c?null:n.isArray(c)?n.map(c,function(a){return{name:b.name,value:a.replace(ac,"\r\n")}}):{name:b.name,value:c.replace(ac,"\r\n")}}).get()}}),n.ajaxSettings.xhr=void 0!==a.ActiveXObject?function(){return this.isLocal?ic():d.documentMode>8?hc():/^(get|post|head|put|delete|options)$/i.test(this.type)&&hc()||ic()}:hc;var ec=0,fc={},gc=n.ajaxSettings.xhr();a.attachEvent&&a.attachEvent("onunload",function(){for(var a in fc)fc[a](void 0,!0)}),l.cors=!!gc&&"withCredentials"in gc,gc=l.ajax=!!gc,gc&&n.ajaxTransport(function(b){if(!b.crossDomain||l.cors){var c;return{send:function(d,e){var f,g=b.xhr(),h=++ec;if(g.open(b.type,b.url,b.async,b.username,b.password),b.xhrFields)for(f in b.xhrFields)g[f]=b.xhrFields[f];b.mimeType&&g.overrideMimeType&&g.overrideMimeType(b.mimeType),b.crossDomain||d["X-Requested-With"]||(d["X-Requested-With"]="XMLHttpRequest");for(f in d)void 0!==d[f]&&g.setRequestHeader(f,d[f]+"");g.send(b.hasContent&&b.data||null),c=function(a,d){var f,i,j;if(c&&(d||4===g.readyState))if(delete fc[h],c=void 0,g.onreadystatechange=n.noop,d)4!==g.readyState&&g.abort();else{j={},f=g.status,"string"==typeof g.responseText&&(j.text=g.responseText);try{i=g.statusText}catch(k){i=""}f||!b.isLocal||b.crossDomain?1223===f&&(f=204):f=j.text?200:404}j&&e(f,i,j,g.getAllResponseHeaders())},b.async?4===g.readyState?a.setTimeout(c):g.onreadystatechange=fc[h]=c:c()},abort:function(){c&&c(void 0,!0)}}}});function hc(){try{return new a.XMLHttpRequest}catch(b){}}function ic(){try{return new a.ActiveXObject("Microsoft.XMLHTTP")}catch(b){}}n.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(a){return n.globalEval(a),a}}}),n.ajaxPrefilter("script",function(a){void 0===a.cache&&(a.cache=!1),a.crossDomain&&(a.type="GET",a.global=!1)}),n.ajaxTransport("script",function(a){if(a.crossDomain){var b,c=d.head||n("head")[0]||d.documentElement;return{send:function(e,f){b=d.createElement("script"),b.async=!0,a.scriptCharset&&(b.charset=a.scriptCharset),b.src=a.url,b.onload=b.onreadystatechange=function(a,c){(c||!b.readyState||/loaded|complete/.test(b.readyState))&&(b.onload=b.onreadystatechange=null,b.parentNode&&b.parentNode.removeChild(b),b=null,c||f(200,"success"))},c.insertBefore(b,c.firstChild)},abort:function(){b&&b.onload(void 0,!0)}}}});var jc=[],kc=/(=)\?(?=&|$)|\?\?/;n.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var a=jc.pop()||n.expando+"_"+Eb++;return this[a]=!0,a}}),n.ajaxPrefilter("json jsonp",function(b,c,d){var e,f,g,h=b.jsonp!==!1&&(kc.test(b.url)?"url":"string"==typeof b.data&&0===(b.contentType||"").indexOf("application/x-www-form-urlencoded")&&kc.test(b.data)&&"data");return h||"jsonp"===b.dataTypes[0]?(e=b.jsonpCallback=n.isFunction(b.jsonpCallback)?b.jsonpCallback():b.jsonpCallback,h?b[h]=b[h].replace(kc,"$1"+e):b.jsonp!==!1&&(b.url+=(Fb.test(b.url)?"&":"?")+b.jsonp+"="+e),b.converters["script json"]=function(){return g||n.error(e+" was not called"),g[0]},b.dataTypes[0]="json",f=a[e],a[e]=function(){g=arguments},d.always(function(){void 0===f?n(a).removeProp(e):a[e]=f,b[e]&&(b.jsonpCallback=c.jsonpCallback,jc.push(e)),g&&n.isFunction(f)&&f(g[0]),g=f=void 0}),"script"):void 0}),n.parseHTML=function(a,b,c){if(!a||"string"!=typeof a)return null;"boolean"==typeof b&&(c=b,b=!1),b=b||d;var e=x.exec(a),f=!c&&[];return e?[b.createElement(e[1])]:(e=ja([a],b,f),f&&f.length&&n(f).remove(),n.merge([],e.childNodes))};var lc=n.fn.load;n.fn.load=function(a,b,c){if("string"!=typeof a&&lc)return lc.apply(this,arguments);var d,e,f,g=this,h=a.indexOf(" ");return h>-1&&(d=n.trim(a.slice(h,a.length)),a=a.slice(0,h)),n.isFunction(b)?(c=b,b=void 0):b&&"object"==typeof b&&(e="POST"),g.length>0&&n.ajax({url:a,type:e||"GET",dataType:"html",data:b}).done(function(a){f=arguments,g.html(d?n("<div>").append(n.parseHTML(a)).find(d):a)}).always(c&&function(a,b){g.each(function(){c.apply(this,f||[a.responseText,b,a])})}),this},n.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(a,b){n.fn[b]=function(a){return this.on(b,a)}}),n.expr.filters.animated=function(a){return n.grep(n.timers,function(b){return a===b.elem}).length};function mc(a){return n.isWindow(a)?a:9===a.nodeType?a.defaultView||a.parentWindow:!1}n.offset={setOffset:function(a,b,c){var d,e,f,g,h,i,j,k=n.css(a,"position"),l=n(a),m={};"static"===k&&(a.style.position="relative"),h=l.offset(),f=n.css(a,"top"),i=n.css(a,"left"),j=("absolute"===k||"fixed"===k)&&n.inArray("auto",[f,i])>-1,j?(d=l.position(),g=d.top,e=d.left):(g=parseFloat(f)||0,e=parseFloat(i)||0),n.isFunction(b)&&(b=b.call(a,c,n.extend({},h))),null!=b.top&&(m.top=b.top-h.top+g),null!=b.left&&(m.left=b.left-h.left+e),"using"in b?b.using.call(a,m):l.css(m)}},n.fn.extend({offset:function(a){if(arguments.length)return void 0===a?this:this.each(function(b){n.offset.setOffset(this,a,b)});var b,c,d={top:0,left:0},e=this[0],f=e&&e.ownerDocument;if(f)return b=f.documentElement,n.contains(b,e)?("undefined"!=typeof e.getBoundingClientRect&&(d=e.getBoundingClientRect()),c=mc(f),{top:d.top+(c.pageYOffset||b.scrollTop)-(b.clientTop||0),left:d.left+(c.pageXOffset||b.scrollLeft)-(b.clientLeft||0)}):d},position:function(){if(this[0]){var a,b,c={top:0,left:0},d=this[0];return"fixed"===n.css(d,"position")?b=d.getBoundingClientRect():(a=this.offsetParent(),b=this.offset(),n.nodeName(a[0],"html")||(c=a.offset()),c.top+=n.css(a[0],"borderTopWidth",!0),c.left+=n.css(a[0],"borderLeftWidth",!0)),{top:b.top-c.top-n.css(d,"marginTop",!0),left:b.left-c.left-n.css(d,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var a=this.offsetParent;while(a&&!n.nodeName(a,"html")&&"static"===n.css(a,"position"))a=a.offsetParent;return a||Qa})}}),n.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(a,b){var c=/Y/.test(b);n.fn[a]=function(d){return Y(this,function(a,d,e){var f=mc(a);return void 0===e?f?b in f?f[b]:f.document.documentElement[d]:a[d]:void(f?f.scrollTo(c?n(f).scrollLeft():e,c?e:n(f).scrollTop()):a[d]=e)},a,d,arguments.length,null)}}),n.each(["top","left"],function(a,b){n.cssHooks[b]=Ua(l.pixelPosition,function(a,c){return c?(c=Sa(a,b),Oa.test(c)?n(a).position()[b]+"px":c):void 0;
})}),n.each({Height:"height",Width:"width"},function(a,b){n.each({padding:"inner"+a,content:b,"":"outer"+a},function(c,d){n.fn[d]=function(d,e){var f=arguments.length&&(c||"boolean"!=typeof d),g=c||(d===!0||e===!0?"margin":"border");return Y(this,function(b,c,d){var e;return n.isWindow(b)?b.document.documentElement["client"+a]:9===b.nodeType?(e=b.documentElement,Math.max(b.body["scroll"+a],e["scroll"+a],b.body["offset"+a],e["offset"+a],e["client"+a])):void 0===d?n.css(b,c,g):n.style(b,c,d,g)},b,f?d:void 0,f,null)}})}),n.fn.extend({bind:function(a,b,c){return this.on(a,null,b,c)},unbind:function(a,b){return this.off(a,null,b)},delegate:function(a,b,c,d){return this.on(b,a,c,d)},undelegate:function(a,b,c){return 1===arguments.length?this.off(a,"**"):this.off(b,a||"**",c)}}),n.fn.size=function(){return this.length},n.fn.andSelf=n.fn.addBack,"function"==typeof define&&define.amd&&define("jquery",[],function(){return n});var nc=a.jQuery,oc=a.$;return n.noConflict=function(b){return a.$===n&&(a.$=oc),b&&a.jQuery===n&&(a.jQuery=nc),n},b||(a.jQuery=a.$=n),n});


/** /static/opensource/bootstrap-3.3.5-dist/js/bootstrap.min.js **/


/*!
 * Bootstrap v3.3.5 (http://getbootstrap.com)
 * Copyright 2011-2015 Twitter, Inc.
 * Licensed under the MIT license
 */
if("undefined"==typeof jQuery)throw new Error("Bootstrap's JavaScript requires jQuery");+function(a){"use strict";var b=a.fn.jquery.split(" ")[0].split(".");if(b[0]<2&&b[1]<9||1==b[0]&&9==b[1]&&b[2]<1)throw new Error("Bootstrap's JavaScript requires jQuery version 1.9.1 or higher")}(jQuery),+function(a){"use strict";function b(){var a=document.createElement("bootstrap"),b={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var c in b)if(void 0!==a.style[c])return{end:b[c]};return!1}a.fn.emulateTransitionEnd=function(b){var c=!1,d=this;a(this).one("bsTransitionEnd",function(){c=!0});var e=function(){c||a(d).trigger(a.support.transition.end)};return setTimeout(e,b),this},a(function(){a.support.transition=b(),a.support.transition&&(a.event.special.bsTransitionEnd={bindType:a.support.transition.end,delegateType:a.support.transition.end,handle:function(b){return a(b.target).is(this)?b.handleObj.handler.apply(this,arguments):void 0}})})}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var c=a(this),e=c.data("bs.alert");e||c.data("bs.alert",e=new d(this)),"string"==typeof b&&e[b].call(c)})}var c='[data-dismiss="alert"]',d=function(b){a(b).on("click",c,this.close)};d.VERSION="3.3.5",d.TRANSITION_DURATION=150,d.prototype.close=function(b){function c(){g.detach().trigger("closed.bs.alert").remove()}var e=a(this),f=e.attr("data-target");f||(f=e.attr("href"),f=f&&f.replace(/.*(?=#[^\s]*$)/,""));var g=a(f);b&&b.preventDefault(),g.length||(g=e.closest(".alert")),g.trigger(b=a.Event("close.bs.alert")),b.isDefaultPrevented()||(g.removeClass("in"),a.support.transition&&g.hasClass("fade")?g.one("bsTransitionEnd",c).emulateTransitionEnd(d.TRANSITION_DURATION):c())};var e=a.fn.alert;a.fn.alert=b,a.fn.alert.Constructor=d,a.fn.alert.noConflict=function(){return a.fn.alert=e,this},a(document).on("click.bs.alert.data-api",c,d.prototype.close)}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.button"),f="object"==typeof b&&b;e||d.data("bs.button",e=new c(this,f)),"toggle"==b?e.toggle():b&&e.setState(b)})}var c=function(b,d){this.$element=a(b),this.options=a.extend({},c.DEFAULTS,d),this.isLoading=!1};c.VERSION="3.3.5",c.DEFAULTS={loadingText:"loading..."},c.prototype.setState=function(b){var c="disabled",d=this.$element,e=d.is("input")?"val":"html",f=d.data();b+="Text",null==f.resetText&&d.data("resetText",d[e]()),setTimeout(a.proxy(function(){d[e](null==f[b]?this.options[b]:f[b]),"loadingText"==b?(this.isLoading=!0,d.addClass(c).attr(c,c)):this.isLoading&&(this.isLoading=!1,d.removeClass(c).removeAttr(c))},this),0)},c.prototype.toggle=function(){var a=!0,b=this.$element.closest('[data-toggle="buttons"]');if(b.length){var c=this.$element.find("input");"radio"==c.prop("type")?(c.prop("checked")&&(a=!1),b.find(".active").removeClass("active"),this.$element.addClass("active")):"checkbox"==c.prop("type")&&(c.prop("checked")!==this.$element.hasClass("active")&&(a=!1),this.$element.toggleClass("active")),c.prop("checked",this.$element.hasClass("active")),a&&c.trigger("change")}else this.$element.attr("aria-pressed",!this.$element.hasClass("active")),this.$element.toggleClass("active")};var d=a.fn.button;a.fn.button=b,a.fn.button.Constructor=c,a.fn.button.noConflict=function(){return a.fn.button=d,this},a(document).on("click.bs.button.data-api",'[data-toggle^="button"]',function(c){var d=a(c.target);d.hasClass("btn")||(d=d.closest(".btn")),b.call(d,"toggle"),a(c.target).is('input[type="radio"]')||a(c.target).is('input[type="checkbox"]')||c.preventDefault()}).on("focus.bs.button.data-api blur.bs.button.data-api",'[data-toggle^="button"]',function(b){a(b.target).closest(".btn").toggleClass("focus",/^focus(in)?$/.test(b.type))})}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.carousel"),f=a.extend({},c.DEFAULTS,d.data(),"object"==typeof b&&b),g="string"==typeof b?b:f.slide;e||d.data("bs.carousel",e=new c(this,f)),"number"==typeof b?e.to(b):g?e[g]():f.interval&&e.pause().cycle()})}var c=function(b,c){this.$element=a(b),this.$indicators=this.$element.find(".carousel-indicators"),this.options=c,this.paused=null,this.sliding=null,this.interval=null,this.$active=null,this.$items=null,this.options.keyboard&&this.$element.on("keydown.bs.carousel",a.proxy(this.keydown,this)),"hover"==this.options.pause&&!("ontouchstart"in document.documentElement)&&this.$element.on("mouseenter.bs.carousel",a.proxy(this.pause,this)).on("mouseleave.bs.carousel",a.proxy(this.cycle,this))};c.VERSION="3.3.5",c.TRANSITION_DURATION=600,c.DEFAULTS={interval:5e3,pause:"hover",wrap:!0,keyboard:!0},c.prototype.keydown=function(a){if(!/input|textarea/i.test(a.target.tagName)){switch(a.which){case 37:this.prev();break;case 39:this.next();break;default:return}a.preventDefault()}},c.prototype.cycle=function(b){return b||(this.paused=!1),this.interval&&clearInterval(this.interval),this.options.interval&&!this.paused&&(this.interval=setInterval(a.proxy(this.next,this),this.options.interval)),this},c.prototype.getItemIndex=function(a){return this.$items=a.parent().children(".item"),this.$items.index(a||this.$active)},c.prototype.getItemForDirection=function(a,b){var c=this.getItemIndex(b),d="prev"==a&&0===c||"next"==a&&c==this.$items.length-1;if(d&&!this.options.wrap)return b;var e="prev"==a?-1:1,f=(c+e)%this.$items.length;return this.$items.eq(f)},c.prototype.to=function(a){var b=this,c=this.getItemIndex(this.$active=this.$element.find(".item.active"));return a>this.$items.length-1||0>a?void 0:this.sliding?this.$element.one("slid.bs.carousel",function(){b.to(a)}):c==a?this.pause().cycle():this.slide(a>c?"next":"prev",this.$items.eq(a))},c.prototype.pause=function(b){return b||(this.paused=!0),this.$element.find(".next, .prev").length&&a.support.transition&&(this.$element.trigger(a.support.transition.end),this.cycle(!0)),this.interval=clearInterval(this.interval),this},c.prototype.next=function(){return this.sliding?void 0:this.slide("next")},c.prototype.prev=function(){return this.sliding?void 0:this.slide("prev")},c.prototype.slide=function(b,d){var e=this.$element.find(".item.active"),f=d||this.getItemForDirection(b,e),g=this.interval,h="next"==b?"left":"right",i=this;if(f.hasClass("active"))return this.sliding=!1;var j=f[0],k=a.Event("slide.bs.carousel",{relatedTarget:j,direction:h});if(this.$element.trigger(k),!k.isDefaultPrevented()){if(this.sliding=!0,g&&this.pause(),this.$indicators.length){this.$indicators.find(".active").removeClass("active");var l=a(this.$indicators.children()[this.getItemIndex(f)]);l&&l.addClass("active")}var m=a.Event("slid.bs.carousel",{relatedTarget:j,direction:h});return a.support.transition&&this.$element.hasClass("slide")?(f.addClass(b),f[0].offsetWidth,e.addClass(h),f.addClass(h),e.one("bsTransitionEnd",function(){f.removeClass([b,h].join(" ")).addClass("active"),e.removeClass(["active",h].join(" ")),i.sliding=!1,setTimeout(function(){i.$element.trigger(m)},0)}).emulateTransitionEnd(c.TRANSITION_DURATION)):(e.removeClass("active"),f.addClass("active"),this.sliding=!1,this.$element.trigger(m)),g&&this.cycle(),this}};var d=a.fn.carousel;a.fn.carousel=b,a.fn.carousel.Constructor=c,a.fn.carousel.noConflict=function(){return a.fn.carousel=d,this};var e=function(c){var d,e=a(this),f=a(e.attr("data-target")||(d=e.attr("href"))&&d.replace(/.*(?=#[^\s]+$)/,""));if(f.hasClass("carousel")){var g=a.extend({},f.data(),e.data()),h=e.attr("data-slide-to");h&&(g.interval=!1),b.call(f,g),h&&f.data("bs.carousel").to(h),c.preventDefault()}};a(document).on("click.bs.carousel.data-api","[data-slide]",e).on("click.bs.carousel.data-api","[data-slide-to]",e),a(window).on("load",function(){a('[data-ride="carousel"]').each(function(){var c=a(this);b.call(c,c.data())})})}(jQuery),+function(a){"use strict";function b(b){var c,d=b.attr("data-target")||(c=b.attr("href"))&&c.replace(/.*(?=#[^\s]+$)/,"");return a(d)}function c(b){return this.each(function(){var c=a(this),e=c.data("bs.collapse"),f=a.extend({},d.DEFAULTS,c.data(),"object"==typeof b&&b);!e&&f.toggle&&/show|hide/.test(b)&&(f.toggle=!1),e||c.data("bs.collapse",e=new d(this,f)),"string"==typeof b&&e[b]()})}var d=function(b,c){this.$element=a(b),this.options=a.extend({},d.DEFAULTS,c),this.$trigger=a('[data-toggle="collapse"][href="#'+b.id+'"],[data-toggle="collapse"][data-target="#'+b.id+'"]'),this.transitioning=null,this.options.parent?this.$parent=this.getParent():this.addAriaAndCollapsedClass(this.$element,this.$trigger),this.options.toggle&&this.toggle()};d.VERSION="3.3.5",d.TRANSITION_DURATION=350,d.DEFAULTS={toggle:!0},d.prototype.dimension=function(){var a=this.$element.hasClass("width");return a?"width":"height"},d.prototype.show=function(){if(!this.transitioning&&!this.$element.hasClass("in")){var b,e=this.$parent&&this.$parent.children(".panel").children(".in, .collapsing");if(!(e&&e.length&&(b=e.data("bs.collapse"),b&&b.transitioning))){var f=a.Event("show.bs.collapse");if(this.$element.trigger(f),!f.isDefaultPrevented()){e&&e.length&&(c.call(e,"hide"),b||e.data("bs.collapse",null));var g=this.dimension();this.$element.removeClass("collapse").addClass("collapsing")[g](0).attr("aria-expanded",!0),this.$trigger.removeClass("collapsed").attr("aria-expanded",!0),this.transitioning=1;var h=function(){this.$element.removeClass("collapsing").addClass("collapse in")[g](""),this.transitioning=0,this.$element.trigger("shown.bs.collapse")};if(!a.support.transition)return h.call(this);var i=a.camelCase(["scroll",g].join("-"));this.$element.one("bsTransitionEnd",a.proxy(h,this)).emulateTransitionEnd(d.TRANSITION_DURATION)[g](this.$element[0][i])}}}},d.prototype.hide=function(){if(!this.transitioning&&this.$element.hasClass("in")){var b=a.Event("hide.bs.collapse");if(this.$element.trigger(b),!b.isDefaultPrevented()){var c=this.dimension();this.$element[c](this.$element[c]())[0].offsetHeight,this.$element.addClass("collapsing").removeClass("collapse in").attr("aria-expanded",!1),this.$trigger.addClass("collapsed").attr("aria-expanded",!1),this.transitioning=1;var e=function(){this.transitioning=0,this.$element.removeClass("collapsing").addClass("collapse").trigger("hidden.bs.collapse")};return a.support.transition?void this.$element[c](0).one("bsTransitionEnd",a.proxy(e,this)).emulateTransitionEnd(d.TRANSITION_DURATION):e.call(this)}}},d.prototype.toggle=function(){this[this.$element.hasClass("in")?"hide":"show"]()},d.prototype.getParent=function(){return a(this.options.parent).find('[data-toggle="collapse"][data-parent="'+this.options.parent+'"]').each(a.proxy(function(c,d){var e=a(d);this.addAriaAndCollapsedClass(b(e),e)},this)).end()},d.prototype.addAriaAndCollapsedClass=function(a,b){var c=a.hasClass("in");a.attr("aria-expanded",c),b.toggleClass("collapsed",!c).attr("aria-expanded",c)};var e=a.fn.collapse;a.fn.collapse=c,a.fn.collapse.Constructor=d,a.fn.collapse.noConflict=function(){return a.fn.collapse=e,this},a(document).on("click.bs.collapse.data-api",'[data-toggle="collapse"]',function(d){var e=a(this);e.attr("data-target")||d.preventDefault();var f=b(e),g=f.data("bs.collapse"),h=g?"toggle":e.data();c.call(f,h)})}(jQuery),+function(a){"use strict";function b(b){var c=b.attr("data-target");c||(c=b.attr("href"),c=c&&/#[A-Za-z]/.test(c)&&c.replace(/.*(?=#[^\s]*$)/,""));var d=c&&a(c);return d&&d.length?d:b.parent()}function c(c){c&&3===c.which||(a(e).remove(),a(f).each(function(){var d=a(this),e=b(d),f={relatedTarget:this};e.hasClass("open")&&(c&&"click"==c.type&&/input|textarea/i.test(c.target.tagName)&&a.contains(e[0],c.target)||(e.trigger(c=a.Event("hide.bs.dropdown",f)),c.isDefaultPrevented()||(d.attr("aria-expanded","false"),e.removeClass("open").trigger("hidden.bs.dropdown",f))))}))}function d(b){return this.each(function(){var c=a(this),d=c.data("bs.dropdown");d||c.data("bs.dropdown",d=new g(this)),"string"==typeof b&&d[b].call(c)})}var e=".dropdown-backdrop",f='[data-toggle="dropdown"]',g=function(b){a(b).on("click.bs.dropdown",this.toggle)};g.VERSION="3.3.5",g.prototype.toggle=function(d){var e=a(this);if(!e.is(".disabled, :disabled")){var f=b(e),g=f.hasClass("open");if(c(),!g){"ontouchstart"in document.documentElement&&!f.closest(".navbar-nav").length&&a(document.createElement("div")).addClass("dropdown-backdrop").insertAfter(a(this)).on("click",c);var h={relatedTarget:this};if(f.trigger(d=a.Event("show.bs.dropdown",h)),d.isDefaultPrevented())return;e.trigger("focus").attr("aria-expanded","true"),f.toggleClass("open").trigger("shown.bs.dropdown",h)}return!1}},g.prototype.keydown=function(c){if(/(38|40|27|32)/.test(c.which)&&!/input|textarea/i.test(c.target.tagName)){var d=a(this);if(c.preventDefault(),c.stopPropagation(),!d.is(".disabled, :disabled")){var e=b(d),g=e.hasClass("open");if(!g&&27!=c.which||g&&27==c.which)return 27==c.which&&e.find(f).trigger("focus"),d.trigger("click");var h=" li:not(.disabled):visible a",i=e.find(".dropdown-menu"+h);if(i.length){var j=i.index(c.target);38==c.which&&j>0&&j--,40==c.which&&j<i.length-1&&j++,~j||(j=0),i.eq(j).trigger("focus")}}}};var h=a.fn.dropdown;a.fn.dropdown=d,a.fn.dropdown.Constructor=g,a.fn.dropdown.noConflict=function(){return a.fn.dropdown=h,this},a(document).on("click.bs.dropdown.data-api",c).on("click.bs.dropdown.data-api",".dropdown form",function(a){a.stopPropagation()}).on("click.bs.dropdown.data-api",f,g.prototype.toggle).on("keydown.bs.dropdown.data-api",f,g.prototype.keydown).on("keydown.bs.dropdown.data-api",".dropdown-menu",g.prototype.keydown)}(jQuery),+function(a){"use strict";function b(b,d){return this.each(function(){var e=a(this),f=e.data("bs.modal"),g=a.extend({},c.DEFAULTS,e.data(),"object"==typeof b&&b);f||e.data("bs.modal",f=new c(this,g)),"string"==typeof b?f[b](d):g.show&&f.show(d)})}var c=function(b,c){this.options=c,this.$body=a(document.body),this.$element=a(b),this.$dialog=this.$element.find(".modal-dialog"),this.$backdrop=null,this.isShown=null,this.originalBodyPad=null,this.scrollbarWidth=0,this.ignoreBackdropClick=!1,this.options.remote&&this.$element.find(".modal-content").load(this.options.remote,a.proxy(function(){this.$element.trigger("loaded.bs.modal")},this))};c.VERSION="3.3.5",c.TRANSITION_DURATION=300,c.BACKDROP_TRANSITION_DURATION=150,c.DEFAULTS={backdrop:!0,keyboard:!0,show:!0},c.prototype.toggle=function(a){return this.isShown?this.hide():this.show(a)},c.prototype.show=function(b){var d=this,e=a.Event("show.bs.modal",{relatedTarget:b});this.$element.trigger(e),this.isShown||e.isDefaultPrevented()||(this.isShown=!0,this.checkScrollbar(),this.setScrollbar(),this.$body.addClass("modal-open"),this.escape(),this.resize(),this.$element.on("click.dismiss.bs.modal",'[data-dismiss="modal"]',a.proxy(this.hide,this)),this.$dialog.on("mousedown.dismiss.bs.modal",function(){d.$element.one("mouseup.dismiss.bs.modal",function(b){a(b.target).is(d.$element)&&(d.ignoreBackdropClick=!0)})}),this.backdrop(function(){var e=a.support.transition&&d.$element.hasClass("fade");d.$element.parent().length||d.$element.appendTo(d.$body),d.$element.show().scrollTop(0),d.adjustDialog(),e&&d.$element[0].offsetWidth,d.$element.addClass("in"),d.enforceFocus();var f=a.Event("shown.bs.modal",{relatedTarget:b});e?d.$dialog.one("bsTransitionEnd",function(){d.$element.trigger("focus").trigger(f)}).emulateTransitionEnd(c.TRANSITION_DURATION):d.$element.trigger("focus").trigger(f)}))},c.prototype.hide=function(b){b&&b.preventDefault(),b=a.Event("hide.bs.modal"),this.$element.trigger(b),this.isShown&&!b.isDefaultPrevented()&&(this.isShown=!1,this.escape(),this.resize(),a(document).off("focusin.bs.modal"),this.$element.removeClass("in").off("click.dismiss.bs.modal").off("mouseup.dismiss.bs.modal"),this.$dialog.off("mousedown.dismiss.bs.modal"),a.support.transition&&this.$element.hasClass("fade")?this.$element.one("bsTransitionEnd",a.proxy(this.hideModal,this)).emulateTransitionEnd(c.TRANSITION_DURATION):this.hideModal())},c.prototype.enforceFocus=function(){a(document).off("focusin.bs.modal").on("focusin.bs.modal",a.proxy(function(a){this.$element[0]===a.target||this.$element.has(a.target).length||this.$element.trigger("focus")},this))},c.prototype.escape=function(){this.isShown&&this.options.keyboard?this.$element.on("keydown.dismiss.bs.modal",a.proxy(function(a){27==a.which&&this.hide()},this)):this.isShown||this.$element.off("keydown.dismiss.bs.modal")},c.prototype.resize=function(){this.isShown?a(window).on("resize.bs.modal",a.proxy(this.handleUpdate,this)):a(window).off("resize.bs.modal")},c.prototype.hideModal=function(){var a=this;this.$element.hide(),this.backdrop(function(){a.$body.removeClass("modal-open"),a.resetAdjustments(),a.resetScrollbar(),a.$element.trigger("hidden.bs.modal")})},c.prototype.removeBackdrop=function(){this.$backdrop&&this.$backdrop.remove(),this.$backdrop=null},c.prototype.backdrop=function(b){var d=this,e=this.$element.hasClass("fade")?"fade":"";if(this.isShown&&this.options.backdrop){var f=a.support.transition&&e;if(this.$backdrop=a(document.createElement("div")).addClass("modal-backdrop "+e).appendTo(this.$body),this.$element.on("click.dismiss.bs.modal",a.proxy(function(a){return this.ignoreBackdropClick?void(this.ignoreBackdropClick=!1):void(a.target===a.currentTarget&&("static"==this.options.backdrop?this.$element[0].focus():this.hide()))},this)),f&&this.$backdrop[0].offsetWidth,this.$backdrop.addClass("in"),!b)return;f?this.$backdrop.one("bsTransitionEnd",b).emulateTransitionEnd(c.BACKDROP_TRANSITION_DURATION):b()}else if(!this.isShown&&this.$backdrop){this.$backdrop.removeClass("in");var g=function(){d.removeBackdrop(),b&&b()};a.support.transition&&this.$element.hasClass("fade")?this.$backdrop.one("bsTransitionEnd",g).emulateTransitionEnd(c.BACKDROP_TRANSITION_DURATION):g()}else b&&b()},c.prototype.handleUpdate=function(){this.adjustDialog()},c.prototype.adjustDialog=function(){var a=this.$element[0].scrollHeight>document.documentElement.clientHeight;this.$element.css({paddingLeft:!this.bodyIsOverflowing&&a?this.scrollbarWidth:"",paddingRight:this.bodyIsOverflowing&&!a?this.scrollbarWidth:""})},c.prototype.resetAdjustments=function(){this.$element.css({paddingLeft:"",paddingRight:""})},c.prototype.checkScrollbar=function(){var a=window.innerWidth;if(!a){var b=document.documentElement.getBoundingClientRect();a=b.right-Math.abs(b.left)}this.bodyIsOverflowing=document.body.clientWidth<a,this.scrollbarWidth=this.measureScrollbar()},c.prototype.setScrollbar=function(){var a=parseInt(this.$body.css("padding-right")||0,10);this.originalBodyPad=document.body.style.paddingRight||"",this.bodyIsOverflowing&&this.$body.css("padding-right",a+this.scrollbarWidth)},c.prototype.resetScrollbar=function(){this.$body.css("padding-right",this.originalBodyPad)},c.prototype.measureScrollbar=function(){var a=document.createElement("div");a.className="modal-scrollbar-measure",this.$body.append(a);var b=a.offsetWidth-a.clientWidth;return this.$body[0].removeChild(a),b};var d=a.fn.modal;a.fn.modal=b,a.fn.modal.Constructor=c,a.fn.modal.noConflict=function(){return a.fn.modal=d,this},a(document).on("click.bs.modal.data-api",'[data-toggle="modal"]',function(c){var d=a(this),e=d.attr("href"),f=a(d.attr("data-target")||e&&e.replace(/.*(?=#[^\s]+$)/,"")),g=f.data("bs.modal")?"toggle":a.extend({remote:!/#/.test(e)&&e},f.data(),d.data());d.is("a")&&c.preventDefault(),f.one("show.bs.modal",function(a){a.isDefaultPrevented()||f.one("hidden.bs.modal",function(){d.is(":visible")&&d.trigger("focus")})}),b.call(f,g,this)})}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.tooltip"),f="object"==typeof b&&b;(e||!/destroy|hide/.test(b))&&(e||d.data("bs.tooltip",e=new c(this,f)),"string"==typeof b&&e[b]())})}var c=function(a,b){this.type=null,this.options=null,this.enabled=null,this.timeout=null,this.hoverState=null,this.$element=null,this.inState=null,this.init("tooltip",a,b)};c.VERSION="3.3.5",c.TRANSITION_DURATION=150,c.DEFAULTS={animation:!0,placement:"top",selector:!1,template:'<div class="tooltip" role="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>',trigger:"hover focus",title:"",delay:0,html:!1,container:!1,viewport:{selector:"body",padding:0}},c.prototype.init=function(b,c,d){if(this.enabled=!0,this.type=b,this.$element=a(c),this.options=this.getOptions(d),this.$viewport=this.options.viewport&&a(a.isFunction(this.options.viewport)?this.options.viewport.call(this,this.$element):this.options.viewport.selector||this.options.viewport),this.inState={click:!1,hover:!1,focus:!1},this.$element[0]instanceof document.constructor&&!this.options.selector)throw new Error("`selector` option must be specified when initializing "+this.type+" on the window.document object!");for(var e=this.options.trigger.split(" "),f=e.length;f--;){var g=e[f];if("click"==g)this.$element.on("click."+this.type,this.options.selector,a.proxy(this.toggle,this));else if("manual"!=g){var h="hover"==g?"mouseenter":"focusin",i="hover"==g?"mouseleave":"focusout";this.$element.on(h+"."+this.type,this.options.selector,a.proxy(this.enter,this)),this.$element.on(i+"."+this.type,this.options.selector,a.proxy(this.leave,this))}}this.options.selector?this._options=a.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},c.prototype.getDefaults=function(){return c.DEFAULTS},c.prototype.getOptions=function(b){return b=a.extend({},this.getDefaults(),this.$element.data(),b),b.delay&&"number"==typeof b.delay&&(b.delay={show:b.delay,hide:b.delay}),b},c.prototype.getDelegateOptions=function(){var b={},c=this.getDefaults();return this._options&&a.each(this._options,function(a,d){c[a]!=d&&(b[a]=d)}),b},c.prototype.enter=function(b){var c=b instanceof this.constructor?b:a(b.currentTarget).data("bs."+this.type);return c||(c=new this.constructor(b.currentTarget,this.getDelegateOptions()),a(b.currentTarget).data("bs."+this.type,c)),b instanceof a.Event&&(c.inState["focusin"==b.type?"focus":"hover"]=!0),c.tip().hasClass("in")||"in"==c.hoverState?void(c.hoverState="in"):(clearTimeout(c.timeout),c.hoverState="in",c.options.delay&&c.options.delay.show?void(c.timeout=setTimeout(function(){"in"==c.hoverState&&c.show()},c.options.delay.show)):c.show())},c.prototype.isInStateTrue=function(){for(var a in this.inState)if(this.inState[a])return!0;return!1},c.prototype.leave=function(b){var c=b instanceof this.constructor?b:a(b.currentTarget).data("bs."+this.type);return c||(c=new this.constructor(b.currentTarget,this.getDelegateOptions()),a(b.currentTarget).data("bs."+this.type,c)),b instanceof a.Event&&(c.inState["focusout"==b.type?"focus":"hover"]=!1),c.isInStateTrue()?void 0:(clearTimeout(c.timeout),c.hoverState="out",c.options.delay&&c.options.delay.hide?void(c.timeout=setTimeout(function(){"out"==c.hoverState&&c.hide()},c.options.delay.hide)):c.hide())},c.prototype.show=function(){var b=a.Event("show.bs."+this.type);if(this.hasContent()&&this.enabled){this.$element.trigger(b);var d=a.contains(this.$element[0].ownerDocument.documentElement,this.$element[0]);if(b.isDefaultPrevented()||!d)return;var e=this,f=this.tip(),g=this.getUID(this.type);this.setContent(),f.attr("id",g),this.$element.attr("aria-describedby",g),this.options.animation&&f.addClass("fade");var h="function"==typeof this.options.placement?this.options.placement.call(this,f[0],this.$element[0]):this.options.placement,i=/\s?auto?\s?/i,j=i.test(h);j&&(h=h.replace(i,"")||"top"),f.detach().css({top:0,left:0,display:"block"}).addClass(h).data("bs."+this.type,this),this.options.container?f.appendTo(this.options.container):f.insertAfter(this.$element),this.$element.trigger("inserted.bs."+this.type);var k=this.getPosition(),l=f[0].offsetWidth,m=f[0].offsetHeight;if(j){var n=h,o=this.getPosition(this.$viewport);h="bottom"==h&&k.bottom+m>o.bottom?"top":"top"==h&&k.top-m<o.top?"bottom":"right"==h&&k.right+l>o.width?"left":"left"==h&&k.left-l<o.left?"right":h,f.removeClass(n).addClass(h)}var p=this.getCalculatedOffset(h,k,l,m);this.applyPlacement(p,h);var q=function(){var a=e.hoverState;e.$element.trigger("shown.bs."+e.type),e.hoverState=null,"out"==a&&e.leave(e)};a.support.transition&&this.$tip.hasClass("fade")?f.one("bsTransitionEnd",q).emulateTransitionEnd(c.TRANSITION_DURATION):q()}},c.prototype.applyPlacement=function(b,c){var d=this.tip(),e=d[0].offsetWidth,f=d[0].offsetHeight,g=parseInt(d.css("margin-top"),10),h=parseInt(d.css("margin-left"),10);isNaN(g)&&(g=0),isNaN(h)&&(h=0),b.top+=g,b.left+=h,a.offset.setOffset(d[0],a.extend({using:function(a){d.css({top:Math.round(a.top),left:Math.round(a.left)})}},b),0),d.addClass("in");var i=d[0].offsetWidth,j=d[0].offsetHeight;"top"==c&&j!=f&&(b.top=b.top+f-j);var k=this.getViewportAdjustedDelta(c,b,i,j);k.left?b.left+=k.left:b.top+=k.top;var l=/top|bottom/.test(c),m=l?2*k.left-e+i:2*k.top-f+j,n=l?"offsetWidth":"offsetHeight";d.offset(b),this.replaceArrow(m,d[0][n],l)},c.prototype.replaceArrow=function(a,b,c){this.arrow().css(c?"left":"top",50*(1-a/b)+"%").css(c?"top":"left","")},c.prototype.setContent=function(){var a=this.tip(),b=this.getTitle();a.find(".tooltip-inner")[this.options.html?"html":"text"](b),a.removeClass("fade in top bottom left right")},c.prototype.hide=function(b){function d(){"in"!=e.hoverState&&f.detach(),e.$element.removeAttr("aria-describedby").trigger("hidden.bs."+e.type),b&&b()}var e=this,f=a(this.$tip),g=a.Event("hide.bs."+this.type);return this.$element.trigger(g),g.isDefaultPrevented()?void 0:(f.removeClass("in"),a.support.transition&&f.hasClass("fade")?f.one("bsTransitionEnd",d).emulateTransitionEnd(c.TRANSITION_DURATION):d(),this.hoverState=null,this)},c.prototype.fixTitle=function(){var a=this.$element;(a.attr("title")||"string"!=typeof a.attr("data-original-title"))&&a.attr("data-original-title",a.attr("title")||"").attr("title","")},c.prototype.hasContent=function(){return this.getTitle()},c.prototype.getPosition=function(b){b=b||this.$element;var c=b[0],d="BODY"==c.tagName,e=c.getBoundingClientRect();null==e.width&&(e=a.extend({},e,{width:e.right-e.left,height:e.bottom-e.top}));var f=d?{top:0,left:0}:b.offset(),g={scroll:d?document.documentElement.scrollTop||document.body.scrollTop:b.scrollTop()},h=d?{width:a(window).width(),height:a(window).height()}:null;return a.extend({},e,g,h,f)},c.prototype.getCalculatedOffset=function(a,b,c,d){return"bottom"==a?{top:b.top+b.height,left:b.left+b.width/2-c/2}:"top"==a?{top:b.top-d,left:b.left+b.width/2-c/2}:"left"==a?{top:b.top+b.height/2-d/2,left:b.left-c}:{top:b.top+b.height/2-d/2,left:b.left+b.width}},c.prototype.getViewportAdjustedDelta=function(a,b,c,d){var e={top:0,left:0};if(!this.$viewport)return e;var f=this.options.viewport&&this.options.viewport.padding||0,g=this.getPosition(this.$viewport);if(/right|left/.test(a)){var h=b.top-f-g.scroll,i=b.top+f-g.scroll+d;h<g.top?e.top=g.top-h:i>g.top+g.height&&(e.top=g.top+g.height-i)}else{var j=b.left-f,k=b.left+f+c;j<g.left?e.left=g.left-j:k>g.right&&(e.left=g.left+g.width-k)}return e},c.prototype.getTitle=function(){var a,b=this.$element,c=this.options;return a=b.attr("data-original-title")||("function"==typeof c.title?c.title.call(b[0]):c.title)},c.prototype.getUID=function(a){do a+=~~(1e6*Math.random());while(document.getElementById(a));return a},c.prototype.tip=function(){if(!this.$tip&&(this.$tip=a(this.options.template),1!=this.$tip.length))throw new Error(this.type+" `template` option must consist of exactly 1 top-level element!");return this.$tip},c.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".tooltip-arrow")},c.prototype.enable=function(){this.enabled=!0},c.prototype.disable=function(){this.enabled=!1},c.prototype.toggleEnabled=function(){this.enabled=!this.enabled},c.prototype.toggle=function(b){var c=this;b&&(c=a(b.currentTarget).data("bs."+this.type),c||(c=new this.constructor(b.currentTarget,this.getDelegateOptions()),a(b.currentTarget).data("bs."+this.type,c))),b?(c.inState.click=!c.inState.click,c.isInStateTrue()?c.enter(c):c.leave(c)):c.tip().hasClass("in")?c.leave(c):c.enter(c)},c.prototype.destroy=function(){var a=this;clearTimeout(this.timeout),this.hide(function(){a.$element.off("."+a.type).removeData("bs."+a.type),a.$tip&&a.$tip.detach(),a.$tip=null,a.$arrow=null,a.$viewport=null})};var d=a.fn.tooltip;a.fn.tooltip=b,a.fn.tooltip.Constructor=c,a.fn.tooltip.noConflict=function(){return a.fn.tooltip=d,this}}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.popover"),f="object"==typeof b&&b;(e||!/destroy|hide/.test(b))&&(e||d.data("bs.popover",e=new c(this,f)),"string"==typeof b&&e[b]())})}var c=function(a,b){this.init("popover",a,b)};if(!a.fn.tooltip)throw new Error("Popover requires tooltip.js");c.VERSION="3.3.5",c.DEFAULTS=a.extend({},a.fn.tooltip.Constructor.DEFAULTS,{placement:"right",trigger:"click",content:"",template:'<div class="popover" role="tooltip"><div class="arrow"></div><h3 class="popover-title"></h3><div class="popover-content"></div></div>'}),c.prototype=a.extend({},a.fn.tooltip.Constructor.prototype),c.prototype.constructor=c,c.prototype.getDefaults=function(){return c.DEFAULTS},c.prototype.setContent=function(){var a=this.tip(),b=this.getTitle(),c=this.getContent();a.find(".popover-title")[this.options.html?"html":"text"](b),a.find(".popover-content").children().detach().end()[this.options.html?"string"==typeof c?"html":"append":"text"](c),a.removeClass("fade top bottom left right in"),a.find(".popover-title").html()||a.find(".popover-title").hide()},c.prototype.hasContent=function(){return this.getTitle()||this.getContent()},c.prototype.getContent=function(){var a=this.$element,b=this.options;return a.attr("data-content")||("function"==typeof b.content?b.content.call(a[0]):b.content)},c.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".arrow")};var d=a.fn.popover;a.fn.popover=b,a.fn.popover.Constructor=c,a.fn.popover.noConflict=function(){return a.fn.popover=d,this}}(jQuery),+function(a){"use strict";function b(c,d){this.$body=a(document.body),this.$scrollElement=a(a(c).is(document.body)?window:c),this.options=a.extend({},b.DEFAULTS,d),this.selector=(this.options.target||"")+" .nav li > a",this.offsets=[],this.targets=[],this.activeTarget=null,this.scrollHeight=0,this.$scrollElement.on("scroll.bs.scrollspy",a.proxy(this.process,this)),this.refresh(),this.process()}function c(c){return this.each(function(){var d=a(this),e=d.data("bs.scrollspy"),f="object"==typeof c&&c;e||d.data("bs.scrollspy",e=new b(this,f)),"string"==typeof c&&e[c]()})}b.VERSION="3.3.5",b.DEFAULTS={offset:10},b.prototype.getScrollHeight=function(){return this.$scrollElement[0].scrollHeight||Math.max(this.$body[0].scrollHeight,document.documentElement.scrollHeight)},b.prototype.refresh=function(){var b=this,c="offset",d=0;this.offsets=[],this.targets=[],this.scrollHeight=this.getScrollHeight(),a.isWindow(this.$scrollElement[0])||(c="position",d=this.$scrollElement.scrollTop()),this.$body.find(this.selector).map(function(){var b=a(this),e=b.data("target")||b.attr("href"),f=/^#./.test(e)&&a(e);return f&&f.length&&f.is(":visible")&&[[f[c]().top+d,e]]||null}).sort(function(a,b){return a[0]-b[0]}).each(function(){b.offsets.push(this[0]),b.targets.push(this[1])})},b.prototype.process=function(){var a,b=this.$scrollElement.scrollTop()+this.options.offset,c=this.getScrollHeight(),d=this.options.offset+c-this.$scrollElement.height(),e=this.offsets,f=this.targets,g=this.activeTarget;if(this.scrollHeight!=c&&this.refresh(),b>=d)return g!=(a=f[f.length-1])&&this.activate(a);if(g&&b<e[0])return this.activeTarget=null,this.clear();for(a=e.length;a--;)g!=f[a]&&b>=e[a]&&(void 0===e[a+1]||b<e[a+1])&&this.activate(f[a])},b.prototype.activate=function(b){this.activeTarget=b,this.clear();var c=this.selector+'[data-target="'+b+'"],'+this.selector+'[href="'+b+'"]',d=a(c).parents("li").addClass("active");d.parent(".dropdown-menu").length&&(d=d.closest("li.dropdown").addClass("active")),
d.trigger("activate.bs.scrollspy")},b.prototype.clear=function(){a(this.selector).parentsUntil(this.options.target,".active").removeClass("active")};var d=a.fn.scrollspy;a.fn.scrollspy=c,a.fn.scrollspy.Constructor=b,a.fn.scrollspy.noConflict=function(){return a.fn.scrollspy=d,this},a(window).on("load.bs.scrollspy.data-api",function(){a('[data-spy="scroll"]').each(function(){var b=a(this);c.call(b,b.data())})})}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.tab");e||d.data("bs.tab",e=new c(this)),"string"==typeof b&&e[b]()})}var c=function(b){this.element=a(b)};c.VERSION="3.3.5",c.TRANSITION_DURATION=150,c.prototype.show=function(){var b=this.element,c=b.closest("ul:not(.dropdown-menu)"),d=b.data("target");if(d||(d=b.attr("href"),d=d&&d.replace(/.*(?=#[^\s]*$)/,"")),!b.parent("li").hasClass("active")){var e=c.find(".active:last a"),f=a.Event("hide.bs.tab",{relatedTarget:b[0]}),g=a.Event("show.bs.tab",{relatedTarget:e[0]});if(e.trigger(f),b.trigger(g),!g.isDefaultPrevented()&&!f.isDefaultPrevented()){var h=a(d);this.activate(b.closest("li"),c),this.activate(h,h.parent(),function(){e.trigger({type:"hidden.bs.tab",relatedTarget:b[0]}),b.trigger({type:"shown.bs.tab",relatedTarget:e[0]})})}}},c.prototype.activate=function(b,d,e){function f(){g.removeClass("active").find("> .dropdown-menu > .active").removeClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!1),b.addClass("active").find('[data-toggle="tab"]').attr("aria-expanded",!0),h?(b[0].offsetWidth,b.addClass("in")):b.removeClass("fade"),b.parent(".dropdown-menu").length&&b.closest("li.dropdown").addClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!0),e&&e()}var g=d.find("> .active"),h=e&&a.support.transition&&(g.length&&g.hasClass("fade")||!!d.find("> .fade").length);g.length&&h?g.one("bsTransitionEnd",f).emulateTransitionEnd(c.TRANSITION_DURATION):f(),g.removeClass("in")};var d=a.fn.tab;a.fn.tab=b,a.fn.tab.Constructor=c,a.fn.tab.noConflict=function(){return a.fn.tab=d,this};var e=function(c){c.preventDefault(),b.call(a(this),"show")};a(document).on("click.bs.tab.data-api",'[data-toggle="tab"]',e).on("click.bs.tab.data-api",'[data-toggle="pill"]',e)}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.affix"),f="object"==typeof b&&b;e||d.data("bs.affix",e=new c(this,f)),"string"==typeof b&&e[b]()})}var c=function(b,d){this.options=a.extend({},c.DEFAULTS,d),this.$target=a(this.options.target).on("scroll.bs.affix.data-api",a.proxy(this.checkPosition,this)).on("click.bs.affix.data-api",a.proxy(this.checkPositionWithEventLoop,this)),this.$element=a(b),this.affixed=null,this.unpin=null,this.pinnedOffset=null,this.checkPosition()};c.VERSION="3.3.5",c.RESET="affix affix-top affix-bottom",c.DEFAULTS={offset:0,target:window},c.prototype.getState=function(a,b,c,d){var e=this.$target.scrollTop(),f=this.$element.offset(),g=this.$target.height();if(null!=c&&"top"==this.affixed)return c>e?"top":!1;if("bottom"==this.affixed)return null!=c?e+this.unpin<=f.top?!1:"bottom":a-d>=e+g?!1:"bottom";var h=null==this.affixed,i=h?e:f.top,j=h?g:b;return null!=c&&c>=e?"top":null!=d&&i+j>=a-d?"bottom":!1},c.prototype.getPinnedOffset=function(){if(this.pinnedOffset)return this.pinnedOffset;this.$element.removeClass(c.RESET).addClass("affix");var a=this.$target.scrollTop(),b=this.$element.offset();return this.pinnedOffset=b.top-a},c.prototype.checkPositionWithEventLoop=function(){setTimeout(a.proxy(this.checkPosition,this),1)},c.prototype.checkPosition=function(){if(this.$element.is(":visible")){var b=this.$element.height(),d=this.options.offset,e=d.top,f=d.bottom,g=Math.max(a(document).height(),a(document.body).height());"object"!=typeof d&&(f=e=d),"function"==typeof e&&(e=d.top(this.$element)),"function"==typeof f&&(f=d.bottom(this.$element));var h=this.getState(g,b,e,f);if(this.affixed!=h){null!=this.unpin&&this.$element.css("top","");var i="affix"+(h?"-"+h:""),j=a.Event(i+".bs.affix");if(this.$element.trigger(j),j.isDefaultPrevented())return;this.affixed=h,this.unpin="bottom"==h?this.getPinnedOffset():null,this.$element.removeClass(c.RESET).addClass(i).trigger(i.replace("affix","affixed")+".bs.affix")}"bottom"==h&&this.$element.offset({top:g-b-f})}};var d=a.fn.affix;a.fn.affix=b,a.fn.affix.Constructor=c,a.fn.affix.noConflict=function(){return a.fn.affix=d,this},a(window).on("load",function(){a('[data-spy="affix"]').each(function(){var c=a(this),d=c.data();d.offset=d.offset||{},null!=d.offsetBottom&&(d.offset.bottom=d.offsetBottom),null!=d.offsetTop&&(d.offset.top=d.offsetTop),b.call(c,d)})})}(jQuery);