Ext={version:"2.0.2"};window["undefined"]=window["undefined"];Ext.apply=function(G,F,H){if(H){Ext.apply(G,H)}if(G&&F&&typeof F=="object"){for(var E in F){G[E]=F[E]}}return G};(function(){var idSeed=0;var ua=navigator.userAgent.toLowerCase();var isStrict=document.compatMode=="CSS1Compat",isOpera=ua.indexOf("opera")>-1,isSafari=(/webkit|khtml/).test(ua),isSafari3=isSafari&&ua.indexOf("webkit/5")!=-1,isIE=!isOpera&&ua.indexOf("msie")>-1,isIE7=!isOpera&&ua.indexOf("msie 7")>-1,isGecko=!isSafari&&ua.indexOf("gecko")>-1,isBorderBox=isIE&&!isStrict,isWindows=(ua.indexOf("windows")!=-1||ua.indexOf("win32")!=-1),isMac=(ua.indexOf("macintosh")!=-1||ua.indexOf("mac os x")!=-1),isAir=(ua.indexOf("adobeair")!=-1),isLinux=(ua.indexOf("linux")!=-1),isSecure=window.location.href.toLowerCase().indexOf("https")===0;if(isIE&&!isIE7){try{document.execCommand("BackgroundImageCache",false,true)}catch(e){}}Ext.apply(Ext,{isStrict:isStrict,isSecure:isSecure,isReady:false,enableGarbageCollector:true,enableListenerCollection:false,SSL_SECURE_URL:"javascript:false",BLANK_IMAGE_URL:"http://extjs.com/s.gif",emptyFn:function(){},applyIf:function(o,c){if(o&&c){for(var p in c){if(typeof o[p]=="undefined"){o[p]=c[p]}}}return o},addBehaviors:function(o){if(!Ext.isReady){Ext.onReady(function(){Ext.addBehaviors(o)});return }var cache={};for(var b in o){var parts=b.split("@");if(parts[1]){var s=parts[0];if(!cache[s]){cache[s]=Ext.select(s)}cache[s].on(parts[1],o[b])}}cache=null},id:function(el,prefix){prefix=prefix||"ext-gen";el=Ext.getDom(el);var id=prefix+(++idSeed);return el?(el.id?el.id:(el.id=id)):id},extend:function(){var io=function(o){for(var m in o){this[m]=o[m]}};var oc=Object.prototype.constructor;return function(sb,sp,overrides){if(typeof sp=="object"){overrides=sp;sp=sb;sb=overrides.constructor!=oc?overrides.constructor:function(){sp.apply(this,arguments)}}var F=function(){},sbp,spp=sp.prototype;F.prototype=spp;sbp=sb.prototype=new F();sbp.constructor=sb;sb.superclass=spp;if(spp.constructor==oc){spp.constructor=sp}sb.override=function(o){Ext.override(sb,o)};sbp.override=io;Ext.override(sb,overrides);sb.extend=function(o){Ext.extend(sb,o)};return sb}}(),override:function(origclass,overrides){if(overrides){var p=origclass.prototype;for(var method in overrides){p[method]=overrides[method]}}},namespace:function(){var a=arguments,o=null,i,j,d,rt;for(i=0;i<a.length;++i){d=a[i].split(".");rt=d[0];eval("if (typeof "+rt+' == "undefined"){'+rt+" = {};} o = "+rt+";");for(j=1;j<d.length;++j){o[d[j]]=o[d[j]]||{};o=o[d[j]]}}},urlEncode:function(o){if(!o){return""}var buf=[];for(var key in o){var ov=o[key],k=encodeURIComponent(key);var type=typeof ov;if(type=="undefined"){buf.push(k,"=&")}else{if(type!="function"&&type!="object"){buf.push(k,"=",encodeURIComponent(ov),"&")}else{if(Ext.isArray(ov)){if(ov.length){for(var i=0,len=ov.length;i<len;i++){buf.push(k,"=",encodeURIComponent(ov[i]===undefined?"":ov[i]),"&")}}else{buf.push(k,"=&")}}}}}buf.pop();return buf.join("")},urlDecode:function(string,overwrite){if(!string||!string.length){return{}}var obj={};var pairs=string.split("&");var pair,name,value;for(var i=0,len=pairs.length;i<len;i++){pair=pairs[i].split("=");name=decodeURIComponent(pair[0]);value=decodeURIComponent(pair[1]);if(overwrite!==true){if(typeof obj[name]=="undefined"){obj[name]=value}else{if(typeof obj[name]=="string"){obj[name]=[obj[name]];obj[name].push(value)}else{obj[name].push(value)}}}else{obj[name]=value}}return obj},each:function(array,fn,scope){if(typeof array.length=="undefined"||typeof array=="string"){array=[array]}for(var i=0,len=array.length;i<len;i++){if(fn.call(scope||array[i],array[i],i,array)===false){return i}}},combine:function(){var as=arguments,l=as.length,r=[];for(var i=0;i<l;i++){var a=as[i];if(Ext.isArray(a)){r=r.concat(a)}else{if(a.length!==undefined&&!a.substr){r=r.concat(Array.prototype.slice.call(a,0))}else{r.push(a)}}}return r},escapeRe:function(s){return s.replace(/([.*+?^${}()|[\]\/\\])/g,"\\$1")},callback:function(cb,scope,args,delay){if(typeof cb=="function"){if(delay){cb.defer(delay,scope,args||[])}else{cb.apply(scope,args||[])}}},getDom:function(el){if(!el||!document){return null}return el.dom?el.dom:(typeof el=="string"?document.getElementById(el):el)},getDoc:function(){return Ext.get(document)},getBody:function(){return Ext.get(document.body||document.documentElement)},getCmp:function(id){return Ext.ComponentMgr.get(id)},num:function(v,defaultValue){if(typeof v!="number"){return defaultValue}return v},destroy:function(){for(var i=0,a=arguments,len=a.length;i<len;i++){var as=a[i];if(as){if(typeof as.destroy=="function"){as.destroy()}else{if(as.dom){as.removeAllListeners();as.remove()}}}}},removeNode:isIE?function(){var d;return function(n){if(n&&n.tagName!="BODY"){d=d||document.createElement("div");d.appendChild(n);d.innerHTML=""}}}():function(n){if(n&&n.parentNode&&n.tagName!="BODY"){n.parentNode.removeChild(n)}},type:function(o){if(o===undefined||o===null){return false}if(o.htmlElement){return"element"}var t=typeof o;if(t=="object"&&o.nodeName){switch(o.nodeType){case 1:return"element";case 3:return(/\S/).test(o.nodeValue)?"textnode":"whitespace"}}if(t=="object"||t=="function"){switch(o.constructor){case Array:return"array";case RegExp:return"regexp"}if(typeof o.length=="number"&&typeof o.item=="function"){return"nodelist"}}return t},isEmpty:function(v,allowBlank){return v===null||v===undefined||(!allowBlank?v==="":false)},value:function(v,defaultValue,allowBlank){return Ext.isEmpty(v,allowBlank)?defaultValue:v},isArray:function(v){return v&&typeof v.pop=="function"},isDate:function(v){return v&&typeof v.getFullYear=="function"},isOpera:isOpera,isSafari:isSafari,isSafari3:isSafari3,isSafari2:isSafari&&!isSafari3,isIE:isIE,isIE6:isIE&&!isIE7,isIE7:isIE7,isGecko:isGecko,isBorderBox:isBorderBox,isLinux:isLinux,isWindows:isWindows,isMac:isMac,isAir:isAir,useShims:((isIE&&!isIE7)||(isGecko&&isMac))});Ext.ns=Ext.namespace})();Ext.ns("Ext","Ext.util","Ext.grid","Ext.dd","Ext.tree","Ext.data","Ext.form","Ext.menu","Ext.state","Ext.lib","Ext.layout","Ext.app","Ext.ux");Ext.apply(Function.prototype,{createCallback:function(){var C=arguments;var D=this;return function(){return D.apply(window,C)}},createDelegate:function(G,H,E){var F=this;return function(){var A=H||arguments;if(E===true){A=Array.prototype.slice.call(arguments,0);A=A.concat(H)}else{if(typeof E=="number"){A=Array.prototype.slice.call(arguments,0);var B=[E,0].concat(H);Array.prototype.splice.apply(A,B)}}return F.apply(G||window,A)}},defer:function(I,G,J,F){var H=this.createDelegate(G,J,F);if(I){return setTimeout(H,I)}H();return 0},createSequence:function(F,D){if(typeof F!="function"){return this}var E=this;return function(){var A=E.apply(this||window,arguments);F.apply(D||this||window,arguments);return A}},createInterceptor:function(F,D){if(typeof F!="function"){return this}var E=this;return function(){F.target=this;F.method=E;if(F.apply(D||this||window,arguments)===false){return }return E.apply(this||window,arguments)}}});Ext.applyIf(String,{escape:function(B){return B.replace(/('|\\)/g,"\\$1")},leftPad:function(F,H,G){var E=new String(F);if(!G){G=" "}while(E.length<H){E=G+E}return E.toString()},format:function(D){var C=Array.prototype.slice.call(arguments,1);return D.replace(/\{(\d+)\}/g,function(B,A){return C[A]})}});String.prototype.toggle=function(D,C){return this==D?C:D};String.prototype.trim=function(){var B=/^\s+|\s+$/g;return function(){return this.replace(B,"")}}();Ext.applyIf(Number.prototype,{constrain:function(D,C){return Math.min(Math.max(this,D),C)}});Ext.applyIf(Array.prototype,{indexOf:function(E){for(var F=0,D=this.length;F<D;F++){if(this[F]==E){return F}}return -1},remove:function(D){var C=this.indexOf(D);if(C!=-1){this.splice(C,1)}return this}});Date.prototype.getElapsed=function(B){return Math.abs((B||new Date()).getTime()-this.getTime())};(function(){var H;Ext.lib.Dom={getViewWidth:function(A){return A?this.getDocumentWidth():this.getViewportWidth()},getViewHeight:function(A){return A?this.getDocumentHeight():this.getViewportHeight()},getDocumentHeight:function(){var A=(document.compatMode!="CSS1Compat")?document.body.scrollHeight:document.documentElement.scrollHeight;return Math.max(A,this.getViewportHeight())},getDocumentWidth:function(){var A=(document.compatMode!="CSS1Compat")?document.body.scrollWidth:document.documentElement.scrollWidth;return Math.max(A,this.getViewportWidth())},getViewportHeight:function(){if(Ext.isIE){return Ext.isStrict?document.documentElement.clientHeight:document.body.clientHeight}else{return self.innerHeight}},getViewportWidth:function(){if(Ext.isIE){return Ext.isStrict?document.documentElement.clientWidth:document.body.clientWidth}else{return self.innerWidth}},isAncestor:function(B,A){B=Ext.getDom(B);A=Ext.getDom(A);if(!B||!A){return false}if(B.contains&&!Ext.isSafari){return B.contains(A)}else{if(B.compareDocumentPosition){return !!(B.compareDocumentPosition(A)&16)}else{var C=A.parentNode;while(C){if(C==B){return true}else{if(!C.tagName||C.tagName.toUpperCase()=="HTML"){return false}}C=C.parentNode}return false}}},getRegion:function(A){return Ext.lib.Region.getRegion(A)},getY:function(A){return this.getXY(A)[1]},getX:function(A){return this.getXY(A)[0]},getXY:function(V){var W,R,D,C,S=(document.body||document.documentElement);V=Ext.getDom(V);if(V==S){return[0,0]}if(V.getBoundingClientRect){D=V.getBoundingClientRect();C=G(document).getScroll();return[D.left+C.left,D.top+C.top]}var B=0,Q=0;W=V;var X=G(V).getStyle("position")=="absolute";while(W){B+=W.offsetLeft;Q+=W.offsetTop;if(!X&&G(W).getStyle("position")=="absolute"){X=true}if(Ext.isGecko){R=G(W);var A=parseInt(R.getStyle("borderTopWidth"),10)||0;var U=parseInt(R.getStyle("borderLeftWidth"),10)||0;B+=U;Q+=A;if(W!=V&&R.getStyle("overflow")!="visible"){B+=U;Q+=A}}W=W.offsetParent}if(Ext.isSafari&&X){B-=S.offsetLeft;Q-=S.offsetTop}if(Ext.isGecko&&!X){var T=G(S);B+=parseInt(T.getStyle("borderLeftWidth"),10)||0;Q+=parseInt(T.getStyle("borderTopWidth"),10)||0}W=V.parentNode;while(W&&W!=S){if(!Ext.isOpera||(W.tagName!="TR"&&G(W).getStyle("display")!="inline")){B-=W.scrollLeft;Q-=W.scrollTop}W=W.parentNode}return[B,Q]},setXY:function(C,B){C=Ext.fly(C,"_setXY");C.position();var A=C.translatePoints(B);if(B[0]!==false){C.dom.style.left=A.left+"px"}if(B[1]!==false){C.dom.style.top=A.top+"px"}},setX:function(A,B){this.setXY(A,[B,false])},setY:function(B,A){this.setXY(B,[false,A])}};Ext.lib.Event=function(){var M=false;var L=[];var A=[];var C=0;var D=[];var N=0;var B=null;return{POLL_RETRYS:200,POLL_INTERVAL:20,EL:0,TYPE:1,FN:2,WFN:3,OBJ:3,ADJ_SCOPE:4,_interval:null,startInterval:function(){if(!this._interval){var I=this;var J=function(){I._tryPreloadAttach()};this._interval=setInterval(J,this.POLL_INTERVAL)}},onAvailable:function(K,I,J,P){D.push({id:K,fn:I,obj:J,override:P,checkReady:false});C=this.POLL_RETRYS;this.startInterval()},addListener:function(J,T,K){J=Ext.getDom(J);if(!J||!K){return false}if("unload"==T){A[A.length]=[J,T,K];return true}var R=function(O){return typeof Ext!="undefined"?K(Ext.lib.Event.getEvent(O)):false};var I=[J,T,K,R];var S=L.length;L[S]=I;this.doAdd(J,T,R,false);return true},removeListener:function(J,V,K){var T,W;J=Ext.getDom(J);if(!K){return this.purgeElement(J,false,V)}if("unload"==V){for(T=0,W=A.length;T<W;T++){var X=A[T];if(X&&X[0]==J&&X[1]==V&&X[2]==K){A.splice(T,1);return true}}return false}var I=null;var U=arguments[3];if("undefined"==typeof U){U=this._getCacheIndex(J,V,K)}if(U>=0){I=L[U]}if(!J||!I){return false}this.doRemove(J,V,I[this.WFN],false);delete L[U][this.WFN];delete L[U][this.FN];L.splice(U,1);return true},getTarget:function(J,K){J=J.browserEvent||J;var I=J.target||J.srcElement;return this.resolveTextNode(I)},resolveTextNode:function(I){if(Ext.isSafari&&I&&3==I.nodeType){return I.parentNode}else{return I}},getPageX:function(J){J=J.browserEvent||J;var I=J.pageX;if(!I&&0!==I){I=J.clientX||0;if(Ext.isIE){I+=this.getScroll()[1]}}return I},getPageY:function(I){I=I.browserEvent||I;var J=I.pageY;if(!J&&0!==J){J=I.clientY||0;if(Ext.isIE){J+=this.getScroll()[0]}}return J},getXY:function(I){I=I.browserEvent||I;return[this.getPageX(I),this.getPageY(I)]},getRelatedTarget:function(J){J=J.browserEvent||J;var I=J.relatedTarget;if(!I){if(J.type=="mouseout"){I=J.toElement}else{if(J.type=="mouseover"){I=J.fromElement}}}return this.resolveTextNode(I)},getTime:function(J){J=J.browserEvent||J;if(!J.time){var K=new Date().getTime();try{J.time=K}catch(I){this.lastError=I;return K}}return J.time},stopEvent:function(I){this.stopPropagation(I);this.preventDefault(I)},stopPropagation:function(I){I=I.browserEvent||I;if(I.stopPropagation){I.stopPropagation()}else{I.cancelBubble=true}},preventDefault:function(I){I=I.browserEvent||I;if(I.preventDefault){I.preventDefault()}else{I.returnValue=false}},getEvent:function(K){var I=K||window.event;if(!I){var J=this.getEvent.caller;while(J){I=J.arguments[0];if(I&&Event==I.constructor){break}J=J.caller}}return I},getCharCode:function(I){I=I.browserEvent||I;return I.charCode||I.keyCode||0},_getCacheIndex:function(J,S,K){for(var R=0,T=L.length;R<T;++R){var I=L[R];if(I&&I[this.FN]==K&&I[this.EL]==J&&I[this.TYPE]==S){return R}}return -1},elCache:{},getEl:function(I){return document.getElementById(I)},clearCache:function(){},_load:function(J){M=true;var I=Ext.lib.Event;if(Ext.isIE){I.doRemove(window,"load",I._load)}},_tryPreloadAttach:function(){if(this.locked){return false}this.locked=true;var J=!M;if(!J){J=(C>0)}var K=[];for(var V=0,I=D.length;V<I;++V){var S=D[V];if(S){var T=this.getEl(S.id);if(T){if(!S.checkReady||M||T.nextSibling||(document&&document.body)){var U=T;if(S.override){if(S.override===true){U=S.obj}else{U=S.override}}S.fn.call(U,S.obj);D[V]=null}}else{K.push(S)}}}C=(K.length===0)?0:C-1;if(J){this.startInterval()}else{clearInterval(this._interval);this._interval=null}this.locked=false;return true},purgeElement:function(S,K,U){var J=this.getListeners(S,U);if(J){for(var T=0,I=J.length;T<I;++T){var V=J[T];this.removeListener(S,V.type,V.fn)}}if(K&&S&&S.childNodes){for(T=0,I=S.childNodes.length;T<I;++T){this.purgeElement(S.childNodes[T],K,U)}}},getListeners:function(Y,K){var V=[],Z;if(!K){Z=[L,A]}else{if(K=="unload"){Z=[A]}else{Z=[L]}}for(var W=0;W<Z.length;++W){var I=Z[W];if(I&&I.length>0){for(var U=0,J=I.length;U<J;++U){var X=I[U];if(X&&X[this.EL]===Y&&(!K||K===X[this.TYPE])){V.push({type:X[this.TYPE],fn:X[this.FN],obj:X[this.OBJ],adjust:X[this.ADJ_SCOPE],index:U})}}}}return(V.length)?V:null},_unload:function(J){var K=Ext.lib.Event,U,V,X,I,W;for(U=0,I=A.length;U<I;++U){X=A[U];if(X){var T=window;if(X[K.ADJ_SCOPE]){if(X[K.ADJ_SCOPE]===true){T=X[K.OBJ]}else{T=X[K.ADJ_SCOPE]}}X[K.FN].call(T,K.getEvent(J),X[K.OBJ]);A[U]=null;X=null;T=null}}A=null;if(L&&L.length>0){V=L.length;while(V){W=V-1;X=L[W];if(X){K.removeListener(X[K.EL],X[K.TYPE],X[K.FN],W)}V=V-1}X=null;K.clearCache()}K.doRemove(window,"unload",K._unload)},getScroll:function(){var I=document.documentElement,J=document.body;if(I&&(I.scrollTop||I.scrollLeft)){return[I.scrollTop,I.scrollLeft]}else{if(J){return[J.scrollTop,J.scrollLeft]}else{return[0,0]}}},doAdd:function(){if(window.addEventListener){return function(J,P,K,I){J.addEventListener(P,K,(I))}}else{if(window.attachEvent){return function(J,P,K,I){J.attachEvent("on"+P,K)}}else{return function(){}}}}(),doRemove:function(){if(window.removeEventListener){return function(J,P,K,I){J.removeEventListener(P,K,(I))}}else{if(window.detachEvent){return function(J,I,K){J.detachEvent("on"+I,K)}}else{return function(){}}}}()}}();var F=Ext.lib.Event;F.on=F.addListener;F.un=F.removeListener;if(document&&document.body){F._load()}else{F.doAdd(window,"load",F._load)}F.doAdd(window,"unload",F._unload);F._tryPreloadAttach();Ext.lib.Ajax={request:function(A,C,N,B,M){if(M){var L=M.headers;if(L){for(var D in L){if(L.hasOwnProperty(D)){this.initHeader(D,L[D],false)}}}if(M.xmlData){this.initHeader("Content-Type","text/xml",false);A="POST";B=M.xmlData}else{if(M.jsonData){this.initHeader("Content-Type","text/javascript",false);A="POST";B=typeof M.jsonData=="object"?Ext.encode(M.jsonData):M.jsonData}}}return this.asyncRequest(A,C,N,B)},serializeForm:function(Q){if(typeof Q=="string"){Q=(document.getElementById(Q)||document.forms[Q])}var P,R,O,D,C="",A=false;for(var B=0;B<Q.elements.length;B++){P=Q.elements[B];D=Q.elements[B].disabled;R=Q.elements[B].name;O=Q.elements[B].value;if(!D&&R){switch(P.type){case"select-one":case"select-multiple":for(var N=0;N<P.options.length;N++){if(P.options[N].selected){if(Ext.isIE){C+=encodeURIComponent(R)+"="+encodeURIComponent(P.options[N].attributes.value.specified?P.options[N].value:P.options[N].text)+"&"}else{C+=encodeURIComponent(R)+"="+encodeURIComponent(P.options[N].hasAttribute("value")?P.options[N].value:P.options[N].text)+"&"}}}break;case"radio":case"checkbox":if(P.checked){C+=encodeURIComponent(R)+"="+encodeURIComponent(O)+"&"}break;case"file":case undefined:case"reset":case"button":break;case"submit":if(A==false){C+=encodeURIComponent(R)+"="+encodeURIComponent(O)+"&";A=true}break;default:C+=encodeURIComponent(R)+"="+encodeURIComponent(O)+"&";break}}}C=C.substr(0,C.length-1);return C},headers:{},hasHeaders:false,useDefaultHeader:true,defaultPostHeader:"application/x-www-form-urlencoded",useDefaultXhrHeader:true,defaultXhrHeader:"XMLHttpRequest",hasDefaultHeaders:true,defaultHeaders:{},poll:{},timeout:{},pollInterval:50,transactionId:0,setProgId:function(A){this.activeX.unshift(A)},setDefaultPostHeader:function(A){this.useDefaultHeader=A},setDefaultXhrHeader:function(A){this.useDefaultXhrHeader=A},setPollingInterval:function(A){if(typeof A=="number"&&isFinite(A)){this.pollInterval=A}},createXhrObject:function(A){var B,J;try{J=new XMLHttpRequest();B={conn:J,tId:A}}catch(C){for(var D=0;D<this.activeX.length;++D){try{J=new ActiveXObject(this.activeX[D]);B={conn:J,tId:A};break}catch(C){}}}finally{return B}},getConnectionObject:function(){var B;var A=this.transactionId;try{B=this.createXhrObject(A);if(B){this.transactionId++}}catch(C){}finally{return B}},asyncRequest:function(A,D,B,J){var C=this.getConnectionObject();if(!C){return null}else{C.conn.open(A,D,true);if(this.useDefaultXhrHeader){if(!this.defaultHeaders["X-Requested-With"]){this.initHeader("X-Requested-With",this.defaultXhrHeader,true)}}if(J&&this.useDefaultHeader){this.initHeader("Content-Type",this.defaultPostHeader)}if(this.hasDefaultHeaders||this.hasHeaders){this.setHeader(C)}this.handleReadyState(C,B);C.conn.send(J||null);return C}},handleReadyState:function(B,A){var C=this;if(A&&A.timeout){this.timeout[B.tId]=window.setTimeout(function(){C.abort(B,A,true)},A.timeout)}this.poll[B.tId]=window.setInterval(function(){if(B.conn&&B.conn.readyState==4){window.clearInterval(C.poll[B.tId]);delete C.poll[B.tId];if(A&&A.timeout){window.clearTimeout(C.timeout[B.tId]);delete C.timeout[B.tId]}C.handleTransactionResponse(B,A)}},this.pollInterval)},handleTransactionResponse:function(B,A,L){if(!A){this.releaseObject(B);return }var D,K;try{if(B.conn.status!==undefined&&B.conn.status!=0){D=B.conn.status}else{D=13030}}catch(C){D=13030}if(D>=200&&D<300){K=this.createResponseObject(B,A.argument);if(A.success){if(!A.scope){A.success(K)}else{A.success.apply(A.scope,[K])}}}else{switch(D){case 12002:case 12029:case 12030:case 12031:case 12152:case 13030:K=this.createExceptionObject(B.tId,A.argument,(L?L:false));if(A.failure){if(!A.scope){A.failure(K)}else{A.failure.apply(A.scope,[K])}}break;default:K=this.createResponseObject(B,A.argument);if(A.failure){if(!A.scope){A.failure(K)}else{A.failure.apply(A.scope,[K])}}}}this.releaseObject(B);K=null},createResponseObject:function(R,C){var O={};var A={};try{var P=R.conn.getAllResponseHeaders();var D=P.split("\n");for(var N=0;N<D.length;N++){var Q=D[N].indexOf(":");if(Q!=-1){A[D[N].substring(0,Q)]=D[N].substring(Q+2)}}}catch(B){}O.tId=R.tId;O.status=R.conn.status;O.statusText=R.conn.statusText;O.getResponseHeader=A;O.getAllResponseHeaders=P;O.responseText=R.conn.responseText;O.responseXML=R.conn.responseXML;if(typeof C!==undefined){O.argument=C}return O},createExceptionObject:function(A,M,P){var C=0;var B="communication failure";var N=-1;var O="transaction aborted";var D={};D.tId=A;if(P){D.status=N;D.statusText=O}else{D.status=C;D.statusText=B}if(M){D.argument=M}return D},initHeader:function(D,A,B){var C=(B)?this.defaultHeaders:this.headers;if(C[D]===undefined){C[D]=A}else{C[D]=A+","+C[D]}if(B){this.hasDefaultHeaders=true}else{this.hasHeaders=true}},setHeader:function(B){if(this.hasDefaultHeaders){for(var A in this.defaultHeaders){if(this.defaultHeaders.hasOwnProperty(A)){B.conn.setRequestHeader(A,this.defaultHeaders[A])}}}if(this.hasHeaders){for(var A in this.headers){if(this.headers.hasOwnProperty(A)){B.conn.setRequestHeader(A,this.headers[A])}}this.headers={};this.hasHeaders=false}},resetDefaultHeaders:function(){delete this.defaultHeaders;this.defaultHeaders={};this.hasDefaultHeaders=false},abort:function(B,A,C){if(this.isCallInProgress(B)){B.conn.abort();window.clearInterval(this.poll[B.tId]);delete this.poll[B.tId];if(C){delete this.timeout[B.tId]}this.handleTransactionResponse(B,A,true);return true}else{return false}},isCallInProgress:function(A){if(A.conn){return A.conn.readyState!=4&&A.conn.readyState!=0}else{return false}},releaseObject:function(A){A.conn=null;A=null},activeX:["MSXML2.XMLHTTP.3.0","MSXML2.XMLHTTP","Microsoft.XMLHTTP"]};Ext.lib.Region=function(B,A,D,C){this.top=B;this[1]=B;this.right=A;this.bottom=D;this.left=C;this[0]=C};Ext.lib.Region.prototype={contains:function(A){return(A.left>=this.left&&A.right<=this.right&&A.top>=this.top&&A.bottom<=this.bottom)},getArea:function(){return((this.bottom-this.top)*(this.right-this.left))},intersect:function(A){var C=Math.max(this.top,A.top);var B=Math.min(this.right,A.right);var J=Math.min(this.bottom,A.bottom);var D=Math.max(this.left,A.left);if(J>=C&&B>=D){return new Ext.lib.Region(C,B,J,D)}else{return null}},union:function(A){var C=Math.min(this.top,A.top);var B=Math.max(this.right,A.right);var J=Math.max(this.bottom,A.bottom);var D=Math.min(this.left,A.left);return new Ext.lib.Region(C,B,J,D)},constrainTo:function(A){this.top=this.top.constrain(A.top,A.bottom);this.bottom=this.bottom.constrain(A.top,A.bottom);this.left=this.left.constrain(A.left,A.right);this.right=this.right.constrain(A.left,A.right);return this},adjust:function(B,C,D,A){this.top+=B;this.left+=C;this.right+=A;this.bottom+=D;return this}};Ext.lib.Region.getRegion=function(C){var A=Ext.lib.Dom.getXY(C);var D=A[1];var B=A[0]+C.offsetWidth;var L=A[1]+C.offsetHeight;var K=A[0];return new Ext.lib.Region(D,B,L,K)};Ext.lib.Point=function(B,A){if(Ext.isArray(B)){A=B[1];B=B[0]}this.x=this.right=this.left=this[0]=B;this.y=this.top=this.bottom=this[1]=A};Ext.lib.Point.prototype=new Ext.lib.Region();Ext.lib.Anim={scroll:function(C,K,B,A,L,D){return this.run(C,K,B,A,L,D,Ext.lib.Scroll)},motion:function(C,K,B,A,L,D){return this.run(C,K,B,A,L,D,Ext.lib.Motion)},color:function(C,K,B,A,L,D){return this.run(C,K,B,A,L,D,Ext.lib.ColorAnim)},run:function(D,O,B,A,P,M,N){N=N||Ext.lib.AnimBase;if(typeof A=="string"){A=Ext.lib.Easing[A]}var C=new N(D,O,B,A);C.animateX(function(){Ext.callback(P,M)});return C}};function G(A){if(!H){H=new Ext.Element.Flyweight()}H.dom=A;return H}if(Ext.isIE){function E(){var A=Function.prototype;delete A.createSequence;delete A.defer;delete A.createDelegate;delete A.createCallback;delete A.createInterceptor;window.detachEvent("onunload",E)}window.attachEvent("onunload",E)}Ext.lib.AnimBase=function(C,D,B,A){if(C){this.init(C,D,B,A)}};Ext.lib.AnimBase.prototype={toString:function(){var B=this.getEl();var A=B.id||B.tagName;return("Anim "+A)},patterns:{noNegatives:/width|height|opacity|padding/i,offsetAttribute:/^((width|height)|(top|left))$/,defaultUnit:/width|height|top$|bottom$|left$|right$/i,offsetUnit:/\d+(em|%|en|ex|pt|in|cm|mm|pc)$/i},doMethod:function(C,A,B){return this.method(this.currentFrame,A,B-A,this.totalFrames)},setAttribute:function(C,A,B){if(this.patterns.noNegatives.test(C)){A=(A>0)?A:0}Ext.fly(this.getEl(),"_anim").setStyle(C,A+B)},getAttribute:function(L){var D=this.getEl();var B=G(D).getStyle(L);if(B!=="auto"&&!this.patterns.offsetUnit.test(B)){return parseFloat(B)}var K=this.patterns.offsetAttribute.exec(L)||[];var A=!!(K[3]);var C=!!(K[2]);if(C||(G(D).getStyle("position")=="absolute"&&A)){B=D["offset"+K[0].charAt(0).toUpperCase()+K[0].substr(1)]}else{B=0}return B},getDefaultUnit:function(A){if(this.patterns.defaultUnit.test(A)){return"px"}return""},animateX:function(A,C){var B=function(){this.onComplete.removeListener(B);if(typeof A=="function"){A.call(C||this,this)}};this.onComplete.addListener(B,this);this.animate()},setRuntimeAttribute:function(M){var A;var L;var D=this.attributes;this.runtimeAttributes[M]={};var B=function(I){return(typeof I!=="undefined")};if(!B(D[M]["to"])&&!B(D[M]["by"])){return false}A=(B(D[M]["from"]))?D[M]["from"]:this.getAttribute(M);if(B(D[M]["to"])){L=D[M]["to"]}else{if(B(D[M]["by"])){if(A.constructor==Array){L=[];for(var C=0,N=A.length;C<N;++C){L[C]=A[C]+D[M]["by"][C]}}else{L=A+D[M]["by"]}}}this.runtimeAttributes[M].start=A;this.runtimeAttributes[M].end=L;this.runtimeAttributes[M].unit=(B(D[M].unit))?D[M]["unit"]:this.getDefaultUnit(M)},init:function(R,C,D,T){var S=false;var Q=null;var O=0;R=Ext.getDom(R);this.attributes=C||{};this.duration=D||1;this.method=T||Ext.lib.Easing.easeNone;this.useSeconds=true;this.currentFrame=0;this.totalFrames=Ext.lib.AnimMgr.fps;this.getEl=function(){return R};this.isAnimated=function(){return S};this.getStartTime=function(){return Q};this.runtimeAttributes={};this.animate=function(){if(this.isAnimated()){return false}this.currentFrame=0;this.totalFrames=(this.useSeconds)?Math.ceil(Ext.lib.AnimMgr.fps*this.duration):this.duration;Ext.lib.AnimMgr.registerElement(this)};this.stop=function(I){if(I){this.currentFrame=this.totalFrames;this._onTween.fire()}Ext.lib.AnimMgr.stop(this)};var A=function(){this.onStart.fire();this.runtimeAttributes={};for(var I in this.attributes){this.setRuntimeAttribute(I)}S=true;O=0;Q=new Date()};var B=function(){var I={duration:new Date()-this.getStartTime(),currentFrame:this.currentFrame};I.toString=function(){return("duration: "+I.duration+", currentFrame: "+I.currentFrame)};this.onTween.fire(I);var J=this.runtimeAttributes;for(var K in J){this.setAttribute(K,this.doMethod(K,J[K].start,J[K].end),J[K].unit)}O+=1};var P=function(){var J=(new Date()-Q)/1000;var I={duration:J,frames:O,fps:O/J};I.toString=function(){return("duration: "+I.duration+", frames: "+I.frames+", fps: "+I.fps)};S=false;O=0;this.onComplete.fire(I)};this._onStart=new Ext.util.Event(this);this.onStart=new Ext.util.Event(this);this.onTween=new Ext.util.Event(this);this._onTween=new Ext.util.Event(this);this.onComplete=new Ext.util.Event(this);this._onComplete=new Ext.util.Event(this);this._onStart.addListener(A);this._onTween.addListener(B);this._onComplete.addListener(P)}};Ext.lib.AnimMgr=new function(){var C=null;var D=[];var J=0;this.fps=1000;this.delay=1;this.registerElement=function(I){D[D.length]=I;J+=1;I._onStart.fire();this.start()};this.unRegister=function(I,L){I._onComplete.fire();L=L||A(I);if(L!=-1){D.splice(L,1)}J-=1;if(J<=0){this.stop()}};this.start=function(){if(C===null){C=setInterval(this.run,this.delay)}};this.stop=function(I){if(!I){clearInterval(C);for(var M=0,N=D.length;M<N;++M){if(D[0].isAnimated()){this.unRegister(D[0],0)}}D=[];C=null;J=0}else{this.unRegister(I)}};this.run=function(){for(var I=0,N=D.length;I<N;++I){var M=D[I];if(!M||!M.isAnimated()){continue}if(M.currentFrame<M.totalFrames||M.totalFrames===null){M.currentFrame+=1;if(M.useSeconds){B(M)}M._onTween.fire()}else{Ext.lib.AnimMgr.stop(M,I)}}};var A=function(I){for(var M=0,N=D.length;M<N;++M){if(D[M]==I){return M}}return -1};var B=function(P){var S=P.totalFrames;var T=P.currentFrame;var I=(P.currentFrame*P.duration*1000/P.totalFrames);var Q=(new Date()-P.getStartTime());var R=0;if(Q<P.duration*1000){R=Math.round((Q/I-1)*P.currentFrame)}else{R=S-(T+1)}if(R>0&&isFinite(R)){if(P.currentFrame+R>=S){R=S-(T+1)}P.currentFrame+=R}}};Ext.lib.Bezier=new function(){this.getPosition=function(B,C){var A=B.length;var D=[];for(var K=0;K<A;++K){D[K]=[B[K][0],B[K][1]]}for(var L=1;L<A;++L){for(K=0;K<A-L;++K){D[K][0]=(1-C)*D[K][0]+C*D[parseInt(K+1,10)][0];D[K][1]=(1-C)*D[K][1]+C*D[parseInt(K+1,10)][1]}}return[D[0][0],D[0][1]]}};(function(){Ext.lib.ColorAnim=function(M,N,L,D){Ext.lib.ColorAnim.superclass.constructor.call(this,M,N,L,D)};Ext.extend(Ext.lib.ColorAnim,Ext.lib.AnimBase);var B=Ext.lib;var A=B.ColorAnim.superclass;var C=B.ColorAnim.prototype;C.toString=function(){var J=this.getEl();var D=J.id||J.tagName;return("ColorAnim "+D)};C.patterns.color=/color$/i;C.patterns.rgb=/^rgb\(([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\)$/i;C.patterns.hex=/^#?([0-9A-F]{2})([0-9A-F]{2})([0-9A-F]{2})$/i;C.patterns.hex3=/^#?([0-9A-F]{1})([0-9A-F]{1})([0-9A-F]{1})$/i;C.patterns.transparent=/^transparent|rgba\(0, 0, 0, 0\)$/;C.parseColor=function(J){if(J.length==3){return J}var D=this.patterns.hex.exec(J);if(D&&D.length==4){return[parseInt(D[1],16),parseInt(D[2],16),parseInt(D[3],16)]}D=this.patterns.rgb.exec(J);if(D&&D.length==4){return[parseInt(D[1],10),parseInt(D[2],10),parseInt(D[3],10)]}D=this.patterns.hex3.exec(J);if(D&&D.length==4){return[parseInt(D[1]+D[1],16),parseInt(D[2]+D[2],16),parseInt(D[3]+D[3],16)]}return null};C.getAttribute=function(N){var L=this.getEl();if(this.patterns.color.test(N)){var D=G(L).getStyle(N);if(this.patterns.transparent.test(D)){var M=L.parentNode;D=G(M).getStyle(N);while(M&&this.patterns.transparent.test(D)){M=M.parentNode;D=G(M).getStyle(N);if(M.tagName.toUpperCase()=="HTML"){D="#fff"}}}}else{D=A.getAttribute.call(this,N)}return D};C.doMethod=function(P,R,O){var D;if(this.patterns.color.test(P)){D=[];for(var N=0,Q=R.length;N<Q;++N){D[N]=A.doMethod.call(this,P,R[N],O[N])}D="rgb("+Math.floor(D[0])+","+Math.floor(D[1])+","+Math.floor(D[2])+")"}else{D=A.doMethod.call(this,P,R,O)}return D};C.setRuntimeAttribute=function(P){A.setRuntimeAttribute.call(this,P);if(this.patterns.color.test(P)){var N=this.attributes;var R=this.parseColor(this.runtimeAttributes[P].start);var O=this.parseColor(this.runtimeAttributes[P].end);if(typeof N[P]["to"]==="undefined"&&typeof N[P]["by"]!=="undefined"){O=this.parseColor(N[P].by);for(var D=0,Q=R.length;D<Q;++D){O[D]=R[D]+O[D]}}this.runtimeAttributes[P].start=R;this.runtimeAttributes[P].end=O}}})();Ext.lib.Easing={easeNone:function(C,D,A,B){return A*C/B+D},easeIn:function(C,D,A,B){return A*(C/=B)*C+D},easeOut:function(C,D,A,B){return -A*(C/=B)*(C-2)+D},easeBoth:function(C,D,A,B){if((C/=B/2)<1){return A/2*C*C+D}return -A/2*((--C)*(C-2)-1)+D},easeInStrong:function(C,D,A,B){return A*(C/=B)*C*C*C+D},easeOutStrong:function(C,D,A,B){return -A*((C=C/B-1)*C*C*C-1)+D},easeBothStrong:function(C,D,A,B){if((C/=B/2)<1){return A/2*C*C*C*C+D}return -A/2*((C-=2)*C*C*C-2)+D},elasticIn:function(L,N,A,B,M,C){if(L==0){return N}if((L/=B)==1){return N+A}if(!C){C=B*0.3}if(!M||M<Math.abs(A)){M=A;var D=C/4}else{var D=C/(2*Math.PI)*Math.asin(A/M)}return -(M*Math.pow(2,10*(L-=1))*Math.sin((L*B-D)*(2*Math.PI)/C))+N},elasticOut:function(L,N,A,B,M,C){if(L==0){return N}if((L/=B)==1){return N+A}if(!C){C=B*0.3}if(!M||M<Math.abs(A)){M=A;var D=C/4}else{var D=C/(2*Math.PI)*Math.asin(A/M)}return M*Math.pow(2,-10*L)*Math.sin((L*B-D)*(2*Math.PI)/C)+A+N},elasticBoth:function(L,N,A,B,M,C){if(L==0){return N}if((L/=B/2)==2){return N+A}if(!C){C=B*(0.3*1.5)}if(!M||M<Math.abs(A)){M=A;var D=C/4}else{var D=C/(2*Math.PI)*Math.asin(A/M)}if(L<1){return -0.5*(M*Math.pow(2,10*(L-=1))*Math.sin((L*B-D)*(2*Math.PI)/C))+N}return M*Math.pow(2,-10*(L-=1))*Math.sin((L*B-D)*(2*Math.PI)/C)*0.5+A+N},backIn:function(D,J,A,B,C){if(typeof C=="undefined"){C=1.70158}return A*(D/=B)*D*((C+1)*D-C)+J},backOut:function(D,J,A,B,C){if(typeof C=="undefined"){C=1.70158}return A*((D=D/B-1)*D*((C+1)*D+C)+1)+J},backBoth:function(D,J,A,B,C){if(typeof C=="undefined"){C=1.70158}if((D/=B/2)<1){return A/2*(D*D*(((C*=(1.525))+1)*D-C))+J}return A/2*((D-=2)*D*(((C*=(1.525))+1)*D+C)+2)+J},bounceIn:function(C,D,A,B){return A-Ext.lib.Easing.bounceOut(B-C,0,A,B)+D},bounceOut:function(C,D,A,B){if((C/=B)<(1/2.75)){return A*(7.5625*C*C)+D}else{if(C<(2/2.75)){return A*(7.5625*(C-=(1.5/2.75))*C+0.75)+D}else{if(C<(2.5/2.75)){return A*(7.5625*(C-=(2.25/2.75))*C+0.9375)+D}}}return A*(7.5625*(C-=(2.625/2.75))*C+0.984375)+D},bounceBoth:function(C,D,A,B){if(C<B/2){return Ext.lib.Easing.bounceIn(C*2,0,A,B)*0.5+D}return Ext.lib.Easing.bounceOut(C*2-B,0,A,B)*0.5+A*0.5+D}};(function(){Ext.lib.Motion=function(N,O,I,P){if(N){Ext.lib.Motion.superclass.constructor.call(this,N,O,I,P)}};Ext.extend(Ext.lib.Motion,Ext.lib.ColorAnim);var B=Ext.lib;var A=B.Motion.superclass;var D=B.Motion.prototype;D.toString=function(){var L=this.getEl();var I=L.id||L.tagName;return("Motion "+I)};D.patterns.points=/^points$/i;D.setAttribute=function(N,I,M){if(this.patterns.points.test(N)){M=M||"px";A.setAttribute.call(this,"left",I[0],M);A.setAttribute.call(this,"top",I[1],M)}else{A.setAttribute.call(this,N,I,M)}};D.getAttribute=function(L){if(this.patterns.points.test(L)){var I=[A.getAttribute.call(this,"left"),A.getAttribute.call(this,"top")]}else{I=A.getAttribute.call(this,L)}return I};D.doMethod=function(P,Q,O){var R=null;if(this.patterns.points.test(P)){var I=this.method(this.currentFrame,0,100,this.totalFrames)/100;R=B.Bezier.getPosition(this.runtimeAttributes[P],I)}else{R=A.doMethod.call(this,P,Q,O)}return R};D.setRuntimeAttribute=function(I){if(this.patterns.points.test(I)){var a=this.getEl();var Y=this.attributes;var b;var W=Y.points["control"]||[];var Z;var V,T;if(W.length>0&&!Ext.isArray(W[0])){W=[W]}else{var X=[];for(V=0,T=W.length;V<T;++V){X[V]=W[V]}W=X}Ext.fly(a).position();if(C(Y.points["from"])){Ext.lib.Dom.setXY(a,Y.points["from"])}else{Ext.lib.Dom.setXY(a,Ext.lib.Dom.getXY(a))}b=this.getAttribute("points");if(C(Y.points["to"])){Z=J.call(this,Y.points["to"],b);var U=Ext.lib.Dom.getXY(this.getEl());for(V=0,T=W.length;V<T;++V){W[V]=J.call(this,W[V],b)}}else{if(C(Y.points["by"])){Z=[b[0]+Y.points["by"][0],b[1]+Y.points["by"][1]];for(V=0,T=W.length;V<T;++V){W[V]=[b[0]+W[V][0],b[1]+W[V][1]]}}}this.runtimeAttributes[I]=[b];if(W.length>0){this.runtimeAttributes[I]=this.runtimeAttributes[I].concat(W)}this.runtimeAttributes[I][this.runtimeAttributes[I].length]=Z}else{A.setRuntimeAttribute.call(this,I)}};var J=function(N,I){var M=Ext.lib.Dom.getXY(this.getEl());N=[N[0]-M[0]+I[0],N[1]-M[1]+I[1]];return N};var C=function(I){return(typeof I!=="undefined")}})();(function(){Ext.lib.Scroll=function(M,N,L,D){if(M){Ext.lib.Scroll.superclass.constructor.call(this,M,N,L,D)}};Ext.extend(Ext.lib.Scroll,Ext.lib.ColorAnim);var B=Ext.lib;var A=B.Scroll.superclass;var C=B.Scroll.prototype;C.toString=function(){var J=this.getEl();var D=J.id||J.tagName;return("Scroll "+D)};C.doMethod=function(N,D,M){var L=null;if(N=="scroll"){L=[this.method(this.currentFrame,D[0],M[0]-D[0],this.totalFrames),this.method(this.currentFrame,D[1],M[1]-D[1],this.totalFrames)]}else{L=A.doMethod.call(this,N,D,M)}return L};C.getAttribute=function(L){var D=null;var K=this.getEl();if(L=="scroll"){D=[K.scrollLeft,K.scrollTop]}else{D=A.getAttribute.call(this,L)}return D};C.setAttribute=function(N,D,L){var M=this.getEl();if(N=="scroll"){M.scrollLeft=D[0];M.scrollTop=D[1]}else{A.setAttribute.call(this,N,D,L)}}})()})();Ext.DomHelper=function(){var S=null;var Y=/^(?:br|frame|hr|img|input|link|meta|range|spacer|wbr|area|param|col)$/i;var P=/^table|tbody|tr|td$/i;var Q=function(B){if(typeof B=="string"){return B}var G="";if(Ext.isArray(B)){for(var D=0,F=B.length;D<F;D++){G+=Q(B[D])}return G}if(!B.tag){B.tag="div"}G+="<"+B.tag;for(var H in B){if(H=="tag"||H=="children"||H=="cn"||H=="html"||typeof B[H]=="function"){continue}if(H=="style"){var C=B.style;if(typeof C=="function"){C=C.call()}if(typeof C=="string"){G+=' style="'+C+'"'}else{if(typeof C=="object"){G+=' style="';for(var E in C){if(typeof C[E]!="function"){G+=E+":"+C[E]+";"}}G+='"'}}}else{if(H=="cls"){G+=' class="'+B.cls+'"'}else{if(H=="htmlFor"){G+=' for="'+B.htmlFor+'"'}else{G+=" "+H+'="'+B[H]+'"'}}}}if(Y.test(B.tag)){G+="/>"}else{G+=">";var A=B.children||B.cn;if(A){G+=Q(A)}else{if(B.html){G+=B.html}}G+="</"+B.tag+">"}return G};var R=function(B,G){var C;if(Ext.isArray(B)){C=document.createDocumentFragment();for(var D=0,F=B.length;D<F;D++){R(B[D],C)}}else{if(typeof B=="string)"){C=document.createTextNode(B)}else{C=document.createElement(B.tag||"div");var E=!!C.setAttribute;for(var H in B){if(H=="tag"||H=="children"||H=="cn"||H=="html"||H=="style"||typeof B[H]=="function"){continue}if(H=="cls"){C.className=B.cls}else{if(E){C.setAttribute(H,B[H])}else{C[H]=B[H]}}}Ext.DomHelper.applyStyles(C,B.style);var A=B.children||B.cn;if(A){R(A,C)}else{if(B.html){C.innerHTML=B.html}}}}if(G){G.appendChild(C)}return C};var V=function(A,C,D,B){S.innerHTML=[C,D,B].join("");var F=-1,E=S;while(++F<A){E=E.firstChild}return E};var U="<table>",Z="</table>",O=U+"<tbody>",T="</tbody>"+Z,W=O+"<tr>",N="</tr>"+T;var X=function(F,E,C,D){if(!S){S=document.createElement("div")}var B;var A=null;if(F=="td"){if(E=="afterbegin"||E=="beforeend"){return }if(E=="beforebegin"){A=C;C=C.parentNode}else{A=C.nextSibling;C=C.parentNode}B=V(4,W,D,N)}else{if(F=="tr"){if(E=="beforebegin"){A=C;C=C.parentNode;B=V(3,O,D,T)}else{if(E=="afterend"){A=C.nextSibling;C=C.parentNode;B=V(3,O,D,T)}else{if(E=="afterbegin"){A=C.firstChild}B=V(4,W,D,N)}}}else{if(F=="tbody"){if(E=="beforebegin"){A=C;C=C.parentNode;B=V(2,U,D,Z)}else{if(E=="afterend"){A=C.nextSibling;C=C.parentNode;B=V(2,U,D,Z)}else{if(E=="afterbegin"){A=C.firstChild}B=V(3,O,D,T)}}}else{if(E=="beforebegin"||E=="afterend"){return }if(E=="afterbegin"){A=C.firstChild}B=V(2,U,D,Z)}}}C.insertBefore(B,A);return B};return{useDom:false,markup:function(A){return Q(A)},applyStyles:function(C,B){if(B){C=Ext.fly(C);if(typeof B=="string"){var D=/\s?([a-z\-]*)\:\s?([^;]*);?/gi;var A;while((A=D.exec(B))!=null){C.setStyle(A[1],A[2])}}else{if(typeof B=="object"){for(var E in B){C.setStyle(E,B[E])}}else{if(typeof B=="function"){Ext.DomHelper.applyStyles(C,B.call())}}}}},insertHtml:function(D,B,C){D=D.toLowerCase();if(B.insertAdjacentHTML){if(P.test(B.tagName)){var E;if(E=X(B.tagName.toLowerCase(),D,B,C)){return E}}switch(D){case"beforebegin":B.insertAdjacentHTML("BeforeBegin",C);return B.previousSibling;case"afterbegin":B.insertAdjacentHTML("AfterBegin",C);return B.firstChild;case"beforeend":B.insertAdjacentHTML("BeforeEnd",C);return B.lastChild;case"afterend":B.insertAdjacentHTML("AfterEnd",C);return B.nextSibling}throw'Illegal insertion point -> "'+D+'"'}var F=B.ownerDocument.createRange();var A;switch(D){case"beforebegin":F.setStartBefore(B);A=F.createContextualFragment(C);B.parentNode.insertBefore(A,B);return B.previousSibling;case"afterbegin":if(B.firstChild){F.setStartBefore(B.firstChild);A=F.createContextualFragment(C);B.insertBefore(A,B.firstChild);return B.firstChild}else{B.innerHTML=C;return B.firstChild}case"beforeend":if(B.lastChild){F.setStartAfter(B.lastChild);A=F.createContextualFragment(C);B.appendChild(A);return B.lastChild}else{B.innerHTML=C;return B.lastChild}case"afterend":F.setStartAfter(B);A=F.createContextualFragment(C);B.parentNode.insertBefore(A,B.nextSibling);return B.nextSibling}throw'Illegal insertion point -> "'+D+'"'},insertBefore:function(C,A,B){return this.doInsert(C,A,B,"beforeBegin")},insertAfter:function(C,A,B){return this.doInsert(C,A,B,"afterEnd","nextSibling")},insertFirst:function(C,A,B){return this.doInsert(C,A,B,"afterBegin","firstChild")},doInsert:function(D,B,C,A,E){D=Ext.getDom(D);var F;if(this.useDom){F=R(B,null);(E==="firstChild"?D:D.parentNode).insertBefore(F,E?D[E]:D)}else{var G=Q(B);F=this.insertHtml(A,D,G)}return C?Ext.get(F,true):F},append:function(C,A,B){C=Ext.getDom(C);var D;if(this.useDom){D=R(A,null);C.appendChild(D)}else{var E=Q(A);D=this.insertHtml("beforeEnd",C,E)}return B?Ext.get(D,true):D},overwrite:function(C,A,B){C=Ext.getDom(C);C.innerHTML=Q(A);return B?Ext.get(C.firstChild,true):C.firstChild},createTemplate:function(A){var B=Q(A);return new Ext.Template(B)}}}();Ext.Template=function(G){var J=arguments;if(Ext.isArray(G)){G=G.join("")}else{if(J.length>1){var I=[];for(var H=0,F=J.length;H<F;H++){if(typeof J[H]=="object"){Ext.apply(this,J[H])}else{I[I.length]=J[H]}}G=I.join("")}}this.html=G;if(this.compiled){this.compile()}};Ext.Template.prototype={applyTemplate:function(J){if(this.compiled){return this.compiled(J)}var F=this.disableFormats!==true;var G=Ext.util.Format,I=this;var H=function(M,D,A,E){if(A&&F){if(A.substr(0,5)=="this."){return I.call(A.substr(5),J[D],J)}else{if(E){var B=/^\s*['"](.*)["']\s*$/;E=E.split(",");for(var C=0,N=E.length;C<N;C++){E[C]=E[C].replace(B,"$1")}E=[J[D]].concat(E)}else{E=[J[D]]}return G[A].apply(G,E)}}else{return J[D]!==undefined?J[D]:""}};return this.html.replace(this.re,H)},set:function(C,D){this.html=C;this.compiled=null;if(D){this.compile()}return this},disableFormats:false,re:/\{([\w-]+)(?:\:([\w\.]*)(?:\((.*?)?\))?)?\}/g,compile:function(){var fm=Ext.util.Format;var useF=this.disableFormats!==true;var sep=Ext.isGecko?"+":",";var fn=function(m,name,format,args){if(format&&useF){args=args?","+args:"";if(format.substr(0,5)!="this."){format="fm."+format+"("}else{format='this.call("'+format.substr(5)+'", ';args=", values"}}else{args="";format="(values['"+name+"'] == undefined ? '' : "}return"'"+sep+format+"values['"+name+"']"+args+")"+sep+"'"};var body;if(Ext.isGecko){body="this.compiled = function(values){ return '"+this.html.replace(/\\/g,"\\\\").replace(/(\r\n|\n)/g,"\\n").replace(/'/g,"\\'").replace(this.re,fn)+"';};"}else{body=["this.compiled = function(values){ return ['"];body.push(this.html.replace(/\\/g,"\\\\").replace(/(\r\n|\n)/g,"\\n").replace(/'/g,"\\'").replace(this.re,fn));body.push("'].join('');};");body=body.join("")}eval(body);return this},call:function(E,F,D){return this[E](F,D)},insertFirst:function(F,D,E){return this.doInsert("afterBegin",F,D,E)},insertBefore:function(F,D,E){return this.doInsert("beforeBegin",F,D,E)},insertAfter:function(F,D,E){return this.doInsert("afterEnd",F,D,E)},append:function(F,D,E){return this.doInsert("beforeEnd",F,D,E)},doInsert:function(I,G,J,F){G=Ext.getDom(G);var H=Ext.DomHelper.insertHtml(I,G,this.applyTemplate(J));return F?Ext.get(H,true):H},overwrite:function(F,D,E){F=Ext.getDom(F);F.innerHTML=this.applyTemplate(D);return E?Ext.get(F.firstChild,true):F.firstChild}};Ext.Template.prototype.apply=Ext.Template.prototype.applyTemplate;Ext.DomHelper.Template=Ext.Template;Ext.Template.from=function(D,C){D=Ext.getDom(D);return new Ext.Template(D.value||D.innerHTML,C||"")};Ext.DomQuery=function(){var cache={},simpleCache={},valueCache={};var nonSpace=/\S/;var trimRe=/^\s+|\s+$/g;var tplRe=/\{(\d+)\}/g;var modeRe=/^(\s?[\/>+~]\s?|\s|$)/;var tagTokenRe=/^(#)?([\w-\*]+)/;var nthRe=/(\d*)n\+?(\d*)/,nthRe2=/\D/;function child(p,index){var i=0;var n=p.firstChild;while(n){if(n.nodeType==1){if(++i==index){return n}}n=n.nextSibling}return null}function next(n){while((n=n.nextSibling)&&n.nodeType!=1){}return n}function prev(n){while((n=n.previousSibling)&&n.nodeType!=1){}return n}function children(d){var n=d.firstChild,ni=-1;while(n){var nx=n.nextSibling;if(n.nodeType==3&&!nonSpace.test(n.nodeValue)){d.removeChild(n)}else{n.nodeIndex=++ni}n=nx}return this}function byClassName(c,a,v){if(!v){return c}var r=[],ri=-1,cn;for(var i=0,ci;ci=c[i];i++){if((" "+ci.className+" ").indexOf(v)!=-1){r[++ri]=ci}}return r}function attrValue(n,attr){if(!n.tagName&&typeof n.length!="undefined"){n=n[0]}if(!n){return null}if(attr=="for"){return n.htmlFor}if(attr=="class"||attr=="className"){return n.className}return n.getAttribute(attr)||n[attr]}function getNodes(ns,mode,tagName){var result=[],ri=-1,cs;if(!ns){return result}tagName=tagName||"*";if(typeof ns.getElementsByTagName!="undefined"){ns=[ns]}if(!mode){for(var i=0,ni;ni=ns[i];i++){cs=ni.getElementsByTagName(tagName);for(var j=0,ci;ci=cs[j];j++){result[++ri]=ci}}}else{if(mode=="/"||mode==">"){var utag=tagName.toUpperCase();for(var i=0,ni,cn;ni=ns[i];i++){cn=ni.children||ni.childNodes;for(var j=0,cj;cj=cn[j];j++){if(cj.nodeName==utag||cj.nodeName==tagName||tagName=="*"){result[++ri]=cj}}}}else{if(mode=="+"){var utag=tagName.toUpperCase();for(var i=0,n;n=ns[i];i++){while((n=n.nextSibling)&&n.nodeType!=1){}if(n&&(n.nodeName==utag||n.nodeName==tagName||tagName=="*")){result[++ri]=n}}}else{if(mode=="~"){for(var i=0,n;n=ns[i];i++){while((n=n.nextSibling)&&(n.nodeType!=1||(tagName=="*"||n.tagName.toLowerCase()!=tagName))){}if(n){result[++ri]=n}}}}}}return result}function concat(a,b){if(b.slice){return a.concat(b)}for(var i=0,l=b.length;i<l;i++){a[a.length]=b[i]}return a}function byTag(cs,tagName){if(cs.tagName||cs==document){cs=[cs]}if(!tagName){return cs}var r=[],ri=-1;tagName=tagName.toLowerCase();for(var i=0,ci;ci=cs[i];i++){if(ci.nodeType==1&&ci.tagName.toLowerCase()==tagName){r[++ri]=ci}}return r}function byId(cs,attr,id){if(cs.tagName||cs==document){cs=[cs]}if(!id){return cs}var r=[],ri=-1;for(var i=0,ci;ci=cs[i];i++){if(ci&&ci.id==id){r[++ri]=ci;return r}}return r}function byAttribute(cs,attr,value,op,custom){var r=[],ri=-1,st=custom=="{";var f=Ext.DomQuery.operators[op];for(var i=0,ci;ci=cs[i];i++){var a;if(st){a=Ext.DomQuery.getStyle(ci,attr)}else{if(attr=="class"||attr=="className"){a=ci.className}else{if(attr=="for"){a=ci.htmlFor}else{if(attr=="href"){a=ci.getAttribute("href",2)}else{a=ci.getAttribute(attr)}}}}if((f&&f(a,value))||(!f&&a)){r[++ri]=ci}}return r}function byPseudo(cs,name,value){return Ext.DomQuery.pseudos[name](cs,value)}var isIE=window.ActiveXObject?true:false;eval("var batch = 30803;");var key=30803;function nodupIEXml(cs){var d=++key;cs[0].setAttribute("_nodup",d);var r=[cs[0]];for(var i=1,len=cs.length;i<len;i++){var c=cs[i];if(!c.getAttribute("_nodup")!=d){c.setAttribute("_nodup",d);r[r.length]=c}}for(var i=0,len=cs.length;i<len;i++){cs[i].removeAttribute("_nodup")}return r}function nodup(cs){if(!cs){return[]}var len=cs.length,c,i,r=cs,cj,ri=-1;if(!len||typeof cs.nodeType!="undefined"||len==1){return cs}if(isIE&&typeof cs[0].selectSingleNode!="undefined"){return nodupIEXml(cs)}var d=++key;cs[0]._nodup=d;for(i=1;c=cs[i];i++){if(c._nodup!=d){c._nodup=d}else{r=[];for(var j=0;j<i;j++){r[++ri]=cs[j]}for(j=i+1;cj=cs[j];j++){if(cj._nodup!=d){cj._nodup=d;r[++ri]=cj}}return r}}return r}function quickDiffIEXml(c1,c2){var d=++key;for(var i=0,len=c1.length;i<len;i++){c1[i].setAttribute("_qdiff",d)}var r=[];for(var i=0,len=c2.length;i<len;i++){if(c2[i].getAttribute("_qdiff")!=d){r[r.length]=c2[i]}}for(var i=0,len=c1.length;i<len;i++){c1[i].removeAttribute("_qdiff")}return r}function quickDiff(c1,c2){var len1=c1.length;if(!len1){return c2}if(isIE&&c1[0].selectSingleNode){return quickDiffIEXml(c1,c2)}var d=++key;for(var i=0;i<len1;i++){c1[i]._qdiff=d}var r=[];for(var i=0,len=c2.length;i<len;i++){if(c2[i]._qdiff!=d){r[r.length]=c2[i]}}return r}function quickId(ns,mode,root,id){if(ns==root){var d=root.ownerDocument||root;return d.getElementById(id)}ns=getNodes(ns,mode,"*");return byId(ns,null,id)}return{getStyle:function(el,name){return Ext.fly(el).getStyle(name)},compile:function(path,type){type=type||"select";var fn=["var f = function(root){\n var mode; ++batch; var n = root || document;\n"];var q=path,mode,lq;var tk=Ext.DomQuery.matchers;var tklen=tk.length;var mm;var lmode=q.match(modeRe);if(lmode&&lmode[1]){fn[fn.length]='mode="'+lmode[1].replace(trimRe,"")+'";';q=q.replace(lmode[1],"")}while(path.substr(0,1)=="/"){path=path.substr(1)}while(q&&lq!=q){lq=q;var tm=q.match(tagTokenRe);if(type=="select"){if(tm){if(tm[1]=="#"){fn[fn.length]='n = quickId(n, mode, root, "'+tm[2]+'");'}else{fn[fn.length]='n = getNodes(n, mode, "'+tm[2]+'");'}q=q.replace(tm[0],"")}else{if(q.substr(0,1)!="@"){fn[fn.length]='n = getNodes(n, mode, "*");'}}}else{if(tm){if(tm[1]=="#"){fn[fn.length]='n = byId(n, null, "'+tm[2]+'");'}else{fn[fn.length]='n = byTag(n, "'+tm[2]+'");'}q=q.replace(tm[0],"")}}while(!(mm=q.match(modeRe))){var matched=false;for(var j=0;j<tklen;j++){var t=tk[j];var m=q.match(t.re);if(m){fn[fn.length]=t.select.replace(tplRe,function(x,i){return m[i]});q=q.replace(m[0],"");matched=true;break}}if(!matched){throw'Error parsing selector, parsing failed at "'+q+'"'}}if(mm[1]){fn[fn.length]='mode="'+mm[1].replace(trimRe,"")+'";';q=q.replace(mm[1],"")}}fn[fn.length]="return nodup(n);\n}";eval(fn.join(""));return f},select:function(path,root,type){if(!root||root==document){root=document}if(typeof root=="string"){root=document.getElementById(root)}var paths=path.split(",");var results=[];for(var i=0,len=paths.length;i<len;i++){var p=paths[i].replace(trimRe,"");if(!cache[p]){cache[p]=Ext.DomQuery.compile(p);if(!cache[p]){throw p+" is not a valid selector"}}var result=cache[p](root);if(result&&result!=document){results=results.concat(result)}}if(paths.length>1){return nodup(results)}return results},selectNode:function(path,root){return Ext.DomQuery.select(path,root)[0]},selectValue:function(path,root,defaultValue){path=path.replace(trimRe,"");if(!valueCache[path]){valueCache[path]=Ext.DomQuery.compile(path,"select")}var n=valueCache[path](root);n=n[0]?n[0]:n;var v=(n&&n.firstChild?n.firstChild.nodeValue:null);return((v===null||v===undefined||v==="")?defaultValue:v)},selectNumber:function(path,root,defaultValue){var v=Ext.DomQuery.selectValue(path,root,defaultValue||0);return parseFloat(v)},is:function(el,ss){if(typeof el=="string"){el=document.getElementById(el)}var isArray=Ext.isArray(el);var result=Ext.DomQuery.filter(isArray?el:[el],ss);return isArray?(result.length==el.length):(result.length>0)},filter:function(els,ss,nonMatches){ss=ss.replace(trimRe,"");if(!simpleCache[ss]){simpleCache[ss]=Ext.DomQuery.compile(ss,"simple")}var result=simpleCache[ss](els);return nonMatches?quickDiff(result,els):result},matchers:[{re:/^\.([\w-]+)/,select:'n = byClassName(n, null, " {1} ");'},{re:/^\:([\w-]+)(?:\(((?:[^\s>\/]*|.*?))\))?/,select:'n = byPseudo(n, "{1}", "{2}");'},{re:/^(?:([\[\{])(?:@)?([\w-]+)\s?(?:(=|.=)\s?['"]?(.*?)["']?)?[\]\}])/,select:'n = byAttribute(n, "{2}", "{4}", "{3}", "{1}");'},{re:/^#([\w-]+)/,select:'n = byId(n, null, "{1}");'},{re:/^@([\w-]+)/,select:'return {firstChild:{nodeValue:attrValue(n, "{1}")}};'}],operators:{"=":function(a,v){return a==v},"!=":function(a,v){return a!=v},"^=":function(a,v){return a&&a.substr(0,v.length)==v},"$=":function(a,v){return a&&a.substr(a.length-v.length)==v},"*=":function(a,v){return a&&a.indexOf(v)!==-1},"%=":function(a,v){return(a%v)==0},"|=":function(a,v){return a&&(a==v||a.substr(0,v.length+1)==v+"-")},"~=":function(a,v){return a&&(" "+a+" ").indexOf(" "+v+" ")!=-1}},pseudos:{"first-child":function(c){var r=[],ri=-1,n;for(var i=0,ci;ci=n=c[i];i++){while((n=n.previousSibling)&&n.nodeType!=1){}if(!n){r[++ri]=ci}}return r},"last-child":function(c){var r=[],ri=-1,n;for(var i=0,ci;ci=n=c[i];i++){while((n=n.nextSibling)&&n.nodeType!=1){}if(!n){r[++ri]=ci}}return r},"nth-child":function(c,a){var r=[],ri=-1;var m=nthRe.exec(a=="even"&&"2n"||a=="odd"&&"2n+1"||!nthRe2.test(a)&&"n+"+a||a);var f=(m[1]||1)-0,l=m[2]-0;for(var i=0,n;n=c[i];i++){var pn=n.parentNode;if(batch!=pn._batch){var j=0;for(var cn=pn.firstChild;cn;cn=cn.nextSibling){if(cn.nodeType==1){cn.nodeIndex=++j}}pn._batch=batch}if(f==1){if(l==0||n.nodeIndex==l){r[++ri]=n}}else{if((n.nodeIndex+l)%f==0){r[++ri]=n}}}return r},"only-child":function(c){var r=[],ri=-1;for(var i=0,ci;ci=c[i];i++){if(!prev(ci)&&!next(ci)){r[++ri]=ci}}return r},empty:function(c){var r=[],ri=-1;for(var i=0,ci;ci=c[i];i++){var cns=ci.childNodes,j=0,cn,empty=true;while(cn=cns[j]){++j;if(cn.nodeType==1||cn.nodeType==3){empty=false;break}}if(empty){r[++ri]=ci}}return r},contains:function(c,v){var r=[],ri=-1;for(var i=0,ci;ci=c[i];i++){if((ci.textContent||ci.innerText||"").indexOf(v)!=-1){r[++ri]=ci}}return r},nodeValue:function(c,v){var r=[],ri=-1;for(var i=0,ci;ci=c[i];i++){if(ci.firstChild&&ci.firstChild.nodeValue==v){r[++ri]=ci}}return r},checked:function(c){var r=[],ri=-1;for(var i=0,ci;ci=c[i];i++){if(ci.checked==true){r[++ri]=ci}}return r},not:function(c,ss){return Ext.DomQuery.filter(c,ss,true)},any:function(c,selectors){var ss=selectors.split("|");var r=[],ri=-1,s;for(var i=0,ci;ci=c[i];i++){for(var j=0;s=ss[j];j++){if(Ext.DomQuery.is(ci,s)){r[++ri]=ci;break}}}return r},odd:function(c){return this["nth-child"](c,"odd")},even:function(c){return this["nth-child"](c,"even")},nth:function(c,a){return c[a-1]||[]},first:function(c){return c[0]||[]},last:function(c){return c[c.length-1]||[]},has:function(c,ss){var s=Ext.DomQuery.select;var r=[],ri=-1;for(var i=0,ci;ci=c[i];i++){if(s(ss,ci).length>0){r[++ri]=ci}}return r},next:function(c,ss){var is=Ext.DomQuery.is;var r=[],ri=-1;for(var i=0,ci;ci=c[i];i++){var n=next(ci);if(n&&is(n,ss)){r[++ri]=ci}}return r},prev:function(c,ss){var is=Ext.DomQuery.is;var r=[],ri=-1;for(var i=0,ci;ci=c[i];i++){var n=prev(ci);if(n&&is(n,ss)){r[++ri]=ci}}return r}}}}();Ext.query=Ext.DomQuery.select;Ext.util.Observable=function(){if(this.listeners){this.on(this.listeners);delete this.listeners}};Ext.util.Observable.prototype={fireEvent:function(){if(this.eventsSuspended!==true){var B=this.events[arguments[0].toLowerCase()];if(typeof B=="object"){return B.fire.apply(B,Array.prototype.slice.call(arguments,1))}}return true},filterOptRe:/^(?:scope|delay|buffer|single)$/,addListener:function(G,K,L,H){if(typeof G=="object"){H=G;for(var I in H){if(this.filterOptRe.test(I)){continue}if(typeof H[I]=="function"){this.addListener(I,H[I],H.scope,H)}else{this.addListener(I,H[I].fn,H[I].scope,H[I])}}return }H=(!H||typeof H=="boolean")?{}:H;G=G.toLowerCase();var J=this.events[G]||true;if(typeof J=="boolean"){J=new Ext.util.Event(this,G);this.events[G]=J}J.addListener(K,L,H)},removeListener:function(E,G,H){var F=this.events[E.toLowerCase()];if(typeof F=="object"){F.removeListener(G,H)}},purgeListeners:function(){for(var B in this.events){if(typeof this.events[B]=="object"){this.events[B].clearListeners()}}},relayEvents:function(H,J){var I=function(A){return function(){return this.fireEvent.apply(this,Ext.combine(A,Array.prototype.slice.call(arguments,0)))}};for(var K=0,G=J.length;K<G;K++){var L=J[K];if(!this.events[L]){this.events[L]=true}H.on(L,I(L),this)}},addEvents:function(F){if(!this.events){this.events={}}if(typeof F=="string"){for(var G=0,E=arguments,H;H=E[G];G++){if(!this.events[E[G]]){F[E[G]]=true}}}else{Ext.applyIf(this.events,F)}},hasListener:function(C){var D=this.events[C];return typeof D=="object"&&D.listeners.length>0},suspendEvents:function(){this.eventsSuspended=true},resumeEvents:function(){this.eventsSuspended=false},getMethodEvent:function(I){if(!this.methodEvents){this.methodEvents={}}var J=this.methodEvents[I];if(!J){J={};this.methodEvents[I]=J;J.originalFn=this[I];J.methodName=I;J.before=[];J.after=[];var M,N,L;var K=this;var H=function(A,B,C){if((N=A.apply(B||K,C))!==undefined){if(typeof N==="object"){if(N.returnValue!==undefined){M=N.returnValue}else{M=N}if(N.cancel===true){L=true}}else{if(N===false){L=true}else{M=N}}}};this[I]=function(){M=N=undefined;L=false;var B=Array.prototype.slice.call(arguments,0);for(var A=0,C=J.before.length;A<C;A++){H(J.before[A].fn,J.before[A].scope,B);if(L){return M}}if((N=J.originalFn.apply(K,B))!==undefined){M=N}for(var A=0,C=J.after.length;A<C;A++){H(J.after[A].fn,J.after[A].scope,B);if(L){return M}}return M}}return J},beforeMethod:function(F,H,E){var G=this.getMethodEvent(F);G.before.push({fn:H,scope:E})},afterMethod:function(F,H,E){var G=this.getMethodEvent(F);G.after.push({fn:H,scope:E})},removeMethodListener:function(H,J,K){var I=this.getMethodEvent(H);for(var L=0,G=I.before.length;L<G;L++){if(I.before[L].fn==J&&I.before[L].scope==K){I.before.splice(L,1);return }}for(var L=0,G=I.after.length;L<G;L++){if(I.after[L].fn==J&&I.after[L].scope==K){I.after.splice(L,1);return }}}};Ext.util.Observable.prototype.on=Ext.util.Observable.prototype.addListener;Ext.util.Observable.prototype.un=Ext.util.Observable.prototype.removeListener;Ext.util.Observable.capture=function(E,F,D){E.fireEvent=E.fireEvent.createInterceptor(F,D)};Ext.util.Observable.releaseCapture=function(B){B.fireEvent=Ext.util.Observable.prototype.fireEvent};(function(){var F=function(B,A,C){var H=new Ext.util.DelayedTask();return function(){H.delay(A.buffer,B,C,Array.prototype.slice.call(arguments,0))}};var E=function(B,A,C,H){return function(){A.removeListener(C,H);return B.apply(H,arguments)}};var D=function(B,A,C){return function(){var H=Array.prototype.slice.call(arguments,0);setTimeout(function(){B.apply(C,H)},A.delay||10)}};Ext.util.Event=function(A,B){this.name=B;this.obj=A;this.listeners=[]};Ext.util.Event.prototype={addListener:function(A,B,C){B=B||this.obj;if(!this.isListening(A,B)){var H=this.createListener(A,B,C);if(!this.firing){this.listeners.push(H)}else{this.listeners=this.listeners.slice(0);this.listeners.push(H)}}},createListener:function(B,C,A){A=A||{};C=C||this.obj;var J={fn:B,scope:C,options:A};var I=B;if(A.delay){I=D(I,A,C)}if(A.single){I=E(I,this,B,C)}if(A.buffer){I=F(I,A,C)}J.fireFn=I;return J},findListener:function(A,B){B=B||this.obj;var J=this.listeners;for(var C=0,L=J.length;C<L;C++){var K=J[C];if(K.fn==A&&K.scope==B){return C}}return -1},isListening:function(A,B){return this.findListener(A,B)!=-1},removeListener:function(A,B){var C;if((C=this.findListener(A,B))!=-1){if(!this.firing){this.listeners.splice(C,1)}else{this.listeners=this.listeners.slice(0);this.listeners.splice(C,1)}return true}return false},clearListeners:function(){this.listeners=[]},fire:function(){var J=this.listeners,A,L=J.length;if(L>0){this.firing=true;var C=Array.prototype.slice.call(arguments,0);for(var B=0;B<L;B++){var K=J[B];if(K.fireFn.apply(K.scope||this.obj||window,arguments)===false){this.firing=false;return false}}this.firing=false}return true}}})();Ext.EventManager=function(){var D,Z,d=false;var b,E,i,X;var a=Ext.lib.Event;var Y=Ext.lib.Dom;var k=function(){if(!d){d=true;Ext.isReady=true;if(Z){clearInterval(Z)}if(Ext.isGecko||Ext.isOpera){document.removeEventListener("DOMContentLoaded",k,false)}if(Ext.isIE){var A=document.getElementById("ie-deferred-loader");if(A){A.onreadystatechange=null;A.parentNode.removeChild(A)}}if(D){D.fire();D.clearListeners()}}};var l=function(){D=new Ext.util.Event();if(Ext.isGecko||Ext.isOpera){document.addEventListener("DOMContentLoaded",k,false)}else{if(Ext.isIE){document.write('<script id="ie-deferred-loader" defer="defer" src="//:"><\/script>');var A=document.getElementById("ie-deferred-loader");A.onreadystatechange=function(){if(this.readyState=="complete"){k()}}}else{if(Ext.isSafari){Z=setInterval(function(){var B=document.readyState;if(B=="complete"){k()}},10)}}}a.on(window,"load",k)};var U=function(B,A){var C=new Ext.util.DelayedTask(B);return function(F){F=new Ext.EventObjectImpl(F);C.delay(A.buffer,B,null,[F])}};var W=function(A,B,F,C){return function(G){Ext.EventManager.removeListener(B,F,C);A(G)}};var h=function(B,A){return function(C){C=new Ext.EventObjectImpl(C);setTimeout(function(){B(C)},A.delay||10)}};var c=function(C,F,H,I,J){var G=(!H||typeof H=="boolean")?{}:H;I=I||G.fn;J=J||G.scope;var A=Ext.getDom(C);if(!A){throw'Error listening for "'+F+'". Element "'+C+"\" doesn't exist."}var B=function(K){K=Ext.EventObject.setEvent(K);var L;if(G.delegate){L=K.getTarget(G.delegate,A);if(!L){return }}else{L=K.target}if(G.stopEvent===true){K.stopEvent()}if(G.preventDefault===true){K.preventDefault()}if(G.stopPropagation===true){K.stopPropagation()}if(G.normalized===false){K=K.browserEvent}I.call(J||A,K,L,G)};if(G.delay){B=h(B,G)}if(G.single){B=W(B,A,F,I)}if(G.buffer){B=U(B,G)}I._handlers=I._handlers||[];I._handlers.push([Ext.id(A),F,B]);a.on(A,F,B);if(F=="mousewheel"&&A.addEventListener){A.addEventListener("DOMMouseScroll",B,false);a.on(window,"unload",function(){A.removeEventListener("DOMMouseScroll",B,false)})}if(F=="mousedown"&&A==document){Ext.EventManager.stoppedMouseDownEvent.addListener(B)}return B};var g=function(K,I,B){var A=Ext.id(K),J=B._handlers,F=B;if(J){for(var H=0,C=J.length;H<C;H++){var G=J[H];if(G[0]==A&&G[1]==I){F=G[2];J.splice(H,1);break}}}a.un(K,I,F);K=Ext.getDom(K);if(I=="mousewheel"&&K.addEventListener){K.removeEventListener("DOMMouseScroll",F,false)}if(I=="mousedown"&&K==document){Ext.EventManager.stoppedMouseDownEvent.removeListener(F)}};var e=/^(?:scope|delay|buffer|single|stopEvent|preventDefault|stopPropagation|normalized|args|delegate)$/;var V={addListener:function(C,G,A,B,F){if(typeof G=="object"){var H=G;for(var I in H){if(e.test(I)){continue}if(typeof H[I]=="function"){c(C,I,H,H[I],H.scope)}else{c(C,I,H[I])}}return }return c(C,G,F,A,B)},removeListener:function(B,C,A){return g(B,C,A)},onDocumentReady:function(A,B,C){if(d){D.addListener(A,B,C);D.fire();D.clearListeners();return }if(!D){l()}D.addListener(A,B,C)},onWindowResize:function(A,B,C){if(!b){b=new Ext.util.Event();E=new Ext.util.DelayedTask(function(){b.fire(Y.getViewWidth(),Y.getViewHeight())});a.on(window,"resize",this.fireWindowResize,this)}b.addListener(A,B,C)},fireWindowResize:function(){if(b){if((Ext.isIE||Ext.isAir)&&E){E.delay(50)}else{b.fire(Y.getViewWidth(),Y.getViewHeight())}}},onTextResize:function(A,B,F){if(!i){i=new Ext.util.Event();var C=new Ext.Element(document.createElement("div"));C.dom.className="x-text-resize";C.dom.innerHTML="X";C.appendTo(document.body);X=C.dom.offsetHeight;setInterval(function(){if(C.dom.offsetHeight!=X){i.fire(X,X=C.dom.offsetHeight)}},this.textResizeInterval)}i.addListener(A,B,F)},removeResizeListener:function(A,B){if(b){b.removeListener(A,B)}},fireResize:function(){if(b){b.fire(Y.getViewWidth(),Y.getViewHeight())}},ieDeferSrc:false,textResizeInterval:50};V.on=V.addListener;V.un=V.removeListener;V.stoppedMouseDownEvent=new Ext.util.Event();return V}();Ext.onReady=Ext.EventManager.onDocumentReady;Ext.onReady(function(){var F=Ext.getBody();if(!F){return }var D=[Ext.isIE?"ext-ie "+(Ext.isIE6?"ext-ie6":"ext-ie7"):Ext.isGecko?"ext-gecko":Ext.isOpera?"ext-opera":Ext.isSafari?"ext-safari":""];if(Ext.isMac){D.push("ext-mac")}if(Ext.isLinux){D.push("ext-linux")}if(Ext.isBorderBox){D.push("ext-border-box")}if(Ext.isStrict){var E=F.dom.parentNode;if(E){E.className+=" ext-strict"}}F.addClass(D.join(" "))});Ext.EventObject=function(){var F=Ext.lib.Event;var D={63234:37,63235:39,63232:38,63233:40,63276:33,63277:34,63272:46,63273:36,63275:35};var E=Ext.isIE?{1:0,4:1,2:2}:(Ext.isSafari?{1:0,2:1,3:2}:{0:0,1:1,2:2});Ext.EventObjectImpl=function(A){if(A){this.setEvent(A.browserEvent||A)}};Ext.EventObjectImpl.prototype={browserEvent:null,button:-1,shiftKey:false,ctrlKey:false,altKey:false,BACKSPACE:8,TAB:9,RETURN:13,ENTER:13,SHIFT:16,CONTROL:17,ESC:27,SPACE:32,PAGEUP:33,PAGEDOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,DELETE:46,F5:116,setEvent:function(A){if(A==this||(A&&A.browserEvent)){return A}this.browserEvent=A;if(A){this.button=A.button?E[A.button]:(A.which?A.which-1:-1);if(A.type=="click"&&this.button==-1){this.button=0}this.type=A.type;this.shiftKey=A.shiftKey;this.ctrlKey=A.ctrlKey||A.metaKey;this.altKey=A.altKey;this.keyCode=A.keyCode;this.charCode=A.charCode;this.target=F.getTarget(A);this.xy=F.getXY(A)}else{this.button=-1;this.shiftKey=false;this.ctrlKey=false;this.altKey=false;this.keyCode=0;this.charCode=0;this.target=null;this.xy=[0,0]}return this},stopEvent:function(){if(this.browserEvent){if(this.browserEvent.type=="mousedown"){Ext.EventManager.stoppedMouseDownEvent.fire(this)}F.stopEvent(this.browserEvent)}},preventDefault:function(){if(this.browserEvent){F.preventDefault(this.browserEvent)}},isNavKeyPress:function(){var A=this.keyCode;A=Ext.isSafari?(D[A]||A):A;return(A>=33&&A<=40)||A==this.RETURN||A==this.TAB||A==this.ESC},isSpecialKey:function(){var A=this.keyCode;return(this.type=="keypress"&&this.ctrlKey)||A==9||A==13||A==40||A==27||(A==16)||(A==17)||(A>=18&&A<=20)||(A>=33&&A<=35)||(A>=36&&A<=39)||(A>=44&&A<=45)},stopPropagation:function(){if(this.browserEvent){if(this.browserEvent.type=="mousedown"){Ext.EventManager.stoppedMouseDownEvent.fire(this)}F.stopPropagation(this.browserEvent)}},getCharCode:function(){return this.charCode||this.keyCode},getKey:function(){var A=this.keyCode||this.charCode;return Ext.isSafari?(D[A]||A):A},getPageX:function(){return this.xy[0]},getPageY:function(){return this.xy[1]},getTime:function(){if(this.browserEvent){return F.getTime(this.browserEvent)}return null},getXY:function(){return this.xy},getTarget:function(C,A,H){var B=Ext.get(this.target);return C?B.findParent(C,A,H):(H?B:this.target)},getRelatedTarget:function(){if(this.browserEvent){return F.getRelatedTarget(this.browserEvent)}return null},getWheelDelta:function(){var B=this.browserEvent;var A=0;if(B.wheelDelta){A=B.wheelDelta/120}else{if(B.detail){A=-B.detail/3}}return A},hasModifier:function(){return((this.ctrlKey||this.altKey)||this.shiftKey)?true:false},within:function(B,A){var C=this[A?"getRelatedTarget":"getTarget"]();return C&&Ext.fly(B).contains(C)},getPoint:function(){return new Ext.lib.Point(this.xy[0],this.xy[1])}};return new Ext.EventObjectImpl()}();(function(){var D=Ext.lib.Dom;var E=Ext.lib.Event;var A=Ext.lib.Anim;var propCache={};var camelRe=/(-[a-z])/gi;var camelFn=function(m,a){return a.charAt(1).toUpperCase()};var view=document.defaultView;Ext.Element=function(element,forceNew){var dom=typeof element=="string"?document.getElementById(element):element;if(!dom){return null}var id=dom.id;if(forceNew!==true&&id&&Ext.Element.cache[id]){return Ext.Element.cache[id]}this.dom=dom;this.id=id||Ext.id(dom)};var El=Ext.Element;El.prototype={originalDisplay:"",visibilityMode:1,defaultUnit:"px",setVisibilityMode:function(visMode){this.visibilityMode=visMode;return this},enableDisplayMode:function(display){this.setVisibilityMode(El.DISPLAY);if(typeof display!="undefined"){this.originalDisplay=display}return this},findParent:function(simpleSelector,maxDepth,returnEl){var p=this.dom,b=document.body,depth=0,dq=Ext.DomQuery,stopEl;maxDepth=maxDepth||50;if(typeof maxDepth!="number"){stopEl=Ext.getDom(maxDepth);maxDepth=10}while(p&&p.nodeType==1&&depth<maxDepth&&p!=b&&p!=stopEl){if(dq.is(p,simpleSelector)){return returnEl?Ext.get(p):p}depth++;p=p.parentNode}return null},findParentNode:function(simpleSelector,maxDepth,returnEl){var p=Ext.fly(this.dom.parentNode,"_internal");return p?p.findParent(simpleSelector,maxDepth,returnEl):null},up:function(simpleSelector,maxDepth){return this.findParentNode(simpleSelector,maxDepth,true)},is:function(simpleSelector){return Ext.DomQuery.is(this.dom,simpleSelector)},animate:function(args,duration,onComplete,easing,animType){this.anim(args,{duration:duration,callback:onComplete,easing:easing},animType);return this},anim:function(args,opt,animType,defaultDur,defaultEase,cb){animType=animType||"run";opt=opt||{};var anim=Ext.lib.Anim[animType](this.dom,args,(opt.duration||defaultDur)||0.35,(opt.easing||defaultEase)||"easeOut",function(){Ext.callback(cb,this);Ext.callback(opt.callback,opt.scope||this,[this,opt])},this);opt.anim=anim;return anim},preanim:function(a,i){return !a[i]?false:(typeof a[i]=="object"?a[i]:{duration:a[i+1],callback:a[i+2],easing:a[i+3]})},clean:function(forceReclean){if(this.isCleaned&&forceReclean!==true){return this}var ns=/\S/;var d=this.dom,n=d.firstChild,ni=-1;while(n){var nx=n.nextSibling;if(n.nodeType==3&&!ns.test(n.nodeValue)){d.removeChild(n)}else{n.nodeIndex=++ni}n=nx}this.isCleaned=true;return this},scrollIntoView:function(container,hscroll){var c=Ext.getDom(container)||Ext.getBody().dom;var el=this.dom;var o=this.getOffsetsTo(c),l=o[0]+c.scrollLeft,t=o[1]+c.scrollTop,b=t+el.offsetHeight,r=l+el.offsetWidth;var ch=c.clientHeight;var ct=parseInt(c.scrollTop,10);var cl=parseInt(c.scrollLeft,10);var cb=ct+ch;var cr=cl+c.clientWidth;if(el.offsetHeight>ch||t<ct){c.scrollTop=t}else{if(b>cb){c.scrollTop=b-ch}}c.scrollTop=c.scrollTop;if(hscroll!==false){if(el.offsetWidth>c.clientWidth||l<cl){c.scrollLeft=l}else{if(r>cr){c.scrollLeft=r-c.clientWidth}}c.scrollLeft=c.scrollLeft}return this},scrollChildIntoView:function(child,hscroll){Ext.fly(child,"_scrollChildIntoView").scrollIntoView(this,hscroll)},autoHeight:function(animate,duration,onComplete,easing){var oldHeight=this.getHeight();this.clip();this.setHeight(1);setTimeout(function(){var height=parseInt(this.dom.scrollHeight,10);if(!animate){this.setHeight(height);this.unclip();if(typeof onComplete=="function"){onComplete()}}else{this.setHeight(oldHeight);this.setHeight(height,animate,duration,function(){this.unclip();if(typeof onComplete=="function"){onComplete()}}.createDelegate(this),easing)}}.createDelegate(this),0);return this},contains:function(el){if(!el){return false}return D.isAncestor(this.dom,el.dom?el.dom:el)},isVisible:function(deep){var vis=!(this.getStyle("visibility")=="hidden"||this.getStyle("display")=="none");if(deep!==true||!vis){return vis}var p=this.dom.parentNode;while(p&&p.tagName.toLowerCase()!="body"){if(!Ext.fly(p,"_isVisible").isVisible()){return false}p=p.parentNode}return true},select:function(selector,unique){return El.select(selector,unique,this.dom)},query:function(selector,unique){return Ext.DomQuery.select(selector,this.dom)},child:function(selector,returnDom){var n=Ext.DomQuery.selectNode(selector,this.dom);return returnDom?n:Ext.get(n)},down:function(selector,returnDom){var n=Ext.DomQuery.selectNode(" > "+selector,this.dom);return returnDom?n:Ext.get(n)},initDD:function(group,config,overrides){var dd=new Ext.dd.DD(Ext.id(this.dom),group,config);return Ext.apply(dd,overrides)},initDDProxy:function(group,config,overrides){var dd=new Ext.dd.DDProxy(Ext.id(this.dom),group,config);return Ext.apply(dd,overrides)},initDDTarget:function(group,config,overrides){var dd=new Ext.dd.DDTarget(Ext.id(this.dom),group,config);return Ext.apply(dd,overrides)},setVisible:function(visible,animate){if(!animate||!A){if(this.visibilityMode==El.DISPLAY){this.setDisplayed(visible)}else{this.fixDisplay();this.dom.style.visibility=visible?"visible":"hidden"}}else{var dom=this.dom;var visMode=this.visibilityMode;if(visible){this.setOpacity(0.01);this.setVisible(true)}this.anim({opacity:{to:(visible?1:0)}},this.preanim(arguments,1),null,0.35,"easeIn",function(){if(!visible){if(visMode==El.DISPLAY){dom.style.display="none"}else{dom.style.visibility="hidden"}Ext.get(dom).setOpacity(1)}})}return this},isDisplayed:function(){return this.getStyle("display")!="none"},toggle:function(animate){this.setVisible(!this.isVisible(),this.preanim(arguments,0));return this},setDisplayed:function(value){if(typeof value=="boolean"){value=value?this.originalDisplay:"none"}this.setStyle("display",value);return this},focus:function(){try{this.dom.focus()}catch(e){}return this},blur:function(){try{this.dom.blur()}catch(e){}return this},addClass:function(className){if(Ext.isArray(className)){for(var i=0,len=className.length;i<len;i++){this.addClass(className[i])}}else{if(className&&!this.hasClass(className)){this.dom.className=this.dom.className+" "+className}}return this},radioClass:function(className){var siblings=this.dom.parentNode.childNodes;for(var i=0;i<siblings.length;i++){var s=siblings[i];if(s.nodeType==1){Ext.get(s).removeClass(className)}}this.addClass(className);return this},removeClass:function(className){if(!className||!this.dom.className){return this}if(Ext.isArray(className)){for(var i=0,len=className.length;i<len;i++){this.removeClass(className[i])}}else{if(this.hasClass(className)){var re=this.classReCache[className];if(!re){re=new RegExp("(?:^|\\s+)"+className+"(?:\\s+|$)","g");this.classReCache[className]=re}this.dom.className=this.dom.className.replace(re," ")}}return this},classReCache:{},toggleClass:function(className){if(this.hasClass(className)){this.removeClass(className)}else{this.addClass(className)}return this},hasClass:function(className){return className&&(" "+this.dom.className+" ").indexOf(" "+className+" ")!=-1},replaceClass:function(oldClassName,newClassName){this.removeClass(oldClassName);this.addClass(newClassName);return this},getStyles:function(){var a=arguments,len=a.length,r={};for(var i=0;i<len;i++){r[a[i]]=this.getStyle(a[i])}return r},getStyle:function(){return view&&view.getComputedStyle?function(prop){var el=this.dom,v,cs,camel;if(prop=="float"){prop="cssFloat"}if(v=el.style[prop]){return v}if(cs=view.getComputedStyle(el,"")){if(!(camel=propCache[prop])){camel=propCache[prop]=prop.replace(camelRe,camelFn)}return cs[camel]}return null}:function(prop){var el=this.dom,v,cs,camel;if(prop=="opacity"){if(typeof el.style.filter=="string"){var m=el.style.filter.match(/alpha\(opacity=(.*)\)/i);if(m){var fv=parseFloat(m[1]);if(!isNaN(fv)){return fv?fv/100:0}}}return 1}else{if(prop=="float"){prop="styleFloat"}}if(!(camel=propCache[prop])){camel=propCache[prop]=prop.replace(camelRe,camelFn)}if(v=el.style[camel]){return v}if(cs=el.currentStyle){return cs[camel]}return null}}(),setStyle:function(prop,value){if(typeof prop=="string"){var camel;if(!(camel=propCache[prop])){camel=propCache[prop]=prop.replace(camelRe,camelFn)}if(camel=="opacity"){this.setOpacity(value)}else{this.dom.style[camel]=value}}else{for(var style in prop){if(typeof prop[style]!="function"){this.setStyle(style,prop[style])}}}return this},applyStyles:function(style){Ext.DomHelper.applyStyles(this.dom,style);return this},getX:function(){return D.getX(this.dom)},getY:function(){return D.getY(this.dom)},getXY:function(){return D.getXY(this.dom)},getOffsetsTo:function(el){var o=this.getXY();var e=Ext.fly(el,"_internal").getXY();return[o[0]-e[0],o[1]-e[1]]},setX:function(x,animate){if(!animate||!A){D.setX(this.dom,x)}else{this.setXY([x,this.getY()],this.preanim(arguments,1))}return this},setY:function(y,animate){if(!animate||!A){D.setY(this.dom,y)}else{this.setXY([this.getX(),y],this.preanim(arguments,1))}return this},setLeft:function(left){this.setStyle("left",this.addUnits(left));return this},setTop:function(top){this.setStyle("top",this.addUnits(top));return this},setRight:function(right){this.setStyle("right",this.addUnits(right));return this},setBottom:function(bottom){this.setStyle("bottom",this.addUnits(bottom));return this},setXY:function(pos,animate){if(!animate||!A){D.setXY(this.dom,pos)}else{this.anim({points:{to:pos}},this.preanim(arguments,1),"motion")}return this},setLocation:function(x,y,animate){this.setXY([x,y],this.preanim(arguments,2));return this},moveTo:function(x,y,animate){this.setXY([x,y],this.preanim(arguments,2));return this},getRegion:function(){return D.getRegion(this.dom)},getHeight:function(contentHeight){var h=this.dom.offsetHeight||0;h=contentHeight!==true?h:h-this.getBorderWidth("tb")-this.getPadding("tb");return h<0?0:h},getWidth:function(contentWidth){var w=this.dom.offsetWidth||0;w=contentWidth!==true?w:w-this.getBorderWidth("lr")-this.getPadding("lr");return w<0?0:w},getComputedHeight:function(){var h=Math.max(this.dom.offsetHeight,this.dom.clientHeight);if(!h){h=parseInt(this.getStyle("height"),10)||0;if(!this.isBorderBox()){h+=this.getFrameWidth("tb")}}return h},getComputedWidth:function(){var w=Math.max(this.dom.offsetWidth,this.dom.clientWidth);if(!w){w=parseInt(this.getStyle("width"),10)||0;if(!this.isBorderBox()){w+=this.getFrameWidth("lr")}}return w},getSize:function(contentSize){return{width:this.getWidth(contentSize),height:this.getHeight(contentSize)}},getStyleSize:function(){var w,h,d=this.dom,s=d.style;if(s.width&&s.width!="auto"){w=parseInt(s.width,10);if(Ext.isBorderBox){w-=this.getFrameWidth("lr")}}if(s.height&&s.height!="auto"){h=parseInt(s.height,10);if(Ext.isBorderBox){h-=this.getFrameWidth("tb")}}return{width:w||this.getWidth(true),height:h||this.getHeight(true)}},getViewSize:function(){var d=this.dom,doc=document,aw=0,ah=0;if(d==doc||d==doc.body){return{width:D.getViewWidth(),height:D.getViewHeight()}}else{return{width:d.clientWidth,height:d.clientHeight}}},getValue:function(asNumber){return asNumber?parseInt(this.dom.value,10):this.dom.value},adjustWidth:function(width){if(typeof width=="number"){if(this.autoBoxAdjust&&!this.isBorderBox()){width-=(this.getBorderWidth("lr")+this.getPadding("lr"))}if(width<0){width=0}}return width},adjustHeight:function(height){if(typeof height=="number"){if(this.autoBoxAdjust&&!this.isBorderBox()){height-=(this.getBorderWidth("tb")+this.getPadding("tb"))}if(height<0){height=0}}return height},setWidth:function(width,animate){width=this.adjustWidth(width);if(!animate||!A){this.dom.style.width=this.addUnits(width)}else{this.anim({width:{to:width}},this.preanim(arguments,1))}return this},setHeight:function(height,animate){height=this.adjustHeight(height);if(!animate||!A){this.dom.style.height=this.addUnits(height)}else{this.anim({height:{to:height}},this.preanim(arguments,1))}return this},setSize:function(width,height,animate){if(typeof width=="object"){height=width.height;width=width.width}width=this.adjustWidth(width);height=this.adjustHeight(height);if(!animate||!A){this.dom.style.width=this.addUnits(width);this.dom.style.height=this.addUnits(height)}else{this.anim({width:{to:width},height:{to:height}},this.preanim(arguments,2))}return this},setBounds:function(x,y,width,height,animate){if(!animate||!A){this.setSize(width,height);this.setLocation(x,y)}else{width=this.adjustWidth(width);height=this.adjustHeight(height);this.anim({points:{to:[x,y]},width:{to:width},height:{to:height}},this.preanim(arguments,4),"motion")}return this},setRegion:function(region,animate){this.setBounds(region.left,region.top,region.right-region.left,region.bottom-region.top,this.preanim(arguments,1));return this},addListener:function(eventName,fn,scope,options){Ext.EventManager.on(this.dom,eventName,fn,scope||this,options)},removeListener:function(eventName,fn){Ext.EventManager.removeListener(this.dom,eventName,fn);return this},removeAllListeners:function(){E.purgeElement(this.dom);return this},relayEvent:function(eventName,observable){this.on(eventName,function(e){observable.fireEvent(eventName,e)})},setOpacity:function(opacity,animate){if(!animate||!A){var s=this.dom.style;if(Ext.isIE){s.zoom=1;s.filter=(s.filter||"").replace(/alpha\([^\)]*\)/gi,"")+(opacity==1?"":" alpha(opacity="+opacity*100+")")}else{s.opacity=opacity}}else{this.anim({opacity:{to:opacity}},this.preanim(arguments,1),null,0.35,"easeIn")}return this},getLeft:function(local){if(!local){return this.getX()}else{return parseInt(this.getStyle("left"),10)||0}},getRight:function(local){if(!local){return this.getX()+this.getWidth()}else{return(this.getLeft(true)+this.getWidth())||0}},getTop:function(local){if(!local){return this.getY()}else{return parseInt(this.getStyle("top"),10)||0}},getBottom:function(local){if(!local){return this.getY()+this.getHeight()}else{return(this.getTop(true)+this.getHeight())||0}},position:function(pos,zIndex,x,y){if(!pos){if(this.getStyle("position")=="static"){this.setStyle("position","relative")}}else{this.setStyle("position",pos)}if(zIndex){this.setStyle("z-index",zIndex)}if(x!==undefined&&y!==undefined){this.setXY([x,y])}else{if(x!==undefined){this.setX(x)}else{if(y!==undefined){this.setY(y)}}}},clearPositioning:function(value){value=value||"";this.setStyle({left:value,right:value,top:value,bottom:value,"z-index":"",position:"static"});return this},getPositioning:function(){var l=this.getStyle("left");var t=this.getStyle("top");return{position:this.getStyle("position"),left:l,right:l?"":this.getStyle("right"),top:t,bottom:t?"":this.getStyle("bottom"),"z-index":this.getStyle("z-index")}},getBorderWidth:function(side){return this.addStyles(side,El.borders)},getPadding:function(side){return this.addStyles(side,El.paddings)},setPositioning:function(pc){this.applyStyles(pc);if(pc.right=="auto"){this.dom.style.right=""}if(pc.bottom=="auto"){this.dom.style.bottom=""}return this},fixDisplay:function(){if(this.getStyle("display")=="none"){this.setStyle("visibility","hidden");this.setStyle("display",this.originalDisplay);if(this.getStyle("display")=="none"){this.setStyle("display","block")}}},setOverflow:function(v){if(v=="auto"&&Ext.isMac&&Ext.isGecko){this.dom.style.overflow="hidden";(function(){this.dom.style.overflow="auto"}).defer(1,this)}else{this.dom.style.overflow=v}},setLeftTop:function(left,top){this.dom.style.left=this.addUnits(left);this.dom.style.top=this.addUnits(top);return this},move:function(direction,distance,animate){var xy=this.getXY();direction=direction.toLowerCase();switch(direction){case"l":case"left":this.moveTo(xy[0]-distance,xy[1],this.preanim(arguments,2));break;case"r":case"right":this.moveTo(xy[0]+distance,xy[1],this.preanim(arguments,2));break;case"t":case"top":case"up":this.moveTo(xy[0],xy[1]-distance,this.preanim(arguments,2));break;case"b":case"bottom":case"down":this.moveTo(xy[0],xy[1]+distance,this.preanim(arguments,2));break}return this},clip:function(){if(!this.isClipped){this.isClipped=true;this.originalClip={o:this.getStyle("overflow"),x:this.getStyle("overflow-x"),y:this.getStyle("overflow-y")};this.setStyle("overflow","hidden");this.setStyle("overflow-x","hidden");this.setStyle("overflow-y","hidden")}return this},unclip:function(){if(this.isClipped){this.isClipped=false;var o=this.originalClip;if(o.o){this.setStyle("overflow",o.o)}if(o.x){this.setStyle("overflow-x",o.x)}if(o.y){this.setStyle("overflow-y",o.y)}}return this},getAnchorXY:function(anchor,local,s){var w,h,vp=false;if(!s){var d=this.dom;if(d==document.body||d==document){vp=true;w=D.getViewWidth();h=D.getViewHeight()}else{w=this.getWidth();h=this.getHeight()}}else{w=s.width;h=s.height}var x=0,y=0,r=Math.round;switch((anchor||"tl").toLowerCase()){case"c":x=r(w*0.5);y=r(h*0.5);break;case"t":x=r(w*0.5);y=0;break;case"l":x=0;y=r(h*0.5);break;case"r":x=w;y=r(h*0.5);break;case"b":x=r(w*0.5);y=h;break;case"tl":x=0;y=0;break;case"bl":x=0;y=h;break;case"br":x=w;y=h;break;case"tr":x=w;y=0;break}if(local===true){return[x,y]}if(vp){var sc=this.getScroll();return[x+sc.left,y+sc.top]}var o=this.getXY();return[x+o[0],y+o[1]]},getAlignToXY:function(el,p,o){el=Ext.get(el);if(!el||!el.dom){throw"Element.alignToXY with an element that doesn't exist"}var d=this.dom;var c=false;var p1="",p2="";o=o||[0,0];if(!p){p="tl-bl"}else{if(p=="?"){p="tl-bl?"}else{if(p.indexOf("-")==-1){p="tl-"+p}}}p=p.toLowerCase();var m=p.match(/^([a-z]+)-([a-z]+)(\?)?$/);if(!m){throw"Element.alignTo with an invalid alignment "+p}p1=m[1];p2=m[2];c=!!m[3];var a1=this.getAnchorXY(p1,true);var a2=el.getAnchorXY(p2,false);var x=a2[0]-a1[0]+o[0];var y=a2[1]-a1[1]+o[1];if(c){var w=this.getWidth(),h=this.getHeight(),r=el.getRegion();var dw=D.getViewWidth()-5,dh=D.getViewHeight()-5;var p1y=p1.charAt(0),p1x=p1.charAt(p1.length-1);var p2y=p2.charAt(0),p2x=p2.charAt(p2.length-1);var swapY=((p1y=="t"&&p2y=="b")||(p1y=="b"&&p2y=="t"));var swapX=((p1x=="r"&&p2x=="l")||(p1x=="l"&&p2x=="r"));var doc=document;var scrollX=(doc.documentElement.scrollLeft||doc.body.scrollLeft||0)+5;var scrollY=(doc.documentElement.scrollTop||doc.body.scrollTop||0)+5;if((x+w)>dw+scrollX){x=swapX?r.left-w:dw+scrollX-w}if(x<scrollX){x=swapX?r.right:scrollX}if((y+h)>dh+scrollY){y=swapY?r.top-h:dh+scrollY-h}if(y<scrollY){y=swapY?r.bottom:scrollY}}return[x,y]},getConstrainToXY:function(){var os={top:0,left:0,bottom:0,right:0};return function(el,local,offsets,proposedXY){el=Ext.get(el);offsets=offsets?Ext.applyIf(offsets,os):os;var vw,vh,vx=0,vy=0;if(el.dom==document.body||el.dom==document){vw=Ext.lib.Dom.getViewWidth();vh=Ext.lib.Dom.getViewHeight()}else{vw=el.dom.clientWidth;vh=el.dom.clientHeight;if(!local){var vxy=el.getXY();vx=vxy[0];vy=vxy[1]}}var s=el.getScroll();vx+=offsets.left+s.left;vy+=offsets.top+s.top;vw-=offsets.right;vh-=offsets.bottom;var vr=vx+vw;var vb=vy+vh;var xy=proposedXY||(!local?this.getXY():[this.getLeft(true),this.getTop(true)]);var x=xy[0],y=xy[1];var w=this.dom.offsetWidth,h=this.dom.offsetHeight;var moved=false;if((x+w)>vr){x=vr-w;moved=true}if((y+h)>vb){y=vb-h;moved=true}if(x<vx){x=vx;moved=true}if(y<vy){y=vy;moved=true}return moved?[x,y]:false}}(),adjustForConstraints:function(xy,parent,offsets){return this.getConstrainToXY(parent||document,false,offsets,xy)||xy},alignTo:function(element,position,offsets,animate){var xy=this.getAlignToXY(element,position,offsets);this.setXY(xy,this.preanim(arguments,3));return this},anchorTo:function(el,alignment,offsets,animate,monitorScroll,callback){var action=function(){this.alignTo(el,alignment,offsets,animate);Ext.callback(callback,this)};Ext.EventManager.onWindowResize(action,this);var tm=typeof monitorScroll;if(tm!="undefined"){Ext.EventManager.on(window,"scroll",action,this,{buffer:tm=="number"?monitorScroll:50})}action.call(this);return this},clearOpacity:function(){if(window.ActiveXObject){if(typeof this.dom.style.filter=="string"&&(/alpha/i).test(this.dom.style.filter)){this.dom.style.filter=""}}else{this.dom.style.opacity="";this.dom.style["-moz-opacity"]="";this.dom.style["-khtml-opacity"]=""}return this},hide:function(animate){this.setVisible(false,this.preanim(arguments,0));return this},show:function(animate){this.setVisible(true,this.preanim(arguments,0));return this},addUnits:function(size){return Ext.Element.addUnits(size,this.defaultUnit)},update:function(html,loadScripts,callback){if(typeof html=="undefined"){html=""}if(loadScripts!==true){this.dom.innerHTML=html;if(typeof callback=="function"){callback()}return this}var id=Ext.id();var dom=this.dom;html+='<span id="'+id+'"></span>';E.onAvailable(id,function(){var hd=document.getElementsByTagName("head")[0];var re=/(?:<script([^>]*)?>)((\n|\r|.)*?)(?:<\/script>)/ig;var srcRe=/\ssrc=([\'\"])(.*?)\1/i;var typeRe=/\stype=([\'\"])(.*?)\1/i;var match;while(match=re.exec(html)){var attrs=match[1];var srcMatch=attrs?attrs.match(srcRe):false;if(srcMatch&&srcMatch[2]){var s=document.createElement("script");s.src=srcMatch[2];var typeMatch=attrs.match(typeRe);if(typeMatch&&typeMatch[2]){s.type=typeMatch[2]}hd.appendChild(s)}else{if(match[2]&&match[2].length>0){if(window.execScript){window.execScript(match[2])}else{window.eval(match[2])}}}}var el=document.getElementById(id);if(el){Ext.removeNode(el)}if(typeof callback=="function"){callback()}});dom.innerHTML=html.replace(/(?:<script.*?>)((\n|\r|.)*?)(?:<\/script>)/ig,"");return this},load:function(){var um=this.getUpdater();um.update.apply(um,arguments);return this},getUpdater:function(){if(!this.updateManager){this.updateManager=new Ext.Updater(this)}return this.updateManager},unselectable:function(){this.dom.unselectable="on";this.swallowEvent("selectstart",true);this.applyStyles("-moz-user-select:none;-khtml-user-select:none;");this.addClass("x-unselectable");return this},getCenterXY:function(){return this.getAlignToXY(document,"c-c")},center:function(centerIn){this.alignTo(centerIn||document,"c-c");return this},isBorderBox:function(){return noBoxAdjust[this.dom.tagName.toLowerCase()]||Ext.isBorderBox},getBox:function(contentBox,local){var xy;if(!local){xy=this.getXY()}else{var left=parseInt(this.getStyle("left"),10)||0;var top=parseInt(this.getStyle("top"),10)||0;xy=[left,top]}var el=this.dom,w=el.offsetWidth,h=el.offsetHeight,bx;if(!contentBox){bx={x:xy[0],y:xy[1],0:xy[0],1:xy[1],width:w,height:h}}else{var l=this.getBorderWidth("l")+this.getPadding("l");var r=this.getBorderWidth("r")+this.getPadding("r");var t=this.getBorderWidth("t")+this.getPadding("t");var b=this.getBorderWidth("b")+this.getPadding("b");bx={x:xy[0]+l,y:xy[1]+t,0:xy[0]+l,1:xy[1]+t,width:w-(l+r),height:h-(t+b)}}bx.right=bx.x+bx.width;bx.bottom=bx.y+bx.height;return bx},getFrameWidth:function(sides,onlyContentBox){return onlyContentBox&&Ext.isBorderBox?0:(this.getPadding(sides)+this.getBorderWidth(sides))},setBox:function(box,adjust,animate){var w=box.width,h=box.height;if((adjust&&!this.autoBoxAdjust)&&!this.isBorderBox()){w-=(this.getBorderWidth("lr")+this.getPadding("lr"));h-=(this.getBorderWidth("tb")+this.getPadding("tb"))}this.setBounds(box.x,box.y,w,h,this.preanim(arguments,2));return this},repaint:function(){var dom=this.dom;this.addClass("x-repaint");setTimeout(function(){Ext.get(dom).removeClass("x-repaint")},1);return this},getMargins:function(side){if(!side){return{top:parseInt(this.getStyle("margin-top"),10)||0,left:parseInt(this.getStyle("margin-left"),10)||0,bottom:parseInt(this.getStyle("margin-bottom"),10)||0,right:parseInt(this.getStyle("margin-right"),10)||0}}else{return this.addStyles(side,El.margins)}},addStyles:function(sides,styles){var val=0,v,w;for(var i=0,len=sides.length;i<len;i++){v=this.getStyle(styles[sides.charAt(i)]);if(v){w=parseInt(v,10);if(w){val+=(w>=0?w:-1*w)}}}return val},createProxy:function(config,renderTo,matchBox){config=typeof config=="object"?config:{tag:"div",cls:config};var proxy;if(renderTo){proxy=Ext.DomHelper.append(renderTo,config,true)}else{proxy=Ext.DomHelper.insertBefore(this.dom,config,true)}if(matchBox){proxy.setBox(this.getBox())}return proxy},mask:function(msg,msgCls){if(this.getStyle("position")=="static"){this.setStyle("position","relative")}if(this._maskMsg){this._maskMsg.remove()}if(this._mask){this._mask.remove()}this._mask=Ext.DomHelper.append(this.dom,{cls:"ext-el-mask"},true);this.addClass("x-masked");this._mask.setDisplayed(true);if(typeof msg=="string"){this._maskMsg=Ext.DomHelper.append(this.dom,{cls:"ext-el-mask-msg",cn:{tag:"div"}},true);var mm=this._maskMsg;mm.dom.className=msgCls?"ext-el-mask-msg "+msgCls:"ext-el-mask-msg";mm.dom.firstChild.innerHTML=msg;mm.setDisplayed(true);mm.center(this)}if(Ext.isIE&&!(Ext.isIE7&&Ext.isStrict)&&this.getStyle("height")=="auto"){this._mask.setSize(this.dom.clientWidth,this.getHeight())}return this._mask},unmask:function(){if(this._mask){if(this._maskMsg){this._maskMsg.remove();delete this._maskMsg}this._mask.remove();delete this._mask}this.removeClass("x-masked")},isMasked:function(){return this._mask&&this._mask.isVisible()},createShim:function(){var el=document.createElement("iframe");el.frameBorder="no";el.className="ext-shim";if(Ext.isIE&&Ext.isSecure){el.src=Ext.SSL_SECURE_URL}var shim=Ext.get(this.dom.parentNode.insertBefore(el,this.dom));shim.autoBoxAdjust=false;return shim},remove:function(){Ext.removeNode(this.dom);delete El.cache[this.dom.id]},hover:function(overFn,outFn,scope){var preOverFn=function(e){if(!e.within(this,true)){overFn.apply(scope||this,arguments)}};var preOutFn=function(e){if(!e.within(this,true)){outFn.apply(scope||this,arguments)}};this.on("mouseover",preOverFn,this.dom);this.on("mouseout",preOutFn,this.dom);return this},addClassOnOver:function(className,preventFlicker){this.hover(function(){Ext.fly(this,"_internal").addClass(className)},function(){Ext.fly(this,"_internal").removeClass(className)});return this},addClassOnFocus:function(className){this.on("focus",function(){Ext.fly(this,"_internal").addClass(className)},this.dom);this.on("blur",function(){Ext.fly(this,"_internal").removeClass(className)},this.dom);return this},addClassOnClick:function(className){var dom=this.dom;this.on("mousedown",function(){Ext.fly(dom,"_internal").addClass(className);var d=Ext.getDoc();var fn=function(){Ext.fly(dom,"_internal").removeClass(className);d.removeListener("mouseup",fn)};d.on("mouseup",fn)});return this},swallowEvent:function(eventName,preventDefault){var fn=function(e){e.stopPropagation();if(preventDefault){e.preventDefault()}};if(Ext.isArray(eventName)){for(var i=0,len=eventName.length;i<len;i++){this.on(eventName[i],fn)}return this}this.on(eventName,fn);return this},parent:function(selector,returnDom){return this.matchNode("parentNode","parentNode",selector,returnDom)},next:function(selector,returnDom){return this.matchNode("nextSibling","nextSibling",selector,returnDom)},prev:function(selector,returnDom){return this.matchNode("previousSibling","previousSibling",selector,returnDom)},first:function(selector,returnDom){return this.matchNode("nextSibling","firstChild",selector,returnDom)},last:function(selector,returnDom){return this.matchNode("previousSibling","lastChild",selector,returnDom)},matchNode:function(dir,start,selector,returnDom){var n=this.dom[start];while(n){if(n.nodeType==1&&(!selector||Ext.DomQuery.is(n,selector))){return !returnDom?Ext.get(n):n}n=n[dir]}return null},appendChild:function(el){el=Ext.get(el);el.appendTo(this);return this},createChild:function(config,insertBefore,returnDom){config=config||{tag:"div"};if(insertBefore){return Ext.DomHelper.insertBefore(insertBefore,config,returnDom!==true)}return Ext.DomHelper[!this.dom.firstChild?"overwrite":"append"](this.dom,config,returnDom!==true)},appendTo:function(el){el=Ext.getDom(el);el.appendChild(this.dom);return this},insertBefore:function(el){el=Ext.getDom(el);el.parentNode.insertBefore(this.dom,el);return this},insertAfter:function(el){el=Ext.getDom(el);el.parentNode.insertBefore(this.dom,el.nextSibling);return this},insertFirst:function(el,returnDom){el=el||{};if(typeof el=="object"&&!el.nodeType&&!el.dom){return this.createChild(el,this.dom.firstChild,returnDom)}else{el=Ext.getDom(el);this.dom.insertBefore(el,this.dom.firstChild);return !returnDom?Ext.get(el):el}},insertSibling:function(el,where,returnDom){var rt;if(Ext.isArray(el)){for(var i=0,len=el.length;i<len;i++){rt=this.insertSibling(el[i],where,returnDom)}return rt}where=where?where.toLowerCase():"before";el=el||{};var refNode=where=="before"?this.dom:this.dom.nextSibling;if(typeof el=="object"&&!el.nodeType&&!el.dom){if(where=="after"&&!this.dom.nextSibling){rt=Ext.DomHelper.append(this.dom.parentNode,el,!returnDom)}else{rt=Ext.DomHelper[where=="after"?"insertAfter":"insertBefore"](this.dom,el,!returnDom)}}else{rt=this.dom.parentNode.insertBefore(Ext.getDom(el),refNode);if(!returnDom){rt=Ext.get(rt)}}return rt},wrap:function(config,returnDom){if(!config){config={tag:"div"}}var newEl=Ext.DomHelper.insertBefore(this.dom,config,!returnDom);newEl.dom?newEl.dom.appendChild(this.dom):newEl.appendChild(this.dom);return newEl},replace:function(el){el=Ext.get(el);this.insertBefore(el);el.remove();return this},replaceWith:function(el){if(typeof el=="object"&&!el.nodeType&&!el.dom){el=this.insertSibling(el,"before")}else{el=Ext.getDom(el);this.dom.parentNode.insertBefore(el,this.dom)}El.uncache(this.id);this.dom.parentNode.removeChild(this.dom);this.dom=el;this.id=Ext.id(el);El.cache[this.id]=this;return this},insertHtml:function(where,html,returnEl){var el=Ext.DomHelper.insertHtml(where,this.dom,html);return returnEl?Ext.get(el):el},set:function(o,useSet){var el=this.dom;useSet=typeof useSet=="undefined"?(el.setAttribute?true:false):useSet;for(var attr in o){if(attr=="style"||typeof o[attr]=="function"){continue}if(attr=="cls"){el.className=o.cls}else{if(o.hasOwnProperty(attr)){if(useSet){el.setAttribute(attr,o[attr])}else{el[attr]=o[attr]}}}}if(o.style){Ext.DomHelper.applyStyles(el,o.style)}return this},addKeyListener:function(key,fn,scope){var config;if(typeof key!="object"||Ext.isArray(key)){config={key:key,fn:fn,scope:scope}}else{config={key:key.key,shift:key.shift,ctrl:key.ctrl,alt:key.alt,fn:fn,scope:scope}}return new Ext.KeyMap(this,config)},addKeyMap:function(config){return new Ext.KeyMap(this,config)},isScrollable:function(){var dom=this.dom;return dom.scrollHeight>dom.clientHeight||dom.scrollWidth>dom.clientWidth},scrollTo:function(side,value,animate){var prop=side.toLowerCase()=="left"?"scrollLeft":"scrollTop";if(!animate||!A){this.dom[prop]=value}else{var to=prop=="scrollLeft"?[value,this.dom.scrollTop]:[this.dom.scrollLeft,value];this.anim({scroll:{to:to}},this.preanim(arguments,2),"scroll")}return this},scroll:function(direction,distance,animate){if(!this.isScrollable()){return }var el=this.dom;var l=el.scrollLeft,t=el.scrollTop;var w=el.scrollWidth,h=el.scrollHeight;var cw=el.clientWidth,ch=el.clientHeight;direction=direction.toLowerCase();var scrolled=false;var a=this.preanim(arguments,2);switch(direction){case"l":case"left":if(w-l>cw){var v=Math.min(l+distance,w-cw);this.scrollTo("left",v,a);scrolled=true}break;case"r":case"right":if(l>0){var v=Math.max(l-distance,0);this.scrollTo("left",v,a);scrolled=true}break;case"t":case"top":case"up":if(t>0){var v=Math.max(t-distance,0);this.scrollTo("top",v,a);scrolled=true}break;case"b":case"bottom":case"down":if(h-t>ch){var v=Math.min(t+distance,h-ch);this.scrollTo("top",v,a);scrolled=true}break}return scrolled},translatePoints:function(x,y){if(typeof x=="object"||Ext.isArray(x)){y=x[1];x=x[0]}var p=this.getStyle("position");var o=this.getXY();var l=parseInt(this.getStyle("left"),10);var t=parseInt(this.getStyle("top"),10);if(isNaN(l)){l=(p=="relative")?0:this.dom.offsetLeft}if(isNaN(t)){t=(p=="relative")?0:this.dom.offsetTop}return{left:(x-o[0]+l),top:(y-o[1]+t)}},getScroll:function(){var d=this.dom,doc=document;if(d==doc||d==doc.body){var l,t;if(Ext.isIE&&Ext.isStrict){l=doc.documentElement.scrollLeft||(doc.body.scrollLeft||0);t=doc.documentElement.scrollTop||(doc.body.scrollTop||0)}else{l=window.pageXOffset||(doc.body.scrollLeft||0);t=window.pageYOffset||(doc.body.scrollTop||0)}return{left:l,top:t}}else{return{left:d.scrollLeft,top:d.scrollTop}}},getColor:function(attr,defaultValue,prefix){var v=this.getStyle(attr);if(!v||v=="transparent"||v=="inherit"){return defaultValue}var color=typeof prefix=="undefined"?"#":prefix;if(v.substr(0,4)=="rgb("){var rvs=v.slice(4,v.length-1).split(",");for(var i=0;i<3;i++){var h=parseInt(rvs[i]);var s=h.toString(16);if(h<16){s="0"+s}color+=s}}else{if(v.substr(0,1)=="#"){if(v.length==4){for(var i=1;i<4;i++){var c=v.charAt(i);color+=c+c}}else{if(v.length==7){color+=v.substr(1)}}}}return(color.length>5?color.toLowerCase():defaultValue)},boxWrap:function(cls){cls=cls||"x-box";var el=Ext.get(this.insertHtml("beforeBegin",String.format('<div class="{0}">'+El.boxMarkup+"</div>",cls)));el.child("."+cls+"-mc").dom.appendChild(this.dom);return el},getAttributeNS:Ext.isIE?function(ns,name){var d=this.dom;var type=typeof d[ns+":"+name];if(type!="undefined"&&type!="unknown"){return d[ns+":"+name]}return d[name]}:function(ns,name){var d=this.dom;return d.getAttributeNS(ns,name)||d.getAttribute(ns+":"+name)||d.getAttribute(name)||d[name]},getTextWidth:function(text,min,max){return(Ext.util.TextMetrics.measure(this.dom,Ext.value(text,this.dom.innerHTML,true)).width).constrain(min||0,max||1000000)}};var ep=El.prototype;ep.on=ep.addListener;ep.mon=ep.addListener;ep.getUpdateManager=ep.getUpdater;ep.un=ep.removeListener;ep.autoBoxAdjust=true;El.unitPattern=/\d+(px|em|%|en|ex|pt|in|cm|mm|pc)$/i;El.addUnits=function(v,defaultUnit){if(v===""||v=="auto"){return v}if(v===undefined){return""}if(typeof v=="number"||!El.unitPattern.test(v)){return v+(defaultUnit||"px")}return v};El.boxMarkup='<div class="{0}-tl"><div class="{0}-tr"><div class="{0}-tc"></div></div></div><div class="{0}-ml"><div class="{0}-mr"><div class="{0}-mc"></div></div></div><div class="{0}-bl"><div class="{0}-br"><div class="{0}-bc"></div></div></div>';El.VISIBILITY=1;El.DISPLAY=2;El.borders={l:"border-left-width",r:"border-right-width",t:"border-top-width",b:"border-bottom-width"};El.paddings={l:"padding-left",r:"padding-right",t:"padding-top",b:"padding-bottom"};El.margins={l:"margin-left",r:"margin-right",t:"margin-top",b:"margin-bottom"};El.cache={};var docEl;El.get=function(el){var ex,elm,id;if(!el){return null}if(typeof el=="string"){if(!(elm=document.getElementById(el))){return null}if(ex=El.cache[el]){ex.dom=elm}else{ex=El.cache[el]=new El(elm)}return ex}else{if(el.tagName){if(!(id=el.id)){id=Ext.id(el)}if(ex=El.cache[id]){ex.dom=el}else{ex=El.cache[id]=new El(el)}return ex}else{if(el instanceof El){if(el!=docEl){el.dom=document.getElementById(el.id)||el.dom;El.cache[el.id]=el}return el}else{if(el.isComposite){return el}else{if(Ext.isArray(el)){return El.select(el)}else{if(el==document){if(!docEl){var f=function(){};f.prototype=El.prototype;docEl=new f();docEl.dom=document}return docEl}}}}}}return null};El.uncache=function(el){for(var i=0,a=arguments,len=a.length;i<len;i++){if(a[i]){delete El.cache[a[i].id||a[i]]}}};El.garbageCollect=function(){if(!Ext.enableGarbageCollector){clearInterval(El.collectorThread);return }for(var eid in El.cache){var el=El.cache[eid],d=el.dom;if(!d||!d.parentNode||(!d.offsetParent&&!document.getElementById(eid))){delete El.cache[eid];if(d&&Ext.enableListenerCollection){E.purgeElement(d)}}}};El.collectorThreadId=setInterval(El.garbageCollect,30000);var flyFn=function(){};flyFn.prototype=El.prototype;var _cls=new flyFn();El.Flyweight=function(dom){this.dom=dom};El.Flyweight.prototype=_cls;El.Flyweight.prototype.isFlyweight=true;El._flyweights={};El.fly=function(el,named){named=named||"_global";el=Ext.getDom(el);if(!el){return null}if(!El._flyweights[named]){El._flyweights[named]=new El.Flyweight()}El._flyweights[named].dom=el;return El._flyweights[named]};Ext.get=El.get;Ext.fly=El.fly;var noBoxAdjust=Ext.isStrict?{select:1}:{input:1,select:1,textarea:1};if(Ext.isIE||Ext.isGecko){noBoxAdjust.button=1}Ext.EventManager.on(window,"unload",function(){delete El.cache;delete El._flyweights})})();Ext.data.Connection=function(B){Ext.apply(this,B);this.addEvents("beforerequest","requestcomplete","requestexception");Ext.data.Connection.superclass.constructor.call(this)};Ext.extend(Ext.data.Connection,Ext.util.Observable,{timeout:30000,autoAbort:false,disableCaching:true,request:function(T){if(this.fireEvent("beforerequest",this,T)!==false){var L=T.params;if(typeof L=="function"){L=L.call(T.scope||window,T)}if(typeof L=="object"){L=Ext.urlEncode(L)}if(this.extraParams){var R=Ext.urlEncode(this.extraParams);L=L?(L+"&"+R):R}var M=T.url||this.url;if(typeof M=="function"){M=M.call(T.scope||window,T)}if(T.form){var K=Ext.getDom(T.form);M=M||K.action;var P=K.getAttribute("enctype");if(T.isUpload||(P&&P.toLowerCase()=="multipart/form-data")){return this.doFormUpload(T,L,M)}var Q=Ext.lib.Ajax.serializeForm(K);L=L?(L+"&"+Q):Q}var O=T.headers;if(this.defaultHeaders){O=Ext.apply(O||{},this.defaultHeaders);if(!T.headers){T.headers=O}}var S={success:this.handleResponse,failure:this.handleFailure,scope:this,argument:{options:T},timeout:T.timeout||this.timeout};var N=T.method||this.method||(L?"POST":"GET");if(N=="GET"&&(this.disableCaching&&T.disableCaching!==false)||T.disableCaching===true){M+=(M.indexOf("?")!=-1?"&":"?")+"_dc="+(new Date().getTime())}if(typeof T.autoAbort=="boolean"){if(T.autoAbort){this.abort()}}else{if(this.autoAbort!==false){this.abort()}}if((N=="GET"&&L)||T.xmlData||T.jsonData){M+=(M.indexOf("?")!=-1?"&":"?")+L;L=""}this.transId=Ext.lib.Ajax.request(N,M,S,L,T);return this.transId}else{Ext.callback(T.callback,T.scope,[T,null,null]);return null}},isLoading:function(B){if(B){return Ext.lib.Ajax.isCallInProgress(B)}else{return this.transId?true:false}},abort:function(B){if(B||this.isLoading()){Ext.lib.Ajax.abort(B||this.transId)}},handleResponse:function(C){this.transId=false;var D=C.argument.options;C.argument=D?D.argument:null;this.fireEvent("requestcomplete",this,C,D);Ext.callback(D.success,D.scope,[C,D]);Ext.callback(D.callback,D.scope,[D,true,C])},handleFailure:function(D,E){this.transId=false;var F=D.argument.options;D.argument=F?F.argument:null;this.fireEvent("requestexception",this,D,F,E);Ext.callback(F.failure,F.scope,[D,F]);Ext.callback(F.callback,F.scope,[F,false,D])},doFormUpload:function(X,P,O){var N=Ext.id();var W=document.createElement("iframe");W.id=N;W.name=N;W.className="x-hidden";if(Ext.isIE){W.src=Ext.SSL_SECURE_URL}document.body.appendChild(W);if(Ext.isIE){document.frames[N].name=N}var M=Ext.getDom(X.form);M.target=N;M.method="POST";M.enctype=M.encoding="multipart/form-data";if(O){M.action=O}var Q,S;if(P){Q=[];P=Ext.urlDecode(P,false);for(var U in P){if(P.hasOwnProperty(U)){S=document.createElement("input");S.type="hidden";S.name=U;S.value=P[U];M.appendChild(S);Q.push(S)}}}function V(){var C={responseText:"",responseXML:null};C.argument=X?X.argument:null;try{var A;if(Ext.isIE){A=W.contentWindow.document}else{A=(W.contentDocument||window.frames[N].document)}if(A&&A.body){C.responseText=A.body.innerHTML}if(A&&A.XMLDocument){C.responseXML=A.XMLDocument}else{C.responseXML=A}}catch(B){}Ext.EventManager.removeListener(W,"load",V,this);this.fireEvent("requestcomplete",this,C,X);Ext.callback(X.success,X.scope,[C,X]);Ext.callback(X.callback,X.scope,[X,true,C]);setTimeout(function(){Ext.removeNode(W)},100)}Ext.EventManager.on(W,"load",V,this);M.submit();if(Q){for(var T=0,R=Q.length;T<R;T++){Ext.removeNode(Q[T])}}}});Ext.Ajax=new Ext.data.Connection({autoAbort:false,serializeForm:function(B){return Ext.lib.Ajax.serializeForm(B)}});Ext.enableFx=true;Ext.Fx={slideIn:function(D,E){var F=this.getFxEl();E=E||{};F.queueFx(E,function(){D=D||"t";this.fixDisplay();var A=this.getFxRestore();var N=this.getBox();this.setSize(N);var Q=this.fxWrap(A.pos,E,"hidden");var C=this.dom.style;C.visibility="visible";C.position="absolute";var R=function(){F.fxUnwrap(Q,A.pos,E);C.width=A.width;C.height=A.height;F.afterFx(E)};var M,B={to:[N.x,N.y]},O={to:N.width},P={to:N.height};switch(D.toLowerCase()){case"t":Q.setSize(N.width,0);C.left=C.bottom="0";M={height:P};break;case"l":Q.setSize(0,N.height);C.right=C.top="0";M={width:O};break;case"r":Q.setSize(0,N.height);Q.setX(N.right);C.left=C.top="0";M={width:O,points:B};break;case"b":Q.setSize(N.width,0);Q.setY(N.bottom);C.left=C.top="0";M={height:P,points:B};break;case"tl":Q.setSize(0,0);C.right=C.bottom="0";M={width:O,height:P};break;case"bl":Q.setSize(0,0);Q.setY(N.y+N.height);C.right=C.top="0";M={width:O,height:P,points:B};break;case"br":Q.setSize(0,0);Q.setXY([N.right,N.bottom]);C.left=C.top="0";M={width:O,height:P,points:B};break;case"tr":Q.setSize(0,0);Q.setX(N.x+N.width);C.left=C.bottom="0";M={width:O,height:P,points:B};break}this.dom.style.visibility="visible";Q.show();arguments.callee.anim=Q.fxanim(M,E,"motion",0.5,"easeOut",R)});return this},slideOut:function(D,E){var F=this.getFxEl();E=E||{};F.queueFx(E,function(){D=D||"t";var B=this.getFxRestore();var N=this.getBox();this.setSize(N);var K=this.fxWrap(B.pos,E,"visible");var L=this.dom.style;L.visibility="visible";L.position="absolute";K.setSize(N);var A=function(){if(E.useDisplay){F.setDisplayed(false)}else{F.hide()}F.fxUnwrap(K,B.pos,E);L.width=B.width;L.height=B.height;F.afterFx(E)};var M,C={to:0};switch(D.toLowerCase()){case"t":L.left=L.bottom="0";M={height:C};break;case"l":L.right=L.top="0";M={width:C};break;case"r":L.left=L.top="0";M={width:C,points:{to:[N.right,N.y]}};break;case"b":L.left=L.top="0";M={height:C,points:{to:[N.x,N.bottom]}};break;case"tl":L.right=L.bottom="0";M={width:C,height:C};break;case"bl":L.right=L.top="0";M={width:C,height:C,points:{to:[N.x,N.bottom]}};break;case"br":L.left=L.top="0";M={width:C,height:C,points:{to:[N.x+N.width,N.bottom]}};break;case"tr":L.left=L.bottom="0";M={width:C,height:C,points:{to:[N.right,N.y]}};break}arguments.callee.anim=K.fxanim(M,E,"motion",0.5,"easeOut",A)});return this},puff:function(D){var C=this.getFxEl();D=D||{};C.queueFx(D,function(){this.clearOpacity();this.show();var B=this.getFxRestore();var I=this.dom.style;var A=function(){if(D.useDisplay){C.setDisplayed(false)}else{C.hide()}C.clearOpacity();C.setPositioning(B.pos);I.width=B.width;I.height=B.height;I.fontSize="";C.afterFx(D)};var H=this.getWidth();var J=this.getHeight();arguments.callee.anim=this.fxanim({width:{to:this.adjustWidth(H*2)},height:{to:this.adjustHeight(J*2)},points:{by:[-(H*0.5),-(J*0.5)]},opacity:{to:0},fontSize:{to:200,unit:"%"}},D,"motion",0.5,"easeOut",A)});return this},switchOff:function(D){var C=this.getFxEl();D=D||{};C.queueFx(D,function(){this.clearOpacity();this.clip();var B=this.getFxRestore();var F=this.dom.style;var A=function(){if(D.useDisplay){C.setDisplayed(false)}else{C.hide()}C.clearOpacity();C.setPositioning(B.pos);F.width=B.width;F.height=B.height;C.afterFx(D)};this.fxanim({opacity:{to:0.3}},null,null,0.1,null,function(){this.clearOpacity();(function(){this.fxanim({height:{to:1},points:{by:[0,this.getHeight()*0.5]}},D,"motion",0.3,"easeIn",A)}).defer(100,this)})});return this},highlight:function(D,E){var F=this.getFxEl();E=E||{};F.queueFx(E,function(){D=D||"ffff9c";var L=E.attr||"backgroundColor";this.clearOpacity();this.show();var C=this.getColor(L);var B=this.dom.style[L];var J=(E.endColor||C)||"ffffff";var A=function(){F.dom.style[L]=B;F.afterFx(E)};var K={};K[L]={from:D,to:J};arguments.callee.anim=this.fxanim(K,E,"color",1,"easeIn",A)});return this},frame:function(E,G,F){var H=this.getFxEl();F=F||{};H.queueFx(F,function(){E=E||"#C3DAF9";if(E.length==6){E="#"+E}G=G||1;var A=F.duration||1;this.show();var C=this.getBox();var B=function(){var J=Ext.getBody().createChild({style:{visbility:"hidden",position:"absolute","z-index":"35000",border:"0px solid "+E}});var D=Ext.isBorderBox?2:1;J.animate({top:{from:C.y,to:C.y-20},left:{from:C.x,to:C.x-20},borderWidth:{from:0,to:10},opacity:{from:1,to:0},height:{from:C.height,to:(C.height+(20*D))},width:{from:C.width,to:(C.width+(20*D))}},A,function(){J.remove();if(--G>0){B()}else{H.afterFx(F)}})};B.call(this)});return this},pause:function(E){var D=this.getFxEl();var F={};D.queueFx(F,function(){setTimeout(function(){D.afterFx(F)},E*1000)});return this},fadeIn:function(D){var C=this.getFxEl();D=D||{};C.queueFx(D,function(){this.setOpacity(0);this.fixDisplay();this.dom.style.visibility="visible";var A=D.endOpacity||1;arguments.callee.anim=this.fxanim({opacity:{to:A}},D,null,0.5,"easeOut",function(){if(A==1){this.clearOpacity()}C.afterFx(D)})});return this},fadeOut:function(D){var C=this.getFxEl();D=D||{};C.queueFx(D,function(){arguments.callee.anim=this.fxanim({opacity:{to:D.endOpacity||0}},D,null,0.5,"easeOut",function(){if(this.visibilityMode==Ext.Element.DISPLAY||D.useDisplay){this.dom.style.display="none"}else{this.dom.style.visibility="hidden"}this.clearOpacity();C.afterFx(D)})});return this},scale:function(D,F,E){this.shift(Ext.apply({},E,{width:D,height:F}));return this},shift:function(D){var C=this.getFxEl();D=D||{};C.queueFx(D,function(){var J={},K=D.width,I=D.height,L=D.x,A=D.y,B=D.opacity;if(K!==undefined){J.width={to:this.adjustWidth(K)}}if(I!==undefined){J.height={to:this.adjustHeight(I)}}if(L!==undefined||A!==undefined){J.points={to:[L!==undefined?L:this.getX(),A!==undefined?A:this.getY()]}}if(B!==undefined){J.opacity={to:B}}if(D.xy!==undefined){J.points={to:D.xy}}arguments.callee.anim=this.fxanim(J,D,"motion",0.35,"easeOut",function(){C.afterFx(D)})});return this},ghost:function(D,E){var F=this.getFxEl();E=E||{};F.queueFx(E,function(){D=D||"b";var C=this.getFxRestore();var M=this.getWidth(),K=this.getHeight();var L=this.dom.style;var A=function(){if(E.useDisplay){F.setDisplayed(false)}else{F.hide()}F.clearOpacity();F.setPositioning(C.pos);L.width=C.width;L.height=C.height;F.afterFx(E)};var N={opacity:{to:0},points:{}},B=N.points;switch(D.toLowerCase()){case"t":B.by=[0,-K];break;case"l":B.by=[-M,0];break;case"r":B.by=[M,0];break;case"b":B.by=[0,K];break;case"tl":B.by=[-M,-K];break;case"bl":B.by=[-M,K];break;case"br":B.by=[M,K];break;case"tr":B.by=[M,-K];break}arguments.callee.anim=this.fxanim(N,E,"motion",0.5,"easeOut",A)});return this},syncFx:function(){this.fxDefaults=Ext.apply(this.fxDefaults||{},{block:false,concurrent:true,stopFx:false});return this},sequenceFx:function(){this.fxDefaults=Ext.apply(this.fxDefaults||{},{block:false,concurrent:false,stopFx:false});return this},nextFx:function(){var B=this.fxQueue[0];if(B){B.call(this)}},hasActiveFx:function(){return this.fxQueue&&this.fxQueue[0]},stopFx:function(){if(this.hasActiveFx()){var B=this.fxQueue[0];if(B&&B.anim&&B.anim.isAnimated()){this.fxQueue=[B];B.anim.stop(true)}}return this},beforeFx:function(B){if(this.hasActiveFx()&&!B.concurrent){if(B.stopFx){this.stopFx();return true}return false}return true},hasFxBlock:function(){var B=this.fxQueue;return B&&B[0]&&B[0].block},queueFx:function(E,D){if(!this.fxQueue){this.fxQueue=[]}if(!this.hasFxBlock()){Ext.applyIf(E,this.fxDefaults);if(!E.concurrent){var F=this.beforeFx(E);D.block=E.block;this.fxQueue.push(D);if(F){this.nextFx()}}else{D.call(this)}}return this},fxWrap:function(H,J,K){var L;if(!J.wrap||!(L=Ext.get(J.wrap))){var G;if(J.fixPosition){G=this.getXY()}var I=document.createElement("div");I.style.visibility=K;L=Ext.get(this.dom.parentNode.insertBefore(I,this.dom));L.setPositioning(H);if(L.getStyle("position")=="static"){L.position("relative")}this.clearPositioning("auto");L.clip();L.dom.appendChild(this.dom);if(G){L.setXY(G)}}return L},fxUnwrap:function(D,E,F){this.clearPositioning();this.setPositioning(E);if(!F.wrap){D.dom.parentNode.insertBefore(this.dom,D.dom);D.remove()}},getFxRestore:function(){var B=this.dom.style;return{pos:this.getPositioning(),width:B.width,height:B.height}},afterFx:function(B){if(B.afterStyle){this.applyStyles(B.afterStyle)}if(B.afterCls){this.addClass(B.afterCls)}if(B.remove===true){this.remove()}Ext.callback(B.callback,B.scope,[this]);if(!B.concurrent){this.fxQueue.shift();this.nextFx()}},getFxEl:function(){return Ext.get(this.dom)},fxanim:function(L,K,N,J,M,H){N=N||"run";K=K||{};var I=Ext.lib.Anim[N](this.dom,L,(K.duration||J)||0.35,(K.easing||M)||"easeOut",function(){Ext.callback(H,this)},this);K.anim=I;return I}};Ext.Fx.resize=Ext.Fx.scale;Ext.apply(Ext.Element.prototype,Ext.Fx);Ext.CompositeElement=function(B){this.elements=[];this.addElements(B)};Ext.CompositeElement.prototype={isComposite:true,addElements:function(G){if(!G){return this}if(typeof G=="string"){G=Ext.Element.selectorFunction(G)}var H=this.elements;var J=H.length-1;for(var I=0,F=G.length;I<F;I++){H[++J]=Ext.get(G[I])}return this},fill:function(B){this.elements=[];this.add(B);return this},filter:function(C){var D=[];this.each(function(A){if(A.is(C)){D[D.length]=A.dom}});this.fill(D);return this},invoke:function(G,J){var H=this.elements;for(var I=0,F=H.length;I<F;I++){Ext.Element.prototype[G].apply(H[I],J)}return this},add:function(B){if(typeof B=="string"){this.addElements(Ext.Element.selectorFunction(B))}else{if(B.length!==undefined){this.addElements(B)}else{this.addElements([B])}}return this},each:function(G,H){var I=this.elements;for(var J=0,F=I.length;J<F;J++){if(G.call(H||I[J],I[J],this,J)===false){break}}return this},item:function(B){return this.elements[B]||null},first:function(){return this.item(0)},last:function(){return this.item(this.elements.length-1)},getCount:function(){return this.elements.length},contains:function(B){return this.indexOf(B)!==-1},indexOf:function(B){return this.elements.indexOf(Ext.get(B))},removeElement:function(J,H){if(Ext.isArray(J)){for(var K=0,G=J.length;K<G;K++){this.removeElement(J[K])}return this}var L=typeof J=="number"?J:this.indexOf(J);if(L!==-1&&this.elements[L]){if(H){var I=this.elements[L];if(I.dom){I.remove()}else{Ext.removeNode(I)}}this.elements.splice(L,1)}return this},replaceElement:function(F,G,E){var H=typeof F=="number"?F:this.indexOf(F);if(H!==-1){if(E){this.elements[H].replaceWith(G)}else{this.elements.splice(H,1,Ext.get(G))}}return this},clear:function(){this.elements=[]}};(function(){Ext.CompositeElement.createCall=function(D,A){if(!D[A]){D[A]=function(){return this.invoke(A,arguments)}}};for(var B in Ext.Element.prototype){if(typeof Ext.Element.prototype[B]=="function"){Ext.CompositeElement.createCall(Ext.CompositeElement.prototype,B)}}})();Ext.CompositeElementLite=function(B){Ext.CompositeElementLite.superclass.constructor.call(this,B);this.el=new Ext.Element.Flyweight()};Ext.extend(Ext.CompositeElementLite,Ext.CompositeElement,{addElements:function(G){if(G){if(Ext.isArray(G)){this.elements=this.elements.concat(G)}else{var H=this.elements;var J=H.length-1;for(var I=0,F=G.length;I<F;I++){H[++J]=G[I]}}}return this},invoke:function(H,L){var J=this.elements;var I=this.el;for(var K=0,G=J.length;K<G;K++){I.dom=J[K];Ext.Element.prototype[H].apply(I,L)}return this},item:function(B){if(!this.elements[B]){return null}this.el.dom=this.elements[B];return this.el},addListener:function(N,I,J,K){var L=this.elements;for(var M=0,H=L.length;M<H;M++){Ext.EventManager.on(L[M],N,I,J||L[M],K)}return this},each:function(H,I){var K=this.elements;var J=this.el;for(var L=0,G=K.length;L<G;L++){J.dom=K[L];if(H.call(I||J,J,this,L)===false){break}}return this},indexOf:function(B){return this.elements.indexOf(Ext.getDom(B))},replaceElement:function(H,I,F){var J=typeof H=="number"?H:this.indexOf(H);if(J!==-1){I=Ext.getDom(I);if(F){var G=this.elements[J];G.parentNode.insertBefore(I,G);Ext.removeNode(G)}this.elements.splice(J,1,I)}return this}});Ext.CompositeElementLite.prototype.on=Ext.CompositeElementLite.prototype.addListener;if(Ext.DomQuery){Ext.Element.selectorFunction=Ext.DomQuery.select}Ext.Element.select=function(E,F,H){var G;if(typeof E=="string"){G=Ext.Element.selectorFunction(E,H)}else{if(E.length!==undefined){G=E}else{throw"Invalid selector"}}if(F===true){return new Ext.CompositeElement(G)}else{return new Ext.CompositeElementLite(G)}};Ext.select=Ext.Element.select;Ext.Updater=function(F,D){F=Ext.get(F);if(!D&&F.updateManager){return F.updateManager}this.el=F;this.defaultUrl=null;this.addEvents("beforeupdate","update","failure");var E=Ext.Updater.defaults;this.sslBlankUrl=E.sslBlankUrl;this.disableCaching=E.disableCaching;this.indicatorText=E.indicatorText;this.showLoadIndicator=E.showLoadIndicator;this.timeout=E.timeout;this.loadScripts=E.loadScripts;this.transaction=null;this.autoRefreshProcId=null;this.refreshDelegate=this.refresh.createDelegate(this);this.updateDelegate=this.update.createDelegate(this);this.formUpdateDelegate=this.formUpdate.createDelegate(this);if(!this.renderer){this.renderer=new Ext.Updater.BasicRenderer()}Ext.Updater.superclass.constructor.call(this)};Ext.extend(Ext.Updater,Ext.util.Observable,{getEl:function(){return this.el},update:function(P,L,J,N){if(this.fireEvent("beforeupdate",this.el,P,L)!==false){var K=this.method,I,O;if(typeof P=="object"){I=P;P=I.url;L=L||I.params;J=J||I.callback;N=N||I.discardUrl;O=I.scope;if(typeof I.method!="undefined"){K=I.method}if(typeof I.nocache!="undefined"){this.disableCaching=I.nocache}if(typeof I.text!="undefined"){this.indicatorText='<div class="loading-indicator">'+I.text+"</div>"}if(typeof I.scripts!="undefined"){this.loadScripts=I.scripts}if(typeof I.timeout!="undefined"){this.timeout=I.timeout}}this.showLoading();if(!N){this.defaultUrl=P}if(typeof P=="function"){P=P.call(this)}K=K||(L?"POST":"GET");if(K=="GET"){P=this.prepareUrl(P)}var M=Ext.apply(I||{},{url:P,params:(typeof L=="function"&&O)?L.createDelegate(O):L,success:this.processSuccess,failure:this.processFailure,scope:this,callback:undefined,timeout:(this.timeout*1000),argument:{options:I,url:P,form:null,callback:J,scope:O||window,params:L}});this.transaction=Ext.Ajax.request(M)}},formUpdate:function(G,E,H,F){if(this.fireEvent("beforeupdate",this.el,G,E)!==false){if(typeof E=="function"){E=E.call(this)}G=Ext.getDom(G);this.transaction=Ext.Ajax.request({form:G,url:E,success:this.processSuccess,failure:this.processFailure,scope:this,timeout:(this.timeout*1000),argument:{url:E,form:G,callback:F,reset:H}});this.showLoading.defer(1,this)}},refresh:function(B){if(this.defaultUrl==null){return }this.update(this.defaultUrl,null,B,true)},startAutoRefresh:function(J,I,H,G,F){if(F){this.update(I||this.defaultUrl,H,G,true)}if(this.autoRefreshProcId){clearInterval(this.autoRefreshProcId)}this.autoRefreshProcId=setInterval(this.update.createDelegate(this,[I||this.defaultUrl,H,G,true]),J*1000)},stopAutoRefresh:function(){if(this.autoRefreshProcId){clearInterval(this.autoRefreshProcId);delete this.autoRefreshProcId}},isAutoRefreshing:function(){return this.autoRefreshProcId?true:false},showLoading:function(){if(this.showLoadIndicator){this.el.update(this.indicatorText)}},prepareUrl:function(D){if(this.disableCaching){var C="_dc="+(new Date().getTime());if(D.indexOf("?")!==-1){D+="&"+C}else{D+="?"+C}}return D},processSuccess:function(C){this.transaction=null;if(C.argument.form&&C.argument.reset){try{C.argument.form.reset()}catch(D){}}if(this.loadScripts){this.renderer.render(this.el,C,this,this.updateComplete.createDelegate(this,[C]))}else{this.renderer.render(this.el,C,this);this.updateComplete(C)}},updateComplete:function(B){this.fireEvent("update",this.el,B);if(typeof B.argument.callback=="function"){B.argument.callback.call(B.argument.scope,this.el,true,B,B.argument.options)}},processFailure:function(B){this.transaction=null;this.fireEvent("failure",this.el,B);if(typeof B.argument.callback=="function"){B.argument.callback.call(B.argument.scope,this.el,false,B,B.argument.options)}},setRenderer:function(B){this.renderer=B},getRenderer:function(){return this.renderer},setDefaultUrl:function(B){this.defaultUrl=B},abort:function(){if(this.transaction){Ext.Ajax.abort(this.transaction)}},isUpdating:function(){if(this.transaction){return Ext.Ajax.isLoading(this.transaction)}return false}});Ext.Updater.defaults={timeout:30,loadScripts:false,sslBlankUrl:(Ext.SSL_SECURE_URL||"javascript:false"),disableCaching:false,showLoadIndicator:true,indicatorText:'<div class="loading-indicator">Loading...</div>'};Ext.Updater.updateElement=function(H,I,G,J){var F=Ext.get(H).getUpdater();Ext.apply(F,J);F.update(I,G,J?J.callback:null)};Ext.Updater.update=Ext.Updater.updateElement;Ext.Updater.BasicRenderer=function(){};Ext.Updater.BasicRenderer.prototype={render:function(G,E,H,F){G.update(E.responseText,H.loadScripts,F)}};Ext.UpdateManager=Ext.Updater;Date.parseFunctions={count:0};Date.parseRegexes=[];Date.formatFunctions={count:0};Date.prototype.dateFormat=function(D){if(Date.formatFunctions[D]==null){Date.createNewFormat(D)}var C=Date.formatFunctions[D];return this[C]()};Date.prototype.format=Date.prototype.dateFormat;Date.createNewFormat=function(format){var funcName="format"+Date.formatFunctions.count++;Date.formatFunctions[format]=funcName;var code="Date.prototype."+funcName+" = function(){return ";var special=false;var ch="";for(var i=0;i<format.length;++i){ch=format.charAt(i);if(!special&&ch=="\\"){special=true}else{if(special){special=false;code+="'"+String.escape(ch)+"' + "}else{code+=Date.getFormatCode(ch)}}}eval(code.substring(0,code.length-3)+";}")};Date.getFormatCode=function(L){switch(L){case"d":return"String.leftPad(this.getDate(), 2, '0') + ";case"D":return"Date.getShortDayName(this.getDay()) + ";case"j":return"this.getDate() + ";case"l":return"Date.dayNames[this.getDay()] + ";case"N":return"(this.getDay() ? this.getDay() : 7) + ";case"S":return"this.getSuffix() + ";case"w":return"this.getDay() + ";case"z":return"this.getDayOfYear() + ";case"W":return"String.leftPad(this.getWeekOfYear(), 2, '0') + ";case"F":return"Date.monthNames[this.getMonth()] + ";case"m":return"String.leftPad(this.getMonth() + 1, 2, '0') + ";case"M":return"Date.getShortMonthName(this.getMonth()) + ";case"n":return"(this.getMonth() + 1) + ";case"t":return"this.getDaysInMonth() + ";case"L":return"(this.isLeapYear() ? 1 : 0) + ";case"o":return"(this.getFullYear() + (this.getWeekOfYear() == 1 && this.getMonth() > 0 ? +1 : (this.getWeekOfYear() >= 52 && this.getMonth() < 11 ? -1 : 0))) + ";case"Y":return"this.getFullYear() + ";case"y":return"('' + this.getFullYear()).substring(2, 4) + ";case"a":return"(this.getHours() < 12 ? 'am' : 'pm') + ";case"A":return"(this.getHours() < 12 ? 'AM' : 'PM') + ";case"g":return"((this.getHours() % 12) ? this.getHours() % 12 : 12) + ";case"G":return"this.getHours() + ";case"h":return"String.leftPad((this.getHours() % 12) ? this.getHours() % 12 : 12, 2, '0') + ";case"H":return"String.leftPad(this.getHours(), 2, '0') + ";case"i":return"String.leftPad(this.getMinutes(), 2, '0') + ";case"s":return"String.leftPad(this.getSeconds(), 2, '0') + ";case"u":return"String.leftPad(this.getMilliseconds(), 3, '0') + ";case"O":return"this.getGMTOffset() + ";case"P":return"this.getGMTOffset(true) + ";case"T":return"this.getTimezone() + ";case"Z":return"(this.getTimezoneOffset() * -60) + ";case"c":for(var J=Date.getFormatCode,I="Y-m-dTH:i:sP",M="",N=0,H=I.length;N<H;++N){var K=I.charAt(N);M+=K=="T"?"'T' + ":J(K)}return M;case"U":return"Math.round(this.getTime() / 1000) + ";default:return"'"+String.escape(L)+"' + "}};Date.parseDate=function(D,E){if(Date.parseFunctions[E]==null){Date.createParser(E)}var F=Date.parseFunctions[E];return Date[F](D)};Date.createParser=function(format){var funcName="parse"+Date.parseFunctions.count++;var regexNum=Date.parseRegexes.length;var currentGroup=1;Date.parseFunctions[format]=funcName;var code="Date."+funcName+" = function(input){\nvar y = -1, m = -1, d = -1, h = -1, i = -1, s = -1, ms = -1, o, z, u, v;\ninput = String(input);var d = new Date();\ny = d.getFullYear();\nm = d.getMonth();\nd = d.getDate();\nvar results = input.match(Date.parseRegexes["+regexNum+"]);\nif (results && results.length > 0) {";var regex="";var special=false;var ch="";for(var i=0;i<format.length;++i){ch=format.charAt(i);if(!special&&ch=="\\"){special=true}else{if(special){special=false;regex+=String.escape(ch)}else{var obj=Date.formatCodeToRegex(ch,currentGroup);currentGroup+=obj.g;regex+=obj.s;if(obj.g&&obj.c){code+=obj.c}}}}code+="if (u)\n{v = new Date(u * 1000);}else if (y >= 0 && m >= 0 && d > 0 && h >= 0 && i >= 0 && s >= 0 && ms >= 0)\n{v = new Date(y, m, d, h, i, s, ms);}\nelse if (y >= 0 && m >= 0 && d > 0 && h >= 0 && i >= 0 && s >= 0)\n{v = new Date(y, m, d, h, i, s);}\nelse if (y >= 0 && m >= 0 && d > 0 && h >= 0 && i >= 0)\n{v = new Date(y, m, d, h, i);}\nelse if (y >= 0 && m >= 0 && d > 0 && h >= 0)\n{v = new Date(y, m, d, h);}\nelse if (y >= 0 && m >= 0 && d > 0)\n{v = new Date(y, m, d);}\nelse if (y >= 0 && m >= 0)\n{v = new Date(y, m);}\nelse if (y >= 0)\n{v = new Date(y);}\n}return (v && (z || o))?\n    (z ? v.add(Date.SECOND, (v.getTimezoneOffset() * 60) + (z*1)) :\n        v.add(Date.HOUR, (v.getGMTOffset() / 100) + (o / -100))) : v\n;}";Date.parseRegexes[regexNum]=new RegExp("^"+regex+"$","i");eval(code)};Date.formatCodeToRegex=function(K,L){switch(K){case"d":return{g:1,c:"d = parseInt(results["+L+"], 10);\n",s:"(\\d{2})"};case"D":for(var O=[],M=0;M<7;O.push(Date.getShortDayName(M)),++M){}return{g:0,c:null,s:"(?:"+O.join("|")+")"};case"j":return{g:1,c:"d = parseInt(results["+L+"], 10);\n",s:"(\\d{1,2})"};case"l":return{g:0,c:null,s:"(?:"+Date.dayNames.join("|")+")"};case"N":return{g:0,c:null,s:"[1-7]"};case"S":return{g:0,c:null,s:"(?:st|nd|rd|th)"};case"w":return{g:0,c:null,s:"[0-6]"};case"z":return{g:0,c:null,s:"(?:\\d{1,3}"};case"W":return{g:0,c:null,s:"(?:\\d{2})"};case"F":return{g:1,c:"m = parseInt(Date.getMonthNumber(results["+L+"]), 10);\n",s:"("+Date.monthNames.join("|")+")"};case"m":return{g:1,c:"m = parseInt(results["+L+"], 10) - 1;\n",s:"(\\d{2})"};case"M":for(var O=[],M=0;M<12;O.push(Date.getShortMonthName(M)),++M){}return{g:1,c:"m = parseInt(Date.getMonthNumber(results["+L+"]), 10);\n",s:"("+O.join("|")+")"};case"n":return{g:1,c:"m = parseInt(results["+L+"], 10) - 1;\n",s:"(\\d{1,2})"};case"t":return{g:0,c:null,s:"(?:\\d{2})"};case"L":return{g:0,c:null,s:"(?:1|0)"};case"o":case"Y":return{g:1,c:"y = parseInt(results["+L+"], 10);\n",s:"(\\d{4})"};case"y":return{g:1,c:"var ty = parseInt(results["+L+"], 10);\ny = ty > Date.y2kYear ? 1900 + ty : 2000 + ty;\n",s:"(\\d{1,2})"};case"a":return{g:1,c:"if (results["+L+"] == 'am') {\nif (h == 12) { h = 0; }\n} else { if (h < 12) { h += 12; }}",s:"(am|pm)"};case"A":return{g:1,c:"if (results["+L+"] == 'AM') {\nif (h == 12) { h = 0; }\n} else { if (h < 12) { h += 12; }}",s:"(AM|PM)"};case"g":case"G":return{g:1,c:"h = parseInt(results["+L+"], 10);\n",s:"(\\d{1,2})"};case"h":case"H":return{g:1,c:"h = parseInt(results["+L+"], 10);\n",s:"(\\d{2})"};case"i":return{g:1,c:"i = parseInt(results["+L+"], 10);\n",s:"(\\d{2})"};case"s":return{g:1,c:"s = parseInt(results["+L+"], 10);\n",s:"(\\d{2})"};case"u":return{g:1,c:"ms = parseInt(results["+L+"], 10);\n",s:"(\\d{3})"};case"O":return{g:1,c:["o = results[",L,"];\n","var sn = o.substring(0,1);\n","var hr = o.substring(1,3)*1 + Math.floor(o.substring(3,5) / 60);\n","var mn = o.substring(3,5) % 60;\n","o = ((-12 <= (hr*60 + mn)/60) && ((hr*60 + mn)/60 <= 14))?\n","    (sn + String.leftPad(hr, 2, '0') + String.leftPad(mn, 2, '0')) : null;\n"].join(""),s:"([+-]\\d{4})"};case"P":return{g:1,c:["o = results[",L,"];\n","var sn = o.substring(0,1);\n","var hr = o.substring(1,3)*1 + Math.floor(o.substring(4,6) / 60);\n","var mn = o.substring(4,6) % 60;\n","o = ((-12 <= (hr*60 + mn)/60) && ((hr*60 + mn)/60 <= 14))?\n","    (sn + String.leftPad(hr, 2, '0') + String.leftPad(mn, 2, '0')) : null;\n"].join(""),s:"([+-]\\d{2}:\\d{2})"};case"T":return{g:0,c:null,s:"[A-Z]{1,4}"};case"Z":return{g:1,c:"z = results["+L+"] * 1;\nz = (-43200 <= z && z <= 50400)? z : null;\n",s:"([+-]?\\d{1,5})"};case"c":var J=Date.formatCodeToRegex,N=[];var I=[J("Y",1),J("m",2),J("d",3),J("h",4),J("i",5),J("s",6),J("P",7)];for(var M=0,P=I.length;M<P;++M){N.push(I[M].c)}return{g:1,c:N.join(""),s:I[0].s+"-"+I[1].s+"-"+I[2].s+"T"+I[3].s+":"+I[4].s+":"+I[5].s+I[6].s};case"U":return{g:1,c:"u = parseInt(results["+L+"], 10);\n",s:"(-?\\d+)"};default:return{g:0,c:null,s:Ext.escapeRe(K)}}};Date.prototype.getTimezone=function(){return this.toString().replace(/^.* (?:\((.*)\)|([A-Z]{1,4})(?:[\-+][0-9]{4})?(?: -?\d+)?)$/,"$1$2").replace(/[^A-Z]/g,"")};Date.prototype.getGMTOffset=function(B){return(this.getTimezoneOffset()>0?"-":"+")+String.leftPad(Math.abs(Math.floor(this.getTimezoneOffset()/60)),2,"0")+(B?":":"")+String.leftPad(this.getTimezoneOffset()%60,2,"0")};Date.prototype.getDayOfYear=function(){var C=0;Date.daysInMonth[1]=this.isLeapYear()?29:28;for(var D=0;D<this.getMonth();++D){C+=Date.daysInMonth[D]}return C+this.getDate()-1};Date.prototype.getWeekOfYear=function(){var J=86400000;var I=7*J;var H=Date.UTC(this.getFullYear(),this.getMonth(),this.getDate()+3)/J;var F=Math.floor(H/7);var G=new Date(F*I).getUTCFullYear();return F-Math.floor(Date.UTC(G,0,7)/I)+1};Date.prototype.isLeapYear=function(){var B=this.getFullYear();return !!((B&3)==0&&(B%100||(B%400==0&&B)))};Date.prototype.getFirstDayOfMonth=function(){var B=(this.getDay()-(this.getDate()-1))%7;return(B<0)?(B+7):B};Date.prototype.getLastDayOfMonth=function(){var B=(this.getDay()+(Date.daysInMonth[this.getMonth()]-this.getDate()))%7;return(B<0)?(B+7):B};Date.prototype.getFirstDateOfMonth=function(){return new Date(this.getFullYear(),this.getMonth(),1)};Date.prototype.getLastDateOfMonth=function(){return new Date(this.getFullYear(),this.getMonth(),this.getDaysInMonth())};Date.prototype.getDaysInMonth=function(){Date.daysInMonth[1]=this.isLeapYear()?29:28;return Date.daysInMonth[this.getMonth()]};Date.prototype.getSuffix=function(){switch(this.getDate()){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th"}};Date.daysInMonth=[31,28,31,30,31,30,31,31,30,31,30,31];Date.monthNames=["January","February","March","April","May","June","July","August","September","October","November","December"];Date.getShortMonthName=function(B){return Date.monthNames[B].substring(0,3)};Date.dayNames=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"];Date.getShortDayName=function(B){return Date.dayNames[B].substring(0,3)};Date.y2kYear=50;Date.monthNumbers={Jan:0,Feb:1,Mar:2,Apr:3,May:4,Jun:5,Jul:6,Aug:7,Sep:8,Oct:9,Nov:10,Dec:11};Date.getMonthNumber=function(B){return Date.monthNumbers[B.substring(0,1).toUpperCase()+B.substring(1,3).toLowerCase()]};Date.prototype.clone=function(){return new Date(this.getTime())};Date.prototype.clearTime=function(B){if(B){return this.clone().clearTime()}this.setHours(0);this.setMinutes(0);this.setSeconds(0);this.setMilliseconds(0);return this};if(Ext.isSafari){Date.brokenSetMonth=Date.prototype.setMonth;Date.prototype.setMonth=function(E){if(E<=-1){var F=Math.ceil(-E);var G=Math.ceil(F/12);var H=(F%12)?12-F%12:0;this.setFullYear(this.getFullYear()-G);return Date.brokenSetMonth.call(this,H)}else{return Date.brokenSetMonth.apply(this,arguments)}}}Date.MILLI="ms";Date.SECOND="s";Date.MINUTE="mi";Date.HOUR="h";Date.DAY="d";Date.MONTH="mo";Date.YEAR="y";Date.prototype.add=function(H,G){var F=this.clone();if(!H||G===0){return F}switch(H.toLowerCase()){case Date.MILLI:F.setMilliseconds(this.getMilliseconds()+G);break;case Date.SECOND:F.setSeconds(this.getSeconds()+G);break;case Date.MINUTE:F.setMinutes(this.getMinutes()+G);break;case Date.HOUR:F.setHours(this.getHours()+G);break;case Date.DAY:F.setDate(this.getDate()+G);break;case Date.MONTH:var E=this.getDate();if(E>28){E=Math.min(E,this.getFirstDateOfMonth().add("mo",G).getLastDateOfMonth().getDate())}F.setDate(E);F.setMonth(this.getMonth()+G);break;case Date.YEAR:F.setFullYear(this.getFullYear()+G);break}return F};Date.prototype.between=function(E,D){var F=this.getTime();return E.getTime()<=F&&F<=D.getTime()};Ext.util.DelayedTask=function(K,L,H){var I=null,J,N;var M=function(){var A=new Date().getTime();if(A-N>=J){clearInterval(I);I=null;K.apply(L,H||[])}};this.delay=function(C,A,B,D){if(I&&C!=J){this.cancel()}J=C;N=new Date().getTime();K=A||K;L=B||L;H=D||H;if(!I){I=setInterval(M,J)}};this.cancel=function(){if(I){clearInterval(I);I=null}}};Ext.util.TaskRunner=function(R){R=R||10;var Q=[],M=[];var L=0;var P=false;var J=function(){P=false;clearInterval(L);L=0};var O=function(){if(!P){P=true;L=setInterval(N,R)}};var K=function(A){M.push(A);if(A.onStop){A.onStop.apply(A.scope||A)}};var N=function(){if(M.length>0){for(var D=0,B=M.length;D<B;D++){Q.remove(M[D])}M=[];if(Q.length<1){J();return }}var F=new Date().getTime();for(var D=0,B=Q.length;D<B;++D){var E=Q[D];var C=F-E.taskRunTime;if(E.interval<=C){var A=E.run.apply(E.scope||E,E.args||[++E.taskRunCount]);E.taskRunTime=F;if(A===false||E.taskRunCount===E.repeat){K(E);return }}if(E.duration&&E.duration<=(F-E.taskStartTime)){K(E)}}};this.start=function(A){Q.push(A);A.taskStartTime=new Date().getTime();A.taskRunTime=0;A.taskRunCount=0;O();return A};this.stop=function(A){K(A);return A};this.stopAll=function(){J();for(var A=0,B=Q.length;A<B;A++){if(Q[A].onStop){Q[A].onStop()}}Q=[];M=[]}};Ext.TaskMgr=new Ext.util.TaskRunner();Ext.util.MixedCollection=function(D,C){this.items=[];this.map={};this.keys=[];this.length=0;this.addEvents("clear","add","replace","remove","sort");this.allowFunctions=D===true;if(C){this.getKey=C}Ext.util.MixedCollection.superclass.constructor.call(this)};Ext.extend(Ext.util.MixedCollection,Ext.util.Observable,{allowFunctions:false,add:function(F,E){if(arguments.length==1){E=arguments[0];F=this.getKey(E)}if(typeof F=="undefined"||F===null){this.length++;this.items.push(E);this.keys.push(null)}else{var D=this.map[F];if(D){return this.replace(F,E)}this.length++;this.items.push(E);this.map[F]=E;this.keys.push(F)}this.fireEvent("add",this.length-1,E,F);return E},getKey:function(B){return B.id},replace:function(G,F){if(arguments.length==1){F=arguments[0];G=this.getKey(F)}var E=this.item(G);if(typeof G=="undefined"||G===null||typeof E=="undefined"){return this.add(G,F)}var H=this.indexOfKey(G);this.items[H]=F;this.map[G]=F;this.fireEvent("replace",G,E,F);return F},addAll:function(G){if(arguments.length>1||Ext.isArray(G)){var J=arguments.length>1?arguments:G;for(var H=0,F=J.length;H<F;H++){this.add(J[H])}}else{for(var I in G){if(this.allowFunctions||typeof G[I]!="function"){this.add(I,G[I])}}}},each:function(G,H){var J=[].concat(this.items);for(var I=0,F=J.length;I<F;I++){if(G.call(H||J[I],J[I],I,F)===false){break}}},eachKey:function(F,G){for(var H=0,E=this.keys.length;H<E;H++){F.call(G||window,this.keys[H],this.items[H],H,E)}},find:function(F,G){for(var H=0,E=this.items.length;H<E;H++){if(F.call(G||window,this.items[H],this.keys[H])){return this.items[H]}}return null},insert:function(D,F,E){if(arguments.length==2){E=arguments[1];F=this.getKey(E)}if(D>=this.length){return this.add(F,E)}this.length++;this.items.splice(D,0,E);if(typeof F!="undefined"&&F!=null){this.map[F]=E}this.keys.splice(D,0,F);this.fireEvent("add",D,E,F);return E},remove:function(B){return this.removeAt(this.indexOf(B))},removeAt:function(D){if(D<this.length&&D>=0){this.length--;var E=this.items[D];this.items.splice(D,1);var F=this.keys[D];if(typeof F!="undefined"){delete this.map[F]}this.keys.splice(D,1);this.fireEvent("remove",E,F);return E}return false},removeKey:function(B){return this.removeAt(this.indexOfKey(B))},getCount:function(){return this.length},indexOf:function(B){return this.items.indexOf(B)},indexOfKey:function(B){return this.keys.indexOf(B)},item:function(C){var D=typeof this.map[C]!="undefined"?this.map[C]:this.items[C];return typeof D!="function"||this.allowFunctions?D:null},itemAt:function(B){return this.items[B]},key:function(B){return this.map[B]},contains:function(B){return this.indexOf(B)!=-1},containsKey:function(B){return typeof this.map[B]!="undefined"},clear:function(){this.length=0;this.items=[];this.keys=[];this.map={};this.fireEvent("clear")},first:function(){return this.items[0]},last:function(){return this.items[this.length-1]},_sort:function(N,M,O){var K=String(M).toUpperCase()=="DESC"?-1:1;O=O||function(A,B){return A-B};var P=[],L=this.keys,Q=this.items;for(var J=0,R=Q.length;J<R;J++){P[P.length]={key:L[J],value:Q[J],index:J}}P.sort(function(B,C){var A=O(B[N],C[N])*K;if(A==0){A=(B.index<C.index?-1:1)}return A});for(var J=0,R=P.length;J<R;J++){Q[J]=P[J].value;L[J]=P[J].key}this.fireEvent("sort",this)},sort:function(C,D){this._sort("value",C,D)},keySort:function(C,D){this._sort("key",C,D||function(A,B){return String(A).toUpperCase()-String(B).toUpperCase()})},getRange:function(G,F){var J=this.items;if(J.length<1){return[]}G=G||0;F=Math.min(typeof F=="undefined"?this.length-1:F,this.length-1);var H=[];if(G<=F){for(var I=G;I<=F;I++){H[H.length]=J[I]}}else{for(var I=G;I>=F;I--){H[H.length]=J[I]}}return H},filter:function(G,H,F,E){if(Ext.isEmpty(H,false)){return this.clone()}H=this.createValueMatcher(H,F,E);return this.filterBy(function(A){return A&&H.test(A[G])})},filterBy:function(J,K){var I=new Ext.util.MixedCollection();I.getKey=this.getKey;var N=this.keys,L=this.items;for(var M=0,H=L.length;M<H;M++){if(J.call(K||this,L[M],N[M])){I.add(N[M],L[M])}}return I},findIndex:function(I,J,G,H,F){if(Ext.isEmpty(J,false)){return -1}J=this.createValueMatcher(J,H,F);return this.findIndexBy(function(A){return A&&J.test(A[I])},null,G)},findIndexBy:function(J,K,I){var N=this.keys,L=this.items;for(var M=(I||0),H=L.length;M<H;M++){if(J.call(K||this,L[M],N[M])){return M}}if(typeof I=="number"&&I>0){for(var M=0;M<I;M++){if(J.call(K||this,L[M],N[M])){return M}}}return -1},createValueMatcher:function(F,E,D){if(!F.exec){F=String(F);F=new RegExp((E===true?"":"^")+Ext.escapeRe(F),D?"":"i")}return F},clone:function(){var G=new Ext.util.MixedCollection();var J=this.keys,H=this.items;for(var I=0,F=H.length;I<F;I++){G.add(J[I],H[I])}G.getKey=this.getKey;return G}});Ext.util.MixedCollection.prototype.get=Ext.util.MixedCollection.prototype.item;Ext.util.JSON=new (function(){var useHasOwn={}.hasOwnProperty?true:false;var pad=function(n){return n<10?"0"+n:n};var m={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"};var encodeString=function(s){if(/["\\\x00-\x1f]/.test(s)){return'"'+s.replace(/([\x00-\x1f\\"])/g,function(a,b){var c=m[b];if(c){return c}c=b.charCodeAt();return"\\u00"+Math.floor(c/16).toString(16)+(c%16).toString(16)})+'"'}return'"'+s+'"'};var encodeArray=function(o){var a=["["],b,i,l=o.length,v;for(i=0;i<l;i+=1){v=o[i];switch(typeof v){case"undefined":case"function":case"unknown":break;default:if(b){a.push(",")}a.push(v===null?"null":Ext.util.JSON.encode(v));b=true}}a.push("]");return a.join("")};var encodeDate=function(o){return'"'+o.getFullYear()+"-"+pad(o.getMonth()+1)+"-"+pad(o.getDate())+"T"+pad(o.getHours())+":"+pad(o.getMinutes())+":"+pad(o.getSeconds())+'"'};this.encode=function(o){if(typeof o=="undefined"||o===null){return"null"}else{if(Ext.isArray(o)){return encodeArray(o)}else{if(Ext.isDate(o)){return encodeDate(o)}else{if(typeof o=="string"){return encodeString(o)}else{if(typeof o=="number"){return isFinite(o)?String(o):"null"}else{if(typeof o=="boolean"){return String(o)}else{var a=["{"],b,i,v;for(i in o){if(!useHasOwn||o.hasOwnProperty(i)){v=o[i];switch(typeof v){case"undefined":case"function":case"unknown":break;default:if(b){a.push(",")}a.push(this.encode(i),":",v===null?"null":this.encode(v));b=true}}}a.push("}");return a.join("")}}}}}}};this.decode=function(json){return eval("("+json+")")}})();Ext.encode=Ext.util.JSON.encode;Ext.decode=Ext.util.JSON.decode;Ext.util.Format=function(){var trimRe=/^\s+|\s+$/g;return{ellipsis:function(value,len){if(value&&value.length>len){return value.substr(0,len-3)+"..."}return value},undef:function(value){return value!==undefined?value:""},defaultValue:function(value,defaultValue){return value!==undefined&&value!==""?value:defaultValue},htmlEncode:function(value){return !value?value:String(value).replace(/&/g,"&amp;").replace(/>/g,"&gt;").replace(/</g,"&lt;").replace(/"/g,"&quot;")},htmlDecode:function(value){return !value?value:String(value).replace(/&amp;/g,"&").replace(/&gt;/g,">").replace(/&lt;/g,"<").replace(/&quot;/g,'"')},trim:function(value){return String(value).replace(trimRe,"")},substr:function(value,start,length){return String(value).substr(start,length)},lowercase:function(value){return String(value).toLowerCase()},uppercase:function(value){return String(value).toUpperCase()},capitalize:function(value){return !value?value:value.charAt(0).toUpperCase()+value.substr(1).toLowerCase()},call:function(value,fn){if(arguments.length>2){var args=Array.prototype.slice.call(arguments,2);args.unshift(value);return eval(fn).apply(window,args)}else{return eval(fn).call(window,value)}},usMoney:function(v){v=(Math.round((v-0)*100))/100;v=(v==Math.floor(v))?v+".00":((v*10==Math.floor(v*10))?v+"0":v);v=String(v);var ps=v.split(".");var whole=ps[0];var sub=ps[1]?"."+ps[1]:".00";var r=/(\d+)(\d{3})/;while(r.test(whole)){whole=whole.replace(r,"$1,$2")}v=whole+sub;if(v.charAt(0)=="-"){return"-$"+v.substr(1)}return"$"+v},date:function(v,format){if(!v){return""}if(!Ext.isDate(v)){v=new Date(Date.parse(v))}return v.dateFormat(format||"m/d/Y")},dateRenderer:function(format){return function(v){return Ext.util.Format.date(v,format)}},stripTagsRE:/<\/?[^>]+>/gi,stripTags:function(v){return !v?v:String(v).replace(this.stripTagsRE,"")},stripScriptsRe:/(?:<script.*?>)((\n|\r|.)*?)(?:<\/script>)/ig,stripScripts:function(v){return !v?v:String(v).replace(this.stripScriptsRe,"")},fileSize:function(size){if(size<1024){return size+" bytes"}else{if(size<1048576){return(Math.round(((size*10)/1024))/10)+" KB"}else{return(Math.round(((size*10)/1048576))/10)+" MB"}}},math:function(){var fns={};return function(v,a){if(!fns[a]){fns[a]=new Function("v","return v "+a+";")}return fns[a](v)}}()}}();Ext.XTemplate=function(){Ext.XTemplate.superclass.constructor.apply(this,arguments);var U=this.html;U=["<tpl>",U,"</tpl>"].join("");var V=/<tpl\b[^>]*>((?:(?=([^<]+))\2|<(?!tpl\b[^>]*>))*?)<\/tpl>/;var W=/^<tpl\b[^>]*?for="(.*?)"/;var Y=/^<tpl\b[^>]*?if="(.*?)"/;var a=/^<tpl\b[^>]*?exec="(.*?)"/;var R,S=0;var d=[];while(R=U.match(V)){var X=R[0].match(W);var Z=R[0].match(Y);var b=R[0].match(a);var g=null,c=null,Q=null;var T=X&&X[1]?X[1]:"";if(Z){g=Z&&Z[1]?Z[1]:null;if(g){c=new Function("values","parent","xindex","xcount","with(values){ return "+(Ext.util.Format.htmlDecode(g))+"; }")}}if(b){g=b&&b[1]?b[1]:null;if(g){Q=new Function("values","parent","xindex","xcount","with(values){ "+(Ext.util.Format.htmlDecode(g))+"; }")}}if(T){switch(T){case".":T=new Function("values","parent","with(values){ return values; }");break;case"..":T=new Function("values","parent","with(values){ return parent; }");break;default:T=new Function("values","parent","with(values){ return "+T+"; }")}}d.push({id:S,target:T,exec:Q,test:c,body:R[1]||""});U=U.replace(R[0],"{xtpl"+S+"}");++S}for(var e=d.length-1;e>=0;--e){this.compileTpl(d[e])}this.master=d[d.length-1];this.tpls=d};Ext.extend(Ext.XTemplate,Ext.Template,{re:/\{([\w-\.\#]+)(?:\:([\w\.]*)(?:\((.*?)?\))?)?(\s?[\+\-\*\\]\s?[\d\.\+\-\*\\\(\)]+)?\}/g,codeRe:/\{\[((?:\\\]|.|\n)*?)\]\}/g,applySubTemplate:function(N,Q,R,K,L){var O=this.tpls[N];if(O.test&&!O.test.call(this,Q,R,K,L)){return""}if(O.exec&&O.exec.call(this,Q,R,K,L)){return""}var P=O.target?O.target.call(this,Q,R):Q;R=O.target?Q:R;if(O.target&&Ext.isArray(P)){var M=[];for(var T=0,S=P.length;T<S;T++){M[M.length]=O.compiled.call(this,P[T],R,T+1,S)}return M.join("")}return O.compiled.call(this,P,R,K,L)},compileTpl:function(tpl){var fm=Ext.util.Format;var useF=this.disableFormats!==true;var sep=Ext.isGecko?"+":",";var fn=function(m,name,format,args,math){if(name.substr(0,4)=="xtpl"){return"'"+sep+"this.applySubTemplate("+name.substr(4)+", values, parent, xindex, xcount)"+sep+"'"}var v;if(name==="."){v="values"}else{if(name==="#"){v="xindex"}else{if(name.indexOf(".")!=-1){v=name}else{v="values['"+name+"']"}}}if(math){v="("+v+math+")"}if(format&&useF){args=args?","+args:"";if(format.substr(0,5)!="this."){format="fm."+format+"("}else{format='this.call("'+format.substr(5)+'", ';args=", values"}}else{args="";format="("+v+" === undefined ? '' : "}return"'"+sep+format+v+args+")"+sep+"'"};var codeFn=function(m,code){return"'"+sep+"("+code+")"+sep+"'"};var body;if(Ext.isGecko){body="tpl.compiled = function(values, parent, xindex, xcount){ return '"+tpl.body.replace(/(\r\n|\n)/g,"\\n").replace(/'/g,"\\'").replace(this.re,fn).replace(this.codeRe,codeFn)+"';};"}else{body=["tpl.compiled = function(values, parent, xindex, xcount){ return ['"];body.push(tpl.body.replace(/(\r\n|\n)/g,"\\n").replace(/'/g,"\\'").replace(this.re,fn).replace(this.codeRe,codeFn));body.push("'].join('');};");body=body.join("")}eval(body);return this},apply:function(B){return this.master.compiled.call(this,B,{},1,1)},applyTemplate:function(B){return this.master.compiled.call(this,B,{},1,1)},compile:function(){return this}});Ext.XTemplate.from=function(B){B=Ext.getDom(B);return new Ext.XTemplate(B.value||B.innerHTML)};Ext.util.CSS=function(){var F=null;var G=document;var H=/(-[a-z])/gi;var E=function(B,A){return A.charAt(1).toUpperCase()};return{createStyleSheet:function(D,A){var K;var L=G.getElementsByTagName("head")[0];var B=G.createElement("style");B.setAttribute("type","text/css");if(A){B.setAttribute("id",A)}if(Ext.isIE){L.appendChild(B);K=B.styleSheet;K.cssText=D}else{try{B.appendChild(G.createTextNode(D))}catch(C){B.cssText=D}L.appendChild(B);K=B.styleSheet?B.styleSheet:(B.sheet||G.styleSheets[G.styleSheets.length-1])}this.cacheStyleSheet(K);return K},removeStyleSheet:function(A){var B=G.getElementById(A);if(B){B.parentNode.removeChild(B)}},swapStyleSheet:function(A,C){this.removeStyleSheet(A);var B=G.createElement("link");B.setAttribute("rel","stylesheet");B.setAttribute("type","text/css");B.setAttribute("id",A);B.setAttribute("href",C);G.getElementsByTagName("head")[0].appendChild(B)},refreshCache:function(){return this.getRules(true)},cacheStyleSheet:function(C){if(!F){F={}}try{var A=C.cssRules||C.rules;for(var D=A.length-1;D>=0;--D){F[A[D].selectorText]=A[D]}}catch(B){}},getRules:function(D){if(F==null||D){F={};var B=G.styleSheets;for(var C=0,J=B.length;C<J;C++){try{this.cacheStyleSheet(B[C])}catch(A){}}}return F},getRule:function(D,B){var C=this.getRules(B);if(!Ext.isArray(D)){return C[D]}for(var A=0;A<D.length;A++){if(C[D[A]]){return C[D[A]]}}return null},updateRule:function(J,B,C){if(!Ext.isArray(J)){var A=this.getRule(J);if(A){A.style[B.replace(H,E)]=C;return true}}else{for(var D=0;D<J.length;D++){if(this.updateRule(J[D],B,C)){return true}}}return false}}}();Ext.util.ClickRepeater=function(D,C){this.el=Ext.get(D);this.el.unselectable();Ext.apply(this,C);this.addEvents("mousedown","click","mouseup");this.el.on("mousedown",this.handleMouseDown,this);if(this.preventDefault||this.stopDefault){this.el.on("click",function(A){if(this.preventDefault){A.preventDefault()}if(this.stopDefault){A.stopEvent()}},this)}if(this.handler){this.on("click",this.handler,this.scope||this)}Ext.util.ClickRepeater.superclass.constructor.call(this)};Ext.extend(Ext.util.ClickRepeater,Ext.util.Observable,{interval:20,delay:250,preventDefault:true,stopDefault:false,timer:0,handleMouseDown:function(){clearTimeout(this.timer);this.el.blur();if(this.pressClass){this.el.addClass(this.pressClass)}this.mousedownTime=new Date();Ext.getDoc().on("mouseup",this.handleMouseUp,this);this.el.on("mouseout",this.handleMouseOut,this);this.fireEvent("mousedown",this);this.fireEvent("click",this);if(this.accelerate){this.delay=400}this.timer=this.click.defer(this.delay||this.interval,this)},click:function(){this.fireEvent("click",this);this.timer=this.click.defer(this.accelerate?this.easeOutExpo(this.mousedownTime.getElapsed(),400,-390,12000):this.interval,this)},easeOutExpo:function(H,E,F,G){return(H==G)?E+F:F*(-Math.pow(2,-10*H/G)+1)+E},handleMouseOut:function(){clearTimeout(this.timer);if(this.pressClass){this.el.removeClass(this.pressClass)}this.el.on("mouseover",this.handleMouseReturn,this)},handleMouseReturn:function(){this.el.un("mouseover",this.handleMouseReturn);if(this.pressClass){this.el.addClass(this.pressClass)}this.click()},handleMouseUp:function(){clearTimeout(this.timer);this.el.un("mouseover",this.handleMouseReturn);this.el.un("mouseout",this.handleMouseOut);Ext.getDoc().un("mouseup",this.handleMouseUp);this.el.removeClass(this.pressClass);this.fireEvent("mouseup",this)}});Ext.KeyNav=function(D,C){this.el=Ext.get(D);Ext.apply(this,C);if(!this.disabled){this.disabled=true;this.enable()}};Ext.KeyNav.prototype={disabled:false,defaultEventAction:"stopEvent",forceKeyDown:false,prepareEvent:function(E){var D=E.getKey();var F=this.keyToHandler[D];if(Ext.isSafari&&F&&D>=37&&D<=40){E.stopEvent()}},relay:function(E){var D=E.getKey();var F=this.keyToHandler[D];if(F&&this[F]){if(this.doRelay(E,this[F],F)!==true){E[this.defaultEventAction]()}}},doRelay:function(E,F,D){return F.call(this.scope||this,E)},enter:false,left:false,right:false,up:false,down:false,tab:false,esc:false,pageUp:false,pageDown:false,del:false,home:false,end:false,keyToHandler:{37:"left",39:"right",38:"up",40:"down",33:"pageUp",34:"pageDown",46:"del",36:"home",35:"end",13:"enter",27:"esc",9:"tab"},enable:function(){if(this.disabled){if(this.forceKeyDown||Ext.isIE||Ext.isAir){this.el.on("keydown",this.relay,this)}else{this.el.on("keydown",this.prepareEvent,this);this.el.on("keypress",this.relay,this)}this.disabled=false}},disable:function(){if(!this.disabled){if(this.forceKeyDown||Ext.isIE||Ext.isAir){this.el.un("keydown",this.relay)}else{this.el.un("keydown",this.prepareEvent);this.el.un("keypress",this.relay)}this.disabled=true}}};Ext.KeyMap=function(E,F,D){this.el=Ext.get(E);this.eventName=D||"keydown";this.bindings=[];if(F){this.addBinding(F)}this.enable()};Ext.KeyMap.prototype={stopEvent:false,addBinding:function(O){if(Ext.isArray(O)){for(var a=0,Y=O.length;a<Y;a++){this.addBinding(O[a])}return }var S=O.key,P=O.shift,R=O.ctrl,Z=O.alt,W=O.fn||O.handler,T=O.scope;if(typeof S=="string"){var V=[];var X=S.toUpperCase();for(var b=0,Y=X.length;b<Y;b++){V.push(X.charCodeAt(b))}S=V}var Q=Ext.isArray(S);var U=function(A){if((!P||A.shiftKey)&&(!R||A.ctrlKey)&&(!Z||A.altKey)){var C=A.getKey();if(Q){for(var B=0,D=S.length;B<D;B++){if(S[B]==C){if(this.stopEvent){A.stopEvent()}W.call(T||window,C,A);return }}}else{if(C==S){if(this.stopEvent){A.stopEvent()}W.call(T||window,C,A)}}}};this.bindings.push(U)},on:function(N,L,M){var I,H,K,J;if(typeof N=="object"&&!Ext.isArray(N)){I=N.key;H=N.shift;K=N.ctrl;J=N.alt}else{I=N}this.addBinding({key:I,shift:H,ctrl:K,alt:J,fn:L,scope:M})},handleKeyDown:function(F){if(this.enabled){var H=this.bindings;for(var G=0,E=H.length;G<E;G++){H[G].call(this,F)}}},isEnabled:function(){return this.enabled},enable:function(){if(!this.enabled){this.el.on(this.eventName,this.handleKeyDown,this);this.enabled=true}},disable:function(){if(this.enabled){this.el.removeListener(this.eventName,this.handleKeyDown,this);this.enabled=false}}};Ext.util.TextMetrics=function(){var B;return{measure:function(F,E,A){if(!B){B=Ext.util.TextMetrics.Instance(F,A)}B.bind(F);B.setFixedWidth(A||"auto");return B.getSize(E)},createInstance:function(D,A){return Ext.util.TextMetrics.Instance(D,A)}}}();Ext.util.TextMetrics.Instance=function(H,F){var G=new Ext.Element(document.createElement("div"));document.body.appendChild(G.dom);G.position("absolute");G.setLeftTop(-1000,-1000);G.hide();if(F){G.setWidth(F)}var E={getSize:function(A){G.update(A);var B=G.getSize();G.update("");return B},bind:function(A){G.setStyle(Ext.fly(A).getStyles("font-size","font-style","font-weight","font-family","line-height"))},setFixedWidth:function(A){G.setWidth(A)},getWidth:function(A){G.dom.style.width="auto";return this.getSize(A).width},getHeight:function(A){return this.getSize(A).height}};E.bind(H);return E};Ext.Element.measureText=Ext.util.TextMetrics.measure;Ext.data.Tree=function(B){this.nodeHash={};this.root=null;if(B){this.setRootNode(B)}this.addEvents("append","remove","move","insert","beforeappend","beforeremove","beforemove","beforeinsert");Ext.data.Tree.superclass.constructor.call(this)};Ext.extend(Ext.data.Tree,Ext.util.Observable,{pathSeparator:"/",proxyNodeEvent:function(){return this.fireEvent.apply(this,arguments)},getRootNode:function(){return this.root},setRootNode:function(B){this.root=B;B.ownerTree=this;B.isRoot=true;this.registerNode(B);return B},getNodeById:function(B){return this.nodeHash[B]},registerNode:function(B){this.nodeHash[B.id]=B},unregisterNode:function(B){delete this.nodeHash[B.id]},toString:function(){return"[Tree"+(this.id?" "+this.id:"")+"]"}});Ext.data.Node=function(B){this.attributes=B||{};this.leaf=this.attributes.leaf;this.id=this.attributes.id;if(!this.id){this.id=Ext.id(null,"ynode-");this.attributes.id=this.id}this.childNodes=[];if(!this.childNodes.indexOf){this.childNodes.indexOf=function(A){for(var E=0,F=this.length;E<F;E++){if(this[E]==A){return E}}return -1}}this.parentNode=null;this.firstChild=null;this.lastChild=null;this.previousSibling=null;this.nextSibling=null;this.addEvents({append:true,remove:true,move:true,insert:true,beforeappend:true,beforeremove:true,beforemove:true,beforeinsert:true});this.listeners=this.attributes.listeners;Ext.data.Node.superclass.constructor.call(this)};Ext.extend(Ext.data.Node,Ext.util.Observable,{fireEvent:function(D){if(Ext.data.Node.superclass.fireEvent.apply(this,arguments)===false){return false}var C=this.getOwnerTree();if(C){if(C.proxyNodeEvent.apply(C,arguments)===false){return false}}return true},isLeaf:function(){return this.leaf===true},setFirstChild:function(B){this.firstChild=B},setLastChild:function(B){this.lastChild=B},isLast:function(){return(!this.parentNode?true:this.parentNode.lastChild==this)},isFirst:function(){return(!this.parentNode?true:this.parentNode.firstChild==this)},hasChildNodes:function(){return !this.isLeaf()&&this.childNodes.length>0},appendChild:function(K){var J=false;if(Ext.isArray(K)){J=K}else{if(arguments.length>1){J=arguments}}if(J){for(var L=0,H=J.length;L<H;L++){this.appendChild(J[L])}}else{if(this.fireEvent("beforeappend",this.ownerTree,this,K)===false){return false}var N=this.childNodes.length;var M=K.parentNode;if(M){if(K.fireEvent("beforemove",K.getOwnerTree(),K,M,this,N)===false){return false}M.removeChild(K)}N=this.childNodes.length;if(N==0){this.setFirstChild(K)}this.childNodes.push(K);K.parentNode=this;var I=this.childNodes[N-1];if(I){K.previousSibling=I;I.nextSibling=K}else{K.previousSibling=null}K.nextSibling=null;this.setLastChild(K);K.setOwnerTree(this.getOwnerTree());this.fireEvent("append",this.ownerTree,this,K,N);if(M){K.fireEvent("move",this.ownerTree,K,M,this,N)}return K}},removeChild:function(D){var C=this.childNodes.indexOf(D);if(C==-1){return false}if(this.fireEvent("beforeremove",this.ownerTree,this,D)===false){return false}this.childNodes.splice(C,1);if(D.previousSibling){D.previousSibling.nextSibling=D.nextSibling}if(D.nextSibling){D.nextSibling.previousSibling=D.previousSibling}if(this.firstChild==D){this.setFirstChild(D.nextSibling)}if(this.lastChild==D){this.setLastChild(D.previousSibling)}D.setOwnerTree(null);D.parentNode=null;D.previousSibling=null;D.nextSibling=null;this.fireEvent("remove",this.ownerTree,this,D);return D},insertBefore:function(J,G){if(!G){return this.appendChild(J)}if(J==G){return false}if(this.fireEvent("beforeinsert",this.ownerTree,this,J,G)===false){return false}var L=this.childNodes.indexOf(G);var K=J.parentNode;var I=L;if(K==this&&this.childNodes.indexOf(J)<L){I--}if(K){if(J.fireEvent("beforemove",J.getOwnerTree(),J,K,this,L,G)===false){return false}K.removeChild(J)}if(I==0){this.setFirstChild(J)}this.childNodes.splice(I,0,J);J.parentNode=this;var H=this.childNodes[I-1];if(H){J.previousSibling=H;H.nextSibling=J}else{J.previousSibling=null}J.nextSibling=G;G.previousSibling=J;J.setOwnerTree(this.getOwnerTree());this.fireEvent("insert",this.ownerTree,this,J,G);if(K){J.fireEvent("move",this.ownerTree,J,K,this,I,G)}return J},remove:function(){this.parentNode.removeChild(this);return this},item:function(B){return this.childNodes[B]},replaceChild:function(C,D){this.insertBefore(C,D);this.removeChild(D);return D},indexOf:function(B){return this.childNodes.indexOf(B)},getOwnerTree:function(){if(!this.ownerTree){var B=this;while(B){if(B.ownerTree){this.ownerTree=B.ownerTree;break}B=B.parentNode}}return this.ownerTree},getDepth:function(){var D=0;var C=this;while(C.parentNode){++D;C=C.parentNode}return D},setOwnerTree:function(H){if(H!=this.ownerTree){if(this.ownerTree){this.ownerTree.unregisterNode(this)}this.ownerTree=H;var F=this.childNodes;for(var G=0,E=F.length;G<E;G++){F[G].setOwnerTree(H)}if(H){H.registerNode(this)}}},getPath:function(H){H=H||"id";var F=this.parentNode;var E=[this.attributes[H]];while(F){E.unshift(F.attributes[H]);F=F.parentNode}var G=this.getOwnerTree().pathSeparator;return G+E.join(G)},bubble:function(G,H,E){var F=this;while(F){if(G.apply(H||F,E||[F])===false){break}F=F.parentNode}},cascade:function(H,I,L){if(H.apply(I||this,L||[this])!==false){var J=this.childNodes;for(var K=0,G=J.length;K<G;K++){J[K].cascade(H,I,L)}}},eachChild:function(H,I,L){var J=this.childNodes;for(var K=0,G=J.length;K<G;K++){if(H.apply(I||this,L||[J[K]])===false){break}}},findChild:function(H,G){var I=this.childNodes;for(var J=0,F=I.length;J<F;J++){if(I[J].attributes[H]==G){return I[J]}}return null},findChildBy:function(G,H){var I=this.childNodes;for(var J=0,F=I.length;J<F;J++){if(G.call(H||I[J],I[J])===true){return I[J]}}return null},sort:function(K,L){var M=this.childNodes;var H=M.length;if(H>0){var J=L?function(){K.apply(L,arguments)}:K;M.sort(J);for(var N=0;N<H;N++){var I=M[N];I.previousSibling=M[N-1];I.nextSibling=M[N+1];if(N==0){this.setFirstChild(I)}if(N==H-1){this.setLastChild(I)}}}},contains:function(B){return B.isAncestor(this)},isAncestor:function(C){var D=this.parentNode;while(D){if(D==C){return true}D=D.parentNode}return false},toString:function(){return"[Node"+(this.id?" "+this.id:"")+"]"}});Ext.ComponentMgr=function(){var D=new Ext.util.MixedCollection();var C={};return{register:function(A){D.add(A)},unregister:function(A){D.remove(A)},get:function(A){return D.get(A)},onAvailable:function(A,B,F){D.on("add",function(H,E){if(E.id==A){B.call(F||E,E);D.un("add",B,F)}})},all:D,registerType:function(A,B){C[A]=B;B.xtype=A},create:function(B,A){return new C[B.xtype||A](B)}}}();Ext.reg=Ext.ComponentMgr.registerType;Ext.Component=function(F){F=F||{};if(F.initialConfig){if(F.isAction){this.baseAction=F}F=F.initialConfig}else{if(F.tagName||F.dom||typeof F=="string"){F={applyTo:F,id:F.id||F}}}this.initialConfig=F;Ext.apply(this,F);this.addEvents("disable","enable","beforeshow","show","beforehide","hide","beforerender","render","beforedestroy","destroy","beforestaterestore","staterestore","beforestatesave","statesave");this.getId();Ext.ComponentMgr.register(this);Ext.Component.superclass.constructor.call(this);if(this.baseAction){this.baseAction.addComponent(this)}this.initComponent();if(this.plugins){if(Ext.isArray(this.plugins)){for(var E=0,D=this.plugins.length;E<D;E++){this.plugins[E].init(this)}}else{this.plugins.init(this)}}if(this.stateful!==false){this.initState(F)}if(this.applyTo){this.applyToMarkup(this.applyTo);delete this.applyTo}else{if(this.renderTo){this.render(this.renderTo);delete this.renderTo}}};Ext.Component.AUTO_ID=1000;Ext.extend(Ext.Component,Ext.util.Observable,{disabledClass:"x-item-disabled",allowDomMove:true,autoShow:false,hideMode:"display",hideParent:false,hidden:false,disabled:false,rendered:false,ctype:"Ext.Component",actionMode:"el",getActionEl:function(){return this[this.actionMode]},initComponent:Ext.emptyFn,render:function(D,C){if(!this.rendered&&this.fireEvent("beforerender",this)!==false){if(!D&&this.el){this.el=Ext.get(this.el);D=this.el.dom.parentNode;this.allowDomMove=false}this.container=Ext.get(D);if(this.ctCls){this.container.addClass(this.ctCls)}this.rendered=true;if(C!==undefined){if(typeof C=="number"){C=this.container.dom.childNodes[C]}else{C=Ext.getDom(C)}}this.onRender(this.container,C||null);if(this.autoShow){this.el.removeClass(["x-hidden","x-hide-"+this.hideMode])}if(this.cls){this.el.addClass(this.cls);delete this.cls}if(this.style){this.el.applyStyles(this.style);delete this.style}this.fireEvent("render",this);this.afterRender(this.container);if(this.hidden){this.hide()}if(this.disabled){this.disable()}this.initStateEvents()}return this},initState:function(C){if(Ext.state.Manager){var D=Ext.state.Manager.get(this.stateId||this.id);if(D){if(this.fireEvent("beforestaterestore",this,D)!==false){this.applyState(D);this.fireEvent("staterestore",this,D)}}}},initStateEvents:function(){if(this.stateEvents){for(var C=0,D;D=this.stateEvents[C];C++){this.on(D,this.saveState,this,{delay:100})}}},applyState:function(D,C){if(D){Ext.apply(this,D)}},getState:function(){return null},saveState:function(){if(Ext.state.Manager){var B=this.getState();if(this.fireEvent("beforestatesave",this,B)!==false){Ext.state.Manager.set(this.stateId||this.id,B);this.fireEvent("statesave",this,B)}}},applyToMarkup:function(B){this.allowDomMove=false;this.el=Ext.get(B);this.render(this.el.dom.parentNode)},addClass:function(B){if(this.el){this.el.addClass(B)}else{this.cls=this.cls?this.cls+" "+B:B}},removeClass:function(B){if(this.el){this.el.removeClass(B)}else{if(this.cls){this.cls=this.cls.split(" ").remove(B).join(" ")}}},onRender:function(F,D){if(this.autoEl){if(typeof this.autoEl=="string"){this.el=document.createElement(this.autoEl)}else{var E=document.createElement("div");Ext.DomHelper.overwrite(E,this.autoEl);this.el=E.firstChild}if(!this.el.id){this.el.id=this.getId()}}if(this.el){this.el=Ext.get(this.el);if(this.allowDomMove!==false){F.dom.insertBefore(this.el.dom,D)}}},getAutoCreate:function(){var B=typeof this.autoCreate=="object"?this.autoCreate:Ext.apply({},this.defaultAutoCreate);if(this.id&&!B.id){B.id=this.id}return B},afterRender:Ext.emptyFn,destroy:function(){if(this.fireEvent("beforedestroy",this)!==false){this.beforeDestroy();if(this.rendered){this.el.removeAllListeners();this.el.remove();if(this.actionMode=="container"){this.container.remove()}}this.onDestroy();Ext.ComponentMgr.unregister(this);this.fireEvent("destroy",this);this.purgeListeners()}},beforeDestroy:Ext.emptyFn,onDestroy:Ext.emptyFn,getEl:function(){return this.el},getId:function(){return this.id||(this.id="ext-comp-"+(++Ext.Component.AUTO_ID))},getItemId:function(){return this.itemId||this.getId()},focus:function(D,C){if(C){this.focus.defer(typeof C=="number"?C:10,this,[D,false]);return }if(this.rendered){this.el.focus();if(D===true){this.el.dom.select()}}return this},blur:function(){if(this.rendered){this.el.blur()}return this},disable:function(){if(this.rendered){this.onDisable()}this.disabled=true;this.fireEvent("disable",this);return this},onDisable:function(){this.getActionEl().addClass(this.disabledClass);this.el.dom.disabled=true},enable:function(){if(this.rendered){this.onEnable()}this.disabled=false;this.fireEvent("enable",this);return this},onEnable:function(){this.getActionEl().removeClass(this.disabledClass);this.el.dom.disabled=false},setDisabled:function(B){this[B?"disable":"enable"]()},show:function(){if(this.fireEvent("beforeshow",this)!==false){this.hidden=false;if(this.autoRender){this.render(typeof this.autoRender=="boolean"?Ext.getBody():this.autoRender)}if(this.rendered){this.onShow()}this.fireEvent("show",this)}return this},onShow:function(){if(this.hideParent){this.container.removeClass("x-hide-"+this.hideMode)}else{this.getActionEl().removeClass("x-hide-"+this.hideMode)}},hide:function(){if(this.fireEvent("beforehide",this)!==false){this.hidden=true;if(this.rendered){this.onHide()}this.fireEvent("hide",this)}return this},onHide:function(){if(this.hideParent){this.container.addClass("x-hide-"+this.hideMode)}else{this.getActionEl().addClass("x-hide-"+this.hideMode)}},setVisible:function(B){if(B){this.show()}else{this.hide()}return this},isVisible:function(){return this.rendered&&this.getActionEl().isVisible()},cloneConfig:function(F){F=F||{};var E=F.id||Ext.id();var D=Ext.applyIf(F,this.initialConfig);D.id=E;return new this.constructor(D)},getXType:function(){return this.constructor.xtype},isXType:function(D,C){return !C?("/"+this.getXTypes()+"/").indexOf("/"+D+"/")!=-1:this.constructor.xtype==D},getXTypes:function(){var D=this.constructor;if(!D.xtypes){var E=[],F=this;while(F&&F.constructor.xtype){E.unshift(F.constructor.xtype);F=F.constructor.superclass}D.xtypeChain=E;D.xtypes=E.join("/")}return D.xtypes},findParentBy:function(C){for(var D=this.ownerCt;(D!=null)&&!C(D,this);D=D.ownerCt){}return D||null},findParentByType:function(B){return typeof B=="function"?this.findParentBy(function(A){return A.constructor===B}):this.findParentBy(function(A){return A.constructor.xtype===B})}});Ext.reg("component",Ext.Component);(function(){Ext.Layer=function(K,L){K=K||{};var J=Ext.DomHelper;var B=K.parentEl,I=B?Ext.getDom(B):document.body;if(L){this.dom=Ext.getDom(L)}if(!this.dom){var A=K.dh||{tag:"div",cls:"x-layer"};this.dom=J.append(I,A)}if(K.cls){this.addClass(K.cls)}this.constrain=K.constrain!==false;this.visibilityMode=Ext.Element.VISIBILITY;if(K.id){this.id=this.dom.id=K.id}else{this.id=Ext.id(this.dom)}this.zindex=K.zindex||this.getZIndex();this.position("absolute",this.zindex);if(K.shadow){this.shadowOffset=K.shadowOffset||4;this.shadow=new Ext.Shadow({offset:this.shadowOffset,mode:K.shadow})}else{this.shadowOffset=0}this.useShim=K.shim!==false&&Ext.useShims;this.useDisplay=K.useDisplay;this.hide()};var C=Ext.Element.prototype;var D=[];Ext.extend(Ext.Layer,Ext.Element,{getZIndex:function(){return this.zindex||parseInt(this.getStyle("z-index"),10)||11000},getShim:function(){if(!this.useShim){return null}if(this.shim){return this.shim}var A=D.shift();if(!A){A=this.createShim();A.enableDisplayMode("block");A.dom.style.display="none";A.dom.style.visibility="visible"}var B=this.dom.parentNode;if(A.dom.parentNode!=B){B.insertBefore(A.dom,this.dom)}A.setStyle("z-index",this.getZIndex()-2);this.shim=A;return A},hideShim:function(){if(this.shim){this.shim.setDisplayed(false);D.push(this.shim);delete this.shim}},disableShadow:function(){if(this.shadow){this.shadowDisabled=true;this.shadow.hide();this.lastShadowOffset=this.shadowOffset;this.shadowOffset=0}},enableShadow:function(A){if(this.shadow){this.shadowDisabled=false;this.shadowOffset=this.lastShadowOffset;delete this.lastShadowOffset;if(A){this.sync(true)}}},sync:function(B){var N=this.shadow;if(!this.updating&&this.isVisible()&&(N||this.useShim)){var Q=this.getShim();var O=this.getWidth(),R=this.getHeight();var A=this.getLeft(true),M=this.getTop(true);if(N&&!this.shadowDisabled){if(B&&!N.isVisible()){N.show(this)}else{N.realign(A,M,O,R)}if(Q){if(B){Q.show()}var P=N.adjusts,L=Q.dom.style;L.left=(Math.min(A,A+P.l))+"px";L.top=(Math.min(M,M+P.t))+"px";L.width=(O+P.w)+"px";L.height=(R+P.h)+"px"}}else{if(Q){if(B){Q.show()}Q.setSize(O,R);Q.setLeftTop(A,M)}}}},destroy:function(){this.hideShim();if(this.shadow){this.shadow.hide()}this.removeAllListeners();Ext.removeNode(this.dom);Ext.Element.uncache(this.id)},remove:function(){this.destroy()},beginUpdate:function(){this.updating=true},endUpdate:function(){this.updating=false;this.sync(true)},hideUnders:function(A){if(this.shadow){this.shadow.hide()}this.hideShim()},constrainXY:function(){if(this.constrain){var R=Ext.lib.Dom.getViewWidth(),B=Ext.lib.Dom.getViewHeight();var M=Ext.getDoc().getScroll();var N=this.getXY();var Q=N[0],S=N[1];var P=this.dom.offsetWidth+this.shadowOffset,A=this.dom.offsetHeight+this.shadowOffset;var T=false;if((Q+P)>R+M.left){Q=R-P-this.shadowOffset;T=true}if((S+A)>B+M.top){S=B-A-this.shadowOffset;T=true}if(Q<M.left){Q=M.left;T=true}if(S<M.top){S=M.top;T=true}if(T){if(this.avoidY){var O=this.avoidY;if(S<=O&&(S+A)>=O){S=O-A-5}}N=[Q,S];this.storeXY(N);C.setXY.call(this,N);this.sync()}}},isVisible:function(){return this.visible},showAction:function(){this.visible=true;if(this.useDisplay===true){this.setDisplayed("")}else{if(this.lastXY){C.setXY.call(this,this.lastXY)}else{if(this.lastLT){C.setLeftTop.call(this,this.lastLT[0],this.lastLT[1])}}}},hideAction:function(){this.visible=false;if(this.useDisplay===true){this.setDisplayed(false)}else{this.setLeftTop(-10000,-10000)}},setVisible:function(J,K,B,A,I){if(J){this.showAction()}if(K&&J){var L=function(){this.sync(true);if(A){A()}}.createDelegate(this);C.setVisible.call(this,true,true,B,L,I)}else{if(!J){this.hideUnders(true)}var L=A;if(K){L=function(){this.hideAction();if(A){A()}}.createDelegate(this)}C.setVisible.call(this,J,K,B,L,I);if(J){this.sync(true)}else{if(!K){this.hideAction()}}}},storeXY:function(A){delete this.lastLT;this.lastXY=A},storeLeftTop:function(A,B){delete this.lastXY;this.lastLT=[A,B]},beforeFx:function(){this.beforeAction();return Ext.Layer.superclass.beforeFx.apply(this,arguments)},afterFx:function(){Ext.Layer.superclass.afterFx.apply(this,arguments);this.sync(this.isVisible())},beforeAction:function(){if(!this.updating&&this.shadow){this.shadow.hide()}},setLeft:function(A){this.storeLeftTop(A,this.getTop(true));C.setLeft.apply(this,arguments);this.sync()},setTop:function(A){this.storeLeftTop(this.getLeft(true),A);C.setTop.apply(this,arguments);this.sync()},setLeftTop:function(A,B){this.storeLeftTop(A,B);C.setLeftTop.apply(this,arguments);this.sync()},setXY:function(I,K,B,A,J){this.fixDisplay();this.beforeAction();this.storeXY(I);var L=this.createCB(A);C.setXY.call(this,I,K,B,L,J);if(!K){L()}},createCB:function(A){var B=this;return function(){B.constrainXY();B.sync(true);if(A){A()}}},setX:function(J,I,B,A,H){this.setXY([J,this.getY()],I,B,A,H)},setY:function(A,J,H,B,I){this.setXY([this.getX(),A],J,H,B,I)},setSize:function(L,K,M,B,A,J){this.beforeAction();var N=this.createCB(A);C.setSize.call(this,L,K,M,B,N,J);if(!M){N()}},setWidth:function(J,K,B,A,I){this.beforeAction();var L=this.createCB(A);C.setWidth.call(this,J,K,B,L,I);if(!K){L()}},setHeight:function(J,K,B,A,I){this.beforeAction();var L=this.createCB(A);C.setHeight.call(this,J,K,B,L,I);if(!K){L()}},setBounds:function(M,O,L,A,N,Q,P,R){this.beforeAction();var B=this.createCB(P);if(!N){this.storeXY([M,O]);C.setXY.call(this,[M,O]);C.setSize.call(this,L,A,N,Q,B,R);B()}else{C.setBounds.call(this,M,O,L,A,N,Q,B,R)}return this},setZIndex:function(A){this.zindex=A;this.setStyle("z-index",A+2);if(this.shadow){this.shadow.setZIndex(A+1)}if(this.shim){this.shim.setStyle("z-index",A)}}})})();Ext.Shadow=function(G){Ext.apply(this,G);if(typeof this.mode!="string"){this.mode=this.defaultMode}var F=this.offset,H={h:0};var E=Math.floor(this.offset/2);switch(this.mode.toLowerCase()){case"drop":H.w=0;H.l=H.t=F;H.t-=1;if(Ext.isIE){H.l-=this.offset+E;H.t-=this.offset+E;H.w-=E;H.h-=E;H.t+=1}break;case"sides":H.w=(F*2);H.l=-F;H.t=F-1;if(Ext.isIE){H.l-=(this.offset-E);H.t-=this.offset+E;H.l+=1;H.w-=(this.offset-E)*2;H.w-=E+1;H.h-=1}break;case"frame":H.w=H.h=(F*2);H.l=H.t=-F;H.t+=1;H.h-=2;if(Ext.isIE){H.l-=(this.offset-E);H.t-=(this.offset-E);H.l+=1;H.w-=(this.offset+E+1);H.h-=(this.offset+E);H.h+=1}break}this.adjusts=H};Ext.Shadow.prototype={offset:4,defaultMode:"drop",show:function(B){B=Ext.get(B);if(!this.el){this.el=Ext.Shadow.Pool.pull();if(this.el.dom.nextSibling!=B.dom){this.el.insertBefore(B)}}this.el.setStyle("z-index",this.zIndex||parseInt(B.getStyle("z-index"),10)-1);if(Ext.isIE){this.el.dom.style.filter="progid:DXImageTransform.Microsoft.alpha(opacity=50) progid:DXImageTransform.Microsoft.Blur(pixelradius="+(this.offset)+")"}this.realign(B.getLeft(true),B.getTop(true),B.getWidth(),B.getHeight());this.el.dom.style.display="block"},isVisible:function(){return this.el?true:false},realign:function(R,T,U,O){if(!this.el){return }var X=this.adjusts,Z=this.el.dom,S=Z.style;var b=0;S.left=(R+X.l)+"px";S.top=(T+X.t)+"px";var V=(U+X.w),P=(O+X.h),a=V+"px",W=P+"px";if(S.width!=a||S.height!=W){S.width=a;S.height=W;if(!Ext.isIE){var Y=Z.childNodes;var Q=Math.max(0,(V-12))+"px";Y[0].childNodes[1].style.width=Q;Y[1].childNodes[1].style.width=Q;Y[2].childNodes[1].style.width=Q;Y[1].style.height=Math.max(0,(P-12))+"px"}}},hide:function(){if(this.el){this.el.dom.style.display="none";Ext.Shadow.Pool.push(this.el);delete this.el}},setZIndex:function(B){this.zIndex=B;if(this.el){this.el.setStyle("z-index",B)}}};Ext.Shadow.Pool=function(){var D=[];var C=Ext.isIE?'<div class="x-ie-shadow"></div>':'<div class="x-shadow"><div class="xst"><div class="xstl"></div><div class="xstc"></div><div class="xstr"></div></div><div class="xsc"><div class="xsml"></div><div class="xsmc"></div><div class="xsmr"></div></div><div class="xsb"><div class="xsbl"></div><div class="xsbc"></div><div class="xsbr"></div></div></div>';return{pull:function(){var A=D.shift();if(!A){A=Ext.get(Ext.DomHelper.insertHtml("beforeBegin",document.body.firstChild,C));A.autoBoxAdjust=false}return A},push:function(A){D.push(A)}}}();Ext.BoxComponent=Ext.extend(Ext.Component,{initComponent:function(){Ext.BoxComponent.superclass.initComponent.call(this);this.addEvents("resize","move")},boxReady:false,deferHeight:false,setSize:function(L,J){if(typeof L=="object"){J=L.height;L=L.width}if(!this.boxReady){this.width=L;this.height=J;return this}if(this.lastSize&&this.lastSize.width==L&&this.lastSize.height==J){return this}this.lastSize={width:L,height:J};var K=this.adjustSize(L,J);var H=K.width,G=K.height;if(H!==undefined||G!==undefined){var I=this.getResizeEl();if(!this.deferHeight&&H!==undefined&&G!==undefined){I.setSize(H,G)}else{if(!this.deferHeight&&G!==undefined){I.setHeight(G)}else{if(H!==undefined){I.setWidth(H)}}}this.onResize(H,G,L,J);this.fireEvent("resize",this,H,G,L,J)}return this},setWidth:function(B){return this.setSize(B)},setHeight:function(B){return this.setSize(undefined,B)},getSize:function(){return this.el.getSize()},getPosition:function(B){if(B===true){return[this.el.getLeft(true),this.el.getTop(true)]}return this.xy||this.el.getXY()},getBox:function(D){var F=this.el.getSize();if(D===true){F.x=this.el.getLeft(true);F.y=this.el.getTop(true)}else{var E=this.xy||this.el.getXY();F.x=E[0];F.y=E[1]}return F},updateBox:function(B){this.setSize(B.width,B.height);this.setPagePosition(B.x,B.y);return this},getResizeEl:function(){return this.resizeEl||this.el},getPositionEl:function(){return this.positionEl||this.el},setPosition:function(G,H){if(G&&typeof G[1]=="number"){H=G[1];G=G[0]}this.x=G;this.y=H;if(!this.boxReady){return this}var L=this.adjustPosition(G,H);var I=L.x,J=L.y;var K=this.getPositionEl();if(I!==undefined||J!==undefined){if(I!==undefined&&J!==undefined){K.setLeftTop(I,J)}else{if(I!==undefined){K.setLeft(I)}else{if(J!==undefined){K.setTop(J)}}}this.onPosition(I,J);this.fireEvent("move",this,I,J)}return this},setPagePosition:function(D,E){if(D&&typeof D[1]=="number"){E=D[1];D=D[0]}this.pageX=D;this.pageY=E;if(!this.boxReady){return }if(D===undefined||E===undefined){return }var F=this.el.translatePoints(D,E);this.setPosition(F.left,F.top);return this},onRender:function(D,C){Ext.BoxComponent.superclass.onRender.call(this,D,C);if(this.resizeEl){this.resizeEl=Ext.get(this.resizeEl)}if(this.positionEl){this.positionEl=Ext.get(this.positionEl)}},afterRender:function(){Ext.BoxComponent.superclass.afterRender.call(this);this.boxReady=true;this.setSize(this.width,this.height);if(this.x||this.y){this.setPosition(this.x,this.y)}else{if(this.pageX||this.pageY){this.setPagePosition(this.pageX,this.pageY)}}},syncSize:function(){delete this.lastSize;this.setSize(this.autoWidth?undefined:this.el.getWidth(),this.autoHeight?undefined:this.el.getHeight());return this},onResize:function(F,H,E,G){},onPosition:function(C,D){},adjustSize:function(C,D){if(this.autoWidth){C="auto"}if(this.autoHeight){D="auto"}return{width:C,height:D}},adjustPosition:function(C,D){return{x:C,y:D}}});Ext.reg("box",Ext.BoxComponent);Ext.Container=Ext.extend(Ext.BoxComponent,{autoDestroy:true,defaultType:"panel",initComponent:function(){Ext.Container.superclass.initComponent.call(this);this.addEvents("afterlayout","beforeadd","beforeremove","add","remove");var B=this.items;if(B){delete this.items;if(Ext.isArray(B)){this.add.apply(this,B)}else{this.add(B)}}},initItems:function(){if(!this.items){this.items=new Ext.util.MixedCollection(false,this.getComponentId);this.getLayout()}},setLayout:function(B){if(this.layout&&this.layout!=B){this.layout.setContainer(null)}this.initItems();this.layout=B;B.setContainer(this)},render:function(){Ext.Container.superclass.render.apply(this,arguments);if(this.layout){if(typeof this.layout=="string"){this.layout=new Ext.Container.LAYOUTS[this.layout.toLowerCase()](this.layoutConfig)}this.setLayout(this.layout);if(this.activeItem!==undefined){var B=this.activeItem;delete this.activeItem;this.layout.setActiveItem(B);return }}if(!this.ownerCt){this.doLayout()}if(this.monitorResize===true){Ext.EventManager.onWindowResize(this.doLayout,this,[false])}},getLayoutTarget:function(){return this.el},getComponentId:function(B){return B.itemId||B.id},add:function(K){if(!this.items){this.initItems()}var L=arguments,G=L.length;if(G>1){for(var J=0;J<G;J++){this.add(L[J])}return }var H=this.lookupComponent(this.applyDefaults(K));var I=this.items.length;if(this.fireEvent("beforeadd",this,H,I)!==false&&this.onBeforeAdd(H)!==false){this.items.add(H);H.ownerCt=this;this.fireEvent("add",this,H,I)}return H},insert:function(J,K){if(!this.items){this.initItems()}var L=arguments,G=L.length;if(G>2){for(var I=G-1;I>=1;--I){this.insert(J,L[I])}return }var H=this.lookupComponent(this.applyDefaults(K));if(H.ownerCt==this&&this.items.indexOf(H)<J){--J}if(this.fireEvent("beforeadd",this,H,J)!==false&&this.onBeforeAdd(H)!==false){this.items.insert(J,H);H.ownerCt=this;this.fireEvent("add",this,H,J)}return H},applyDefaults:function(B){if(this.defaults){if(typeof B=="string"){B=Ext.ComponentMgr.get(B);Ext.apply(B,this.defaults)}else{if(!B.events){Ext.applyIf(B,this.defaults)}else{Ext.apply(B,this.defaults)}}}return B},onBeforeAdd:function(B){if(B.ownerCt){B.ownerCt.remove(B,false)}if(this.hideBorders===true){B.border=(B.border===true)}},remove:function(D,F){var E=this.getComponent(D);if(E&&this.fireEvent("beforeremove",this,E)!==false){this.items.remove(E);delete E.ownerCt;if(F===true||(F!==false&&this.autoDestroy)){E.destroy()}if(this.layout&&this.layout.activeItem==E){delete this.layout.activeItem}this.fireEvent("remove",this,E)}return E},getComponent:function(B){if(typeof B=="object"){return B}return this.items.get(B)},lookupComponent:function(B){if(typeof B=="string"){return Ext.ComponentMgr.get(B)}else{if(!B.events){return this.createComponent(B)}}return B},createComponent:function(B){return Ext.ComponentMgr.create(B,this.defaultType)},doLayout:function(H){if(this.rendered&&this.layout){this.layout.layout()}if(H!==false&&this.items){var I=this.items.items;for(var J=0,F=I.length;J<F;J++){var G=I[J];if(G.doLayout){G.doLayout()}}}},getLayout:function(){if(!this.layout){var B=new Ext.layout.ContainerLayout(this.layoutConfig);this.setLayout(B)}return this.layout},onDestroy:function(){if(this.items){var E=this.items.items;for(var F=0,D=E.length;F<D;F++){Ext.destroy(E[F])}}if(this.monitorResize){Ext.EventManager.removeResizeListener(this.doLayout,this)}Ext.Container.superclass.onDestroy.call(this)},bubble:function(G,H,E){var F=this;while(F){if(G.apply(H||F,E||[F])===false){break}F=F.ownerCt}},cascade:function(H,I,L){if(H.apply(I||this,L||[this])!==false){if(this.items){var J=this.items.items;for(var K=0,G=J.length;K<G;K++){if(J[K].cascade){J[K].cascade(H,I,L)}else{H.apply(I||this,L||[J[K]])}}}}},findById:function(E){var D,F=this;this.cascade(function(A){if(F!=A&&A.id===E){D=A;return false}});return D||null},findByType:function(B){return typeof B=="function"?this.findBy(function(A){return A.constructor===B}):this.findBy(function(A){return A.constructor.xtype===B})},find:function(D,C){return this.findBy(function(A){return A[D]===C})},findBy:function(F,G){var E=[],H=this;this.cascade(function(A){if(H!=A&&F.call(G||A,A,H)===true){E.push(A)}});return E}});Ext.Container.LAYOUTS={};Ext.reg("container",Ext.Container);Ext.layout.ContainerLayout=function(B){Ext.apply(this,B)};Ext.layout.ContainerLayout.prototype={monitorResize:false,activeItem:null,layout:function(){var B=this.container.getLayoutTarget();this.onLayout(this.container,B);this.container.fireEvent("afterlayout",this.container,this)},onLayout:function(C,D){this.renderAll(C,D)},isValidParent:function(E,F){var D=E.getPositionEl?E.getPositionEl():E.getEl();return D.dom.parentNode==F.dom},renderAll:function(J,I){var L=J.items.items;for(var K=0,G=L.length;K<G;K++){var H=L[K];if(H&&(!H.rendered||!this.isValidParent(H,I))){this.renderItem(H,K,I)}}},renderItem:function(F,E,G){if(F&&!F.rendered){F.render(G,E);if(this.extraCls){var H=F.getPositionEl?F.getPositionEl():F;H.addClass(this.extraCls)}if(this.renderHidden&&F!=this.activeItem){F.hide()}}else{if(F&&!this.isValidParent(F,G)){if(this.extraCls){F.addClass(this.extraCls)}if(typeof E=="number"){E=G.dom.childNodes[E]}G.dom.insertBefore(F.getEl().dom,E||null);if(this.renderHidden&&F!=this.activeItem){F.hide()}}}},onResize:function(){if(this.container.collapsed){return }var B=this.container.bufferResize;if(B){if(!this.resizeTask){this.resizeTask=new Ext.util.DelayedTask(this.layout,this);this.resizeBuffer=typeof B=="number"?B:100}this.resizeTask.delay(this.resizeBuffer)}else{this.layout()}},setContainer:function(B){if(this.monitorResize&&B!=this.container){if(this.container){this.container.un("resize",this.onResize,this)}if(B){B.on("resize",this.onResize,this)}}this.container=B},parseMargins:function(F){var E=F.split(" ");var D=E.length;if(D==1){E[1]=E[0];E[2]=E[0];E[3]=E[0]}if(D==2){E[2]=E[0];E[3]=E[1]}return{top:parseInt(E[0],10)||0,right:parseInt(E[1],10)||0,bottom:parseInt(E[2],10)||0,left:parseInt(E[3],10)||0}}};Ext.Container.LAYOUTS.auto=Ext.layout.ContainerLayout;Ext.Panel=Ext.extend(Ext.Container,{baseCls:"x-panel",collapsedCls:"x-panel-collapsed",maskDisabled:true,animCollapse:Ext.enableFx,headerAsText:true,buttonAlign:"right",collapsed:false,collapseFirst:true,minButtonWidth:75,elements:"body",toolTarget:"header",collapseEl:"bwrap",slideAnchor:"t",deferHeight:true,expandDefaults:{duration:0.25},collapseDefaults:{duration:0.25},initComponent:function(){Ext.Panel.superclass.initComponent.call(this);this.addEvents("bodyresize","titlechange","collapse","expand","beforecollapse","beforeexpand","beforeclose","close","activate","deactivate");if(this.tbar){this.elements+=",tbar";if(typeof this.tbar=="object"){this.topToolbar=this.tbar}delete this.tbar}if(this.bbar){this.elements+=",bbar";if(typeof this.bbar=="object"){this.bottomToolbar=this.bbar}delete this.bbar}if(this.header===true){this.elements+=",header";delete this.header}else{if(this.title&&this.header!==false){this.elements+=",header"}}if(this.footer===true){this.elements+=",footer";delete this.footer}if(this.buttons){var E=this.buttons;this.buttons=[];for(var F=0,D=E.length;F<D;F++){if(E[F].render){this.buttons.push(E[F])}else{this.addButton(E[F])}}}if(this.autoLoad){this.on("render",this.doAutoLoad,this,{delay:10})}},createElement:function(D,E){if(this[D]){E.appendChild(this[D].dom);return }if(D==="bwrap"||this.elements.indexOf(D)!=-1){if(this[D+"Cfg"]){this[D]=Ext.fly(E).createChild(this[D+"Cfg"])}else{var F=document.createElement("div");F.className=this[D+"Cls"];this[D]=Ext.get(E.appendChild(F))}}},onRender:function(c,d){Ext.Panel.superclass.onRender.call(this,c,d);this.createClasses();if(this.el){this.el.addClass(this.baseCls);this.header=this.el.down("."+this.headerCls);this.bwrap=this.el.down("."+this.bwrapCls);var X=this.bwrap?this.bwrap:this.el;this.tbar=X.down("."+this.tbarCls);this.body=X.down("."+this.bodyCls);this.bbar=X.down("."+this.bbarCls);this.footer=X.down("."+this.footerCls);this.fromMarkup=true}else{this.el=c.createChild({id:this.id,cls:this.baseCls},d)}var T=this.el,Z=T.dom;if(this.cls){this.el.addClass(this.cls)}if(this.buttons){this.elements+=",footer"}if(this.frame){T.insertHtml("afterBegin",String.format(Ext.Element.boxMarkup,this.baseCls));this.createElement("header",Z.firstChild.firstChild.firstChild);this.createElement("bwrap",Z);var V=this.bwrap.dom;var g=Z.childNodes[1],S=Z.childNodes[2];V.appendChild(g);V.appendChild(S);var U=V.firstChild.firstChild.firstChild;this.createElement("tbar",U);this.createElement("body",U);this.createElement("bbar",U);this.createElement("footer",V.lastChild.firstChild.firstChild);if(!this.footer){this.bwrap.dom.lastChild.className+=" x-panel-nofooter"}}else{this.createElement("header",Z);this.createElement("bwrap",Z);var V=this.bwrap.dom;this.createElement("tbar",V);this.createElement("body",V);this.createElement("bbar",V);this.createElement("footer",V);if(!this.header){this.body.addClass(this.bodyCls+"-noheader");if(this.tbar){this.tbar.addClass(this.tbarCls+"-noheader")}}}if(this.border===false){this.el.addClass(this.baseCls+"-noborder");this.body.addClass(this.bodyCls+"-noborder");if(this.header){this.header.addClass(this.headerCls+"-noborder")}if(this.footer){this.footer.addClass(this.footerCls+"-noborder")}if(this.tbar){this.tbar.addClass(this.tbarCls+"-noborder")}if(this.bbar){this.bbar.addClass(this.bbarCls+"-noborder")}}if(this.bodyBorder===false){this.body.addClass(this.bodyCls+"-noborder")}if(this.bodyStyle){this.body.applyStyles(this.bodyStyle)}this.bwrap.enableDisplayMode("block");if(this.header){this.header.unselectable();if(this.headerAsText){this.header.dom.innerHTML='<span class="'+this.headerTextCls+'">'+this.header.dom.innerHTML+"</span>";if(this.iconCls){this.setIconClass(this.iconCls)}}}if(this.floating){this.makeFloating(this.floating)}if(this.collapsible){this.tools=this.tools?this.tools.slice(0):[];if(!this.hideCollapseTool){this.tools[this.collapseFirst?"unshift":"push"]({id:"toggle",handler:this.toggleCollapse,scope:this})}if(this.titleCollapse&&this.header){this.header.on("click",this.toggleCollapse,this);this.header.setStyle("cursor","pointer")}}if(this.tools){var a=this.tools;this.tools={};this.addTool.apply(this,a)}else{this.tools={}}if(this.buttons&&this.buttons.length>0){var Q=this.footer.createChild({cls:"x-panel-btns-ct",cn:{cls:"x-panel-btns x-panel-btns-"+this.buttonAlign,html:'<table cellspacing="0"><tbody><tr></tr></tbody></table><div class="x-clear"></div>'}},null,true);var Y=Q.getElementsByTagName("tr")[0];for(var e=0,b=this.buttons.length;e<b;e++){var W=this.buttons[e];var R=document.createElement("td");R.className="x-panel-btn-td";W.render(Y.appendChild(R))}}if(this.tbar&&this.topToolbar){if(Ext.isArray(this.topToolbar)){this.topToolbar=new Ext.Toolbar(this.topToolbar)}this.topToolbar.render(this.tbar)}if(this.bbar&&this.bottomToolbar){if(Ext.isArray(this.bottomToolbar)){this.bottomToolbar=new Ext.Toolbar(this.bottomToolbar)}this.bottomToolbar.render(this.bbar)}},setIconClass:function(H){var E=this.iconCls;this.iconCls=H;if(this.rendered&&this.header){if(this.frame){this.header.addClass("x-panel-icon");this.header.replaceClass(E,this.iconCls)}else{var F=this.header.dom;var G=F.firstChild&&String(F.firstChild.tagName).toLowerCase()=="img"?F.firstChild:null;if(G){Ext.fly(G).replaceClass(E,this.iconCls)}else{Ext.DomHelper.insertBefore(F.firstChild,{tag:"img",src:Ext.BLANK_IMAGE_URL,cls:"x-panel-inline-icon "+this.iconCls})}}}},makeFloating:function(B){this.floating=true;this.el=new Ext.Layer(typeof B=="object"?B:{shadow:this.shadow!==undefined?this.shadow:"sides",shadowOffset:this.shadowOffset,constrain:false,shim:this.shim===false?false:undefined},this.el)},getTopToolbar:function(){return this.topToolbar},getBottomToolbar:function(){return this.bottomToolbar},addButton:function(F,H,I){var G={handler:H,scope:I,minWidth:this.minButtonWidth,hideParent:true};if(typeof F=="string"){G.text=F}else{Ext.apply(G,F)}var J=new Ext.Button(G);J.ownerCt=this;if(!this.buttons){this.buttons=[]}this.buttons.push(J);return J},addTool:function(){if(!this[this.toolTarget]){return }if(!this.toolTemplate){var J=new Ext.Template('<div class="x-tool x-tool-{id}">&#160;</div>');J.disableFormats=true;J.compile();Ext.Panel.prototype.toolTemplate=J}for(var K=0,M=arguments,N=M.length;K<N;K++){var H=M[K],I="x-tool-"+H.id+"-over";var L=this.toolTemplate.insertFirst(this[this.toolTarget],H,true);this.tools[H.id]=L;L.enableDisplayMode("block");L.on("click",this.createToolHandler(L,H,I,this));if(H.on){L.on(H.on)}if(H.hidden){L.hide()}if(H.qtip){if(typeof H.qtip=="object"){Ext.QuickTips.register(Ext.apply({target:L.id},H.qtip))}else{L.dom.qtip=H.qtip}}L.addClassOnOver(I)}},onShow:function(){if(this.floating){return this.el.show()}Ext.Panel.superclass.onShow.call(this)},onHide:function(){if(this.floating){return this.el.hide()}Ext.Panel.superclass.onHide.call(this)},createToolHandler:function(G,E,F,H){return function(A){G.removeClass(F);A.stopEvent();if(E.handler){E.handler.call(E.scope||G,A,G,H)}}},afterRender:function(){if(this.fromMarkup&&this.height===undefined&&!this.autoHeight){this.height=this.el.getHeight()}if(this.floating&&!this.hidden&&!this.initHidden){this.el.show()}if(this.title){this.setTitle(this.title)}this.setAutoScroll();if(this.html){this.body.update(typeof this.html=="object"?Ext.DomHelper.markup(this.html):this.html);delete this.html}if(this.contentEl){var B=Ext.getDom(this.contentEl);Ext.fly(B).removeClass(["x-hidden","x-hide-display"]);this.body.dom.appendChild(B)}if(this.collapsed){this.collapsed=false;this.collapse(false)}Ext.Panel.superclass.afterRender.call(this);this.initEvents()},setAutoScroll:function(){if(this.rendered&&this.autoScroll){this.body.setOverflow("auto")}},getKeyMap:function(){if(!this.keyMap){this.keyMap=new Ext.KeyMap(this.el,this.keys)}return this.keyMap},initEvents:function(){if(this.keys){this.getKeyMap()}if(this.draggable){this.initDraggable()}},initDraggable:function(){this.dd=new Ext.Panel.DD(this,typeof this.draggable=="boolean"?null:this.draggable)},beforeEffect:function(){if(this.floating){this.el.beforeAction()}this.el.addClass("x-panel-animated")},afterEffect:function(){this.syncShadow();this.el.removeClass("x-panel-animated")},createEffect:function(H,E,G){var F={scope:G,block:true};if(H===true){F.callback=E;return F}else{if(!H.callback){F.callback=E}else{F.callback=function(){E.call(G);Ext.callback(H.callback,H.scope)}}}return Ext.applyIf(F,H)},collapse:function(D){if(this.collapsed||this.el.hasFxBlock()||this.fireEvent("beforecollapse",this,D)===false){return }var C=D===true||(D!==false&&this.animCollapse);this.beforeEffect();this.onCollapse(C,D);return this},onCollapse:function(C,D){if(C){this[this.collapseEl].slideOut(this.slideAnchor,Ext.apply(this.createEffect(D||true,this.afterCollapse,this),this.collapseDefaults))}else{this[this.collapseEl].hide();this.afterCollapse()}},afterCollapse:function(){this.collapsed=true;this.el.addClass(this.collapsedCls);this.afterEffect();this.fireEvent("collapse",this)},expand:function(D){if(!this.collapsed||this.el.hasFxBlock()||this.fireEvent("beforeexpand",this,D)===false){return }var C=D===true||(D!==false&&this.animCollapse);this.el.removeClass(this.collapsedCls);this.beforeEffect();this.onExpand(C,D);return this},onExpand:function(C,D){if(C){this[this.collapseEl].slideIn(this.slideAnchor,Ext.apply(this.createEffect(D||true,this.afterExpand,this),this.expandDefaults))}else{this[this.collapseEl].show();this.afterExpand()}},afterExpand:function(){this.collapsed=false;this.afterEffect();this.fireEvent("expand",this)},toggleCollapse:function(B){this[this.collapsed?"expand":"collapse"](B);return this},onDisable:function(){if(this.rendered&&this.maskDisabled){this.el.mask()}Ext.Panel.superclass.onDisable.call(this)},onEnable:function(){if(this.rendered&&this.maskDisabled){this.el.unmask()}Ext.Panel.superclass.onEnable.call(this)},onResize:function(C,D){if(C!==undefined||D!==undefined){if(!this.collapsed){if(typeof C=="number"){this.body.setWidth(this.adjustBodyWidth(C-this.getFrameWidth()))}else{if(C=="auto"){this.body.setWidth(C)}}if(typeof D=="number"){this.body.setHeight(this.adjustBodyHeight(D-this.getFrameHeight()))}else{if(D=="auto"){this.body.setHeight(D)}}}else{this.queuedBodySize={width:C,height:D};if(!this.queuedExpand&&this.allowQueuedExpand!==false){this.queuedExpand=true;this.on("expand",function(){delete this.queuedExpand;this.onResize(this.queuedBodySize.width,this.queuedBodySize.height);this.doLayout()},this,{single:true})}}this.fireEvent("bodyresize",this,C,D)}this.syncShadow()},adjustBodyHeight:function(B){return B},adjustBodyWidth:function(B){return B},onPosition:function(){this.syncShadow()},onDestroy:function(){if(this.tools){for(var D in this.tools){Ext.destroy(this.tools[D])}}if(this.buttons){for(var C in this.buttons){Ext.destroy(this.buttons[C])}}Ext.destroy(this.topToolbar,this.bottomToolbar);Ext.Panel.superclass.onDestroy.call(this)},getFrameWidth:function(){var F=this.el.getFrameWidth("lr");if(this.frame){var D=this.bwrap.dom.firstChild;F+=(Ext.fly(D).getFrameWidth("l")+Ext.fly(D.firstChild).getFrameWidth("r"));var E=this.bwrap.dom.firstChild.firstChild.firstChild;F+=Ext.fly(E).getFrameWidth("lr")}return F},getFrameHeight:function(){var E=this.el.getFrameWidth("tb");E+=(this.tbar?this.tbar.getHeight():0)+(this.bbar?this.bbar.getHeight():0);if(this.frame){var G=this.el.dom.firstChild;var F=this.bwrap.dom.lastChild;E+=(G.offsetHeight+F.offsetHeight);var H=this.bwrap.dom.firstChild.firstChild.firstChild;E+=Ext.fly(H).getFrameWidth("tb")}else{E+=(this.header?this.header.getHeight():0)+(this.footer?this.footer.getHeight():0)}return E},getInnerWidth:function(){return this.getSize().width-this.getFrameWidth()},getInnerHeight:function(){return this.getSize().height-this.getFrameHeight()},syncShadow:function(){if(this.floating){this.el.sync(true)}},getLayoutTarget:function(){return this.body},setTitle:function(D,C){this.title=D;if(this.header&&this.headerAsText){this.header.child("span").update(D)}if(C){this.setIconClass(C)}this.fireEvent("titlechange",this,D);return this},getUpdater:function(){return this.body.getUpdater()},load:function(){var B=this.body.getUpdater();B.update.apply(B,arguments);return this},beforeDestroy:function(){Ext.Element.uncache(this.header,this.tbar,this.bbar,this.footer,this.body)},createClasses:function(){this.headerCls=this.baseCls+"-header";this.headerTextCls=this.baseCls+"-header-text";this.bwrapCls=this.baseCls+"-bwrap";this.tbarCls=this.baseCls+"-tbar";this.bodyCls=this.baseCls+"-body";this.bbarCls=this.baseCls+"-bbar";this.footerCls=this.baseCls+"-footer"},createGhost:function(F,G,J){var H=document.createElement("div");H.className="x-panel-ghost "+(F?F:"");if(this.header){H.appendChild(this.el.dom.firstChild.cloneNode(true))}Ext.fly(H.appendChild(document.createElement("ul"))).setHeight(this.bwrap.getHeight());H.style.width=this.el.dom.offsetWidth+"px";if(!J){this.container.dom.appendChild(H)}else{Ext.getDom(J).appendChild(H)}if(G!==false&&this.el.useShim!==false){var I=new Ext.Layer({shadow:false,useDisplay:true,constrain:false},H);I.show();return I}else{return new Ext.Element(H)}},doAutoLoad:function(){this.body.load(typeof this.autoLoad=="object"?this.autoLoad:{url:this.autoLoad})}});Ext.reg("panel",Ext.Panel);Ext.WindowGroup=function(){var J={};var L=[];var K=null;var M=function(A,B){return(!A._lastAccess||A._lastAccess<B._lastAccess)?-1:1};var I=function(){var C=L,E=C.length;if(E>0){C.sort(M);var D=C[0].manager.zseed;for(var B=0;B<E;B++){var A=C[B];if(A&&!A.hidden){A.setZIndex(D+(B*10))}}}H()};var N=function(A){if(A!=K){if(K){K.setActive(false)}K=A;if(A){A.setActive(true)}}};var H=function(){for(var A=L.length-1;A>=0;--A){if(!L[A].hidden){N(L[A]);return }}N(null)};return{zseed:9000,register:function(A){J[A.id]=A;L.push(A);A.on("hide",H)},unregister:function(A){delete J[A.id];A.un("hide",H);L.remove(A)},get:function(A){return typeof A=="object"?A:J[A]},bringToFront:function(A){A=this.get(A);if(A!=K){A._lastAccess=new Date().getTime();I();return true}return false},sendToBack:function(A){A=this.get(A);A._lastAccess=-(new Date().getTime());I();return A},hideAll:function(){for(var A in J){if(J[A]&&typeof J[A]!="function"&&J[A].isVisible()){J[A].hide()}}},getActive:function(){return K},getBy:function(C,D){var B=[];for(var E=L.length-1;E>=0;--E){var A=L[E];if(C.call(D||A,A)!==false){B.push(A)}}return B},each:function(B,C){for(var A in J){if(J[A]&&typeof J[A]!="function"){if(B.call(C||J[A],J[A])===false){return }}}}}};Ext.WindowMgr=new Ext.WindowGroup();Ext.Button=Ext.extend(Ext.Component,{hidden:false,disabled:false,pressed:false,enableToggle:false,menuAlign:"tl-bl?",type:"button",menuClassTarget:"tr",clickEvent:"click",handleMouseEvents:true,tooltipType:"qtip",buttonSelector:"button:first",initComponent:function(){Ext.Button.superclass.initComponent.call(this);this.addEvents("click","toggle","mouseover","mouseout","menushow","menuhide","menutriggerover","menutriggerout");if(this.menu){this.menu=Ext.menu.MenuMgr.get(this.menu)}if(typeof this.toggleGroup==="string"){this.enableToggle=true}},onRender:function(I,F){if(!this.template){if(!Ext.Button.buttonTemplate){Ext.Button.buttonTemplate=new Ext.Template('<table border="0" cellpadding="0" cellspacing="0" class="x-btn-wrap"><tbody><tr>','<td class="x-btn-left"><i>&#160;</i></td><td class="x-btn-center"><em unselectable="on"><button class="x-btn-text" type="{1}">{0}</button></em></td><td class="x-btn-right"><i>&#160;</i></td>',"</tr></tbody></table>")}this.template=Ext.Button.buttonTemplate}var J,G=[this.text||"&#160;",this.type];if(F){J=this.template.insertBefore(F,G,true)}else{J=this.template.append(I,G,true)}var H=J.child(this.buttonSelector);H.on("focus",this.onFocus,this);H.on("blur",this.onBlur,this);this.initButtonEl(J,H);if(this.menu){this.el.child(this.menuClassTarget).addClass("x-btn-with-menu")}Ext.ButtonToggleMgr.register(this)},initButtonEl:function(F,E){this.el=F;F.addClass("x-btn");if(this.icon){E.setStyle("background-image","url("+this.icon+")")}if(this.iconCls){E.addClass(this.iconCls);if(!this.cls){F.addClass(this.text?"x-btn-text-icon":"x-btn-icon")}}if(this.tabIndex!==undefined){E.dom.tabIndex=this.tabIndex}if(this.tooltip){if(typeof this.tooltip=="object"){Ext.QuickTips.register(Ext.apply({target:E.id},this.tooltip))}else{E.dom[this.tooltipType]=this.tooltip}}if(this.pressed){this.el.addClass("x-btn-pressed")}if(this.handleMouseEvents){F.on("mouseover",this.onMouseOver,this);F.on("mousedown",this.onMouseDown,this)}if(this.menu){this.menu.on("show",this.onMenuShow,this);this.menu.on("hide",this.onMenuHide,this)}if(this.id){this.el.dom.id=this.el.id=this.id}if(this.repeat){var D=new Ext.util.ClickRepeater(F,typeof this.repeat=="object"?this.repeat:{});D.on("click",this.onClick,this)}F.on(this.clickEvent,this.onClick,this)},afterRender:function(){Ext.Button.superclass.afterRender.call(this);if(Ext.isIE6){this.autoWidth.defer(1,this)}else{this.autoWidth()}},setIconClass:function(B){if(this.el){this.el.child(this.buttonSelector).replaceClass(this.iconCls,B)}this.iconCls=B},beforeDestroy:function(){if(this.rendered){var B=this.el.child(this.buttonSelector);if(B){B.removeAllListeners()}}if(this.menu){Ext.destroy(this.menu)}},onDestroy:function(){if(this.rendered){Ext.ButtonToggleMgr.unregister(this)}},autoWidth:function(){if(this.el){this.el.setWidth("auto");if(Ext.isIE7&&Ext.isStrict){var B=this.el.child(this.buttonSelector);if(B&&B.getWidth()>20){B.clip();B.setWidth(Ext.util.TextMetrics.measure(B,this.text).width+B.getFrameWidth("lr"))}}if(this.minWidth){if(this.el.getWidth()<this.minWidth){this.el.setWidth(this.minWidth)}}}},setHandler:function(D,C){this.handler=D;this.scope=C},setText:function(B){this.text=B;if(this.el){this.el.child("td.x-btn-center "+this.buttonSelector).update(B)}this.autoWidth()},getText:function(){return this.text},toggle:function(B){B=B===undefined?!this.pressed:B;if(B!=this.pressed){if(B){this.el.addClass("x-btn-pressed");this.pressed=true;this.fireEvent("toggle",this,true)}else{this.el.removeClass("x-btn-pressed");this.pressed=false;this.fireEvent("toggle",this,false)}if(this.toggleHandler){this.toggleHandler.call(this.scope||this,this,B)}}},focus:function(){this.el.child(this.buttonSelector).focus()},onDisable:function(){if(this.el){if(!Ext.isIE6||!this.text){this.el.addClass(this.disabledClass)}this.el.dom.disabled=true}this.disabled=true},onEnable:function(){if(this.el){if(!Ext.isIE6||!this.text){this.el.removeClass(this.disabledClass)}this.el.dom.disabled=false}this.disabled=false},showMenu:function(){if(this.menu){this.menu.show(this.el,this.menuAlign)}return this},hideMenu:function(){if(this.menu){this.menu.hide()}return this},hasVisibleMenu:function(){return this.menu&&this.menu.isVisible()},onClick:function(B){if(B){B.preventDefault()}if(B.button!=0){return }if(!this.disabled){if(this.enableToggle&&(this.allowDepress!==false||!this.pressed)){this.toggle()}if(this.menu&&!this.menu.isVisible()&&!this.ignoreNextClick){this.showMenu()}this.fireEvent("click",this,B);if(this.handler){this.handler.call(this.scope||this,this,B)}}},isMenuTriggerOver:function(D,C){return this.menu&&!C},isMenuTriggerOut:function(D,C){return this.menu&&!C},onMouseOver:function(D){if(!this.disabled){var C=D.within(this.el,true);if(!C){this.el.addClass("x-btn-over");Ext.getDoc().on("mouseover",this.monitorMouseOver,this);this.fireEvent("mouseover",this,D)}if(this.isMenuTriggerOver(D,C)){this.fireEvent("menutriggerover",this,this.menu,D)}}},monitorMouseOver:function(B){if(B.target!=this.el.dom&&!B.within(this.el)){Ext.getDoc().un("mouseover",this.monitorMouseOver,this);this.onMouseOut(B)}},onMouseOut:function(D){var C=D.within(this.el)&&D.target!=this.el.dom;this.el.removeClass("x-btn-over");this.fireEvent("mouseout",this,D);if(this.isMenuTriggerOut(D,C)){this.fireEvent("menutriggerout",this,this.menu,D)}},onFocus:function(B){if(!this.disabled){this.el.addClass("x-btn-focus")}},onBlur:function(B){this.el.removeClass("x-btn-focus")},getClickEl:function(D,C){return this.el},onMouseDown:function(B){if(!this.disabled&&B.button==0){this.getClickEl(B).addClass("x-btn-click");Ext.getDoc().on("mouseup",this.onMouseUp,this)}},onMouseUp:function(B){if(B.button==0){this.getClickEl(B,true).removeClass("x-btn-click");Ext.getDoc().un("mouseup",this.onMouseUp,this)}},onMenuShow:function(B){this.ignoreNextClick=0;this.el.addClass("x-btn-menu-active");this.fireEvent("menushow",this,this.menu)},onMenuHide:function(B){this.el.removeClass("x-btn-menu-active");this.ignoreNextClick=this.restoreClick.defer(250,this);this.fireEvent("menuhide",this,this.menu)},restoreClick:function(){this.ignoreNextClick=0}});Ext.reg("button",Ext.Button);Ext.ButtonToggleMgr=function(){var C={};function D(H,A){if(A){var B=C[H.toggleGroup];for(var I=0,J=B.length;I<J;I++){if(B[I]!=H){B[I].toggle(false)}}}}return{register:function(B){if(!B.toggleGroup){return }var A=C[B.toggleGroup];if(!A){A=C[B.toggleGroup]=[]}A.push(B);B.on("toggle",D)},unregister:function(B){if(!B.toggleGroup){return }var A=C[B.toggleGroup];if(A){A.remove(B);B.un("toggle",D)}}}}();Ext.MessageBox=function(){var W,o,a,X;var i,e,Y,p,d,b,h,k;var Z,V,c,n="";var m=function(A){W.hide();Ext.callback(o.fn,o.scope||window,[A,V.dom.value],1)};var U=function(){if(o&&o.cls){W.el.removeClass(o.cls)}d.reset()};var l=function(A,C,B){if(o&&o.closable!==false){W.hide()}if(B){B.stopEvent()}};var g=function(C){var A=0;if(!C){Z.ok.hide();Z.cancel.hide();Z.yes.hide();Z.no.hide();return A}W.footer.dom.style.display="";for(var B in Z){if(typeof Z[B]!="function"){if(C[B]){Z[B].show();Z[B].setText(typeof C[B]=="string"?C[B]:Ext.MessageBox.buttonText[B]);A+=Z[B].el.getWidth()+15}else{Z[B].hide()}}}return A};return{getDialog:function(C){if(!W){W=new Ext.Window({autoCreate:true,title:C,resizable:false,constrain:true,constrainHeader:true,minimizable:false,maximizable:false,stateful:false,modal:true,shim:true,buttonAlign:"center",width:400,height:100,minHeight:80,plain:true,footer:true,closable:true,close:function(){if(o&&o.buttons&&o.buttons.no&&!o.buttons.cancel){m("no")}else{m("cancel")}}});Z={};var B=this.buttonText;Z.ok=W.addButton(B.ok,m.createCallback("ok"));Z.yes=W.addButton(B.yes,m.createCallback("yes"));Z.no=W.addButton(B.no,m.createCallback("no"));Z.cancel=W.addButton(B.cancel,m.createCallback("cancel"));Z.ok.hideMode=Z.yes.hideMode=Z.no.hideMode=Z.cancel.hideMode="offsets";W.render(document.body);W.getEl().addClass("x-window-dlg");a=W.mask;i=W.body.createChild({html:'<div class="ext-mb-icon"></div><div class="ext-mb-content"><span class="ext-mb-text"></span><br /><input type="text" class="ext-mb-input" /><textarea class="ext-mb-textarea"></textarea></div>'});h=Ext.get(i.dom.firstChild);var A=i.dom.childNodes[1];e=Ext.get(A.firstChild);Y=Ext.get(A.childNodes[2]);Y.enableDisplayMode();Y.addKeyListener([10,13],function(){if(W.isVisible()&&o&&o.buttons){if(o.buttons.ok){m("ok")}else{if(o.buttons.yes){m("yes")}}}});p=Ext.get(A.childNodes[3]);p.enableDisplayMode();d=new Ext.ProgressBar({renderTo:i});i.createChild({cls:"x-clear"})}return W},updateText:function(F){if(!W.isVisible()&&!o.width){W.setSize(this.maxWidth,100)}e.update(F||"&#160;");var B=n!=""?(h.getWidth()+h.getMargins("lr")):0;var D=e.getWidth()+e.getMargins("lr");var A=W.getFrameWidth("lr");var E=W.body.getFrameWidth("lr");if(Ext.isIE&&B>0){B+=3}var C=Math.max(Math.min(o.width||B+D+A+E,this.maxWidth),Math.max(o.minWidth||this.minWidth,c||0));if(o.prompt===true){V.setWidth(C-B-A-E)}if(o.progress===true||o.wait===true){d.setSize(C-B-A-E)}W.setSize(C,"auto").center();return this},updateProgress:function(B,C,A){d.updateProgress(B,C);if(A){this.updateText(A)}return this},isVisible:function(){return W&&W.isVisible()},hide:function(){if(this.isVisible()){W.hide();U()}return this},show:function(E){if(this.isVisible()){this.hide()}o=E;var D=this.getDialog(o.title||"&#160;");D.setTitle(o.title||"&#160;");var C=(o.closable!==false&&o.progress!==true&&o.wait!==true);D.tools.close.setDisplayed(C);V=Y;o.prompt=o.prompt||(o.multiline?true:false);if(o.prompt){if(o.multiline){Y.hide();p.show();p.setHeight(typeof o.multiline=="number"?o.multiline:this.defaultTextHeight);V=p}else{Y.show();p.hide()}}else{Y.hide();p.hide()}V.dom.value=o.value||"";if(o.prompt){D.focusEl=V}else{var A=o.buttons;var B=null;if(A&&A.ok){B=Z.ok}else{if(A&&A.yes){B=Z.yes}}if(B){D.focusEl=B}}this.setIcon(o.icon);c=g(o.buttons);d.setVisible(o.progress===true||o.wait===true);this.updateProgress(0,o.progressText);this.updateText(o.msg);if(o.cls){D.el.addClass(o.cls)}D.proxyDrag=o.proxyDrag===true;D.modal=o.modal!==false;D.mask=o.modal!==false?a:false;if(!D.isVisible()){document.body.appendChild(W.el.dom);D.setAnimateTarget(o.animEl);D.show(o.animEl)}D.on("show",function(){if(C===true){D.keyMap.enable()}else{D.keyMap.disable()}},this,{single:true});if(o.wait===true){d.wait(o.waitConfig)}return this},setIcon:function(A){if(A&&A!=""){h.removeClass("x-hidden");h.replaceClass(n,A);n=A}else{h.replaceClass(n,"x-hidden");n=""}return this},progress:function(A,B,C){this.show({title:A,msg:B,buttons:false,progress:true,closable:false,minWidth:this.minProgressWidth,progressText:C});return this},wait:function(A,B,C){this.show({title:B,msg:A,buttons:false,closable:false,wait:true,modal:true,minWidth:this.minProgressWidth,waitConfig:C});return this},alert:function(D,A,B,C){this.show({title:D,msg:A,buttons:this.OK,fn:B,scope:C});return this},confirm:function(D,A,B,C){this.show({title:D,msg:A,buttons:this.YESNO,fn:B,scope:C,icon:this.QUESTION});return this},prompt:function(D,E,A,B,C){this.show({title:D,msg:E,buttons:this.OKCANCEL,fn:A,minWidth:250,scope:B,prompt:true,multiline:C});return this},OK:{ok:true},CANCEL:{cancel:true},OKCANCEL:{ok:true,cancel:true},YESNO:{yes:true,no:true},YESNOCANCEL:{yes:true,no:true,cancel:true},INFO:"ext-mb-info",WARNING:"ext-mb-warning",QUESTION:"ext-mb-question",ERROR:"ext-mb-error",defaultTextHeight:75,maxWidth:600,minWidth:100,minProgressWidth:250,buttonText:{ok:"OK",cancel:"Cancel",yes:"Yes",no:"No"}}}();Ext.Msg=Ext.MessageBox;Ext.tree.TreePanel=Ext.extend(Ext.Panel,{rootVisible:true,animate:Ext.enableFx,lines:true,enableDD:false,hlDrop:Ext.enableFx,pathSeparator:"/",initComponent:function(){Ext.tree.TreePanel.superclass.initComponent.call(this);if(!this.eventModel){this.eventModel=new Ext.tree.TreeEventModel(this)}this.nodeHash={};if(this.root){this.setRootNode(this.root)}this.addEvents("append","remove","movenode","insert","beforeappend","beforeremove","beforemovenode","beforeinsert","beforeload","load","textchange","beforeexpandnode","beforecollapsenode","expandnode","disabledchange","collapsenode","beforeclick","click","checkchange","dblclick","contextmenu","beforechildrenrendered","startdrag","enddrag","dragdrop","beforenodedrop","nodedrop","nodedragover");if(this.singleExpand){this.on("beforeexpandnode",this.restrictExpand,this)}},proxyNodeEvent:function(M,N,H,I,J,K,L){if(M=="collapse"||M=="expand"||M=="beforecollapse"||M=="beforeexpand"||M=="move"||M=="beforemove"){M=M+"node"}return this.fireEvent(M,N,H,I,J,K,L)},getRootNode:function(){return this.root},setRootNode:function(D){this.root=D;D.ownerTree=this;D.isRoot=true;this.registerNode(D);if(!this.rootVisible){var C=D.attributes.uiProvider;D.ui=C?new C(D):new Ext.tree.RootTreeNodeUI(D)}return D},getNodeById:function(B){return this.nodeHash[B]},registerNode:function(B){this.nodeHash[B.id]=B},unregisterNode:function(B){delete this.nodeHash[B.id]},toString:function(){return"[Tree"+(this.id?" "+this.id:"")+"]"},restrictExpand:function(C){var D=C.parentNode;if(D){if(D.expandedChild&&D.expandedChild.parentNode==D){D.expandedChild.collapse()}D.expandedChild=C}},getChecked:function(E,H){H=H||this.root;var G=[];var F=function(){if(this.attributes.checked){G.push(!E?this:(E=="id"?this.id:this.attributes[E]))}};H.cascade(F);return G},getEl:function(){return this.el},getLoader:function(){return this.loader},expandAll:function(){this.root.expand(true)},collapseAll:function(){this.root.collapse(true)},getSelectionModel:function(){if(!this.selModel){this.selModel=new Ext.tree.DefaultSelectionModel()}return this.selModel},expandPath:function(J,H,I){H=H||"id";var L=J.split(this.pathSeparator);var M=this.root;if(M.attributes[H]!=L[1]){if(I){I(false,null)}return }var N=1;var K=function(){if(++N==L.length){if(I){I(true,M)}return }var A=M.findChild(H,L[N]);if(!A){if(I){I(false,M)}return }M=A;A.expand(false,false,K)};M.expand(false,false,K)},selectPath:function(I,G,H){G=G||"id";var K=I.split(this.pathSeparator);var L=K.pop();if(K.length>0){var J=function(B,C){if(B&&C){var A=C.findChild(G,L);if(A){A.select();if(H){H(true,A)}}else{if(H){H(false,A)}}}else{if(H){H(false,A)}}};this.expandPath(K.join(this.pathSeparator),G,J)}else{this.root.select();if(H){H(true,this.root)}}},getTreeEl:function(){return this.body},onRender:function(D,C){Ext.tree.TreePanel.superclass.onRender.call(this,D,C);this.el.addClass("x-tree");this.innerCt=this.body.createChild({tag:"ul",cls:"x-tree-root-ct "+(this.useArrows?"x-tree-arrows":this.lines?"x-tree-lines":"x-tree-no-lines")})},initEvents:function(){Ext.tree.TreePanel.superclass.initEvents.call(this);if(this.containerScroll){Ext.dd.ScrollManager.register(this.body)}if((this.enableDD||this.enableDrop)&&!this.dropZone){this.dropZone=new Ext.tree.TreeDropZone(this,this.dropConfig||{ddGroup:this.ddGroup||"TreeDD",appendOnly:this.ddAppendOnly===true})}if((this.enableDD||this.enableDrag)&&!this.dragZone){this.dragZone=new Ext.tree.TreeDragZone(this,this.dragConfig||{ddGroup:this.ddGroup||"TreeDD",scroll:this.ddScroll})}this.getSelectionModel().init(this)},afterRender:function(){Ext.tree.TreePanel.superclass.afterRender.call(this);this.root.render();if(!this.rootVisible){this.root.renderChildren()}},onDestroy:function(){if(this.rendered){this.body.removeAllListeners();Ext.dd.ScrollManager.unregister(this.body);if(this.dropZone){this.dropZone.unreg()}if(this.dragZone){this.dragZone.unreg()}}this.root.destroy();this.nodeHash=null;Ext.tree.TreePanel.superclass.onDestroy.call(this)}});Ext.reg("treepanel",Ext.tree.TreePanel);Ext.tree.TreeEventModel=function(B){this.tree=B;this.tree.on("render",this.initEvents,this)};Ext.tree.TreeEventModel.prototype={initEvents:function(){var B=this.tree.getTreeEl();B.on("click",this.delegateClick,this);if(this.tree.trackMouseOver!==false){B.on("mouseover",this.delegateOver,this);B.on("mouseout",this.delegateOut,this)}B.on("dblclick",this.delegateDblClick,this);B.on("contextmenu",this.delegateContextMenu,this)},getNode:function(F){var D;if(D=F.getTarget(".x-tree-node-el",10)){var E=Ext.fly(D,"_treeEvents").getAttributeNS("ext","tree-node-id");if(E){return this.tree.getNodeById(E)}}return null},getNodeTarget:function(D){var C=D.getTarget(".x-tree-node-icon",1);if(!C){C=D.getTarget(".x-tree-node-el",6)}return C},delegateOut:function(F,D){if(!this.beforeEvent(F)){return }if(F.getTarget(".x-tree-ec-icon",1)){var E=this.getNode(F);this.onIconOut(F,E);if(E==this.lastEcOver){delete this.lastEcOver}}if((D=this.getNodeTarget(F))&&!F.within(D,true)){this.onNodeOut(F,this.getNode(F))}},delegateOver:function(D,C){if(!this.beforeEvent(D)){return }if(this.lastEcOver){this.onIconOut(D,this.lastEcOver);delete this.lastEcOver}if(D.getTarget(".x-tree-ec-icon",1)){this.lastEcOver=this.getNode(D);this.onIconOver(D,this.lastEcOver)}if(C=this.getNodeTarget(D)){this.onNodeOver(D,this.getNode(D))}},delegateClick:function(D,C){if(!this.beforeEvent(D)){return }if(D.getTarget("input[type=checkbox]",1)){this.onCheckboxClick(D,this.getNode(D))}else{if(D.getTarget(".x-tree-ec-icon",1)){this.onIconClick(D,this.getNode(D))}else{if(this.getNodeTarget(D)){this.onNodeClick(D,this.getNode(D))}}}},delegateDblClick:function(D,C){if(this.beforeEvent(D)&&this.getNodeTarget(D)){this.onNodeDblClick(D,this.getNode(D))}},delegateContextMenu:function(D,C){if(this.beforeEvent(D)&&this.getNodeTarget(D)){this.onNodeContextMenu(D,this.getNode(D))}},onNodeClick:function(D,C){C.ui.onClick(D)},onNodeOver:function(D,C){C.ui.onOver(D)},onNodeOut:function(D,C){C.ui.onOut(D)},onIconOver:function(D,C){C.ui.addClass("x-tree-ec-over")},onIconOut:function(D,C){C.ui.removeClass("x-tree-ec-over")},onIconClick:function(D,C){C.ui.ecClick(D)},onCheckboxClick:function(D,C){C.ui.onCheckChange(D)},onNodeDblClick:function(D,C){C.ui.onDblClick(D)},onNodeContextMenu:function(D,C){C.ui.onContextMenu(D)},beforeEvent:function(B){if(this.disabled){B.stopEvent();return false}return true},disable:function(){this.disabled=true},enable:function(){this.disabled=false}};Ext.tree.DefaultSelectionModel=function(B){this.selNode=null;this.addEvents("selectionchange","beforeselect");Ext.apply(this,B);Ext.tree.DefaultSelectionModel.superclass.constructor.call(this)};Ext.extend(Ext.tree.DefaultSelectionModel,Ext.util.Observable,{init:function(B){this.tree=B;B.getTreeEl().on("keydown",this.onKeyDown,this);B.on("click",this.onNodeClick,this)},onNodeClick:function(C,D){this.select(C)},select:function(D){var C=this.selNode;if(C!=D&&this.fireEvent("beforeselect",this,D,C)!==false){if(C){C.ui.onSelectedChange(false)}this.selNode=D;D.ui.onSelectedChange(true);this.fireEvent("selectionchange",this,D,C)}return D},unselect:function(B){if(this.selNode==B){this.clearSelections()}},clearSelections:function(){var B=this.selNode;if(B){B.ui.onSelectedChange(false);this.selNode=null;this.fireEvent("selectionchange",this,null)}return B},getSelectedNode:function(){return this.selNode},isSelected:function(B){return this.selNode==B},selectPrevious:function(){var D=this.selNode||this.lastSelNode;if(!D){return null}var E=D.previousSibling;if(E){if(!E.isExpanded()||E.childNodes.length<1){return this.select(E)}else{var F=E.lastChild;while(F&&F.isExpanded()&&F.childNodes.length>0){F=F.lastChild}return this.select(F)}}else{if(D.parentNode&&(this.tree.rootVisible||!D.parentNode.isRoot)){return this.select(D.parentNode)}}return null},selectNext:function(){var D=this.selNode||this.lastSelNode;if(!D){return null}if(D.firstChild&&D.isExpanded()){return this.select(D.firstChild)}else{if(D.nextSibling){return this.select(D.nextSibling)}else{if(D.parentNode){var C=null;D.parentNode.bubble(function(){if(this.nextSibling){C=this.getOwnerTree().selModel.select(this.nextSibling);return false}});return C}}}return null},onKeyDown:function(G){var H=this.selNode||this.lastSelNode;var F=this;if(!H){return }var E=G.getKey();switch(E){case G.DOWN:G.stopEvent();this.selectNext();break;case G.UP:G.stopEvent();this.selectPrevious();break;case G.RIGHT:G.preventDefault();if(H.hasChildNodes()){if(!H.isExpanded()){H.expand()}else{if(H.firstChild){this.select(H.firstChild,G)}}}break;case G.LEFT:G.preventDefault();if(H.hasChildNodes()&&H.isExpanded()){H.collapse()}else{if(H.parentNode&&(this.tree.rootVisible||H.parentNode!=this.tree.getRootNode())){this.select(H.parentNode,G)}}break}}});Ext.tree.MultiSelectionModel=function(B){this.selNodes=[];this.selMap={};this.addEvents("selectionchange");Ext.apply(this,B);Ext.tree.MultiSelectionModel.superclass.constructor.call(this)};Ext.extend(Ext.tree.MultiSelectionModel,Ext.util.Observable,{init:function(B){this.tree=B;B.getTreeEl().on("keydown",this.onKeyDown,this);B.on("click",this.onNodeClick,this)},onNodeClick:function(C,D){this.select(C,D,D.ctrlKey)},select:function(D,E,F){if(F!==true){this.clearSelections(true)}if(this.isSelected(D)){this.lastSelNode=D;return D}this.selNodes.push(D);this.selMap[D.id]=D;this.lastSelNode=D;D.ui.onSelectedChange(true);this.fireEvent("selectionchange",this,this.selNodes);return D},unselect:function(F){if(this.selMap[F.id]){F.ui.onSelectedChange(false);var E=this.selNodes;var D=E.indexOf(F);if(D!=-1){this.selNodes.splice(D,1)}delete this.selMap[F.id];this.fireEvent("selectionchange",this,this.selNodes)}},clearSelections:function(H){var F=this.selNodes;if(F.length>0){for(var G=0,E=F.length;G<E;G++){F[G].ui.onSelectedChange(false)}this.selNodes=[];this.selMap={};if(H!==true){this.fireEvent("selectionchange",this,this.selNodes)}}},isSelected:function(B){return this.selMap[B.id]?true:false},getSelectedNodes:function(){return this.selNodes},onKeyDown:Ext.tree.DefaultSelectionModel.prototype.onKeyDown,selectNext:Ext.tree.DefaultSelectionModel.prototype.selectNext,selectPrevious:Ext.tree.DefaultSelectionModel.prototype.selectPrevious});Ext.tree.TreeNode=function(C){C=C||{};if(typeof C=="string"){C={text:C}}this.childrenRendered=false;this.rendered=false;Ext.tree.TreeNode.superclass.constructor.call(this,C);this.expanded=C.expanded===true;this.isTarget=C.isTarget!==false;this.draggable=C.draggable!==false&&C.allowDrag!==false;this.allowChildren=C.allowChildren!==false&&C.allowDrop!==false;this.text=C.text;this.disabled=C.disabled===true;this.addEvents("textchange","beforeexpand","beforecollapse","expand","disabledchange","collapse","beforeclick","click","checkchange","dblclick","contextmenu","beforechildrenrendered");var D=this.attributes.uiProvider||this.defaultUI||Ext.tree.TreeNodeUI;this.ui=new D(this)};Ext.extend(Ext.tree.TreeNode,Ext.data.Node,{preventHScroll:true,isExpanded:function(){return this.expanded},getUI:function(){return this.ui},setFirstChild:function(C){var D=this.firstChild;Ext.tree.TreeNode.superclass.setFirstChild.call(this,C);if(this.childrenRendered&&D&&C!=D){D.renderIndent(true,true)}if(this.rendered){this.renderIndent(true,true)}},setLastChild:function(D){var C=this.lastChild;Ext.tree.TreeNode.superclass.setLastChild.call(this,D);if(this.childrenRendered&&C&&D!=C){C.renderIndent(true,true)}if(this.rendered){this.renderIndent(true,true)}},appendChild:function(){var B=Ext.tree.TreeNode.superclass.appendChild.apply(this,arguments);if(B&&this.childrenRendered){B.render()}this.ui.updateExpandIcon();return B},removeChild:function(B){this.ownerTree.getSelectionModel().unselect(B);Ext.tree.TreeNode.superclass.removeChild.apply(this,arguments);if(this.childrenRendered){B.ui.remove()}if(this.childNodes.length<1){this.collapse(false,false)}else{this.ui.updateExpandIcon()}if(!this.firstChild&&!this.isHiddenRoot()){this.childrenRendered=false}return B},insertBefore:function(E,D){var F=Ext.tree.TreeNode.superclass.insertBefore.apply(this,arguments);if(F&&D&&this.childrenRendered){E.render()}this.ui.updateExpandIcon();return F},setText:function(D){var C=this.text;this.text=D;this.attributes.text=D;if(this.rendered){this.ui.onTextChange(this,D,C)}this.fireEvent("textchange",this,D,C)},select:function(){this.getOwnerTree().getSelectionModel().select(this)},unselect:function(){this.getOwnerTree().getSelectionModel().unselect(this)},isSelected:function(){return this.getOwnerTree().getSelectionModel().isSelected(this)},expand:function(D,F,E){if(!this.expanded){if(this.fireEvent("beforeexpand",this,D,F)===false){return }if(!this.childrenRendered){this.renderChildren()}this.expanded=true;if(!this.isHiddenRoot()&&(this.getOwnerTree().animate&&F!==false)||F){this.ui.animExpand(function(){this.fireEvent("expand",this);if(typeof E=="function"){E(this)}if(D===true){this.expandChildNodes(true)}}.createDelegate(this));return }else{this.ui.expand();this.fireEvent("expand",this);if(typeof E=="function"){E(this)}}}else{if(typeof E=="function"){E(this)}}if(D===true){this.expandChildNodes(true)}},isHiddenRoot:function(){return this.isRoot&&!this.getOwnerTree().rootVisible},collapse:function(J,G){if(this.expanded&&!this.isHiddenRoot()){if(this.fireEvent("beforecollapse",this,J,G)===false){return }this.expanded=false;if((this.getOwnerTree().animate&&G!==false)||G){this.ui.animCollapse(function(){this.fireEvent("collapse",this);if(J===true){this.collapseChildNodes(true)}}.createDelegate(this));return }else{this.ui.collapse();this.fireEvent("collapse",this)}}if(J===true){var H=this.childNodes;for(var I=0,F=H.length;I<F;I++){H[I].collapse(true,false)}}},delayedExpand:function(B){if(!this.expandProcId){this.expandProcId=this.expand.defer(B,this)}},cancelExpand:function(){if(this.expandProcId){clearTimeout(this.expandProcId)}this.expandProcId=false},toggle:function(){if(this.expanded){this.collapse()}else{this.expand()}},ensureVisible:function(D){var C=this.getOwnerTree();C.expandPath(this.parentNode.getPath(),false,function(){var A=C.getNodeById(this.id);C.getTreeEl().scrollChildIntoView(A.ui.anchor);Ext.callback(D)}.createDelegate(this))},expandChildNodes:function(H){var F=this.childNodes;for(var G=0,E=F.length;G<E;G++){F[G].expand(H)}},collapseChildNodes:function(H){var F=this.childNodes;for(var G=0,E=F.length;G<E;G++){F[G].collapse(H)}},disable:function(){this.disabled=true;this.unselect();if(this.rendered&&this.ui.onDisableChange){this.ui.onDisableChange(this,true)}this.fireEvent("disabledchange",this,true)},enable:function(){this.disabled=false;if(this.rendered&&this.ui.onDisableChange){this.ui.onDisableChange(this,false)}this.fireEvent("disabledchange",this,false)},renderChildren:function(H){if(H!==false){this.fireEvent("beforechildrenrendered",this)}var F=this.childNodes;for(var G=0,E=F.length;G<E;G++){F[G].render(true)}this.childrenRendered=true},sort:function(G,H){Ext.tree.TreeNode.superclass.sort.apply(this,arguments);if(this.childrenRendered){var I=this.childNodes;for(var J=0,F=I.length;J<F;J++){I[J].render(true)}}},render:function(B){this.ui.render(B);if(!this.rendered){this.getOwnerTree().registerNode(this);this.rendered=true;if(this.expanded){this.expanded=false;this.expand(false,false)}}},renderIndent:function(J,G){if(G){this.ui.childIndent=null}this.ui.renderIndent();if(J===true&&this.childrenRendered){var H=this.childNodes;for(var I=0,F=H.length;I<F;I++){H[I].renderIndent(true,G)}}},beginUpdate:function(){this.childrenRendered=false},endUpdate:function(){if(this.expanded){this.renderChildren()}},destroy:function(){for(var D=0,C=this.childNodes.length;D<C;D++){this.childNodes[D].destroy()}this.childNodes=null;if(this.ui.destroy){this.ui.destroy()}}});Ext.tree.AsyncTreeNode=function(B){this.loaded=false;this.loading=false;Ext.tree.AsyncTreeNode.superclass.constructor.apply(this,arguments);this.addEvents("beforeload","load")};Ext.extend(Ext.tree.AsyncTreeNode,Ext.tree.TreeNode,{expand:function(L,J,H){if(this.loading){var I;var K=function(){if(!this.loading){clearInterval(I);this.expand(L,J,H)}}.createDelegate(this);I=setInterval(K,200);return }if(!this.loaded){if(this.fireEvent("beforeload",this)===false){return }this.loading=true;this.ui.beforeLoad(this);var G=this.loader||this.attributes.loader||this.getOwnerTree().getLoader();if(G){G.load(this,this.loadComplete.createDelegate(this,[L,J,H]));return }}Ext.tree.AsyncTreeNode.superclass.expand.call(this,L,J,H)},isLoading:function(){return this.loading},loadComplete:function(D,F,E){this.loading=false;this.loaded=true;this.ui.afterLoad(this);this.fireEvent("load",this);this.expand(D,F,E)},isLoaded:function(){return this.loaded},hasChildNodes:function(){if(!this.isLeaf()&&!this.loaded){return true}else{return Ext.tree.AsyncTreeNode.superclass.hasChildNodes.call(this)}},reload:function(B){this.collapse(false,false);while(this.firstChild){this.removeChild(this.firstChild)}this.childrenRendered=false;this.loaded=false;if(this.isHiddenRoot()){this.expanded=false}this.expand(false,false,B)}});Ext.tree.TreeNodeUI=function(B){this.node=B;this.rendered=false;this.animating=false;this.wasLeaf=true;this.ecc="x-tree-ec-icon x-tree-elbow";this.emptyIcon=Ext.BLANK_IMAGE_URL};Ext.tree.TreeNodeUI.prototype={removeChild:function(B){if(this.rendered){this.ctNode.removeChild(B.ui.getEl())}},beforeLoad:function(){this.addClass("x-tree-node-loading")},afterLoad:function(){this.removeClass("x-tree-node-loading")},onTextChange:function(F,E,D){if(this.rendered){this.textNode.innerHTML=E}},onDisableChange:function(C,D){this.disabled=D;if(this.checkbox){this.checkbox.disabled=D}if(D){this.addClass("x-tree-node-disabled")}else{this.removeClass("x-tree-node-disabled")}},onSelectedChange:function(B){if(B){this.focus();this.addClass("x-tree-selected")}else{this.removeClass("x-tree-selected")}},onMove:function(I,K,M,L,N,P){this.childIndent=null;if(this.rendered){var J=L.ui.getContainer();if(!J){this.holder=document.createElement("div");this.holder.appendChild(this.wrap);return }var O=P?P.ui.getEl():null;if(O){J.insertBefore(this.wrap,O)}else{J.appendChild(this.wrap)}this.node.renderIndent(true)}},addClass:function(B){if(this.elNode){Ext.fly(this.elNode).addClass(B)}},removeClass:function(B){if(this.elNode){Ext.fly(this.elNode).removeClass(B)}},remove:function(){if(this.rendered){this.holder=document.createElement("div");this.holder.appendChild(this.wrap)}},fireEvent:function(){return this.node.fireEvent.apply(this.node,arguments)},initEvents:function(){this.node.on("move",this.onMove,this);if(this.node.disabled){this.addClass("x-tree-node-disabled");if(this.checkbox){this.checkbox.disabled=true}}if(this.node.hidden){this.hide()}var D=this.node.getOwnerTree();var C=D.enableDD||D.enableDrag||D.enableDrop;if(C&&(!this.node.isRoot||D.rootVisible)){Ext.dd.Registry.register(this.elNode,{node:this.node,handles:this.getDDHandles(),isHandle:false})}},getDDHandles:function(){return[this.iconNode,this.textNode,this.elNode]},hide:function(){this.node.hidden=true;if(this.wrap){this.wrap.style.display="none"}},show:function(){this.node.hidden=false;if(this.wrap){this.wrap.style.display=""}},onContextMenu:function(B){if(this.node.hasListener("contextmenu")||this.node.getOwnerTree().hasListener("contextmenu")){B.preventDefault();this.focus();this.fireEvent("contextmenu",this.node,B)}},onClick:function(D){if(this.dropping){D.stopEvent();return }if(this.fireEvent("beforeclick",this.node,D)!==false){var C=D.getTarget("a");if(!this.disabled&&this.node.attributes.href&&C){this.fireEvent("click",this.node,D);return }else{if(C&&D.ctrlKey){D.stopEvent()}}D.preventDefault();if(this.disabled){return }if(this.node.attributes.singleClickExpand&&!this.animating&&this.node.hasChildNodes()){this.node.toggle()}this.fireEvent("click",this.node,D)}else{D.stopEvent()}},onDblClick:function(B){B.preventDefault();if(this.disabled){return }if(this.checkbox){this.toggleCheck()}if(!this.animating&&this.node.hasChildNodes()){this.node.toggle()}this.fireEvent("dblclick",this.node,B)},onOver:function(B){this.addClass("x-tree-node-over")},onOut:function(B){this.removeClass("x-tree-node-over")},onCheckChange:function(){var B=this.checkbox.checked;this.node.attributes.checked=B;this.fireEvent("checkchange",this.node,B)},ecClick:function(B){if(!this.animating&&(this.node.hasChildNodes()||this.node.attributes.expandable)){this.node.toggle()}},startDrop:function(){this.dropping=true},endDrop:function(){setTimeout(function(){this.dropping=false}.createDelegate(this),50)},expand:function(){this.updateExpandIcon();this.ctNode.style.display=""},focus:function(){if(!this.node.preventHScroll){try{this.anchor.focus()}catch(E){}}else{if(!Ext.isIE){try{var F=this.node.getOwnerTree().getTreeEl().dom;var D=F.scrollLeft;this.anchor.focus();F.scrollLeft=D}catch(E){}}}},toggleCheck:function(D){var C=this.checkbox;if(C){C.checked=(D===undefined?!C.checked:D)}},blur:function(){try{this.anchor.blur()}catch(B){}},animExpand:function(D){var C=Ext.get(this.ctNode);C.stopFx();if(!this.node.hasChildNodes()){this.updateExpandIcon();this.ctNode.style.display="";Ext.callback(D);return }this.animating=true;this.updateExpandIcon();C.slideIn("t",{callback:function(){this.animating=false;Ext.callback(D)},scope:this,duration:this.node.ownerTree.duration||0.25})},highlight:function(){var B=this.node.getOwnerTree();Ext.fly(this.wrap).highlight(B.hlColor||"C3DAF9",{endColor:B.hlBaseColor})},collapse:function(){this.updateExpandIcon();this.ctNode.style.display="none"},animCollapse:function(D){var C=Ext.get(this.ctNode);C.enableDisplayMode("block");C.stopFx();this.animating=true;this.updateExpandIcon();C.slideOut("t",{callback:function(){this.animating=false;Ext.callback(D)},scope:this,duration:this.node.ownerTree.duration||0.25})},getContainer:function(){return this.ctNode},getEl:function(){return this.wrap},appendDDGhost:function(B){B.appendChild(this.elNode.cloneNode(true))},getDDRepairXY:function(){return Ext.lib.Dom.getXY(this.iconNode)},onRender:function(){this.render()},render:function(H){var F=this.node,E=F.attributes;var G=F.parentNode?F.parentNode.ui.getContainer():F.ownerTree.innerCt.dom;if(!this.rendered){this.rendered=true;this.renderElements(F,E,G,H);if(E.qtip){if(this.textNode.setAttributeNS){this.textNode.setAttributeNS("ext","qtip",E.qtip);if(E.qtipTitle){this.textNode.setAttributeNS("ext","qtitle",E.qtipTitle)}}else{this.textNode.setAttribute("ext:qtip",E.qtip);if(E.qtipTitle){this.textNode.setAttribute("ext:qtitle",E.qtipTitle)}}}else{if(E.qtipCfg){E.qtipCfg.target=Ext.id(this.textNode);Ext.QuickTips.register(E.qtipCfg)}}this.initEvents();if(!this.node.expanded){this.updateExpandIcon(true)}}else{if(H===true){G.appendChild(this.wrap)}}},renderElements:function(K,P,Q,O){this.indentMarkup=K.parentNode?K.parentNode.ui.getChildIndent():"";var T=typeof P.checked=="boolean";var M=P.href?P.href:Ext.isGecko?"":"#";var L=['<li class="x-tree-node"><div ext:tree-node-id="',K.id,'" class="x-tree-node-el x-tree-node-leaf x-unselectable ',P.cls,'" unselectable="on">','<span class="x-tree-node-indent">',this.indentMarkup,"</span>",'<img src="',this.emptyIcon,'" class="x-tree-ec-icon x-tree-elbow" />','<img src="',P.icon||this.emptyIcon,'" class="x-tree-node-icon',(P.icon?" x-tree-node-inline-icon":""),(P.iconCls?" "+P.iconCls:""),'" unselectable="on" />',T?('<input class="x-tree-node-cb" type="checkbox" '+(P.checked?'checked="checked" />':"/>")):"",'<a hidefocus="on" class="x-tree-node-anchor" href="',M,'" tabIndex="1" ',P.hrefTarget?' target="'+P.hrefTarget+'"':"",'><span unselectable="on">',K.text,"</span></a></div>",'<ul class="x-tree-node-ct" style="display:none;"></ul>',"</li>"].join("");var N;if(O!==true&&K.nextSibling&&(N=K.nextSibling.ui.getEl())){this.wrap=Ext.DomHelper.insertHtml("beforeBegin",N,L)}else{this.wrap=Ext.DomHelper.insertHtml("beforeEnd",Q,L)}this.elNode=this.wrap.childNodes[0];this.ctNode=this.wrap.childNodes[1];var R=this.elNode.childNodes;this.indentNode=R[0];this.ecNode=R[1];this.iconNode=R[2];var S=3;if(T){this.checkbox=R[3];S++}this.anchor=R[S];this.textNode=R[S].firstChild},getAnchor:function(){return this.anchor},getTextEl:function(){return this.textNode},getIconEl:function(){return this.iconNode},isChecked:function(){return this.checkbox?this.checkbox.checked:false},updateExpandIcon:function(){if(this.rendered){var H=this.node,J,K;var G=H.isLast()?"x-tree-elbow-end":"x-tree-elbow";var I=H.hasChildNodes();if(I||H.attributes.expandable){if(H.expanded){G+="-minus";J="x-tree-node-collapsed";K="x-tree-node-expanded"}else{G+="-plus";J="x-tree-node-expanded";K="x-tree-node-collapsed"}if(this.wasLeaf){this.removeClass("x-tree-node-leaf");this.wasLeaf=false}if(this.c1!=J||this.c2!=K){Ext.fly(this.elNode).replaceClass(J,K);this.c1=J;this.c2=K}}else{if(!this.wasLeaf){Ext.fly(this.elNode).replaceClass("x-tree-node-expanded","x-tree-node-leaf");delete this.c1;delete this.c2;this.wasLeaf=true}}var L="x-tree-ec-icon "+G;if(this.ecc!=L){this.ecNode.className=L;this.ecc=L}}},getChildIndent:function(){if(!this.childIndent){var C=[];var D=this.node;while(D){if(!D.isRoot||(D.isRoot&&D.ownerTree.rootVisible)){if(!D.isLast()){C.unshift('<img src="'+this.emptyIcon+'" class="x-tree-elbow-line" />')}else{C.unshift('<img src="'+this.emptyIcon+'" class="x-tree-icon" />')}}D=D.parentNode}this.childIndent=C.join("")}return this.childIndent},renderIndent:function(){if(this.rendered){var C="";var D=this.node.parentNode;if(D){C=D.ui.getChildIndent()}if(this.indentMarkup!=C){this.indentNode.innerHTML=C;this.indentMarkup=C}this.updateExpandIcon()}},destroy:function(){if(this.elNode){Ext.dd.Registry.unregister(this.elNode.id)}delete this.elNode;delete this.ctNode;delete this.indentNode;delete this.ecNode;delete this.iconNode;delete this.checkbox;delete this.anchor;delete this.textNode;Ext.removeNode(this.ctNode)}};Ext.tree.RootTreeNodeUI=Ext.extend(Ext.tree.TreeNodeUI,{render:function(){if(!this.rendered){var B=this.node.ownerTree.innerCt.dom;this.node.expanded=true;B.innerHTML='<div class="x-tree-root-node"></div>';this.wrap=this.ctNode=B.firstChild}},collapse:Ext.emptyFn,expand:Ext.emptyFn});Ext.tree.TreeCheckNodeUI=function(){this.onlyLeafCheckable=false;Ext.tree.TreeCheckNodeUI.superclass.constructor.apply(this,arguments)};Ext.extend(Ext.tree.TreeCheckNodeUI,Ext.tree.TreeNodeUI,{renderElements:function(D,H,G,I){var J=D.getOwnerTree();this.onlyLeafCheckable=J.onlyLeafCheckable||false;this.indentMarkup=D.parentNode?D.parentNode.ui.getChildIndent():"";var B=H.href?H.href:Ext.isGecko?"":"#";var C=['<li class="x-tree-node"><div ext:tree-node-id="',D.id,'" class="x-tree-node-el x-tree-node-leaf x-unselectable ',H.cls,'" unselectable="on">','<span class="x-tree-node-indent">',this.indentMarkup,"</span>",'<img src="',this.emptyIcon,'" class="x-tree-ec-icon x-tree-elbow" />','<img src="',H.icon||this.emptyIcon,'" class="x-tree-node-icon',(H.icon?" x-tree-node-inline-icon":""),(H.iconCls?" "+H.iconCls:""),'" unselectable="on" />','<img class="ext-tree-cb',(H.checkedState==2||H.checkedState==1?(H.checkedState==2?" ext-cb-checked":" ext-cb-partial"):" ext-cb-unchecked"),'" src="',this.emptyIcon,'" />','<a hidefocus="on" class="x-tree-node-anchor" href="',B,'" tabIndex="1" ',(H.hrefTarget?' target="'+H.hrefTarget+'"':""),'><span unselectable="on">',D.text,"</span></a></div>",'<ul class="x-tree-node-ct" style="display:none;"></ul>',"</li>"].join("");var A;if(I!==true&&D.nextSibling&&(A=D.nextSibling.ui.getEl())){this.wrap=Ext.DomHelper.insertHtml("beforeBegin",A,C)}else{this.wrap=Ext.DomHelper.insertHtml("beforeEnd",G,C)}this.elNode=this.wrap.childNodes[0];this.ctNode=this.wrap.childNodes[1];var F=this.elNode.childNodes;this.indentNode=F[0];this.ecNode=F[1];this.iconNode=F[2];var E=3;this.checkbox=F[3];Ext.fly(this.checkbox).on("click",this.check.createDelegate(this,[null]));E++;this.anchor=F[E];this.textNode=F[E].firstChild},check:function(B){var E=this.node;if(typeof B==="undefined"){var C=((E.attributes.checkedState<2)?2:0)}else{var C=B}this.changeCheckState(E,C);var A=E.parentNode;if(B===null&&A!==null){this.parentCheck(A,E.attributes.checkedState)}if(C==1){return }if(!E.expanded&&!E.childrenRendered){var D=function(G,H){for(var F in G){if(G[F].children){D(G[F].children,H)}G[F].checkedState=H}};D(E.attributes.children,C)}else{this.childCheck(E)}E.fireEvent("checkchange")},childCheck:function(D){var A=D.attributes;if(!A.leaf){var C=D.childNodes;for(var B=0;B<C.length;B++){C[B].getUI().check(A.checkedState)}}},parentCheck:function(C,B){var D=Ext.fly(C.getUI().checkbox);this.changeCheckState(C,this.childHasChecked(C));C.getOwnerTree().fireEvent("check",C,B);var A=C.parentNode;if(A!==null){this.parentCheck(A,B)}},childHasChecked:function(C){var D=C.childNodes;var B=0;if(D||D.length>0){for(var A=0;A<D.length;A++){if(D[A].attributes.checkedState==2){B++}else{if(D[A].attributes.checkedState==1){return 1}}}}if(B==D.length){return 2}else{if(B>0){return 1}}return 0},changeCheckState:function(C,D){var B=C.attributes.checkedState;var A=Ext.fly(C.getUI().checkbox);if(B==D){return }if(A){if(B==2){A.removeClass("ext-cb-checked")}else{if(B==1){A.removeClass("ext-cb-partial")}else{A.removeClass("ext-cb-unchecked")}}if(D==2){A.addClass("ext-cb-checked")}else{if(D==1){A.addClass("ext-cb-partial")}else{A.addClass("ext-cb-unchecked")}}}C.attributes.checkedState=D;C.fireEvent("checkchange",C,D)}});Ext.tree.TreeLoader=function(B){this.baseParams={};this.requestMethod="POST";Ext.apply(this,B);this.addEvents("beforeload","load","loadexception");Ext.tree.TreeLoader.superclass.constructor.call(this)};Ext.extend(Ext.tree.TreeLoader,Ext.util.Observable,{uiProviders:{},clearOnLoad:true,load:function(C,D){if(this.clearOnLoad){while(C.firstChild){C.removeChild(C.firstChild)}}if(this.doPreload(C)){if(typeof D=="function"){D()}}else{if(this.dataUrl||this.url){this.requestData(C,D)}}},doPreload:function(H){if(H.attributes.children){if(H.childNodes.length<1){var I=H.attributes.children;H.beginUpdate();for(var J=0,F=I.length;J<F;J++){var G=H.appendChild(this.createNode(I[J]));if(this.preloadChildren){this.doPreload(G)}}H.endUpdate()}return true}else{return false}},getParams:function(F){var E=[],G=this.baseParams;for(var H in G){if(typeof G[H]!="function"){E.push(encodeURIComponent(H),"=",encodeURIComponent(G[H]),"&")}}E.push("node=",encodeURIComponent(F.id));return E.join("")},requestData:function(C,D){if(this.fireEvent("beforeload",this,C,D)!==false){this.transId=Ext.Ajax.request({method:this.requestMethod,url:this.dataUrl||this.url,success:this.handleResponse,failure:this.handleFailure,scope:this,argument:{callback:D,node:C},params:this.getParams(C)})}else{if(typeof D=="function"){D()}}},isLoading:function(){return this.transId?true:false},abort:function(){if(this.isLoading()){Ext.Ajax.abort(this.transId)}},createNode:function(attr){if(this.baseAttrs){Ext.applyIf(attr,this.baseAttrs)}if(this.applyLoader!==false){attr.loader=this}if(typeof attr.uiProvider=="string"){attr.uiProvider=this.uiProviders[attr.uiProvider]||eval(attr.uiProvider)}return(attr.leaf?new Ext.tree.TreeNode(attr):new Ext.tree.AsyncTreeNode(attr))},processResponse:function(response,node,callback){var json=response.responseText;try{var o=eval("("+json+")");node.beginUpdate();for(var i=0,len=o.length;i<len;i++){var n=this.createNode(o[i]);if(n){node.appendChild(n)}}node.endUpdate();if(typeof callback=="function"){callback(this,node)}}catch(e){this.handleFailure(response)}},handleResponse:function(D){this.transId=false;var C=D.argument;this.processResponse(D,C.node,C.callback);this.fireEvent("load",this,C.node,D)},handleFailure:function(D){this.transId=false;var C=D.argument;this.fireEvent("loadexception",this,C.node,D);if(typeof C.callback=="function"){C.callback(this,C.node)}}});(function(){var C=Ext.EventManager;var D=Ext.lib.Dom;Ext.dd.DragDrop=function(A,F,B){if(A){this.init(A,F,B)}};Ext.dd.DragDrop.prototype={id:null,config:null,dragElId:null,handleElId:null,invalidHandleTypes:null,invalidHandleIds:null,invalidHandleClasses:null,startPageX:0,startPageY:0,groups:null,locked:false,lock:function(){this.locked=true},unlock:function(){this.locked=false},isTarget:true,padding:null,_domRef:null,__ygDragDrop:true,constrainX:false,constrainY:false,minX:0,maxX:0,minY:0,maxY:0,maintainOffset:false,xTicks:null,yTicks:null,primaryButtonOnly:true,available:false,hasOuterHandles:false,b4StartDrag:function(B,A){},startDrag:function(B,A){},b4Drag:function(A){},onDrag:function(A){},onDragEnter:function(B,A){},b4DragOver:function(A){},onDragOver:function(B,A){},b4DragOut:function(A){},onDragOut:function(B,A){},b4DragDrop:function(A){},onDragDrop:function(B,A){},onInvalidDrop:function(A){},b4EndDrag:function(A){},endDrag:function(A){},b4MouseDown:function(A){},onMouseDown:function(A){},onMouseUp:function(A){},onAvailable:function(){},defaultPadding:{left:0,right:0,top:0,bottom:0},constrainTo:function(S,U,N){if(typeof U=="number"){U={left:U,right:U,top:U,bottom:U}}U=U||this.defaultPadding;var Q=Ext.get(this.getEl()).getBox();var B=Ext.get(S);var O=B.getScroll();var R,A=B.dom;if(A==document.body){R={x:O.left,y:O.top,width:Ext.lib.Dom.getViewWidth(),height:Ext.lib.Dom.getViewHeight()}}else{var P=B.getXY();R={x:P[0]+O.left,y:P[1]+O.top,width:A.clientWidth,height:A.clientHeight}}var T=Q.y-R.y;var V=Q.x-R.x;this.resetConstraints();this.setXConstraint(V-(U.left||0),R.width-V-Q.width-(U.right||0),this.xTickSize);this.setYConstraint(T-(U.top||0),R.height-T-Q.height-(U.bottom||0),this.yTickSize)},getEl:function(){if(!this._domRef){this._domRef=Ext.getDom(this.id)}return this._domRef},getDragEl:function(){return Ext.getDom(this.dragElId)},init:function(A,F,B){this.initTarget(A,F,B);C.on(this.id,"mousedown",this.handleMouseDown,this)},initTarget:function(A,F,B){this.config=B||{};this.DDM=Ext.dd.DDM;this.groups={};if(typeof A!=="string"){A=Ext.id(A)}this.id=A;this.addToGroup((F)?F:"default");this.handleElId=A;this.setDragElId(A);this.invalidHandleTypes={A:"A"};this.invalidHandleIds={};this.invalidHandleClasses=[];this.applyConfig();this.handleOnAvailable()},applyConfig:function(){this.padding=this.config.padding||[0,0,0,0];this.isTarget=(this.config.isTarget!==false);this.maintainOffset=(this.config.maintainOffset);this.primaryButtonOnly=(this.config.primaryButtonOnly!==false)},handleOnAvailable:function(){this.available=true;this.resetConstraints();this.onAvailable()},setPadding:function(B,H,A,G){if(!H&&0!==H){this.padding=[B,B,B,B]}else{if(!A&&0!==A){this.padding=[B,H,B,H]}else{this.padding=[B,H,A,G]}}},setInitPosition:function(I,J){var B=this.getEl();if(!this.DDM.verifyEl(B)){return }var K=I||0;var L=J||0;var A=D.getXY(B);this.initPageX=A[0]-K;this.initPageY=A[1]-L;this.lastPageX=A[0];this.lastPageY=A[1];this.setStartPosition(A)},setStartPosition:function(A){var B=A||D.getXY(this.getEl());this.deltaSetXY=null;this.startPageX=B[0];this.startPageY=B[1]},addToGroup:function(A){this.groups[A]=true;this.DDM.regDragDrop(this,A)},removeFromGroup:function(A){if(this.groups[A]){delete this.groups[A]}this.DDM.removeDDFromGroup(this,A)},setDragElId:function(A){this.dragElId=A},setHandleElId:function(A){if(typeof A!=="string"){A=Ext.id(A)}this.handleElId=A;this.DDM.regHandle(this.id,A)},setOuterHandleElId:function(A){if(typeof A!=="string"){A=Ext.id(A)}C.on(A,"mousedown",this.handleMouseDown,this);this.setHandleElId(A);this.hasOuterHandles=true},unreg:function(){C.un(this.id,"mousedown",this.handleMouseDown);this._domRef=null;this.DDM._remove(this)},destroy:function(){this.unreg()},isLocked:function(){return(this.DDM.isLocked()||this.locked)},handleMouseDown:function(A,B){if(this.primaryButtonOnly&&A.button!=0){return }if(this.isLocked()){return }this.DDM.refreshCache(this.groups);var F=new Ext.lib.Point(Ext.lib.Event.getPageX(A),Ext.lib.Event.getPageY(A));if(!this.hasOuterHandles&&!this.DDM.isOverTarget(F,this)){}else{if(this.clickValidator(A)){this.setStartPosition();this.b4MouseDown(A);this.onMouseDown(A);this.DDM.handleMouseDown(A,this);this.DDM.stopEvent(A)}else{}}},clickValidator:function(A){var B=A.getTarget();return(this.isValidHandleChild(B)&&(this.id==this.handleElId||this.DDM.handleWasClicked(B,this.id)))},addInvalidHandleType:function(B){var A=B.toUpperCase();this.invalidHandleTypes[A]=A},addInvalidHandleId:function(A){if(typeof A!=="string"){A=Ext.id(A)}this.invalidHandleIds[A]=A},addInvalidHandleClass:function(A){this.invalidHandleClasses.push(A)},removeInvalidHandleType:function(B){var A=B.toUpperCase();delete this.invalidHandleTypes[A]},removeInvalidHandleId:function(A){if(typeof A!=="string"){A=Ext.id(A)}delete this.invalidHandleIds[A]},removeInvalidHandleClass:function(B){for(var A=0,F=this.invalidHandleClasses.length;A<F;++A){if(this.invalidHandleClasses[A]==B){delete this.invalidHandleClasses[A]}}},isValidHandleChild:function(I){var J=true;var A;try{A=I.nodeName.toUpperCase()}catch(B){A=I.nodeName}J=J&&!this.invalidHandleTypes[A];J=J&&!this.invalidHandleIds[I.id];for(var K=0,L=this.invalidHandleClasses.length;J&&K<L;++K){J=!D.hasClass(I,this.invalidHandleClasses[K])}return J},setXTicks:function(A,H){this.xTicks=[];this.xTickSize=H;var B={};for(var G=this.initPageX;G>=this.minX;G=G-H){if(!B[G]){this.xTicks[this.xTicks.length]=G;B[G]=true}}for(G=this.initPageX;G<=this.maxX;G=G+H){if(!B[G]){this.xTicks[this.xTicks.length]=G;B[G]=true}}this.xTicks.sort(this.DDM.numericSort)},setYTicks:function(A,H){this.yTicks=[];this.yTickSize=H;var B={};for(var G=this.initPageY;G>=this.minY;G=G-H){if(!B[G]){this.yTicks[this.yTicks.length]=G;B[G]=true}}for(G=this.initPageY;G<=this.maxY;G=G+H){if(!B[G]){this.yTicks[this.yTicks.length]=G;B[G]=true}}this.yTicks.sort(this.DDM.numericSort)},setXConstraint:function(A,B,F){this.leftConstraint=A;this.rightConstraint=B;this.minX=this.initPageX-A;this.maxX=this.initPageX+B;if(F){this.setXTicks(this.initPageX,F)}this.constrainX=true},clearConstraints:function(){this.constrainX=false;this.constrainY=false;this.clearTicks()},clearTicks:function(){this.xTicks=null;this.yTicks=null;this.xTickSize=0;this.yTickSize=0},setYConstraint:function(F,A,B){this.topConstraint=F;this.bottomConstraint=A;this.minY=this.initPageY-F;this.maxY=this.initPageY+A;if(B){this.setYTicks(this.initPageY,B)}this.constrainY=true},resetConstraints:function(){if(this.initPageX||this.initPageX===0){var A=(this.maintainOffset)?this.lastPageX-this.initPageX:0;var B=(this.maintainOffset)?this.lastPageY-this.initPageY:0;this.setInitPosition(A,B)}else{this.setInitPosition()}if(this.constrainX){this.setXConstraint(this.leftConstraint,this.rightConstraint,this.xTickSize)}if(this.constrainY){this.setYConstraint(this.topConstraint,this.bottomConstraint,this.yTickSize)}},getTick:function(A,K){if(!K){return A}else{if(K[0]>=A){return K[0]}else{for(var M=0,N=K.length;M<N;++M){var L=M+1;if(K[L]&&K[L]>=A){var B=A-K[M];var J=K[L]-A;return(J>B)?K[M]:K[L]}}return K[K.length-1]}}},toString:function(){return("DragDrop "+this.id)}}})();if(!Ext.dd.DragDropMgr){Ext.dd.DragDropMgr=function(){var B=Ext.EventManager;return{ids:{},handleIds:{},dragCurrent:null,dragOvers:{},deltaX:0,deltaY:0,preventDefault:true,stopPropagation:true,initalized:false,locked:false,init:function(){this.initialized=true},POINT:0,INTERSECT:1,mode:0,_execOnAll:function(H,I){for(var G in this.ids){for(var J in this.ids[G]){var A=this.ids[G][J];if(!this.isTypeOfDD(A)){continue}A[H].apply(A,I)}}},_onLoad:function(){this.init();B.on(document,"mouseup",this.handleMouseUp,this,true);B.on(document,"mousemove",this.handleMouseMove,this,true);B.on(window,"unload",this._onUnload,this,true);B.on(window,"resize",this._onResize,this,true)},_onResize:function(A){this._execOnAll("resetConstraints",[])},lock:function(){this.locked=true},unlock:function(){this.locked=false},isLocked:function(){return this.locked},locationCache:{},useCache:true,clickPixelThresh:3,clickTimeThresh:350,dragThreshMet:false,clickTimeout:null,startX:0,startY:0,regDragDrop:function(A,D){if(!this.initialized){this.init()}if(!this.ids[D]){this.ids[D]={}}this.ids[D][A.id]=A},removeDDFromGroup:function(A,F){if(!this.ids[F]){this.ids[F]={}}var E=this.ids[F];if(E&&E[A.id]){delete E[A.id]}},_remove:function(A){for(var D in A.groups){if(D&&this.ids[D][A.id]){delete this.ids[D][A.id]}}delete this.handleIds[A.id]},regHandle:function(A,D){if(!this.handleIds[A]){this.handleIds[A]={}}this.handleIds[A][D]=D},isDragDrop:function(A){return(this.getDDById(A))?true:false},getRelated:function(A,I){var G=[];for(var H in A.groups){for(j in this.ids[H]){var J=this.ids[H][j];if(!this.isTypeOfDD(J)){continue}if(!I||J.isTarget){G[G.length]=J}}}return G},isLegalTarget:function(A,G){var I=this.getRelated(A,true);for(var H=0,J=I.length;H<J;++H){if(I[H].id==G.id){return true}}return false},isTypeOfDD:function(A){return(A&&A.__ygDragDrop)},isHandle:function(A,D){return(this.handleIds[A]&&this.handleIds[A][D])},getDDById:function(A){for(var D in this.ids){if(this.ids[D][A]){return this.ids[D][A]}}return null},handleMouseDown:function(A,E){if(Ext.QuickTips){Ext.QuickTips.disable()}this.currentTarget=A.getTarget();this.dragCurrent=E;var F=E.getEl();this.startX=A.getPageX();this.startY=A.getPageY();this.deltaX=this.startX-F.offsetLeft;this.deltaY=this.startY-F.offsetTop;this.dragThreshMet=false;this.clickTimeout=setTimeout(function(){var C=Ext.dd.DDM;C.startDrag(C.startX,C.startY)},this.clickTimeThresh)},startDrag:function(D,A){clearTimeout(this.clickTimeout);if(this.dragCurrent){this.dragCurrent.b4StartDrag(D,A);this.dragCurrent.startDrag(D,A)}this.dragThreshMet=true},handleMouseUp:function(A){if(Ext.QuickTips){Ext.QuickTips.enable()}if(!this.dragCurrent){return }clearTimeout(this.clickTimeout);if(this.dragThreshMet){this.fireEvents(A,true)}else{}this.stopDrag(A);this.stopEvent(A)},stopEvent:function(A){if(this.stopPropagation){A.stopPropagation()}if(this.preventDefault){A.preventDefault()}},stopDrag:function(A){if(this.dragCurrent){if(this.dragThreshMet){this.dragCurrent.b4EndDrag(A);this.dragCurrent.endDrag(A)}this.dragCurrent.onMouseUp(A)}this.dragCurrent=null;this.dragOvers={}},handleMouseMove:function(A){if(!this.dragCurrent){return true}if(Ext.isIE&&(A.button!==0&&A.button!==1&&A.button!==2)){this.stopEvent(A);return this.handleMouseUp(A)}if(!this.dragThreshMet){var E=Math.abs(this.startX-A.getPageX());var F=Math.abs(this.startY-A.getPageY());if(E>this.clickPixelThresh||F>this.clickPixelThresh){this.startDrag(this.startX,this.startY)}}if(this.dragThreshMet){this.dragCurrent.b4Drag(A);this.dragCurrent.onDrag(A);if(!this.dragCurrent.moveOnly){this.fireEvents(A,false)}}this.stopEvent(A);return true},fireEvents:function(V,U){var S=this.dragCurrent;if(!S||S.isLocked()){return }var R=V.getPoint();var Q=[];var b=[];var X=[];var Z=[];var A=[];for(var a in this.dragOvers){var P=this.dragOvers[a];if(!this.isTypeOfDD(P)){continue}if(!this.isOverTarget(R,P,this.mode)){b.push(P)}Q[a]=true;delete this.dragOvers[a]}for(var T in S.groups){if("string"!=typeof T){continue}for(a in this.ids[T]){var Y=this.ids[T][a];if(!this.isTypeOfDD(Y)){continue}if(Y.isTarget&&!Y.isLocked()&&Y!=S){if(this.isOverTarget(R,Y,this.mode)){if(U){Z.push(Y)}else{if(!Q[Y.id]){A.push(Y)}else{X.push(Y)}this.dragOvers[Y.id]=Y}}}}}if(this.mode){if(b.length){S.b4DragOut(V,b);S.onDragOut(V,b)}if(A.length){S.onDragEnter(V,A)}if(X.length){S.b4DragOver(V,X);S.onDragOver(V,X)}if(Z.length){S.b4DragDrop(V,Z);S.onDragDrop(V,Z)}}else{var W=0;for(a=0,W=b.length;a<W;++a){S.b4DragOut(V,b[a].id);S.onDragOut(V,b[a].id)}for(a=0,W=A.length;a<W;++a){S.onDragEnter(V,A[a].id)}for(a=0,W=X.length;a<W;++a){S.b4DragOver(V,X[a].id);S.onDragOver(V,X[a].id)}for(a=0,W=Z.length;a<W;++a){S.b4DragDrop(V,Z[a].id);S.onDragDrop(V,Z[a].id)}}if(U&&!Z.length){S.onInvalidDrop(V)}},getBestMatch:function(H){var A=null;var I=H.length;if(I==1){A=H[0]}else{for(var G=0;G<I;++G){var J=H[G];if(J.cursorIsOver){A=J;break}else{if(!A||A.overlap.getArea()<J.overlap.getArea()){A=J}}}}return A},refreshCache:function(I){for(var J in I){if("string"!=typeof J){continue}for(var H in this.ids[J]){var G=this.ids[J][H];if(this.isTypeOfDD(G)){var A=this.getLocation(G);if(A){this.locationCache[G.id]=A}else{delete this.locationCache[G.id]}}}}},verifyEl:function(E){if(E){var F;if(Ext.isIE){try{F=E.offsetParent}catch(A){}}else{F=E.offsetParent}if(F){return true}}return false},getLocation:function(V){if(!this.isTypeOfDD(V)){return null}var X=V.getEl(),S,A,N,Q,R,P,O,T,W;try{S=Ext.lib.Dom.getXY(X)}catch(U){}if(!S){return null}A=S[0];N=A+X.offsetWidth;Q=S[1];R=Q+X.offsetHeight;P=Q-V.padding[0];O=N+V.padding[1];T=R+V.padding[2];W=A-V.padding[3];return new Ext.lib.Region(P,O,T,W)},isOverTarget:function(M,L,A){var Q=this.locationCache[L.id];if(!Q||!this.useCache){Q=this.getLocation(L);this.locationCache[L.id]=Q}if(!Q){return false}L.cursorIsOver=Q.contains(M);var N=this.dragCurrent;if(!N||!N.getTargetCoord||(!A&&!N.constrainX&&!N.constrainY)){return L.cursorIsOver}L.overlap=null;var P=N.getTargetCoord(M.x,M.y);var K=N.getDragEl();var R=new Ext.lib.Region(P.y,P.x+K.offsetWidth,P.y+K.offsetHeight,P.x);var O=R.intersect(Q);if(O){L.overlap=O;return(A)?true:L.cursorIsOver}else{return false}},_onUnload:function(A,D){Ext.dd.DragDropMgr.unregAll()},unregAll:function(){if(this.dragCurrent){this.stopDrag();this.dragCurrent=null}this._execOnAll("unreg",[]);for(var A in this.elementCache){delete this.elementCache[A]}this.elementCache={};this.ids={}},elementCache:{},getElWrapper:function(A){var D=this.elementCache[A];if(!D||!D.el){D=this.elementCache[A]=new this.ElementWrapper(Ext.getDom(A))}return D},getElement:function(A){return Ext.getDom(A)},getCss:function(A){var D=Ext.getDom(A);return(D)?D.style:null},ElementWrapper:function(A){this.el=A||null;this.id=this.el&&A.id;this.css=this.el&&A.style},getPosX:function(A){return Ext.lib.Dom.getX(A)},getPosY:function(A){return Ext.lib.Dom.getY(A)},swapNode:function(F,H){if(F.swapNode){F.swapNode(H)}else{var A=H.parentNode;var G=H.nextSibling;if(G==F){A.insertBefore(F,H)}else{if(H==F.nextSibling){A.insertBefore(H,F)}else{F.parentNode.replaceChild(H,F);A.insertBefore(F,G)}}}},getScroll:function(){var F,H,A=document.documentElement,G=document.body;if(A&&(A.scrollTop||A.scrollLeft)){F=A.scrollTop;H=A.scrollLeft}else{if(G){F=G.scrollTop;H=G.scrollLeft}else{}}return{top:F,left:H}},getStyle:function(A,D){return Ext.fly(A).getStyle(D)},getScrollTop:function(){return this.getScroll().top},getScrollLeft:function(){return this.getScroll().left},moveToEl:function(F,A){var E=Ext.lib.Dom.getXY(A);Ext.lib.Dom.setXY(F,E)},numericSort:function(A,D){return(A-D)},_timeoutCount:0,_addListeners:function(){var A=Ext.dd.DDM;if(Ext.lib.Event&&document){A._onLoad()}else{if(A._timeoutCount>2000){}else{setTimeout(A._addListeners,10);if(document&&document.body){A._timeoutCount+=1}}}},handleWasClicked:function(F,A){if(this.isHandle(A,F.id)){return true}else{var E=F.parentNode;while(E){if(this.isHandle(A,E.id)){return true}else{E=E.parentNode}}}return false}}}();Ext.dd.DDM=Ext.dd.DragDropMgr;Ext.dd.DDM._addListeners()}Ext.dd.DD=function(E,D,F){if(E){this.init(E,D,F)}};Ext.extend(Ext.dd.DD,Ext.dd.DragDrop,{scroll:true,autoOffset:function(G,H){var E=G-this.startPageX;var F=H-this.startPageY;this.setDelta(E,F)},setDelta:function(D,C){this.deltaX=D;this.deltaY=C},setDragElPos:function(E,F){var D=this.getDragEl();this.alignElWithMouse(D,E,F)},alignElWithMouse:function(O,K,L){var M=this.getTargetCoord(K,L);var P=O.dom?O:Ext.fly(O,"_dd");if(!this.deltaSetXY){var J=[M.x,M.y];P.setXY(J);var N=P.getLeft(true);var I=P.getTop(true);this.deltaSetXY=[N-M.x,I-M.y]}else{P.setLeftTop(M.x+this.deltaSetXY[0],M.y+this.deltaSetXY[1])}this.cachePosition(M.x,M.y);this.autoScroll(M.x,M.y,O.offsetHeight,O.offsetWidth);return M},cachePosition:function(F,D){if(F){this.lastPageX=F;this.lastPageY=D}else{var E=Ext.lib.Dom.getXY(this.getEl());this.lastPageX=E[0];this.lastPageY=E[1]}},autoScroll:function(W,X,b,V){if(this.scroll){var U=Ext.lib.Dom.getViewHeight();var Q=Ext.lib.Dom.getViewWidth();var S=this.DDM.getScrollTop();var O=this.DDM.getScrollLeft();var Y=b+X;var T=V+W;var Z=(U+S-X-this.deltaY);var a=(Q+O-W-this.deltaX);var P=40;var R=(document.all)?80:30;if(Y>U&&Z<P){window.scrollTo(O,S+R)}if(X<S&&S>0&&X-S<P){window.scrollTo(O,S-R)}if(T>Q&&a<P){window.scrollTo(O+R,S)}if(W<O&&O>0&&W-O<P){window.scrollTo(O-R,S)}}},getTargetCoord:function(G,H){var E=G-this.deltaX;var F=H-this.deltaY;if(this.constrainX){if(E<this.minX){E=this.minX}if(E>this.maxX){E=this.maxX}}if(this.constrainY){if(F<this.minY){F=this.minY}if(F>this.maxY){F=this.maxY}}E=this.getTick(E,this.xTicks);F=this.getTick(F,this.yTicks);return{x:E,y:F}},applyConfig:function(){Ext.dd.DD.superclass.applyConfig.call(this);this.scroll=(this.config.scroll!==false)},b4MouseDown:function(B){this.autoOffset(B.getPageX(),B.getPageY())},b4Drag:function(B){this.setDragElPos(B.getPageX(),B.getPageY())},toString:function(){return("DD "+this.id)}});Ext.dd.DDProxy=function(E,D,F){if(E){this.init(E,D,F);this.initFrame()}};Ext.dd.DDProxy.dragElId="ygddfdiv";Ext.extend(Ext.dd.DDProxy,Ext.dd.DD,{resizeFrame:true,centerFrame:false,createFrame:function(){var H=this;var E=document.body;if(!E||!E.firstChild){setTimeout(function(){H.createFrame()},50);return }var F=this.getDragEl();if(!F){F=document.createElement("div");F.id=this.dragElId;var G=F.style;G.position="absolute";G.visibility="hidden";G.cursor="move";G.border="2px solid #aaa";G.zIndex=999;E.insertBefore(F,E.firstChild)}},initFrame:function(){this.createFrame()},applyConfig:function(){Ext.dd.DDProxy.superclass.applyConfig.call(this);this.resizeFrame=(this.config.resizeFrame!==false);this.centerFrame=(this.config.centerFrame);this.setDragElId(this.config.dragElId||Ext.dd.DDProxy.dragElId)},showFrame:function(G,H){var I=this.getEl();var F=this.getDragEl();var J=F.style;this._resizeProxy();if(this.centerFrame){this.setDelta(Math.round(parseInt(J.width,10)/2),Math.round(parseInt(J.height,10)/2))}this.setDragElPos(G,H);Ext.fly(F).show()},_resizeProxy:function(){if(this.resizeFrame){var B=this.getEl();Ext.fly(this.getDragEl()).setSize(B.offsetWidth,B.offsetHeight)}},b4MouseDown:function(F){var D=F.getPageX();var E=F.getPageY();this.autoOffset(D,E);this.setDragElPos(D,E)},b4StartDrag:function(C,D){this.showFrame(C,D)},b4EndDrag:function(B){Ext.fly(this.getDragEl()).hide()},endDrag:function(E){var F=this.getEl();var D=this.getDragEl();D.style.visibility="";this.beforeMove();F.style.visibility="hidden";Ext.dd.DDM.moveToEl(F,D);D.style.visibility="hidden";F.style.visibility="";this.afterDrag()},beforeMove:function(){},afterDrag:function(){},toString:function(){return("DDProxy "+this.id)}});Ext.dd.DDTarget=function(E,D,F){if(E){this.initTarget(E,D,F)}};Ext.extend(Ext.dd.DDTarget,Ext.dd.DragDrop,{toString:function(){return("DDTarget "+this.id)}});Ext.Panel=Ext.extend(Ext.Container,{baseCls:"x-panel",collapsedCls:"x-panel-collapsed",maskDisabled:true,animCollapse:Ext.enableFx,headerAsText:true,buttonAlign:"right",collapsed:false,collapseFirst:true,minButtonWidth:75,elements:"body",toolTarget:"header",collapseEl:"bwrap",slideAnchor:"t",deferHeight:true,expandDefaults:{duration:0.25},collapseDefaults:{duration:0.25},initComponent:function(){Ext.Panel.superclass.initComponent.call(this);this.addEvents("bodyresize","titlechange","collapse","expand","beforecollapse","beforeexpand","beforeclose","close","activate","deactivate");if(this.tbar){this.elements+=",tbar";if(typeof this.tbar=="object"){this.topToolbar=this.tbar}delete this.tbar}if(this.bbar){this.elements+=",bbar";if(typeof this.bbar=="object"){this.bottomToolbar=this.bbar}delete this.bbar}if(this.header===true){this.elements+=",header";delete this.header}else{if(this.title&&this.header!==false){this.elements+=",header"}}if(this.footer===true){this.elements+=",footer";delete this.footer}if(this.buttons){var E=this.buttons;this.buttons=[];for(var F=0,D=E.length;F<D;F++){if(E[F].render){this.buttons.push(E[F])}else{this.addButton(E[F])}}}if(this.autoLoad){this.on("render",this.doAutoLoad,this,{delay:10})}},createElement:function(D,E){if(this[D]){E.appendChild(this[D].dom);return }if(D==="bwrap"||this.elements.indexOf(D)!=-1){if(this[D+"Cfg"]){this[D]=Ext.fly(E).createChild(this[D+"Cfg"])}else{var F=document.createElement("div");F.className=this[D+"Cls"];this[D]=Ext.get(E.appendChild(F))}}},onRender:function(c,d){Ext.Panel.superclass.onRender.call(this,c,d);this.createClasses();if(this.el){this.el.addClass(this.baseCls);this.header=this.el.down("."+this.headerCls);this.bwrap=this.el.down("."+this.bwrapCls);var X=this.bwrap?this.bwrap:this.el;this.tbar=X.down("."+this.tbarCls);this.body=X.down("."+this.bodyCls);this.bbar=X.down("."+this.bbarCls);this.footer=X.down("."+this.footerCls);this.fromMarkup=true}else{this.el=c.createChild({id:this.id,cls:this.baseCls},d)}var T=this.el,Z=T.dom;if(this.cls){this.el.addClass(this.cls)}if(this.buttons){this.elements+=",footer"}if(this.frame){T.insertHtml("afterBegin",String.format(Ext.Element.boxMarkup,this.baseCls));this.createElement("header",Z.firstChild.firstChild.firstChild);this.createElement("bwrap",Z);var V=this.bwrap.dom;var g=Z.childNodes[1],S=Z.childNodes[2];V.appendChild(g);V.appendChild(S);var U=V.firstChild.firstChild.firstChild;this.createElement("tbar",U);this.createElement("body",U);this.createElement("bbar",U);this.createElement("footer",V.lastChild.firstChild.firstChild);if(!this.footer){this.bwrap.dom.lastChild.className+=" x-panel-nofooter"}}else{this.createElement("header",Z);this.createElement("bwrap",Z);var V=this.bwrap.dom;this.createElement("tbar",V);this.createElement("body",V);this.createElement("bbar",V);this.createElement("footer",V);if(!this.header){this.body.addClass(this.bodyCls+"-noheader");if(this.tbar){this.tbar.addClass(this.tbarCls+"-noheader")}}}if(this.border===false){this.el.addClass(this.baseCls+"-noborder");this.body.addClass(this.bodyCls+"-noborder");if(this.header){this.header.addClass(this.headerCls+"-noborder")}if(this.footer){this.footer.addClass(this.footerCls+"-noborder")}if(this.tbar){this.tbar.addClass(this.tbarCls+"-noborder")}if(this.bbar){this.bbar.addClass(this.bbarCls+"-noborder")}}if(this.bodyBorder===false){this.body.addClass(this.bodyCls+"-noborder")}if(this.bodyStyle){this.body.applyStyles(this.bodyStyle)}this.bwrap.enableDisplayMode("block");if(this.header){this.header.unselectable();if(this.headerAsText){this.header.dom.innerHTML='<span class="'+this.headerTextCls+'">'+this.header.dom.innerHTML+"</span>";if(this.iconCls){this.setIconClass(this.iconCls)}}}if(this.floating){this.makeFloating(this.floating)}if(this.collapsible){this.tools=this.tools?this.tools.slice(0):[];if(!this.hideCollapseTool){this.tools[this.collapseFirst?"unshift":"push"]({id:"toggle",handler:this.toggleCollapse,scope:this})}if(this.titleCollapse&&this.header){this.header.on("click",this.toggleCollapse,this);this.header.setStyle("cursor","pointer")}}if(this.tools){var a=this.tools;this.tools={};this.addTool.apply(this,a)}else{this.tools={}}if(this.buttons&&this.buttons.length>0){var Q=this.footer.createChild({cls:"x-panel-btns-ct",cn:{cls:"x-panel-btns x-panel-btns-"+this.buttonAlign,html:'<table cellspacing="0"><tbody><tr></tr></tbody></table><div class="x-clear"></div>'}},null,true);var Y=Q.getElementsByTagName("tr")[0];for(var e=0,b=this.buttons.length;e<b;e++){var W=this.buttons[e];var R=document.createElement("td");R.className="x-panel-btn-td";W.render(Y.appendChild(R))}}if(this.tbar&&this.topToolbar){if(Ext.isArray(this.topToolbar)){this.topToolbar=new Ext.Toolbar(this.topToolbar)}this.topToolbar.render(this.tbar)}if(this.bbar&&this.bottomToolbar){if(Ext.isArray(this.bottomToolbar)){this.bottomToolbar=new Ext.Toolbar(this.bottomToolbar)}this.bottomToolbar.render(this.bbar)}},setIconClass:function(H){var E=this.iconCls;this.iconCls=H;if(this.rendered&&this.header){if(this.frame){this.header.addClass("x-panel-icon");this.header.replaceClass(E,this.iconCls)}else{var F=this.header.dom;var G=F.firstChild&&String(F.firstChild.tagName).toLowerCase()=="img"?F.firstChild:null;if(G){Ext.fly(G).replaceClass(E,this.iconCls)}else{Ext.DomHelper.insertBefore(F.firstChild,{tag:"img",src:Ext.BLANK_IMAGE_URL,cls:"x-panel-inline-icon "+this.iconCls})}}}},makeFloating:function(B){this.floating=true;this.el=new Ext.Layer(typeof B=="object"?B:{shadow:this.shadow!==undefined?this.shadow:"sides",shadowOffset:this.shadowOffset,constrain:false,shim:this.shim===false?false:undefined},this.el)},getTopToolbar:function(){return this.topToolbar},getBottomToolbar:function(){return this.bottomToolbar},addButton:function(F,H,I){var G={handler:H,scope:I,minWidth:this.minButtonWidth,hideParent:true};if(typeof F=="string"){G.text=F}else{Ext.apply(G,F)}var J=new Ext.Button(G);J.ownerCt=this;if(!this.buttons){this.buttons=[]}this.buttons.push(J);return J},addTool:function(){if(!this[this.toolTarget]){return }if(!this.toolTemplate){var J=new Ext.Template('<div class="x-tool x-tool-{id}">&#160;</div>');J.disableFormats=true;J.compile();Ext.Panel.prototype.toolTemplate=J}for(var K=0,M=arguments,N=M.length;K<N;K++){var H=M[K],I="x-tool-"+H.id+"-over";var L=this.toolTemplate.insertFirst(this[this.toolTarget],H,true);this.tools[H.id]=L;L.enableDisplayMode("block");L.on("click",this.createToolHandler(L,H,I,this));if(H.on){L.on(H.on)}if(H.hidden){L.hide()}if(H.qtip){if(typeof H.qtip=="object"){Ext.QuickTips.register(Ext.apply({target:L.id},H.qtip))}else{L.dom.qtip=H.qtip}}L.addClassOnOver(I)}},onShow:function(){if(this.floating){return this.el.show()}Ext.Panel.superclass.onShow.call(this)},onHide:function(){if(this.floating){return this.el.hide()}Ext.Panel.superclass.onHide.call(this)},createToolHandler:function(G,E,F,H){return function(A){G.removeClass(F);A.stopEvent();if(E.handler){E.handler.call(E.scope||G,A,G,H)}}},afterRender:function(){if(this.fromMarkup&&this.height===undefined&&!this.autoHeight){this.height=this.el.getHeight()}if(this.floating&&!this.hidden&&!this.initHidden){this.el.show()}if(this.title){this.setTitle(this.title)}this.setAutoScroll();if(this.html){this.body.update(typeof this.html=="object"?Ext.DomHelper.markup(this.html):this.html);delete this.html}if(this.contentEl){var B=Ext.getDom(this.contentEl);Ext.fly(B).removeClass(["x-hidden","x-hide-display"]);this.body.dom.appendChild(B)}if(this.collapsed){this.collapsed=false;this.collapse(false)}Ext.Panel.superclass.afterRender.call(this);this.initEvents()},setAutoScroll:function(){if(this.rendered&&this.autoScroll){this.body.setOverflow("auto")}},getKeyMap:function(){if(!this.keyMap){this.keyMap=new Ext.KeyMap(this.el,this.keys)}return this.keyMap},initEvents:function(){if(this.keys){this.getKeyMap()}if(this.draggable){this.initDraggable()}},initDraggable:function(){this.dd=new Ext.Panel.DD(this,typeof this.draggable=="boolean"?null:this.draggable)},beforeEffect:function(){if(this.floating){this.el.beforeAction()}this.el.addClass("x-panel-animated")},afterEffect:function(){this.syncShadow();this.el.removeClass("x-panel-animated")},createEffect:function(H,E,G){var F={scope:G,block:true};if(H===true){F.callback=E;return F}else{if(!H.callback){F.callback=E}else{F.callback=function(){E.call(G);Ext.callback(H.callback,H.scope)}}}return Ext.applyIf(F,H)},collapse:function(D){if(this.collapsed||this.el.hasFxBlock()||this.fireEvent("beforecollapse",this,D)===false){return }var C=D===true||(D!==false&&this.animCollapse);this.beforeEffect();this.onCollapse(C,D);return this},onCollapse:function(C,D){if(C){this[this.collapseEl].slideOut(this.slideAnchor,Ext.apply(this.createEffect(D||true,this.afterCollapse,this),this.collapseDefaults))}else{this[this.collapseEl].hide();this.afterCollapse()}},afterCollapse:function(){this.collapsed=true;this.el.addClass(this.collapsedCls);this.afterEffect();this.fireEvent("collapse",this)},expand:function(D){if(!this.collapsed||this.el.hasFxBlock()||this.fireEvent("beforeexpand",this,D)===false){return }var C=D===true||(D!==false&&this.animCollapse);this.el.removeClass(this.collapsedCls);this.beforeEffect();this.onExpand(C,D);return this},onExpand:function(C,D){if(C){this[this.collapseEl].slideIn(this.slideAnchor,Ext.apply(this.createEffect(D||true,this.afterExpand,this),this.expandDefaults))}else{this[this.collapseEl].show();this.afterExpand()}},afterExpand:function(){this.collapsed=false;this.afterEffect();this.fireEvent("expand",this)},toggleCollapse:function(B){this[this.collapsed?"expand":"collapse"](B);return this},onDisable:function(){if(this.rendered&&this.maskDisabled){this.el.mask()}Ext.Panel.superclass.onDisable.call(this)},onEnable:function(){if(this.rendered&&this.maskDisabled){this.el.unmask()}Ext.Panel.superclass.onEnable.call(this)},onResize:function(C,D){if(C!==undefined||D!==undefined){if(!this.collapsed){if(typeof C=="number"){this.body.setWidth(this.adjustBodyWidth(C-this.getFrameWidth()))}else{if(C=="auto"){this.body.setWidth(C)}}if(typeof D=="number"){this.body.setHeight(this.adjustBodyHeight(D-this.getFrameHeight()))}else{if(D=="auto"){this.body.setHeight(D)}}}else{this.queuedBodySize={width:C,height:D};if(!this.queuedExpand&&this.allowQueuedExpand!==false){this.queuedExpand=true;this.on("expand",function(){delete this.queuedExpand;this.onResize(this.queuedBodySize.width,this.queuedBodySize.height);this.doLayout()},this,{single:true})}}this.fireEvent("bodyresize",this,C,D)}this.syncShadow()},adjustBodyHeight:function(B){return B},adjustBodyWidth:function(B){return B},onPosition:function(){this.syncShadow()},onDestroy:function(){if(this.tools){for(var D in this.tools){Ext.destroy(this.tools[D])}}if(this.buttons){for(var C in this.buttons){Ext.destroy(this.buttons[C])}}Ext.destroy(this.topToolbar,this.bottomToolbar);Ext.Panel.superclass.onDestroy.call(this)},getFrameWidth:function(){var F=this.el.getFrameWidth("lr");if(this.frame){var D=this.bwrap.dom.firstChild;F+=(Ext.fly(D).getFrameWidth("l")+Ext.fly(D.firstChild).getFrameWidth("r"));var E=this.bwrap.dom.firstChild.firstChild.firstChild;F+=Ext.fly(E).getFrameWidth("lr")}return F},getFrameHeight:function(){var E=this.el.getFrameWidth("tb");E+=(this.tbar?this.tbar.getHeight():0)+(this.bbar?this.bbar.getHeight():0);if(this.frame){var G=this.el.dom.firstChild;var F=this.bwrap.dom.lastChild;E+=(G.offsetHeight+F.offsetHeight);var H=this.bwrap.dom.firstChild.firstChild.firstChild;E+=Ext.fly(H).getFrameWidth("tb")}else{E+=(this.header?this.header.getHeight():0)+(this.footer?this.footer.getHeight():0)}return E},getInnerWidth:function(){return this.getSize().width-this.getFrameWidth()},getInnerHeight:function(){return this.getSize().height-this.getFrameHeight()},syncShadow:function(){if(this.floating){this.el.sync(true)}},getLayoutTarget:function(){return this.body},setTitle:function(D,C){this.title=D;if(this.header&&this.headerAsText){this.header.child("span").update(D)}if(C){this.setIconClass(C)}this.fireEvent("titlechange",this,D);return this},getUpdater:function(){return this.body.getUpdater()},load:function(){var B=this.body.getUpdater();B.update.apply(B,arguments);return this},beforeDestroy:function(){Ext.Element.uncache(this.header,this.tbar,this.bbar,this.footer,this.body)},createClasses:function(){this.headerCls=this.baseCls+"-header";this.headerTextCls=this.baseCls+"-header-text";this.bwrapCls=this.baseCls+"-bwrap";this.tbarCls=this.baseCls+"-tbar";this.bodyCls=this.baseCls+"-body";this.bbarCls=this.baseCls+"-bbar";this.footerCls=this.baseCls+"-footer"},createGhost:function(F,G,J){var H=document.createElement("div");H.className="x-panel-ghost "+(F?F:"");if(this.header){H.appendChild(this.el.dom.firstChild.cloneNode(true))}Ext.fly(H.appendChild(document.createElement("ul"))).setHeight(this.bwrap.getHeight());H.style.width=this.el.dom.offsetWidth+"px";if(!J){this.container.dom.appendChild(H)}else{Ext.getDom(J).appendChild(H)}if(G!==false&&this.el.useShim!==false){var I=new Ext.Layer({shadow:false,useDisplay:true,constrain:false},H);I.show();return I}else{return new Ext.Element(H)}},doAutoLoad:function(){this.body.load(typeof this.autoLoad=="object"?this.autoLoad:{url:this.autoLoad})}});Ext.reg("panel",Ext.Panel);Ext.ProgressBar=Ext.extend(Ext.BoxComponent,{baseCls:"x-progress",waitTimer:null,initComponent:function(){Ext.ProgressBar.superclass.initComponent.call(this);this.addEvents("update")},onRender:function(H,F){Ext.ProgressBar.superclass.onRender.call(this,H,F);var I=new Ext.Template('<div class="{cls}-wrap">','<div class="{cls}-inner">','<div class="{cls}-bar">','<div class="{cls}-text">',"<div>&#160;</div>","</div>","</div>",'<div class="{cls}-text {cls}-text-back">',"<div>&#160;</div>","</div>","</div>","</div>");if(F){this.el=I.insertBefore(F,{cls:this.baseCls},true)}else{this.el=I.append(H,{cls:this.baseCls},true)}if(this.id){this.el.dom.id=this.id}var J=this.el.dom.firstChild;this.progressBar=Ext.get(J.firstChild);if(this.textEl){this.textEl=Ext.get(this.textEl);delete this.textTopEl}else{this.textTopEl=Ext.get(this.progressBar.dom.firstChild);var G=Ext.get(J.childNodes[1]);this.textTopEl.setStyle("z-index",99).addClass("x-hidden");this.textEl=new Ext.CompositeElement([this.textTopEl.dom.firstChild,G.dom.firstChild]);this.textEl.setWidth(J.offsetWidth)}if(this.value){this.updateProgress(this.value,this.text)}else{this.updateText(this.text)}this.setSize(this.width||"auto","auto");this.progressBar.setHeight(J.offsetHeight)},updateProgress:function(F,E){this.value=F||0;if(E){this.updateText(E)}var D=Math.floor(F*this.el.dom.firstChild.offsetWidth);this.progressBar.setWidth(D);if(this.textTopEl){this.textTopEl.removeClass("x-hidden").setWidth(D)}this.fireEvent("update",this,F,E);return this},wait:function(D){if(!this.waitTimer){var C=this;D=D||{};this.waitTimer=Ext.TaskMgr.start({run:function(B){var A=D.increment||10;this.updateProgress(((((B+A)%A)+1)*(100/A))*0.01)},interval:D.interval||1000,duration:D.duration,onStop:function(){if(D.fn){D.fn.apply(D.scope||this)}this.reset()},scope:C})}return this},isWaiting:function(){return this.waitTimer!=null},updateText:function(B){this.text=B||"&#160;";this.textEl.update(this.text);return this},setSize:function(D,E){Ext.ProgressBar.superclass.setSize.call(this,D,E);if(this.textTopEl){var F=this.el.dom.firstChild;this.textEl.setSize(F.offsetWidth,F.offsetHeight)}return this},reset:function(B){this.updateProgress(0);if(this.textTopEl){this.textTopEl.addClass("x-hidden")}if(this.waitTimer){this.waitTimer.onStop=null;Ext.TaskMgr.stop(this.waitTimer);this.waitTimer=null}if(B===true){this.hide()}return this}});Ext.reg("progress",Ext.ProgressBar);Ext.dd.ScrollManager=function(){var L=Ext.dd.DragDropMgr;var T={};var M=null;var Q={};var R=function(A){M=null;N()};var P=function(){if(L.dragCurrent){L.refreshCache(L.dragCurrent.groups)}};var K=function(){if(L.dragCurrent){var B=Ext.dd.ScrollManager;var A=Q.el.ddScrollConfig?Q.el.ddScrollConfig.increment:B.increment;if(!B.animate){if(Q.el.scroll(Q.dir,A)){P()}}else{Q.el.scroll(Q.dir,A,true,B.animDuration,P)}}};var N=function(){if(Q.id){clearInterval(Q.id)}Q.id=0;Q.el=null;Q.dir=""};var S=function(A,B){N();Q.el=A;Q.dir=B;Q.id=setInterval(K,Ext.dd.ScrollManager.frequency)};var O=function(F,D){if(D||!L.dragCurrent){return }var C=Ext.dd.ScrollManager;if(!M||M!=L.dragCurrent){M=L.dragCurrent;C.refreshCache()}var B=Ext.lib.Event.getXY(F);var A=new Ext.lib.Point(B[0],B[1]);for(var H in T){var G=T[H],I=G._region;var E=G.ddScrollConfig?G.ddScrollConfig:C;if(I&&I.contains(A)&&G.isScrollable()){if(I.bottom-A.y<=E.vthresh){if(Q.el!=G){S(G,"down")}return }else{if(I.right-A.x<=E.hthresh){if(Q.el!=G){S(G,"left")}return }else{if(A.y-I.top<=E.vthresh){if(Q.el!=G){S(G,"up")}return }else{if(A.x-I.left<=E.hthresh){if(Q.el!=G){S(G,"right")}return }}}}}}N()};L.fireEvents=L.fireEvents.createSequence(O,L);L.stopDrag=L.stopDrag.createSequence(R,L);return{register:function(C){if(Ext.isArray(C)){for(var A=0,B=C.length;A<B;A++){this.register(C[A])}}else{C=Ext.get(C);T[C.id]=C}},unregister:function(C){if(Ext.isArray(C)){for(var A=0,B=C.length;A<B;A++){this.unregister(C[A])}}else{C=Ext.get(C);delete T[C.id]}},vthresh:25,hthresh:25,increment:100,frequency:500,animate:true,animDuration:0.4,refreshCache:function(){for(var A in T){if(typeof T[A]=="object"){T[A]._region=T[A].getRegion()}}}}}();Ext.tree.TreeCheckNodeUI=function(){this.onlyLeafCheckable=false;Ext.tree.TreeCheckNodeUI.superclass.constructor.apply(this,arguments)};Ext.extend(Ext.tree.TreeCheckNodeUI,Ext.tree.TreeNodeUI,{renderElements:function(D,H,G,I){var J=D.getOwnerTree();this.onlyLeafCheckable=J.onlyLeafCheckable||false;this.indentMarkup=D.parentNode?D.parentNode.ui.getChildIndent():"";var B=H.href?H.href:Ext.isGecko?"":"#";var C=['<li class="x-tree-node"><div ext:tree-node-id="',D.id,'" class="x-tree-node-el x-tree-node-leaf x-unselectable ',H.cls,'" unselectable="on">','<span class="x-tree-node-indent">',this.indentMarkup,"</span>",'<img src="',this.emptyIcon,'" class="x-tree-ec-icon x-tree-elbow" />','<img src="',H.icon||this.emptyIcon,'" class="x-tree-node-icon',(H.icon?" x-tree-node-inline-icon":""),(H.iconCls?" "+H.iconCls:""),'" unselectable="on" />','<img class="ext-tree-cb',(H.checkedState==2||H.checkedState==1?(H.checkedState==2?" ext-cb-checked":" ext-cb-partial"):" ext-cb-unchecked"),'" src="',this.emptyIcon,'" />','<a hidefocus="on" class="x-tree-node-anchor" href="',B,'" tabIndex="1" ',(H.hrefTarget?' target="'+H.hrefTarget+'"':""),'><span unselectable="on">',D.text,"</span></a></div>",'<ul class="x-tree-node-ct" style="display:none;"></ul>',"</li>"].join("");var A;if(I!==true&&D.nextSibling&&(A=D.nextSibling.ui.getEl())){this.wrap=Ext.DomHelper.insertHtml("beforeBegin",A,C)}else{this.wrap=Ext.DomHelper.insertHtml("beforeEnd",G,C)}this.elNode=this.wrap.childNodes[0];this.ctNode=this.wrap.childNodes[1];var F=this.elNode.childNodes;this.indentNode=F[0];this.ecNode=F[1];this.iconNode=F[2];var E=3;this.checkbox=F[3];Ext.fly(this.checkbox).on("click",this.check.createDelegate(this,[null]));E++;this.anchor=F[E];this.textNode=F[E].firstChild},check:function(B){var E=this.node;if(B===null){var C=((E.attributes.checkedState<2)?2:0)}else{var C=B}this.changeCheckState(E,C);var A=E.parentNode;if(B===null&&A!==null){this.parentCheck(A,E.attributes.checkedState)}if(C==1){return }if(!E.expanded&&!E.childrenRendered){var D=function(G,H){for(var F in G){if(G[F].children){D(G[F].children,H)}G[F].checkedState=H}};D(E.attributes.children,C)}else{this.childCheck(E)}E.fireEvent("checkchange")},childCheck:function(D){var A=D.attributes;if(!A.leaf){var C=D.childNodes;for(var B=0;B<C.length;B++){C[B].getUI().check(A.checkedState)}}},parentCheck:function(C,B){var D=Ext.fly(C.getUI().checkbox);this.changeCheckState(C,this.childHasChecked(C));C.getOwnerTree().fireEvent("check",C,B);var A=C.parentNode;if(A!==null){this.parentCheck(A,B)}},childHasChecked:function(C){var D=C.childNodes;var B=0;if(D||D.length>0){for(var A=0;A<D.length;A++){if(D[A].attributes.checkedState==2){B++}else{if(D[A].attributes.checkedState==1){return 1}}}}if(B==D.length){return 2}else{if(B>0){return 1}}return 0},changeCheckState:function(C,D){var B=C.attributes.checkedState;var A=Ext.fly(C.getUI().checkbox);if(B==D){return }if(A){if(B==2){A.removeClass("ext-cb-checked")}else{if(B==1){A.removeClass("ext-cb-partial")}else{A.removeClass("ext-cb-unchecked")}}if(D==2){A.addClass("ext-cb-checked")}else{if(D==1){A.addClass("ext-cb-partial")}else{A.addClass("ext-cb-unchecked")}}}C.attributes.checkedState=D;C.fireEvent("checkchange",C,D)}});Ext.Window=Ext.extend(Ext.Panel,{baseCls:"x-window",resizable:true,draggable:true,closable:true,constrain:false,constrainHeader:false,plain:false,minimizable:false,maximizable:false,minHeight:100,minWidth:200,expandOnShow:true,closeAction:"close",collapsible:false,initHidden:true,monitorResize:true,elements:"header,body",frame:true,floating:true,initComponent:function(){Ext.Window.superclass.initComponent.call(this);this.addEvents("resize","maximize","minimize","restore")},getState:function(){return Ext.apply(Ext.Window.superclass.getState.call(this)||{},this.getBox())},onRender:function(D,C){Ext.Window.superclass.onRender.call(this,D,C);if(this.plain){this.el.addClass("x-window-plain")}this.focusEl=this.el.createChild({tag:"a",href:"#",cls:"x-dlg-focus",tabIndex:"-1",html:"&#160;"});this.focusEl.swallowEvent("click",true);this.proxy=this.el.createProxy("x-window-proxy");this.proxy.enableDisplayMode("block");if(this.modal){this.mask=this.container.createChild({cls:"ext-el-mask"},this.el.dom);this.mask.enableDisplayMode("block");this.mask.hide()}},initEvents:function(){Ext.Window.superclass.initEvents.call(this);if(this.animateTarget){this.setAnimateTarget(this.animateTarget)}if(this.resizable){this.resizer=new Ext.Resizable(this.el,{minWidth:this.minWidth,minHeight:this.minHeight,handles:this.resizeHandles||"all",pinned:true,resizeElement:this.resizerAction});this.resizer.window=this;this.resizer.on("beforeresize",this.beforeResize,this)}if(this.draggable){this.header.addClass("x-window-draggable")}this.initTools();this.el.on("mousedown",this.toFront,this);this.manager=this.manager||Ext.WindowMgr;this.manager.register(this);this.hidden=true;if(this.maximized){this.maximized=false;this.maximize()}if(this.closable){var B=this.getKeyMap();B.on(27,this.onEsc,this);B.disable()}},initDraggable:function(){this.dd=new Ext.Window.DD(this)},onEsc:function(){this[this.closeAction]()},beforeDestroy:function(){Ext.destroy(this.resizer,this.dd,this.proxy,this.mask);Ext.Window.superclass.beforeDestroy.call(this)},onDestroy:function(){if(this.manager){this.manager.unregister(this)}Ext.Window.superclass.onDestroy.call(this)},initTools:function(){if(this.minimizable){this.addTool({id:"minimize",handler:this.minimize.createDelegate(this,[])})}if(this.maximizable){this.addTool({id:"maximize",handler:this.maximize.createDelegate(this,[])});this.addTool({id:"restore",handler:this.restore.createDelegate(this,[]),hidden:true});this.header.on("dblclick",this.toggleMaximize,this)}if(this.closable){this.addTool({id:"close",handler:this[this.closeAction].createDelegate(this,[])})}},resizerAction:function(){var B=this.proxy.getBox();this.proxy.hide();this.window.handleResize(B);return B},beforeResize:function(){this.resizer.minHeight=Math.max(this.minHeight,this.getFrameHeight()+40);this.resizer.minWidth=Math.max(this.minWidth,this.getFrameWidth()+40);this.resizeBox=this.el.getBox()},updateHandles:function(){if(Ext.isIE&&this.resizer){this.resizer.syncHandleHeight();this.el.repaint()}},handleResize:function(D){var C=this.resizeBox;if(C.x!=D.x||C.y!=D.y){this.updateBox(D)}else{this.setSize(D)}this.focus();this.updateHandles();this.saveState();this.fireEvent("resize",this,D.width,D.height)},focus:function(){var E=this.focusEl,D=this.defaultButton,F=typeof D;if(F!="undefined"){if(F=="number"){E=this.buttons[D]}else{if(F=="string"){E=Ext.getCmp(D)}else{E=D}}}E.focus.defer(10,E)},setAnimateTarget:function(B){B=Ext.get(B);this.animateTarget=B},beforeShow:function(){delete this.el.lastXY;delete this.el.lastLT;if(this.x===undefined||this.y===undefined){var C=this.el.getAlignToXY(this.container,"c-c");var D=this.el.translatePoints(C[0],C[1]);this.x=this.x===undefined?D.left:this.x;this.y=this.y===undefined?D.top:this.y}this.el.setLeftTop(this.x,this.y);if(this.expandOnShow){this.expand(false)}if(this.modal){Ext.getBody().addClass("x-body-masked");this.mask.setSize(Ext.lib.Dom.getViewWidth(true),Ext.lib.Dom.getViewHeight(true));this.mask.show()}},show:function(E,D,F){if(!this.rendered){this.render(Ext.getBody())}if(this.hidden===false){this.toFront();return }if(this.fireEvent("beforeshow",this)===false){return }if(D){this.on("show",D,F,{single:true})}this.hidden=false;if(E!==undefined){this.setAnimateTarget(E)}this.beforeShow();if(this.animateTarget){this.animShow()}else{this.afterShow()}},afterShow:function(){this.proxy.hide();this.el.setStyle("display","block");this.el.show();if(this.maximized){this.fitContainer()}if(Ext.isMac&&Ext.isGecko){this.cascade(this.setAutoScroll)}if(this.monitorResize||this.modal||this.constrain||this.constrainHeader){Ext.EventManager.onWindowResize(this.onWindowResize,this)}this.doConstrain();if(this.layout){this.doLayout()}if(this.keyMap){this.keyMap.enable()}this.toFront();this.updateHandles();this.fireEvent("show",this)},animShow:function(){this.proxy.show();this.proxy.setBox(this.animateTarget.getBox());this.proxy.setOpacity(0);var B=this.getBox(false);B.callback=this.afterShow;B.scope=this;B.duration=0.25;B.easing="easeNone";B.opacity=0.5;B.block=true;this.el.setStyle("display","none");this.proxy.shift(B)},hide:function(E,D,F){if(this.hidden||this.fireEvent("beforehide",this)===false){return }if(D){this.on("hide",D,F,{single:true})}this.hidden=true;if(E!==undefined){this.setAnimateTarget(E)}if(this.animateTarget){this.animHide()}else{this.el.hide();this.afterHide()}},afterHide:function(){this.proxy.hide();if(this.monitorResize||this.modal||this.constrain||this.constrainHeader){Ext.EventManager.removeResizeListener(this.onWindowResize,this)}if(this.modal){this.mask.hide();Ext.getBody().removeClass("x-body-masked")}if(this.keyMap){this.keyMap.disable()}this.fireEvent("hide",this)},animHide:function(){this.proxy.setOpacity(0.5);this.proxy.show();var D=this.getBox(false);this.proxy.setBox(D);this.el.hide();var C=this.animateTarget.getBox();C.callback=this.afterHide;C.scope=this;C.duration=0.25;C.easing="easeNone";C.block=true;C.opacity=0;this.proxy.shift(C)},onWindowResize:function(){if(this.maximized){this.fitContainer()}if(this.modal){this.mask.setSize("100%","100%");var B=this.mask.dom.offsetHeight;this.mask.setSize(Ext.lib.Dom.getViewWidth(true),Ext.lib.Dom.getViewHeight(true))}this.doConstrain()},doConstrain:function(){if(this.constrain||this.constrainHeader){var F;if(this.constrain){F={right:this.el.shadowOffset,left:this.el.shadowOffset,bottom:this.el.shadowOffset}}else{var D=this.getSize();F={right:-(D.width-100),bottom:-(D.height-25)}}var E=this.el.getConstrainToXY(this.container,true,F);if(E){this.setPosition(E[0],E[1])}}},ghost:function(D){var E=this.createGhost(D);var F=this.getBox(true);E.setLeftTop(F.x,F.y);E.setWidth(F.width);this.el.hide();this.activeGhost=E;return E},unghost:function(D,C){if(D!==false){this.el.show();this.focus();if(Ext.isMac&&Ext.isGecko){this.cascade(this.setAutoScroll)}}if(C!==false){this.setPosition(this.activeGhost.getLeft(true),this.activeGhost.getTop(true))}this.activeGhost.hide();this.activeGhost.remove();delete this.activeGhost},minimize:function(){this.fireEvent("minimize",this)},close:function(){if(this.fireEvent("beforeclose",this)!==false){this.hide(null,function(){this.fireEvent("close",this);this.destroy()},this)}},maximize:function(){if(!this.maximized){this.expand(false);this.restoreSize=this.getSize();this.restorePos=this.getPosition(true);this.tools.maximize.hide();this.tools.restore.show();this.maximized=true;this.el.disableShadow();if(this.dd){this.dd.lock()}if(this.collapsible){this.tools.toggle.hide()}this.el.addClass("x-window-maximized");this.container.addClass("x-window-maximized-ct");this.setPosition(0,0);this.fitContainer();this.fireEvent("maximize",this)}},restore:function(){if(this.maximized){this.el.removeClass("x-window-maximized");this.tools.restore.hide();this.tools.maximize.show();this.setPosition(this.restorePos[0],this.restorePos[1]);this.setSize(this.restoreSize.width,this.restoreSize.height);delete this.restorePos;delete this.restoreSize;this.maximized=false;this.el.enableShadow(true);if(this.dd){this.dd.unlock()}if(this.collapsible){this.tools.toggle.show()}this.container.removeClass("x-window-maximized-ct");this.doConstrain();this.fireEvent("restore",this)}},toggleMaximize:function(){this[this.maximized?"restore":"maximize"]()},fitContainer:function(){var B=this.container.getViewSize();this.setSize(B.width,B.height)},setZIndex:function(B){if(this.modal){this.mask.setStyle("z-index",B)}this.el.setZIndex(++B);B+=5;if(this.resizer){this.resizer.proxy.setStyle("z-index",++B)}this.lastZIndex=B},alignTo:function(H,E,G){var F=this.el.getAlignToXY(H,E,G);this.setPagePosition(F[0],F[1]);return this},anchorTo:function(M,I,L,N,J){var K=function(){this.alignTo(M,I,L)};Ext.EventManager.onWindowResize(K,this);var H=typeof N;if(H!="undefined"){Ext.EventManager.on(window,"scroll",K,this,{buffer:H=="number"?N:50})}K.call(this);this[J]=K;return this},toFront:function(){if(this.manager.bringToFront(this)){this.focus()}return this},setActive:function(B){if(B){if(!this.maximized){this.el.enableShadow(true)}this.fireEvent("activate",this)}else{this.el.disableShadow();this.fireEvent("deactivate",this)}},toBack:function(){this.manager.sendToBack(this);return this},center:function(){var B=this.el.getAlignToXY(this.container,"c-c");this.setPagePosition(B[0],B[1]);return this}});Ext.reg("window",Ext.Window);Ext.Window.DD=function(B){this.win=B;Ext.Window.DD.superclass.constructor.call(this,B.el.id,"WindowDD-"+B.id);this.setHandleElId(B.header.id);this.scroll=false};Ext.extend(Ext.Window.DD,Ext.dd.DD,{moveOnly:true,headerOffsets:[100,25],startDrag:function(){var D=this.win;this.proxy=D.ghost();if(D.constrain!==false){var E=D.el.shadowOffset;this.constrainTo(D.container,{right:E,left:E,bottom:E})}else{if(D.constrainHeader!==false){var F=this.proxy.getSize();this.constrainTo(D.container,{right:-(F.width-this.headerOffsets[0]),bottom:-(F.height-this.headerOffsets[1])})}}},b4Drag:Ext.emptyFn,onDrag:function(B){this.alignElWithMouse(this.proxy,B.getPageX(),B.getPageY())},endDrag:function(B){this.win.unghost();this.win.saveState()}});
Ext.BLANK_IMAGE_URL = MB.constant.base_url + 'img/spacer.gif';
