function Tree(B,D,A){var C=this;C.isSearch=D==null?false:D;C.tree=B.uTree(A);if(C.isSearch){$("input[name='keyword']").keyup(function(E){var I=document.all?window.event:E;if(I.keyCode!=13){return}var J=C.tree;var M=$("input[name='keyword']").val();if(M==""){S(J.getNodes());return}var G=J.getNodesByParamFuzzy("id",M);var F=J.getNodesByParamFuzzy("name",M);var R=J.getNodesByParamFuzzy("code",M);G=G.concat(F);G=G.concat(R);var K=J.getNodesByParamFuzzy("type","per");var O=new Array();for(var H=0;H<G.length;H++){for(var L=0;L<K.length;L++){if(G[H].id==K[L].id){O.push(G[H])}}}G=O;N(J.getNodes());function N(W){for(var U=0;U<W.length;U++){var V=W[U];J.hideNode(V);if(V.isParent){N(V.child)}}}function S(W){for(var U=0;U<W.length;U++){var V=W[U];J.showNode(V);if(V.isParent){S(V.child)}}}function T(V){if(V.level==0){J.showNode(V);return}J.showNode(V);var U=V.getParentNode();if(U.isHidden){T(U)}}for(var Q=0;Q<G.length;Q++){var P=G[Q];T(P)}C.tree.expandAll(true)});$("input[name='keyword2']").keyup(function(E){var H=document.all?window.event:E;if(H.keyCode!=13){return}var I=C.tree;var L=$("input[name='keyword2']").val();if(L==""){Q(I.getNodes());return}var F=I.getNodesByParamFuzzy("name",L);var J=I.getNodesByParamFuzzy("type","account");var N=new Array();for(var G=0;G<F.length;G++){for(var K=0;K<J.length;K++){if(F[G].id==J[K].id){N.push(F[G])}}}F=N;M(I.getNodes());function M(U){for(var S=0;S<U.length;S++){var T=U[S];I.hideNode(T);if(T.isParent){M(T.child)}}}function Q(U){for(var S=0;S<U.length;S++){var T=U[S];I.showNode(T);if(T.isParent){Q(T.child)}}}function R(T){if(T.level==0){I.showNode(T);return}I.showNode(T);var S=T.getParentNode();if(S.isHidden){R(S)}}for(var P=0;P<F.length;P++){var O=F[P];R(O)}C.tree.expandAll(true)});$("input[name='keyword3']").keyup(function(E){var I=document.all?window.event:E;if(I.keyCode!=13){return}var J=C.tree;var M=$("input[name='keyword3']").val();if(M==""){S(J.getNodes());return}var G=J.getNodesByParamFuzzy("id",M);var F=J.getNodesByParamFuzzy("name",M);var R=J.getNodesByParamFuzzy("code",M);G=G.concat(F);G=G.concat(R);var K=J.getNodesByParamFuzzy("type","org");var O=new Array();for(var H=0;H<G.length;H++){for(var L=0;L<K.length;L++){if(G[H].id==K[L].id){O.push(G[H])}}}G=O;N(J.getNodes());function N(W){for(var U=0;U<W.length;U++){var V=W[U];J.hideNode(V);if(V.isParent){N(V.child)}}}function S(W){for(var U=0;U<W.length;U++){var V=W[U];J.showNode(V);if(V.isParent){S(V.child)}}}function T(V){if(V.level==0){J.showNode(V);return}J.showNode(V);var U=V.getParentNode();if(U.isHidden){T(U)}}for(var Q=0;Q<G.length;Q++){var P=G[Q];T(P)}C.tree.expandAll(true)});$("input[name='keyword4']").keyup(function(E){var I=document.all?window.event:E;if(I.keyCode!=13){return}var J=C.tree;var M=$("input[name='keyword4']").val();if(M==""){R(J.getNodes());return}var G=[];var F=J.getNodesByParamFuzzy("name",M);G=G.concat(F);var K=J.getNodesByParamFuzzy("type","per");var O=new Array();for(var H=0;H<G.length;H++){for(var L=0;L<K.length;L++){if(G[H].id==K[L].id){O.push(G[H])}}}G=O;N(J.getNodes());function N(V){for(var T=0;T<V.length;T++){var U=V[T];J.hideNode(U);if(U.isParent){N(U.child)}}}function R(V){for(var T=0;T<V.length;T++){var U=V[T];J.showNode(U);if(U.isParent){R(U.child)}}}function S(U){if(U.level==0){J.showNode(U);return}J.showNode(U);var T=U.getParentNode();if(T.isHidden){S(T)}}for(var Q=0;Q<G.length;Q++){var P=G[Q];S(P)}C.tree.expandAll(true)})}}function showAllCheckTree(B){A(B.getNodes());function A(E){for(var C=0;C<E.length;C++){var D=E[C];B.showNode(D);if(D.isParent){A(D.child)}}}};