Ext={version:"2.2.1"};window["undefined"]=window["undefined"];Ext.apply=function(D,C,A){if(A){Ext.apply(D,A);}if(D&&C&&typeof C=="object"){for(var B in C){D[B]=C[B];}}return D;};(function(){var idSeed=0;var ua=navigator.userAgent.toLowerCase();var isStrict=document.compatMode=="CSS1Compat",isOpera=ua.indexOf("opera")>-1,isChrome=ua.indexOf("chrome")>-1,isSafari=!isChrome&&(/webkit|khtml/).test(ua),isSafari3=isSafari&&ua.indexOf("webkit/5")!=-1,isIE=!isOpera&&ua.indexOf("msie")>-1,isIE7=!isOpera&&ua.indexOf("msie 7")>-1,isIE8=!isOpera&&ua.indexOf("msie 8")>-1,isGecko=!isSafari&&!isChrome&&ua.indexOf("gecko")>-1,isGecko3=isGecko&&ua.indexOf("rv:1.9")>-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];}if(Ext.isIE&&overrides.toString!=origclass.toString){p.toString=overrides.toString;}}},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.isDate(ov)){var s=Ext.encode(ov).replace(/"/g,"");buf.push(k,"=",s,"&");}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"||isNaN(v)){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";case Date:return"date";}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.length=="number"&&typeof v.splice=="function";},isDate:function(v){return v&&typeof v.getFullYear=="function";},isOpera:isOpera,isChrome:isChrome,isSafari:isSafari,isSafari3:isSafari3,isSafari2:isSafari&&!isSafari3,isIE:isIE,isIE6:isIE&&!isIE7&&!isIE8,isIE7:isIE7,isIE8:isIE8,isGecko:isGecko,isGecko2:isGecko&&!isGecko3,isGecko3:isGecko3,isBorderBox:isBorderBox,isLinux:isLinux,isWindows:isWindows,isMac:isMac,isAir:isAir,useShims:((isIE&&!isIE7)||(isMac&&isGecko&&!isGecko3))});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 B=arguments;var A=this;return function(){return A.apply(window,B);};},createDelegate:function(D,A,B){var C=this;return function(){var E=A||arguments;if(B===true){E=Array.prototype.slice.call(arguments,0);E=E.concat(A);}else{if(typeof B=="number"){E=Array.prototype.slice.call(arguments,0);var F=[B,0].concat(A);Array.prototype.splice.apply(E,F);}}return C.apply(D||window,E);};},defer:function(E,C,A,B){var D=this.createDelegate(C,A,B);if(E){return setTimeout(D,E);}D();return 0;},createSequence:function(A,B){if(typeof A!="function"){return this;}var C=this;return function(){var D=C.apply(this||window,arguments);A.apply(B||this||window,arguments);return D;};},createInterceptor:function(A,B){if(typeof A!="function"){return this;}var C=this;return function(){A.target=this;A.method=C;if(A.apply(B||this||window,arguments)===false){return ;}return C.apply(this||window,arguments);};}});Ext.applyIf(String,{escape:function(A){return A.replace(/('|\\)/g,"\\$1");},leftPad:function(C,A,D){var B=new String(C);if(!D){D=" ";}while(B.length<A){B=D+B;}return B.toString();},format:function(A){var B=Array.prototype.slice.call(arguments,1);return A.replace(/\{(\d+)\}/g,function(D,C){return B[C];});}});String.prototype.toggle=function(A,B){return this==A?B:A;};String.prototype.trim=function(){var A=/^\s+|\s+$/g;return function(){return this.replace(A,"");};}();Ext.applyIf(Number.prototype,{constrain:function(A,B){return Math.min(Math.max(this,A),B);}});Ext.applyIf(Array.prototype,{indexOf:function(C){for(var A=0,B=this.length;A<B;A++){if(this[A]==C){return A;}}return -1;},remove:function(A){var B=this.indexOf(A);if(B!=-1){this.splice(B,1);}return this;}});Date.prototype.getElapsed=function(A){return Math.abs((A||new Date()).getTime()-this.getTime());};(function(){var A;Ext.lib.Dom={getViewWidth:function(E){return E?this.getDocumentWidth():this.getViewportWidth();},getViewHeight:function(E){return E?this.getDocumentHeight():this.getViewportHeight();},getDocumentHeight:function(){var E=(document.compatMode!="CSS1Compat")?document.body.scrollHeight:document.documentElement.scrollHeight;return Math.max(E,this.getViewportHeight());},getDocumentWidth:function(){var E=(document.compatMode!="CSS1Compat")?document.body.scrollWidth:document.documentElement.scrollWidth;return Math.max(E,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(F,E){F=Ext.getDom(F);E=Ext.getDom(E);if(!F||!E){return false;}if(F.contains&&!Ext.isSafari){return F.contains(E);}else{if(F.compareDocumentPosition){return !!(F.compareDocumentPosition(E)&16);}else{var G=E.parentNode;while(G){if(G==F){return true;}else{if(!G.tagName||G.tagName.toUpperCase()=="HTML"){return false;}}G=G.parentNode;}return false;}}},getRegion:function(E){return Ext.lib.Region.getRegion(E);},getY:function(E){return this.getXY(E)[1];},getX:function(E){return this.getXY(E)[0];},getXY:function(N){var O,J,H,G,K=(document.body||document.documentElement);N=Ext.getDom(N);if(N==K){return[0,0];}if(N.getBoundingClientRect){H=N.getBoundingClientRect();G=D(document).getScroll();return[H.left+G.left,H.top+G.top];}var F=0,I=0;O=N;var P=D(N).getStyle("position")=="absolute";while(O){F+=O.offsetLeft;I+=O.offsetTop;if(!P&&D(O).getStyle("position")=="absolute"){P=true;}if(Ext.isGecko){J=D(O);var E=parseInt(J.getStyle("borderTopWidth"),10)||0;var M=parseInt(J.getStyle("borderLeftWidth"),10)||0;F+=M;I+=E;if(O!=N&&J.getStyle("overflow")!="visible"){F+=M;I+=E;}}O=O.offsetParent;}if(Ext.isSafari&&P){F-=K.offsetLeft;I-=K.offsetTop;}if(Ext.isGecko&&!P){var L=D(K);F+=parseInt(L.getStyle("borderLeftWidth"),10)||0;I+=parseInt(L.getStyle("borderTopWidth"),10)||0;}O=N.parentNode;while(O&&O!=K){if(!Ext.isOpera||(O.tagName!="TR"&&D(O).getStyle("display")!="inline")){F-=O.scrollLeft;I-=O.scrollTop;}O=O.parentNode;}return[F,I];},setXY:function(G,F){G=Ext.fly(G,"_setXY");G.position();var E=G.translatePoints(F);if(F[0]!==false){G.dom.style.left=E.left+"px";}if(F[1]!==false){G.dom.style.top=E.top+"px";}},setX:function(E,F){this.setXY(E,[F,false]);},setY:function(F,E){this.setXY(F,[false,E]);}};Ext.lib.Event=function(){var J=false;var I=[];var E=[];var G=0;var H=[];var K=0;var F=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 M=this;var L=function(){M._tryPreloadAttach();};this._interval=setInterval(L,this.POLL_INTERVAL);}},onAvailable:function(O,M,N,L){H.push({id:O,fn:M,obj:N,override:L,checkReady:false});G=this.POLL_RETRYS;this.startInterval();},addListener:function(N,L,O){N=Ext.getDom(N);if(!N||!O){return false;}if("unload"==L){E[E.length]=[N,L,O];return true;}var P=function(R){return typeof Ext!="undefined"?O(Ext.lib.Event.getEvent(R)):false;};var M=[N,L,O,P];var Q=I.length;I[Q]=M;this.doAdd(N,L,P,false);return true;},removeListener:function(N,R,O){var P,S;N=Ext.getDom(N);if(!O){return this.purgeElement(N,false,R);}if("unload"==R){for(P=0,S=E.length;P<S;P++){var L=E[P];if(L&&L[0]==N&&L[1]==R&&L[2]==O){E.splice(P,1);return true;}}return false;}var M=null;var Q=arguments[3];if("undefined"==typeof Q){Q=this._getCacheIndex(N,R,O);}if(Q>=0){M=I[Q];}if(!N||!M){return false;}this.doRemove(N,R,M[this.WFN],false);delete I[Q][this.WFN];delete I[Q][this.FN];I.splice(Q,1);return true;},getTarget:function(N,L){N=N.browserEvent||N;var M=N.target||N.srcElement;return this.resolveTextNode(M);},resolveTextNode:function(L){if(Ext.isSafari&&L&&3==L.nodeType){return L.parentNode;}else{return L;}},getPageX:function(L){L=L.browserEvent||L;var M=L.pageX;if(!M&&0!==M){M=L.clientX||0;if(Ext.isIE){M+=this.getScroll()[1];}}return M;},getPageY:function(M){M=M.browserEvent||M;var L=M.pageY;if(!L&&0!==L){L=M.clientY||0;if(Ext.isIE){L+=this.getScroll()[0];}}return L;},getXY:function(L){L=L.browserEvent||L;return[this.getPageX(L),this.getPageY(L)];},getRelatedTarget:function(L){L=L.browserEvent||L;var M=L.relatedTarget;if(!M){if(L.type=="mouseout"){M=L.toElement;}else{if(L.type=="mouseover"){M=L.fromElement;}}}return this.resolveTextNode(M);},getTime:function(N){N=N.browserEvent||N;if(!N.time){var L=new Date().getTime();try{N.time=L;}catch(M){this.lastError=M;return L;}}return N.time;},stopEvent:function(L){this.stopPropagation(L);this.preventDefault(L);},stopPropagation:function(L){L=L.browserEvent||L;if(L.stopPropagation){L.stopPropagation();}else{L.cancelBubble=true;}},preventDefault:function(L){L=L.browserEvent||L;if(L.preventDefault){L.preventDefault();}else{L.returnValue=false;}},getEvent:function(L){var M=L||window.event;if(!M){var N=this.getEvent.caller;while(N){M=N.arguments[0];if(M&&Event==M.constructor){break;}N=N.caller;}}return M;},getCharCode:function(L){L=L.browserEvent||L;return L.charCode||L.keyCode||0;},_getCacheIndex:function(N,Q,O){for(var P=0,L=I.length;P<L;++P){var M=I[P];if(M&&M[this.FN]==O&&M[this.EL]==N&&M[this.TYPE]==Q){return P;}}return -1;},elCache:{},getEl:function(L){return document.getElementById(L);},clearCache:function(){},_load:function(L){J=true;var M=Ext.lib.Event;if(Ext.isIE){M.doRemove(window,"load",M._load);}},_tryPreloadAttach:function(){if(this.locked){return false;}this.locked=true;var N=!J;if(!N){N=(G>0);}var O=[];for(var L=0,M=H.length;L<M;++L){var P=H[L];if(P){var Q=this.getEl(P.id);if(Q){if(!P.checkReady||J||Q.nextSibling||(document&&document.body)){var R=Q;if(P.override){if(P.override===true){R=P.obj;}else{R=P.override;}}P.fn.call(R,P.obj);H[L]=null;}}else{O.push(P);}}}G=(O.length===0)?0:G-1;if(N){this.startInterval();}else{clearInterval(this._interval);this._interval=null;}this.locked=false;return true;},purgeElement:function(O,N,Q){var M=this.getListeners(O,Q);if(M){for(var P=0,L=M.length;P<L;++P){var R=M[P];this.removeListener(O,R.type,R.fn);}}if(N&&O&&O.childNodes){for(P=0,L=O.childNodes.length;P<L;++P){this.purgeElement(O.childNodes[P],N,Q);}}},getListeners:function(P,T){var M=[],Q;if(!T){Q=[I,E];}else{if(T=="unload"){Q=[E];}else{Q=[I];}}for(var N=0;N<Q.length;++N){var R=Q[N];if(R&&R.length>0){for(var L=0,S=R.length;L<S;++L){var O=R[L];if(O&&O[this.EL]===P&&(!T||T===O[this.TYPE])){M.push({type:O[this.TYPE],fn:O[this.FN],obj:O[this.OBJ],adjust:O[this.ADJ_SCOPE],index:L});}}}}return(M.length)?M:null;},_unload:function(M){var N=Ext.lib.Event,P,Q,S,L,R;for(P=0,L=E.length;P<L;++P){S=E[P];if(S){var O=window;if(S[N.ADJ_SCOPE]){if(S[N.ADJ_SCOPE]===true){O=S[N.OBJ];}else{O=S[N.ADJ_SCOPE];}}S[N.FN].call(O,N.getEvent(M),S[N.OBJ]);E[P]=null;S=null;O=null;}}E=null;if(I&&I.length>0){Q=I.length;while(Q){R=Q-1;S=I[R];if(S){N.removeListener(S[N.EL],S[N.TYPE],S[N.FN],R);}Q=Q-1;}S=null;N.clearCache();}N.doRemove(window,"unload",N._unload);},getScroll:function(){var M=document.documentElement,L=document.body;if(M&&(M.scrollTop||M.scrollLeft)){return[M.scrollTop,M.scrollLeft];}else{if(L){return[L.scrollTop,L.scrollLeft];}else{return[0,0];}}},doAdd:function(){if(window.addEventListener){return function(N,L,O,M){N.addEventListener(L,O,(M));};}else{if(window.attachEvent){return function(N,L,O,M){N.attachEvent("on"+L,O);};}else{return function(){};}}}(),doRemove:function(){if(window.removeEventListener){return function(N,L,O,M){N.removeEventListener(L,O,(M));};}else{if(window.detachEvent){return function(N,M,L){N.detachEvent("on"+M,L);};}else{return function(){};}}}()};}();var C=Ext.lib.Event;C.on=C.addListener;C.un=C.removeListener;if(document&&document.body){C._load();}else{C.doAdd(window,"load",C._load);}C.doAdd(window,"unload",C._unload);C._tryPreloadAttach();Ext.lib.Ajax={request:function(E,G,K,F,J){if(J){var I=J.headers;if(I){for(var H in I){if(I.hasOwnProperty(H)){this.initHeader(H,I[H],false);}}}if(J.xmlData){if(!I||!I["Content-Type"]){this.initHeader("Content-Type","text/xml",false);}E=(E?E:(J.method?J.method:"POST"));F=J.xmlData;}else{if(J.jsonData){if(!I||!I["Content-Type"]){this.initHeader("Content-Type","application/json",false);}E=(E?E:(J.method?J.method:"POST"));F=typeof J.jsonData=="object"?Ext.encode(J.jsonData):J.jsonData;}}}return this.asyncRequest(E,G,K,F);},serializeForm:function(L){if(typeof L=="string"){L=(document.getElementById(L)||document.forms[L]);}var K,M,J,H,G="",E=false;for(var F=0;F<L.elements.length;F++){K=L.elements[F];H=L.elements[F].disabled;M=L.elements[F].name;J=L.elements[F].value;if(!H&&M){switch(K.type){case"select-one":case"select-multiple":for(var I=0;I<K.options.length;I++){if(K.options[I].selected){if(Ext.isIE){G+=encodeURIComponent(M)+"="+encodeURIComponent(K.options[I].attributes.value.specified?K.options[I].value:K.options[I].text)+"&";}else{G+=encodeURIComponent(M)+"="+encodeURIComponent(K.options[I].hasAttribute("value")?K.options[I].value:K.options[I].text)+"&";}}}break;case"radio":case"checkbox":if(K.checked){G+=encodeURIComponent(M)+"="+encodeURIComponent(J)+"&";}break;case"file":case undefined:case"reset":case"button":break;case"submit":if(E==false){G+=encodeURIComponent(M)+"="+encodeURIComponent(J)+"&";E=true;}break;default:G+=encodeURIComponent(M)+"="+encodeURIComponent(J)+"&";break;}}}G=G.substr(0,G.length-1);return G;},headers:{},hasHeaders:false,useDefaultHeader:true,defaultPostHeader:"application/x-www-form-urlencoded; charset=UTF-8",useDefaultXhrHeader:true,defaultXhrHeader:"XMLHttpRequest",hasDefaultHeaders:true,defaultHeaders:{},poll:{},timeout:{},pollInterval:50,transactionId:0,setProgId:function(E){this.activeX.unshift(E);},setDefaultPostHeader:function(E){this.useDefaultHeader=E;},setDefaultXhrHeader:function(E){this.useDefaultXhrHeader=E;},setPollingInterval:function(E){if(typeof E=="number"&&isFinite(E)){this.pollInterval=E;}},createXhrObject:function(E){var F,I;try{I=new XMLHttpRequest();F={conn:I,tId:E};}catch(G){for(var H=0;H<this.activeX.length;++H){try{I=new ActiveXObject(this.activeX[H]);F={conn:I,tId:E};break;}catch(G){}}}finally{return F;}},getConnectionObject:function(){var F;var E=this.transactionId;try{F=this.createXhrObject(E);if(F){this.transactionId++;}}catch(G){}finally{return F;}},asyncRequest:function(E,H,F,I){var G=this.getConnectionObject();if(!G){return null;}else{G.conn.open(E,H,true);if(this.useDefaultXhrHeader){if(!this.defaultHeaders["X-Requested-With"]){this.initHeader("X-Requested-With",this.defaultXhrHeader,true);}}if(I&&this.useDefaultHeader&&(!this.hasHeaders||!this.headers["Content-Type"])){this.initHeader("Content-Type",this.defaultPostHeader);}if(this.hasDefaultHeaders||this.hasHeaders){this.setHeader(G);}this.handleReadyState(G,F);G.conn.send(I||null);return G;}},handleReadyState:function(F,E){var G=this;if(E&&E.timeout){this.timeout[F.tId]=window.setTimeout(function(){G.abort(F,E,true);},E.timeout);}this.poll[F.tId]=window.setInterval(function(){if(F.conn&&F.conn.readyState==4){window.clearInterval(G.poll[F.tId]);delete G.poll[F.tId];if(E&&E.timeout){window.clearTimeout(G.timeout[F.tId]);delete G.timeout[F.tId];}G.handleTransactionResponse(F,E);}},this.pollInterval);},handleTransactionResponse:function(F,E,J){if(!E){this.releaseObject(F);return ;}var H,I;try{if(F.conn.status!==undefined&&F.conn.status!=0){H=F.conn.status;}else{H=13030;}}catch(G){H=13030;}if((H>=200&&H<300)||(Ext.isIE&&H==1223)){I=this.createResponseObject(F,E.argument);if(E.success){if(!E.scope){E.success(I);}else{E.success.apply(E.scope,[I]);}}}else{switch(H){case 12002:case 12029:case 12030:case 12031:case 12152:case 13030:I=this.createExceptionObject(F.tId,E.argument,(J?J:false));if(E.failure){if(!E.scope){E.failure(I);}else{E.failure.apply(E.scope,[I]);}}break;default:I=this.createResponseObject(F,E.argument);if(E.failure){if(!E.scope){E.failure(I);}else{E.failure.apply(E.scope,[I]);}}}}this.releaseObject(F);I=null;},createResponseObject:function(M,G){var J={};var E={};try{var K=M.conn.getAllResponseHeaders();var H=K.split("\n");for(var I=0;I<H.length;I++){var L=H[I].indexOf(":");if(L!=-1){E[H[I].substring(0,L)]=H[I].substring(L+2);}}}catch(F){}J.tId=M.tId;J.status=M.conn.status;J.statusText=M.conn.statusText;J.getResponseHeader=E;J.getAllResponseHeaders=K;J.responseText=M.conn.responseText;J.responseXML=M.conn.responseXML;if(typeof G!==undefined){J.argument=G;}return J;},createExceptionObject:function(E,I,L){var G=0;var F="communication failure";var J=-1;var K="transaction aborted";var H={};H.tId=E;if(L){H.status=J;H.statusText=K;}else{H.status=G;H.statusText=F;}if(I){H.argument=I;}return H;},initHeader:function(H,E,F){var G=(F)?this.defaultHeaders:this.headers;if(G[H]===undefined){G[H]=E;}else{G[H]=E+","+G[H];}if(F){this.hasDefaultHeaders=true;}else{this.hasHeaders=true;}},setHeader:function(F){if(this.hasDefaultHeaders){for(var E in this.defaultHeaders){if(this.defaultHeaders.hasOwnProperty(E)){F.conn.setRequestHeader(E,this.defaultHeaders[E]);}}}if(this.hasHeaders){for(var E in this.headers){if(this.headers.hasOwnProperty(E)){F.conn.setRequestHeader(E,this.headers[E]);}}this.headers={};this.hasHeaders=false;}},resetDefaultHeaders:function(){delete this.defaultHeaders;this.defaultHeaders={};this.hasDefaultHeaders=false;},abort:function(F,E,G){if(this.isCallInProgress(F)){F.conn.abort();window.clearInterval(this.poll[F.tId]);delete this.poll[F.tId];if(G){delete this.timeout[F.tId];}this.handleTransactionResponse(F,E,true);return true;}else{return false;}},isCallInProgress:function(E){if(E.conn){return E.conn.readyState!=4&&E.conn.readyState!=0;}else{return false;}},releaseObject:function(E){E.conn=null;E=null;},activeX:["MSXML2.XMLHTTP.3.0","MSXML2.XMLHTTP","Microsoft.XMLHTTP"]};Ext.lib.Region=function(F,E,H,G){this.top=F;this[1]=F;this.right=E;this.bottom=H;this.left=G;this[0]=G;};Ext.lib.Region.prototype={contains:function(E){return(E.left>=this.left&&E.right<=this.right&&E.top>=this.top&&E.bottom<=this.bottom);},getArea:function(){return((this.bottom-this.top)*(this.right-this.left));},intersect:function(E){var G=Math.max(this.top,E.top);var F=Math.min(this.right,E.right);var I=Math.min(this.bottom,E.bottom);var H=Math.max(this.left,E.left);if(I>=G&&F>=H){return new Ext.lib.Region(G,F,I,H);}else{return null;}},union:function(E){var G=Math.min(this.top,E.top);var F=Math.max(this.right,E.right);var I=Math.max(this.bottom,E.bottom);var H=Math.min(this.left,E.left);return new Ext.lib.Region(G,F,I,H);},constrainTo:function(E){this.top=this.top.constrain(E.top,E.bottom);this.bottom=this.bottom.constrain(E.top,E.bottom);this.left=this.left.constrain(E.left,E.right);this.right=this.right.constrain(E.left,E.right);return this;},adjust:function(F,G,H,E){this.top+=F;this.left+=G;this.right+=E;this.bottom+=H;return this;}};Ext.lib.Region.getRegion=function(G){var E=Ext.lib.Dom.getXY(G);var H=E[1];var F=E[0]+G.offsetWidth;var J=E[1]+G.offsetHeight;var I=E[0];return new Ext.lib.Region(H,F,J,I);};Ext.lib.Point=function(F,E){if(Ext.isArray(F)){E=F[1];F=F[0];}this.x=this.right=this.left=this[0]=F;this.y=this.top=this.bottom=this[1]=E;};Ext.lib.Point.prototype=new Ext.lib.Region();Ext.lib.Anim={scroll:function(G,I,F,E,J,H){return this.run(G,I,F,E,J,H,Ext.lib.Scroll);},motion:function(G,I,F,E,J,H){return this.run(G,I,F,E,J,H,Ext.lib.Motion);},color:function(G,I,F,E,J,H){return this.run(G,I,F,E,J,H,Ext.lib.ColorAnim);},run:function(H,K,F,E,L,I,J){J=J||Ext.lib.AnimBase;if(typeof E=="string"){E=Ext.lib.Easing[E];}var G=new J(H,K,F,E);G.animateX(function(){Ext.callback(L,I);});return G;}};function D(E){if(!A){A=new Ext.Element.Flyweight();}A.dom=E;return A;}if(Ext.isIE){function B(){var E=Function.prototype;delete E.createSequence;delete E.defer;delete E.createDelegate;delete E.createCallback;delete E.createInterceptor;window.detachEvent("onunload",B);}window.attachEvent("onunload",B);}Ext.lib.AnimBase=function(G,H,F,E){if(G){this.init(G,H,F,E);}};Ext.lib.AnimBase.prototype={toString:function(){var F=this.getEl();var E=F.id||F.tagName;return("Anim "+E);},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(G,E,F){return this.method(this.currentFrame,E,F-E,this.totalFrames);},setAttribute:function(G,E,F){if(this.patterns.noNegatives.test(G)){E=(E>0)?E:0;}Ext.fly(this.getEl(),"_anim").setStyle(G,E+F);},getAttribute:function(J){var H=this.getEl();var F=D(H).getStyle(J);if(F!=="auto"&&!this.patterns.offsetUnit.test(F)){return parseFloat(F);}var I=this.patterns.offsetAttribute.exec(J)||[];var E=!!(I[3]);var G=!!(I[2]);if(G||(D(H).getStyle("position")=="absolute"&&E)){F=H["offset"+I[0].charAt(0).toUpperCase()+I[0].substr(1)];}else{F=0;}return F;},getDefaultUnit:function(E){if(this.patterns.defaultUnit.test(E)){return"px";}return"";},animateX:function(E,G){var F=function(){this.onComplete.removeListener(F);if(typeof E=="function"){E.call(G||this,this);}};this.onComplete.addListener(F,this);this.animate();},setRuntimeAttribute:function(J){var E;var I;var H=this.attributes;this.runtimeAttributes[J]={};var F=function(L){return(typeof L!=="undefined");};if(!F(H[J]["to"])&&!F(H[J]["by"])){return false;}E=(F(H[J]["from"]))?H[J]["from"]:this.getAttribute(J);if(F(H[J]["to"])){I=H[J]["to"];}else{if(F(H[J]["by"])){if(E.constructor==Array){I=[];for(var G=0,K=E.length;G<K;++G){I[G]=E[G]+H[J]["by"][G];}}else{I=E+H[J]["by"];}}}this.runtimeAttributes[J].start=E;this.runtimeAttributes[J].end=I;this.runtimeAttributes[J].unit=(F(H[J].unit))?H[J]["unit"]:this.getDefaultUnit(J);},init:function(L,G,H,N){var M=false;var K=null;var I=0;L=Ext.getDom(L);this.attributes=G||{};this.duration=H||1;this.method=N||Ext.lib.Easing.easeNone;this.useSeconds=true;this.currentFrame=0;this.totalFrames=Ext.lib.AnimMgr.fps;this.getEl=function(){return L;};this.isAnimated=function(){return M;};this.getStartTime=function(){return K;};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(O){if(O){this.currentFrame=this.totalFrames;this._onTween.fire();}Ext.lib.AnimMgr.stop(this);};var E=function(){this.onStart.fire();this.runtimeAttributes={};for(var O in this.attributes){this.setRuntimeAttribute(O);}M=true;I=0;K=new Date();};var F=function(){var O={duration:new Date()-this.getStartTime(),currentFrame:this.currentFrame};O.toString=function(){return("duration: "+O.duration+", currentFrame: "+O.currentFrame);};this.onTween.fire(O);var P=this.runtimeAttributes;for(var Q in P){this.setAttribute(Q,this.doMethod(Q,P[Q].start,P[Q].end),P[Q].unit);}I+=1;};var J=function(){var P=(new Date()-K)/1000;var O={duration:P,frames:I,fps:I/P};O.toString=function(){return("duration: "+O.duration+", frames: "+O.frames+", fps: "+O.fps);};M=false;I=0;this.onComplete.fire(O);};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(E);this._onTween.addListener(F);this._onComplete.addListener(J);}};Ext.lib.AnimMgr=new function(){var G=null;var H=[];var I=0;this.fps=1000;this.delay=1;this.registerElement=function(J){H[H.length]=J;I+=1;J._onStart.fire();this.start();};this.unRegister=function(J,K){J._onComplete.fire();K=K||E(J);if(K!=-1){H.splice(K,1);}I-=1;if(I<=0){this.stop();}};this.start=function(){if(G===null){G=setInterval(this.run,this.delay);}};this.stop=function(J){if(!J){clearInterval(G);for(var K=0,L=H.length;K<L;++K){if(H[0].isAnimated()){this.unRegister(H[0],0);}}H=[];G=null;I=0;}else{this.unRegister(J);}};this.run=function(){for(var J=0,L=H.length;J<L;++J){var K=H[J];if(!K||!K.isAnimated()){continue;}if(K.currentFrame<K.totalFrames||K.totalFrames===null){K.currentFrame+=1;if(K.useSeconds){F(K);}K._onTween.fire();}else{Ext.lib.AnimMgr.stop(K,J);}}};var E=function(J){for(var K=0,L=H.length;K<L;++K){if(H[K]==J){return K;}}return -1;};var F=function(L){var O=L.totalFrames;var J=L.currentFrame;var K=(L.currentFrame*L.duration*1000/L.totalFrames);var M=(new Date()-L.getStartTime());var N=0;if(M<L.duration*1000){N=Math.round((M/K-1)*L.currentFrame);}else{N=O-(J+1);}if(N>0&&isFinite(N)){if(L.currentFrame+N>=O){N=O-(J+1);}L.currentFrame+=N;}};};Ext.lib.Bezier=new function(){this.getPosition=function(F,G){var E=F.length;var H=[];for(var I=0;I<E;++I){H[I]=[F[I][0],F[I][1]];}for(var J=1;J<E;++J){for(I=0;I<E-J;++I){H[I][0]=(1-G)*H[I][0]+G*H[parseInt(I+1,10)][0];H[I][1]=(1-G)*H[I][1]+G*H[parseInt(I+1,10)][1];}}return[H[0][0],H[0][1]];};};(function(){Ext.lib.ColorAnim=function(J,K,I,H){Ext.lib.ColorAnim.superclass.constructor.call(this,J,K,I,H);};Ext.extend(Ext.lib.ColorAnim,Ext.lib.AnimBase);var F=Ext.lib;var E=F.ColorAnim.superclass;var G=F.ColorAnim.prototype;G.toString=function(){var I=this.getEl();var H=I.id||I.tagName;return("ColorAnim "+H);};G.patterns.color=/color$/i;G.patterns.rgb=/^rgb\(([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\)$/i;G.patterns.hex=/^#?([0-9A-F]{2})([0-9A-F]{2})([0-9A-F]{2})$/i;G.patterns.hex3=/^#?([0-9A-F]{1})([0-9A-F]{1})([0-9A-F]{1})$/i;G.patterns.transparent=/^transparent|rgba\(0, 0, 0, 0\)$/;G.parseColor=function(I){if(I.length==3){return I;}var H=this.patterns.hex.exec(I);if(H&&H.length==4){return[parseInt(H[1],16),parseInt(H[2],16),parseInt(H[3],16)];}H=this.patterns.rgb.exec(I);if(H&&H.length==4){return[parseInt(H[1],10),parseInt(H[2],10),parseInt(H[3],10)];}H=this.patterns.hex3.exec(I);if(H&&H.length==4){return[parseInt(H[1]+H[1],16),parseInt(H[2]+H[2],16),parseInt(H[3]+H[3],16)];}return null;};G.getAttribute=function(K){var I=this.getEl();if(this.patterns.color.test(K)){var H=D(I).getStyle(K);if(this.patterns.transparent.test(H)){var J=I.parentNode;H=D(J).getStyle(K);while(J&&this.patterns.transparent.test(H)){J=J.parentNode;H=D(J).getStyle(K);if(J.tagName.toUpperCase()=="HTML"){H="#fff";}}}}else{H=E.getAttribute.call(this,K);}return H;};G.doMethod=function(K,M,J){var H;if(this.patterns.color.test(K)){H=[];for(var I=0,L=M.length;I<L;++I){H[I]=E.doMethod.call(this,K,M[I],J[I]);}H="rgb("+Math.floor(H[0])+","+Math.floor(H[1])+","+Math.floor(H[2])+")";}else{H=E.doMethod.call(this,K,M,J);}return H;};G.setRuntimeAttribute=function(K){E.setRuntimeAttribute.call(this,K);if(this.patterns.color.test(K)){var I=this.attributes;var M=this.parseColor(this.runtimeAttributes[K].start);var J=this.parseColor(this.runtimeAttributes[K].end);if(typeof I[K]["to"]==="undefined"&&typeof I[K]["by"]!=="undefined"){J=this.parseColor(I[K].by);for(var H=0,L=M.length;H<L;++H){J[H]=M[H]+J[H];}}this.runtimeAttributes[K].start=M;this.runtimeAttributes[K].end=J;}};})();Ext.lib.Easing={easeNone:function(G,H,E,F){return E*G/F+H;},easeIn:function(G,H,E,F){return E*(G/=F)*G+H;},easeOut:function(G,H,E,F){return -E*(G/=F)*(G-2)+H;},easeBoth:function(G,H,E,F){if((G/=F/2)<1){return E/2*G*G+H;}return -E/2*((--G)*(G-2)-1)+H;},easeInStrong:function(G,H,E,F){return E*(G/=F)*G*G*G+H;},easeOutStrong:function(G,H,E,F){return -E*((G=G/F-1)*G*G*G-1)+H;},easeBothStrong:function(G,H,E,F){if((G/=F/2)<1){return E/2*G*G*G*G+H;}return -E/2*((G-=2)*G*G*G-2)+H;},elasticIn:function(I,K,E,F,J,G){if(I==0){return K;}if((I/=F)==1){return K+E;}if(!G){G=F*0.3;}if(!J||J<Math.abs(E)){J=E;var H=G/4;}else{var H=G/(2*Math.PI)*Math.asin(E/J);}return -(J*Math.pow(2,10*(I-=1))*Math.sin((I*F-H)*(2*Math.PI)/G))+K;},elasticOut:function(I,K,E,F,J,G){if(I==0){return K;}if((I/=F)==1){return K+E;}if(!G){G=F*0.3;}if(!J||J<Math.abs(E)){J=E;var H=G/4;}else{var H=G/(2*Math.PI)*Math.asin(E/J);}return J*Math.pow(2,-10*I)*Math.sin((I*F-H)*(2*Math.PI)/G)+E+K;},elasticBoth:function(I,K,E,F,J,G){if(I==0){return K;}if((I/=F/2)==2){return K+E;}if(!G){G=F*(0.3*1.5);}if(!J||J<Math.abs(E)){J=E;var H=G/4;}else{var H=G/(2*Math.PI)*Math.asin(E/J);}if(I<1){return -0.5*(J*Math.pow(2,10*(I-=1))*Math.sin((I*F-H)*(2*Math.PI)/G))+K;}return J*Math.pow(2,-10*(I-=1))*Math.sin((I*F-H)*(2*Math.PI)/G)*0.5+E+K;},backIn:function(H,I,E,F,G){if(typeof G=="undefined"){G=1.70158;}return E*(H/=F)*H*((G+1)*H-G)+I;},backOut:function(H,I,E,F,G){if(typeof G=="undefined"){G=1.70158;}return E*((H=H/F-1)*H*((G+1)*H+G)+1)+I;},backBoth:function(H,I,E,F,G){if(typeof G=="undefined"){G=1.70158;}if((H/=F/2)<1){return E/2*(H*H*(((G*=(1.525))+1)*H-G))+I;}return E/2*((H-=2)*H*(((G*=(1.525))+1)*H+G)+2)+I;},bounceIn:function(G,H,E,F){return E-Ext.lib.Easing.bounceOut(F-G,0,E,F)+H;},bounceOut:function(G,H,E,F){if((G/=F)<(1/2.75)){return E*(7.5625*G*G)+H;}else{if(G<(2/2.75)){return E*(7.5625*(G-=(1.5/2.75))*G+0.75)+H;}else{if(G<(2.5/2.75)){return E*(7.5625*(G-=(2.25/2.75))*G+0.9375)+H;}}}return E*(7.5625*(G-=(2.625/2.75))*G+0.984375)+H;},bounceBoth:function(G,H,E,F){if(G<F/2){return Ext.lib.Easing.bounceIn(G*2,0,E,F)*0.5+H;}return Ext.lib.Easing.bounceOut(G*2-F,0,E,F)*0.5+E*0.5+H;}};(function(){Ext.lib.Motion=function(L,M,K,J){if(L){Ext.lib.Motion.superclass.constructor.call(this,L,M,K,J);}};Ext.extend(Ext.lib.Motion,Ext.lib.ColorAnim);var F=Ext.lib;var E=F.Motion.superclass;var H=F.Motion.prototype;H.toString=function(){var K=this.getEl();var J=K.id||K.tagName;return("Motion "+J);};H.patterns.points=/^points$/i;H.setAttribute=function(L,J,K){if(this.patterns.points.test(L)){K=K||"px";E.setAttribute.call(this,"left",J[0],K);E.setAttribute.call(this,"top",J[1],K);}else{E.setAttribute.call(this,L,J,K);}};H.getAttribute=function(K){if(this.patterns.points.test(K)){var J=[E.getAttribute.call(this,"left"),E.getAttribute.call(this,"top")];}else{J=E.getAttribute.call(this,K);}return J;};H.doMethod=function(M,N,L){var J=null;if(this.patterns.points.test(M)){var K=this.method(this.currentFrame,0,100,this.totalFrames)/100;J=F.Bezier.getPosition(this.runtimeAttributes[M],K);}else{J=E.doMethod.call(this,M,N,L);}return J;};H.setRuntimeAttribute=function(S){if(this.patterns.points.test(S)){var Q=this.getEl();var O=this.attributes;var R;var M=O.points.control||[];var P;var L,J;if(M.length>0&&!Ext.isArray(M[0])){M=[M];}else{var N=[];for(L=0,J=M.length;L<J;++L){N[L]=M[L];}M=N;}Ext.fly(Q,"_anim").position();if(G(O.points.from)){Ext.lib.Dom.setXY(Q,O.points.from);}else{Ext.lib.Dom.setXY(Q,Ext.lib.Dom.getXY(Q));}R=this.getAttribute("points");if(G(O.points.to)){P=I.call(this,O.points.to,R);var K=Ext.lib.Dom.getXY(this.getEl());for(L=0,J=M.length;L<J;++L){M[L]=I.call(this,M[L],R);}}else{if(G(O.points.by)){P=[R[0]+O.points.by[0],R[1]+O.points.by[1]];for(L=0,J=M.length;L<J;++L){M[L]=[R[0]+M[L][0],R[1]+M[L][1]];}}}this.runtimeAttributes[S]=[R];if(M.length>0){this.runtimeAttributes[S]=this.runtimeAttributes[S].concat(M);}this.runtimeAttributes[S][this.runtimeAttributes[S].length]=P;}else{E.setRuntimeAttribute.call(this,S);}};var I=function(L,J){var K=Ext.lib.Dom.getXY(this.getEl());L=[L[0]-K[0]+J[0],L[1]-K[1]+J[1]];return L;};var G=function(J){return(typeof J!=="undefined");};})();(function(){Ext.lib.Scroll=function(J,K,I,H){if(J){Ext.lib.Scroll.superclass.constructor.call(this,J,K,I,H);}};Ext.extend(Ext.lib.Scroll,Ext.lib.ColorAnim);var F=Ext.lib;var E=F.Scroll.superclass;var G=F.Scroll.prototype;G.toString=function(){var I=this.getEl();var H=I.id||I.tagName;return("Scroll "+H);};G.doMethod=function(K,H,J){var I=null;if(K=="scroll"){I=[this.method(this.currentFrame,H[0],J[0]-H[0],this.totalFrames),this.method(this.currentFrame,H[1],J[1]-H[1],this.totalFrames)];}else{I=E.doMethod.call(this,K,H,J);}return I;};G.getAttribute=function(J){var H=null;var I=this.getEl();if(J=="scroll"){H=[I.scrollLeft,I.scrollTop];}else{H=E.getAttribute.call(this,J);}return H;};G.setAttribute=function(K,H,I){var J=this.getEl();if(K=="scroll"){J.scrollLeft=H[0];J.scrollTop=H[1];}else{E.setAttribute.call(this,K,H,I);}};})();})();Ext.DomHelper=function(){var B=null;var H=/^(?:br|frame|hr|img|input|link|meta|range|spacer|wbr|area|param|col)$/i;var L=/^table|tbody|tr|td$/i;var M=function(O){if(typeof O=="string"){return O;}var T="";if(Ext.isArray(O)){for(var Q=0,S=O.length;Q<S;Q++){T+=M(O[Q]);}return T;}if(!O.tag){O.tag="div";}T+="<"+O.tag;for(var U in O){if(U=="tag"||U=="children"||U=="cn"||U=="html"||typeof O[U]=="function"){continue;}if(U=="style"){var P=O.style;if(typeof P=="function"){P=P.call();}if(typeof P=="string"){T+=' style="'+P+'"';}else{if(typeof P=="object"){T+=' style="';for(var R in P){if(typeof P[R]!="function"){T+=R+":"+P[R]+";";}}T+='"';}}}else{if(U=="cls"){T+=' class="'+O.cls+'"';}else{if(U=="htmlFor"){T+=' for="'+O.htmlFor+'"';}else{T+=" "+U+'="'+O[U]+'"';}}}}if(H.test(O.tag)){T+="/>";}else{T+=">";var N=O.children||O.cn;if(N){T+=M(N);}else{if(O.html){T+=O.html;}}T+="</"+O.tag+">";}return T;};var A=function(O,T){var P;if(Ext.isArray(O)){P=document.createDocumentFragment();for(var Q=0,S=O.length;Q<S;Q++){A(O[Q],P);}}else{if(typeof O=="string"){P=document.createTextNode(O);}else{P=document.createElement(O.tag||"div");var R=!!P.setAttribute;for(var U in O){if(U=="tag"||U=="children"||U=="cn"||U=="html"||U=="style"||typeof O[U]=="function"){continue;}if(U=="cls"){P.className=O.cls;}else{if(R){P.setAttribute(U,O[U]);}else{P[U]=O[U];}}}Ext.DomHelper.applyStyles(P,O.style);var N=O.children||O.cn;if(N){A(N,P);}else{if(O.html){P.innerHTML=O.html;}}}}if(T){T.appendChild(P);}return P;};var E=function(N,P,Q,O){B.innerHTML=[P,Q,O].join("");var S=-1,R=B;while(++S<N){R=R.firstChild;}return R;};var D="<table>",I="</table>",K=D+"<tbody>",C="</tbody>"+I,F=K+"<tr>",J="</tr>"+C;var G=function(S,R,P,Q){if(!B){B=document.createElement("div");}var O;var N=null;if(S=="td"){if(R=="afterbegin"||R=="beforeend"){return ;}if(R=="beforebegin"){N=P;P=P.parentNode;}else{N=P.nextSibling;P=P.parentNode;}O=E(4,F,Q,J);}else{if(S=="tr"){if(R=="beforebegin"){N=P;P=P.parentNode;O=E(3,K,Q,C);}else{if(R=="afterend"){N=P.nextSibling;P=P.parentNode;O=E(3,K,Q,C);}else{if(R=="afterbegin"){N=P.firstChild;}O=E(4,F,Q,J);}}}else{if(S=="tbody"){if(R=="beforebegin"){N=P;P=P.parentNode;O=E(2,D,Q,I);}else{if(R=="afterend"){N=P.nextSibling;P=P.parentNode;O=E(2,D,Q,I);}else{if(R=="afterbegin"){N=P.firstChild;}O=E(3,K,Q,C);}}}else{if(R=="beforebegin"||R=="afterend"){return ;}if(R=="afterbegin"){N=P.firstChild;}O=E(2,D,Q,I);}}}P.insertBefore(O,N);return O;};return{useDom:false,markup:function(N){return M(N);},applyStyles:function(P,O){if(O){P=Ext.fly(P);if(typeof O=="string"){var Q=/\s?([a-z\-]*)\:\s?([^;]*);?/gi;var N;while((N=Q.exec(O))!=null){P.setStyle(N[1],N[2]);}}else{if(typeof O=="object"){for(var R in O){P.setStyle(R,O[R]);}}else{if(typeof O=="function"){Ext.DomHelper.applyStyles(P,O.call());}}}}},insertHtml:function(Q,O,P){Q=Q.toLowerCase();if(O.insertAdjacentHTML){if(L.test(O.tagName)){var R;if(R=G(O.tagName.toLowerCase(),Q,O,P)){return R;}}switch(Q){case"beforebegin":O.insertAdjacentHTML("BeforeBegin",P);return O.previousSibling;case"afterbegin":O.insertAdjacentHTML("AfterBegin",P);return O.firstChild;case"beforeend":O.insertAdjacentHTML("BeforeEnd",P);return O.lastChild;case"afterend":O.insertAdjacentHTML("AfterEnd",P);return O.nextSibling;}throw'Illegal insertion point -> "'+Q+'"';}var S=O.ownerDocument.createRange();var N;switch(Q){case"beforebegin":S.setStartBefore(O);N=S.createContextualFragment(P);O.parentNode.insertBefore(N,O);return O.previousSibling;case"afterbegin":if(O.firstChild){S.setStartBefore(O.firstChild);N=S.createContextualFragment(P);O.insertBefore(N,O.firstChild);return O.firstChild;}else{O.innerHTML=P;return O.firstChild;}case"beforeend":if(O.lastChild){S.setStartAfter(O.lastChild);N=S.createContextualFragment(P);O.appendChild(N);return O.lastChild;}else{O.innerHTML=P;return O.lastChild;}case"afterend":S.setStartAfter(O);N=S.createContextualFragment(P);O.parentNode.insertBefore(N,O.nextSibling);return O.nextSibling;}throw'Illegal insertion point -> "'+Q+'"';},insertBefore:function(P,N,O){return this.doInsert(P,N,O,"beforeBegin");},insertAfter:function(P,N,O){return this.doInsert(P,N,O,"afterEnd","nextSibling");},insertFirst:function(P,N,O){return this.doInsert(P,N,O,"afterBegin","firstChild");},doInsert:function(Q,O,P,N,R){Q=Ext.getDom(Q);var S;if(this.useDom){S=A(O,null);(R==="firstChild"?Q:Q.parentNode).insertBefore(S,R?Q[R]:Q);}else{var T=M(O);S=this.insertHtml(N,Q,T);}return P?Ext.get(S,true):S;},append:function(P,N,O){P=Ext.getDom(P);var Q;if(this.useDom){Q=A(N,null);P.appendChild(Q);}else{var R=M(N);Q=this.insertHtml("beforeEnd",P,R);}return O?Ext.get(Q,true):Q;},overwrite:function(P,N,O){P=Ext.getDom(P);P.innerHTML=M(N);return O?Ext.get(P.firstChild,true):P.firstChild;},createTemplate:function(N){var O=M(N);return new Ext.Template(O);}};}();Ext.Template=function(B){var E=arguments;if(Ext.isArray(B)){B=B.join("");}else{if(E.length>1){var D=[];for(var C=0,A=E.length;C<A;C++){if(typeof E[C]=="object"){Ext.apply(this,E[C]);}else{D[D.length]=E[C];}}B=D.join("");}}this.html=B;if(this.compiled){this.compile();}};Ext.Template.prototype={applyTemplate:function(A){if(this.compiled){return this.compiled(A);}var B=this.disableFormats!==true;var C=Ext.util.Format,E=this;var D=function(J,H,L,I){if(L&&B){if(L.substr(0,5)=="this."){return E.call(L.substr(5),A[H],A);}else{if(I){var F=/^\s*['"](.*)["']\s*$/;I=I.split(",");for(var G=0,K=I.length;G<K;G++){I[G]=I[G].replace(F,"$1");}I=[A[H]].concat(I);}else{I=[A[H]];}return C[L].apply(C,I);}}else{return A[H]!==undefined?A[H]:"";}};return this.html.replace(this.re,D);},set:function(B,A){this.html=B;this.compiled=null;if(A){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(C,A,B){return this[C](A,B);},insertFirst:function(A,B,C){return this.doInsert("afterBegin",A,B,C);},insertBefore:function(A,B,C){return this.doInsert("beforeBegin",A,B,C);},insertAfter:function(A,B,C){return this.doInsert("afterEnd",A,B,C);},append:function(A,B,C){return this.doInsert("beforeEnd",A,B,C);},doInsert:function(E,C,A,B){C=Ext.getDom(C);var D=Ext.DomHelper.insertHtml(E,C,this.applyTemplate(A));return B?Ext.get(D,true):D;},overwrite:function(A,B,C){A=Ext.getDom(A);A.innerHTML=this.applyTemplate(B);return C?Ext.get(A.firstChild,true):A.firstChild;}};Ext.Template.prototype.apply=Ext.Template.prototype.applyTemplate;Ext.DomHelper.Template=Ext.Template;Ext.Template.from=function(A,B){A=Ext.getDom(A);return new Ext.Template(A.value||A.innerHTML,B||"");};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 A=this.events[arguments[0].toLowerCase()];if(typeof A=="object"){return A.fire.apply(A,Array.prototype.slice.call(arguments,1));}}return true;},filterOptRe:/^(?:scope|delay|buffer|single)$/,addListener:function(B,F,A,C){if(typeof B=="object"){C=B;for(var D in C){if(this.filterOptRe.test(D)){continue;}if(typeof C[D]=="function"){this.addListener(D,C[D],C.scope,C);}else{this.addListener(D,C[D].fn,C[D].scope,C[D]);}}return ;}C=(!C||typeof C=="boolean")?{}:C;B=B.toLowerCase();var E=this.events[B]||true;if(typeof E=="boolean"){E=new Ext.util.Event(this,B);this.events[B]=E;}E.addListener(F,A,C);},removeListener:function(B,D,A){var C=this.events[B.toLowerCase()];if(typeof C=="object"){C.removeListener(D,A);}},purgeListeners:function(){for(var A in this.events){if(typeof this.events[A]=="object"){this.events[A].clearListeners();}}},relayEvents:function(C,E){var D=function(G){return function(){return this.fireEvent.apply(this,Ext.combine(G,Array.prototype.slice.call(arguments,0)));};};for(var F=0,B=E.length;F<B;F++){var A=E[F];if(!this.events[A]){this.events[A]=true;}C.on(A,D(A),this);}},addEvents:function(B){if(!this.events){this.events={};}if(typeof B=="string"){for(var C=0,A=arguments,D;D=A[C];C++){if(!this.events[A[C]]){this.events[A[C]]=true;}}}else{Ext.applyIf(this.events,B);}},hasListener:function(B){var A=this.events[B];return typeof A=="object"&&A.listeners.length>0;},suspendEvents:function(){this.eventsSuspended=true;},resumeEvents:function(){this.eventsSuspended=false;},getMethodEvent:function(C){if(!this.methodEvents){this.methodEvents={};}var D=this.methodEvents[C];if(!D){D={};this.methodEvents[C]=D;D.originalFn=this[C];D.methodName=C;D.before=[];D.after=[];var G,A,F;var E=this;var B=function(H,I,J){if((A=H.apply(I||E,J))!==undefined){if(typeof A==="object"){if(A.returnValue!==undefined){G=A.returnValue;}else{G=A;}if(A.cancel===true){F=true;}}else{if(A===false){F=true;}else{G=A;}}}};this[C]=function(){G=A=undefined;F=false;var I=Array.prototype.slice.call(arguments,0);for(var H=0,J=D.before.length;H<J;H++){B(D.before[H].fn,D.before[H].scope,I);if(F){return G;}}if((A=D.originalFn.apply(E,I))!==undefined){G=A;}for(var H=0,J=D.after.length;H<J;H++){B(D.after[H].fn,D.after[H].scope,I);if(F){return G;}}return G;};}return D;},beforeMethod:function(C,A,B){var D=this.getMethodEvent(C);D.before.push({fn:A,scope:B});},afterMethod:function(C,A,B){var D=this.getMethodEvent(C);D.after.push({fn:A,scope:B});},removeMethodListener:function(C,E,F){var D=this.getMethodEvent(C);for(var A=0,B=D.before.length;A<B;A++){if(D.before[A].fn==E&&D.before[A].scope==F){D.before.splice(A,1);return ;}}for(var A=0,B=D.after.length;A<B;A++){if(D.after[A].fn==E&&D.after[A].scope==F){D.after.splice(A,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(C,A,B){C.fireEvent=C.fireEvent.createInterceptor(A,B);};Ext.util.Observable.releaseCapture=function(A){A.fireEvent=Ext.util.Observable.prototype.fireEvent;};(function(){var A=function(E,D,F){var G=new Ext.util.DelayedTask();return function(){G.delay(D.buffer,E,F,Array.prototype.slice.call(arguments,0));};};var C=function(E,D,F,G){return function(){D.removeListener(F,G);return E.apply(G,arguments);};};var B=function(E,D,F){return function(){var G=Array.prototype.slice.call(arguments,0);setTimeout(function(){E.apply(F,G);},D.delay||10);};};Ext.util.Event=function(D,E){this.name=E;this.obj=D;this.listeners=[];};Ext.util.Event.prototype={addListener:function(D,E,F){E=E||this.obj;if(!this.isListening(D,E)){var G=this.createListener(D,E,F);if(!this.firing){this.listeners.push(G);}else{this.listeners=this.listeners.slice(0);this.listeners.push(G);}}},createListener:function(E,F,D){D=D||{};F=F||this.obj;var H={fn:E,scope:F,options:D};var G=E;if(D.delay){G=B(G,D,F);}if(D.single){G=C(G,this,E,F);}if(D.buffer){G=A(G,D,F);}H.fireFn=G;return H;},findListener:function(D,E){E=E||this.obj;var G=this.listeners;for(var F=0,I=G.length;F<I;F++){var H=G[F];if(H.fn==D&&H.scope==E){return F;}}return -1;},isListening:function(D,E){return this.findListener(D,E)!=-1;},removeListener:function(D,E){var F;if((F=this.findListener(D,E))!=-1){if(!this.firing){this.listeners.splice(F,1);}else{this.listeners=this.listeners.slice(0);this.listeners.splice(F,1);}return true;}return false;},clearListeners:function(){this.listeners=[];},fire:function(){var G=this.listeners,D,I=G.length;if(I>0){this.firing=true;var F=Array.prototype.slice.call(arguments,0);for(var E=0;E<I;E++){var H=G[E];if(H.fireFn.apply(H.scope||this.obj||window,arguments)===false){this.firing=false;return false;}}this.firing=false;}return true;}};})();Ext.EventManager=function(){var A,H,L=false;var K,B,Q,F;var I=Ext.lib.Event;var G=Ext.lib.Dom;var V="Ext";var O={};var J=function(d,X,W,b,c){var Z=Ext.id(d);if(!O[Z]){O[Z]={};}var a=O[Z];if(!a[X]){a[X]=[];}var Y=a[X];Y.push({id:Z,ename:X,fn:W,wrap:b,scope:c});I.on(d,X,b);if(X=="mousewheel"&&d.addEventListener){d.addEventListener("DOMMouseScroll",b,false);I.on(window,"unload",function(){d.removeEventListener("DOMMouseScroll",b,false);});}if(X=="mousedown"&&d==document){Ext.EventManager.stoppedMouseDownEvent.addListener(b);}};var P=function(b,Z,h,e){b=Ext.getDom(b);var d=Ext.id(b),g=O[d],c;if(g){var X=g[Z],a;if(X){for(var Y=0,W=X.length;Y<W;Y++){a=X[Y];if(a.fn==h&&(!e||a.scope==e)){c=a.wrap;I.un(b,Z,c);X.splice(Y,1);break;}}}}if(Z=="mousewheel"&&b.addEventListener&&c){b.removeEventListener("DOMMouseScroll",c,false);}if(Z=="mousedown"&&b==document&&c){Ext.EventManager.stoppedMouseDownEvent.removeListener(c);}};var S=function(X){X=Ext.getDom(X);var a=Ext.id(X),c=O[a],W;if(c){for(var Z in c){if(c.hasOwnProperty(Z)){W=c[Z];for(var b=0,Y=W.length;b<Y;b++){I.un(X,Z,W[b].wrap);W[b]=null;}}c[Z]=null;}delete O[a];}};var T=function(){if(!L){L=true;Ext.isReady=true;if(H){clearInterval(H);}if(Ext.isGecko||Ext.isOpera){document.removeEventListener("DOMContentLoaded",T,false);}if(Ext.isIE){var W=document.getElementById("ie-deferred-loader");if(W){W.onreadystatechange=null;W.parentNode.removeChild(W);}}if(A){A.fire();A.clearListeners();}}};var U=function(){A=new Ext.util.Event();if(Ext.isGecko||Ext.isOpera){document.addEventListener("DOMContentLoaded",T,false);}else{if(Ext.isIE){document.write('<script id="ie-deferred-loader" defer="defer" src="//:"><\/script>');var W=document.getElementById("ie-deferred-loader");W.onreadystatechange=function(){if(this.readyState=="complete"){T();}};}else{if(Ext.isSafari){H=setInterval(function(){var X=document.readyState;if(X=="complete"){T();}},10);}}}I.on(window,"load",T);};var C=function(W,Y){var X=new Ext.util.DelayedTask(W);return function(Z){Z=new Ext.EventObjectImpl(Z);X.delay(Y.buffer,W,null,[Z]);};};var E=function(X,Z,Y,a,W){return function(b){Ext.EventManager.removeListener(Z,Y,a,W);X(b);};};var R=function(X,W){return function(Y){Y=new Ext.EventObjectImpl(Y);setTimeout(function(){X(Y);},W.delay||10);};};var M=function(d,X,Y,b,c){var Z=(!Y||typeof Y=="boolean")?{}:Y;b=b||Z.fn;c=c||Z.scope;var W=Ext.getDom(d);if(!W){throw'Error listening for "'+X+'". Element "'+d+"\" doesn't exist.";}var a=function(e){if(!window[V]){return ;}e=Ext.EventObject.setEvent(e);var g;if(Z.delegate){g=e.getTarget(Z.delegate,W);if(!g){return ;}}else{g=e.target;}if(Z.stopEvent===true){e.stopEvent();}if(Z.preventDefault===true){e.preventDefault();}if(Z.stopPropagation===true){e.stopPropagation();}if(Z.normalized===false){e=e.browserEvent;}b.call(c||W,e,g,Z);};if(Z.delay){a=R(a,Z);}if(Z.single){a=E(a,W,X,b,c);}if(Z.buffer){a=C(a,Z);}J(W,X,b,a,c);return a;};var N=/^(?:scope|delay|buffer|single|stopEvent|preventDefault|stopPropagation|normalized|args|delegate)$/;var D={addListener:function(c,Y,X,a,W){if(typeof Y=="object"){var Z=Y;for(var b in Z){if(N.test(b)){continue;}if(typeof Z[b]=="function"){M(c,b,Z,Z[b],Z.scope);}else{M(c,b,Z[b]);}}return ;}return M(c,Y,W,X,a);},removeListener:function(W,X,Y,Z){return P(W,X,Y,Z);},removeAll:function(W){return S(W);},onDocumentReady:function(Y,W,X){if(L){A.addListener(Y,W,X);A.fire();A.clearListeners();return ;}if(!A){U();}X=X||{};if(!X.delay){X.delay=1;}A.addListener(Y,W,X);},doResizeEvent:function(){K.fire(G.getViewWidth(),G.getViewHeight());},onWindowResize:function(Y,W,X){if(!K){K=new Ext.util.Event();B=new Ext.util.DelayedTask(this.doResizeEvent);I.on(window,"resize",this.fireWindowResize,this);}K.addListener(Y,W,X);},fireWindowResize:function(){if(K){if((Ext.isIE||Ext.isAir)&&B){B.delay(50);}else{K.fire(G.getViewWidth(),G.getViewHeight());}}},onTextResize:function(Y,Z,X){if(!Q){Q=new Ext.util.Event();var W=new Ext.Element(document.createElement("div"));W.dom.className="x-text-resize";W.dom.innerHTML="X";W.appendTo(document.body);F=W.dom.offsetHeight;setInterval(function(){if(W.dom.offsetHeight!=F){Q.fire(F,F=W.dom.offsetHeight);}},this.textResizeInterval);}Q.addListener(Y,Z,X);},removeResizeListener:function(W,X){if(K){K.removeListener(W,X);}},fireResize:function(){if(K){K.fire(G.getViewWidth(),G.getViewHeight());}},ieDeferSrc:false,textResizeInterval:50};D.on=D.addListener;D.un=D.removeListener;D.stoppedMouseDownEvent=new Ext.util.Event();return D;}();Ext.onReady=Ext.EventManager.onDocumentReady;(function(){var A=function(){var D=document.body||document.getElementsByTagName("body")[0];if(!D){return false;}var B=[" ",Ext.isIE?"ext-ie "+(Ext.isIE6?"ext-ie6":(Ext.isIE7?"ext-ie7":"ext-ie8")):Ext.isGecko?"ext-gecko "+(Ext.isGecko2?"ext-gecko2":"ext-gecko3"):Ext.isOpera?"ext-opera":Ext.isSafari?"ext-safari":Ext.isChrome?"ext-chrome":""];if(Ext.isMac){B.push("ext-mac");}if(Ext.isLinux){B.push("ext-linux");}if(Ext.isBorderBox){B.push("ext-border-box");}if(Ext.isStrict){var C=D.parentNode;if(C){C.className+=" ext-strict";}}D.className+=B.join(" ");return true;};if(!A()){Ext.onReady(A);}})();Ext.EventObject=function(){var A=Ext.lib.Event;var B={3:13,63234:37,63235:39,63232:38,63233:40,63276:33,63277:34,63272:46,63273:36,63275:35};var C=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(D){if(D){this.setEvent(D.browserEvent||D);}};Ext.EventObjectImpl.prototype={browserEvent:null,button:-1,shiftKey:false,ctrlKey:false,altKey:false,BACKSPACE:8,TAB:9,NUM_CENTER:12,ENTER:13,RETURN:13,SHIFT:16,CTRL:17,CONTROL:17,ALT:18,PAUSE:19,CAPS_LOCK:20,ESC:27,SPACE:32,PAGE_UP:33,PAGEUP:33,PAGE_DOWN:34,PAGEDOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,PRINT_SCREEN:44,INSERT:45,DELETE:46,ZERO:48,ONE:49,TWO:50,THREE:51,FOUR:52,FIVE:53,SIX:54,SEVEN:55,EIGHT:56,NINE:57,A:65,B:66,C:67,D:68,E:69,F:70,G:71,H:72,I:73,J:74,K:75,L:76,M:77,N:78,O:79,P:80,Q:81,R:82,S:83,T:84,U:85,V:86,W:87,X:88,Y:89,Z:90,CONTEXT_MENU:93,NUM_ZERO:96,NUM_ONE:97,NUM_TWO:98,NUM_THREE:99,NUM_FOUR:100,NUM_FIVE:101,NUM_SIX:102,NUM_SEVEN:103,NUM_EIGHT:104,NUM_NINE:105,NUM_MULTIPLY:106,NUM_PLUS:107,NUM_MINUS:109,NUM_PERIOD:110,NUM_DIVISION:111,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,setEvent:function(D){if(D==this||(D&&D.browserEvent)){return D;}this.browserEvent=D;if(D){this.button=D.button?C[D.button]:(D.which?D.which-1:-1);if(D.type=="click"&&this.button==-1){this.button=0;}this.type=D.type;this.shiftKey=D.shiftKey;this.ctrlKey=D.ctrlKey||D.metaKey;this.altKey=D.altKey;this.keyCode=D.keyCode;this.charCode=D.charCode;this.target=A.getTarget(D);this.xy=A.getXY(D);}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);}A.stopEvent(this.browserEvent);}},preventDefault:function(){if(this.browserEvent){A.preventDefault(this.browserEvent);}},isNavKeyPress:function(){var D=this.keyCode;D=Ext.isSafari?(B[D]||D):D;return(D>=33&&D<=40)||D==this.RETURN||D==this.TAB||D==this.ESC;},isSpecialKey:function(){var D=this.keyCode;return(this.type=="keypress"&&this.ctrlKey)||D==9||D==13||D==40||D==27||(D==16)||(D==17)||(D>=18&&D<=20)||(D>=33&&D<=35)||(D>=36&&D<=39)||(D>=44&&D<=45);},stopPropagation:function(){if(this.browserEvent){if(this.browserEvent.type=="mousedown"){Ext.EventManager.stoppedMouseDownEvent.fire(this);}A.stopPropagation(this.browserEvent);}},getCharCode:function(){return this.charCode||this.keyCode;},getKey:function(){var D=this.keyCode||this.charCode;return Ext.isSafari?(B[D]||D):D;},getPageX:function(){return this.xy[0];},getPageY:function(){return this.xy[1];},getTime:function(){if(this.browserEvent){return A.getTime(this.browserEvent);}return null;},getXY:function(){return this.xy;},getTarget:function(E,D,F){return E?Ext.fly(this.target).findParent(E,D,F):(F?Ext.get(this.target):this.target);},getRelatedTarget:function(){if(this.browserEvent){return A.getRelatedTarget(this.browserEvent);}return null;},getWheelDelta:function(){var E=this.browserEvent;var D=0;if(E.wheelDelta){D=E.wheelDelta/120;}else{if(E.detail){D=-E.detail/3;}}return D;},hasModifier:function(){return((this.ctrlKey||this.altKey)||this.shiftKey)?true:false;},within:function(E,D,G){var F=this[D?"getRelatedTarget":"getTarget"]();return F&&((G?(F===Ext.getDom(E)):false)||Ext.fly(E).contains(F));},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){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,scope){Ext.EventManager.removeListener(this.dom,eventName,fn,scope||this);return this;},removeAllListeners:function(){Ext.EventManager.removeAll(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.isGecko2){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.addClass("x-masked-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.getWidth(),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","x-masked-relative"]);},isMasked:function(){return this._mask&&this._mask.isVisible();},createShim:function(){var el=document.createElement("iframe");el.frameBorder="0";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){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);Ext.removeNode(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){Ext.EventManager.removeAll(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.enableFx=true;Ext.Fx={slideIn:function(B,C){var A=this.getFxEl();C=C||{};A.queueFx(C,function(){B=B||"t";this.fixDisplay();var L=this.getFxRestore();var G=this.getBox();this.setSize(G);var J=this.fxWrap(L.pos,C,"hidden");var E=this.dom.style;E.visibility="visible";E.position="absolute";var K=function(){A.fxUnwrap(J,L.pos,C);E.width=L.width;E.height=L.height;A.afterFx(C);};var F,D={to:[G.x,G.y]},H={to:G.width},I={to:G.height};switch(B.toLowerCase()){case"t":J.setSize(G.width,0);E.left=E.bottom="0";F={height:I};break;case"l":J.setSize(0,G.height);E.right=E.top="0";F={width:H};break;case"r":J.setSize(0,G.height);J.setX(G.right);E.left=E.top="0";F={width:H,points:D};break;case"b":J.setSize(G.width,0);J.setY(G.bottom);E.left=E.top="0";F={height:I,points:D};break;case"tl":J.setSize(0,0);E.right=E.bottom="0";F={width:H,height:I};break;case"bl":J.setSize(0,0);J.setY(G.y+G.height);E.right=E.top="0";F={width:H,height:I,points:D};break;case"br":J.setSize(0,0);J.setXY([G.right,G.bottom]);E.left=E.top="0";F={width:H,height:I,points:D};break;case"tr":J.setSize(0,0);J.setX(G.x+G.width);E.left=E.bottom="0";F={width:H,height:I,points:D};break;}this.dom.style.visibility="visible";J.show();arguments.callee.anim=J.fxanim(F,C,"motion",0.5,"easeOut",K);});return this;},slideOut:function(B,C){var A=this.getFxEl();C=C||{};A.queueFx(C,function(){B=B||"t";var E=this.getFxRestore();var J=this.getBox();this.setSize(J);var G=this.fxWrap(E.pos,C,"visible");var H=this.dom.style;H.visibility="visible";H.position="absolute";G.setSize(J);var D=function(){if(C.useDisplay){A.setDisplayed(false);}else{A.hide();}A.fxUnwrap(G,E.pos,C);H.width=E.width;H.height=E.height;A.afterFx(C);};var I,F={to:0};switch(B.toLowerCase()){case"t":H.left=H.bottom="0";I={height:F};break;case"l":H.right=H.top="0";I={width:F};break;case"r":H.left=H.top="0";I={width:F,points:{to:[J.right,J.y]}};break;case"b":H.left=H.top="0";I={height:F,points:{to:[J.x,J.bottom]}};break;case"tl":H.right=H.bottom="0";I={width:F,height:F};break;case"bl":H.right=H.top="0";I={width:F,height:F,points:{to:[J.x,J.bottom]}};break;case"br":H.left=H.top="0";I={width:F,height:F,points:{to:[J.x+J.width,J.bottom]}};break;case"tr":H.left=H.bottom="0";I={width:F,height:F,points:{to:[J.right,J.y]}};break;}arguments.callee.anim=G.fxanim(I,C,"motion",0.5,"easeOut",D);});return this;},puff:function(A){var B=this.getFxEl();A=A||{};B.queueFx(A,function(){this.clearOpacity();this.show();var D=this.getFxRestore();var F=this.dom.style;var C=function(){if(A.useDisplay){B.setDisplayed(false);}else{B.hide();}B.clearOpacity();B.setPositioning(D.pos);F.width=D.width;F.height=D.height;F.fontSize="";B.afterFx(A);};var E=this.getWidth();var G=this.getHeight();arguments.callee.anim=this.fxanim({width:{to:this.adjustWidth(E*2)},height:{to:this.adjustHeight(G*2)},points:{by:[-(E*0.5),-(G*0.5)]},opacity:{to:0},fontSize:{to:200,unit:"%"}},A,"motion",0.5,"easeOut",C);});return this;},switchOff:function(A){var B=this.getFxEl();A=A||{};B.queueFx(A,function(){this.clearOpacity();this.clip();var D=this.getFxRestore();var E=this.dom.style;var C=function(){if(A.useDisplay){B.setDisplayed(false);}else{B.hide();}B.clearOpacity();B.setPositioning(D.pos);E.width=D.width;E.height=D.height;B.afterFx(A);};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]}},A,"motion",0.3,"easeIn",C);}).defer(100,this);});});return this;},highlight:function(B,C){var A=this.getFxEl();C=C||{};A.queueFx(C,function(){B=B||"ffff9c";var I=C.attr||"backgroundColor";this.clearOpacity();this.show();var F=this.getColor(I);var E=this.dom.style[I];var G=(C.endColor||F)||"ffffff";var D=function(){A.dom.style[I]=E;A.afterFx(C);};var H={};H[I]={from:B,to:G};arguments.callee.anim=this.fxanim(H,C,"color",1,"easeIn",D);});return this;},frame:function(B,D,C){var A=this.getFxEl();C=C||{};A.queueFx(C,function(){B=B||"#C3DAF9";if(B.length==6){B="#"+B;}D=D||1;var E=C.duration||1;this.show();var G=this.getBox();var F=function(){var I=Ext.getBody().createChild({style:{visbility:"hidden",position:"absolute","z-index":"35000",border:"0px solid "+B}});var H=Ext.isBorderBox?2:1;I.animate({top:{from:G.y,to:G.y-20},left:{from:G.x,to:G.x-20},borderWidth:{from:0,to:10},opacity:{from:1,to:0},height:{from:G.height,to:(G.height+(20*H))},width:{from:G.width,to:(G.width+(20*H))}},E,function(){I.remove();if(--D>0){F();}else{A.afterFx(C);}});};F.call(this);});return this;},pause:function(C){var B=this.getFxEl();var A={};B.queueFx(A,function(){setTimeout(function(){B.afterFx(A);},C*1000);});return this;},fadeIn:function(A){var B=this.getFxEl();A=A||{};B.queueFx(A,function(){this.setOpacity(0);this.fixDisplay();this.dom.style.visibility="visible";var C=A.endOpacity||1;arguments.callee.anim=this.fxanim({opacity:{to:C}},A,null,0.5,"easeOut",function(){if(C==1){this.clearOpacity();}B.afterFx(A);});});return this;},fadeOut:function(A){var B=this.getFxEl();A=A||{};B.queueFx(A,function(){var C=A.endOpacity||0;arguments.callee.anim=this.fxanim({opacity:{to:C}},A,null,0.5,"easeOut",function(){if(C===0){if(this.visibilityMode==Ext.Element.DISPLAY||A.useDisplay){this.dom.style.display="none";}else{this.dom.style.visibility="hidden";}this.clearOpacity();}B.afterFx(A);});});return this;},scale:function(B,A,C){this.shift(Ext.apply({},C,{width:B,height:A}));return this;},shift:function(A){var B=this.getFxEl();A=A||{};B.queueFx(A,function(){var F={},G=A.width,E=A.height,H=A.x,C=A.y,D=A.opacity;if(G!==undefined){F.width={to:this.adjustWidth(G)};}if(E!==undefined){F.height={to:this.adjustHeight(E)};}if(A.left!==undefined){F.left={to:A.left};}if(A.top!==undefined){F.top={to:A.top};}if(A.right!==undefined){F.right={to:A.right};}if(A.bottom!==undefined){F.bottom={to:A.bottom};}if(H!==undefined||C!==undefined){F.points={to:[H!==undefined?H:this.getX(),C!==undefined?C:this.getY()]};}if(D!==undefined){F.opacity={to:D};}if(A.xy!==undefined){F.points={to:A.xy};}arguments.callee.anim=this.fxanim(F,A,"motion",0.35,"easeOut",function(){B.afterFx(A);});});return this;},ghost:function(B,C){var A=this.getFxEl();C=C||{};A.queueFx(C,function(){B=B||"b";var F=this.getFxRestore();var I=this.getWidth(),G=this.getHeight();var H=this.dom.style;var D=function(){if(C.useDisplay){A.setDisplayed(false);}else{A.hide();}A.clearOpacity();A.setPositioning(F.pos);H.width=F.width;H.height=F.height;A.afterFx(C);};var J={opacity:{to:0},points:{}},E=J.points;switch(B.toLowerCase()){case"t":E.by=[0,-G];break;case"l":E.by=[-I,0];break;case"r":E.by=[I,0];break;case"b":E.by=[0,G];break;case"tl":E.by=[-I,-G];break;case"bl":E.by=[-I,G];break;case"br":E.by=[I,G];break;case"tr":E.by=[I,-G];break;}arguments.callee.anim=this.fxanim(J,C,"motion",0.5,"easeOut",D);});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 A=this.fxQueue[0];if(A){A.call(this);}},hasActiveFx:function(){return this.fxQueue&&this.fxQueue[0];},stopFx:function(){if(this.hasActiveFx()){var A=this.fxQueue[0];if(A&&A.anim&&A.anim.isAnimated()){this.fxQueue=[A];A.anim.stop(true);}}return this;},beforeFx:function(A){if(this.hasActiveFx()&&!A.concurrent){if(A.stopFx){this.stopFx();return true;}return false;}return true;},hasFxBlock:function(){var A=this.fxQueue;return A&&A[0]&&A[0].block;},queueFx:function(C,B){if(!this.fxQueue){this.fxQueue=[];}if(!this.hasFxBlock()){Ext.applyIf(C,this.fxDefaults);if(!C.concurrent){var A=this.beforeFx(C);B.block=C.block;this.fxQueue.push(B);if(A){this.nextFx();}}else{B.call(this);}}return this;},fxWrap:function(C,E,F){var A;if(!E.wrap||!(A=Ext.get(E.wrap))){var B;if(E.fixPosition){B=this.getXY();}var D=document.createElement("div");D.style.visibility=F;A=Ext.get(this.dom.parentNode.insertBefore(D,this.dom));A.setPositioning(C);if(A.getStyle("position")=="static"){A.position("relative");}this.clearPositioning("auto");A.clip();A.dom.appendChild(this.dom);if(B){A.setXY(B);}}return A;},fxUnwrap:function(B,C,A){this.clearPositioning();this.setPositioning(C);if(!A.wrap){B.dom.parentNode.insertBefore(this.dom,B.dom);B.remove();}},getFxRestore:function(){var A=this.dom.style;return{pos:this.getPositioning(),width:A.width,height:A.height};},afterFx:function(A){if(A.afterStyle){this.applyStyles(A.afterStyle);}if(A.afterCls){this.addClass(A.afterCls);}if(A.remove===true){this.remove();}Ext.callback(A.callback,A.scope,[this]);if(!A.concurrent){this.fxQueue.shift();this.nextFx();}},getFxEl:function(){return Ext.get(this.dom);},fxanim:function(F,E,A,D,G,B){A=A||"run";E=E||{};var C=Ext.lib.Anim[A](this.dom,F,(E.duration||D)||0.35,(E.easing||G)||"easeOut",function(){Ext.callback(B,this);},this);E.anim=C;return C;}};Ext.Fx.resize=Ext.Fx.scale;Ext.apply(Ext.Element.prototype,Ext.Fx);Ext.CompositeElement=function(A){this.elements=[];this.addElements(A);};Ext.CompositeElement.prototype={isComposite:true,addElements:function(C){if(!C){return this;}if(typeof C=="string"){C=Ext.Element.selectorFunction(C);}var D=this.elements;var A=D.length-1;for(var E=0,B=C.length;E<B;E++){D[++A]=Ext.get(C[E]);}return this;},fill:function(A){this.elements=[];this.add(A);return this;},filter:function(B){var A=[];this.each(function(C){if(C.is(B)){A[A.length]=C.dom;}});this.fill(A);return this;},invoke:function(C,A){var D=this.elements;for(var E=0,B=D.length;E<B;E++){Ext.Element.prototype[C].apply(D[E],A);}return this;},add:function(A){if(typeof A=="string"){this.addElements(Ext.Element.selectorFunction(A));}else{if(A.length!==undefined){this.addElements(A);}else{this.addElements([A]);}}return this;},each:function(C,D){var E=this.elements;for(var A=0,B=E.length;A<B;A++){if(C.call(D||E[A],E[A],this,A)===false){break;}}return this;},item:function(A){return this.elements[A]||null;},first:function(){return this.item(0);},last:function(){return this.item(this.elements.length-1);},getCount:function(){return this.elements.length;},contains:function(A){return this.indexOf(A)!==-1;},indexOf:function(A){return this.elements.indexOf(Ext.get(A));},removeElement:function(E,C){if(Ext.isArray(E)){for(var F=0,B=E.length;F<B;F++){this.removeElement(E[F]);}return this;}var A=typeof E=="number"?E:this.indexOf(E);if(A!==-1&&this.elements[A]){if(C){var D=this.elements[A];if(D.dom){D.remove();}else{Ext.removeNode(D);}}this.elements.splice(A,1);}return this;},replaceElement:function(C,D,B){var A=typeof C=="number"?C:this.indexOf(C);if(A!==-1){if(B){this.elements[A].replaceWith(D);}else{this.elements.splice(A,1,Ext.get(D));}}return this;},clear:function(){this.elements=[];}};(function(){Ext.CompositeElement.createCall=function(B,C){if(!B[C]){B[C]=function(){return this.invoke(C,arguments);};}};for(var A in Ext.Element.prototype){if(typeof Ext.Element.prototype[A]=="function"){Ext.CompositeElement.createCall(Ext.CompositeElement.prototype,A);}}})();Ext.CompositeElementLite=function(A){Ext.CompositeElementLite.superclass.constructor.call(this,A);this.el=new Ext.Element.Flyweight();};Ext.extend(Ext.CompositeElementLite,Ext.CompositeElement,{addElements:function(C){if(C){if(Ext.isArray(C)){this.elements=this.elements.concat(C);}else{var D=this.elements;var A=D.length-1;for(var E=0,B=C.length;E<B;E++){D[++A]=C[E];}}}return this;},invoke:function(C,A){var E=this.elements;var D=this.el;for(var F=0,B=E.length;F<B;F++){D.dom=E[F];Ext.Element.prototype[C].apply(D,A);}return this;},item:function(A){if(!this.elements[A]){return null;}this.el.dom=this.elements[A];return this.el;},addListener:function(A,C,D,E){var F=this.elements;for(var G=0,B=F.length;G<B;G++){Ext.EventManager.on(F[G],A,C,D||F[G],E);}return this;},each:function(C,D){var F=this.elements;var E=this.el;for(var A=0,B=F.length;A<B;A++){E.dom=F[A];if(C.call(D||E,E,this,A)===false){break;}}return this;},indexOf:function(A){return this.elements.indexOf(Ext.getDom(A));},replaceElement:function(D,E,B){var A=typeof D=="number"?D:this.indexOf(D);if(A!==-1){E=Ext.getDom(E);if(B){var C=this.elements[A];C.parentNode.insertBefore(E,C);Ext.removeNode(C);}this.elements.splice(A,1,E);}return this;}});Ext.CompositeElementLite.prototype.on=Ext.CompositeElementLite.prototype.addListener;if(Ext.DomQuery){Ext.Element.selectorFunction=Ext.DomQuery.select;}Ext.Element.select=function(B,C,A){var D;if(typeof B=="string"){D=Ext.Element.selectorFunction(B,A);}else{if(B.length!==undefined){D=B;}else{throw"Invalid selector";}}if(C===true){return new Ext.CompositeElement(D);}else{return new Ext.CompositeElementLite(D);}};Ext.select=Ext.Element.select;Ext.Updater=Ext.extend(Ext.util.Observable,{constructor:function(A,B){A=Ext.get(A);if(!B&&A.updateManager){return A.updateManager;}this.el=A;this.defaultUrl=null;this.addEvents("beforeupdate","update","failure");var C=Ext.Updater.defaults;this.sslBlankUrl=C.sslBlankUrl;this.disableCaching=C.disableCaching;this.indicatorText=C.indicatorText;this.showLoadIndicator=C.showLoadIndicator;this.timeout=C.timeout;this.loadScripts=C.loadScripts;this.transaction=null;this.refreshDelegate=this.refresh.createDelegate(this);this.updateDelegate=this.update.createDelegate(this);this.formUpdateDelegate=this.formUpdate.createDelegate(this);if(!this.renderer){this.renderer=this.getDefaultRenderer();}Ext.Updater.superclass.constructor.call(this);},getDefaultRenderer:function(){return new Ext.Updater.BasicRenderer();},getEl:function(){return this.el;},update:function(A,D,C,F){if(this.fireEvent("beforeupdate",this.el,A,D)!==false){var B,G;if(typeof A=="object"){B=A;A=B.url;D=D||B.params;C=C||B.callback;F=F||B.discardUrl;G=B.scope;if(typeof B.nocache!="undefined"){this.disableCaching=B.nocache;}if(typeof B.text!="undefined"){this.indicatorText='<div class="loading-indicator">'+B.text+"</div>";}if(typeof B.scripts!="undefined"){this.loadScripts=B.scripts;}if(typeof B.timeout!="undefined"){this.timeout=B.timeout;}}this.showLoading();if(!F){this.defaultUrl=A;}if(typeof A=="function"){A=A.call(this);}var E=Ext.apply({},{url:A,params:(typeof D=="function"&&G)?D.createDelegate(G):D,success:this.processSuccess,failure:this.processFailure,scope:this,callback:undefined,timeout:(this.timeout*1000),disableCaching:this.disableCaching,argument:{options:B,url:A,form:null,callback:C,scope:G||window,params:D}},B);this.transaction=Ext.Ajax.request(E);}},formUpdate:function(D,B,A,C){if(this.fireEvent("beforeupdate",this.el,D,B)!==false){if(typeof B=="function"){B=B.call(this);}D=Ext.getDom(D);this.transaction=Ext.Ajax.request({form:D,url:B,success:this.processSuccess,failure:this.processFailure,scope:this,timeout:(this.timeout*1000),argument:{url:B,form:D,callback:C,reset:A}});this.showLoading.defer(1,this);}},refresh:function(A){if(this.defaultUrl==null){return ;}this.update(this.defaultUrl,null,A,true);},startAutoRefresh:function(A,E,D,C,B){if(B){this.update(E||this.defaultUrl,D,C,true);}if(this.autoRefreshProcId){clearInterval(this.autoRefreshProcId);}this.autoRefreshProcId=setInterval(this.update.createDelegate(this,[E||this.defaultUrl,D,C,true]),A*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);}},processSuccess:function(B){this.transaction=null;if(B.argument.form&&B.argument.reset){try{B.argument.form.reset();}catch(A){}}if(this.loadScripts){this.renderer.render(this.el,B,this,this.updateComplete.createDelegate(this,[B]));}else{this.renderer.render(this.el,B,this);this.updateComplete(B);}},updateComplete:function(A){this.fireEvent("update",this.el,A);if(typeof A.argument.callback=="function"){A.argument.callback.call(A.argument.scope,this.el,true,A,A.argument.options);}},processFailure:function(A){this.transaction=null;this.fireEvent("failure",this.el,A);if(typeof A.argument.callback=="function"){A.argument.callback.call(A.argument.scope,this.el,false,A,A.argument.options);}},setRenderer:function(A){this.renderer=A;},getRenderer:function(){return this.renderer;},setDefaultUrl:function(A){this.defaultUrl=A;},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(D,E,C,A){var B=Ext.get(D).getUpdater();Ext.apply(B,A);B.update(E,C,A?A.callback:null);};Ext.Updater.BasicRenderer=function(){};Ext.Updater.BasicRenderer.prototype={render:function(D,B,A,C){D.update(B.responseText,A.loadScripts,C);}};Ext.UpdateManager=Ext.Updater;(function(){function xf(format){var args=Array.prototype.slice.call(arguments,1);return format.replace(/\{(\d+)\}/g,function(m,i){return args[i];});}Date.formatCodeToRegex=function(character,currentGroup){var p=Date.parseCodes[character];if(p){p=Ext.type(p)=="function"?p():p;Date.parseCodes[character]=p;}return p?Ext.applyIf({c:p.c?xf(p.c,currentGroup||"{0}"):p.c},p):{g:0,c:null,s:Ext.escapeRe(character)};};var $f=Date.formatCodeToRegex;Ext.apply(Date,{parseFunctions:{count:0},parseRegexes:[],formatFunctions:{count:0},daysInMonth:[31,28,31,30,31,30,31,31,30,31,30,31],y2kYear:50,MILLI:"ms",SECOND:"s",MINUTE:"mi",HOUR:"h",DAY:"d",MONTH:"mo",YEAR:"y",dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],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},getShortMonthName:function(month){return Date.monthNames[month].substring(0,3);},getShortDayName:function(day){return Date.dayNames[day].substring(0,3);},getMonthNumber:function(name){return Date.monthNumbers[name.substring(0,1).toUpperCase()+name.substring(1,3).toLowerCase()];},formatCodes:{d:"String.leftPad(this.getDate(), 2, '0')",D:"Date.getShortDayName(this.getDay())",j:"this.getDate()",l:"Date.dayNames[this.getDay()]",N:"(this.getDay() ? this.getDay() : 7)",S:"this.getSuffix()",w:"this.getDay()",z:"this.getDayOfYear()",W:"String.leftPad(this.getWeekOfYear(), 2, '0')",F:"Date.monthNames[this.getMonth()]",m:"String.leftPad(this.getMonth() + 1, 2, '0')",M:"Date.getShortMonthName(this.getMonth())",n:"(this.getMonth() + 1)",t:"this.getDaysInMonth()",L:"(this.isLeapYear() ? 1 : 0)",o:"(this.getFullYear() + (this.getWeekOfYear() == 1 && this.getMonth() > 0 ? +1 : (this.getWeekOfYear() >= 52 && this.getMonth() < 11 ? -1 : 0)))",Y:"this.getFullYear()",y:"('' + this.getFullYear()).substring(2, 4)",a:"(this.getHours() < 12 ? 'am' : 'pm')",A:"(this.getHours() < 12 ? 'AM' : 'PM')",g:"((this.getHours() % 12) ? this.getHours() % 12 : 12)",G:"this.getHours()",h:"String.leftPad((this.getHours() % 12) ? this.getHours() % 12 : 12, 2, '0')",H:"String.leftPad(this.getHours(), 2, '0')",i:"String.leftPad(this.getMinutes(), 2, '0')",s:"String.leftPad(this.getSeconds(), 2, '0')",u:"String.leftPad(this.getMilliseconds(), 3, '0')",O:"this.getGMTOffset()",P:"this.getGMTOffset(true)",T:"this.getTimezone()",Z:"(this.getTimezoneOffset() * -60)",c:function(){for(var c="Y-m-dTH:i:sP",code=[],i=0,l=c.length;i<l;++i){var e=c.charAt(i);code.push(e=="T"?"'T'":Date.getFormatCode(e));}return code.join(" + ");},U:"Math.round(this.getTime() / 1000)"},parseDate:function(input,format){var p=Date.parseFunctions;if(p[format]==null){Date.createParser(format);}var func=p[format];return Date[func](input);},getFormatCode:function(character){var f=Date.formatCodes[character];if(f){f=Ext.type(f)=="function"?f():f;Date.formatCodes[character]=f;}return f||("'"+String.escape(character)+"'");},createNewFormat:function(format){var funcName="format"+Date.formatFunctions.count++,code="Date.prototype."+funcName+" = function(){return ",special=false,ch="";Date.formatFunctions[format]=funcName;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)+";}");},createParser:function(){var code=["Date.{0} = function(input){","var y, m, d, h = 0, i = 0, s = 0, ms = 0, o, z, u, v;","input = String(input);","d = new Date();","y = d.getFullYear();","m = d.getMonth();","d = d.getDate();","var results = input.match(Date.parseRegexes[{1}]);","if(results && results.length > 0){","{2}","if(u){","v = new Date(u * 1000);","}else if (y >= 0 && m >= 0 && d > 0 && h >= 0 && i >= 0 && s >= 0 && ms >= 0){","v = new Date(y, m, d, h, i, s, ms);","}else if (y >= 0 && m >= 0 && d > 0 && h >= 0 && i >= 0 && s >= 0){","v = new Date(y, m, d, h, i, s);","}else if (y >= 0 && m >= 0 && d > 0 && h >= 0 && i >= 0){","v = new Date(y, m, d, h, i);","}else if (y >= 0 && m >= 0 && d > 0 && h >= 0){","v = new Date(y, m, d, h);","}else if (y >= 0 && m >= 0 && d > 0){","v = new Date(y, m, d);","}else if (y >= 0 && m >= 0){","v = new Date(y, m);","}else if (y >= 0){","v = new Date(y);","}","}","return (v && (z != null || o != null))? (Ext.type(z) == 'number' ? v.add(Date.SECOND, -v.getTimezoneOffset() * 60 - z) : v.add(Date.MINUTE, -v.getTimezoneOffset() + (sn == '+'? -1 : 1) * (hr * 60 + mn))) : v;","}"].join("\n");return function(format){var funcName="parse"+Date.parseFunctions.count++,regexNum=Date.parseRegexes.length,currentGroup=1,calc="",regex="",special=false,ch="";Date.parseFunctions[format]=funcName;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=$f(ch,currentGroup);currentGroup+=obj.g;regex+=obj.s;if(obj.g&&obj.c){calc+=obj.c;}}}}Date.parseRegexes[regexNum]=new RegExp("^"+regex+"$","i");eval(xf(code,funcName,regexNum,calc));};}(),parseCodes:{d:{g:1,c:"d = parseInt(results[{0}], 10);\n",s:"(\\d{2})"},j:{g:1,c:"d = parseInt(results[{0}], 10);\n",s:"(\\d{1,2})"},D:function(){for(var a=[],i=0;i<7;a.push(Date.getShortDayName(i)),++i){}return{g:0,c:null,s:"(?:"+a.join("|")+")"};},l:function(){return{g:0,c:null,s:"(?:"+Date.dayNames.join("|")+")"};},N:{g:0,c:null,s:"[1-7]"},S:{g:0,c:null,s:"(?:st|nd|rd|th)"},w:{g:0,c:null,s:"[0-6]"},z:{g:0,c:null,s:"(?:\\d{1,3})"},W:{g:0,c:null,s:"(?:\\d{2})"},F:function(){return{g:1,c:"m = parseInt(Date.getMonthNumber(results[{0}]), 10);\n",s:"("+Date.monthNames.join("|")+")"};},M:function(){for(var a=[],i=0;i<12;a.push(Date.getShortMonthName(i)),++i){}return Ext.applyIf({s:"("+a.join("|")+")"},$f("F"));},m:{g:1,c:"m = parseInt(results[{0}], 10) - 1;\n",s:"(\\d{2})"},n:{g:1,c:"m = parseInt(results[{0}], 10) - 1;\n",s:"(\\d{1,2})"},t:{g:0,c:null,s:"(?:\\d{2})"},L:{g:0,c:null,s:"(?:1|0)"},o:function(){return $f("Y");},Y:{g:1,c:"y = parseInt(results[{0}], 10);\n",s:"(\\d{4})"},y:{g:1,c:"var ty = parseInt(results[{0}], 10);\ny = ty > Date.y2kYear ? 1900 + ty : 2000 + ty;\n",s:"(\\d{1,2})"},a:{g:1,c:"if (results[{0}] == 'am') {\nif (h == 12) { h = 0; }\n} else { if (h < 12) { h += 12; }}",s:"(am|pm)"},A:{g:1,c:"if (results[{0}] == 'AM') {\nif (h == 12) { h = 0; }\n} else { if (h < 12) { h += 12; }}",s:"(AM|PM)"},g:function(){return $f("G");},G:{g:1,c:"h = parseInt(results[{0}], 10);\n",s:"(\\d{1,2})"},h:function(){return $f("H");},H:{g:1,c:"h = parseInt(results[{0}], 10);\n",s:"(\\d{2})"},i:{g:1,c:"i = parseInt(results[{0}], 10);\n",s:"(\\d{2})"},s:{g:1,c:"s = parseInt(results[{0}], 10);\n",s:"(\\d{2})"},u:{g:1,c:"ms = results[{0}]; ms = parseInt(ms, 10)/Math.pow(10, ms.length - 3);\n",s:"(\\d+)"},O:{g:1,c:["o = results[{0}];","var sn = o.substring(0,1);","var hr = o.substring(1,3)*1 + Math.floor(o.substring(3,5) / 60);","var mn = o.substring(3,5) % 60;","o = ((-12 <= (hr*60 + mn)/60) && ((hr*60 + mn)/60 <= 14))? (sn + String.leftPad(hr, 2, '0') + String.leftPad(mn, 2, '0')) : null;\n"].join("\n"),s:"([+-]\\d{4})"},P:{g:1,c:["o = results[{0}];","var sn = o.substring(0,1);","var hr = o.substring(1,3)*1 + Math.floor(o.substring(4,6) / 60);","var mn = o.substring(4,6) % 60;","o = ((-12 <= (hr*60 + mn)/60) && ((hr*60 + mn)/60 <= 14))? (sn + String.leftPad(hr, 2, '0') + String.leftPad(mn, 2, '0')) : null;\n"].join("\n"),s:"([+-]\\d{2}:\\d{2})"},T:{g:0,c:null,s:"[A-Z]{1,4}"},Z:{g:1,c:"z = results[{0}] * 1;\nz = (-43200 <= z && z <= 50400)? z : null;\n",s:"([+-]?\\d{1,5})"},c:function(){var calc=[],arr=[$f("Y",1),$f("m",2),$f("d",3),$f("h",4),$f("i",5),$f("s",6),{c:"ms = (results[7] || '.0').substring(1); ms = parseInt(ms, 10)/Math.pow(10, ms.length - 3);\n"},{c:["if(results[9] == 'Z'){","z = 0;","}else{",$f("P",9).c,"}"].join("\n")}];for(var i=0,l=arr.length;i<l;++i){calc.push(arr[i].c);}return{g:1,c:calc.join(""),s:arr[0].s+"-"+arr[1].s+"-"+arr[2].s+"T"+arr[3].s+":"+arr[4].s+":"+arr[5].s+"((.|,)\\d+)?(Z|([+-]\\d{2}:\\d{2}))"};},U:{g:1,c:"u = parseInt(results[{0}], 10);\n",s:"(-?\\d+)"}}});}());Ext.apply(Date.prototype,{dateFormat:function(A){if(Date.formatFunctions[A]==null){Date.createNewFormat(A);}var B=Date.formatFunctions[A];return this[B]();},getTimezone:function(){return this.toString().replace(/^.* (?:\((.*)\)|([A-Z]{1,4})(?:[\-+][0-9]{4})?(?: -?\d+)?)$/,"$1$2").replace(/[^A-Z]/g,"");},getGMTOffset:function(A){return(this.getTimezoneOffset()>0?"-":"+")+String.leftPad(Math.floor(Math.abs(this.getTimezoneOffset())/60),2,"0")+(A?":":"")+String.leftPad(Math.abs(this.getTimezoneOffset()%60),2,"0");},getDayOfYear:function(){var B=0;Date.daysInMonth[1]=this.isLeapYear()?29:28;for(var A=0;A<this.getMonth();++A){B+=Date.daysInMonth[A];}return B+this.getDate()-1;},getWeekOfYear:function(){var B=86400000,A=7*B;return function(){var D=Date.UTC(this.getFullYear(),this.getMonth(),this.getDate()+3)/B,E=Math.floor(D/7),C=new Date(E*A).getUTCFullYear();return E-Math.floor(Date.UTC(C,0,7)/A)+1;};}(),isLeapYear:function(){var A=this.getFullYear();return !!((A&3)==0&&(A%100||(A%400==0&&A)));},getFirstDayOfMonth:function(){var A=(this.getDay()-(this.getDate()-1))%7;return(A<0)?(A+7):A;},getLastDayOfMonth:function(){var A=(this.getDay()+(Date.daysInMonth[this.getMonth()]-this.getDate()))%7;return(A<0)?(A+7):A;},getFirstDateOfMonth:function(){return new Date(this.getFullYear(),this.getMonth(),1);},getLastDateOfMonth:function(){return new Date(this.getFullYear(),this.getMonth(),this.getDaysInMonth());},getDaysInMonth:function(){Date.daysInMonth[1]=this.isLeapYear()?29:28;return Date.daysInMonth[this.getMonth()];},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";}},clone:function(){return new Date(this.getTime());},clearTime:function(A){if(A){return this.clone().clearTime();}this.setHours(0);this.setMinutes(0);this.setSeconds(0);this.setMilliseconds(0);return this;},add:function(A,D){var C=this.clone();if(!A||D===0){return C;}switch(A.toLowerCase()){case Date.MILLI:C.setMilliseconds(this.getMilliseconds()+D);break;case Date.SECOND:C.setSeconds(this.getSeconds()+D);break;case Date.MINUTE:C.setMinutes(this.getMinutes()+D);break;case Date.HOUR:C.setHours(this.getHours()+D);break;case Date.DAY:C.setDate(this.getDate()+D);break;case Date.MONTH:var B=this.getDate();if(B>28){B=Math.min(B,this.getFirstDateOfMonth().add("mo",D).getLastDateOfMonth().getDate());}C.setDate(B);C.setMonth(this.getMonth()+D);break;case Date.YEAR:C.setFullYear(this.getFullYear()+D);break;}return C;},between:function(C,B){var A=this.getTime();return C.getTime()<=A&&A<=B.getTime();}});Date.prototype.format=Date.prototype.dateFormat;if(Ext.isSafari){Date.brokenSetMonth=Date.prototype.setMonth;Date.prototype.setMonth=function(B){if(B<=-1){var C=Math.ceil(-B);var D=Math.ceil(C/12);var A=(C%12)?12-C%12:0;this.setFullYear(this.getFullYear()-D);return Date.brokenSetMonth.call(this,A);}else{return Date.brokenSetMonth.apply(this,arguments);}};}Ext.util.DelayedTask=function(E,F,B){var C=null,D,A;var G=function(){var H=new Date().getTime();if(H-A>=D){clearInterval(C);C=null;E.apply(F,B||[]);}};this.delay=function(J,H,I,K){if(C&&J!=D){this.cancel();}D=J;A=new Date().getTime();E=H||E;F=I||F;B=K||B;if(!C){C=setInterval(G,D);}};this.cancel=function(){if(C){clearInterval(C);C=null;}};};Ext.util.MixedCollection=function(A,B){this.items=[];this.map={};this.keys=[];this.length=0;this.addEvents("clear","add","replace","remove","sort");this.allowFunctions=A===true;if(B){this.getKey=B;}Ext.util.MixedCollection.superclass.constructor.call(this);};Ext.extend(Ext.util.MixedCollection,Ext.util.Observable,{allowFunctions:false,add:function(A,C){if(arguments.length==1){C=arguments[0];A=this.getKey(C);}if(typeof A=="undefined"||A===null){this.length++;this.items.push(C);this.keys.push(null);}else{var B=this.map[A];if(B){return this.replace(A,C);}this.length++;this.items.push(C);this.map[A]=C;this.keys.push(A);}this.fireEvent("add",this.length-1,C,A);return C;},getKey:function(A){return A.id;},replace:function(D,C){if(arguments.length==1){C=arguments[0];D=this.getKey(C);}var B=this.item(D);if(typeof D=="undefined"||D===null||typeof B=="undefined"){return this.add(D,C);}var A=this.indexOfKey(D);this.items[A]=C;this.map[D]=C;this.fireEvent("replace",D,B,C);return C;},addAll:function(C){if(arguments.length>1||Ext.isArray(C)){var A=arguments.length>1?arguments:C;for(var D=0,B=A.length;D<B;D++){this.add(A[D]);}}else{for(var E in C){if(this.allowFunctions||typeof C[E]!="function"){this.add(E,C[E]);}}}},each:function(C,D){var A=[].concat(this.items);for(var E=0,B=A.length;E<B;E++){if(C.call(D||A[E],A[E],E,B)===false){break;}}},eachKey:function(C,D){for(var A=0,B=this.keys.length;A<B;A++){C.call(D||window,this.keys[A],this.items[A],A,B);}},find:function(C,D){for(var A=0,B=this.items.length;A<B;A++){if(C.call(D||window,this.items[A],this.keys[A])){return this.items[A];}}return null;},insert:function(B,A,C){if(arguments.length==2){C=arguments[1];A=this.getKey(C);}if(B>=this.length){return this.add(A,C);}this.length++;this.items.splice(B,0,C);if(typeof A!="undefined"&&A!=null){this.map[A]=C;}this.keys.splice(B,0,A);this.fireEvent("add",B,C,A);return C;},remove:function(A){return this.removeAt(this.indexOf(A));},removeAt:function(B){if(B<this.length&&B>=0){this.length--;var C=this.items[B];this.items.splice(B,1);var A=this.keys[B];if(typeof A!="undefined"){delete this.map[A];}this.keys.splice(B,1);this.fireEvent("remove",C,A);return C;}return false;},removeKey:function(A){return this.removeAt(this.indexOfKey(A));},getCount:function(){return this.length;},indexOf:function(A){return this.items.indexOf(A);},indexOfKey:function(A){return this.keys.indexOf(A);},item:function(B){var A=typeof this.map[B]!="undefined"?this.map[B]:this.items[B];return typeof A!="function"||this.allowFunctions?A:null;},itemAt:function(A){return this.items[A];},key:function(A){return this.map[A];},contains:function(A){return this.indexOf(A)!=-1;},containsKey:function(A){return typeof this.map[A]!="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(A,I,B){var G=String(I).toUpperCase()=="DESC"?-1:1;B=B||function(J,K){return J-K;};var C=[],H=this.keys,D=this.items;for(var F=0,E=D.length;F<E;F++){C[C.length]={key:H[F],value:D[F],index:F};}C.sort(function(K,L){var J=B(K[A],L[A])*G;if(J==0){J=(K.index<L.index?-1:1);}return J;});for(var F=0,E=C.length;F<E;F++){D[F]=C[F].value;H[F]=C[F].key;}this.fireEvent("sort",this);},sort:function(B,A){this._sort("value",B,A);},keySort:function(B,A){this._sort("key",B,A||function(E,F){var C=String(E).toUpperCase(),D=String(F).toUpperCase();return C>D?1:(C<D?-1:0);});},getRange:function(C,B){var A=this.items;if(A.length<1){return[];}C=C||0;B=Math.min(typeof B=="undefined"?this.length-1:B,this.length-1);var D=[];if(C<=B){for(var E=C;E<=B;E++){D[D.length]=A[E];}}else{for(var E=C;E>=B;E--){D[D.length]=A[E];}}return D;},filter:function(D,A,C,B){if(Ext.isEmpty(A,false)){return this.clone();}A=this.createValueMatcher(A,C,B);return this.filterBy(function(E){return E&&A.test(E[D]);});},filterBy:function(D,E){var C=new Ext.util.MixedCollection();C.getKey=this.getKey;var A=this.keys,F=this.items;for(var G=0,B=F.length;G<B;G++){if(D.call(E||this,F[G],A[G])){C.add(A[G],F[G]);}}return C;},findIndex:function(E,A,C,D,B){if(Ext.isEmpty(A,false)){return -1;}A=this.createValueMatcher(A,D,B);return this.findIndexBy(function(F){return F&&A.test(F[E]);},null,C);},findIndexBy:function(D,E,C){var A=this.keys,F=this.items;for(var G=(C||0),B=F.length;G<B;G++){if(D.call(E||this,F[G],A[G])){return G;}}if(typeof C=="number"&&C>0){for(var G=0;G<C;G++){if(D.call(E||this,F[G],A[G])){return G;}}}return -1;},createValueMatcher:function(A,C,B){if(!A.exec){A=String(A);A=new RegExp((C===true?"":"^")+Ext.escapeRe(A),B?"":"i");}return A;},clone:function(){var C=new Ext.util.MixedCollection();var A=this.keys,D=this.items;for(var E=0,B=D.length;E<B;E++){C.add(A[E],D[E]);}C.getKey=this.getKey;return C;}});Ext.util.MixedCollection.prototype.get=Ext.util.MixedCollection.prototype.item;Ext.util.ClickRepeater=function(A,B){this.el=Ext.get(A);this.el.unselectable();Ext.apply(this,B);this.addEvents("mousedown","click","mouseup");this.el.on("mousedown",this.handleMouseDown,this);if(this.preventDefault||this.stopDefault){this.el.on("click",function(C){if(this.preventDefault){C.preventDefault();}if(this.stopDefault){C.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,destroy:function(){Ext.destroy(this.el);this.purgeListeners();},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(D,A,B,C){return(D==C)?A+B:B*(-Math.pow(2,-10*D/C)+1)+A;},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,this);if(this.pressClass){this.el.addClass(this.pressClass);}this.click();},handleMouseUp:function(){clearTimeout(this.timer);this.el.un("mouseover",this.handleMouseReturn,this);this.el.un("mouseout",this.handleMouseOut,this);Ext.getDoc().un("mouseup",this.handleMouseUp,this);this.el.removeClass(this.pressClass);this.fireEvent("mouseup",this);}});Ext.KeyNav=function(A,B){this.el=Ext.get(A);Ext.apply(this,B);if(!this.disabled){this.disabled=true;this.enable();}};Ext.KeyNav.prototype={disabled:false,defaultEventAction:"stopEvent",forceKeyDown:false,prepareEvent:function(C){var B=C.getKey();var A=this.keyToHandler[B];if(Ext.isSafari2&&A&&B>=37&&B<=40){C.stopEvent();}},relay:function(C){var B=C.getKey();var A=this.keyToHandler[B];if(A&&this[A]){if(this.doRelay(C,this[A],A)!==true){C[this.defaultEventAction]();}}},doRelay:function(C,A,B){return A.call(this.scope||this,C);},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.isSafari3||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.isSafari3||Ext.isAir){this.el.un("keydown",this.relay,this);}else{this.el.un("keydown",this.prepareEvent,this);this.el.un("keypress",this.relay,this);}this.disabled=true;}}};Ext.KeyMap=function(C,A,B){this.el=Ext.get(C);this.eventName=B||"keydown";this.bindings=[];if(A){this.addBinding(A);}this.enable();};Ext.KeyMap.prototype={stopEvent:false,addBinding:function(K){if(Ext.isArray(K)){for(var I=0,G=K.length;I<G;I++){this.addBinding(K[I]);}return ;}var A=K.key,L=K.shift,N=K.ctrl,H=K.alt,E=K.fn||K.handler,B=K.scope;if(K.stopEvent){this.stopEvent=K.stopEvent;}if(typeof A=="string"){var D=[];var F=A.toUpperCase();for(var J=0,G=F.length;J<G;J++){D.push(F.charCodeAt(J));}A=D;}var M=Ext.isArray(A);var C=function(P){if((!L||P.shiftKey)&&(!N||P.ctrlKey)&&(!H||P.altKey)){var R=P.getKey();if(M){for(var Q=0,O=A.length;Q<O;Q++){if(A[Q]==R){if(this.stopEvent){P.stopEvent();}E.call(B||window,R,P);return ;}}}else{if(R==A){if(this.stopEvent){P.stopEvent();}E.call(B||window,R,P);}}}};this.bindings.push(C);},on:function(A,F,G){var C,B,E,D;if(typeof A=="object"&&!Ext.isArray(A)){C=A.key;B=A.shift;E=A.ctrl;D=A.alt;}else{C=A;}this.addBinding({key:C,shift:B,ctrl:E,alt:D,fn:F,scope:G});},handleKeyDown:function(B){if(this.enabled){var D=this.bindings;for(var C=0,A=D.length;C<A;C++){D[C].call(this,B);}}},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 A;return{measure:function(B,D,C){if(!A){A=Ext.util.TextMetrics.Instance(B,C);}A.bind(B);A.setFixedWidth(C||"auto");return A.getSize(D);},createInstance:function(B,C){return Ext.util.TextMetrics.Instance(B,C);}};}();Ext.util.TextMetrics.Instance=function(A,C){var D=new Ext.Element(document.createElement("div"));document.body.appendChild(D.dom);D.position("absolute");D.setLeftTop(-1000,-1000);D.hide();if(C){D.setWidth(C);}var B={getSize:function(E){D.update(E);var F=D.getSize();D.update("");return F;},bind:function(E){D.setStyle(Ext.fly(E).getStyles("font-size","font-style","font-weight","font-family","line-height","text-transform","letter-spacing"));},setFixedWidth:function(E){D.setWidth(E);},getWidth:function(E){D.dom.style.width="auto";return this.getSize(E).width;},getHeight:function(E){return this.getSize(E).height;}};B.bind(A);return B;};Ext.Element.measureText=Ext.util.TextMetrics.measure;(function(){var B=Ext.EventManager;var A=Ext.lib.Dom;Ext.dd.DragDrop=function(C,E,D){if(C){this.init(C,E,D);}};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;},moveOnly:false,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(D,C){},startDrag:function(D,C){},b4Drag:function(C){},onDrag:function(C){},onDragEnter:function(D,C){},b4DragOver:function(C){},onDragOver:function(D,C){},b4DragOut:function(C){},onDragOut:function(D,C){},b4DragDrop:function(C){},onDragDrop:function(D,C){},onInvalidDrop:function(C){},b4EndDrag:function(C){},endDrag:function(C){},b4MouseDown:function(C){},onMouseDown:function(C){},onMouseUp:function(C){},onAvailable:function(){},defaultPadding:{left:0,right:0,top:0,bottom:0},constrainTo:function(H,J,C){if(typeof J=="number"){J={left:J,right:J,top:J,bottom:J};}J=J||this.defaultPadding;var F=Ext.get(this.getEl()).getBox();var M=Ext.get(H);var D=M.getScroll();var G,L=M.dom;if(L==document.body){G={x:D.left,y:D.top,width:Ext.lib.Dom.getViewWidth(),height:Ext.lib.Dom.getViewHeight()};}else{var E=M.getXY();G={x:E[0]+D.left,y:E[1]+D.top,width:L.clientWidth,height:L.clientHeight};}var I=F.y-G.y;var K=F.x-G.x;this.resetConstraints();this.setXConstraint(K-(J.left||0),G.width-K-F.width-(J.right||0),this.xTickSize);this.setYConstraint(I-(J.top||0),G.height-I-F.height-(J.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(C,E,D){this.initTarget(C,E,D);B.on(this.id,"mousedown",this.handleMouseDown,this);},initTarget:function(C,E,D){this.config=D||{};this.DDM=Ext.dd.DDM;this.groups={};if(typeof C!=="string"){C=Ext.id(C);}this.id=C;this.addToGroup((E)?E:"default");this.handleElId=C;this.setDragElId(C);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(D,F,C,E){if(!F&&0!==F){this.padding=[D,D,D,D];}else{if(!C&&0!==C){this.padding=[D,F,D,F];}else{this.padding=[D,F,C,E];}}},setInitPosition:function(E,F){var D=this.getEl();if(!this.DDM.verifyEl(D)){return ;}var G=E||0;var H=F||0;var C=A.getXY(D);this.initPageX=C[0]-G;this.initPageY=C[1]-H;this.lastPageX=C[0];this.lastPageY=C[1];this.setStartPosition(C);},setStartPosition:function(C){var D=C||A.getXY(this.getEl());this.deltaSetXY=null;this.startPageX=D[0];this.startPageY=D[1];},addToGroup:function(C){this.groups[C]=true;this.DDM.regDragDrop(this,C);},removeFromGroup:function(C){if(this.groups[C]){delete this.groups[C];}this.DDM.removeDDFromGroup(this,C);},setDragElId:function(C){this.dragElId=C;},setHandleElId:function(C){if(typeof C!=="string"){C=Ext.id(C);}this.handleElId=C;this.DDM.regHandle(this.id,C);},setOuterHandleElId:function(C){if(typeof C!=="string"){C=Ext.id(C);}B.on(C,"mousedown",this.handleMouseDown,this);this.setHandleElId(C);this.hasOuterHandles=true;},unreg:function(){B.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(C,D){if(this.primaryButtonOnly&&C.button!=0){return ;}if(this.isLocked()){return ;}this.DDM.refreshCache(this.groups);var E=new Ext.lib.Point(Ext.lib.Event.getPageX(C),Ext.lib.Event.getPageY(C));if(!this.hasOuterHandles&&!this.DDM.isOverTarget(E,this)){}else{if(this.clickValidator(C)){this.setStartPosition();this.b4MouseDown(C);this.onMouseDown(C);this.DDM.handleMouseDown(C,this);this.DDM.stopEvent(C);}else{}}},clickValidator:function(C){var D=C.getTarget();return(this.isValidHandleChild(D)&&(this.id==this.handleElId||this.DDM.handleWasClicked(D,this.id)));},addInvalidHandleType:function(D){var C=D.toUpperCase();this.invalidHandleTypes[C]=C;},addInvalidHandleId:function(C){if(typeof C!=="string"){C=Ext.id(C);}this.invalidHandleIds[C]=C;},addInvalidHandleClass:function(C){this.invalidHandleClasses.push(C);},removeInvalidHandleType:function(D){var C=D.toUpperCase();delete this.invalidHandleTypes[C];},removeInvalidHandleId:function(C){if(typeof C!=="string"){C=Ext.id(C);}delete this.invalidHandleIds[C];},removeInvalidHandleClass:function(D){for(var C=0,E=this.invalidHandleClasses.length;C<E;++C){if(this.invalidHandleClasses[C]==D){delete this.invalidHandleClasses[C];}}},isValidHandleChild:function(E){var F=true;var C;try{C=E.nodeName.toUpperCase();}catch(D){C=E.nodeName;}F=F&&!this.invalidHandleTypes[C];F=F&&!this.invalidHandleIds[E.id];for(var G=0,H=this.invalidHandleClasses.length;F&&G<H;++G){F=!Ext.fly(E).hasClass(this.invalidHandleClasses[G]);}return F;},setXTicks:function(C,F){this.xTicks=[];this.xTickSize=F;var D={};for(var E=this.initPageX;E>=this.minX;E=E-F){if(!D[E]){this.xTicks[this.xTicks.length]=E;D[E]=true;}}for(E=this.initPageX;E<=this.maxX;E=E+F){if(!D[E]){this.xTicks[this.xTicks.length]=E;D[E]=true;}}this.xTicks.sort(this.DDM.numericSort);},setYTicks:function(C,F){this.yTicks=[];this.yTickSize=F;var D={};for(var E=this.initPageY;E>=this.minY;E=E-F){if(!D[E]){this.yTicks[this.yTicks.length]=E;D[E]=true;}}for(E=this.initPageY;E<=this.maxY;E=E+F){if(!D[E]){this.yTicks[this.yTicks.length]=E;D[E]=true;}}this.yTicks.sort(this.DDM.numericSort);},setXConstraint:function(C,D,E){this.leftConstraint=C;this.rightConstraint=D;this.minX=this.initPageX-C;this.maxX=this.initPageX+D;if(E){this.setXTicks(this.initPageX,E);}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(E,C,D){this.topConstraint=E;this.bottomConstraint=C;this.minY=this.initPageY-E;this.maxY=this.initPageY+C;if(D){this.setYTicks(this.initPageY,D);}this.constrainY=true;},resetConstraints:function(){if(this.initPageX||this.initPageX===0){var C=(this.maintainOffset)?this.lastPageX-this.initPageX:0;var D=(this.maintainOffset)?this.lastPageY-this.initPageY:0;this.setInitPosition(C,D);}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(C,F){if(!F){return C;}else{if(F[0]>=C){return F[0];}else{for(var H=0,I=F.length;H<I;++H){var G=H+1;if(F[G]&&F[G]>=C){var D=C-F[H];var E=F[G]-C;return(E>D)?F[H]:F[G];}}return F[F.length-1];}}},toString:function(){return("DragDrop "+this.id);}};})();if(!Ext.dd.DragDropMgr){Ext.dd.DragDropMgr=function(){var A=Ext.EventManager;return{ids:{},handleIds:{},dragCurrent:null,dragOvers:{},deltaX:0,deltaY:0,preventDefault:true,stopPropagation:true,initialized:false,locked:false,init:function(){this.initialized=true;},POINT:0,INTERSECT:1,mode:0,_execOnAll:function(E,F){for(var D in this.ids){for(var B in this.ids[D]){var C=this.ids[D][B];if(!this.isTypeOfDD(C)){continue;}C[E].apply(C,F);}}},_onLoad:function(){this.init();A.on(document,"mouseup",this.handleMouseUp,this,true);A.on(document,"mousemove",this.handleMouseMove,this,true);A.on(window,"unload",this._onUnload,this,true);A.on(window,"resize",this._onResize,this,true);},_onResize:function(B){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(C,B){if(!this.initialized){this.init();}if(!this.ids[B]){this.ids[B]={};}this.ids[B][C.id]=C;},removeDDFromGroup:function(C,B){if(!this.ids[B]){this.ids[B]={};}var D=this.ids[B];if(D&&D[C.id]){delete D[C.id];}},_remove:function(C){for(var B in C.groups){if(B&&this.ids[B]&&this.ids[B][C.id]){delete this.ids[B][C.id];}}delete this.handleIds[C.id];},regHandle:function(C,B){if(!this.handleIds[C]){this.handleIds[C]={};}this.handleIds[C][B]=B;},isDragDrop:function(B){return(this.getDDById(B))?true:false;},getRelated:function(C,F){var D=[];for(var E in C.groups){for(j in this.ids[E]){var B=this.ids[E][j];if(!this.isTypeOfDD(B)){continue;}if(!F||B.isTarget){D[D.length]=B;}}}return D;},isLegalTarget:function(C,D){var F=this.getRelated(C,true);for(var E=0,B=F.length;E<B;++E){if(F[E].id==D.id){return true;}}return false;},isTypeOfDD:function(B){return(B&&B.__ygDragDrop);},isHandle:function(C,B){return(this.handleIds[C]&&this.handleIds[C][B]);},getDDById:function(C){for(var B in this.ids){if(this.ids[B][C]){return this.ids[B][C];}}return null;},handleMouseDown:function(C,D){if(Ext.QuickTips){Ext.QuickTips.disable();}if(this.dragCurrent){this.handleMouseUp(C);}this.currentTarget=C.getTarget();this.dragCurrent=D;var B=D.getEl();this.startX=C.getPageX();this.startY=C.getPageY();this.deltaX=this.startX-B.offsetLeft;this.deltaY=this.startY-B.offsetTop;this.dragThreshMet=false;this.clickTimeout=setTimeout(function(){var E=Ext.dd.DDM;E.startDrag(E.startX,E.startY);},this.clickTimeThresh);},startDrag:function(B,C){clearTimeout(this.clickTimeout);if(this.dragCurrent){this.dragCurrent.b4StartDrag(B,C);this.dragCurrent.startDrag(B,C);}this.dragThreshMet=true;},handleMouseUp:function(B){if(Ext.QuickTips){Ext.QuickTips.enable();}if(!this.dragCurrent){return ;}clearTimeout(this.clickTimeout);if(this.dragThreshMet){this.fireEvents(B,true);}else{}this.stopDrag(B);this.stopEvent(B);},stopEvent:function(B){if(this.stopPropagation){B.stopPropagation();}if(this.preventDefault){B.preventDefault();}},stopDrag:function(B){if(this.dragCurrent){if(this.dragThreshMet){this.dragCurrent.b4EndDrag(B);this.dragCurrent.endDrag(B);}this.dragCurrent.onMouseUp(B);}this.dragCurrent=null;this.dragOvers={};},handleMouseMove:function(C){if(!this.dragCurrent){return true;}if(Ext.isIE&&(C.button!==0&&C.button!==1&&C.button!==2)){this.stopEvent(C);return this.handleMouseUp(C);}if(!this.dragThreshMet){var D=Math.abs(this.startX-C.getPageX());var B=Math.abs(this.startY-C.getPageY());if(D>this.clickPixelThresh||B>this.clickPixelThresh){this.startDrag(this.startX,this.startY);}}if(this.dragThreshMet){this.dragCurrent.b4Drag(C);this.dragCurrent.onDrag(C);if(!this.dragCurrent.moveOnly){this.fireEvents(C,false);}}this.stopEvent(C);return true;},fireEvents:function(F,E){var C=this.dragCurrent;if(!C||C.isLocked()){return ;}var B=F.getPoint();var O=[];var L=[];var H=[];var J=[];var M=[];for(var K in this.dragOvers){var N=this.dragOvers[K];if(!this.isTypeOfDD(N)){continue;}if(!this.isOverTarget(B,N,this.mode)){L.push(N);}O[K]=true;delete this.dragOvers[K];}for(var D in C.groups){if("string"!=typeof D){continue;}for(K in this.ids[D]){var I=this.ids[D][K];if(!this.isTypeOfDD(I)){continue;}if(I.isTarget&&!I.isLocked()&&I!=C){if(this.isOverTarget(B,I,this.mode)){if(E){J.push(I);}else{if(!O[I.id]){M.push(I);}else{H.push(I);}this.dragOvers[I.id]=I;}}}}}if(this.mode){if(L.length){C.b4DragOut(F,L);C.onDragOut(F,L);}if(M.length){C.onDragEnter(F,M);}if(H.length){C.b4DragOver(F,H);C.onDragOver(F,H);}if(J.length){C.b4DragDrop(F,J);C.onDragDrop(F,J);}}else{var G=0;for(K=0,G=L.length;K<G;++K){C.b4DragOut(F,L[K].id);C.onDragOut(F,L[K].id);}for(K=0,G=M.length;K<G;++K){C.onDragEnter(F,M[K].id);}for(K=0,G=H.length;K<G;++K){C.b4DragOver(F,H[K].id);C.onDragOver(F,H[K].id);}for(K=0,G=J.length;K<G;++K){C.b4DragDrop(F,J[K].id);C.onDragDrop(F,J[K].id);}}if(E&&!J.length){C.onInvalidDrop(F);}},getBestMatch:function(E){var C=null;var F=E.length;if(F==1){C=E[0];}else{for(var D=0;D<F;++D){var B=E[D];if(B.cursorIsOver){C=B;break;}else{if(!C||C.overlap.getArea()<B.overlap.getArea()){C=B;}}}}return C;},refreshCache:function(F){for(var B in F){if("string"!=typeof B){continue;}for(var E in this.ids[B]){var D=this.ids[B][E];if(this.isTypeOfDD(D)){var C=this.getLocation(D);if(C){this.locationCache[D.id]=C;}else{delete this.locationCache[D.id];}}}}},verifyEl:function(D){if(D){var B;if(Ext.isIE){try{B=D.offsetParent;}catch(C){}}else{B=D.offsetParent;}if(B){return true;}}return false;},getLocation:function(H){if(!this.isTypeOfDD(H)){return null;}var J=H.getEl(),E,K,L,C,D,B,M,F,I;try{E=Ext.lib.Dom.getXY(J);}catch(G){}if(!E){return null;}K=E[0];L=K+J.offsetWidth;C=E[1];D=C+J.offsetHeight;B=C-H.padding[0];M=L+H.padding[1];F=D+H.padding[2];I=K-H.padding[3];return new Ext.lib.Region(B,M,F,I);},isOverTarget:function(B,J,H){var F=this.locationCache[J.id];if(!F||!this.useCache){F=this.getLocation(J);this.locationCache[J.id]=F;}if(!F){return false;}J.cursorIsOver=F.contains(B);var C=this.dragCurrent;if(!C||!C.getTargetCoord||(!H&&!C.constrainX&&!C.constrainY)){return J.cursorIsOver;}J.overlap=null;var E=C.getTargetCoord(B.x,B.y);var I=C.getDragEl();var G=new Ext.lib.Region(E.y,E.x+I.offsetWidth,E.y+I.offsetHeight,E.x);var D=G.intersect(F);if(D){J.overlap=D;return(H)?true:J.cursorIsOver;}else{return false;}},_onUnload:function(C,B){Ext.dd.DragDropMgr.unregAll();},unregAll:function(){if(this.dragCurrent){this.stopDrag();this.dragCurrent=null;}this._execOnAll("unreg",[]);for(var B in this.elementCache){delete this.elementCache[B];}this.elementCache={};this.ids={};},elementCache:{},getElWrapper:function(C){var B=this.elementCache[C];if(!B||!B.el){B=this.elementCache[C]=new this.ElementWrapper(Ext.getDom(C));}return B;},getElement:function(B){return Ext.getDom(B);},getCss:function(C){var B=Ext.getDom(C);return(B)?B.style:null;},ElementWrapper:function(B){this.el=B||null;this.id=this.el&&B.id;this.css=this.el&&B.style;},getPosX:function(B){return Ext.lib.Dom.getX(B);},getPosY:function(B){return Ext.lib.Dom.getY(B);},swapNode:function(D,B){if(D.swapNode){D.swapNode(B);}else{var C=B.parentNode;var E=B.nextSibling;if(E==D){C.insertBefore(D,B);}else{if(B==D.nextSibling){C.insertBefore(B,D);}else{D.parentNode.replaceChild(B,D);C.insertBefore(D,E);}}}},getScroll:function(){var D,B,C=document.documentElement,E=document.body;if(C&&(C.scrollTop||C.scrollLeft)){D=C.scrollTop;B=C.scrollLeft;}else{if(E){D=E.scrollTop;B=E.scrollLeft;}else{}}return{top:D,left:B};},getStyle:function(C,B){return Ext.fly(C).getStyle(B);},getScrollTop:function(){return this.getScroll().top;},getScrollLeft:function(){return this.getScroll().left;},moveToEl:function(B,C){var D=Ext.lib.Dom.getXY(C);Ext.lib.Dom.setXY(B,D);},numericSort:function(B,C){return(B-C);},_timeoutCount:0,_addListeners:function(){var B=Ext.dd.DDM;if(Ext.lib.Event&&document){B._onLoad();}else{if(B._timeoutCount>2000){}else{setTimeout(B._addListeners,10);if(document&&document.body){B._timeoutCount+=1;}}}},handleWasClicked:function(B,C){if(this.isHandle(C,B.id)){return true;}else{var D=B.parentNode;while(D){if(this.isHandle(C,D.id)){return true;}else{D=D.parentNode;}}}return false;}};}();Ext.dd.DDM=Ext.dd.DragDropMgr;Ext.dd.DDM._addListeners();}Ext.dd.DD=function(C,B,A){if(C){this.init(C,B,A);}};Ext.extend(Ext.dd.DD,Ext.dd.DragDrop,{scroll:true,autoOffset:function(D,A){var B=D-this.startPageX;var C=A-this.startPageY;this.setDelta(B,C);},setDelta:function(A,B){this.deltaX=A;this.deltaY=B;},setDragElPos:function(C,A){var B=this.getDragEl();this.alignElWithMouse(B,C,A);},alignElWithMouse:function(H,D,E){var F=this.getTargetCoord(D,E);var A=H.dom?H:Ext.fly(H,"_dd");if(!this.deltaSetXY){var C=[F.x,F.y];A.setXY(C);var G=A.getLeft(true);var B=A.getTop(true);this.deltaSetXY=[G-F.x,B-F.y];}else{A.setLeftTop(F.x+this.deltaSetXY[0],F.y+this.deltaSetXY[1]);}this.cachePosition(F.x,F.y);this.autoScroll(F.x,F.y,H.offsetHeight,H.offsetWidth);return F;},cachePosition:function(A,B){if(A){this.lastPageX=A;this.lastPageY=B;}else{var C=Ext.lib.Dom.getXY(this.getEl());this.lastPageX=C[0];this.lastPageY=C[1];}},autoScroll:function(E,F,J,D){if(this.scroll){var C=Ext.lib.Dom.getViewHeight();var M=Ext.lib.Dom.getViewWidth();var A=this.DDM.getScrollTop();var K=this.DDM.getScrollLeft();var G=J+F;var B=D+E;var H=(C+A-F-this.deltaY);var I=(M+K-E-this.deltaX);var L=40;var N=(document.all)?80:30;if(G>C&&H<L){window.scrollTo(K,A+N);}if(F<A&&A>0&&F-A<L){window.scrollTo(K,A-N);}if(B>M&&I<L){window.scrollTo(K+N,A);}if(E<K&&K>0&&E-K<L){window.scrollTo(K-N,A);}}},getTargetCoord:function(D,A){var B=D-this.deltaX;var C=A-this.deltaY;if(this.constrainX){if(B<this.minX){B=this.minX;}if(B>this.maxX){B=this.maxX;}}if(this.constrainY){if(C<this.minY){C=this.minY;}if(C>this.maxY){C=this.maxY;}}B=this.getTick(B,this.xTicks);C=this.getTick(C,this.yTicks);return{x:B,y:C};},applyConfig:function(){Ext.dd.DD.superclass.applyConfig.call(this);this.scroll=(this.config.scroll!==false);},b4MouseDown:function(A){this.autoOffset(A.getPageX(),A.getPageY());},b4Drag:function(A){this.setDragElPos(A.getPageX(),A.getPageY());},toString:function(){return("DD "+this.id);}});Ext.dd.DDProxy=function(C,B,A){if(C){this.init(C,B,A);this.initFrame();}};Ext.dd.DDProxy.dragElId="ygddfdiv";Ext.extend(Ext.dd.DDProxy,Ext.dd.DD,{resizeFrame:true,centerFrame:false,createFrame:function(){var A=this;var B=document.body;if(!B||!B.firstChild){setTimeout(function(){A.createFrame();},50);return ;}var C=this.getDragEl();if(!C){C=document.createElement("div");C.id=this.dragElId;var D=C.style;D.position="absolute";D.visibility="hidden";D.cursor="move";D.border="2px solid #aaa";D.zIndex=999;B.insertBefore(C,B.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(C,D){var E=this.getEl();var B=this.getDragEl();var A=B.style;this._resizeProxy();if(this.centerFrame){this.setDelta(Math.round(parseInt(A.width,10)/2),Math.round(parseInt(A.height,10)/2));}this.setDragElPos(C,D);Ext.fly(B).show();},_resizeProxy:function(){if(this.resizeFrame){var A=this.getEl();Ext.fly(this.getDragEl()).setSize(A.offsetWidth,A.offsetHeight);}},b4MouseDown:function(A){var B=A.getPageX();var C=A.getPageY();this.autoOffset(B,C);this.setDragElPos(B,C);},b4StartDrag:function(B,A){this.showFrame(B,A);},b4EndDrag:function(A){Ext.fly(this.getDragEl()).hide();},endDrag:function(C){var A=this.getEl();var B=this.getDragEl();B.style.visibility="";this.beforeMove();A.style.visibility="hidden";Ext.dd.DDM.moveToEl(A,B);B.style.visibility="hidden";A.style.visibility="";this.afterDrag();},beforeMove:function(){},afterDrag:function(){},toString:function(){return("DDProxy "+this.id);}});Ext.dd.DDTarget=function(C,B,A){if(C){this.initTarget(C,B,A);}};Ext.extend(Ext.dd.DDTarget,Ext.dd.DragDrop,{toString:function(){return("DDTarget "+this.id);}});Ext.dd.DragSource=function(A,B){this.el=Ext.get(A);if(!this.dragData){this.dragData={};}Ext.apply(this,B);if(!this.proxy){this.proxy=new Ext.dd.StatusProxy();}Ext.dd.DragSource.superclass.constructor.call(this,this.el.dom,this.ddGroup||this.group,{dragElId:this.proxy.id,resizeFrame:false,isTarget:false,scroll:this.scroll===true});this.dragging=false;};Ext.extend(Ext.dd.DragSource,Ext.dd.DDProxy,{dropAllowed:"x-dd-drop-ok",dropNotAllowed:"x-dd-drop-nodrop",getDragData:function(A){return this.dragData;},onDragEnter:function(D,C){var A=Ext.dd.DragDropMgr.getDDById(C);this.cachedTarget=A;if(this.beforeDragEnter(A,D,C)!==false){if(A.isNotifyTarget){var B=A.notifyEnter(this,D,this.dragData);this.proxy.setStatus(B);}else{this.proxy.setStatus(this.dropAllowed);}if(this.afterDragEnter){this.afterDragEnter(A,D,C);}}},beforeDragEnter:function(A,B,C){return true;},alignElWithMouse:function(){Ext.dd.DragSource.superclass.alignElWithMouse.apply(this,arguments);this.proxy.sync();},onDragOver:function(D,C){var A=this.cachedTarget||Ext.dd.DragDropMgr.getDDById(C);if(this.beforeDragOver(A,D,C)!==false){if(A.isNotifyTarget){var B=A.notifyOver(this,D,this.dragData);this.proxy.setStatus(B);}if(this.afterDragOver){this.afterDragOver(A,D,C);}}},beforeDragOver:function(A,B,C){return true;},onDragOut:function(A,C){var B=this.cachedTarget||Ext.dd.DragDropMgr.getDDById(C);if(this.beforeDragOut(B,A,C)!==false){if(B.isNotifyTarget){B.notifyOut(this,A,this.dragData);}this.proxy.reset();if(this.afterDragOut){this.afterDragOut(B,A,C);}}this.cachedTarget=null;},beforeDragOut:function(A,B,C){return true;},onDragDrop:function(A,C){var B=this.cachedTarget||Ext.dd.DragDropMgr.getDDById(C);if(this.beforeDragDrop(B,A,C)!==false){if(B.isNotifyTarget){if(B.notifyDrop(this,A,this.dragData)){this.onValidDrop(B,A,C);}else{this.onInvalidDrop(B,A,C);}}else{this.onValidDrop(B,A,C);}if(this.afterDragDrop){this.afterDragDrop(B,A,C);}}delete this.cachedTarget;},beforeDragDrop:function(A,B,C){return true;},onValidDrop:function(A,B,C){this.hideProxy();if(this.afterValidDrop){this.afterValidDrop(A,B,C);}},getRepairXY:function(A,B){return this.el.getXY();},onInvalidDrop:function(A,B,C){this.beforeInvalidDrop(A,B,C);if(this.cachedTarget){if(this.cachedTarget.isNotifyTarget){this.cachedTarget.notifyOut(this,B,this.dragData);}this.cacheTarget=null;}this.proxy.repair(this.getRepairXY(B,this.dragData),this.afterRepair,this);if(this.afterInvalidDrop){this.afterInvalidDrop(B,C);}},afterRepair:function(){if(Ext.enableFx){this.el.highlight(this.hlColor||"c3daf9");}this.dragging=false;},beforeInvalidDrop:function(A,B,C){return true;},handleMouseDown:function(A){if(this.dragging){return ;}var B=this.getDragData(A);if(B&&this.onBeforeDrag(B,A)!==false){this.dragData=B;this.proxy.stop();Ext.dd.DragSource.superclass.handleMouseDown.apply(this,arguments);}},onBeforeDrag:function(B,A){return true;},onStartDrag:Ext.emptyFn,startDrag:function(B,A){this.proxy.reset();this.dragging=true;this.proxy.update("");this.onInitDrag(B,A);this.proxy.show();},onInitDrag:function(B,C){var A=this.el.dom.cloneNode(true);A.id=Ext.id();this.proxy.update(A);this.onStartDrag(B,C);return true;},getProxy:function(){return this.proxy;},hideProxy:function(){this.proxy.hide();this.proxy.reset(true);this.dragging=false;},triggerCacheRefresh:function(){Ext.dd.DDM.refreshCache(this.groups);},b4EndDrag:function(A){},endDrag:function(A){this.onEndDrag(this.dragData,A);},onEndDrag:function(B,A){},autoOffset:function(B,A){this.setDelta(-12,-20);}});Ext.ComponentMgr=function(){var A=new Ext.util.MixedCollection();var B={};return{register:function(C){A.add(C);},unregister:function(C){A.remove(C);},get:function(C){return A.get(C);},onAvailable:function(C,D,E){A.on("add",function(G,F){if(F.id==C){D.call(E||F,F);A.un("add",D,E);}});},all:A,registerType:function(C,D){B[C]=D;D.xtype=C;},create:function(D,C){return new B[D.xtype||C](D);}};}();Ext.reg=Ext.ComponentMgr.registerType;Ext.Component=function(A){A=A||{};if(A.initialConfig){if(A.isAction){this.baseAction=A;}A=A.initialConfig;}else{if(A.tagName||A.dom||typeof A=="string"){A={applyTo:A,id:A.id||A};}}this.initialConfig=A;Ext.apply(this,A);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 C=0,B=this.plugins.length;C<B;C++){this.plugins[C]=this.initPlugin(this.plugins[C]);}}else{this.plugins=this.initPlugin(this.plugins);}}if(this.stateful!==false){this.initState(A);}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];},initPlugin:function(A){A.init(this);return A;},initComponent:Ext.emptyFn,render:function(A,B){if(!this.rendered&&this.fireEvent("beforerender",this)!==false){if(!A&&this.el){this.el=Ext.get(this.el);A=this.el.dom.parentNode;this.allowDomMove=false;}this.container=Ext.get(A);if(this.ctCls){this.container.addClass(this.ctCls);}this.rendered=true;if(B!==undefined){if(typeof B=="number"){B=this.container.dom.childNodes[B];}else{B=Ext.getDom(B);}}this.onRender(this.container,B||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;}if(this.overCls){this.el.addClassOnOver(this.overCls);}this.fireEvent("render",this);this.afterRender(this.container);if(this.hidden){this.hide();}if(this.disabled){this.disable();}if(this.stateful!==false){this.initStateEvents();}}return this;},initState:function(B){if(Ext.state.Manager){var C=this.getStateId();if(C){var A=Ext.state.Manager.get(C);if(A){if(this.fireEvent("beforestaterestore",this,A)!==false){this.applyState(A);this.fireEvent("staterestore",this,A);}}}}},getStateId:function(){return this.stateId||((this.id.indexOf("ext-comp-")==0||this.id.indexOf("ext-gen")==0)?null:this.id);},initStateEvents:function(){if(this.stateEvents){for(var B=0,A;A=this.stateEvents[B];B++){this.on(A,this.saveState,this,{delay:100});}}},applyState:function(A,B){if(A){Ext.apply(this,A);}},getState:function(){return null;},saveState:function(){if(Ext.state.Manager){var A=this.getStateId();if(A){var B=this.getState();if(this.fireEvent("beforestatesave",this,B)!==false){Ext.state.Manager.set(A,B);this.fireEvent("statesave",this,B);}}}},applyToMarkup:function(A){this.allowDomMove=false;this.el=Ext.get(A);this.render(this.el.dom.parentNode);},addClass:function(A){if(this.el){this.el.addClass(A);}else{this.cls=this.cls?this.cls+" "+A:A;}},removeClass:function(A){if(this.el){this.el.removeClass(A);}else{if(this.cls){this.cls=this.cls.split(" ").remove(A).join(" ");}}},onRender:function(A,B){if(this.autoEl){if(typeof this.autoEl=="string"){this.el=document.createElement(this.autoEl);}else{var C=document.createElement("div");Ext.DomHelper.overwrite(C,this.autoEl);this.el=C.firstChild;}if(!this.el.id){this.el.id=this.getId();}}if(this.el){this.el=Ext.get(this.el);if(this.allowDomMove!==false){A.dom.insertBefore(this.el.dom,B);}}},getAutoCreate:function(){var A=typeof this.autoCreate=="object"?this.autoCreate:Ext.apply({},this.defaultAutoCreate);if(this.id&&!A.id){A.id=this.id;}return A;},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(A,B){if(B){this.focus.defer(typeof B=="number"?B:10,this,[A,false]);return ;}if(this.rendered){this.el.focus();if(A===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(A){this[A?"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(A){if(A){this.show();}else{this.hide();}return this;},isVisible:function(){return this.rendered&&this.getActionEl().isVisible();},cloneConfig:function(A){A=A||{};var C=A.id||Ext.id();var B=Ext.applyIf(A,this.initialConfig);B.id=C;return new this.constructor(B);},getXType:function(){return this.constructor.xtype;},isXType:function(A,B){if(typeof A=="function"){A=A.xtype;}else{if(typeof A=="object"){A=A.constructor.xtype;}}return !B?("/"+this.getXTypes()+"/").indexOf("/"+A+"/")!=-1:this.constructor.xtype==A;},getXTypes:function(){var B=this.constructor;if(!B.xtypes){var C=[],A=this;while(A&&A.constructor.xtype){C.unshift(A.constructor.xtype);A=A.constructor.superclass;}B.xtypeChain=C;B.xtypes=C.join("/");}return B.xtypes;},findParentBy:function(B){for(var A=this.ownerCt;(A!=null)&&!B(A,this);A=A.ownerCt){}return A||null;},findParentByType:function(A){return typeof A=="function"?this.findParentBy(function(B){return B.constructor===A;}):this.findParentBy(function(B){return B.constructor.xtype===A;});},mon:function(C,A,D,E,B){if(!this.mons){this.mons=[];this.on("beforedestroy",function(){for(var F=0,G=this.mons.length;F<G;F++){var H=this.mons[F];H.item.un(H.ename,H.fn,H.scope);}},this);}this.mons.push({item:C,ename:A,fn:D,scope:E});C.on(A,D,E,B);}});Ext.reg("component",Ext.Component);(function(){Ext.Layer=function(G,H){G=G||{};var F=Ext.DomHelper;var D=G.parentEl,E=D?Ext.getDom(D):document.body;if(H){this.dom=Ext.getDom(H);}if(!this.dom){var C=G.dh||{tag:"div",cls:"x-layer"};this.dom=F.append(E,C);}if(G.cls){this.addClass(G.cls);}this.constrain=G.constrain!==false;this.visibilityMode=Ext.Element.VISIBILITY;if(G.id){this.id=this.dom.id=G.id;}else{this.id=Ext.id(this.dom);}this.zindex=G.zindex||this.getZIndex();this.position("absolute",this.zindex);if(G.shadow){this.shadowOffset=G.shadowOffset||4;this.shadow=new Ext.Shadow({offset:this.shadowOffset,mode:G.shadow});}else{this.shadowOffset=0;}this.useShim=G.shim!==false&&Ext.useShims;this.useDisplay=G.useDisplay;this.hide();};var B=Ext.Element.prototype;var A=[];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 C=A.shift();if(!C){C=this.createShim();C.enableDisplayMode("block");C.dom.style.display="none";C.dom.style.visibility="visible";}var D=this.dom.parentNode;if(C.dom.parentNode!=D){D.insertBefore(C.dom,this.dom);}C.setStyle("z-index",this.getZIndex()-2);this.shim=C;return C;},hideShim:function(){if(this.shim){this.shim.setDisplayed(false);A.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(C){if(this.shadow){this.shadowDisabled=false;this.shadowOffset=this.lastShadowOffset;delete this.lastShadowOffset;if(C){this.sync(true);}}},sync:function(K){var E=this.shadow;if(!this.updating&&this.isVisible()&&(E||this.useShim)){var H=this.getShim();var F=this.getWidth(),I=this.getHeight();var J=this.getLeft(true),D=this.getTop(true);if(E&&!this.shadowDisabled){if(K&&!E.isVisible()){E.show(this);}else{E.realign(J,D,F,I);}if(H){if(K){H.show();}var G=E.adjusts,C=H.dom.style;C.left=(Math.min(J,J+G.l))+"px";C.top=(Math.min(D,D+G.t))+"px";C.width=(F+G.w)+"px";C.height=(I+G.h)+"px";}}else{if(H){if(K){H.show();}H.setSize(F,I);H.setLeftTop(J,D);}}}},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(C){if(this.shadow){this.shadow.hide();}this.hideShim();},constrainXY:function(){if(this.constrain){var H=Ext.lib.Dom.getViewWidth(),L=Ext.lib.Dom.getViewHeight();var C=Ext.getDoc().getScroll();var D=this.getXY();var G=D[0],I=D[1];var F=this.dom.offsetWidth+this.shadowOffset,K=this.dom.offsetHeight+this.shadowOffset;var J=false;if((G+F)>H+C.left){G=H-F-this.shadowOffset;J=true;}if((I+K)>L+C.top){I=L-K-this.shadowOffset;J=true;}if(G<C.left){G=C.left;J=true;}if(I<C.top){I=C.top;J=true;}if(J){if(this.avoidY){var E=this.avoidY;if(I<=E&&(I+K)>=E){I=E-K-5;}}D=[G,I];this.storeXY(D);B.setXY.call(this,D);this.sync();}}},isVisible:function(){return this.visible;},showAction:function(){this.visible=true;if(this.useDisplay===true){this.setDisplayed("");}else{if(this.lastXY){B.setXY.call(this,this.lastXY);}else{if(this.lastLT){B.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(F,G,D,C,E){if(F){this.showAction();}if(G&&F){var H=function(){this.sync(true);if(C){C();}}.createDelegate(this);B.setVisible.call(this,true,true,D,H,E);}else{if(!F){this.hideUnders(true);}var H=C;if(G){H=function(){this.hideAction();if(C){C();}}.createDelegate(this);}B.setVisible.call(this,F,G,D,H,E);if(F){this.sync(true);}else{if(!G){this.hideAction();}}}},storeXY:function(C){delete this.lastLT;this.lastXY=C;},storeLeftTop:function(C,D){delete this.lastXY;this.lastLT=[C,D];},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(C){this.storeLeftTop(C,this.getTop(true));B.setLeft.apply(this,arguments);this.sync();},setTop:function(C){this.storeLeftTop(this.getLeft(true),C);B.setTop.apply(this,arguments);this.sync();},setLeftTop:function(C,D){this.storeLeftTop(C,D);B.setLeftTop.apply(this,arguments);this.sync();},setXY:function(E,G,D,C,F){this.fixDisplay();this.beforeAction();this.storeXY(E);var H=this.createCB(C);B.setXY.call(this,E,G,D,H,F);if(!G){H();}},createCB:function(C){var D=this;return function(){D.constrainXY();D.sync(true);if(C){C();}};},setX:function(G,F,D,C,E){this.setXY([G,this.getY()],F,D,C,E);},setY:function(C,G,E,D,F){this.setXY([this.getX(),C],G,E,D,F);},setSize:function(G,F,H,D,C,E){this.beforeAction();var I=this.createCB(C);B.setSize.call(this,G,F,H,D,I,E);if(!H){I();}},setWidth:function(F,G,D,C,E){this.beforeAction();var H=this.createCB(C);B.setWidth.call(this,F,G,D,H,E);if(!G){H();}},setHeight:function(F,G,D,C,E){this.beforeAction();var H=this.createCB(C);B.setHeight.call(this,F,G,D,H,E);if(!G){H();}},setBounds:function(D,F,C,J,E,H,G,I){this.beforeAction();var K=this.createCB(G);if(!E){this.storeXY([D,F]);B.setXY.call(this,[D,F]);B.setSize.call(this,C,J,E,H,K,I);K();}else{B.setBounds.call(this,D,F,C,J,E,H,K,I);}return this;},setZIndex:function(C){this.zindex=C;this.setStyle("z-index",C+2);if(this.shadow){this.shadow.setZIndex(C+1);}if(this.shim){this.shim.setStyle("z-index",C);}}});})();Ext.Shadow=function(C){Ext.apply(this,C);if(typeof this.mode!="string"){this.mode=this.defaultMode;}var B=this.offset,D={h:0};var A=Math.floor(this.offset/2);switch(this.mode.toLowerCase()){case"drop":D.w=0;D.l=D.t=B;D.t-=1;if(Ext.isIE){D.l-=this.offset+A;D.t-=this.offset+A;D.w-=A;D.h-=A;D.t+=1;}break;case"sides":D.w=(B*2);D.l=-B;D.t=B-1;if(Ext.isIE){D.l-=(this.offset-A);D.t-=this.offset+A;D.l+=1;D.w-=(this.offset-A)*2;D.w-=A+1;D.h-=1;}break;case"frame":D.w=D.h=(B*2);D.l=D.t=-B;D.t+=1;D.h-=2;if(Ext.isIE){D.l-=(this.offset-A);D.t-=(this.offset-A);D.l+=1;D.w-=(this.offset+A+1);D.h-=(this.offset+A);D.h+=1;}break;}this.adjusts=D;};Ext.Shadow.prototype={offset:4,defaultMode:"drop",show:function(A){A=Ext.get(A);if(!this.el){this.el=Ext.Shadow.Pool.pull();if(this.el.dom.nextSibling!=A.dom){this.el.insertBefore(A);}}this.el.setStyle("z-index",this.zIndex||parseInt(A.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(A.getLeft(true),A.getTop(true),A.getWidth(),A.getHeight());this.el.dom.style.display="block";},isVisible:function(){return this.el?true:false;},realign:function(N,B,C,K){if(!this.el){return ;}var F=this.adjusts,H=this.el.dom,A=H.style;var J=0;A.left=(N+F.l)+"px";A.top=(B+F.t)+"px";var D=(C+F.w),L=(K+F.h),I=D+"px",E=L+"px";if(A.width!=I||A.height!=E){A.width=I;A.height=E;if(!Ext.isIE){var G=H.childNodes;var M=Math.max(0,(D-12))+"px";G[0].childNodes[1].style.width=M;G[1].childNodes[1].style.width=M;G[2].childNodes[1].style.width=M;G[1].style.height=Math.max(0,(L-12))+"px";}}},hide:function(){if(this.el){this.el.dom.style.display="none";Ext.Shadow.Pool.push(this.el);delete this.el;}},setZIndex:function(A){this.zIndex=A;if(this.el){this.el.setStyle("z-index",A);}}};Ext.Shadow.Pool=function(){var A=[];var B=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 C=A.shift();if(!C){C=Ext.get(Ext.DomHelper.insertHtml("beforeBegin",document.body.firstChild,B));C.autoBoxAdjust=false;}return C;},push:function(C){A.push(C);}};}();Ext.BoxComponent=Ext.extend(Ext.Component,{initComponent:function(){Ext.BoxComponent.superclass.initComponent.call(this);this.addEvents("resize","move");},boxReady:false,deferHeight:false,setSize:function(A,E){if(typeof A=="object"){E=A.height;A=A.width;}if(!this.boxReady){this.width=A;this.height=E;return this;}if(this.lastSize&&this.lastSize.width==A&&this.lastSize.height==E){return this;}this.lastSize={width:A,height:E};var F=this.adjustSize(A,E);var C=F.width,B=F.height;if(C!==undefined||B!==undefined){var D=this.getResizeEl();if(!this.deferHeight&&C!==undefined&&B!==undefined){D.setSize(C,B);}else{if(!this.deferHeight&&B!==undefined){D.setHeight(B);}else{if(C!==undefined){D.setWidth(C);}}}this.onResize(C,B,A,E);this.fireEvent("resize",this,C,B,A,E);}return this;},setWidth:function(A){return this.setSize(A);},setHeight:function(A){return this.setSize(undefined,A);},getSize:function(){return this.el.getSize();},getPosition:function(A){if(A===true){return[this.el.getLeft(true),this.el.getTop(true)];}return this.xy||this.el.getXY();},getBox:function(B){var A=this.el.getSize();if(B===true){A.x=this.el.getLeft(true);A.y=this.el.getTop(true);}else{var C=this.xy||this.el.getXY();A.x=C[0];A.y=C[1];}return A;},updateBox:function(A){this.setSize(A.width,A.height);this.setPagePosition(A.x,A.y);return this;},getResizeEl:function(){return this.resizeEl||this.el;},getPositionEl:function(){return this.positionEl||this.el;},setPosition:function(B,C){if(B&&typeof B[1]=="number"){C=B[1];B=B[0];}this.x=B;this.y=C;if(!this.boxReady){return this;}var A=this.adjustPosition(B,C);var D=A.x,E=A.y;var F=this.getPositionEl();if(D!==undefined||E!==undefined){if(D!==undefined&&E!==undefined){F.setLeftTop(D,E);}else{if(D!==undefined){F.setLeft(D);}else{if(E!==undefined){F.setTop(E);}}}this.onPosition(D,E);this.fireEvent("move",this,D,E);}return this;},setPagePosition:function(B,C){if(B&&typeof B[1]=="number"){C=B[1];B=B[0];}this.pageX=B;this.pageY=C;if(!this.boxReady){return ;}if(B===undefined||C===undefined){return ;}var A=this.el.translatePoints(B,C);this.setPosition(A.left,A.top);return this;},onRender:function(A,B){Ext.BoxComponent.superclass.onRender.call(this,A,B);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(C,A,B,D){},onPosition:function(B,A){},adjustSize:function(B,A){if(this.autoWidth){B="auto";}if(this.autoHeight){A="auto";}return{width:B,height:A};},adjustPosition:function(B,A){return{x:B,y:A};}});Ext.reg("box",Ext.BoxComponent);Ext.SplitBar=function(E,C,A,D,B){this.el=Ext.get(E,true);this.el.dom.unselectable="on";this.resizingEl=Ext.get(C,true);this.orientation=A||Ext.SplitBar.HORIZONTAL;this.minSize=0;this.maxSize=2000;this.animate=false;this.useShim=false;this.shim=null;if(!B){this.proxy=Ext.SplitBar.createProxy(this.orientation);}else{this.proxy=Ext.get(B).dom;}this.dd=new Ext.dd.DDProxy(this.el.dom.id,"XSplitBars",{dragElId:this.proxy.id});this.dd.b4StartDrag=this.onStartProxyDrag.createDelegate(this);this.dd.endDrag=this.onEndProxyDrag.createDelegate(this);this.dragSpecs={};this.adapter=new Ext.SplitBar.BasicLayoutAdapter();this.adapter.init(this);if(this.orientation==Ext.SplitBar.HORIZONTAL){this.placement=D||(this.el.getX()>this.resizingEl.getX()?Ext.SplitBar.LEFT:Ext.SplitBar.RIGHT);this.el.addClass("x-splitbar-h");}else{this.placement=D||(this.el.getY()>this.resizingEl.getY()?Ext.SplitBar.TOP:Ext.SplitBar.BOTTOM);this.el.addClass("x-splitbar-v");}this.addEvents("resize","moved","beforeresize","beforeapply");Ext.SplitBar.superclass.constructor.call(this);};Ext.extend(Ext.SplitBar,Ext.util.Observable,{onStartProxyDrag:function(B,C){this.fireEvent("beforeresize",this);this.overlay=Ext.DomHelper.append(document.body,{cls:"x-drag-overlay",html:"&#160;"},true);this.overlay.unselectable();this.overlay.setSize(Ext.lib.Dom.getViewWidth(true),Ext.lib.Dom.getViewHeight(true));this.overlay.show();Ext.get(this.proxy).setDisplayed("block");var E=this.adapter.getElementSize(this);this.activeMinSize=this.getMinimumSize();this.activeMaxSize=this.getMaximumSize();var D=E-this.activeMinSize;var A=Math.max(this.activeMaxSize-E,0);if(this.orientation==Ext.SplitBar.HORIZONTAL){this.dd.resetConstraints();this.dd.setXConstraint(this.placement==Ext.SplitBar.LEFT?D:A,this.placement==Ext.SplitBar.LEFT?A:D);this.dd.setYConstraint(0,0);}else{this.dd.resetConstraints();this.dd.setXConstraint(0,0);this.dd.setYConstraint(this.placement==Ext.SplitBar.TOP?D:A,this.placement==Ext.SplitBar.TOP?A:D);}this.dragSpecs.startSize=E;this.dragSpecs.startPoint=[B,C];Ext.dd.DDProxy.prototype.b4StartDrag.call(this.dd,B,C);},onEndProxyDrag:function(C){Ext.get(this.proxy).setDisplayed(false);var A=Ext.lib.Event.getXY(C);if(this.overlay){Ext.destroy(this.overlay);delete this.overlay;}var B;if(this.orientation==Ext.SplitBar.HORIZONTAL){B=this.dragSpecs.startSize+(this.placement==Ext.SplitBar.LEFT?A[0]-this.dragSpecs.startPoint[0]:this.dragSpecs.startPoint[0]-A[0]);}else{B=this.dragSpecs.startSize+(this.placement==Ext.SplitBar.TOP?A[1]-this.dragSpecs.startPoint[1]:this.dragSpecs.startPoint[1]-A[1]);}B=Math.min(Math.max(B,this.activeMinSize),this.activeMaxSize);if(B!=this.dragSpecs.startSize){if(this.fireEvent("beforeapply",this,B)!==false){this.adapter.setElementSize(this,B);this.fireEvent("moved",this,B);this.fireEvent("resize",this,B);}}},getAdapter:function(){return this.adapter;},setAdapter:function(A){this.adapter=A;this.adapter.init(this);},getMinimumSize:function(){return this.minSize;},setMinimumSize:function(A){this.minSize=A;},getMaximumSize:function(){return this.maxSize;},setMaximumSize:function(A){this.maxSize=A;},setCurrentSize:function(A){var B=this.animate;this.animate=false;this.adapter.setElementSize(this,A);this.animate=B;},destroy:function(A){if(this.shim){this.shim.remove();}this.dd.unreg();Ext.destroy(Ext.get(this.proxy));if(A){this.el.remove();}}});Ext.SplitBar.createProxy=function(A){var C=new Ext.Element(document.createElement("div"));C.unselectable();var B="x-splitbar-proxy";C.addClass(B+" "+(A==Ext.SplitBar.HORIZONTAL?B+"-h":B+"-v"));document.body.appendChild(C.dom);return C.dom;};Ext.SplitBar.BasicLayoutAdapter=function(){};Ext.SplitBar.BasicLayoutAdapter.prototype={init:function(A){},getElementSize:function(A){if(A.orientation==Ext.SplitBar.HORIZONTAL){return A.resizingEl.getWidth();}else{return A.resizingEl.getHeight();}},setElementSize:function(A,B,C){if(A.orientation==Ext.SplitBar.HORIZONTAL){if(!A.animate){A.resizingEl.setWidth(B);if(C){C(A,B);}}else{A.resizingEl.setWidth(B,true,0.1,C,"easeOut");}}else{if(!A.animate){A.resizingEl.setHeight(B);if(C){C(A,B);}}else{A.resizingEl.setHeight(B,true,0.1,C,"easeOut");}}}};Ext.SplitBar.AbsoluteLayoutAdapter=function(A){this.basic=new Ext.SplitBar.BasicLayoutAdapter();this.container=Ext.get(A);};Ext.SplitBar.AbsoluteLayoutAdapter.prototype={init:function(A){this.basic.init(A);},getElementSize:function(A){return this.basic.getElementSize(A);},setElementSize:function(A,B,C){this.basic.setElementSize(A,B,this.moveSplitter.createDelegate(this,[A]));},moveSplitter:function(B){var A=Ext.SplitBar;switch(B.placement){case A.LEFT:B.el.setX(B.resizingEl.getRight());break;case A.RIGHT:B.el.setStyle("right",(this.container.getWidth()-B.resizingEl.getLeft())+"px");break;case A.TOP:B.el.setY(B.resizingEl.getBottom());break;case A.BOTTOM:B.el.setY(B.resizingEl.getTop()-B.el.getHeight());break;}}};Ext.SplitBar.VERTICAL=1;Ext.SplitBar.HORIZONTAL=2;Ext.SplitBar.LEFT=1;Ext.SplitBar.RIGHT=2;Ext.SplitBar.TOP=3;Ext.SplitBar.BOTTOM=4;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 A=this.items;if(A){delete this.items;if(Ext.isArray(A)&&A.length>0){this.add.apply(this,A);}else{this.add(A);}}},initItems:function(){if(!this.items){this.items=new Ext.util.MixedCollection(false,this.getComponentId);this.getLayout();}},setLayout:function(A){if(this.layout&&this.layout!=A){this.layout.setContainer(null);}this.initItems();this.layout=A;A.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 A=this.activeItem;delete this.activeItem;this.layout.setActiveItem(A);return ;}}if(!this.ownerCt){this.doLayout();}if(this.monitorResize===true){Ext.EventManager.onWindowResize(this.doLayout,this,[false]);}},getLayoutTarget:function(){return this.el;},getComponentId:function(A){return A.itemId||A.id;},add:function(E){if(!this.items){this.initItems();}var F=arguments,A=F.length;if(A>1){for(var D=0;D<A;D++){this.add(F[D]);}return ;}var B=this.lookupComponent(this.applyDefaults(E));var C=this.items.length;if(this.fireEvent("beforeadd",this,B,C)!==false&&this.onBeforeAdd(B)!==false){this.items.add(B);B.ownerCt=this;this.fireEvent("add",this,B,C);}return B;},insert:function(D,E){if(!this.items){this.initItems();}var F=arguments,A=F.length;if(A>2){for(var C=A-1;C>=1;--C){this.insert(D,F[C]);}return ;}var B=this.lookupComponent(this.applyDefaults(E));if(B.ownerCt==this&&this.items.indexOf(B)<D){--D;}if(this.fireEvent("beforeadd",this,B,D)!==false&&this.onBeforeAdd(B)!==false){this.items.insert(D,B);B.ownerCt=this;this.fireEvent("add",this,B,D);}return B;},applyDefaults:function(A){if(this.defaults){if(typeof A=="string"){A=Ext.ComponentMgr.get(A);Ext.apply(A,this.defaults);}else{if(!A.events){Ext.applyIf(A,this.defaults);}else{Ext.apply(A,this.defaults);}}}return A;},onBeforeAdd:function(A){if(A.ownerCt){A.ownerCt.remove(A,false);}if(this.hideBorders===true){A.border=(A.border===true);}},remove:function(B,A){var C=this.getComponent(B);if(C&&this.fireEvent("beforeremove",this,C)!==false){this.items.remove(C);delete C.ownerCt;if(A===true||(A!==false&&this.autoDestroy)){C.destroy();}if(this.layout&&this.layout.activeItem==C){delete this.layout.activeItem;}this.fireEvent("remove",this,C);}return C;},removeAll:function(A){var C,B=[];while((C=this.items.last())){B.unshift(this.remove(C,A));}return B;},getComponent:function(A){if(typeof A=="object"){return A;}return this.items.get(A);},lookupComponent:function(A){if(typeof A=="string"){return Ext.ComponentMgr.get(A);}else{if(!A.events){return this.createComponent(A);}}return A;},createComponent:function(A){return Ext.ComponentMgr.create(A,this.defaultType);},doLayout:function(D){if(this.rendered&&this.layout){this.layout.layout();}if(D!==false&&this.items){var E=this.items.items;for(var A=0,B=E.length;A<B;A++){var C=E[A];if(C.doLayout){C.doLayout();}}}},getLayout:function(){if(!this.layout){var A=new Ext.layout.ContainerLayout(this.layoutConfig);this.setLayout(A);}return this.layout;},beforeDestroy:function(){if(this.items){Ext.destroy.apply(Ext,this.items.items);}if(this.monitorResize){Ext.EventManager.removeResizeListener(this.doLayout,this);}if(this.layout&&this.layout.destroy){this.layout.destroy();}Ext.Container.superclass.beforeDestroy.call(this);},bubble:function(D,A,B){var C=this;while(C){if(D.apply(A||C,B||[C])===false){break;}C=C.ownerCt;}},cascade:function(C,D,A){if(C.apply(D||this,A||[this])!==false){if(this.items){var E=this.items.items;for(var F=0,B=E.length;F<B;F++){if(E[F].cascade){E[F].cascade(C,D,A);}else{C.apply(D||E[F],A||[E[F]]);}}}}},findById:function(C){var B,A=this;this.cascade(function(D){if(A!=D&&D.id===C){B=D;return false;}});return B||null;},findByType:function(A,B){return this.findBy(function(C){return C.isXType(A,B);});},find:function(A,B){return this.findBy(function(C){return C[A]===B;});},findBy:function(C,D){var B=[],A=this;this.cascade(function(E){if(A!=E&&C.call(D||E,E,A)===true){B.push(E);}});return B;}});Ext.Container.LAYOUTS={};Ext.reg("container",Ext.Container);Ext.layout.ContainerLayout=function(A){Ext.apply(this,A);};Ext.layout.ContainerLayout.prototype={monitorResize:false,activeItem:null,layout:function(){var A=this.container.getLayoutTarget();this.onLayout(this.container,A);this.container.fireEvent("afterlayout",this.container,this);},onLayout:function(B,A){this.renderAll(B,A);},isValidParent:function(C,A){var B=C.getPositionEl?C.getPositionEl():C.getEl();return B.dom.parentNode==A.dom;},renderAll:function(E,D){var A=E.items.items;for(var F=0,B=A.length;F<B;F++){var C=A[F];if(C&&(!C.rendered||!this.isValidParent(C,D))){this.renderItem(C,F,D);}}},renderItem:function(C,B,D){if(C&&!C.rendered){C.render(D,B);if(this.extraCls){var A=C.getPositionEl?C.getPositionEl():C;A.addClass(this.extraCls);}if(this.renderHidden&&C!=this.activeItem){C.hide();}}else{if(C&&!this.isValidParent(C,D)){if(this.extraCls){var A=C.getPositionEl?C.getPositionEl():C;A.addClass(this.extraCls);}if(typeof B=="number"){B=D.dom.childNodes[B];}D.dom.insertBefore(C.getEl().dom,B||null);if(this.renderHidden&&C!=this.activeItem){C.hide();}}}},onResize:function(){if(this.container.collapsed){return ;}var A=this.container.bufferResize;if(A){if(!this.resizeTask){this.resizeTask=new Ext.util.DelayedTask(this.layout,this);this.resizeBuffer=typeof A=="number"?A:100;}this.resizeTask.delay(this.resizeBuffer);}else{this.layout();}},setContainer:function(A){if(this.monitorResize&&A!=this.container){if(this.container){this.container.un("resize",this.onResize,this);}if(A){A.on("resize",this.onResize,this);}}this.container=A;},parseMargins:function(A){var C=A.split(" ");var B=C.length;if(B==1){C[1]=C[0];C[2]=C[0];C[3]=C[0];}if(B==2){C[2]=C[0];C[3]=C[1];}return{top:parseInt(C[0],10)||0,right:parseInt(C[1],10)||0,bottom:parseInt(C[2],10)||0,left:parseInt(C[3],10)||0};},destroy:Ext.emptyFn};Ext.Container.LAYOUTS.auto=Ext.layout.ContainerLayout;Ext.layout.FitLayout=Ext.extend(Ext.layout.ContainerLayout,{monitorResize:true,onLayout:function(B,A){Ext.layout.FitLayout.superclass.onLayout.call(this,B,A);if(!this.container.collapsed){this.setItemSize(this.activeItem||B.items.itemAt(0),A.getStyleSize());}},setItemSize:function(A,B){if(A&&B.height>0){A.setSize(B);}}});Ext.Container.LAYOUTS.fit=Ext.layout.FitLayout;Ext.layout.CardLayout=Ext.extend(Ext.layout.FitLayout,{deferredRender:false,renderHidden:true,setActiveItem:function(A){A=this.container.getComponent(A);if(this.activeItem!=A){if(this.activeItem){this.activeItem.hide();}this.activeItem=A;A.show();this.layout();}},renderAll:function(B,A){if(this.deferredRender){this.renderItem(this.activeItem,undefined,A);}else{Ext.layout.CardLayout.superclass.renderAll.call(this,B,A);}}});Ext.Container.LAYOUTS.card=Ext.layout.CardLayout;Ext.layout.AnchorLayout=Ext.extend(Ext.layout.ContainerLayout,{monitorResize:true,getAnchorViewSize:function(B,A){return A.dom==document.body?A.getViewSize():A.getStyleSize();},onLayout:function(I,F){Ext.layout.AnchorLayout.superclass.onLayout.call(this,I,F);var O=this.getAnchorViewSize(I,F);var B=O.width,J=O.height;if(B<20||J<20){return ;}var M,D;if(I.anchorSize){if(typeof I.anchorSize=="number"){M=I.anchorSize;}else{M=I.anchorSize.width;D=I.anchorSize.height;}}else{M=I.initialConfig.width;D=I.initialConfig.height;}var G=I.items.items,H=G.length,K,E,C,L,N;for(K=0;K<H;K++){E=G[K];if(E.anchor){C=E.anchorSpec;if(!C){var A=E.anchor.split(" ");E.anchorSpec=C={right:this.parseAnchor(A[0],E.initialConfig.width,M),bottom:this.parseAnchor(A[1],E.initialConfig.height,D)};}L=C.right?this.adjustWidthAnchor(C.right(B),E):undefined;N=C.bottom?this.adjustHeightAnchor(C.bottom(J),E):undefined;if(L||N){E.setSize(L||undefined,N||undefined);}}}},parseAnchor:function(F,B,A){if(F&&F!="none"){var D;if(/^(r|right|b|bottom)$/i.test(F)){var C=A-B;return function(G){if(G!==D){D=G;return G-C;}};}else{if(F.indexOf("%")!=-1){var E=parseFloat(F.replace("%",""))*0.01;return function(G){if(G!==D){D=G;return Math.floor(G*E);}};}else{F=parseInt(F,10);if(!isNaN(F)){return function(G){if(G!==D){D=G;return G+F;}};}}}}return false;},adjustWidthAnchor:function(A,B){return A;},adjustHeightAnchor:function(A,B){return A;}});Ext.Container.LAYOUTS.anchor=Ext.layout.AnchorLayout;Ext.layout.ColumnLayout=Ext.extend(Ext.layout.ContainerLayout,{monitorResize:true,extraCls:"x-column",scrollOffset:0,isValidParent:function(A,B){return(A.getPositionEl?A.getPositionEl():A.getEl()).dom.parentNode==this.innerCt.dom;},onLayout:function(H,E){var G=H.items.items,F=G.length,D,J;if(!this.innerCt){E.addClass("x-column-layout-ct");this.innerCt=E.createChild({cls:"x-column-inner"});this.innerCt.createChild({cls:"x-clear"});}this.renderAll(H,this.innerCt);var A=Ext.isIE&&E.dom!=Ext.getBody().dom?E.getStyleSize():E.getViewSize();if(A.width<1&&A.height<1){return ;}var C=A.width-E.getPadding("lr")-this.scrollOffset,I=A.height-E.getPadding("tb"),B=C;this.innerCt.setWidth(C);for(J=0;J<F;J++){D=G[J];if(!D.columnWidth){B-=(D.getSize().width+D.getEl().getMargins("lr"));}}B=B<0?0:B;for(J=0;J<F;J++){D=G[J];if(D.columnWidth){D.setSize(Math.floor(D.columnWidth*B)-D.getEl().getMargins("lr"));}}}});Ext.Container.LAYOUTS.column=Ext.layout.ColumnLayout;Ext.layout.BorderLayout=Ext.extend(Ext.layout.ContainerLayout,{monitorResize:true,rendered:false,onLayout:function(h,K){var e;if(!this.rendered){K.position();K.addClass("x-border-layout-ct");var N=h.items.items;e=[];for(var H=0,V=N.length;H<V;H++){var Q=N[H];var Z=Q.region;if(Q.collapsed){e.push(Q);}Q.collapsed=false;if(!Q.rendered){Q.cls=Q.cls?Q.cls+" x-border-panel":"x-border-panel";Q.render(K,H);}this[Z]=Z!="center"&&Q.split?new Ext.layout.BorderLayout.SplitRegion(this,Q.initialConfig,Z):new Ext.layout.BorderLayout.Region(this,Q.initialConfig,Z);this[Z].render(K,Q);}this.rendered=true;}var P=K.getViewSize();if(P.width<20||P.height<20){if(e){this.restoreCollapsed=e;}return ;}else{if(this.restoreCollapsed){e=this.restoreCollapsed;delete this.restoreCollapsed;}}var U=P.width,T=P.height;var W=U,I=T,Y=0,X=0;var L=this.north,S=this.south,b=this.west,R=this.east,Q=this.center;if(!Q&&Ext.layout.BorderLayout.WARN!==false){throw"No center region defined in BorderLayout "+h.id;}if(L&&L.isVisible()){var M=L.getSize();var J=L.getMargins();M.width=U-(J.left+J.right);M.x=J.left;M.y=J.top;Y=M.height+M.y+J.bottom;I-=Y;L.applyLayout(M);}if(S&&S.isVisible()){var M=S.getSize();var J=S.getMargins();M.width=U-(J.left+J.right);M.x=J.left;var O=(M.height+J.top+J.bottom);M.y=T-O+J.top;I-=O;S.applyLayout(M);}if(b&&b.isVisible()){var M=b.getSize();var J=b.getMargins();M.height=I-(J.top+J.bottom);M.x=J.left;M.y=Y+J.top;var i=(M.width+J.left+J.right);X+=i;W-=i;b.applyLayout(M);}if(R&&R.isVisible()){var M=R.getSize();var J=R.getMargins();M.height=I-(J.top+J.bottom);var i=(M.width+J.left+J.right);M.x=U-i+J.left;M.y=Y+J.top;W-=i;R.applyLayout(M);}if(Q){var J=Q.getMargins();var c={x:X+J.left,y:Y+J.top,width:W-(J.left+J.right),height:I-(J.top+J.bottom)};Q.applyLayout(c);}if(e){for(var H=0,V=e.length;H<V;H++){e[H].collapse(false);}}if(Ext.isIE&&Ext.isStrict){K.repaint();}},destroy:function(){var A=["north","south","east","west"];for(var B=0;B<A.length;B++){var C=this[A[B]];if(C){if(C.destroy){C.destroy();}else{if(C.split){C.split.destroy(true);}}}}Ext.layout.BorderLayout.superclass.destroy.call(this);}});Ext.layout.BorderLayout.Region=function(A,B,C){Ext.apply(this,B);this.layout=A;this.position=C;this.state={};if(typeof this.margins=="string"){this.margins=this.layout.parseMargins(this.margins);}this.margins=Ext.applyIf(this.margins||{},this.defaultMargins);if(this.collapsible){if(typeof this.cmargins=="string"){this.cmargins=this.layout.parseMargins(this.cmargins);}if(this.collapseMode=="mini"&&!this.cmargins){this.cmargins={left:0,top:0,right:0,bottom:0};}else{this.cmargins=Ext.applyIf(this.cmargins||{},C=="north"||C=="south"?this.defaultNSCMargins:this.defaultEWCMargins);}}};Ext.layout.BorderLayout.Region.prototype={collapsible:false,split:false,floatable:true,minWidth:50,minHeight:50,defaultMargins:{left:0,top:0,right:0,bottom:0},defaultNSCMargins:{left:5,top:5,right:5,bottom:5},defaultEWCMargins:{left:5,top:0,right:5,bottom:0},isCollapsed:false,render:function(A,D){this.panel=D;D.el.enableDisplayMode();this.targetEl=A;this.el=D.el;var B=D.getState,C=this.position;D.getState=function(){return Ext.apply(B.call(D)||{},this.state);}.createDelegate(this);if(C!="center"){D.allowQueuedExpand=false;D.on({beforecollapse:this.beforeCollapse,collapse:this.onCollapse,beforeexpand:this.beforeExpand,expand:this.onExpand,hide:this.onHide,show:this.onShow,scope:this});if(this.collapsible){D.collapseEl="el";D.slideAnchor=this.getSlideAnchor();}if(D.tools&&D.tools.toggle){D.tools.toggle.addClass("x-tool-collapse-"+C);D.tools.toggle.addClassOnOver("x-tool-collapse-"+C+"-over");}}},getCollapsedEl:function(){if(!this.collapsedEl){if(!this.toolTemplate){var A=new Ext.Template('<div class="x-tool x-tool-{id}">&#160;</div>');A.disableFormats=true;A.compile();Ext.layout.BorderLayout.Region.prototype.toolTemplate=A;}this.collapsedEl=this.targetEl.createChild({cls:"x-layout-collapsed x-layout-collapsed-"+this.position,id:this.panel.id+"-xcollapsed"});this.collapsedEl.enableDisplayMode("block");if(this.collapseMode=="mini"){this.collapsedEl.addClass("x-layout-cmini-"+this.position);this.miniCollapsedEl=this.collapsedEl.createChild({cls:"x-layout-mini x-layout-mini-"+this.position,html:"&#160;"});this.miniCollapsedEl.addClassOnOver("x-layout-mini-over");this.collapsedEl.addClassOnOver("x-layout-collapsed-over");this.collapsedEl.on("click",this.onExpandClick,this,{stopEvent:true});}else{var B=this.toolTemplate.append(this.collapsedEl.dom,{id:"expand-"+this.position},true);B.addClassOnOver("x-tool-expand-"+this.position+"-over");B.on("click",this.onExpandClick,this,{stopEvent:true});if(this.floatable!==false){this.collapsedEl.addClassOnOver("x-layout-collapsed-over");this.collapsedEl.on("click",this.collapseClick,this);}}}return this.collapsedEl;},onExpandClick:function(A){if(this.isSlid){this.afterSlideIn();this.panel.expand(false);}else{this.panel.expand();}},onCollapseClick:function(A){this.panel.collapse();},beforeCollapse:function(A,B){this.lastAnim=B;if(this.splitEl){this.splitEl.hide();}this.getCollapsedEl().show();this.panel.el.setStyle("z-index",100);this.isCollapsed=true;this.layout.layout();},onCollapse:function(A){this.panel.el.setStyle("z-index",1);if(this.lastAnim===false||this.panel.animCollapse===false){this.getCollapsedEl().dom.style.visibility="visible";}else{this.getCollapsedEl().slideIn(this.panel.slideAnchor,{duration:0.2});}this.state.collapsed=true;this.panel.saveState();},beforeExpand:function(B){var A=this.getCollapsedEl();this.el.show();if(this.position=="east"||this.position=="west"){this.panel.setSize(undefined,A.getHeight());}else{this.panel.setSize(A.getWidth(),undefined);}A.hide();A.dom.style.visibility="hidden";this.panel.el.setStyle("z-index",100);},onExpand:function(){this.isCollapsed=false;if(this.splitEl){this.splitEl.show();}this.layout.layout();this.panel.el.setStyle("z-index",1);this.state.collapsed=false;this.panel.saveState();},collapseClick:function(A){if(this.isSlid){A.stopPropagation();this.slideIn();}else{A.stopPropagation();this.slideOut();}},onHide:function(){if(this.isCollapsed){this.getCollapsedEl().hide();}else{if(this.splitEl){this.splitEl.hide();}}},onShow:function(){if(this.isCollapsed){this.getCollapsedEl().show();}else{if(this.splitEl){this.splitEl.show();}}},isVisible:function(){return !this.panel.hidden;},getMargins:function(){return this.isCollapsed&&this.cmargins?this.cmargins:this.margins;},getSize:function(){return this.isCollapsed?this.getCollapsedEl().getSize():this.panel.getSize();},setPanel:function(A){this.panel=A;},getMinWidth:function(){return this.minWidth;},getMinHeight:function(){return this.minHeight;},applyLayoutCollapsed:function(B){var A=this.getCollapsedEl();A.setLeftTop(B.x,B.y);A.setSize(B.width,B.height);},applyLayout:function(A){if(this.isCollapsed){this.applyLayoutCollapsed(A);}else{this.panel.setPosition(A.x,A.y);this.panel.setSize(A.width,A.height);}},beforeSlide:function(){this.panel.beforeEffect();},afterSlide:function(){this.panel.afterEffect();},initAutoHide:function(){if(this.autoHide!==false){if(!this.autoHideHd){var A=new Ext.util.DelayedTask(this.slideIn,this);this.autoHideHd={mouseout:function(B){if(!B.within(this.el,true)){A.delay(500);}},mouseover:function(B){A.cancel();},scope:this};}this.el.on(this.autoHideHd);}},clearAutoHide:function(){if(this.autoHide!==false){this.el.un("mouseout",this.autoHideHd.mouseout);this.el.un("mouseover",this.autoHideHd.mouseover);}},clearMonitor:function(){Ext.getDoc().un("click",this.slideInIf,this);},slideOut:function(){if(this.isSlid||this.el.hasActiveFx()){return ;}this.isSlid=true;var A=this.panel.tools;if(A&&A.toggle){A.toggle.hide();}this.el.show();if(this.position=="east"||this.position=="west"){this.panel.setSize(undefined,this.collapsedEl.getHeight());}else{this.panel.setSize(this.collapsedEl.getWidth(),undefined);}this.restoreLT=[this.el.dom.style.left,this.el.dom.style.top];this.el.alignTo(this.collapsedEl,this.getCollapseAnchor());this.el.setStyle("z-index",102);this.panel.el.replaceClass("x-panel-collapsed","x-panel-floating");if(this.animFloat!==false){this.beforeSlide();this.el.slideIn(this.getSlideAnchor(),{callback:function(){this.afterSlide();this.initAutoHide();Ext.getDoc().on("click",this.slideInIf,this);},scope:this,block:true});}else{this.initAutoHide();Ext.getDoc().on("click",this.slideInIf,this);}},afterSlideIn:function(){this.clearAutoHide();this.isSlid=false;this.clearMonitor();this.el.setStyle("z-index","");this.panel.el.replaceClass("x-panel-floating","x-panel-collapsed");this.el.dom.style.left=this.restoreLT[0];this.el.dom.style.top=this.restoreLT[1];var A=this.panel.tools;if(A&&A.toggle){A.toggle.show();}},slideIn:function(A){if(!this.isSlid||this.el.hasActiveFx()){Ext.callback(A);return ;}this.isSlid=false;if(this.animFloat!==false){this.beforeSlide();this.el.slideOut(this.getSlideAnchor(),{callback:function(){this.el.hide();this.afterSlide();this.afterSlideIn();Ext.callback(A);},scope:this,block:true});}else{this.el.hide();this.afterSlideIn();}},slideInIf:function(A){if(!A.within(this.el)){this.slideIn();}},anchors:{west:"left",east:"right",north:"top",south:"bottom"},sanchors:{west:"l",east:"r",north:"t",south:"b"},canchors:{west:"tl-tr",east:"tr-tl",north:"tl-bl",south:"bl-tl"},getAnchor:function(){return this.anchors[this.position];},getCollapseAnchor:function(){return this.canchors[this.position];},getSlideAnchor:function(){return this.sanchors[this.position];},getAlignAdj:function(){var A=this.cmargins;switch(this.position){case"west":return[0,0];break;case"east":return[0,0];break;case"north":return[0,0];break;case"south":return[0,0];break;}},getExpandAdj:function(){var A=this.collapsedEl,B=this.cmargins;switch(this.position){case"west":return[-(B.right+A.getWidth()+B.left),0];break;case"east":return[B.right+A.getWidth()+B.left,0];break;case"north":return[0,-(B.top+B.bottom+A.getHeight())];break;case"south":return[0,B.top+B.bottom+A.getHeight()];break;}}};Ext.layout.BorderLayout.SplitRegion=function(A,B,C){Ext.layout.BorderLayout.SplitRegion.superclass.constructor.call(this,A,B,C);this.applyLayout=this.applyFns[C];};Ext.extend(Ext.layout.BorderLayout.SplitRegion,Ext.layout.BorderLayout.Region,{splitTip:"Drag to resize.",collapsibleSplitTip:"Drag to resize. Double click to hide.",useSplitTips:false,splitSettings:{north:{orientation:Ext.SplitBar.VERTICAL,placement:Ext.SplitBar.TOP,maxFn:"getVMaxSize",minProp:"minHeight",maxProp:"maxHeight"},south:{orientation:Ext.SplitBar.VERTICAL,placement:Ext.SplitBar.BOTTOM,maxFn:"getVMaxSize",minProp:"minHeight",maxProp:"maxHeight"},east:{orientation:Ext.SplitBar.HORIZONTAL,placement:Ext.SplitBar.RIGHT,maxFn:"getHMaxSize",minProp:"minWidth",maxProp:"maxWidth"},west:{orientation:Ext.SplitBar.HORIZONTAL,placement:Ext.SplitBar.LEFT,maxFn:"getHMaxSize",minProp:"minWidth",maxProp:"maxWidth"}},applyFns:{west:function(D){if(this.isCollapsed){return this.applyLayoutCollapsed(D);}var C=this.splitEl.dom,A=C.style;this.panel.setPosition(D.x,D.y);var B=C.offsetWidth;A.left=(D.x+D.width-B)+"px";A.top=(D.y)+"px";A.height=Math.max(0,D.height)+"px";this.panel.setSize(D.width-B,D.height);},east:function(D){if(this.isCollapsed){return this.applyLayoutCollapsed(D);}var C=this.splitEl.dom,A=C.style;var B=C.offsetWidth;this.panel.setPosition(D.x+B,D.y);A.left=(D.x)+"px";A.top=(D.y)+"px";A.height=Math.max(0,D.height)+"px";this.panel.setSize(D.width-B,D.height);},north:function(D){if(this.isCollapsed){return this.applyLayoutCollapsed(D);}var C=this.splitEl.dom,A=C.style;var B=C.offsetHeight;this.panel.setPosition(D.x,D.y);A.left=(D.x)+"px";A.top=(D.y+D.height-B)+"px";A.width=Math.max(0,D.width)+"px";this.panel.setSize(D.width,D.height-B);},south:function(D){if(this.isCollapsed){return this.applyLayoutCollapsed(D);}var C=this.splitEl.dom,A=C.style;var B=C.offsetHeight;this.panel.setPosition(D.x,D.y+B);A.left=(D.x)+"px";A.top=(D.y)+"px";A.width=Math.max(0,D.width)+"px";this.panel.setSize(D.width,D.height-B);}},render:function(B,D){Ext.layout.BorderLayout.SplitRegion.superclass.render.call(this,B,D);var C=this.position;this.splitEl=B.createChild({cls:"x-layout-split x-layout-split-"+C,html:"&#160;",id:this.panel.id+"-xsplit"});if(this.collapseMode=="mini"){this.miniSplitEl=this.splitEl.createChild({cls:"x-layout-mini x-layout-mini-"+C,html:"&#160;"});this.miniSplitEl.addClassOnOver("x-layout-mini-over");this.miniSplitEl.on("click",this.onCollapseClick,this,{stopEvent:true});}var A=this.splitSettings[C];this.split=new Ext.SplitBar(this.splitEl.dom,D.el,A.orientation);this.split.placement=A.placement;this.split.getMaximumSize=this[A.maxFn].createDelegate(this);this.split.minSize=this.minSize||this[A.minProp];this.split.on("beforeapply",this.onSplitMove,this);this.split.useShim=this.useShim===true;this.maxSize=this.maxSize||this[A.maxProp];if(D.hidden){this.splitEl.hide();}if(this.useSplitTips){this.splitEl.dom.title=this.collapsible?this.collapsibleSplitTip:this.splitTip;}if(this.collapsible){this.splitEl.on("dblclick",this.onCollapseClick,this);}},getSize:function(){if(this.isCollapsed){return this.collapsedEl.getSize();}var A=this.panel.getSize();if(this.position=="north"||this.position=="south"){A.height+=this.splitEl.dom.offsetHeight;}else{A.width+=this.splitEl.dom.offsetWidth;}return A;},getHMaxSize:function(){var A=this.maxSize||10000;var B=this.layout.center;return Math.min(A,(this.el.getWidth()+B.el.getWidth())-B.getMinWidth());},getVMaxSize:function(){var A=this.maxSize||10000;var B=this.layout.center;return Math.min(A,(this.el.getHeight()+B.el.getHeight())-B.getMinHeight());},onSplitMove:function(A,B){var C=this.panel.getSize();this.lastSplitSize=B;if(this.position=="north"||this.position=="south"){this.panel.setSize(C.width,B);this.state.height=B;}else{this.panel.setSize(B,C.height);this.state.width=B;}this.layout.layout();this.panel.saveState();return false;},getSplitBar:function(){return this.split;},destroy:function(){Ext.destroy(this.miniSplitEl,this.split,this.splitEl);}});Ext.Container.LAYOUTS.border=Ext.layout.BorderLayout;Ext.layout.FormLayout=Ext.extend(Ext.layout.AnchorLayout,{labelSeparator:":",getAnchorViewSize:function(B,A){return(B.body||B.el).getStyleSize();},setContainer:function(A){Ext.layout.FormLayout.superclass.setContainer.call(this,A);if(A.labelAlign){A.addClass("x-form-label-"+A.labelAlign);}if(A.hideLabels){this.labelStyle="display:none";this.elementStyle="padding-left:0;";this.labelAdjust=0;}else{this.labelSeparator=A.labelSeparator||this.labelSeparator;A.labelWidth=A.labelWidth||100;if(typeof A.labelWidth=="number"){var C=(typeof A.labelPad=="number"?A.labelPad:5);this.labelAdjust=A.labelWidth+C;this.labelStyle="width:"+A.labelWidth+"px;";this.elementStyle="padding-left:"+(A.labelWidth+C)+"px";}if(A.labelAlign=="top"){this.labelStyle="width:auto;";this.labelAdjust=0;this.elementStyle="padding-left:0;";}}if(!this.fieldTpl){var B=new Ext.Template('<div class="x-form-item {5}" tabIndex="-1">','<label for="{0}" style="{2}" class="x-form-item-label">{1}{4}</label>','<div class="x-form-element" id="x-form-el-{0}" style="{3}">','</div><div class="{6}"></div>',"</div>");B.disableFormats=true;B.compile();Ext.layout.FormLayout.prototype.fieldTpl=B;}},getLabelStyle:function(C){var A="",E=[this.labelStyle,C];for(var D=0,B=E.length;D<B;++D){if(E[D]){A+=E[D];if(A.substr(-1,1)!=";"){A+=";";}}}return A;},renderItem:function(C,B,D){if(C&&!C.rendered&&C.isFormField&&C.inputType!="hidden"){var A=[C.id,C.fieldLabel,this.getLabelStyle(C.labelStyle),this.elementStyle||"",typeof C.labelSeparator=="undefined"?this.labelSeparator:C.labelSeparator,(C.itemCls||this.container.itemCls||"")+(C.hideLabel?" x-hide-label":""),C.clearCls||"x-form-clear-left"];if(typeof B=="number"){B=D.dom.childNodes[B]||null;}if(B){this.fieldTpl.insertBefore(B,A);}else{this.fieldTpl.append(D,A);}C.render("x-form-el-"+C.id);}else{Ext.layout.FormLayout.superclass.renderItem.apply(this,arguments);}},adjustWidthAnchor:function(A,B){return A-(B.isFormField?(B.hideLabel?0:this.labelAdjust):0);},isValidParent:function(A,B){return true;}});Ext.Container.LAYOUTS.form=Ext.layout.FormLayout;Ext.layout.Accordion=Ext.extend(Ext.layout.FitLayout,{fill:true,autoWidth:true,titleCollapse:true,hideCollapseTool:false,collapseFirst:false,animate:false,sequence:false,activeOnTop:false,renderItem:function(A){if(this.animate===false){A.animCollapse=false;}A.collapsible=true;if(this.autoWidth){A.autoWidth=true;}if(this.titleCollapse){A.titleCollapse=true;}if(this.hideCollapseTool){A.hideCollapseTool=true;}if(this.collapseFirst!==undefined){A.collapseFirst=this.collapseFirst;}if(!this.activeItem&&!A.collapsed){this.activeItem=A;}else{if(this.activeItem){A.collapsed=true;}}Ext.layout.Accordion.superclass.renderItem.apply(this,arguments);A.header.addClass("x-accordion-hd");A.on("beforeexpand",this.beforeExpand,this);},beforeExpand:function(C,A){var B=this.activeItem;if(B){if(this.sequence){delete this.activeItem;if(!B.collapsed){B.collapse({callback:function(){C.expand(A||true);},scope:this});return false;}}else{B.collapse(this.animate);}}this.activeItem=C;if(this.activeOnTop){C.el.dom.parentNode.insertBefore(C.el.dom,C.el.dom.parentNode.firstChild);}this.layout();},setItemSize:function(D,E){if(this.fill&&D){var A=this.container.items.items;var F=0;for(var G=0,B=A.length;G<B;G++){var C=A[G];if(C!=D){F+=(C.getSize().height-C.bwrap.getHeight());}}E.height-=F;D.setSize(E);}}});Ext.Container.LAYOUTS.accordion=Ext.layout.Accordion;Ext.layout.TableLayout=Ext.extend(Ext.layout.ContainerLayout,{monitorResize:false,setContainer:function(A){Ext.layout.TableLayout.superclass.setContainer.call(this,A);this.currentRow=0;this.currentColumn=0;this.cells=[];},onLayout:function(F,D){var E=F.items.items,B=E.length,C,A;if(!this.table){D.addClass("x-table-layout-ct");this.table=D.createChild({tag:"table",cls:"x-table-layout",cellspacing:0,cn:{tag:"tbody"}},null,true);this.renderAll(F,D);}},getRow:function(B){var A=this.table.tBodies[0].childNodes[B];if(!A){A=document.createElement("tr");this.table.tBodies[0].appendChild(A);}return A;},getNextCell:function(C){var B=this.getNextNonSpan(this.currentColumn,this.currentRow);var F=this.currentColumn=B[0],G=this.currentRow=B[1];for(var D=G;D<G+(C.rowspan||1);D++){if(!this.cells[D]){this.cells[D]=[];}for(var H=F;H<F+(C.colspan||1);H++){this.cells[D][H]=true;}}var E=document.createElement("td");if(C.cellId){E.id=C.cellId;}var A="x-table-layout-cell";if(C.cellCls){A+=" "+C.cellCls;}E.className=A;if(C.colspan){E.colSpan=C.colspan;}if(C.rowspan){E.rowSpan=C.rowspan;}this.getRow(G).appendChild(E);return E;},getNextNonSpan:function(B,C){var A=this.columns;while((A&&B>=A)||(this.cells[C]&&this.cells[C][B])){if(A&&B>=A){C++;B=0;}else{B++;}}return[B,C];},renderItem:function(C,B,D){if(C&&!C.rendered){C.render(this.getNextCell(C));if(this.extraCls){var A=C.getPositionEl?C.getPositionEl():C;A.addClass(this.extraCls);}}},isValidParent:function(A,B){return true;}});Ext.Container.LAYOUTS.table=Ext.layout.TableLayout;Ext.layout.AbsoluteLayout=Ext.extend(Ext.layout.AnchorLayout,{extraCls:"x-abs-layout-item",isForm:false,setContainer:function(A){Ext.layout.AbsoluteLayout.superclass.setContainer.call(this,A);if(A.isXType("form")){this.isForm=true;}},onLayout:function(B,A){if(this.isForm){B.body.position();}else{A.position();}Ext.layout.AbsoluteLayout.superclass.onLayout.call(this,B,A);},getAnchorViewSize:function(B,A){return this.isForm?B.body.getStyleSize():Ext.layout.AbsoluteLayout.superclass.getAnchorViewSize.call(this,B,A);},isValidParent:function(A,B){return this.isForm?true:Ext.layout.AbsoluteLayout.superclass.isValidParent.call(this,A,B);},adjustWidthAnchor:function(A,B){return A?A-B.getPosition(true)[0]:A;},adjustHeightAnchor:function(A,B){return A?A-B.getPosition(true)[1]:A;}});Ext.Container.LAYOUTS.absolute=Ext.layout.AbsoluteLayout;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",disabledClass:"",deferHeight:true,expandDefaults:{duration:0.25},collapseDefaults:{duration:0.25},initComponent:function(){Ext.Panel.superclass.initComponent.call(this);this.addEvents("bodyresize","titlechange","iconchange","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 C=this.buttons;this.buttons=[];for(var A=0,B=C.length;A<B;A++){if(C[A].render){C[A].ownerCt=this;this.buttons.push(C[A]);}else{this.addButton(C[A]);}}}if(this.autoLoad){this.on("render",this.doAutoLoad,this,{delay:10});}},createElement:function(B,C){if(this[B]){C.appendChild(this[B].dom);return ;}if(B==="bwrap"||this.elements.indexOf(B)!=-1){if(this[B+"Cfg"]){this[B]=Ext.fly(C).createChild(this[B+"Cfg"]);}else{var A=document.createElement("div");A.className=this[B+"Cls"];this[B]=Ext.get(C.appendChild(A));}if(this[B+"CssClass"]){this[B].addClass(this[B+"CssClass"]);}if(this[B+"Style"]){this[B].applyStyles(this[B+"Style"]);}}},onRender:function(H,I){Ext.Panel.superclass.onRender.call(this,H,I);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 C=this.bwrap?this.bwrap:this.el;this.tbar=C.down("."+this.tbarCls);this.body=C.down("."+this.bodyCls);this.bbar=C.down("."+this.bbarCls);this.footer=C.down("."+this.footerCls);this.fromMarkup=true;}else{this.el=H.createChild({id:this.id,cls:this.baseCls},I);}var O=this.el,E=O.dom;if(this.cls){this.el.addClass(this.cls);}if(this.buttons){this.elements+=",footer";}if(this.frame){O.insertHtml("afterBegin",String.format(Ext.Element.boxMarkup,this.baseCls));this.createElement("header",E.firstChild.firstChild.firstChild);this.createElement("bwrap",E);var A=this.bwrap.dom;var K=E.childNodes[1],N=E.childNodes[2];A.appendChild(K);A.appendChild(N);var P=A.firstChild.firstChild.firstChild;this.createElement("tbar",P);this.createElement("body",P);this.createElement("bbar",P);this.createElement("footer",A.lastChild.firstChild.firstChild);if(!this.footer){this.bwrap.dom.lastChild.className+=" x-panel-nofooter";}}else{this.createElement("header",E);this.createElement("bwrap",E);var A=this.bwrap.dom;this.createElement("tbar",A);this.createElement("body",A);this.createElement("bbar",A);this.createElement("footer",A);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");}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 F=this.tools;this.tools={};this.addTool.apply(this,F);}else{this.tools={};}if(this.buttons&&this.buttons.length>0){var L=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 D=L.getElementsByTagName("tr")[0];for(var J=0,G=this.buttons.length;J<G;J++){var B=this.buttons[J];var M=document.createElement("td");M.className="x-panel-btn-td";B.render(D.appendChild(M));}}if(this.tbar&&this.topToolbar){if(Ext.isArray(this.topToolbar)){this.topToolbar=new Ext.Toolbar(this.topToolbar);}this.topToolbar.render(this.tbar);this.topToolbar.ownerCt=this;}if(this.bbar&&this.bottomToolbar){if(Ext.isArray(this.bottomToolbar)){this.bottomToolbar=new Ext.Toolbar(this.bottomToolbar);}this.bottomToolbar.render(this.bbar);this.bottomToolbar.ownerCt=this;}},setIconClass:function(A){var B=this.iconCls;this.iconCls=A;if(this.rendered&&this.header){if(this.frame){this.header.addClass("x-panel-icon");this.header.replaceClass(B,this.iconCls);}else{var C=this.header.dom;var D=C.firstChild&&String(C.firstChild.tagName).toLowerCase()=="img"?C.firstChild:null;if(D){Ext.fly(D).replaceClass(B,this.iconCls);}else{Ext.DomHelper.insertBefore(C.firstChild,{tag:"img",src:Ext.BLANK_IMAGE_URL,cls:"x-panel-inline-icon "+this.iconCls});}}}this.fireEvent("iconchange",this,A,B);},makeFloating:function(A){this.floating=true;this.el=new Ext.Layer(typeof A=="object"?A:{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(B,D,E){var C={handler:D,scope:E,minWidth:this.minButtonWidth,hideParent:true};if(typeof B=="string"){C.text=B;}else{Ext.apply(C,B);}var A=new Ext.Button(C);A.ownerCt=this;if(!this.buttons){this.buttons=[];}this.buttons.push(A);return A;},addTool:function(){if(!this[this.toolTarget]){return ;}if(!this.toolTemplate){var C=new Ext.Template('<div class="x-tool x-tool-{id}">&#160;</div>');C.disableFormats=true;C.compile();Ext.Panel.prototype.toolTemplate=C;}for(var D=0,F=arguments,G=F.length;D<G;D++){var A=F[D];if(!this.tools[A.id]){var B="x-tool-"+A.id+"-over";var E=this.toolTemplate.insertFirst((A.align!=="left")?this[this.toolTarget]:this[this.toolTarget].child("span"),A,true);this.tools[A.id]=E;E.enableDisplayMode("block");E.on("click",this.createToolHandler(E,A,B,this));if(A.on){E.on(A.on);}if(A.hidden){E.hide();}if(A.qtip){if(typeof A.qtip=="object"){Ext.QuickTips.register(Ext.apply({target:E.id},A.qtip));}else{E.dom.qtip=A.qtip;}}E.addClassOnOver(B);}}},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(D,B,C,A){return function(E){D.removeClass(C);E.stopEvent();if(B.handler){B.handler.call(B.scope||D,E,D,A);}};},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 A=Ext.getDom(this.contentEl);Ext.fly(A).removeClass(["x-hidden","x-hide-display"]);this.body.dom.appendChild(A);}if(this.collapsed){this.collapsed=false;this.collapse(false);}Ext.Panel.superclass.afterRender.call(this);this.initEvents();},setAutoScroll:function(){if(this.rendered&&this.autoScroll){var A=this.body||this.el;if(A){A.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(D,A,C){var B={scope:C,block:true};if(D===true){B.callback=A;return B;}else{if(!D.callback){B.callback=A;}else{B.callback=function(){A.call(C);Ext.callback(D.callback,D.scope);};}}return Ext.applyIf(B,D);},collapse:function(A){if(this.collapsed||this.el.hasFxBlock()||this.fireEvent("beforecollapse",this,A)===false){return ;}var B=A===true||(A!==false&&this.animCollapse);this.beforeEffect();this.onCollapse(B,A);return this;},onCollapse:function(B,A){if(B){this[this.collapseEl].slideOut(this.slideAnchor,Ext.apply(this.createEffect(A||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(A){if(!this.collapsed||this.el.hasFxBlock()||this.fireEvent("beforeexpand",this,A)===false){return ;}var B=A===true||(A!==false&&this.animCollapse);this.el.removeClass(this.collapsedCls);this.beforeEffect();this.onExpand(B,A);return this;},onExpand:function(B,A){if(B){this[this.collapseEl].slideIn(this.slideAnchor,Ext.apply(this.createEffect(A||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(A){this[this.collapsed?"expand":"collapse"](A);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(B,A){if(B!==undefined||A!==undefined){if(!this.collapsed){if(typeof B=="number"){this.body.setWidth(this.adjustBodyWidth(B-this.getFrameWidth()));}else{if(B=="auto"){this.body.setWidth(B);}}if(typeof A=="number"){this.body.setHeight(this.adjustBodyHeight(A-this.getFrameHeight()));}else{if(A=="auto"){this.body.setHeight(A);}}if(this.disabled&&this.el._mask){this.el._mask.setSize(this.el.dom.clientWidth,this.el.getHeight());}}else{this.queuedBodySize={width:B,height:A};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,B,A);}this.syncShadow();},adjustBodyHeight:function(A){return A;},adjustBodyWidth:function(A){return A;},onPosition:function(){this.syncShadow();},getFrameWidth:function(){var A=this.el.getFrameWidth("lr");if(this.frame){var B=this.bwrap.dom.firstChild;A+=(Ext.fly(B).getFrameWidth("l")+Ext.fly(B.firstChild).getFrameWidth("r"));var C=this.bwrap.dom.firstChild.firstChild.firstChild;A+=Ext.fly(C).getFrameWidth("lr");}return A;},getFrameHeight:function(){var B=this.el.getFrameWidth("tb");B+=(this.tbar?this.tbar.getHeight():0)+(this.bbar?this.bbar.getHeight():0);if(this.frame){var D=this.el.dom.firstChild;var C=this.bwrap.dom.lastChild;B+=(D.offsetHeight+C.offsetHeight);var A=this.bwrap.dom.firstChild.firstChild.firstChild;B+=Ext.fly(A).getFrameWidth("tb");}else{B+=(this.header?this.header.getHeight():0)+(this.footer?this.footer.getHeight():0);}return B;},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(A,B){this.title=A;if(this.header&&this.headerAsText){this.header.child("span").update(A);}if(B){this.setIconClass(B);}this.fireEvent("titlechange",this,A);return this;},getUpdater:function(){return this.body.getUpdater();},load:function(){var A=this.body.getUpdater();A.update.apply(A,arguments);return this;},beforeDestroy:function(){if(this.header){this.header.removeAllListeners();if(this.headerAsText){Ext.Element.uncache(this.header.child("span"));}}Ext.Element.uncache(this.header,this.tbar,this.bbar,this.footer,this.body,this.bwrap);if(this.tools){for(var B in this.tools){Ext.destroy(this.tools[B]);}}if(this.buttons){for(var A in this.buttons){Ext.destroy(this.buttons[A]);}}Ext.destroy(this.topToolbar,this.bottomToolbar);Ext.Panel.superclass.beforeDestroy.call(this);},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(B,C,A){var D=document.createElement("div");D.className="x-panel-ghost "+(B?B:"");if(this.header){D.appendChild(this.el.dom.firstChild.cloneNode(true));}Ext.fly(D.appendChild(document.createElement("ul"))).setHeight(this.bwrap.getHeight());D.style.width=this.el.dom.offsetWidth+"px";if(!A){this.container.dom.appendChild(D);}else{Ext.getDom(A).appendChild(D);}if(C!==false&&this.el.useShim!==false){var E=new Ext.Layer({shadow:false,useDisplay:true,constrain:false},D);E.show();return E;}else{return new Ext.Element(D);}},doAutoLoad:function(){this.body.load(typeof this.autoLoad=="object"?this.autoLoad:{url:this.autoLoad});},getTool:function(A){return this.tools[A];}});Ext.reg("panel",Ext.Panel);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",elements:"header,body",collapsible:false,initHidden:true,monitorResize:true,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(A,B){Ext.Window.superclass.onRender.call(this,A,B);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();this.mask.on("click",this.focus,this);}},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 A=this.getKeyMap();A.on(27,this.onEsc,this);A.disable();}},initDraggable:function(){this.dd=new Ext.Window.DD(this);},onEsc:function(){this[this.closeAction]();},beforeDestroy:function(){this.hide();if(this.doAnchor){Ext.EventManager.removeResizeListener(this.doAnchor,this);Ext.EventManager.un(window,"scroll",this.doAnchor,this);}Ext.destroy(this.focusEl,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 A=this.proxy.getBox();this.proxy.hide();this.window.handleResize(A);return A;},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(A){var B=this.resizeBox;if(B.x!=A.x||B.y!=A.y){this.updateBox(A);}else{this.setSize(A);}this.focus();this.updateHandles();this.saveState();if(this.layout){this.doLayout();}this.fireEvent("resize",this,A.width,A.height);},focus:function(){var C=this.focusEl,B=this.defaultButton,A=typeof B;if(A!="undefined"){if(A=="number"){C=this.buttons[B];}else{if(A=="string"){C=Ext.getCmp(B);}else{C=B;}}}C.focus.defer(10,C);},setAnimateTarget:function(A){A=Ext.get(A);this.animateTarget=A;},beforeShow:function(){delete this.el.lastXY;delete this.el.lastLT;if(this.x===undefined||this.y===undefined){var B=this.el.getAlignToXY(this.container,"c-c");var A=this.el.translatePoints(B[0],B[1]);this.x=this.x===undefined?A.left:this.x;this.y=this.y===undefined?A.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(C,B,A){if(!this.rendered){this.render(Ext.getBody());}if(this.hidden===false){this.toFront();return ;}if(this.fireEvent("beforeshow",this)===false){return ;}if(B){this.on("show",B,A,{single:true});}this.hidden=false;if(C!==undefined){this.setAnimateTarget(C);}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 A=this.getBox(false);A.callback=this.afterShow;A.scope=this;A.duration=0.25;A.easing="easeNone";A.opacity=0.5;A.block=true;this.el.setStyle("display","none");this.proxy.shift(A);},hide:function(C,B,A){if(this.activeGhost){this.hide.defer(100,this,[C,B,A]);return ;}if(this.hidden||this.fireEvent("beforehide",this)===false){return ;}if(B){this.on("hide",B,A,{single:true});}this.hidden=true;if(C!==undefined){this.setAnimateTarget(C);}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 B=this.getBox(false);this.proxy.setBox(B);this.el.hide();var A=this.animateTarget.getBox();A.callback=this.afterHide;A.scope=this;A.duration=0.25;A.easing="easeNone";A.block=true;A.opacity=0;this.proxy.shift(A);},onWindowResize:function(){if(this.maximized){this.fitContainer();}if(this.modal){this.mask.setSize("100%","100%");var A=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 A;if(this.constrain){A={right:this.el.shadowOffset,left:this.el.shadowOffset,bottom:this.el.shadowOffset};}else{var B=this.getSize();A={right:-(B.width-100),bottom:-(B.height-25)};}var C=this.el.getConstrainToXY(this.container,true,A);if(C){this.setPosition(C[0],C[1]);}}},ghost:function(B){var C=this.createGhost(B);var A=this.getBox(true);C.setLeftTop(A.x,A.y);C.setWidth(A.width);this.el.hide();this.activeGhost=C;return C;},unghost:function(A,B){if(A!==false){this.el.show();this.focus();if(Ext.isMac&&Ext.isGecko){this.cascade(this.setAutoScroll);}}if(B!==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);if(this.maximizable){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 A=this.container.getViewSize();this.setSize(A.width,A.height);},setZIndex:function(A){if(this.modal){this.mask.setStyle("z-index",A);}this.el.setZIndex(++A);A+=5;if(this.resizer){this.resizer.proxy.setStyle("z-index",++A);}this.lastZIndex=A;},alignTo:function(A,B,D){var C=this.el.getAlignToXY(A,B,D);this.setPagePosition(C[0],C[1]);return this;},anchorTo:function(E,C,D,A){if(this.doAnchor){Ext.EventManager.removeResizeListener(this.doAnchor,this);Ext.EventManager.un(window,"scroll",this.doAnchor,this);}this.doAnchor=function(){this.alignTo(E,C,D);};Ext.EventManager.onWindowResize(this.doAnchor,this);var B=typeof A;if(B!="undefined"){Ext.EventManager.on(window,"scroll",this.doAnchor,this,{buffer:B=="number"?A:50});}this.doAnchor();return this;},toFront:function(A){if(this.manager.bringToFront(this)){if(!A||!A.getTarget().focus){this.focus();}}return this;},setActive:function(A){if(A){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 A=this.el.getAlignToXY(this.container,"c-c");this.setPagePosition(A[0],A[1]);return this;}});Ext.reg("window",Ext.Window);Ext.Window.DD=function(A){this.win=A;Ext.Window.DD.superclass.constructor.call(this,A.el.id,"WindowDD-"+A.id);this.setHandleElId(A.header.id);this.scroll=false;};Ext.extend(Ext.Window.DD,Ext.dd.DD,{moveOnly:true,headerOffsets:[100,25],startDrag:function(){var B=this.win;this.proxy=B.ghost();if(B.constrain!==false){var C=B.el.shadowOffset;this.constrainTo(B.container,{right:C,left:C,bottom:C});}else{if(B.constrainHeader!==false){var A=this.proxy.getSize();this.constrainTo(B.container,{right:-(A.width-this.headerOffsets[0]),bottom:-(A.height-this.headerOffsets[1])});}}},b4Drag:Ext.emptyFn,onDrag:function(A){this.alignElWithMouse(this.proxy,A.getPageX(),A.getPageY());},endDrag:function(A){this.win.unghost();this.win.saveState();}});Ext.WindowGroup=function(){var D={};var F=[];var E=null;var G=function(H,I){return(!H._lastAccess||H._lastAccess<I._lastAccess)?-1:1;};var C=function(){var J=F,L=J.length;if(L>0){J.sort(G);var K=J[0].manager.zseed;for(var I=0;I<L;I++){var H=J[I];if(H&&!H.hidden){H.setZIndex(K+(I*10));}}}B();};var A=function(H){if(H!=E){if(E){E.setActive(false);}E=H;if(H){H.setActive(true);}}};var B=function(){for(var H=F.length-1;H>=0;--H){if(!F[H].hidden){A(F[H]);return ;}}A(null);};return{zseed:9000,register:function(H){D[H.id]=H;F.push(H);H.on("hide",B);},unregister:function(H){delete D[H.id];H.un("hide",B);F.remove(H);},get:function(H){return typeof H=="object"?H:D[H];},bringToFront:function(H){H=this.get(H);if(H!=E){H._lastAccess=new Date().getTime();C();return true;}return false;},sendToBack:function(H){H=this.get(H);H._lastAccess=-(new Date().getTime());C();return H;},hideAll:function(){for(var H in D){if(D[H]&&typeof D[H]!="function"&&D[H].isVisible()){D[H].hide();}}},getActive:function(){return E;},getBy:function(J,K){var I=[];for(var L=F.length-1;L>=0;--L){var H=F[L];if(J.call(K||H,H)!==false){I.push(H);}}return I;},each:function(I,J){for(var H in D){if(D[H]&&typeof D[H]!="function"){if(I.call(J||D[H],D[H])===false){return ;}}}}};};Ext.WindowMgr=new Ext.WindowGroup();Ext.dd.PanelProxy=function(B,A){this.panel=B;this.id=this.panel.id+"-ddproxy";Ext.apply(this,A);};Ext.dd.PanelProxy.prototype={insertProxy:true,setStatus:Ext.emptyFn,reset:Ext.emptyFn,update:Ext.emptyFn,stop:Ext.emptyFn,sync:Ext.emptyFn,getEl:function(){return this.ghost;},getGhost:function(){return this.ghost;},getProxy:function(){return this.proxy;},hide:function(){if(this.ghost){if(this.proxy){this.proxy.remove();delete this.proxy;}this.panel.el.dom.style.display="";this.ghost.remove();delete this.ghost;}},show:function(){if(!this.ghost){this.ghost=this.panel.createGhost(undefined,undefined,Ext.getBody());this.ghost.setXY(this.panel.el.getXY());if(this.insertProxy){this.proxy=this.panel.el.insertSibling({cls:"x-panel-dd-spacer"});this.proxy.setSize(this.panel.getSize());}this.panel.el.dom.style.display="none";}},repair:function(A,C,B){this.hide();if(typeof C=="function"){C.call(B||this);}},moveProxy:function(B,A){if(this.proxy){B.insertBefore(this.proxy.dom,A);}}};Ext.Panel.DD=function(A,B){this.panel=A;this.dragData={panel:A};this.proxy=new Ext.dd.PanelProxy(A,B);Ext.Panel.DD.superclass.constructor.call(this,A.el,B);var C=A.header;if(C){this.setHandleElId(C.id);}(C?C:this.panel.body).setStyle("cursor","move");this.scroll=false;};Ext.extend(Ext.Panel.DD,Ext.dd.DragSource,{showFrame:Ext.emptyFn,startDrag:Ext.emptyFn,b4StartDrag:function(B,A){this.proxy.show();},b4MouseDown:function(A){var B=A.getPageX();var C=A.getPageY();this.autoOffset(B,C);},onInitDrag:function(B,A){this.onStartDrag(B,A);return true;},createFrame:Ext.emptyFn,getDragEl:function(A){return this.proxy.ghost.dom;},endDrag:function(A){this.proxy.hide();this.panel.saveState();},autoOffset:function(B,A){B-=this.startPageX;A-=this.startPageY;this.setDelta(B,A);}});Ext.state.Provider=function(){this.addEvents("statechange");this.state={};Ext.state.Provider.superclass.constructor.call(this);};Ext.extend(Ext.state.Provider,Ext.util.Observable,{get:function(A,B){return typeof this.state[A]=="undefined"?B:this.state[A];},clear:function(A){delete this.state[A];this.fireEvent("statechange",this,A,null);},set:function(B,A){this.state[B]=A;this.fireEvent("statechange",this,B,A);},decodeValue:function(J){var A=/^(a|n|d|b|s|o)\:(.*)$/;var H=A.exec(unescape(J));if(!H||!H[1]){return ;}var E=H[1];var C=H[2];switch(E){case"n":return parseFloat(C);case"d":return new Date(Date.parse(C));case"b":return(C=="1");case"a":var D=[];var B=C.split("^");for(var I=0,G=B.length;I<G;I++){D.push(this.decodeValue(B[I]));}return D;case"o":var D={};var B=C.split("^");for(var I=0,G=B.length;I<G;I++){var F=B[I].split("=");D[F[0]]=this.decodeValue(F[1]);}return D;default:return C;}},encodeValue:function(F){var A;if(typeof F=="number"){A="n:"+F;}else{if(typeof F=="boolean"){A="b:"+(F?"1":"0");}else{if(Ext.isDate(F)){A="d:"+F.toGMTString();}else{if(Ext.isArray(F)){var C="";for(var D=0,B=F.length;D<B;D++){C+=this.encodeValue(F[D]);if(D!=B-1){C+="^";}}A="a:"+C;}else{if(typeof F=="object"){var C="";for(var E in F){if(typeof F[E]!="function"&&F[E]!==undefined){C+=E+"="+this.encodeValue(F[E])+"^";}}A="o:"+C.substring(0,C.length-1);}else{A="s:"+F;}}}}}return escape(A);}});Ext.state.Manager=function(){var A=new Ext.state.Provider();return{setProvider:function(B){A=B;},get:function(C,B){return A.get(C,B);},set:function(B,C){A.set(B,C);},clear:function(B){A.clear(B);},getProvider:function(){return A;}};}();Ext.state.CookieProvider=function(A){Ext.state.CookieProvider.superclass.constructor.call(this);this.path="/";this.expires=new Date(new Date().getTime()+(1000*60*60*24*7));this.domain=null;this.secure=false;Ext.apply(this,A);this.state=this.readCookies();};Ext.extend(Ext.state.CookieProvider,Ext.state.Provider,{set:function(B,A){if(typeof A=="undefined"||A===null){this.clear(B);return ;}this.setCookie(B,A);Ext.state.CookieProvider.superclass.set.call(this,B,A);},clear:function(A){this.clearCookie(A);Ext.state.CookieProvider.superclass.clear.call(this,A);},readCookies:function(){var F={};var C=document.cookie+";";var A=/\s?(.*?)=(.*?);/g;var D;while((D=A.exec(C))!=null){var B=D[1];var E=D[2];if(B&&B.substring(0,3)=="ys-"){F[B.substr(3)]=this.decodeValue(E);}}return F;},setCookie:function(B,A){document.cookie="ys-"+B+"="+this.encodeValue(A)+((this.expires==null)?"":("; expires="+this.expires.toGMTString()))+((this.path==null)?"":("; path="+this.path))+((this.domain==null)?"":("; domain="+this.domain))+((this.secure==true)?"; secure":"");},clearCookie:function(A){document.cookie="ys-"+A+"=null; expires=Thu, 01-Jan-70 00:00:01 GMT"+((this.path==null)?"":("; path="+this.path))+((this.domain==null)?"":("; domain="+this.domain))+((this.secure==true)?"; secure":"");}});Ext.DatePicker=Ext.extend(Ext.Component,{todayText:"Today",okText:"&#160;OK&#160;",cancelText:"Cancel",todayTip:"{0} (Spacebar)",minText:"This date is before the minimum date",maxText:"This date is after the maximum date",format:"m/d/y",disabledDaysText:"Disabled",disabledDatesText:"Disabled",constrainToViewport:true,monthNames:Date.monthNames,dayNames:Date.dayNames,nextText:"Next Month (Control+Right)",prevText:"Previous Month (Control+Left)",monthYearText:"Choose a month (Control+Up/Down to move years)",startDay:0,showToday:true,initComponent:function(){Ext.DatePicker.superclass.initComponent.call(this);this.value=this.value?this.value.clearTime():new Date().clearTime();this.addEvents("select");if(this.handler){this.on("select",this.handler,this.scope||this);}this.initDisabledDays();},initDisabledDays:function(){if(!this.disabledDatesRE&&this.disabledDates){var B=this.disabledDates;var C="(?:";for(var A=0;A<B.length;A++){C+=B[A];if(A!=B.length-1){C+="|";}}this.disabledDatesRE=new RegExp(C+")");}},setDisabledDates:function(A){if(Ext.isArray(A)){this.disabledDates=A;this.disabledDatesRE=null;}else{this.disabledDatesRE=A;}this.initDisabledDays();this.update(this.value,true);},setDisabledDays:function(A){this.disabledDays=A;this.update(this.value,true);},setMinDate:function(A){this.minDate=A;this.update(this.value,true);},setMaxDate:function(A){this.maxDate=A;this.update(this.value,true);},setValue:function(A){var B=this.value;this.value=A.clearTime(true);if(this.el){this.update(this.value);}},getValue:function(){return this.value;},focus:function(){if(this.el){this.update(this.activeDate);}},onRender:function(I,D){var G=['<table cellspacing="0">','<tr><td class="x-date-left"><a href="#" title="',this.prevText,'">&#160;</a></td><td class="x-date-middle" align="center"></td><td class="x-date-right"><a href="#" title="',this.nextText,'">&#160;</a></td></tr>','<tr><td colspan="3"><table class="x-date-inner" cellspacing="0"><thead><tr>'];var E=this.dayNames;for(var F=0;F<7;F++){var C=this.startDay+F;if(C>6){C=C-7;}G.push("<th><span>",E[C].substr(0,1),"</span></th>");}G[G.length]="</tr></thead><tbody><tr>";for(var F=0;F<42;F++){if(F%7==0&&F!=0){G[G.length]="</tr><tr>";}G[G.length]='<td><a href="#" hidefocus="on" class="x-date-date" tabIndex="1"><em><span></span></em></a></td>';}G.push("</tr></tbody></table></td></tr>",this.showToday?'<tr><td colspan="3" class="x-date-bottom" align="center"></td></tr>':"",'</table><div class="x-date-mp"></div>');var H=document.createElement("div");H.className="x-date-picker";H.innerHTML=G.join("");I.dom.insertBefore(H,D);this.el=Ext.get(H);this.eventEl=Ext.get(H.firstChild);this.leftClickRpt=new Ext.util.ClickRepeater(this.el.child("td.x-date-left a"),{handler:this.showPrevMonth,scope:this,preventDefault:true,stopDefault:true});this.rightClickRpt=new Ext.util.ClickRepeater(this.el.child("td.x-date-right a"),{handler:this.showNextMonth,scope:this,preventDefault:true,stopDefault:true});this.eventEl.on("mousewheel",this.handleMouseWheel,this);this.monthPicker=this.el.down("div.x-date-mp");this.monthPicker.enableDisplayMode("block");var A=new Ext.KeyNav(this.eventEl,{left:function(J){J.ctrlKey?this.showPrevMonth():this.update(this.activeDate.add("d",-1));},right:function(J){J.ctrlKey?this.showNextMonth():this.update(this.activeDate.add("d",1));},up:function(J){J.ctrlKey?this.showNextYear():this.update(this.activeDate.add("d",-7));},down:function(J){J.ctrlKey?this.showPrevYear():this.update(this.activeDate.add("d",7));},pageUp:function(J){this.showNextMonth();},pageDown:function(J){this.showPrevMonth();},enter:function(J){J.stopPropagation();return true;},scope:this});this.eventEl.on("click",this.handleDateClick,this,{delegate:"a.x-date-date"});this.el.unselectable();this.cells=this.el.select("table.x-date-inner tbody td");this.textNodes=this.el.query("table.x-date-inner tbody span");this.mbtn=new Ext.Button({text:"&#160;",tooltip:this.monthYearText,renderTo:this.el.child("td.x-date-middle",true)});this.mbtn.on("click",this.showMonthPicker,this);this.mbtn.el.child(this.mbtn.menuClassTarget).addClass("x-btn-with-menu");if(this.showToday){this.todayKeyListener=this.eventEl.addKeyListener(Ext.EventObject.SPACE,this.selectToday,this);var B=(new Date()).dateFormat(this.format);this.todayBtn=new Ext.Button({renderTo:this.el.child("td.x-date-bottom",true),text:String.format(this.todayText,B),tooltip:String.format(this.todayTip,B),handler:this.selectToday,scope:this});}if(Ext.isIE){this.el.repaint();}this.update(this.value);},createMonthPicker:function(){if(!this.monthPicker.dom.firstChild){var B=['<table border="0" cellspacing="0">'];for(var A=0;A<6;A++){B.push('<tr><td class="x-date-mp-month"><a href="#">',this.monthNames[A].substr(0,3),"</a></td>",'<td class="x-date-mp-month x-date-mp-sep"><a href="#">',this.monthNames[A+6].substr(0,3),"</a></td>",A==0?'<td class="x-date-mp-ybtn" align="center"><a class="x-date-mp-prev"></a></td><td class="x-date-mp-ybtn" align="center"><a class="x-date-mp-next"></a></td></tr>':'<td class="x-date-mp-year"><a href="#"></a></td><td class="x-date-mp-year"><a href="#"></a></td></tr>');}B.push('<tr class="x-date-mp-btns"><td colspan="4"><button type="button" class="x-date-mp-ok">',this.okText,'</button><button type="button" class="x-date-mp-cancel">',this.cancelText,"</button></td></tr>","</table>");this.monthPicker.update(B.join(""));this.monthPicker.on("click",this.onMonthClick,this);this.monthPicker.on("dblclick",this.onMonthDblClick,this);this.mpMonths=this.monthPicker.select("td.x-date-mp-month");this.mpYears=this.monthPicker.select("td.x-date-mp-year");this.mpMonths.each(function(E,D,C){C+=1;if((C%2)==0){E.dom.xmonth=5+Math.round(C*0.5);}else{E.dom.xmonth=Math.round((C-1)*0.5);}});}},showMonthPicker:function(){this.createMonthPicker();var A=this.el.getSize();this.monthPicker.setSize(A);this.monthPicker.child("table").setSize(A);this.mpSelMonth=(this.activeDate||this.value).getMonth();this.updateMPMonth(this.mpSelMonth);this.mpSelYear=(this.activeDate||this.value).getFullYear();this.updateMPYear(this.mpSelYear);this.monthPicker.slideIn("t",{duration:0.2});},updateMPYear:function(C){this.mpyear=C;var E=this.mpYears.elements;for(var A=1;A<=10;A++){var D=E[A-1],B;if((A%2)==0){B=C+Math.round(A*0.5);D.firstChild.innerHTML=B;D.xyear=B;}else{B=C-(5-Math.round(A*0.5));D.firstChild.innerHTML=B;D.xyear=B;}this.mpYears.item(A-1)[B==this.mpSelYear?"addClass":"removeClass"]("x-date-mp-sel");}},updateMPMonth:function(A){this.mpMonths.each(function(B,D,C){B[B.dom.xmonth==A?"addClass":"removeClass"]("x-date-mp-sel");});},selectMPMonth:function(A){},onMonthClick:function(D,A){D.stopEvent();var E=new Ext.Element(A),B;if(E.is("button.x-date-mp-cancel")){this.hideMonthPicker();}else{if(E.is("button.x-date-mp-ok")){var C=new Date(this.mpSelYear,this.mpSelMonth,(this.activeDate||this.value).getDate());if(C.getMonth()!=this.mpSelMonth){C=new Date(this.mpSelYear,this.mpSelMonth,1).getLastDateOfMonth();}this.update(C);this.hideMonthPicker();}else{if(B=E.up("td.x-date-mp-month",2)){this.mpMonths.removeClass("x-date-mp-sel");B.addClass("x-date-mp-sel");this.mpSelMonth=B.dom.xmonth;}else{if(B=E.up("td.x-date-mp-year",2)){this.mpYears.removeClass("x-date-mp-sel");B.addClass("x-date-mp-sel");this.mpSelYear=B.dom.xyear;}else{if(E.is("a.x-date-mp-prev")){this.updateMPYear(this.mpyear-10);}else{if(E.is("a.x-date-mp-next")){this.updateMPYear(this.mpyear+10);}}}}}}},onMonthDblClick:function(C,A){C.stopEvent();var D=new Ext.Element(A),B;if(B=D.up("td.x-date-mp-month",2)){this.update(new Date(this.mpSelYear,B.dom.xmonth,(this.activeDate||this.value).getDate()));this.hideMonthPicker();}else{if(B=D.up("td.x-date-mp-year",2)){this.update(new Date(B.dom.xyear,this.mpSelMonth,(this.activeDate||this.value).getDate()));this.hideMonthPicker();}}},hideMonthPicker:function(A){if(this.monthPicker){if(A===true){this.monthPicker.hide();}else{this.monthPicker.slideOut("t",{duration:0.2});}}},showPrevMonth:function(A){this.update(this.activeDate.add("mo",-1));},showNextMonth:function(A){this.update(this.activeDate.add("mo",1));},showPrevYear:function(){this.update(this.activeDate.add("y",-1));},showNextYear:function(){this.update(this.activeDate.add("y",1));},handleMouseWheel:function(B){var A=B.getWheelDelta();if(A>0){this.showPrevMonth();B.stopEvent();}else{if(A<0){this.showNextMonth();B.stopEvent();}}},handleDateClick:function(A,B){A.stopEvent();if(B.dateValue&&!Ext.fly(B.parentNode).hasClass("x-date-disabled")){this.setValue(new Date(B.dateValue));this.fireEvent("select",this,this.value);}},selectToday:function(){if(this.todayBtn&&!this.todayBtn.disabled){this.setValue(new Date().clearTime());this.fireEvent("select",this,this.value);}},update:function(P,I){var AH=this.activeDate;this.activeDate=P;if(!I&&AH&&this.el){var d=P.getTime();if(AH.getMonth()==P.getMonth()&&AH.getFullYear()==P.getFullYear()){this.cells.removeClass("x-date-selected");this.cells.each(function(A){if(A.dom.firstChild.dateValue==d){A.addClass("x-date-selected");setTimeout(function(){try{A.dom.firstChild.focus();}catch(B){}},50);return false;}});return ;}}var AA=P.getDaysInMonth();var Z=P.getFirstDateOfMonth();var AD=Z.getDay()-this.startDay;if(AD<=this.startDay){AD+=7;}var X=P.add("mo",-1);var AC=X.getDaysInMonth()-AD;var AE=this.cells.elements;var Y=this.textNodes;AA+=AD;var N=86400000;var T=(new Date(X.getFullYear(),X.getMonth(),AC)).clearTime();var W=new Date().clearTime().getTime();var S=P.clearTime().getTime();var U=this.minDate?this.minDate.clearTime():Number.NEGATIVE_INFINITY;var K=this.maxDate?this.maxDate.clearTime():Number.POSITIVE_INFINITY;var Q=this.disabledDatesRE;var V=this.disabledDatesText;var L=this.disabledDays?this.disabledDays.join(""):false;var R=this.disabledDaysText;var J=this.format;if(this.showToday){var t=new Date().clearTime();var AF=(t<U||t>K||(Q&&J&&Q.test(t.dateFormat(J)))||(L&&L.indexOf(t.getDay())!=-1));this.todayBtn.setDisabled(AF);this.todayKeyListener[AF?"disable":"enable"]();}var w=function(B,D){D.title="";var C=T.getTime();D.firstChild.dateValue=C;if(C==W){D.className+=" x-date-today";D.title=B.todayText;}if(C==S){D.className+=" x-date-selected";setTimeout(function(){try{D.firstChild.focus();}catch(E){}},50);}if(C<U){D.className=" x-date-disabled";D.title=B.minText;return ;}if(C>K){D.className=" x-date-disabled";D.title=B.maxText;return ;}if(L){if(L.indexOf(T.getDay())!=-1){D.title=R;D.className=" x-date-disabled";}}if(Q&&J){var A=T.dateFormat(J);if(Q.test(A)){D.title=V.replace("%0",A);D.className=" x-date-disabled";}}};var O=0;for(;O<AD;O++){Y[O].innerHTML=(++AC);T.setDate(T.getDate()+1);AE[O].className="x-date-prevday";w(this,AE[O]);}for(;O<AA;O++){var AG=O-AD+1;Y[O].innerHTML=(AG);T.setDate(T.getDate()+1);AE[O].className="x-date-active";w(this,AE[O]);}var M=0;for(;O<42;O++){Y[O].innerHTML=(++M);T.setDate(T.getDate()+1);AE[O].className="x-date-nextday";w(this,AE[O]);}this.mbtn.setText(this.monthNames[P.getMonth()]+" "+P.getFullYear());if(!this.internalRender){var AB=this.el.dom.firstChild;var i=AB.offsetWidth;this.el.setWidth(i+this.el.getBorderWidth("lr"));Ext.fly(AB).setWidth(i);this.internalRender=true;if(Ext.isOpera&&!this.secondPass){AB.rows[0].cells[1].style.width=(i-(AB.rows[0].cells[0].offsetWidth+AB.rows[0].cells[2].offsetWidth))+"px";this.secondPass=true;this.update.defer(10,this,[P]);}}},beforeDestroy:function(){if(this.rendered){Ext.destroy(this.leftClickRpt,this.rightClickRpt,this.monthPicker,this.eventEl,this.mbtn,this.todayBtn);}}});Ext.reg("datepicker",Ext.DatePicker);Ext.TabPanel=Ext.extend(Ext.Panel,{monitorResize:true,deferredRender:true,tabWidth:120,minTabWidth:30,resizeTabs:false,enableTabScroll:false,scrollIncrement:0,scrollRepeatInterval:400,scrollDuration:0.35,animScroll:true,tabPosition:"top",baseCls:"x-tab-panel",autoTabs:false,autoTabSelector:"div.x-tab",activeTab:null,tabMargin:2,plain:false,wheelIncrement:20,idDelimiter:"__",itemCls:"x-tab-item",elements:"body",headerAsText:false,frame:false,hideBorders:true,initComponent:function(){this.frame=false;Ext.TabPanel.superclass.initComponent.call(this);this.addEvents("beforetabchange","tabchange","contextmenu");this.setLayout(new Ext.layout.CardLayout({deferredRender:this.deferredRender}));if(this.tabPosition=="top"){this.elements+=",header";this.stripTarget="header";}else{this.elements+=",footer";this.stripTarget="footer";}if(!this.stack){this.stack=Ext.TabPanel.AccessStack();}this.initItems();},render:function(){Ext.TabPanel.superclass.render.apply(this,arguments);if(this.activeTab!==undefined){var A=this.activeTab;delete this.activeTab;this.setActiveTab(A);}},onRender:function(F,B){Ext.TabPanel.superclass.onRender.call(this,F,B);if(this.plain){var C=this.tabPosition=="top"?"header":"footer";this[C].addClass("x-tab-panel-"+C+"-plain");}var A=this[this.stripTarget];this.stripWrap=A.createChild({cls:"x-tab-strip-wrap",cn:{tag:"ul",cls:"x-tab-strip x-tab-strip-"+this.tabPosition}});var D=(this.tabPosition=="bottom"?this.stripWrap:null);this.stripSpacer=A.createChild({cls:"x-tab-strip-spacer"},D);this.strip=new Ext.Element(this.stripWrap.dom.firstChild);this.edge=this.strip.createChild({tag:"li",cls:"x-tab-edge"});this.strip.createChild({cls:"x-clear"});this.body.addClass("x-tab-panel-body-"+this.tabPosition);if(!this.itemTpl){var E=new Ext.Template('<li class="{cls}" id="{id}"><a class="x-tab-strip-close" onclick="return false;"></a>','<a class="x-tab-right" href="#" onclick="return false;"><em class="x-tab-left">','<span class="x-tab-strip-inner"><span class="x-tab-strip-text {iconCls}">{text}</span></span>',"</em></a></li>");E.disableFormats=true;E.compile();Ext.TabPanel.prototype.itemTpl=E;}this.items.each(this.initTab,this);},afterRender:function(){Ext.TabPanel.superclass.afterRender.call(this);if(this.autoTabs){this.readTabs(false);}},initEvents:function(){Ext.TabPanel.superclass.initEvents.call(this);this.on("add",this.onAdd,this);this.on("remove",this.onRemove,this);this.strip.on("mousedown",this.onStripMouseDown,this);this.strip.on("contextmenu",this.onStripContextMenu,this);if(this.enableTabScroll){this.strip.on("mousewheel",this.onWheel,this);}},findTargets:function(C){var A=null;var B=C.getTarget("li",this.strip);if(B){A=this.getComponent(B.id.split(this.idDelimiter)[1]);if(A.disabled){return{close:null,item:null,el:null};}}return{close:C.getTarget(".x-tab-strip-close",this.strip),item:A,el:B};},onStripMouseDown:function(A){if(A.button!=0){return ;}A.preventDefault();var B=this.findTargets(A);if(B.close){this.remove(B.item);return ;}if(B.item&&B.item!=this.activeTab){this.setActiveTab(B.item);}},onStripContextMenu:function(A){A.preventDefault();var B=this.findTargets(A);if(B.item){this.fireEvent("contextmenu",this,B.item,A);}},readTabs:function(E){if(E===true){this.items.each(function(G){this.remove(G);},this);}var F=this.el.query(this.autoTabSelector);for(var A=0,B=F.length;A<B;A++){var D=F[A];var C=D.getAttribute("title");D.removeAttribute("title");this.add({title:C,el:D});}},initTab:function(E,A){var D=this.strip.dom.childNodes[A];var B=E.closable?"x-tab-strip-closable":"";if(E.disabled){B+=" x-item-disabled";}if(E.iconCls){B+=" x-tab-with-icon";}if(E.tabCls){B+=" "+E.tabCls;}var C={id:this.id+this.idDelimiter+E.getItemId(),text:E.title,cls:B,iconCls:E.iconCls||""};var F=D?this.itemTpl.insertBefore(D,C):this.itemTpl.append(this.strip,C);Ext.fly(F).addClassOnOver("x-tab-strip-over");if(E.tabTip){Ext.fly(F).child("span.x-tab-strip-text",true).qtip=E.tabTip;}E.tabEl=F;E.on("disable",this.onItemDisabled,this);E.on("enable",this.onItemEnabled,this);E.on("titlechange",this.onItemTitleChanged,this);E.on("iconchange",this.onItemIconChanged,this);E.on("beforeshow",this.onBeforeShowItem,this);},onAdd:function(C,A,B){this.initTab(A,B);if(this.items.getCount()==1){this.syncSize();}this.delegateUpdates();},onBeforeAdd:function(A){var B=A.events?(this.items.containsKey(A.getItemId())?A:null):this.items.get(A);if(B){this.setActiveTab(A);return false;}Ext.TabPanel.superclass.onBeforeAdd.apply(this,arguments);var C=A.elements;A.elements=C?C.replace(",header",""):C;A.border=(A.border===true);},onRemove:function(C,A){Ext.destroy(Ext.get(this.getTabEl(A)));this.stack.remove(A);A.un("disable",this.onItemDisabled,this);A.un("enable",this.onItemEnabled,this);A.un("titlechange",this.onItemTitleChanged,this);A.un("iconchange",this.onItemIconChanged,this);A.un("beforeshow",this.onBeforeShowItem,this);if(A==this.activeTab){var B=this.stack.next();if(B){this.setActiveTab(B);}else{if(this.items.getCount()>0){this.setActiveTab(0);}else{this.activeTab=null;}}}this.delegateUpdates();},onBeforeShowItem:function(A){if(A!=this.activeTab){this.setActiveTab(A);return false;}},onItemDisabled:function(A){var B=this.getTabEl(A);if(B){Ext.fly(B).addClass("x-item-disabled");}this.stack.remove(A);},onItemEnabled:function(A){var B=this.getTabEl(A);if(B){Ext.fly(B).removeClass("x-item-disabled");}},onItemTitleChanged:function(A){var B=this.getTabEl(A);if(B){Ext.fly(B).child("span.x-tab-strip-text",true).innerHTML=A.title;}},onItemIconChanged:function(C,B,D){var A=this.getTabEl(C);if(A){Ext.fly(A).child("span.x-tab-strip-text").replaceClass(D,B);}},getTabEl:function(B){var A=(typeof B==="number")?this.items.items[B].getItemId():B.getItemId();return document.getElementById(this.id+this.idDelimiter+A);},onResize:function(){Ext.TabPanel.superclass.onResize.apply(this,arguments);this.delegateUpdates();},beginUpdate:function(){this.suspendUpdates=true;},endUpdate:function(){this.suspendUpdates=false;this.delegateUpdates();},hideTabStripItem:function(A){A=this.getComponent(A);var B=this.getTabEl(A);if(B){B.style.display="none";this.delegateUpdates();}this.stack.remove(A);},unhideTabStripItem:function(A){A=this.getComponent(A);var B=this.getTabEl(A);if(B){B.style.display="";this.delegateUpdates();}},delegateUpdates:function(){if(this.suspendUpdates){return ;}if(this.resizeTabs&&this.rendered){this.autoSizeTabs();}if(this.enableTabScroll&&this.rendered){this.autoScrollTabs();}},autoSizeTabs:function(){var F=this.items.length;var K=this.tabPosition!="bottom"?"header":"footer";var J=this[K].dom.offsetWidth;var L=this[K].dom.clientWidth;if(!this.resizeTabs||F<1||!L){return ;}var D=Math.max(Math.min(Math.floor((L-4)/F)-this.tabMargin,this.tabWidth),this.minTabWidth);this.lastTabWidth=D;var B=this.stripWrap.dom.getElementsByTagName("li");for(var H=0,E=B.length-1;H<E;H++){var C=B[H];var A=C.childNodes[1].firstChild.firstChild;var G=C.offsetWidth;var I=A.offsetWidth;A.style.width=(D-(G-I))+"px";}},adjustBodyWidth:function(A){if(this.header){this.header.setWidth(A);}if(this.footer){this.footer.setWidth(A);}return A;},setActiveTab:function(C){C=this.getComponent(C);if(!C||this.fireEvent("beforetabchange",this,C,this.activeTab)===false){return ;}if(!this.rendered){this.activeTab=C;return ;}if(this.activeTab!=C){if(this.activeTab){var B=this.getTabEl(this.activeTab);if(B){Ext.fly(B).removeClass("x-tab-strip-active");}this.activeTab.fireEvent("deactivate",this.activeTab);}var A=this.getTabEl(C);Ext.fly(A).addClass("x-tab-strip-active");this.activeTab=C;this.stack.add(C);this.layout.setActiveItem(C);if(this.layoutOnTabChange&&C.doLayout){C.doLayout();}if(this.scrolling){this.scrollToTab(C,this.animScroll);}C.fireEvent("activate",C);this.fireEvent("tabchange",this,C);}},getActiveTab:function(){return this.activeTab||null;},getItem:function(A){return this.getComponent(A);},autoScrollTabs:function(){this.pos=this.tabPosition=="bottom"?this.footer:this.header;var D=this.items.length;var G=this.pos.dom.offsetWidth;var H=this.pos.dom.clientWidth;var E=this.stripWrap;var F=E.dom;var A=F.offsetWidth;var C=this.getScrollPos();var B=this.edge.getOffsetsTo(this.stripWrap)[0]+C;if(!this.enableTabScroll||D<1||A<20){return ;}if(B<=H){F.scrollLeft=0;E.setWidth(H);if(this.scrolling){this.scrolling=false;this.pos.removeClass("x-tab-scrolling");this.scrollLeft.hide();this.scrollRight.hide();if(Ext.isAir||Ext.isSafari){F.style.marginLeft="";F.style.marginRight="";}}}else{if(!this.scrolling){this.pos.addClass("x-tab-scrolling");if(Ext.isAir||Ext.isSafari){F.style.marginLeft="18px";F.style.marginRight="18px";}}H-=E.getMargins("lr");E.setWidth(H>20?H:20);if(!this.scrolling){if(!this.scrollLeft){this.createScrollers();}else{this.scrollLeft.show();this.scrollRight.show();}}this.scrolling=true;if(C>(B-H)){F.scrollLeft=B-H;}else{this.scrollToTab(this.activeTab,false);}this.updateScrollButtons();}},createScrollers:function(){this.pos.addClass("x-tab-scrolling-"+this.tabPosition);var C=this.stripWrap.dom.offsetHeight;var B=this.pos.insertFirst({cls:"x-tab-scroller-left"});B.setHeight(C);B.addClassOnOver("x-tab-scroller-left-over");this.leftRepeater=new Ext.util.ClickRepeater(B,{interval:this.scrollRepeatInterval,handler:this.onScrollLeft,scope:this});this.scrollLeft=B;var A=this.pos.insertFirst({cls:"x-tab-scroller-right"});A.setHeight(C);A.addClassOnOver("x-tab-scroller-right-over");this.rightRepeater=new Ext.util.ClickRepeater(A,{interval:this.scrollRepeatInterval,handler:this.onScrollRight,scope:this});this.scrollRight=A;},getScrollWidth:function(){return this.edge.getOffsetsTo(this.stripWrap)[0]+this.getScrollPos();},getScrollPos:function(){return parseInt(this.stripWrap.dom.scrollLeft,10)||0;},getScrollArea:function(){return parseInt(this.stripWrap.dom.clientWidth,10)||0;},getScrollAnim:function(){return{duration:this.scrollDuration,callback:this.updateScrollButtons,scope:this};},getScrollIncrement:function(){return this.scrollIncrement||(this.resizeTabs?this.lastTabWidth+2:100);},scrollToTab:function(E,B){if(!E){return ;}var G=this.getTabEl(E);var C=this.getScrollPos(),F=this.getScrollArea();var D=Ext.fly(G).getOffsetsTo(this.stripWrap)[0]+C;var A=D+G.offsetWidth;if(D<C){this.scrollTo(D,B);}else{if(A>(C+F)){this.scrollTo(A-F,B);}}},scrollTo:function(A,B){this.stripWrap.scrollTo("left",A,B?this.getScrollAnim():false);if(!B){this.updateScrollButtons();}},onWheel:function(E){var D=E.getWheelDelta()*this.wheelIncrement*-1;E.stopEvent();var C=this.getScrollPos();var F=C+D;var B=this.getScrollWidth()-this.getScrollArea();var A=Math.max(0,Math.min(B,F));if(A!=C){this.scrollTo(A,false);}},onScrollRight:function(){var B=this.getScrollWidth()-this.getScrollArea();var C=this.getScrollPos();var A=Math.min(B,C+this.getScrollIncrement());if(A!=C){this.scrollTo(A,this.animScroll);}},onScrollLeft:function(){var A=this.getScrollPos();var B=Math.max(0,A-this.getScrollIncrement());if(B!=A){this.scrollTo(B,this.animScroll);}},updateScrollButtons:function(){var A=this.getScrollPos();this.scrollLeft[A==0?"addClass":"removeClass"]("x-tab-scroller-left-disabled");this.scrollRight[A>=(this.getScrollWidth()-this.getScrollArea())?"addClass":"removeClass"]("x-tab-scroller-right-disabled");},beforeDestroy:function(){if(this.items){this.items.each(function(A){if(A&&A.tabEl){Ext.get(A.tabEl).removeAllListeners();A.tabEl=null;}},this);}if(this.strip){this.strip.removeAllListeners();}Ext.TabPanel.superclass.beforeDestroy.apply(this);}});Ext.reg("tabpanel",Ext.TabPanel);Ext.TabPanel.prototype.activate=Ext.TabPanel.prototype.setActiveTab;Ext.TabPanel.AccessStack=function(){var A=[];return{add:function(B){A.push(B);if(A.length>10){A.shift();}},remove:function(C){var D=[];for(var E=0,B=A.length;E<B;E++){if(A[E]!=C){D.push(A[E]);}}A=D;},next:function(){return A.pop();}};};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-child",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(E,B){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 A,C=[this.text||"&#160;",this.type];if(B){A=this.template.insertBefore(B,C,true);}else{A=this.template.append(E,C,true);}var D=A.child(this.buttonSelector);D.on("focus",this.onFocus,this);D.on("blur",this.onBlur,this);this.initButtonEl(A,D);if(this.menu){this.el.child(this.menuClassTarget).addClass("x-btn-with-menu");}Ext.ButtonToggleMgr.register(this);},initButtonEl:function(A,C){this.el=A;A.addClass("x-btn");if(this.id){this.el.dom.id=this.el.id=this.id;}if(this.icon){C.setStyle("background-image","url("+this.icon+")");}if(this.iconCls){C.addClass(this.iconCls);if(!this.cls){A.addClass(this.text?"x-btn-text-icon":"x-btn-icon");}}if(this.tabIndex!==undefined){C.dom.tabIndex=this.tabIndex;}if(this.tooltip){if(typeof this.tooltip=="object"){Ext.QuickTips.register(Ext.apply({target:C.id},this.tooltip));}else{C.dom[this.tooltipType]=this.tooltip;}}if(this.pressed){this.el.addClass("x-btn-pressed");}if(this.handleMouseEvents){A.on("mouseover",this.onMouseOver,this);A.on("mousedown",this.onMouseDown,this);}if(this.menu){this.menu.on("show",this.onMenuShow,this);this.menu.on("hide",this.onMenuHide,this);}if(this.repeat){var B=new Ext.util.ClickRepeater(A,typeof this.repeat=="object"?this.repeat:{});B.on("click",this.onClick,this);}A.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(A){if(this.el){this.el.child(this.buttonSelector).replaceClass(this.iconCls,A);}this.iconCls=A;},beforeDestroy:function(){if(this.rendered){var A=this.el.child(this.buttonSelector);if(A){if(this.tooltip){Ext.QuickTips.unregister(A);}A.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 A=this.el.child(this.buttonSelector);if(A&&A.getWidth()>20){A.clip();A.setWidth(Ext.util.TextMetrics.measure(A,this.text).width+A.getFrameWidth("lr"));}}if(this.minWidth){if(this.el.getWidth()<this.minWidth){this.el.setWidth(this.minWidth);}}}},setHandler:function(A,B){this.handler=A;this.scope=B;},setText:function(A){this.text=A;if(this.el){this.el.child("td.x-btn-center "+this.buttonSelector).update(A);}this.autoWidth();},getText:function(){return this.text;},toggle:function(A){A=A===undefined?!this.pressed:A;if(A!=this.pressed){if(A){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,A);}}},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(A){if(A){A.preventDefault();}if(A.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,A);if(this.handler){this.handler.call(this.scope||this,this,A);}}},isMenuTriggerOver:function(A,B){return this.menu&&!B;},isMenuTriggerOut:function(A,B){return this.menu&&!B;},onMouseOver:function(A){if(!this.disabled){var B=A.within(this.el,true);if(!B){this.el.addClass("x-btn-over");if(!this.monitoringMouseOver){Ext.getDoc().on("mouseover",this.monitorMouseOver,this);this.monitoringMouseOver=true;}this.fireEvent("mouseover",this,A);}if(this.isMenuTriggerOver(A,B)){this.fireEvent("menutriggerover",this,this.menu,A);}}},monitorMouseOver:function(A){if(A.target!=this.el.dom&&!A.within(this.el)){if(this.monitoringMouseOver){Ext.getDoc().un("mouseover",this.monitorMouseOver,this);this.monitoringMouseOver=false;}this.onMouseOut(A);}},onMouseOut:function(A){var B=A.within(this.el)&&A.target!=this.el.dom;this.el.removeClass("x-btn-over");this.fireEvent("mouseout",this,A);if(this.isMenuTriggerOut(A,B)){this.fireEvent("menutriggerout",this,this.menu,A);}},onFocus:function(A){if(!this.disabled){this.el.addClass("x-btn-focus");}},onBlur:function(A){this.el.removeClass("x-btn-focus");},getClickEl:function(A,B){return this.el;},onMouseDown:function(A){if(!this.disabled&&A.button==0){this.getClickEl(A).addClass("x-btn-click");Ext.getDoc().on("mouseup",this.onMouseUp,this);}},onMouseUp:function(A){if(A.button==0){this.getClickEl(A,true).removeClass("x-btn-click");Ext.getDoc().un("mouseup",this.onMouseUp,this);}},onMenuShow:function(A){this.ignoreNextClick=0;this.el.addClass("x-btn-menu-active");this.fireEvent("menushow",this,this.menu);},onMenuHide:function(A){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 B={};function A(E,C){if(C){var D=B[E.toggleGroup];for(var F=0,G=D.length;F<G;F++){if(D[F]!=E){D[F].toggle(false);}}}}return{register:function(D){if(!D.toggleGroup){return ;}var C=B[D.toggleGroup];if(!C){C=B[D.toggleGroup]=[];}C.push(D);D.on("toggle",A);},unregister:function(D){if(!D.toggleGroup){return ;}var C=B[D.toggleGroup];if(C){C.remove(D);D.un("toggle",A);}}};}();Ext.MessageBox=function(){var C,S,G,D;var N,K,E,T,J,H,M,O;var F,B,I,R="";var Q=function(U){if(C.isVisible()){C.hide();Ext.callback(S.fn,S.scope||window,[U,B.dom.value,S],1);}};var A=function(){if(S&&S.cls){C.el.removeClass(S.cls);}J.reset();};var P=function(U,W,V){if(S&&S.closable!==false){C.hide();}if(V){V.stopEvent();}};var L=function(W){var U=0;if(!W){F.ok.hide();F.cancel.hide();F.yes.hide();F.no.hide();return U;}C.footer.dom.style.display="";for(var V in F){if(typeof F[V]!="function"){if(W[V]){F[V].show();F[V].setText(typeof W[V]=="string"?W[V]:Ext.MessageBox.buttonText[V]);U+=F[V].el.getWidth()+15;}else{F[V].hide();}}}return U;};return{getDialog:function(W){if(!C){C=new Ext.Window({autoCreate:true,title:W,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(S&&S.buttons&&S.buttons.no&&!S.buttons.cancel){Q("no");}else{Q("cancel");}}});F={};var V=this.buttonText;F.ok=C.addButton(V.ok,Q.createCallback("ok"));F.yes=C.addButton(V.yes,Q.createCallback("yes"));F.no=C.addButton(V.no,Q.createCallback("no"));F.cancel=C.addButton(V.cancel,Q.createCallback("cancel"));F.ok.hideMode=F.yes.hideMode=F.no.hideMode=F.cancel.hideMode="offsets";C.render(document.body);C.getEl().addClass("x-window-dlg");G=C.mask;N=C.body.createChild({html:'<div class="ext-mb-icon"></div><div class="ext-mb-content"><span class="ext-mb-text"></span><br /><div class="ext-mb-fix-cursor"><input type="text" class="ext-mb-input" /><textarea class="ext-mb-textarea"></textarea></div></div>'});M=Ext.get(N.dom.firstChild);var U=N.dom.childNodes[1];K=Ext.get(U.firstChild);E=Ext.get(U.childNodes[2].firstChild);E.enableDisplayMode();E.addKeyListener([10,13],function(){if(C.isVisible()&&S&&S.buttons){if(S.buttons.ok){Q("ok");}else{if(S.buttons.yes){Q("yes");}}}});T=Ext.get(U.childNodes[2].childNodes[1]);T.enableDisplayMode();J=new Ext.ProgressBar({renderTo:N});N.createChild({cls:"x-clear"});}return C;},updateText:function(Z){if(!C.isVisible()&&!S.width){C.setSize(this.maxWidth,100);}K.update(Z||"&#160;");var W=R!=""?(M.getWidth()+M.getMargins("lr")):0;var V=K.getWidth()+K.getMargins("lr");var U=C.getFrameWidth("lr");var Y=C.body.getFrameWidth("lr");if(Ext.isIE&&W>0){W+=3;}var X=Math.max(Math.min(S.width||W+V+U+Y,this.maxWidth),Math.max(S.minWidth||this.minWidth,I||0));if(S.prompt===true){B.setWidth(X-W-U-Y);}if(S.progress===true||S.wait===true){J.setSize(X-W-U-Y);}if(Ext.isIE&&X==I){X+=4;}C.setSize(X,"auto").center();return this;},updateProgress:function(V,W,U){J.updateProgress(V,W);if(U){this.updateText(U);}return this;},isVisible:function(){return C&&C.isVisible();},hide:function(){var U=C.activeGhost;if(this.isVisible()||U){C.hide();A();if(U){U.hide();}}return this;},show:function(U){if(this.isVisible()){this.hide();}S=U;var Y=this.getDialog(S.title||"&#160;");Y.setTitle(S.title||"&#160;");var X=(S.closable!==false&&S.progress!==true&&S.wait!==true);Y.tools.close.setDisplayed(X);B=E;S.prompt=S.prompt||(S.multiline?true:false);if(S.prompt){if(S.multiline){E.hide();T.show();T.setHeight(typeof S.multiline=="number"?S.multiline:this.defaultTextHeight);B=T;}else{E.show();T.hide();}}else{E.hide();T.hide();}B.dom.value=S.value||"";if(S.prompt){Y.focusEl=B;}else{var V=S.buttons;var W=null;if(V&&V.ok){W=F.ok;}else{if(V&&V.yes){W=F.yes;}}if(W){Y.focusEl=W;}}if(S.iconCls){Y.setIconClass(S.iconCls);}this.setIcon(S.icon);I=L(S.buttons);J.setVisible(S.progress===true||S.wait===true);this.updateProgress(0,S.progressText);this.updateText(S.msg);if(S.cls){Y.el.addClass(S.cls);}Y.proxyDrag=S.proxyDrag===true;Y.modal=S.modal!==false;Y.mask=S.modal!==false?G:false;if(!Y.isVisible()){document.body.appendChild(C.el.dom);Y.setAnimateTarget(S.animEl);Y.show(S.animEl);}Y.on("show",function(){if(X===true){Y.keyMap.enable();}else{Y.keyMap.disable();}},this,{single:true});if(S.wait===true){J.wait(S.waitConfig);}return this;},setIcon:function(U){if(U&&U!=""){M.removeClass("x-hidden");M.replaceClass(R,U);R=U;}else{M.replaceClass(R,"x-hidden");R="";}return this;},progress:function(U,V,W){this.show({title:U,msg:V,buttons:false,progress:true,closable:false,minWidth:this.minProgressWidth,progressText:W});return this;},wait:function(U,V,W){this.show({title:V,msg:U,buttons:false,closable:false,wait:true,modal:true,minWidth:this.minProgressWidth,waitConfig:W});return this;},alert:function(U,V,W,X){this.show({title:U,msg:V,buttons:this.OK,fn:W,scope:X});return this;},confirm:function(U,V,W,X){this.show({title:U,msg:V,buttons:this.YESNO,fn:W,scope:X,icon:this.QUESTION});return this;},prompt:function(Y,Z,V,W,X,U){this.show({title:Y,msg:Z,buttons:this.OKCANCEL,fn:V,minWidth:250,scope:W,prompt:true,multiline:X,value:U});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.Tip=Ext.extend(Ext.Panel,{minWidth:40,maxWidth:300,shadow:"sides",defaultAlign:"tl-bl?",autoRender:true,quickShowInterval:250,frame:true,hidden:true,baseCls:"x-tip",floating:{shadow:true,shim:true,useDisplay:true,constrain:false},autoHeight:true,initComponent:function(){Ext.Tip.superclass.initComponent.call(this);if(this.closable&&!this.title){this.elements+=",header";}},afterRender:function(){Ext.Tip.superclass.afterRender.call(this);if(this.closable){this.addTool({id:"close",handler:this.hide,scope:this});}},showAt:function(A){Ext.Tip.superclass.show.call(this);if(this.measureWidth!==false&&(!this.initialConfig||typeof this.initialConfig.width!="number")){this.doAutoWidth();}if(this.constrainPosition){A=this.el.adjustForConstraints(A);}this.setPagePosition(A[0],A[1]);},doAutoWidth:function(){var A=this.body.getTextWidth();if(this.title){A=Math.max(A,this.header.child("span").getTextWidth(this.title));}A+=this.getFrameWidth()+(this.closable?20:0)+this.body.getPadding("lr");this.setWidth(A.constrain(this.minWidth,this.maxWidth));if(Ext.isIE7&&!this.repainted){this.el.repaint();this.repainted=true;}},showBy:function(B,A){if(!this.rendered){this.render(Ext.getBody());}this.showAt(this.el.getAlignToXY(B,A||this.defaultAlign));},initDraggable:function(){this.dd=new Ext.Tip.DD(this,typeof this.draggable=="boolean"?null:this.draggable);this.header.addClass("x-tip-draggable");}});Ext.Tip.DD=function(A,B){Ext.apply(this,B);this.tip=A;Ext.Tip.DD.superclass.constructor.call(this,A.el.id,"WindowDD-"+A.id);this.setHandleElId(A.header.id);this.scroll=false;};Ext.extend(Ext.Tip.DD,Ext.dd.DD,{moveOnly:true,scroll:false,headerOffsets:[100,25],startDrag:function(){this.tip.el.disableShadow();},endDrag:function(A){this.tip.el.enableShadow(true);}});Ext.ToolTip=Ext.extend(Ext.Tip,{showDelay:500,hideDelay:200,dismissDelay:5000,mouseOffset:[15,18],trackMouse:false,constrainPosition:true,initComponent:function(){Ext.ToolTip.superclass.initComponent.call(this);this.lastActive=new Date();this.initTarget();},initTarget:function(){if(this.target){this.target=Ext.get(this.target);this.target.on("mouseover",this.onTargetOver,this);this.target.on("mouseout",this.onTargetOut,this);this.target.on("mousemove",this.onMouseMove,this);}},onMouseMove:function(A){this.targetXY=A.getXY();if(!this.hidden&&this.trackMouse){this.setPagePosition(this.getTargetXY());}},getTargetXY:function(){return[this.targetXY[0]+this.mouseOffset[0],this.targetXY[1]+this.mouseOffset[1]];},onTargetOver:function(A){if(this.disabled||A.within(this.target.dom,true)){return ;}this.clearTimer("hide");this.targetXY=A.getXY();this.delayShow();},delayShow:function(){if(this.hidden&&!this.showTimer){if(this.lastActive.getElapsed()<this.quickShowInterval){this.show();}else{this.showTimer=this.show.defer(this.showDelay,this);}}else{if(!this.hidden&&this.autoHide!==false){this.show();}}},onTargetOut:function(A){if(this.disabled||A.within(this.target.dom,true)){return ;}this.clearTimer("show");if(this.autoHide!==false){this.delayHide();}},delayHide:function(){if(!this.hidden&&!this.hideTimer){this.hideTimer=this.hide.defer(this.hideDelay,this);}},hide:function(){this.clearTimer("dismiss");this.lastActive=new Date();Ext.ToolTip.superclass.hide.call(this);},show:function(){this.showAt(this.getTargetXY());},showAt:function(A){this.lastActive=new Date();this.clearTimers();Ext.ToolTip.superclass.showAt.call(this,A);if(this.dismissDelay&&this.autoHide!==false){this.dismissTimer=this.hide.defer(this.dismissDelay,this);}},clearTimer:function(A){A=A+"Timer";clearTimeout(this[A]);delete this[A];},clearTimers:function(){this.clearTimer("show");this.clearTimer("dismiss");this.clearTimer("hide");},onShow:function(){Ext.ToolTip.superclass.onShow.call(this);Ext.getDoc().on("mousedown",this.onDocMouseDown,this);},onHide:function(){Ext.ToolTip.superclass.onHide.call(this);Ext.getDoc().un("mousedown",this.onDocMouseDown,this);},onDocMouseDown:function(A){if(this.autoHide!==false&&!A.within(this.el.dom)){this.disable();this.enable.defer(100,this);}},onDisable:function(){this.clearTimers();this.hide();},adjustPosition:function(B,C){var D=this.targetXY[1],A=this.getSize().height;if(this.constrainPosition&&C<=D&&(C+A)>=D){C=D-A-5;}return{x:B,y:C};},onDestroy:function(){Ext.ToolTip.superclass.onDestroy.call(this);if(this.target){this.target.un("mouseover",this.onTargetOver,this);this.target.un("mouseout",this.onTargetOut,this);this.target.un("mousemove",this.onMouseMove,this);}}});Ext.QuickTip=Ext.extend(Ext.ToolTip,{interceptTitles:false,tagConfig:{namespace:"ext",attribute:"qtip",width:"qwidth",target:"target",title:"qtitle",hide:"hide",cls:"qclass",align:"qalign"},initComponent:function(){this.target=this.target||Ext.getDoc();this.targets=this.targets||{};Ext.QuickTip.superclass.initComponent.call(this);},register:function(G){var E=Ext.isArray(G)?G:arguments;for(var F=0,B=E.length;F<B;F++){var C=E[F];var D=C.target;if(D){if(Ext.isArray(D)){for(var H=0,A=D.length;H<A;H++){this.targets[Ext.id(D[H])]=C;}}else{this.targets[Ext.id(D)]=C;}}}},unregister:function(A){delete this.targets[Ext.id(A)];},onTargetOver:function(C){if(this.disabled){return ;}this.targetXY=C.getXY();var G=C.getTarget();if(!G||G.nodeType!==1||G==document||G==document.body){return ;}if(this.activeTarget&&G==this.activeTarget.el){this.clearTimer("hide");this.show();return ;}if(G&&this.targets[G.id]){this.activeTarget=this.targets[G.id];this.activeTarget.el=G;this.delayShow();return ;}var E,D=Ext.fly(G),A=this.tagConfig;var F=A.namespace;if(this.interceptTitles&&G.title){E=G.title;G.qtip=E;G.removeAttribute("title");C.preventDefault();}else{E=G.qtip||D.getAttributeNS(F,A.attribute);}if(E){var B=D.getAttributeNS(F,A.hide);this.activeTarget={el:G,text:E,width:D.getAttributeNS(F,A.width),autoHide:B!="user"&&B!=="false",title:D.getAttributeNS(F,A.title),cls:D.getAttributeNS(F,A.cls),align:D.getAttributeNS(F,A.align)};this.delayShow();}},onTargetOut:function(A){this.clearTimer("show");if(this.autoHide!==false){this.delayHide();}},showAt:function(A){var B=this.activeTarget;if(B){if(!this.rendered){this.render(Ext.getBody());this.activeTarget=B;}if(B.width){this.setWidth(B.width);this.body.setWidth(this.adjustBodyWidth(B.width-this.getFrameWidth()));this.measureWidth=false;}else{this.measureWidth=true;}this.setTitle(B.title||"");this.body.update(B.text);this.autoHide=B.autoHide;this.dismissDelay=B.dismissDelay||this.dismissDelay;if(this.lastCls){this.el.removeClass(this.lastCls);delete this.lastCls;}if(B.cls){this.el.addClass(B.cls);this.lastCls=B.cls;}if(B.align){A=this.el.getAlignToXY(B.el,B.align);this.constrainPosition=false;}else{this.constrainPosition=true;}}Ext.QuickTip.superclass.showAt.call(this,A);},hide:function(){delete this.activeTarget;Ext.QuickTip.superclass.hide.call(this);}});Ext.QuickTips=function(){var A,B=[];return{init:function(C){if(!A){if(!Ext.isReady){Ext.onReady(function(){Ext.QuickTips.init(C);});return ;}A=new Ext.QuickTip({elements:"header,body"});if(C!==false){A.render(Ext.getBody());}}},enable:function(){if(A){B.pop();if(B.length<1){A.enable();}}},disable:function(){if(A){A.disable();}B.push(1);},isEnabled:function(){return A!==undefined&&!A.disabled;},getQuickTip:function(){return A;},register:function(){A.register.apply(A,arguments);},unregister:function(){A.unregister.apply(A,arguments);},tips:function(){A.register.apply(A,arguments);}};}();Ext.menu.Menu=function(B){if(Ext.isArray(B)){B={items:B};}Ext.apply(this,B);this.id=this.id||Ext.id();this.addEvents("beforeshow","beforehide","show","hide","click","mouseover","mouseout","itemclick");Ext.menu.MenuMgr.register(this);Ext.menu.Menu.superclass.constructor.call(this);var A=this.items;this.items=new Ext.util.MixedCollection();if(A){this.add.apply(this,A);}};Ext.extend(Ext.menu.Menu,Ext.util.Observable,{minWidth:120,shadow:"sides",subMenuAlign:"tl-tr?",defaultAlign:"tl-bl?",allowOtherMenus:false,ignoreParentClicks:false,hidden:true,createEl:function(){return new Ext.Layer({cls:"x-menu",shadow:this.shadow,constrain:false,parentEl:this.parentEl||document.body,zindex:15000});},render:function(){if(this.el){return ;}var A=this.el=this.createEl();if(!this.keyNav){this.keyNav=new Ext.menu.MenuNav(this);}if(this.plain){A.addClass("x-menu-plain");}if(this.cls){A.addClass(this.cls);}this.focusEl=A.createChild({tag:"a",cls:"x-menu-focus",href:"#",onclick:"return false;",tabIndex:"-1"});var B=A.createChild({tag:"ul",cls:"x-menu-list"});B.on("click",this.onClick,this);B.on("mouseover",this.onMouseOver,this);B.on("mouseout",this.onMouseOut,this);this.items.each(function(C){var D=document.createElement("li");D.className="x-menu-list-item";B.dom.appendChild(D);C.render(D,this);},this);this.ul=B;this.autoWidth();},autoWidth:function(){var C=this.el,D=this.ul;if(!C){return ;}var B=this.width;if(B){C.setWidth(B);}else{if(Ext.isIE){C.setWidth(this.minWidth);var A=C.dom.offsetWidth;C.setWidth(D.getWidth()+C.getFrameWidth("lr"));}}},delayAutoWidth:function(){if(this.el){if(!this.awTask){this.awTask=new Ext.util.DelayedTask(this.autoWidth,this);}this.awTask.delay(20);}},findTargetItem:function(A){var B=A.getTarget(".x-menu-list-item",this.ul,true);if(B&&B.menuItemId){return this.items.get(B.menuItemId);}},onClick:function(A){var B;if(B=this.findTargetItem(A)){if(B.menu&&this.ignoreParentClicks){B.expandMenu();}else{B.onClick(A);this.fireEvent("click",this,B,A);}}},setActiveItem:function(B,A){if(B!=this.activeItem){if(this.activeItem){this.activeItem.deactivate();}this.activeItem=B;B.activate(A);}else{if(A){B.expandMenu();}}},tryActivate:function(C,D){var A=this.items;for(var F=C,B=A.length;F>=0&&F<B;F+=D){var E=A.get(F);if(!E.disabled&&E.canActivate){this.setActiveItem(E,false);return E;}}return false;},onMouseOver:function(A){var B;if(B=this.findTargetItem(A)){if(B.canActivate&&!B.disabled){this.setActiveItem(B,true);}}this.over=true;this.fireEvent("mouseover",this,A,B);},onMouseOut:function(A){var B;if(B=this.findTargetItem(A)){if(B==this.activeItem&&B.shouldDeactivate(A)){this.activeItem.deactivate();delete this.activeItem;}}this.over=false;this.fireEvent("mouseout",this,A,B);},isVisible:function(){return this.el&&!this.hidden;},show:function(A,C,B){this.parentMenu=B;if(!this.el){this.render();}this.fireEvent("beforeshow",this);this.showAt(this.el.getAlignToXY(A,C||this.defaultAlign),B,false);},showAt:function(C,A,B){this.parentMenu=A;if(!this.el){this.render();}if(B!==false){this.fireEvent("beforeshow",this);C=this.el.adjustForConstraints(C);}this.el.setXY(C);this.el.show();this.hidden=false;this.focus();this.fireEvent("show",this);},focus:function(){if(!this.hidden){this.doFocus.defer(50,this);}},doFocus:function(){if(!this.hidden){this.focusEl.focus();}},hide:function(A){if(this.el&&this.isVisible()){this.fireEvent("beforehide",this);if(this.activeItem){this.activeItem.deactivate();this.activeItem=null;}this.el.hide();this.hidden=true;this.fireEvent("hide",this);}if(A===true&&this.parentMenu){this.parentMenu.hide(true);}},add:function(){var E=arguments,A=E.length,B;for(var D=0;D<A;D++){var C=E[D];if(C.render){B=this.addItem(C);}else{if(typeof C=="string"){if(C=="separator"||C=="-"){B=this.addSeparator();}else{B=this.addText(C);}}else{if(C.tagName||C.el){B=this.addElement(C);}else{if(typeof C=="object"){Ext.applyIf(C,this.defaults);B=this.addMenuItem(C);}}}}}return B;},getEl:function(){if(!this.el){this.render();}return this.el;},addSeparator:function(){return this.addItem(new Ext.menu.Separator());},addElement:function(A){return this.addItem(new Ext.menu.BaseItem(A));},addItem:function(A){this.items.add(A);if(this.ul){var B=document.createElement("li");B.className="x-menu-list-item";this.ul.dom.appendChild(B);A.render(B,this);this.delayAutoWidth();}return A;},addMenuItem:function(A){if(!(A instanceof Ext.menu.Item)){if(typeof A.checked=="boolean"){A=new Ext.menu.CheckItem(A);}else{A=new Ext.menu.Item(A);}}return this.addItem(A);},addText:function(A){return this.addItem(new Ext.menu.TextItem(A));},insert:function(A,C){this.items.insert(A,C);if(this.ul){var B=document.createElement("li");B.className="x-menu-list-item";this.ul.dom.insertBefore(B,this.ul.dom.childNodes[A]);C.render(B,this);this.delayAutoWidth();}return C;},remove:function(A){this.items.removeKey(A.id);A.destroy();},removeAll:function(){if(this.items){var A;while(A=this.items.first()){this.remove(A);}}},destroy:function(){this.beforeDestroy();Ext.menu.MenuMgr.unregister(this);if(this.keyNav){this.keyNav.disable();}this.removeAll();if(this.ul){this.ul.removeAllListeners();}if(this.el){this.el.destroy();}},beforeDestroy:Ext.emptyFn});Ext.menu.MenuNav=function(A){Ext.menu.MenuNav.superclass.constructor.call(this,A.el);this.scope=this.menu=A;};Ext.extend(Ext.menu.MenuNav,Ext.KeyNav,{doRelay:function(C,A){var B=C.getKey();if(!this.menu.activeItem&&C.isNavKeyPress()&&B!=C.SPACE&&B!=C.RETURN){this.menu.tryActivate(0,1);return false;}return A.call(this.scope||this,C,this.menu);},up:function(A,B){if(!B.tryActivate(B.items.indexOf(B.activeItem)-1,-1)){B.tryActivate(B.items.length-1,-1);}},down:function(A,B){if(!B.tryActivate(B.items.indexOf(B.activeItem)+1,1)){B.tryActivate(0,1);}},right:function(A,B){if(B.activeItem){B.activeItem.expandMenu(true);}},left:function(A,B){B.hide();if(B.parentMenu&&B.parentMenu.activeItem){B.parentMenu.activeItem.activate();}},enter:function(A,B){if(B.activeItem){A.stopPropagation();B.activeItem.onClick(A);B.fireEvent("click",this,B.activeItem);return true;}}});Ext.menu.MenuMgr=function(){var H,J,K={},M=false,C=new Date();function A(){H={};J=new Ext.util.MixedCollection();Ext.getDoc().addKeyListener(27,function(){if(J.length>0){F();}});}function F(){if(J&&J.length>0){var N=J.clone();N.each(function(O){O.hide();});}}function I(N){J.remove(N);if(J.length<1){Ext.getDoc().un("mousedown",B);M=false;}}function D(O){var N=J.last();C=new Date();J.add(O);if(!M){Ext.getDoc().on("mousedown",B);M=true;}if(O.parentMenu){O.getEl().setZIndex(parseInt(O.parentMenu.getEl().getStyle("z-index"),10)+3);O.parentMenu.activeChild=O;}else{if(N&&N.isVisible()){O.getEl().setZIndex(parseInt(N.getEl().getStyle("z-index"),10)+3);}}}function L(N){if(N.activeChild){N.activeChild.hide();}if(N.autoHideTimer){clearTimeout(N.autoHideTimer);delete N.autoHideTimer;}}function G(O){var N=O.parentMenu;if(!N&&!O.allowOtherMenus){F();}else{if(N&&N.activeChild){N.activeChild.hide();}}}function B(N){if(C.getElapsed()>50&&J.length>0&&!N.getTarget(".x-menu")){F();}}function E(Q,N){if(N){var O=K[Q.group];for(var P=0,R=O.length;P<R;P++){if(O[P]!=Q){O[P].setChecked(false);}}}}return{hideAll:function(){F();},register:function(N){if(!H){A();}H[N.id]=N;N.on("beforehide",L);N.on("hide",I);N.on("beforeshow",G);N.on("show",D);var O=N.group;if(O&&N.events.checkchange){if(!K[O]){K[O]=[];}K[O].push(N);N.on("checkchange",onCheck);}},get:function(N){if(typeof N=="string"){if(!H){return null;}return H[N];}else{if(N.events){return N;}else{if(typeof N.length=="number"){return new Ext.menu.Menu({items:N});}else{return new Ext.menu.Menu(N);}}}},unregister:function(N){delete H[N.id];N.un("beforehide",L);N.un("hide",I);N.un("beforeshow",G);N.un("show",D);var O=N.group;if(O&&N.events.checkchange){K[O].remove(N);N.un("checkchange",onCheck);}},registerCheckable:function(O){var N=O.group;if(N){if(!K[N]){K[N]=[];}K[N].push(O);O.on("beforecheckchange",E);}},unregisterCheckable:function(O){var N=O.group;if(N){K[N].remove(O);O.un("beforecheckchange",E);}},getCheckedItem:function(O){var N=K[O];if(N){for(var P=0,Q=N.length;P<Q;P++){if(N[P].checked){return N[P];}}}return null;},setCheckedItem:function(P,N){var O=K[P];if(O){for(var Q=0,R=O.length;Q<R;Q++){if(O[Q].id==N){O[Q].setChecked(true);}}}return null;}};}();Ext.menu.BaseItem=function(A){Ext.menu.BaseItem.superclass.constructor.call(this,A);this.addEvents("click","activate","deactivate");if(this.handler){this.on("click",this.handler,this.scope);}};Ext.extend(Ext.menu.BaseItem,Ext.Component,{canActivate:false,activeClass:"x-menu-item-active",hideOnClick:true,hideDelay:100,ctype:"Ext.menu.BaseItem",actionMode:"container",render:function(B,A){this.parentMenu=A;Ext.menu.BaseItem.superclass.render.call(this,B);this.container.menuItemId=this.id;},onRender:function(A,B){this.el=Ext.get(this.el);if(this.id){this.el.id=this.id;}A.dom.appendChild(this.el.dom);},setHandler:function(A,B){if(this.handler){this.un("click",this.handler,this.scope);}this.on("click",this.handler=A,this.scope=B);},onClick:function(A){if(!this.disabled&&this.fireEvent("click",this,A)!==false&&this.parentMenu.fireEvent("itemclick",this,A)!==false){this.handleClick(A);}else{A.stopEvent();}},activate:function(){if(this.disabled){return false;}var A=this.container;A.addClass(this.activeClass);this.region=A.getRegion().adjust(2,2,-2,-2);this.fireEvent("activate",this);return true;},deactivate:function(){this.container.removeClass(this.activeClass);this.fireEvent("deactivate",this);},shouldDeactivate:function(A){return !this.region||!this.region.contains(A.getPoint());},handleClick:function(A){if(this.hideOnClick){this.parentMenu.hide.defer(this.hideDelay,this.parentMenu,[true]);}},expandMenu:function(A){},hideMenu:function(){}});Ext.menu.Adapter=function(A,B){Ext.menu.Adapter.superclass.constructor.call(this,B);this.component=A;};Ext.extend(Ext.menu.Adapter,Ext.menu.BaseItem,{canActivate:true,onRender:function(A,B){this.component.render(A);this.el=this.component.getEl();},activate:function(){if(this.disabled){return false;}this.component.focus();this.fireEvent("activate",this);return true;},deactivate:function(){this.fireEvent("deactivate",this);},disable:function(){this.component.disable();Ext.menu.Adapter.superclass.disable.call(this);},enable:function(){this.component.enable();Ext.menu.Adapter.superclass.enable.call(this);}});Ext.menu.DateItem=function(A){Ext.menu.DateItem.superclass.constructor.call(this,new Ext.DatePicker(A),A);this.picker=this.component;this.addEvents("select");this.picker.on("render",function(B){B.getEl().swallowEvent("click");B.container.addClass("x-menu-date-item");});this.picker.on("select",this.onSelect,this);};Ext.extend(Ext.menu.DateItem,Ext.menu.Adapter,{onSelect:function(A,B){this.fireEvent("select",this,B,A);Ext.menu.DateItem.superclass.handleClick.call(this);}});Ext.menu.DateMenu=function(B){Ext.menu.DateMenu.superclass.constructor.call(this,B);this.plain=true;var A=new Ext.menu.DateItem(B);this.add(A);this.picker=A.picker;this.relayEvents(A,["select"]);this.on("beforeshow",function(){if(this.picker){this.picker.hideMonthPicker(true);}},this);};Ext.extend(Ext.menu.DateMenu,Ext.menu.Menu,{cls:"x-date-menu",beforeDestroy:function(){this.picker.destroy();}});Ext.form.Field=Ext.extend(Ext.BoxComponent,{invalidClass:"x-form-invalid",invalidText:"The value in this field is invalid",focusClass:"x-form-focus",validationEvent:"keyup",validateOnBlur:true,validationDelay:250,defaultAutoCreate:{tag:"input",type:"text",size:"20",autocomplete:"off"},fieldClass:"x-form-field",msgTarget:"qtip",msgFx:"normal",readOnly:false,disabled:false,isFormField:true,hasFocus:false,initComponent:function(){Ext.form.Field.superclass.initComponent.call(this);this.addEvents("focus","blur","specialkey","change","invalid","valid");},getName:function(){return this.rendered&&this.el.dom.name?this.el.dom.name:(this.hiddenName||"");},onRender:function(D,B){Ext.form.Field.superclass.onRender.call(this,D,B);if(!this.el){var A=this.getAutoCreate();if(!A.name){A.name=this.name||this.id;}if(this.inputType){A.type=this.inputType;}this.el=D.createChild(A,B);}var C=this.el.dom.type;if(C){if(C=="password"){C="text";}this.el.addClass("x-form-"+C);}if(this.readOnly){this.el.dom.readOnly=true;}if(this.tabIndex!==undefined){this.el.dom.setAttribute("tabIndex",this.tabIndex);}this.el.addClass([this.fieldClass,this.cls]);},initValue:function(){if(this.value!==undefined){this.setValue(this.value);}else{if(this.el.dom.value.length>0&&this.el.dom.value!=this.emptyText){this.setValue(this.el.dom.value);}}this.originalValue=this.getValue();},isDirty:function(){if(this.disabled){return false;}return String(this.getValue())!==String(this.originalValue);},afterRender:function(){Ext.form.Field.superclass.afterRender.call(this);this.initEvents();this.initValue();},fireKey:function(A){if(A.isSpecialKey()){this.fireEvent("specialkey",this,A);}},reset:function(){this.setValue(this.originalValue);this.clearInvalid();},initEvents:function(){this.el.on(Ext.isIE||Ext.isSafari3?"keydown":"keypress",this.fireKey,this);this.el.on("focus",this.onFocus,this);var A=this.inEditor&&Ext.isWindows&&Ext.isGecko?{buffer:10}:null;this.el.on("blur",this.onBlur,this,A);},onFocus:function(){if(this.focusClass){this.el.addClass(this.focusClass);}if(!this.hasFocus){this.hasFocus=true;this.startValue=this.getValue();this.fireEvent("focus",this);}},beforeBlur:Ext.emptyFn,onBlur:function(){this.beforeBlur();if(this.focusClass){this.el.removeClass(this.focusClass);}this.hasFocus=false;if(this.validationEvent!==false&&this.validateOnBlur&&this.validationEvent!="blur"){this.validate();}var A=this.getValue();if(String(A)!==String(this.startValue)){this.fireEvent("change",this,A,this.startValue);}this.fireEvent("blur",this);},isValid:function(B){if(this.disabled){return true;}var C=this.preventMark;this.preventMark=B===true;var A=this.validateValue(this.processValue(this.getRawValue()));this.preventMark=C;return A;},validate:function(){if(this.disabled||this.validateValue(this.processValue(this.getRawValue()))){this.clearInvalid();return true;}return false;},processValue:function(A){return A;},validateValue:function(A){return true;},markInvalid:function(C){if(!this.rendered||this.preventMark){return ;}this.el.addClass(this.invalidClass);C=C||this.invalidText;switch(this.msgTarget){case"qtip":this.el.dom.qtip=C;this.el.dom.qclass="x-form-invalid-tip";if(Ext.QuickTips){Ext.QuickTips.enable();}break;case"title":this.el.dom.title=C;break;case"under":if(!this.errorEl){var A=this.getErrorCt();if(!A){this.el.dom.title=C;break;}this.errorEl=A.createChild({cls:"x-form-invalid-msg"});this.errorEl.setWidth(A.getWidth(true)-20);}this.errorEl.update(C);Ext.form.Field.msgFx[this.msgFx].show(this.errorEl,this);break;case"side":if(!this.errorIcon){var A=this.getErrorCt();if(!A){this.el.dom.title=C;break;}this.errorIcon=A.createChild({cls:"x-form-invalid-icon"});}this.alignErrorIcon();this.errorIcon.dom.qtip=C;this.errorIcon.dom.qclass="x-form-invalid-tip";this.errorIcon.show();this.on("resize",this.alignErrorIcon,this);break;default:var B=Ext.getDom(this.msgTarget);B.innerHTML=C;B.style.display=this.msgDisplay;break;}this.fireEvent("invalid",this,C);},getErrorCt:function(){return this.el.findParent(".x-form-element",5,true)||this.el.findParent(".x-form-field-wrap",5,true);},alignErrorIcon:function(){this.errorIcon.alignTo(this.el,"tl-tr",[2,0]);},clearInvalid:function(){if(!this.rendered||this.preventMark){return ;}this.el.removeClass(this.invalidClass);switch(this.msgTarget){case"qtip":this.el.dom.qtip="";break;case"title":this.el.dom.title="";break;case"under":if(this.errorEl){Ext.form.Field.msgFx[this.msgFx].hide(this.errorEl,this);}break;case"side":if(this.errorIcon){this.errorIcon.dom.qtip="";this.errorIcon.hide();this.un("resize",this.alignErrorIcon,this);}break;default:var A=Ext.getDom(this.msgTarget);A.innerHTML="";A.style.display="none";break;}this.fireEvent("valid",this);},getRawValue:function(){var A=this.rendered?this.el.getValue():Ext.value(this.value,"");if(A===this.emptyText){A="";}return A;},getValue:function(){if(!this.rendered){return this.value;}var A=this.el.getValue();if(A===this.emptyText||A===undefined){A="";}return A;},setRawValue:function(A){return this.el.dom.value=(A===null||A===undefined?"":A);},setValue:function(A){this.value=A;if(this.rendered){this.el.dom.value=(A===null||A===undefined?"":A);this.validate();}},adjustSize:function(B,C){var A=Ext.form.Field.superclass.adjustSize.call(this,B,C);A.width=this.adjustWidth(this.el.dom.tagName,A.width);return A;},adjustWidth:function(B,A){B=B.toLowerCase();if(typeof A=="number"&&!Ext.isSafari){if(Ext.isIE&&(B=="input"||B=="textarea")){if(B=="input"&&!Ext.isStrict){return this.inEditor?A:A-3;}if(B=="input"&&Ext.isStrict){return A-(Ext.isIE6?4:1);}if(B=="textarea"&&Ext.isStrict){return A-2;}}else{if(Ext.isOpera&&Ext.isStrict){if(B=="input"){return A+2;}if(B=="textarea"){return A-2;}}}}return A;}});Ext.form.MessageTargets={qtip:{mark:function(A){this.el.dom.qtip=msg;this.el.dom.qclass="x-form-invalid-tip";if(Ext.QuickTips){Ext.QuickTips.enable();}},clear:function(A){this.el.dom.qtip="";}},title:{mark:function(A){this.el.dom.title=msg;},clear:function(A){this.el.dom.title="";}},under:{mark:function(A){if(!this.errorEl){var B=this.getErrorCt();if(!B){this.el.dom.title=msg;return ;}this.errorEl=B.createChild({cls:"x-form-invalid-msg"});this.errorEl.setWidth(B.getWidth(true)-20);}this.errorEl.update(msg);Ext.form.Field.msgFx[this.msgFx].show(this.errorEl,this);},clear:function(A){if(this.errorEl){Ext.form.Field.msgFx[this.msgFx].hide(this.errorEl,this);}else{this.el.dom.title="";}}},side:{mark:function(A){if(!this.errorIcon){var B=this.getErrorCt();if(!B){this.el.dom.title=msg;return ;}this.errorIcon=B.createChild({cls:"x-form-invalid-icon"});}this.alignErrorIcon();this.errorIcon.dom.qtip=msg;this.errorIcon.dom.qclass="x-form-invalid-tip";this.errorIcon.show();this.on("resize",this.alignErrorIcon,this);},clear:function(A){if(this.errorIcon){this.errorIcon.dom.qtip="";this.errorIcon.hide();this.un("resize",this.alignErrorIcon,this);}else{this.el.dom.title="";}}},around:{mark:function(A){},clear:function(A){}}};Ext.form.Field.msgFx={normal:{show:function(B,A){B.setDisplayed("block");},hide:function(B,A){B.setDisplayed(false).update("");}},slide:{show:function(B,A){B.slideIn("t",{stopFx:true});},hide:function(B,A){B.slideOut("t",{stopFx:true,useDisplay:true});}},slideRight:{show:function(B,A){B.fixDisplay();B.alignTo(A.el,"tl-tr");B.slideIn("l",{stopFx:true});},hide:function(B,A){B.slideOut("l",{stopFx:true,useDisplay:true});}}};Ext.reg("field",Ext.form.Field);Ext.form.TextField=Ext.extend(Ext.form.Field,{grow:false,growMin:30,growMax:800,vtype:null,maskRe:null,disableKeyFilter:false,allowBlank:true,minLength:0,maxLength:Number.MAX_VALUE,minLengthText:"The minimum length for this field is {0}",maxLengthText:"The maximum length for this field is {0}",selectOnFocus:false,blankText:"This field is required",validator:null,regex:null,regexText:"",emptyText:null,emptyClass:"x-form-empty-field",initComponent:function(){Ext.form.TextField.superclass.initComponent.call(this);this.addEvents("autosize","keydown","keyup","keypress");},initEvents:function(){Ext.form.TextField.superclass.initEvents.call(this);if(this.validationEvent=="keyup"){this.validationTask=new Ext.util.DelayedTask(this.validate,this);this.el.on("keyup",this.filterValidation,this);}else{if(this.validationEvent!==false){this.el.on(this.validationEvent,this.validate,this,{buffer:this.validationDelay});}}if(this.selectOnFocus||this.emptyText){this.on("focus",this.preFocus,this);this.el.on("mousedown",function(){if(!this.hasFocus){this.el.on("mouseup",function(A){A.preventDefault();},this,{single:true});}},this);if(this.emptyText){this.on("blur",this.postBlur,this);this.applyEmptyText();}}if(this.maskRe||(this.vtype&&this.disableKeyFilter!==true&&(this.maskRe=Ext.form.VTypes[this.vtype+"Mask"]))){this.el.on("keypress",this.filterKeys,this);}if(this.grow){this.el.on("keyup",this.onKeyUpBuffered,this,{buffer:50});this.el.on("click",this.autoSize,this);}if(this.enableKeyEvents){this.el.on("keyup",this.onKeyUp,this);this.el.on("keydown",this.onKeyDown,this);this.el.on("keypress",this.onKeyPress,this);}},processValue:function(B){if(this.stripCharsRe){var A=B.replace(this.stripCharsRe,"");if(A!==B){this.setRawValue(A);return A;}}return B;},filterValidation:function(A){if(!A.isNavKeyPress()){this.validationTask.delay(this.validationDelay);}},onDisable:function(){Ext.form.TextField.superclass.onDisable.call(this);if(Ext.isIE){this.el.dom.unselectable="on";}},onEnable:function(){Ext.form.TextField.superclass.onEnable.call(this);if(Ext.isIE){this.el.dom.unselectable="";}},onKeyUpBuffered:function(A){if(!A.isNavKeyPress()){this.autoSize();}},onKeyUp:function(A){this.fireEvent("keyup",this,A);},onKeyDown:function(A){this.fireEvent("keydown",this,A);},onKeyPress:function(A){this.fireEvent("keypress",this,A);},reset:function(){Ext.form.TextField.superclass.reset.call(this);this.applyEmptyText();},applyEmptyText:function(){if(this.rendered&&this.emptyText&&this.getRawValue().length<1&&!this.hasFocus){this.setRawValue(this.emptyText);this.el.addClass(this.emptyClass);}},preFocus:function(){if(this.emptyText){if(this.el.dom.value==this.emptyText){this.setRawValue("");}this.el.removeClass(this.emptyClass);}if(this.selectOnFocus){this.el.dom.select();}},postBlur:function(){this.applyEmptyText();},filterKeys:function(A){if(A.ctrlKey){return ;}var B=A.getKey();if(Ext.isGecko&&(A.isNavKeyPress()||B==A.BACKSPACE||(B==A.DELETE&&A.button==-1))){return ;}var C=A.getCharCode(),D=String.fromCharCode(C);if(!Ext.isGecko&&A.isSpecialKey()&&!D){return ;}if(!this.maskRe.test(D)){A.stopEvent();}},setValue:function(A){if(this.emptyText&&this.el&&A!==undefined&&A!==null&&A!==""){this.el.removeClass(this.emptyClass);}Ext.form.TextField.superclass.setValue.apply(this,arguments);this.applyEmptyText();this.autoSize();},validateValue:function(B){if(B.length<1||B===this.emptyText){if(this.allowBlank){this.clearInvalid();return true;}else{this.markInvalid(this.blankText);return false;}}if(B.length<this.minLength){this.markInvalid(String.format(this.minLengthText,this.minLength));return false;}if(B.length>this.maxLength){this.markInvalid(String.format(this.maxLengthText,this.maxLength));return false;}if(this.vtype){var C=Ext.form.VTypes;if(!C[this.vtype](B,this)){this.markInvalid(this.vtypeText||C[this.vtype+"Text"]);return false;}}if(typeof this.validator=="function"){var A=this.validator(B);if(A!==true){this.markInvalid(A);return false;}}if(this.regex&&!this.regex.test(B)){this.markInvalid(this.regexText);return false;}return true;},selectText:function(C,B){var F=this.getRawValue();var E=false;if(F.length>0){C=C===undefined?0:C;B=B===undefined?F.length:B;var D=this.el.dom;if(D.setSelectionRange){D.setSelectionRange(C,B);}else{if(D.createTextRange){var A=D.createTextRange();A.moveStart("character",C);A.moveEnd("character",B-F.length);A.select();}}E=Ext.isGecko||Ext.isOpera;}else{E=true;}if(E){this.focus();}},autoSize:function(){if(!this.grow||!this.rendered){return ;}if(!this.metrics){this.metrics=Ext.util.TextMetrics.createInstance(this.el);}var D=this.el;var A=D.dom.value;var C=document.createElement("div");C.appendChild(document.createTextNode(A));A=C.innerHTML;Ext.removeNode(C);C=null;A+="&#160;";var B=Math.min(this.growMax,Math.max(this.metrics.getWidth(A)+10,this.growMin));this.el.setWidth(B);this.fireEvent("autosize",this,B);}});Ext.reg("textfield",Ext.form.TextField);Ext.form.TriggerField=Ext.extend(Ext.form.TextField,{defaultAutoCreate:{tag:"input",type:"text",size:"16",autocomplete:"off"},hideTrigger:false,autoSize:Ext.emptyFn,monitorTab:true,deferHeight:true,mimicing:false,onResize:function(B,A){Ext.form.TriggerField.superclass.onResize.call(this,B,A);if(typeof B=="number"){this.el.setWidth(this.adjustWidth("input",B-this.trigger.getWidth()));}this.wrap.setWidth(this.el.getWidth()+this.trigger.getWidth());},adjustSize:Ext.BoxComponent.prototype.adjustSize,getResizeEl:function(){return this.wrap;},getPositionEl:function(){return this.wrap;},alignErrorIcon:function(){if(this.wrap){this.errorIcon.alignTo(this.wrap,"tl-tr",[2,0]);}},onRender:function(A,B){Ext.form.TriggerField.superclass.onRender.call(this,A,B);this.wrap=this.el.wrap({cls:"x-form-field-wrap"});this.trigger=this.wrap.createChild(this.triggerConfig||{tag:"img",src:Ext.BLANK_IMAGE_URL,cls:"x-form-trigger "+this.triggerClass});if(this.hideTrigger){this.trigger.setDisplayed(false);}this.initTrigger();if(!this.width){this.wrap.setWidth(this.el.getWidth()+this.trigger.getWidth());}},afterRender:function(){Ext.form.TriggerField.superclass.afterRender.call(this);var A;if(Ext.isIE&&!this.hideTrigger&&this.el.getY()!=(A=this.trigger.getY())){this.el.position();this.el.setY(A);}},initTrigger:function(){this.trigger.on("click",this.onTriggerClick,this,{preventDefault:true});this.trigger.addClassOnOver("x-form-trigger-over");this.trigger.addClassOnClick("x-form-trigger-click");},onDestroy:function(){if(this.trigger){this.trigger.removeAllListeners();this.trigger.remove();}if(this.wrap){this.wrap.remove();}Ext.form.TriggerField.superclass.onDestroy.call(this);},onFocus:function(){Ext.form.TriggerField.superclass.onFocus.call(this);if(!this.mimicing){this.wrap.addClass("x-trigger-wrap-focus");this.mimicing=true;Ext.get(Ext.isIE?document.body:document).on("mousedown",this.mimicBlur,this,{delay:10});if(this.monitorTab){this.el.on("keydown",this.checkTab,this);}}},checkTab:function(A){if(A.getKey()==A.TAB){this.triggerBlur();}},onBlur:function(){},mimicBlur:function(A){if(!this.wrap.contains(A.target)&&this.validateBlur(A)){this.triggerBlur();}},triggerBlur:function(){this.mimicing=false;Ext.get(Ext.isIE?document.body:document).un("mousedown",this.mimicBlur,this);if(this.monitorTab&&this.el){this.el.un("keydown",this.checkTab,this);}this.beforeBlur();if(this.wrap){this.wrap.removeClass("x-trigger-wrap-focus");}Ext.form.TriggerField.superclass.onBlur.call(this);},beforeBlur:Ext.emptyFn,validateBlur:function(A){return true;},onDisable:function(){Ext.form.TriggerField.superclass.onDisable.call(this);if(this.wrap){this.wrap.addClass(this.disabledClass);this.el.removeClass(this.disabledClass);}},onEnable:function(){Ext.form.TriggerField.superclass.onEnable.call(this);if(this.wrap){this.wrap.removeClass(this.disabledClass);}},onShow:function(){if(this.wrap){this.wrap.dom.style.display="";this.wrap.dom.style.visibility="visible";}},onHide:function(){this.wrap.dom.style.display="none";},onTriggerClick:Ext.emptyFn});Ext.form.TwinTriggerField=Ext.extend(Ext.form.TriggerField,{initComponent:function(){Ext.form.TwinTriggerField.superclass.initComponent.call(this);this.triggerConfig={tag:"span",cls:"x-form-twin-triggers",cn:[{tag:"img",src:Ext.BLANK_IMAGE_URL,cls:"x-form-trigger "+this.trigger1Class},{tag:"img",src:Ext.BLANK_IMAGE_URL,cls:"x-form-trigger "+this.trigger2Class}]};},getTrigger:function(A){return this.triggers[A];},initTrigger:function(){var B=this.trigger.select(".x-form-trigger",true);this.wrap.setStyle("overflow","hidden");var A=this;B.each(function(E,C,F){E.hide=function(){var G=A.wrap.getWidth();this.dom.style.display="none";A.el.setWidth(G-A.trigger.getWidth());};E.show=function(){var G=A.wrap.getWidth();this.dom.style.display="";A.el.setWidth(G-A.trigger.getWidth());};var D="Trigger"+(F+1);if(this["hide"+D]){E.dom.style.display="none";}E.on("click",this["on"+D+"Click"],this,{preventDefault:true});E.addClassOnOver("x-form-trigger-over");E.addClassOnClick("x-form-trigger-click");},this);this.triggers=B.elements;},onTrigger1Click:Ext.emptyFn,onTrigger2Click:Ext.emptyFn});Ext.reg("trigger",Ext.form.TriggerField);Ext.form.DateField=Ext.extend(Ext.form.TriggerField,{format:"m/d/Y",altFormats:"m/d/Y|n/j/Y|n/j/y|m/j/y|n/d/y|m/j/Y|n/d/Y|m-d-y|m-d-Y|m/d|m-d|md|mdy|mdY|d|Y-m-d",disabledDaysText:"Disabled",disabledDatesText:"Disabled",minText:"The date in this field must be equal to or after {0}",maxText:"The date in this field must be equal to or before {0}",invalidText:"{0} is not a valid date - it must be in the format {1}",triggerClass:"x-form-date-trigger",showToday:true,defaultAutoCreate:{tag:"input",type:"text",size:"10",autocomplete:"off"},initComponent:function(){Ext.form.DateField.superclass.initComponent.call(this);this.addEvents("select");if(typeof this.minValue=="string"){this.minValue=this.parseDate(this.minValue);}if(typeof this.maxValue=="string"){this.maxValue=this.parseDate(this.maxValue);}this.disabledDatesRE=null;this.initDisabledDays();},initDisabledDays:function(){if(this.disabledDates){var B=this.disabledDates;var C="(?:";for(var A=0;A<B.length;A++){C+=B[A];if(A!=B.length-1){C+="|";}}this.disabledDatesRE=new RegExp(C+")");}},setDisabledDates:function(A){this.disabledDates=A;this.initDisabledDays();if(this.menu){this.menu.picker.setDisabledDates(this.disabledDatesRE);}},setDisabledDays:function(A){this.disabledDays=A;if(this.menu){this.menu.picker.setDisabledDays(A);}},setMinValue:function(A){this.minValue=(typeof A=="string"?this.parseDate(A):A);if(this.menu){this.menu.picker.setMinDate(this.minValue);}},setMaxValue:function(A){this.maxValue=(typeof A=="string"?this.parseDate(A):A);if(this.menu){this.menu.picker.setMaxDate(this.maxValue);}},validateValue:function(D){D=this.formatDate(D);if(!Ext.form.DateField.superclass.validateValue.call(this,D)){return false;}if(D.length<1){return true;}var F=D;D=this.parseDate(D);if(!D){this.markInvalid(String.format(this.invalidText,F,this.format));return false;}var C=D.getTime();if(this.minValue&&C<this.minValue.getTime()){this.markInvalid(String.format(this.minText,this.formatDate(this.minValue)));return false;}if(this.maxValue&&C>this.maxValue.getTime()){this.markInvalid(String.format(this.maxText,this.formatDate(this.maxValue)));return false;}if(this.disabledDays){var B=D.getDay();for(var A=0;A<this.disabledDays.length;A++){if(B===this.disabledDays[A]){this.markInvalid(this.disabledDaysText);return false;}}}var E=this.formatDate(D);if(this.disabledDatesRE&&this.disabledDatesRE.test(E)){this.markInvalid(String.format(this.disabledDatesText,E));return false;}return true;},validateBlur:function(){return !this.menu||!this.menu.isVisible();},getValue:function(){return this.parseDate(Ext.form.DateField.superclass.getValue.call(this))||"";},setValue:function(A){Ext.form.DateField.superclass.setValue.call(this,this.formatDate(this.parseDate(A)));},parseDate:function(C){if(!C||Ext.isDate(C)){return C;}var A=Date.parseDate(C,this.format);if(!A&&this.altFormats){if(!this.altFormatsArray){this.altFormatsArray=this.altFormats.split("|");}for(var D=0,B=this.altFormatsArray.length;D<B&&!A;D++){A=Date.parseDate(C,this.altFormatsArray[D]);}}return A;},onDestroy:function(){if(this.menu){this.menu.destroy();}if(this.wrap){this.wrap.remove();}Ext.form.DateField.superclass.onDestroy.call(this);},formatDate:function(A){return Ext.isDate(A)?A.dateFormat(this.format):A;},menuListeners:{select:function(B,A){this.setValue(A);this.fireEvent("select",this,A);},show:function(){this.onFocus();},hide:function(){this.focus.defer(10,this);var A=this.menuListeners;this.menu.un("select",A.select,this);this.menu.un("show",A.show,this);this.menu.un("hide",A.hide,this);}},onTriggerClick:function(){if(this.disabled){return ;}if(this.menu==null){this.menu=new Ext.menu.DateMenu();}Ext.apply(this.menu.picker,{minDate:this.minValue,maxDate:this.maxValue,disabledDatesRE:this.disabledDatesRE,disabledDatesText:this.disabledDatesText,disabledDays:this.disabledDays,disabledDaysText:this.disabledDaysText,format:this.format,showToday:this.showToday,minText:String.format(this.minText,this.formatDate(this.minValue)),maxText:String.format(this.maxText,this.formatDate(this.maxValue))});this.menu.on(Ext.apply({},this.menuListeners,{scope:this}));this.menu.picker.setValue(this.getValue()||new Date());this.menu.show(this.el,"tl-bl?");},beforeBlur:function(){var A=this.parseDate(this.getRawValue());if(A){this.setValue(A);}}});Ext.reg("datefield",Ext.form.DateField);Ext.ProgressBar=Ext.extend(Ext.BoxComponent,{baseCls:"x-progress",animate:false,waitTimer:null,initComponent:function(){Ext.ProgressBar.superclass.initComponent.call(this);this.addEvents("update");},onRender:function(D,B){Ext.ProgressBar.superclass.onRender.call(this,D,B);var E=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(B){this.el=E.insertBefore(B,{cls:this.baseCls},true);}else{this.el=E.append(D,{cls:this.baseCls},true);}if(this.id){this.el.dom.id=this.id;}var A=this.el.dom.firstChild;this.progressBar=Ext.get(A.firstChild);if(this.textEl){this.textEl=Ext.get(this.textEl);delete this.textTopEl;}else{this.textTopEl=Ext.get(this.progressBar.dom.firstChild);var C=Ext.get(A.childNodes[1]);this.textTopEl.setStyle("z-index",99).addClass("x-hidden");this.textEl=new Ext.CompositeElement([this.textTopEl.dom.firstChild,C.dom.firstChild]);this.textEl.setWidth(A.offsetWidth);}this.progressBar.setHeight(A.offsetHeight);},afterRender:function(){Ext.ProgressBar.superclass.afterRender.call(this);if(this.value){this.updateProgress(this.value,this.text);}else{this.updateText(this.text);}},updateProgress:function(D,C,A){this.value=D||0;if(C){this.updateText(C);}if(this.rendered){var B=Math.floor(D*this.el.dom.firstChild.offsetWidth);this.progressBar.setWidth(B,A===true||(A!==false&&this.animate));if(this.textTopEl){this.textTopEl.removeClass("x-hidden").setWidth(B);}}this.fireEvent("update",this,D,C);return this;},wait:function(A){if(!this.waitTimer){var B=this;A=A||{};this.updateText(A.text);this.waitTimer=Ext.TaskMgr.start({run:function(D){var C=A.increment||10;this.updateProgress(((((D+C)%C)+1)*(100/C))*0.01,null,A.animate);},interval:A.interval||1000,duration:A.duration,onStop:function(){if(A.fn){A.fn.apply(A.scope||this);}this.reset();},scope:B});}return this;},isWaiting:function(){return this.waitTimer!=null;},updateText:function(A){this.text=A||"&#160;";if(this.rendered){this.textEl.update(this.text);}return this;},syncProgressBar:function(){if(this.value){this.updateProgress(this.value,this.text);}return this;},setSize:function(B,C){Ext.ProgressBar.superclass.setSize.call(this,B,C);if(this.textTopEl){var A=this.el.dom.firstChild;this.textEl.setSize(A.offsetWidth,A.offsetHeight);}this.syncProgressBar();return this;},reset:function(A){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(A===true){this.hide();}return this;}});Ext.reg("progress",Ext.ProgressBar);(function(){TableSort={regExp_Currency:/^[£$]/,regExp_Number:/^(\-)?[0-9\.,]+([,\.][0-9]*)?%*$/,pos:-1,uniqueHash:1,thNode:null,tableId:null,tableCache:{},tmpCache:{},sortActiveClass:"sort-active",colspan:"colspan",rowspan:"rowspan",stopEvent:function(e){e=e||window.event;if(e.stopPropagation){e.stopPropagation();e.preventDefault();}return false;},parseClassName:function(head,tbl){var colMatch=tbl.className.match(new RegExp(head+"((-[\\d]+([r]){0,1})+)"));return colMatch&&colMatch.length?colMatch[0].replace(head,"").split("-"):[];},removeTableCache:function(tableId){if(!(tableId in TableSort.tableCache)){return ;}TableSort.tableCache[tableId]=null;delete TableSort.tableCache[tableId];var tbl=document.getElementById(tableId);if(!tbl){return ;}var ths=tbl.getElementsByTagName("th");var a,th;for(var i=0;i<ths.length;i++){th=ths[i];a=th.getElementsByTagName("a");if(a.length){a[0].onkeydown=a[0].onclick=null;}th.onclick=th.onselectstart=th=a=null;}},removeTmpCache:function(tableId){if(!(tableId in TableSort.tmpCache)){return ;}var headers=TableSort.tmpCache[tableId].headers;var a,row,i,th,j;for(i=0;i<headers.length;i++){row=headers[i];for(j=0;th<row.length;j++){th=row[j];a=th.getElementsByTagName("a");if(a.length){a[0].onkeydown=a[0].onclick=null;}th.onclick=th.onselectstart=th=a=null;}}TableSort.tmpCache[tableId]=null;delete TableSort.tmpCache[tableId];},init:function(tableId){var tables=Ext.query("table");var c,ii,len,colMatch,match,columnNumSortObj,obj,workArr,headers,thtext,aclone,multi,colCnt,cel,allRowArr,rowArr,sortableTable,celCount,colspan,rowspan,rowLength;var k,tbl,i,j,th,tr,extTh,t,n,cn;var col,span,thNode;var a=document.createElement("a");a.href="#";a.className="TableSortTrigger";for(k=0;k<tables.length;k++){tbl=tables[k];if(tbl.id){TableSort.removeTableCache(tbl.id);TableSort.removeTmpCache(tbl.id);}allRowArr=tbl.getElementsByTagName("thead").length?tbl.getElementsByTagName("thead")[0].getElementsByTagName("tr"):tbl.getElementsByTagName("tr");rowArr=[];sortableTable=false;for(i=0;i<allRowArr.length;i++){tr=allRowArr[i];if(tr.getElementsByTagName("td").length||!tr.getElementsByTagName("th").length){continue;}rowArr[rowArr.length]=tr.getElementsByTagName("th");for(j=0;j<rowArr[rowArr.length-1].length;j++){th=rowArr[rowArr.length-1][j];extTh=Ext.fly(th);if(extTh.hasClass("Sortable")){Ext.fly(th).addClassOnOver("Hover");sortableTable=true;}else{if(extTh.child("span")&&extTh.child("span").hasClass("Sortable")){Ext.fly(th).addClassOnOver("Hover");Ext.fly(th).addClass("Sortable");if(extTh.child("span").hasClass("Ascending")){Ext.fly(th).addClass("Ascending");}else{if(extTh.child("span").hasClass("Descending")){Ext.fly(th).addClass("Descending");}}sortableTable=true;}}}}if(!sortableTable){continue;}if(!tbl.id){tbl.id="fd-table-"+TableSort.uniqueHash++;}columnNumSortObj={};colMatch=TableSort.parseClassName("Sortable-onload",tbl);for(match=1;match<colMatch.length;match++){columnNumSortObj[parseInt(colMatch[match],10)]={reverse:colMatch[match].search("r")!==-1};}rowLength=rowArr[0].length;for(c=0;c<rowArr[0].length;c++){if(rowArr[0][c].getAttribute(TableSort.colspan)&&rowArr[0][c].getAttribute(TableSort.colspan)>1){rowLength=rowLength+(rowArr[0][c].getAttribute(TableSort.colspan)-1);}}workArr=[];for(c=rowArr.length;c--;){workArr[c]=[];}for(c=0;c<workArr.length;c++){celCount=0;for(i=0;i<rowLength;i++){if(!workArr[c][i]){cel=rowArr[c][celCount];colspan=(cel.getAttribute(TableSort.colspan)>1)?cel.getAttribute(TableSort.colspan):1;rowspan=(cel.getAttribute(TableSort.rowspan)>1)?cel.getAttribute(TableSort.rowspan):1;for(t=0;((t<colspan)&&((i+t)<rowLength));t++){for(n=0;((n<rowspan)&&((c+n)<workArr.length));n++){workArr[(c+n)][(i+t)]=cel;}}if(++celCount===rowArr[c].length){break;}}}}for(c=0;c<workArr.length;c++){for(i=0;i<workArr[c].length;i++){if(workArr[c][i].className.search("fd-column-")===-1&&workArr[c][i].className.search("Sortable")!==-1){workArr[c][i].className=workArr[c][i].className+" fd-column-"+i;}if(workArr[c][i].className.match("Sortable")){if(i in columnNumSortObj){columnNumSortObj[i].thNode=workArr[c][i];columnNumSortObj.active=true;}thtext=TableSort.getInnerText(workArr[c][i]);for(cn=workArr[c][i].childNodes.length;cn--;){if(workArr[c][i].childNodes[cn].nodeType===1&&/^a$/i.test(workArr[c][i].childNodes[cn].nodeName)){workArr[c][i].childNodes[cn].onclick=workArr[c][i].childNodes[cn].onkeydown=null;}workArr[c][i].removeChild(workArr[c][i].childNodes[cn]);}aclone=a.cloneNode(true);aclone.appendChild(document.createTextNode(thtext));aclone.onclick=aclone.onkeydown=workArr[c][i].onclick=TableSort.initWrapper;workArr[c][i].appendChild(aclone);workArr[c][i].className=workArr[c][i].className.replace(/fd-identical|fd-not-identical/,"");aclone=null;}}}TableSort.tmpCache[tbl.id]={cols:rowLength,headers:workArr};workArr=null;multi=0;if("active" in columnNumSortObj){TableSort.tableId=tbl.id;TableSort.prepareTableData(document.getElementById(TableSort.tableId));delete columnNumSortObj.active;for(col in columnNumSortObj){obj=columnNumSortObj[col];if(!("thNode" in obj)){continue;}TableSort.multi=true;len=obj.reverse?2:1;for(ii=0;ii<len;ii++){TableSort.thNode=obj.thNode;TableSort.initSort(false,true);}}}}TableSort.thNode=aclone=a=span=columnNumSortObj=thNode=tbl=allRowArr=rowArr=null;},initWrapper:function(e){var targ;e=e||window.event;if(TableSort.thNode===null&&(e.type==="click")){targ=this;while(targ.tagName.toLowerCase()!=="th"){targ=targ.parentNode;}TableSort.thNode=targ;while(targ.tagName.toLowerCase()!=="table"){targ=targ.parentNode;}TableSort.tableId=targ.id;TableSort.addSortActiveClass();setTimeout(TableSort.initSort,5,false);return TableSort.stopEvent(e);}},addSortActiveClass:function(){if(TableSort.thNode===null){return ;}TableSort.addClass(TableSort.thNode,TableSort.sortActiveClass);TableSort.addClass(document.getElementsByTagName("body")[0],TableSort.sortActiveClass);},removeSortActiveClass:function(){if(TableSort.thNode===null){return ;}TableSort.removeClass(TableSort.thNode,TableSort.sortActiveClass);TableSort.removeClass(document.getElementsByTagName("body")[0],TableSort.sortActiveClass);},addClass:function(e,c){Ext.fly(e).addClass(c);},removeClass:function(e,c){Ext.fly(e).removeClass(c);},prepareTableData:function(table){var data=[];var start=table.getElementsByTagName("tbody");start=start.length?start[0]:table;var trs=start.rows;var ths=table.getElementsByTagName("th");var numberOfRows=trs.length;var numberOfCols=TableSort.tmpCache[table.id].cols;data=[];var identical=[];var identVal=[];for(var tmp=0;tmp<numberOfCols;tmp++){identical[tmp]=true;}var tr,td,th,txt,tds,col,row;var re=new RegExp(/fd-column-([0-9]+)/);var rowCnt=0;var sortableColumnNumbers=[];for(tmp=0;tmp<ths.length;tmp++){th=ths[tmp];if(th.className.search(re)===-1){continue;}sortableColumnNumbers[sortableColumnNumbers.length]=th;}for(row=0;row<numberOfRows;row++){tr=trs[row];if(tr.parentNode!==start||tr.getElementsByTagName("th").length||(tr.parentNode&&tr.parentNode.tagName.toLowerCase().search(/thead|tfoot/)!==-1)){continue;}data[rowCnt]=[];tds=tr.cells;for(tmp=0;tmp<sortableColumnNumbers.length;tmp++){th=sortableColumnNumbers[tmp];col=th.className.match(re)[1];td=tds[col];txt=TableSort.getInnerText(td)+" ";txt=txt.replace(/^\s+/,"").replace(/\s+$/,"");if(th.className.search(/Sortable-date/)!==-1){txt=TableSort.dateFormat(txt,th.className.search(/Sortable-date-dmy/)!==-1);}else{if(th.className.search(/Sortable-numeric|Sortable-currency/)!==-1){if((txt.match(/,/)&&txt.match(/\[^.]/))||(txt.indexOf(".")<txt.indexOf(","))){txt=txt.replace(/[^0-9\,\-]/g,"");txt=txt.replace(/,/,".");}else{txt=txt.replace(/[^0-9\.\-]/g,"");}txt=parseFloat(txt);if(isNaN(txt)){txt="";}}else{if(th.className.search(/Sortable-text/)!==-1){txt=txt.toLowerCase();}else{if(th.className.search(/Sortable-keep/)!==-1){txt=rowCnt;}else{if(th.className.search(/Sortable-([a-zA-Z\_]+)/)!==-1){if((th.className.match(/Sortable-([a-zA-Z\_]+)/)[1]+"PrepareData") in window){txt=window[th.className.match(/Sortable-([a-zA-Z\_]+)/)[1]+"PrepareData"](td,txt);}}else{if(txt!==""){TableSort.removeClass(th,"Sortable");if(TableSort.dateFormat(txt)!==0){TableSort.addClass(th,"Sortable-date");txt=TableSort.dateFormat(txt);}else{if(txt.search(TableSort.regExp_Number)!==-1||txt.search(TableSort.regExp_Currency)!==-1){TableSort.addClass(th,"Sortable-numeric");if((txt.match(/,/)&&txt.match(/\[^.]/))||(txt.indexOf(".")<txt.indexOf(","))){txt=txt.replace(/[^0-9\,\-]/g,"");txt=txt.replace(/,/,".");}else{txt=txt.replace(/[^0-9\.\-]/g,"");}txt=parseFloat(txt);if(isNaN(txt)){txt="";}}else{TableSort.addClass(th,"Sortable-text");txt=txt.toLowerCase();}}}}}}}}if(rowCnt>0&&identical[col]&&identVal[col]!==txt){identical[col]=false;}identVal[col]=txt;data[rowCnt][col]=txt;}data[rowCnt][numberOfCols]=tr;rowCnt++;}var rowStyle="Odd";TableSort.tableCache[table.id]={hook:start,thList:[],colOrder:{},data:data,identical:identical,rowStyle:rowStyle};sortableColumnNumbers=data=tr=td=th=trs=identical=identVal=null;},addThNode:function(){var dataObj=TableSort.tableCache[TableSort.tableId];var pos=TableSort.thNode.className.match(/fd-column-([0-9]+)/)[1];var alt=false;var len,i,n,th,z,span,classToAdd;if(dataObj.colStyle){len=dataObj.thList.length;for(i=0;i<len;i++){dataObj.colOrder[dataObj.thList[i].className.match(/fd-column-([0-9]+)/)[1]]=false;}}if(dataObj.thList.length&&dataObj.thList[0]===TableSort.thNode){alt=true;}dataObj.thList=[];var found=false;var l=dataObj.thList.length;for(i=0;i<dataObj.thList.length;i++){n=dataObj.thList[i];if(n===TableSort.thNode){found=true;break;}}if(!found){dataObj.thList.push(TableSort.thNode);if(dataObj.colStyle){dataObj.colOrder[pos]=true;}}var ths=document.getElementById(TableSort.tableId).getElementsByTagName("th");for(i=0;i<ths.length;i++){th=ths[i];found=false;for(z=0;z<dataObj.thList.length;z++){n=dataObj.thList[z];if(n===th){found=true;break;}}if(!found){TableSort.removeClass(th,["Ascending","Descending"]);if(!dataObj.noArrow){span=th.getElementsByTagName("span");if(span.length){span=span[0];while(span.firstChild){span.removeChild(span.firstChild);}}}}}if(dataObj.thList.length>1){classToAdd=TableSort.thNode.className.search(/Ascending/)!==-1?"Descending":"Ascending";TableSort.removeClass(TableSort.thNode,["Ascending","Descending"]);TableSort.addClass(TableSort.thNode,classToAdd);dataObj.pos=-1;}else{if(alt){dataObj.pos=TableSort.thNode;}}},initSort:function(noCallback,ident){var thNode=TableSort.thNode;var tableElem=document.getElementById(TableSort.tableId);var js,l,cnt,e,d,th,p,f,i;if(!(TableSort.tableId in TableSort.tableCache)){TableSort.prepareTableData(document.getElementById(TableSort.tableId));}TableSort.addThNode();TableSort.pos=thNode.className.match(/fd-column-([0-9]+)/)[1];var dataObj=TableSort.tableCache[tableElem.id];var lastPos=dataObj.pos&&dataObj.pos.className?dataObj.pos.className.match(/fd-column-([0-9]+)/)[1]:-1;var len1=dataObj.data.length;var len2=dataObj.data.length>0?dataObj.data[0].length-1:0;var identical=dataObj.identical[TableSort.pos];var classToAdd="Ascending";if(dataObj.thList.length>1){js="var sortWrapper = function(a,b) {\n";l=dataObj.thList.length;cnt=0;for(i=0;i<l;i++){th=dataObj.thList[i];p=th.className.match(/fd-column-([0-9]+)/)[1];if(dataObj.identical[p]){continue;}cnt++;if(th.className.match(/Sortable-(numeric|currency|date|keep)/)){f="TableSort.sortNumeric";}else{if(th.className.match("Sortable-text")){f="TableSort.sortText";}else{if(th.className.search(/Sortable-([a-zA-Z\_]+)/)!==-1&&th.className.match(/Sortable-([a-zA-Z\_]+)/)[1] in window){f="window['"+th.className.match(/Sortable-([a-zA-Z\_]+)/)[1]+"']";}else{f="TableSort.sortText";}}}e="e"+i;d=th.className.search("Ascending")!==-1?"a,b":"b,a";js+="TableSort.pos = "+p+";\n";js+="var "+e+" = "+f+"("+d+");\n";js+="if("+e+") return "+e+";\n";js+="else { \n";}js+="return 0;\n";for(i=0;i<cnt;i++){js+="};\n";}if(cnt){js+="return 0;\n";}js+="};\n";eval(js);identical=false;}else{if((lastPos===TableSort.pos&&!identical)||(thNode.className.search(/Sortable-keep/)!==-1&&lastPos===-1)){dataObj.data.reverse();classToAdd=thNode.className.search(/Descending/)!==-1?"Ascending":"Descending";if(thNode.className.search(/Sortable-keep/)!==-1&&lastPos===-1){TableSort.tableCache[tableElem.id].pos=thNode;}}else{TableSort.tableCache[tableElem.id].pos=thNode;classToAdd=thNode.className.search(/Ascending/)!==-1?"Descending":"Ascending";if(!identical){if(thNode.className.match(/Sortable-(numeric|currency|date|keep)/)){dataObj.data.sort(TableSort.sortNumeric);}else{if(thNode.className.match("Sortable-text")){dataObj.data.sort(TableSort.sortText);}else{if(thNode.className.search(/Sortable-([a-zA-Z\_]+)/)!==-1&&thNode.className.match(/Sortable-([a-zA-Z\_]+)/)[1] in window){dataObj.data.sort(window[thNode.className.match(/Sortable-([a-zA-Z\_]+)/)[1]]);}}}if(thNode.className.search(/(^|\s)ReverseSort($|\s)/)!==-1){classToAdd=classToAdd==="Ascending"?"Descending":"Ascending";dataObj.data.reverse();}}}}if(ident){identical=false;}if(dataObj.thList.length===1){TableSort.removeClass(thNode,["Ascending","Descending"]);TableSort.addClass(thNode,classToAdd);}if(!dataObj.rowStyle&&!dataObj.colStyle&&identical){TableSort.removeSortActiveClass();TableSort.thNode=null;return ;}TableSort.redraw(TableSort.tableId,identical);TableSort.removeSortActiveClass();TableSort.thNode=null;},redraw:function(tableid,identical){if(!tableid||!(tableid in TableSort.tableCache)){return ;}var dataObj=TableSort.tableCache[tableid];var data=dataObj.data;var len1=data.length;var len2=len1?data[0].length-1:0;var hook=dataObj.hook;var rowStyle=true;var colOrder=dataObj.colOrder;var highLight=0;var tr,tds;for(var i=0;i<len1;i++){tr=data[i][len2];if(!identical){if(rowStyle){TableSort.removeClass(tr,["Even","Odd"]);if(highLight++%2===0){TableSort.addClass(tr,"Even");}else{TableSort.addClass(tr,"Odd");}}hook.appendChild(tr);}}tr=tds=hook=null;},getInnerText:function(el){if(typeof (el)==="string"||typeof (el)==="undefined"){return el;}if(el.innerText){return el.innerText;}var txt="",i;for(i=el.firstChild;i;i=i.nextSibling){if(i.nodeType===3){txt+=i.nodeValue;}else{if(i.nodeType===1){txt+=TableSort.getInnerText(i);}}}return txt;},dateFormat:function(dateIn,favourDMY){var res,y,m,d;var dateTest=[{regExp:/^(0?[1-9]|[12][0-9]|3[01])([- \/\.])(0?[1-9]|1[012])([- \/\.])((\d\d)?\d\d)$/,d:1,m:3,y:5}];var start,cnt=0,numFormats=dateTest.length;while(cnt<numFormats){start=(cnt+(favourDMY?numFormats+1:numFormats))%numFormats;if(dateIn.match(dateTest[start].regExp)){res=dateIn.match(dateTest[start].regExp);y=res[dateTest[start].y];m=res[dateTest[start].m];d=res[dateTest[start].d];if(m.length===1){m="0"+String(m);}if(d.length===1){d="0"+String(d);}if(y.length!==4){y=(parseInt(y,10)<50)?"20"+String(y):"19"+String(y);}return y+String(m)+d;}cnt++;}return 0;},sortNumeric:function(a,b){var aa=a[TableSort.pos];var bb=b[TableSort.pos];if(aa===bb){return 0;}if(aa===""&&!isNaN(bb)){return -1;}if(bb===""&&!isNaN(aa)){return 1;}return aa-bb;},sortText:function(a,b){var aa=a[TableSort.pos];var bb=b[TableSort.pos];if(aa===bb){return 0;}if(aa<bb){return -1;}return 1;}};})();Ext.state.Manager.setProvider(new Ext.state.CookieProvider());var Localize=(function(){var F="Pagage needs translation: ";var D="Pagage exists, but string needs translation: ";var C="Property doesn't exist: ";if(typeof (translations)!=="object"||typeof (translation_properties)!=="object"){alert("File containing translation object and properties object\n must be loaded prior to this JS file...");return false;}var B=function(G){if(typeof (translation_properties[G])==="undefined"){return false;}else{return true;}};var E=function(G){if(typeof (translations[G])==="undefined"){return false;}else{return true;}};var A=function(H,G){if(typeof (translations[H][G])==="undefined"){return false;}else{return true;}};return{getProperty:function(G){if(!B(G)){return C+G;}else{return translation_properties[G];}},getString:function(H,G){if(!E(H)){return F+H;}else{if(!A(H,G)){return D+H+":"+G;}else{return translations[H][G];}}},getPackage:function(I,H){H=typeof (H)==="undefined"?false:H;var G=[];if(!E(I)){return F+I;}else{if(!H){return translations[I];}else{for(x in translations[I]){G.push(translations[I][x]);}return G;}}}};})();var defaultConfiguration={showExternalLinkNotice:false,enableSortableTables:false};function ExternalLinkNotice(){this.notice=null;this.init=function(){var A=Ext.query("a");Ext.each(A,function(B){if(B.href.indexOf(document.domain)===-1&&B.href.indexOf("mailto:")===-1){Ext.fly(B).on({mouseover:{fn:this.showNotice,scope:this},mouseout:{fn:this.removeNotice,scope:this}});}},this);};this.showNotice=function(H,B,C){var I,G={},A,E,F;var D={tag:"div",cls:"LinkNotice",children:[{tag:"h2",html:Localize.getString("link_notice","headline")},{tag:"p",html:Localize.getString("link_notice","text")}]};this.notice=Ext.DomHelper.append(Ext.getBody(),D,true);I=this.notice.getSize();E=this;document.onmousemove=function(J){var K={};if(!J){J=window.event;}if(J.pageX||J.pageY){K.x=J.pageX;K.y=J.pageY-(I.height+30);}else{if(J.clientX||J.clientY){K.x=J.clientX+document.body.scrollLeft+document.documentElement.scrollLeft;K.y=J.clientY+document.body.scrollTop+document.documentElement.scrollTop-(I.height+30);}}E.notice.setXY([K.x+20,K.y+20]);E.notice.show();};};this.removeNotice=function(){this.notice.remove();document.onmousemove=null;};}function Accordion(B){var A=null;Ext.onReady(function(){this.accordion=new Ext.Panel({renderTo:B.renderTo,layout:"accordion",border:false,defaults:{border:false},layoutConfig:{titleCollapse:false,animate:false,activeOnTop:false,renderHidden:false,fill:false,autoWidth:true},items:B.items});});}function CustomWindow(A){Ext.onReady(function(){var D=null;var B;var C=[];if(A.confirmDialog){this.okBtn=new Ext.Button({text:Localize.getString("buttons","ok"),scope:this,handler:A.okFn?A.okFn:function(){this.win.close();}});C.push(this.okBtn);if(!A.disableCancel){C.push(new Ext.Button({text:Localize.getString("buttons","cancel"),scope:this,handler:A.cancelFn?A.cancelFn:function(){this.win.close();}}));}}else{C=null;}this.win=new Ext.Window({closable:false,tools:[{scope:this,id:"close",handler:A.cancelFn?A.cancelFn:function(){this.win.close();}}],width:600,height:"auto",modal:true,title:A.title,html:A.html,bodyStyle:"padding: 10px 10px 0 10px;",draggable:false,resizable:false,shadow:false,autoLoad:A.loadUrl?A.loadUrl:null,buttons:C});this.win.show();if(A.confirmDialog){if(this.okBtn!==null){test=this.okBtn;this.okBtn.focus();}}return D;},this,true);}var DateSelector=function(A){var B=Ext.query(".DateSelector");if(B){Ext.apply(Ext.DatePicker.prototype,{monthNames:Localize.getPackage("months",true),dayNames:Localize.getPackage("days",true),nextText:Localize.getString("calendar","next_month_tooltip"),prevText:Localize.getString("calendar","previous_month_tooltip"),monthYearText:Localize.getString("calendar","select_month_and_year_tooltip"),okText:Localize.getString("calendar","ok_button"),cancelText:Localize.getString("calendar","cancel_button"),startDay:Localize.getProperty("first_day_in_week"),todayText:Localize.getString("calendar","today")});}Ext.each(B,function(C){var E=Ext.fly(C);var D=new Ext.form.DateField({applyTo:C,showToday:true,format:"d.m.Y",minValue:E.hasClass("DisableDays")?new Date().add(Date.YEAR,-5):null,maxValue:E.hasClass("DisableDays")?new Date():null});D.wrap.dom.style.display="inline";if(Ext.isGecko){D.wrap.dom.style.paddingRight="18px";}});};var toolTip=function(C,A,B){Ext.onReady(function(){Ext.fly(C).dom.style.cursor="help";new Ext.ToolTip({target:C,html:"<h2>"+A+"</h2><p>"+B+"</p>",floating:true,shadow:false,dismissDelay:0});});};var Tabs=function(C){var D,F,A,E;function B(){if(!C.padding){return{bodyStyle:Ext.isGecko?"padding-left: 1px; padding-top: 0px; padding-bottom: 0px; padding-right: 0px;":"padding: 0px"};}else{return{bodyStyle:"padding-top: 6px; padding-left: 6px; padding-right: 6px;"};}}Ext.onReady(function(){this.tabs=new Ext.TabPanel({id:C.id,applyTo:C.renderTo,defaults:B(),activeTab:C.activeTab!=="undefined"?C.activeTab:0,deferredRender:false,plain:C.hasHeader,bodyBorder:C.border,border:C.border,hideBorders:true,items:C.items,height:"auto",stateEvents:["tabchange"],getState:function(){return{activeTab:this.items.indexOf(this.getActiveTab())};},stateful:true});if(Ext.isIE6){F=C.items[0].contentEl;A=Ext.fly(F).getHeight();E=tab.getFrameHeight();tab.setHeight(A+E);}},this,true);return this.tabs;};Ext.onReady(function(){var B={};var C;if(typeof (setupConfiguration)==="undefined"){setupConfiguration={};}Ext.apply(B,setupConfiguration,defaultConfiguration);if(B.showExternalLinkNotice){C=new ExternalLinkNotice();C.init();}if(B.enableSortableTables){TableSort.init();}var A=new DateSelector();});
