Ext={version:"2.1"};window["undefined"]=window["undefined"];Ext.apply=function(G,F,H){if(H){Ext.apply(G,H)}if(G&&F&&typeof F=="object"){for(var E in F){G[E]=F[E]}}return G};(function(){var idSeed=0;var ua=navigator.userAgent.toLowerCase();var isStrict=document.compatMode=="CSS1Compat",isOpera=ua.indexOf("opera")>-1,isSafari=(/webkit|khtml/).test(ua),isSafari3=isSafari&&ua.indexOf("webkit/5")!=-1,isIE=!isOpera&&ua.indexOf("msie")>-1,isIE7=!isOpera&&ua.indexOf("msie 7")>-1,isGecko=!isSafari&&ua.indexOf("gecko")>-1,isBorderBox=isIE&&!isStrict,isWindows=(ua.indexOf("windows")!=-1||ua.indexOf("win32")!=-1),isMac=(ua.indexOf("macintosh")!=-1||ua.indexOf("mac os x")!=-1),isAir=(ua.indexOf("adobeair")!=-1),isLinux=(ua.indexOf("linux")!=-1),isSecure=window.location.href.toLowerCase().indexOf("https")===0;if(isIE&&!isIE7){try{document.execCommand("BackgroundImageCache",false,true)}catch(e){}}Ext.apply(Ext,{isStrict:isStrict,isSecure:isSecure,isReady:false,enableGarbageCollector:true,enableListenerCollection:false,SSL_SECURE_URL:"javascript:false",BLANK_IMAGE_URL:"http://extjs.com/s.gif",emptyFn:function(){},applyIf:function(o,c){if(o&&c){for(var p in c){if(typeof o[p]=="undefined"){o[p]=c[p]}}}return o},addBehaviors:function(o){if(!Ext.isReady){Ext.onReady(function(){Ext.addBehaviors(o)});return }var cache={};for(var b in o){var parts=b.split("@");if(parts[1]){var s=parts[0];if(!cache[s]){cache[s]=Ext.select(s)}cache[s].on(parts[1],o[b])}}cache=null},id:function(el,prefix){prefix=prefix||"ext-gen";el=Ext.getDom(el);var id=prefix+(++idSeed);return el?(el.id?el.id:(el.id=id)):id},extend:function(){var io=function(o){for(var m in o){this[m]=o[m]}};var oc=Object.prototype.constructor;return function(sb,sp,overrides){if(typeof sp=="object"){overrides=sp;sp=sb;sb=overrides.constructor!=oc?overrides.constructor:function(){sp.apply(this,arguments)}}var F=function(){},sbp,spp=sp.prototype;F.prototype=spp;sbp=sb.prototype=new F();sbp.constructor=sb;sb.superclass=spp;if(spp.constructor==oc){spp.constructor=sp}sb.override=function(o){Ext.override(sb,o)};sbp.override=io;Ext.override(sb,overrides);sb.extend=function(o){Ext.extend(sb,o)};return sb}}(),override:function(origclass,overrides){if(overrides){var p=origclass.prototype;for(var method in overrides){p[method]=overrides[method]}}},namespace:function(){var a=arguments,o=null,i,j,d,rt;for(i=0;i<a.length;++i){d=a[i].split(".");rt=d[0];eval("if (typeof "+rt+' == "undefined"){'+rt+" = {};} o = "+rt+";");for(j=1;j<d.length;++j){o[d[j]]=o[d[j]]||{};o=o[d[j]]}}},urlEncode:function(o){if(!o){return""}var buf=[];for(var key in o){var ov=o[key],k=encodeURIComponent(key);var type=typeof ov;if(type=="undefined"){buf.push(k,"=&")}else{if(type!="function"&&type!="object"){buf.push(k,"=",encodeURIComponent(ov),"&")}else{if(Ext.isArray(ov)){if(ov.length){for(var i=0,len=ov.length;i<len;i++){buf.push(k,"=",encodeURIComponent(ov[i]===undefined?"":ov[i]),"&")}}else{buf.push(k,"=&")}}}}}buf.pop();return buf.join("")},urlDecode:function(string,overwrite){if(!string||!string.length){return{}}var obj={};var pairs=string.split("&");var pair,name,value;for(var i=0,len=pairs.length;i<len;i++){pair=pairs[i].split("=");name=decodeURIComponent(pair[0]);value=decodeURIComponent(pair[1]);if(overwrite!==true){if(typeof obj[name]=="undefined"){obj[name]=value}else{if(typeof obj[name]=="string"){obj[name]=[obj[name]];obj[name].push(value)}else{obj[name].push(value)}}}else{obj[name]=value}}return obj},each:function(array,fn,scope){if(!Ext.isArray(array)){array=[array]}for(var i=0,len=array.length;i<len;i++){if(fn.call(scope||array[i],array[i],i,array)===false){return i}}},combine:function(){var as=arguments,l=as.length,r=[];for(var i=0;i<l;i++){var a=as[i];if(Ext.isArray(a)){r=r.concat(a)}else{if(a.length!==undefined&&!a.substr){r=r.concat(Array.prototype.slice.call(a,0))}else{r.push(a)}}}return r},escapeRe:function(s){return s.replace(/([.*+?^${}()|[\]\/\\])/g,"\\$1")},callback:function(cb,scope,args,delay){if(typeof cb=="function"){if(delay){cb.defer(delay,scope,args||[])}else{cb.apply(scope,args||[])}}},getDom:function(el){if(!el||!document){return null}return el.dom?el.dom:(typeof el=="string"?document.getElementById(el):el)},getDoc:function(){return Ext.get(document)},getBody:function(){return Ext.get(document.body||document.documentElement)},getCmp:function(id){return Ext.ComponentMgr.get(id)},num:function(v,defaultValue){if(typeof v!="number"){return defaultValue}return v},destroy:function(){for(var i=0,a=arguments,len=a.length;i<len;i++){var as=a[i];if(as){if(typeof as.destroy=="function"){as.destroy()}else{if(as.dom){as.removeAllListeners();as.remove()}}}}},removeNode:isIE?function(){var d;return function(n){if(n&&n.tagName!="BODY"){d=d||document.createElement("div");d.appendChild(n);d.innerHTML=""}}}():function(n){if(n&&n.parentNode&&n.tagName!="BODY"){n.parentNode.removeChild(n)}},type:function(o){if(o===undefined||o===null){return false}if(o.htmlElement){return"element"}var t=typeof o;if(t=="object"&&o.nodeName){switch(o.nodeType){case 1:return"element";case 3:return(/\S/).test(o.nodeValue)?"textnode":"whitespace"}}if(t=="object"||t=="function"){switch(o.constructor){case Array:return"array";case RegExp:return"regexp"}if(typeof o.length=="number"&&typeof o.item=="function"){return"nodelist"}}return t},isEmpty:function(v,allowBlank){return v===null||v===undefined||(!allowBlank?v==="":false)},value:function(v,defaultValue,allowBlank){return Ext.isEmpty(v,allowBlank)?defaultValue:v},isArray:function(v){return v&&typeof v.pop=="function"},isDate:function(v){return v&&typeof v.getFullYear=="function"},isOpera:isOpera,isSafari:isSafari,isSafari3:isSafari3,isSafari2:isSafari&&!isSafari3,isIE:isIE,isIE6:isIE&&!isIE7,isIE7:isIE7,isGecko:isGecko,isBorderBox:isBorderBox,isLinux:isLinux,isWindows:isWindows,isMac:isMac,isAir:isAir,useShims:((isIE&&!isIE7)||(isGecko&&isMac))});Ext.ns=Ext.namespace})();Ext.ns("Ext","Ext.util","Ext.grid","Ext.dd","Ext.tree","Ext.data","Ext.form","Ext.menu","Ext.state","Ext.lib","Ext.layout","Ext.app","Ext.ux");Ext.apply(Function.prototype,{createCallback:function(){var C=arguments;var D=this;return function(){return D.apply(window,C)}},createDelegate:function(G,H,E){var F=this;return function(){var A=H||arguments;if(E===true){A=Array.prototype.slice.call(arguments,0);A=A.concat(H)}else{if(typeof E=="number"){A=Array.prototype.slice.call(arguments,0);var B=[E,0].concat(H);Array.prototype.splice.apply(A,B)}}return F.apply(G||window,A)}},defer:function(I,G,J,F){var H=this.createDelegate(G,J,F);if(I){return setTimeout(H,I)}H();return 0},createSequence:function(F,D){if(typeof F!="function"){return this}var E=this;return function(){var A=E.apply(this||window,arguments);F.apply(D||this||window,arguments);return A}},createInterceptor:function(F,D){if(typeof F!="function"){return this}var E=this;return function(){F.target=this;F.method=E;if(F.apply(D||this||window,arguments)===false){return }return E.apply(this||window,arguments)}}});Ext.applyIf(String,{escape:function(B){return B.replace(/('|\\)/g,"\\$1")},leftPad:function(F,H,G){var E=new String(F);if(!G){G=" "}while(E.length<H){E=G+E}return E.toString()},format:function(D){var C=Array.prototype.slice.call(arguments,1);return D.replace(/\{(\d+)\}/g,function(B,A){return C[A]})}});String.prototype.toggle=function(D,C){return this==D?C:D};String.prototype.trim=function(){var B=/^\s+|\s+$/g;return function(){return this.replace(B,"")}}();Ext.applyIf(Number.prototype,{constrain:function(D,C){return Math.min(Math.max(this,D),C)}});Ext.applyIf(Array.prototype,{indexOf:function(E){for(var F=0,D=this.length;F<D;F++){if(this[F]==E){return F}}return -1},remove:function(D){var C=this.indexOf(D);if(C!=-1){this.splice(C,1)}return this}});Date.prototype.getElapsed=function(B){return Math.abs((B||new Date()).getTime()-this.getTime())};(function(){var H;Ext.lib.Dom={getViewWidth:function(A){return A?this.getDocumentWidth():this.getViewportWidth()},getViewHeight:function(A){return A?this.getDocumentHeight():this.getViewportHeight()},getDocumentHeight:function(){var A=(document.compatMode!="CSS1Compat")?document.body.scrollHeight:document.documentElement.scrollHeight;return Math.max(A,this.getViewportHeight())},getDocumentWidth:function(){var A=(document.compatMode!="CSS1Compat")?document.body.scrollWidth:document.documentElement.scrollWidth;return Math.max(A,this.getViewportWidth())},getViewportHeight:function(){if(Ext.isIE){return Ext.isStrict?document.documentElement.clientHeight:document.body.clientHeight}else{return self.innerHeight}},getViewportWidth:function(){if(Ext.isIE){return Ext.isStrict?document.documentElement.clientWidth:document.body.clientWidth}else{return self.innerWidth}},isAncestor:function(B,A){B=Ext.getDom(B);A=Ext.getDom(A);if(!B||!A){return false}if(B.contains&&!Ext.isSafari){return B.contains(A)}else{if(B.compareDocumentPosition){return !!(B.compareDocumentPosition(A)&16)}else{var C=A.parentNode;while(C){if(C==B){return true}else{if(!C.tagName||C.tagName.toUpperCase()=="HTML"){return false}}C=C.parentNode}return false}}},getRegion:function(A){return Ext.lib.Region.getRegion(A)},getY:function(A){return this.getXY(A)[1]},getX:function(A){return this.getXY(A)[0]},getXY:function(V){var W,R,D,C,S=(document.body||document.documentElement);V=Ext.getDom(V);if(V==S){return[0,0]}if(V.getBoundingClientRect){D=V.getBoundingClientRect();C=G(document).getScroll();return[D.left+C.left,D.top+C.top]}var B=0,Q=0;W=V;var X=G(V).getStyle("position")=="absolute";while(W){B+=W.offsetLeft;Q+=W.offsetTop;if(!X&&G(W).getStyle("position")=="absolute"){X=true}if(Ext.isGecko){R=G(W);var A=parseInt(R.getStyle("borderTopWidth"),10)||0;var U=parseInt(R.getStyle("borderLeftWidth"),10)||0;B+=U;Q+=A;if(W!=V&&R.getStyle("overflow")!="visible"){B+=U;Q+=A}}W=W.offsetParent}if(Ext.isSafari&&X){B-=S.offsetLeft;Q-=S.offsetTop}if(Ext.isGecko&&!X){var T=G(S);B+=parseInt(T.getStyle("borderLeftWidth"),10)||0;Q+=parseInt(T.getStyle("borderTopWidth"),10)||0}W=V.parentNode;while(W&&W!=S){if(!Ext.isOpera||(W.tagName!="TR"&&G(W).getStyle("display")!="inline")){B-=W.scrollLeft;Q-=W.scrollTop}W=W.parentNode}return[B,Q]},setXY:function(C,B){C=Ext.fly(C,"_setXY");C.position();var A=C.translatePoints(B);if(B[0]!==false){C.dom.style.left=A.left+"px"}if(B[1]!==false){C.dom.style.top=A.top+"px"}},setX:function(A,B){this.setXY(A,[B,false])},setY:function(B,A){this.setXY(B,[false,A])}};Ext.lib.Event=function(){var M=false;var L=[];var A=[];var C=0;var D=[];var N=0;var B=null;return{POLL_RETRYS:200,POLL_INTERVAL:20,EL:0,TYPE:1,FN:2,WFN:3,OBJ:3,ADJ_SCOPE:4,_interval:null,startInterval:function(){if(!this._interval){var I=this;var J=function(){I._tryPreloadAttach()};this._interval=setInterval(J,this.POLL_INTERVAL)}},onAvailable:function(K,I,J,P){D.push({id:K,fn:I,obj:J,override:P,checkReady:false});C=this.POLL_RETRYS;this.startInterval()},addListener:function(J,T,K){J=Ext.getDom(J);if(!J||!K){return false}if("unload"==T){A[A.length]=[J,T,K];return true}var R=function(O){return typeof Ext!="undefined"?K(Ext.lib.Event.getEvent(O)):false};var I=[J,T,K,R];var S=L.length;L[S]=I;this.doAdd(J,T,R,false);return true},removeListener:function(J,V,K){var T,W;J=Ext.getDom(J);if(!K){return this.purgeElement(J,false,V)}if("unload"==V){for(T=0,W=A.length;T<W;T++){var X=A[T];if(X&&X[0]==J&&X[1]==V&&X[2]==K){A.splice(T,1);return true}}return false}var I=null;var U=arguments[3];if("undefined"==typeof U){U=this._getCacheIndex(J,V,K)}if(U>=0){I=L[U]}if(!J||!I){return false}this.doRemove(J,V,I[this.WFN],false);delete L[U][this.WFN];delete L[U][this.FN];L.splice(U,1);return true},getTarget:function(J,K){J=J.browserEvent||J;var I=J.target||J.srcElement;return this.resolveTextNode(I)},resolveTextNode:function(I){if(Ext.isSafari&&I&&3==I.nodeType){return I.parentNode}else{return I}},getPageX:function(J){J=J.browserEvent||J;var I=J.pageX;if(!I&&0!==I){I=J.clientX||0;if(Ext.isIE){I+=this.getScroll()[1]}}return I},getPageY:function(I){I=I.browserEvent||I;var J=I.pageY;if(!J&&0!==J){J=I.clientY||0;if(Ext.isIE){J+=this.getScroll()[0]}}return J},getXY:function(I){I=I.browserEvent||I;return[this.getPageX(I),this.getPageY(I)]},getRelatedTarget:function(J){J=J.browserEvent||J;var I=J.relatedTarget;if(!I){if(J.type=="mouseout"){I=J.toElement}else{if(J.type=="mouseover"){I=J.fromElement}}}return this.resolveTextNode(I)},getTime:function(J){J=J.browserEvent||J;if(!J.time){var K=new Date().getTime();try{J.time=K}catch(I){this.lastError=I;return K}}return J.time},stopEvent:function(I){this.stopPropagation(I);this.preventDefault(I)},stopPropagation:function(I){I=I.browserEvent||I;if(I.stopPropagation){I.stopPropagation()}else{I.cancelBubble=true}},preventDefault:function(I){I=I.browserEvent||I;if(I.preventDefault){I.preventDefault()}else{I.returnValue=false}},getEvent:function(K){var I=K||window.event;if(!I){var J=this.getEvent.caller;while(J){I=J.arguments[0];if(I&&Event==I.constructor){break}J=J.caller}}return I},getCharCode:function(I){I=I.browserEvent||I;return I.charCode||I.keyCode||0},_getCacheIndex:function(J,S,K){for(var R=0,T=L.length;R<T;++R){var I=L[R];if(I&&I[this.FN]==K&&I[this.EL]==J&&I[this.TYPE]==S){return R}}return -1},elCache:{},getEl:function(I){return document.getElementById(I)},clearCache:function(){},_load:function(J){M=true;var I=Ext.lib.Event;if(Ext.isIE){I.doRemove(window,"load",I._load)}},_tryPreloadAttach:function(){if(this.locked){return false}this.locked=true;var J=!M;if(!J){J=(C>0)}var K=[];for(var V=0,I=D.length;V<I;++V){var S=D[V];if(S){var T=this.getEl(S.id);if(T){if(!S.checkReady||M||T.nextSibling||(document&&document.body)){var U=T;if(S.override){if(S.override===true){U=S.obj}else{U=S.override}}S.fn.call(U,S.obj);D[V]=null}}else{K.push(S)}}}C=(K.length===0)?0:C-1;if(J){this.startInterval()}else{clearInterval(this._interval);this._interval=null}this.locked=false;return true},purgeElement:function(S,K,U){var J=this.getListeners(S,U);if(J){for(var T=0,I=J.length;T<I;++T){var V=J[T];this.removeListener(S,V.type,V.fn)}}if(K&&S&&S.childNodes){for(T=0,I=S.childNodes.length;T<I;++T){this.purgeElement(S.childNodes[T],K,U)}}},getListeners:function(Y,K){var V=[],Z;if(!K){Z=[L,A]}else{if(K=="unload"){Z=[A]}else{Z=[L]}}for(var W=0;W<Z.length;++W){var I=Z[W];if(I&&I.length>0){for(var U=0,J=I.length;U<J;++U){var X=I[U];if(X&&X[this.EL]===Y&&(!K||K===X[this.TYPE])){V.push({type:X[this.TYPE],fn:X[this.FN],obj:X[this.OBJ],adjust:X[this.ADJ_SCOPE],index:U})}}}}return(V.length)?V:null},_unload:function(J){var K=Ext.lib.Event,U,V,X,I,W;for(U=0,I=A.length;U<I;++U){X=A[U];if(X){var T=window;if(X[K.ADJ_SCOPE]){if(X[K.ADJ_SCOPE]===true){T=X[K.OBJ]}else{T=X[K.ADJ_SCOPE]}}X[K.FN].call(T,K.getEvent(J),X[K.OBJ]);A[U]=null;X=null;T=null}}A=null;if(L&&L.length>0){V=L.length;while(V){W=V-1;X=L[W];if(X){K.removeListener(X[K.EL],X[K.TYPE],X[K.FN],W)}V=V-1}X=null;K.clearCache()}K.doRemove(window,"unload",K._unload)},getScroll:function(){var I=document.documentElement,J=document.body;if(I&&(I.scrollTop||I.scrollLeft)){return[I.scrollTop,I.scrollLeft]}else{if(J){return[J.scrollTop,J.scrollLeft]}else{return[0,0]}}},doAdd:function(){if(window.addEventListener){return function(J,P,K,I){J.addEventListener(P,K,(I))}}else{if(window.attachEvent){return function(J,P,K,I){J.attachEvent("on"+P,K)}}else{return function(){}}}}(),doRemove:function(){if(window.removeEventListener){return function(J,P,K,I){J.removeEventListener(P,K,(I))}}else{if(window.detachEvent){return function(J,I,K){J.detachEvent("on"+I,K)}}else{return function(){}}}}()}}();var F=Ext.lib.Event;F.on=F.addListener;F.un=F.removeListener;if(document&&document.body){F._load()}else{F.doAdd(window,"load",F._load)}F.doAdd(window,"unload",F._unload);F._tryPreloadAttach();Ext.lib.Ajax={request:function(A,C,N,B,M){if(M){var L=M.headers;if(L){for(var D in L){if(L.hasOwnProperty(D)){this.initHeader(D,L[D],false)}}}if(M.xmlData){if(!L||!L["Content-Type"]){this.initHeader("Content-Type","text/xml",false)}A=(A?A:(M.method?M.method:"POST"));B=M.xmlData}else{if(M.jsonData){if(!L||!L["Content-Type"]){this.initHeader("Content-Type","application/json",false)}A=(A?A:(M.method?M.method:"POST"));B=typeof M.jsonData=="object"?Ext.encode(M.jsonData):M.jsonData}}}return this.asyncRequest(A,C,N,B)},serializeForm:function(Q){if(typeof Q=="string"){Q=(document.getElementById(Q)||document.forms[Q])}var P,R,O,D,C="",A=false;for(var B=0;B<Q.elements.length;B++){P=Q.elements[B];D=Q.elements[B].disabled;R=Q.elements[B].name;O=Q.elements[B].value;if(!D&&R){switch(P.type){case"select-one":case"select-multiple":for(var N=0;N<P.options.length;N++){if(P.options[N].selected){if(Ext.isIE){C+=encodeURIComponent(R)+"="+encodeURIComponent(P.options[N].attributes.value.specified?P.options[N].value:P.options[N].text)+"&"}else{C+=encodeURIComponent(R)+"="+encodeURIComponent(P.options[N].hasAttribute("value")?P.options[N].value:P.options[N].text)+"&"}}}break;case"radio":case"checkbox":if(P.checked){C+=encodeURIComponent(R)+"="+encodeURIComponent(O)+"&"}break;case"file":case undefined:case"reset":case"button":break;case"submit":if(A==false){C+=encodeURIComponent(R)+"="+encodeURIComponent(O)+"&";A=true}break;default:C+=encodeURIComponent(R)+"="+encodeURIComponent(O)+"&";break}}}C=C.substr(0,C.length-1);return C},headers:{},hasHeaders:false,useDefaultHeader:true,defaultPostHeader:"application/x-www-form-urlencoded",useDefaultXhrHeader:true,defaultXhrHeader:"XMLHttpRequest",hasDefaultHeaders:true,defaultHeaders:{},poll:{},timeout:{},pollInterval:50,transactionId:0,setProgId:function(A){this.activeX.unshift(A)},setDefaultPostHeader:function(A){this.useDefaultHeader=A},setDefaultXhrHeader:function(A){this.useDefaultXhrHeader=A},setPollingInterval:function(A){if(typeof A=="number"&&isFinite(A)){this.pollInterval=A}},createXhrObject:function(A){var B,J;try{J=new XMLHttpRequest();B={conn:J,tId:A}}catch(C){for(var D=0;D<this.activeX.length;++D){try{J=new ActiveXObject(this.activeX[D]);B={conn:J,tId:A};break}catch(C){}}}finally{return B}},getConnectionObject:function(){var B;var A=this.transactionId;try{B=this.createXhrObject(A);if(B){this.transactionId++}}catch(C){}finally{return B}},asyncRequest:function(A,D,B,J){var C=this.getConnectionObject();if(!C){return null}else{C.conn.open(A,D,true);if(this.useDefaultXhrHeader){if(!this.defaultHeaders["X-Requested-With"]){this.initHeader("X-Requested-With",this.defaultXhrHeader,true)}}if(J&&this.useDefaultHeader&&(!this.hasHeaders||!this.headers["Content-Type"])){this.initHeader("Content-Type",this.defaultPostHeader)}if(this.hasDefaultHeaders||this.hasHeaders){this.setHeader(C)}this.handleReadyState(C,B);C.conn.send(J||null);return C}},handleReadyState:function(B,A){var C=this;if(A&&A.timeout){this.timeout[B.tId]=window.setTimeout(function(){C.abort(B,A,true)},A.timeout)}this.poll[B.tId]=window.setInterval(function(){if(B.conn&&B.conn.readyState==4){window.clearInterval(C.poll[B.tId]);delete C.poll[B.tId];if(A&&A.timeout){window.clearTimeout(C.timeout[B.tId]);delete C.timeout[B.tId]}C.handleTransactionResponse(B,A)}},this.pollInterval)},handleTransactionResponse:function(B,A,L){if(!A){this.releaseObject(B);return }var D,K;try{if(B.conn.status!==undefined&&B.conn.status!=0){D=B.conn.status}else{D=13030}}catch(C){D=13030}if(D>=200&&D<300){K=this.createResponseObject(B,A.argument);if(A.success){if(!A.scope){A.success(K)}else{A.success.apply(A.scope,[K])}}}else{switch(D){case 12002:case 12029:case 12030:case 12031:case 12152:case 13030:K=this.createExceptionObject(B.tId,A.argument,(L?L:false));if(A.failure){if(!A.scope){A.failure(K)}else{A.failure.apply(A.scope,[K])}}break;default:K=this.createResponseObject(B,A.argument);if(A.failure){if(!A.scope){A.failure(K)}else{A.failure.apply(A.scope,[K])}}}}this.releaseObject(B);K=null},createResponseObject:function(R,C){var O={};var A={};try{var P=R.conn.getAllResponseHeaders();var D=P.split("\n");for(var N=0;N<D.length;N++){var Q=D[N].indexOf(":");if(Q!=-1){A[D[N].substring(0,Q)]=D[N].substring(Q+2)}}}catch(B){}O.tId=R.tId;O.status=R.conn.status;O.statusText=R.conn.statusText;O.getResponseHeader=A;O.getAllResponseHeaders=P;O.responseText=R.conn.responseText;O.responseXML=R.conn.responseXML;if(typeof C!==undefined){O.argument=C}return O},createExceptionObject:function(A,M,P){var C=0;var B="communication failure";var N=-1;var O="transaction aborted";var D={};D.tId=A;if(P){D.status=N;D.statusText=O}else{D.status=C;D.statusText=B}if(M){D.argument=M}return D},initHeader:function(D,A,B){var C=(B)?this.defaultHeaders:this.headers;if(C[D]===undefined){C[D]=A}else{C[D]=A+","+C[D]}if(B){this.hasDefaultHeaders=true}else{this.hasHeaders=true}},setHeader:function(B){if(this.hasDefaultHeaders){for(var A in this.defaultHeaders){if(this.defaultHeaders.hasOwnProperty(A)){B.conn.setRequestHeader(A,this.defaultHeaders[A])}}}if(this.hasHeaders){for(var A in this.headers){if(this.headers.hasOwnProperty(A)){B.conn.setRequestHeader(A,this.headers[A])}}this.headers={};this.hasHeaders=false}},resetDefaultHeaders:function(){delete this.defaultHeaders;this.defaultHeaders={};this.hasDefaultHeaders=false},abort:function(B,A,C){if(this.isCallInProgress(B)){B.conn.abort();window.clearInterval(this.poll[B.tId]);delete this.poll[B.tId];if(C){delete this.timeout[B.tId]}this.handleTransactionResponse(B,A,true);return true}else{return false}},isCallInProgress:function(A){if(A.conn){return A.conn.readyState!=4&&A.conn.readyState!=0}else{return false}},releaseObject:function(A){A.conn=null;A=null},activeX:["MSXML2.XMLHTTP.3.0","MSXML2.XMLHTTP","Microsoft.XMLHTTP"]};Ext.lib.Region=function(B,A,D,C){this.top=B;this[1]=B;this.right=A;this.bottom=D;this.left=C;this[0]=C};Ext.lib.Region.prototype={contains:function(A){return(A.left>=this.left&&A.right<=this.right&&A.top>=this.top&&A.bottom<=this.bottom)},getArea:function(){return((this.bottom-this.top)*(this.right-this.left))},intersect:function(A){var C=Math.max(this.top,A.top);var B=Math.min(this.right,A.right);var J=Math.min(this.bottom,A.bottom);var D=Math.max(this.left,A.left);if(J>=C&&B>=D){return new Ext.lib.Region(C,B,J,D)}else{return null}},union:function(A){var C=Math.min(this.top,A.top);var B=Math.max(this.right,A.right);var J=Math.max(this.bottom,A.bottom);var D=Math.min(this.left,A.left);return new Ext.lib.Region(C,B,J,D)},constrainTo:function(A){this.top=this.top.constrain(A.top,A.bottom);this.bottom=this.bottom.constrain(A.top,A.bottom);this.left=this.left.constrain(A.left,A.right);this.right=this.right.constrain(A.left,A.right);return this},adjust:function(B,C,D,A){this.top+=B;this.left+=C;this.right+=A;this.bottom+=D;return this}};Ext.lib.Region.getRegion=function(C){var A=Ext.lib.Dom.getXY(C);var D=A[1];var B=A[0]+C.offsetWidth;var L=A[1]+C.offsetHeight;var K=A[0];return new Ext.lib.Region(D,B,L,K)};Ext.lib.Point=function(B,A){if(Ext.isArray(B)){A=B[1];B=B[0]}this.x=this.right=this.left=this[0]=B;this.y=this.top=this.bottom=this[1]=A};Ext.lib.Point.prototype=new Ext.lib.Region();Ext.lib.Anim={scroll:function(C,K,B,A,L,D){return this.run(C,K,B,A,L,D,Ext.lib.Scroll)},motion:function(C,K,B,A,L,D){return this.run(C,K,B,A,L,D,Ext.lib.Motion)},color:function(C,K,B,A,L,D){return this.run(C,K,B,A,L,D,Ext.lib.ColorAnim)},run:function(D,O,B,A,P,M,N){N=N||Ext.lib.AnimBase;if(typeof A=="string"){A=Ext.lib.Easing[A]}var C=new N(D,O,B,A);C.animateX(function(){Ext.callback(P,M)});return C}};function G(A){if(!H){H=new Ext.Element.Flyweight()}H.dom=A;return H}if(Ext.isIE){function E(){var A=Function.prototype;delete A.createSequence;delete A.defer;delete A.createDelegate;delete A.createCallback;delete A.createInterceptor;window.detachEvent("onunload",E)}window.attachEvent("onunload",E)}Ext.lib.AnimBase=function(C,D,B,A){if(C){this.init(C,D,B,A)}};Ext.lib.AnimBase.prototype={toString:function(){var B=this.getEl();var A=B.id||B.tagName;return("Anim "+A)},patterns:{noNegatives:/width|height|opacity|padding/i,offsetAttribute:/^((width|height)|(top|left))$/,defaultUnit:/width|height|top$|bottom$|left$|right$/i,offsetUnit:/\d+(em|%|en|ex|pt|in|cm|mm|pc)$/i},doMethod:function(C,A,B){return this.method(this.currentFrame,A,B-A,this.totalFrames)},setAttribute:function(C,A,B){if(this.patterns.noNegatives.test(C)){A=(A>0)?A:0}Ext.fly(this.getEl(),"_anim").setStyle(C,A+B)},getAttribute:function(L){var D=this.getEl();var B=G(D).getStyle(L);if(B!=="auto"&&!this.patterns.offsetUnit.test(B)){return parseFloat(B)}var K=this.patterns.offsetAttribute.exec(L)||[];var A=!!(K[3]);var C=!!(K[2]);if(C||(G(D).getStyle("position")=="absolute"&&A)){B=D["offset"+K[0].charAt(0).toUpperCase()+K[0].substr(1)]}else{B=0}return B},getDefaultUnit:function(A){if(this.patterns.defaultUnit.test(A)){return"px"}return""},animateX:function(A,C){var B=function(){this.onComplete.removeListener(B);if(typeof A=="function"){A.call(C||this,this)}};this.onComplete.addListener(B,this);this.animate()},setRuntimeAttribute:function(M){var A;var L;var D=this.attributes;this.runtimeAttributes[M]={};var B=function(I){return(typeof I!=="undefined")};if(!B(D[M]["to"])&&!B(D[M]["by"])){return false}A=(B(D[M]["from"]))?D[M]["from"]:this.getAttribute(M);if(B(D[M]["to"])){L=D[M]["to"]}else{if(B(D[M]["by"])){if(A.constructor==Array){L=[];for(var C=0,N=A.length;C<N;++C){L[C]=A[C]+D[M]["by"][C]}}else{L=A+D[M]["by"]}}}this.runtimeAttributes[M].start=A;this.runtimeAttributes[M].end=L;this.runtimeAttributes[M].unit=(B(D[M].unit))?D[M]["unit"]:this.getDefaultUnit(M)},init:function(R,C,D,T){var S=false;var Q=null;var O=0;R=Ext.getDom(R);this.attributes=C||{};this.duration=D||1;this.method=T||Ext.lib.Easing.easeNone;this.useSeconds=true;this.currentFrame=0;this.totalFrames=Ext.lib.AnimMgr.fps;this.getEl=function(){return R};this.isAnimated=function(){return S};this.getStartTime=function(){return Q};this.runtimeAttributes={};this.animate=function(){if(this.isAnimated()){return false}this.currentFrame=0;this.totalFrames=(this.useSeconds)?Math.ceil(Ext.lib.AnimMgr.fps*this.duration):this.duration;Ext.lib.AnimMgr.registerElement(this)};this.stop=function(I){if(I){this.currentFrame=this.totalFrames;this._onTween.fire()}Ext.lib.AnimMgr.stop(this)};var A=function(){this.onStart.fire();this.runtimeAttributes={};for(var I in this.attributes){this.setRuntimeAttribute(I)}S=true;O=0;Q=new Date()};var B=function(){var I={duration:new Date()-this.getStartTime(),currentFrame:this.currentFrame};I.toString=function(){return("duration: "+I.duration+", currentFrame: "+I.currentFrame)};this.onTween.fire(I);var J=this.runtimeAttributes;for(var K in J){this.setAttribute(K,this.doMethod(K,J[K].start,J[K].end),J[K].unit)}O+=1};var P=function(){var J=(new Date()-Q)/1000;var I={duration:J,frames:O,fps:O/J};I.toString=function(){return("duration: "+I.duration+", frames: "+I.frames+", fps: "+I.fps)};S=false;O=0;this.onComplete.fire(I)};this._onStart=new Ext.util.Event(this);this.onStart=new Ext.util.Event(this);this.onTween=new Ext.util.Event(this);this._onTween=new Ext.util.Event(this);this.onComplete=new Ext.util.Event(this);this._onComplete=new Ext.util.Event(this);this._onStart.addListener(A);this._onTween.addListener(B);this._onComplete.addListener(P)}};Ext.lib.AnimMgr=new function(){var C=null;var D=[];var J=0;this.fps=1000;this.delay=1;this.registerElement=function(I){D[D.length]=I;J+=1;I._onStart.fire();this.start()};this.unRegister=function(I,L){I._onComplete.fire();L=L||A(I);if(L!=-1){D.splice(L,1)}J-=1;if(J<=0){this.stop()}};this.start=function(){if(C===null){C=setInterval(this.run,this.delay)}};this.stop=function(I){if(!I){clearInterval(C);for(var M=0,N=D.length;M<N;++M){if(D[0].isAnimated()){this.unRegister(D[0],0)}}D=[];C=null;J=0}else{this.unRegister(I)}};this.run=function(){for(var I=0,N=D.length;I<N;++I){var M=D[I];if(!M||!M.isAnimated()){continue}if(M.currentFrame<M.totalFrames||M.totalFrames===null){M.currentFrame+=1;if(M.useSeconds){B(M)}M._onTween.fire()}else{Ext.lib.AnimMgr.stop(M,I)}}};var A=function(I){for(var M=0,N=D.length;M<N;++M){if(D[M]==I){return M}}return -1};var B=function(P){var S=P.totalFrames;var T=P.currentFrame;var I=(P.currentFrame*P.duration*1000/P.totalFrames);var Q=(new Date()-P.getStartTime());var R=0;if(Q<P.duration*1000){R=Math.round((Q/I-1)*P.currentFrame)}else{R=S-(T+1)}if(R>0&&isFinite(R)){if(P.currentFrame+R>=S){R=S-(T+1)}P.currentFrame+=R}}};Ext.lib.Bezier=new function(){this.getPosition=function(B,C){var A=B.length;var D=[];for(var K=0;K<A;++K){D[K]=[B[K][0],B[K][1]]}for(var L=1;L<A;++L){for(K=0;K<A-L;++K){D[K][0]=(1-C)*D[K][0]+C*D[parseInt(K+1,10)][0];D[K][1]=(1-C)*D[K][1]+C*D[parseInt(K+1,10)][1]}}return[D[0][0],D[0][1]]}};(function(){Ext.lib.ColorAnim=function(M,N,L,D){Ext.lib.ColorAnim.superclass.constructor.call(this,M,N,L,D)};Ext.extend(Ext.lib.ColorAnim,Ext.lib.AnimBase);var B=Ext.lib;var A=B.ColorAnim.superclass;var C=B.ColorAnim.prototype;C.toString=function(){var J=this.getEl();var D=J.id||J.tagName;return("ColorAnim "+D)};C.patterns.color=/color$/i;C.patterns.rgb=/^rgb\(([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\)$/i;C.patterns.hex=/^#?([0-9A-F]{2})([0-9A-F]{2})([0-9A-F]{2})$/i;C.patterns.hex3=/^#?([0-9A-F]{1})([0-9A-F]{1})([0-9A-F]{1})$/i;C.patterns.transparent=/^transparent|rgba\(0, 0, 0, 0\)$/;C.parseColor=function(J){if(J.length==3){return J}var D=this.patterns.hex.exec(J);if(D&&D.length==4){return[parseInt(D[1],16),parseInt(D[2],16),parseInt(D[3],16)]}D=this.patterns.rgb.exec(J);if(D&&D.length==4){return[parseInt(D[1],10),parseInt(D[2],10),parseInt(D[3],10)]}D=this.patterns.hex3.exec(J);if(D&&D.length==4){return[parseInt(D[1]+D[1],16),parseInt(D[2]+D[2],16),parseInt(D[3]+D[3],16)]}return null};C.getAttribute=function(N){var L=this.getEl();if(this.patterns.color.test(N)){var D=G(L).getStyle(N);if(this.patterns.transparent.test(D)){var M=L.parentNode;D=G(M).getStyle(N);while(M&&this.patterns.transparent.test(D)){M=M.parentNode;D=G(M).getStyle(N);if(M.tagName.toUpperCase()=="HTML"){D="#fff"}}}}else{D=A.getAttribute.call(this,N)}return D};C.doMethod=function(P,R,O){var D;if(this.patterns.color.test(P)){D=[];for(var N=0,Q=R.length;N<Q;++N){D[N]=A.doMethod.call(this,P,R[N],O[N])}D="rgb("+Math.floor(D[0])+","+Math.floor(D[1])+","+Math.floor(D[2])+")"}else{D=A.doMethod.call(this,P,R,O)}return D};C.setRuntimeAttribute=function(P){A.setRuntimeAttribute.call(this,P);if(this.patterns.color.test(P)){var N=this.attributes;var R=this.parseColor(this.runtimeAttributes[P].start);var O=this.parseColor(this.runtimeAttributes[P].end);if(typeof N[P]["to"]==="undefined"&&typeof N[P]["by"]!=="undefined"){O=this.parseColor(N[P].by);for(var D=0,Q=R.length;D<Q;++D){O[D]=R[D]+O[D]}}this.runtimeAttributes[P].start=R;this.runtimeAttributes[P].end=O}}})();Ext.lib.Easing={easeNone:function(C,D,A,B){return A*C/B+D},easeIn:function(C,D,A,B){return A*(C/=B)*C+D},easeOut:function(C,D,A,B){return -A*(C/=B)*(C-2)+D},easeBoth:function(C,D,A,B){if((C/=B/2)<1){return A/2*C*C+D}return -A/2*((--C)*(C-2)-1)+D},easeInStrong:function(C,D,A,B){return A*(C/=B)*C*C*C+D},easeOutStrong:function(C,D,A,B){return -A*((C=C/B-1)*C*C*C-1)+D},easeBothStrong:function(C,D,A,B){if((C/=B/2)<1){return A/2*C*C*C*C+D}return -A/2*((C-=2)*C*C*C-2)+D},elasticIn:function(L,N,A,B,M,C){if(L==0){return N}if((L/=B)==1){return N+A}if(!C){C=B*0.3}if(!M||M<Math.abs(A)){M=A;var D=C/4}else{var D=C/(2*Math.PI)*Math.asin(A/M)}return -(M*Math.pow(2,10*(L-=1))*Math.sin((L*B-D)*(2*Math.PI)/C))+N},elasticOut:function(L,N,A,B,M,C){if(L==0){return N}if((L/=B)==1){return N+A}if(!C){C=B*0.3}if(!M||M<Math.abs(A)){M=A;var D=C/4}else{var D=C/(2*Math.PI)*Math.asin(A/M)}return M*Math.pow(2,-10*L)*Math.sin((L*B-D)*(2*Math.PI)/C)+A+N},elasticBoth:function(L,N,A,B,M,C){if(L==0){return N}if((L/=B/2)==2){return N+A}if(!C){C=B*(0.3*1.5)}if(!M||M<Math.abs(A)){M=A;var D=C/4}else{var D=C/(2*Math.PI)*Math.asin(A/M)}if(L<1){return -0.5*(M*Math.pow(2,10*(L-=1))*Math.sin((L*B-D)*(2*Math.PI)/C))+N}return M*Math.pow(2,-10*(L-=1))*Math.sin((L*B-D)*(2*Math.PI)/C)*0.5+A+N},backIn:function(D,J,A,B,C){if(typeof C=="undefined"){C=1.70158}return A*(D/=B)*D*((C+1)*D-C)+J},backOut:function(D,J,A,B,C){if(typeof C=="undefined"){C=1.70158}return A*((D=D/B-1)*D*((C+1)*D+C)+1)+J},backBoth:function(D,J,A,B,C){if(typeof C=="undefined"){C=1.70158}if((D/=B/2)<1){return A/2*(D*D*(((C*=(1.525))+1)*D-C))+J}return A/2*((D-=2)*D*(((C*=(1.525))+1)*D+C)+2)+J},bounceIn:function(C,D,A,B){return A-Ext.lib.Easing.bounceOut(B-C,0,A,B)+D},bounceOut:function(C,D,A,B){if((C/=B)<(1/2.75)){return A*(7.5625*C*C)+D}else{if(C<(2/2.75)){return A*(7.5625*(C-=(1.5/2.75))*C+0.75)+D}else{if(C<(2.5/2.75)){return A*(7.5625*(C-=(2.25/2.75))*C+0.9375)+D}}}return A*(7.5625*(C-=(2.625/2.75))*C+0.984375)+D},bounceBoth:function(C,D,A,B){if(C<B/2){return Ext.lib.Easing.bounceIn(C*2,0,A,B)*0.5+D}return Ext.lib.Easing.bounceOut(C*2-B,0,A,B)*0.5+A*0.5+D}};(function(){Ext.lib.Motion=function(N,O,I,P){if(N){Ext.lib.Motion.superclass.constructor.call(this,N,O,I,P)}};Ext.extend(Ext.lib.Motion,Ext.lib.ColorAnim);var B=Ext.lib;var A=B.Motion.superclass;var D=B.Motion.prototype;D.toString=function(){var L=this.getEl();var I=L.id||L.tagName;return("Motion "+I)};D.patterns.points=/^points$/i;D.setAttribute=function(N,I,M){if(this.patterns.points.test(N)){M=M||"px";A.setAttribute.call(this,"left",I[0],M);A.setAttribute.call(this,"top",I[1],M)}else{A.setAttribute.call(this,N,I,M)}};D.getAttribute=function(L){if(this.patterns.points.test(L)){var I=[A.getAttribute.call(this,"left"),A.getAttribute.call(this,"top")]}else{I=A.getAttribute.call(this,L)}return I};D.doMethod=function(P,Q,O){var R=null;if(this.patterns.points.test(P)){var I=this.method(this.currentFrame,0,100,this.totalFrames)/100;R=B.Bezier.getPosition(this.runtimeAttributes[P],I)}else{R=A.doMethod.call(this,P,Q,O)}return R};D.setRuntimeAttribute=function(I){if(this.patterns.points.test(I)){var a=this.getEl();var Y=this.attributes;var b;var W=Y.points["control"]||[];var Z;var V,T;if(W.length>0&&!Ext.isArray(W[0])){W=[W]}else{var X=[];for(V=0,T=W.length;V<T;++V){X[V]=W[V]}W=X}Ext.fly(a,"_anim").position();if(C(Y.points["from"])){Ext.lib.Dom.setXY(a,Y.points["from"])}else{Ext.lib.Dom.setXY(a,Ext.lib.Dom.getXY(a))}b=this.getAttribute("points");if(C(Y.points["to"])){Z=J.call(this,Y.points["to"],b);var U=Ext.lib.Dom.getXY(this.getEl());for(V=0,T=W.length;V<T;++V){W[V]=J.call(this,W[V],b)}}else{if(C(Y.points["by"])){Z=[b[0]+Y.points["by"][0],b[1]+Y.points["by"][1]];for(V=0,T=W.length;V<T;++V){W[V]=[b[0]+W[V][0],b[1]+W[V][1]]}}}this.runtimeAttributes[I]=[b];if(W.length>0){this.runtimeAttributes[I]=this.runtimeAttributes[I].concat(W)}this.runtimeAttributes[I][this.runtimeAttributes[I].length]=Z}else{A.setRuntimeAttribute.call(this,I)}};var J=function(N,I){var M=Ext.lib.Dom.getXY(this.getEl());N=[N[0]-M[0]+I[0],N[1]-M[1]+I[1]];return N};var C=function(I){return(typeof I!=="undefined")}})();(function(){Ext.lib.Scroll=function(M,N,L,D){if(M){Ext.lib.Scroll.superclass.constructor.call(this,M,N,L,D)}};Ext.extend(Ext.lib.Scroll,Ext.lib.ColorAnim);var B=Ext.lib;var A=B.Scroll.superclass;var C=B.Scroll.prototype;C.toString=function(){var J=this.getEl();var D=J.id||J.tagName;return("Scroll "+D)};C.doMethod=function(N,D,M){var L=null;if(N=="scroll"){L=[this.method(this.currentFrame,D[0],M[0]-D[0],this.totalFrames),this.method(this.currentFrame,D[1],M[1]-D[1],this.totalFrames)]}else{L=A.doMethod.call(this,N,D,M)}return L};C.getAttribute=function(L){var D=null;var K=this.getEl();if(L=="scroll"){D=[K.scrollLeft,K.scrollTop]}else{D=A.getAttribute.call(this,L)}return D};C.setAttribute=function(N,D,L){var M=this.getEl();if(N=="scroll"){M.scrollLeft=D[0];M.scrollTop=D[1]}else{A.setAttribute.call(this,N,D,L)}}})()})();Ext.DomHelper=function(){var S=null;var Y=/^(?:br|frame|hr|img|input|link|meta|range|spacer|wbr|area|param|col)$/i;var P=/^table|tbody|tr|td$/i;var Q=function(B){if(typeof B=="string"){return B}var G="";if(Ext.isArray(B)){for(var D=0,F=B.length;D<F;D++){G+=Q(B[D])}return G}if(!B.tag){B.tag="div"}G+="<"+B.tag;for(var H in B){if(H=="tag"||H=="children"||H=="cn"||H=="html"||typeof B[H]=="function"){continue}if(H=="style"){var C=B.style;if(typeof C=="function"){C=C.call()}if(typeof C=="string"){G+=' style="'+C+'"'}else{if(typeof C=="object"){G+=' style="';for(var E in C){if(typeof C[E]!="function"){G+=E+":"+C[E]+";"}}G+='"'}}}else{if(H=="cls"){G+=' class="'+B.cls+'"'}else{if(H=="htmlFor"){G+=' for="'+B.htmlFor+'"'}else{G+=" "+H+'="'+B[H]+'"'}}}}if(Y.test(B.tag)){G+="/>"}else{G+=">";var A=B.children||B.cn;if(A){G+=Q(A)}else{if(B.html){G+=B.html}}G+="</"+B.tag+">"}return G};var R=function(B,G){var C;if(Ext.isArray(B)){C=document.createDocumentFragment();for(var D=0,F=B.length;D<F;D++){R(B[D],C)}}else{if(typeof B=="string"){C=document.createTextNode(B)}else{C=document.createElement(B.tag||"div");var E=!!C.setAttribute;for(var H in B){if(H=="tag"||H=="children"||H=="cn"||H=="html"||H=="style"||typeof B[H]=="function"){continue}if(H=="cls"){C.className=B.cls}else{if(E){C.setAttribute(H,B[H])}else{C[H]=B[H]}}}Ext.DomHelper.applyStyles(C,B.style);var A=B.children||B.cn;if(A){R(A,C)}else{if(B.html){C.innerHTML=B.html}}}}if(G){G.appendChild(C)}return C};var V=function(A,C,D,B){S.innerHTML=[C,D,B].join("");var F=-1,E=S;while(++F<A){E=E.firstChild}return E};var U="<table>",Z="</table>",O=U+"<tbody>",T="</tbody>"+Z,W=O+"<tr>",N="</tr>"+T;var X=function(F,E,C,D){if(!S){S=document.createElement("div")}var B;var A=null;if(F=="td"){if(E=="afterbegin"||E=="beforeend"){return }if(E=="beforebegin"){A=C;C=C.parentNode}else{A=C.nextSibling;C=C.parentNode}B=V(4,W,D,N)}else{if(F=="tr"){if(E=="beforebegin"){A=C;C=C.parentNode;B=V(3,O,D,T)}else{if(E=="afterend"){A=C.nextSibling;C=C.parentNode;B=V(3,O,D,T)}else{if(E=="afterbegin"){A=C.firstChild}B=V(4,W,D,N)}}}else{if(F=="tbody"){if(E=="beforebegin"){A=C;C=C.parentNode;B=V(2,U,D,Z)}else{if(E=="afterend"){A=C.nextSibling;C=C.parentNode;B=V(2,U,D,Z)}else{if(E=="afterbegin"){A=C.firstChild}B=V(3,O,D,T)}}}else{if(E=="beforebegin"||E=="afterend"){return }if(E=="afterbegin"){A=C.firstChild}B=V(2,U,D,Z)}}}C.insertBefore(B,A);return B};return{useDom:false,markup:function(A){return Q(A)},applyStyles:function(C,B){if(B){C=Ext.fly(C);if(typeof B=="string"){var D=/\s?([a-z\-]*)\:\s?([^;]*);?/gi;var A;while((A=D.exec(B))!=null){C.setStyle(A[1],A[2])}}else{if(typeof B=="object"){for(var E in B){C.setStyle(E,B[E])}}else{if(typeof B=="function"){Ext.DomHelper.applyStyles(C,B.call())}}}}},insertHtml:function(D,B,C){D=D.toLowerCase();if(B.insertAdjacentHTML){if(P.test(B.tagName)){var E;if(E=X(B.tagName.toLowerCase(),D,B,C)){return E}}switch(D){case"beforebegin":B.insertAdjacentHTML("BeforeBegin",C);return B.previousSibling;case"afterbegin":B.insertAdjacentHTML("AfterBegin",C);return B.firstChild;case"beforeend":B.insertAdjacentHTML("BeforeEnd",C);return B.lastChild;case"afterend":B.insertAdjacentHTML("AfterEnd",C);return B.nextSibling}throw'Illegal insertion point -> "'+D+'"'}var F=B.ownerDocument.createRange();var A;switch(D){case"beforebegin":F.setStartBefore(B);A=F.createContextualFragment(C);B.parentNode.insertBefore(A,B);return B.previousSibling;case"afterbegin":if(B.firstChild){F.setStartBefore(B.firstChild);A=F.createContextualFragment(C);B.insertBefore(A,B.firstChild);return B.firstChild}else{B.innerHTML=C;return B.firstChild}case"beforeend":if(B.lastChild){F.setStartAfter(B.lastChild);A=F.createContextualFragment(C);B.appendChild(A);return B.lastChild}else{B.innerHTML=C;return B.lastChild}case"afterend":F.setStartAfter(B);A=F.createContextualFragment(C);B.parentNode.insertBefore(A,B.nextSibling);return B.nextSibling}throw'Illegal insertion point -> "'+D+'"'},insertBefore:function(C,A,B){return this.doInsert(C,A,B,"beforeBegin")},insertAfter:function(C,A,B){return this.doInsert(C,A,B,"afterEnd","nextSibling")},insertFirst:function(C,A,B){return this.doInsert(C,A,B,"afterBegin","firstChild")},doInsert:function(D,B,C,A,E){D=Ext.getDom(D);var F;if(this.useDom){F=R(B,null);(E==="firstChild"?D:D.parentNode).insertBefore(F,E?D[E]:D)}else{var G=Q(B);F=this.insertHtml(A,D,G)}return C?Ext.get(F,true):F},append:function(C,A,B){C=Ext.getDom(C);var D;if(this.useDom){D=R(A,null);C.appendChild(D)}else{var E=Q(A);D=this.insertHtml("beforeEnd",C,E)}return B?Ext.get(D,true):D},overwrite:function(C,A,B){C=Ext.getDom(C);C.innerHTML=Q(A);return B?Ext.get(C.firstChild,true):C.firstChild},createTemplate:function(A){var B=Q(A);return new Ext.Template(B)}}}();Ext.Template=function(G){var J=arguments;if(Ext.isArray(G)){G=G.join("")}else{if(J.length>1){var I=[];for(var H=0,F=J.length;H<F;H++){if(typeof J[H]=="object"){Ext.apply(this,J[H])}else{I[I.length]=J[H]}}G=I.join("")}}this.html=G;if(this.compiled){this.compile()}};Ext.Template.prototype={applyTemplate:function(J){if(this.compiled){return this.compiled(J)}var F=this.disableFormats!==true;var G=Ext.util.Format,I=this;var H=function(M,D,A,E){if(A&&F){if(A.substr(0,5)=="this."){return I.call(A.substr(5),J[D],J)}else{if(E){var B=/^\s*['"](.*)["']\s*$/;E=E.split(",");for(var C=0,N=E.length;C<N;C++){E[C]=E[C].replace(B,"$1")}E=[J[D]].concat(E)}else{E=[J[D]]}return G[A].apply(G,E)}}else{return J[D]!==undefined?J[D]:""}};return this.html.replace(this.re,H)},set:function(C,D){this.html=C;this.compiled=null;if(D){this.compile()}return this},disableFormats:false,re:/\{([\w-]+)(?:\:([\w\.]*)(?:\((.*?)?\))?)?\}/g,compile:function(){var fm=Ext.util.Format;var useF=this.disableFormats!==true;var sep=Ext.isGecko?"+":",";var fn=function(m,name,format,args){if(format&&useF){args=args?","+args:"";if(format.substr(0,5)!="this."){format="fm."+format+"("}else{format='this.call("'+format.substr(5)+'", ';args=", values"}}else{args="";format="(values['"+name+"'] == undefined ? '' : "}return"'"+sep+format+"values['"+name+"']"+args+")"+sep+"'"};var body;if(Ext.isGecko){body="this.compiled = function(values){ return '"+this.html.replace(/\\/g,"\\\\").replace(/(\r\n|\n)/g,"\\n").replace(/'/g,"\\'").replace(this.re,fn)+"';};"}else{body=["this.compiled = function(values){ return ['"];body.push(this.html.replace(/\\/g,"\\\\").replace(/(\r\n|\n)/g,"\\n").replace(/'/g,"\\'").replace(this.re,fn));body.push("'].join('');};");body=body.join("")}eval(body);return this},call:function(E,F,D){return this[E](F,D)},insertFirst:function(F,D,E){return this.doInsert("afterBegin",F,D,E)},insertBefore:function(F,D,E){return this.doInsert("beforeBegin",F,D,E)},insertAfter:function(F,D,E){return this.doInsert("afterEnd",F,D,E)},append:function(F,D,E){return this.doInsert("beforeEnd",F,D,E)},doInsert:function(I,G,J,F){G=Ext.getDom(G);var H=Ext.DomHelper.insertHtml(I,G,this.applyTemplate(J));return F?Ext.get(H,true):H},overwrite:function(F,D,E){F=Ext.getDom(F);F.innerHTML=this.applyTemplate(D);return E?Ext.get(F.firstChild,true):F.firstChild}};Ext.Template.prototype.apply=Ext.Template.prototype.applyTemplate;Ext.DomHelper.Template=Ext.Template;Ext.Template.from=function(D,C){D=Ext.getDom(D);return new Ext.Template(D.value||D.innerHTML,C||"")};Ext.DomQuery=function(){var cache={},simpleCache={},valueCache={};var nonSpace=/\S/;var trimRe=/^\s+|\s+$/g;var tplRe=/\{(\d+)\}/g;var modeRe=/^(\s?[\/>+~]\s?|\s|$)/;var tagTokenRe=/^(#)?([\w-\*]+)/;var nthRe=/(\d*)n\+?(\d*)/,nthRe2=/\D/;function child(p,index){var i=0;var n=p.firstChild;while(n){if(n.nodeType==1){if(++i==index){return n}}n=n.nextSibling}return null}function next(n){while((n=n.nextSibling)&&n.nodeType!=1){}return n}function prev(n){while((n=n.previousSibling)&&n.nodeType!=1){}return n}function children(d){var n=d.firstChild,ni=-1;while(n){var nx=n.nextSibling;if(n.nodeType==3&&!nonSpace.test(n.nodeValue)){d.removeChild(n)}else{n.nodeIndex=++ni}n=nx}return this}function byClassName(c,a,v){if(!v){return c}var r=[],ri=-1,cn;for(var i=0,ci;ci=c[i];i++){if((" "+ci.className+" ").indexOf(v)!=-1){r[++ri]=ci}}return r}function attrValue(n,attr){if(!n.tagName&&typeof n.length!="undefined"){n=n[0]}if(!n){return null}if(attr=="for"){return n.htmlFor}if(attr=="class"||attr=="className"){return n.className}return n.getAttribute(attr)||n[attr]}function getNodes(ns,mode,tagName){var result=[],ri=-1,cs;if(!ns){return result}tagName=tagName||"*";if(typeof ns.getElementsByTagName!="undefined"){ns=[ns]}if(!mode){for(var i=0,ni;ni=ns[i];i++){cs=ni.getElementsByTagName(tagName);for(var j=0,ci;ci=cs[j];j++){result[++ri]=ci}}}else{if(mode=="/"||mode==">"){var utag=tagName.toUpperCase();for(var i=0,ni,cn;ni=ns[i];i++){cn=ni.children||ni.childNodes;for(var j=0,cj;cj=cn[j];j++){if(cj.nodeName==utag||cj.nodeName==tagName||tagName=="*"){result[++ri]=cj}}}}else{if(mode=="+"){var utag=tagName.toUpperCase();for(var i=0,n;n=ns[i];i++){while((n=n.nextSibling)&&n.nodeType!=1){}if(n&&(n.nodeName==utag||n.nodeName==tagName||tagName=="*")){result[++ri]=n}}}else{if(mode=="~"){for(var i=0,n;n=ns[i];i++){while((n=n.nextSibling)&&(n.nodeType!=1||(tagName=="*"||n.tagName.toLowerCase()!=tagName))){}if(n){result[++ri]=n}}}}}}return result}function concat(a,b){if(b.slice){return a.concat(b)}for(var i=0,l=b.length;i<l;i++){a[a.length]=b[i]}return a}function byTag(cs,tagName){if(cs.tagName||cs==document){cs=[cs]}if(!tagName){return cs}var r=[],ri=-1;tagName=tagName.toLowerCase();for(var i=0,ci;ci=cs[i];i++){if(ci.nodeType==1&&ci.tagName.toLowerCase()==tagName){r[++ri]=ci}}return r}function byId(cs,attr,id){if(cs.tagName||cs==document){cs=[cs]}if(!id){return cs}var r=[],ri=-1;for(var i=0,ci;ci=cs[i];i++){if(ci&&ci.id==id){r[++ri]=ci;return r}}return r}function byAttribute(cs,attr,value,op,custom){var r=[],ri=-1,st=custom=="{";var f=Ext.DomQuery.operators[op];for(var i=0,ci;ci=cs[i];i++){var a;if(st){a=Ext.DomQuery.getStyle(ci,attr)}else{if(attr=="class"||attr=="className"){a=ci.className}else{if(attr=="for"){a=ci.htmlFor}else{if(attr=="href"){a=ci.getAttribute("href",2)}else{a=ci.getAttribute(attr)}}}}if((f&&f(a,value))||(!f&&a)){r[++ri]=ci}}return r}function byPseudo(cs,name,value){return Ext.DomQuery.pseudos[name](cs,value)}var isIE=window.ActiveXObject?true:false;eval("var batch = 30803;");var key=30803;function nodupIEXml(cs){var d=++key;cs[0].setAttribute("_nodup",d);var r=[cs[0]];for(var i=1,len=cs.length;i<len;i++){var c=cs[i];if(!c.getAttribute("_nodup")!=d){c.setAttribute("_nodup",d);r[r.length]=c}}for(var i=0,len=cs.length;i<len;i++){cs[i].removeAttribute("_nodup")}return r}function nodup(cs){if(!cs){return[]}var len=cs.length,c,i,r=cs,cj,ri=-1;if(!len||typeof cs.nodeType!="undefined"||len==1){return cs}if(isIE&&typeof cs[0].selectSingleNode!="undefined"){return nodupIEXml(cs)}var d=++key;cs[0]._nodup=d;for(i=1;c=cs[i];i++){if(c._nodup!=d){c._nodup=d}else{r=[];for(var j=0;j<i;j++){r[++ri]=cs[j]}for(j=i+1;cj=cs[j];j++){if(cj._nodup!=d){cj._nodup=d;r[++ri]=cj}}return r}}return r}function quickDiffIEXml(c1,c2){var d=++key;for(var i=0,len=c1.length;i<len;i++){c1[i].setAttribute("_qdiff",d)}var r=[];for(var i=0,len=c2.length;i<len;i++){if(c2[i].getAttribute("_qdiff")!=d){r[r.length]=c2[i]}}for(var i=0,len=c1.length;i<len;i++){c1[i].removeAttribute("_qdiff")}return r}function quickDiff(c1,c2){var len1=c1.length;if(!len1){return c2}if(isIE&&c1[0].selectSingleNode){return quickDiffIEXml(c1,c2)}var d=++key;for(var i=0;i<len1;i++){c1[i]._qdiff=d}var r=[];for(var i=0,len=c2.length;i<len;i++){if(c2[i]._qdiff!=d){r[r.length]=c2[i]}}return r}function quickId(ns,mode,root,id){if(ns==root){var d=root.ownerDocument||root;return d.getElementById(id)}ns=getNodes(ns,mode,"*");return byId(ns,null,id)}return{getStyle:function(el,name){return Ext.fly(el).getStyle(name)},compile:function(path,type){type=type||"select";var fn=["var f = function(root){\n var mode; ++batch; var n = root || document;\n"];var q=path,mode,lq;var tk=Ext.DomQuery.matchers;var tklen=tk.length;var mm;var lmode=q.match(modeRe);if(lmode&&lmode[1]){fn[fn.length]='mode="'+lmode[1].replace(trimRe,"")+'";';q=q.replace(lmode[1],"")}while(path.substr(0,1)=="/"){path=path.substr(1)}while(q&&lq!=q){lq=q;var tm=q.match(tagTokenRe);if(type=="select"){if(tm){if(tm[1]=="#"){fn[fn.length]='n = quickId(n, mode, root, "'+tm[2]+'");'}else{fn[fn.length]='n = getNodes(n, mode, "'+tm[2]+'");'}q=q.replace(tm[0],"")}else{if(q.substr(0,1)!="@"){fn[fn.length]='n = getNodes(n, mode, "*");'}}}else{if(tm){if(tm[1]=="#"){fn[fn.length]='n = byId(n, null, "'+tm[2]+'");'}else{fn[fn.length]='n = byTag(n, "'+tm[2]+'");'}q=q.replace(tm[0],"")}}while(!(mm=q.match(modeRe))){var matched=false;for(var j=0;j<tklen;j++){var t=tk[j];var m=q.match(t.re);if(m){fn[fn.length]=t.select.replace(tplRe,function(x,i){return m[i]});q=q.replace(m[0],"");matched=true;break}}if(!matched){throw'Error parsing selector, parsing failed at "'+q+'"'}}if(mm[1]){fn[fn.length]='mode="'+mm[1].replace(trimRe,"")+'";';q=q.replace(mm[1],"")}}fn[fn.length]="return nodup(n);\n}";eval(fn.join(""));return f},select:function(path,root,type){if(!root||root==document){root=document}if(typeof root=="string"){root=document.getElementById(root)}var paths=path.split(",");var results=[];for(var i=0,len=paths.length;i<len;i++){var p=paths[i].replace(trimRe,"");if(!cache[p]){cache[p]=Ext.DomQuery.compile(p);if(!cache[p]){throw p+" is not a valid selector"}}var result=cache[p](root);if(result&&result!=document){results=results.concat(result)}}if(paths.length>1){return nodup(results)}return results},selectNode:function(path,root){return Ext.DomQuery.select(path,root)[0]},selectValue:function(path,root,defaultValue){path=path.replace(trimRe,"");if(!valueCache[path]){valueCache[path]=Ext.DomQuery.compile(path,"select")}var n=valueCache[path](root);n=n[0]?n[0]:n;var v=(n&&n.firstChild?n.firstChild.nodeValue:null);return((v===null||v===undefined||v==="")?defaultValue:v)},selectNumber:function(path,root,defaultValue){var v=Ext.DomQuery.selectValue(path,root,defaultValue||0);return parseFloat(v)},is:function(el,ss){if(typeof el=="string"){el=document.getElementById(el)}var isArray=Ext.isArray(el);var result=Ext.DomQuery.filter(isArray?el:[el],ss);return isArray?(result.length==el.length):(result.length>0)},filter:function(els,ss,nonMatches){ss=ss.replace(trimRe,"");if(!simpleCache[ss]){simpleCache[ss]=Ext.DomQuery.compile(ss,"simple")}var result=simpleCache[ss](els);return nonMatches?quickDiff(result,els):result},matchers:[{re:/^\.([\w-]+)/,select:'n = byClassName(n, null, " {1} ");'},{re:/^\:([\w-]+)(?:\(((?:[^\s>\/]*|.*?))\))?/,select:'n = byPseudo(n, "{1}", "{2}");'},{re:/^(?:([\[\{])(?:@)?([\w-]+)\s?(?:(=|.=)\s?['"]?(.*?)["']?)?[\]\}])/,select:'n = byAttribute(n, "{2}", "{4}", "{3}", "{1}");'},{re:/^#([\w-]+)/,select:'n = byId(n, null, "{1}");'},{re:/^@([\w-]+)/,select:'return {firstChild:{nodeValue:attrValue(n, "{1}")}};'}],operators:{"=":function(a,v){return a==v},"!=":function(a,v){return a!=v},"^=":function(a,v){return a&&a.substr(0,v.length)==v},"$=":function(a,v){return a&&a.substr(a.length-v.length)==v},"*=":function(a,v){return a&&a.indexOf(v)!==-1},"%=":function(a,v){return(a%v)==0},"|=":function(a,v){return a&&(a==v||a.substr(0,v.length+1)==v+"-")},"~=":function(a,v){return a&&(" "+a+" ").indexOf(" "+v+" ")!=-1}},pseudos:{"first-child":function(c){var r=[],ri=-1,n;for(var i=0,ci;ci=n=c[i];i++){while((n=n.previousSibling)&&n.nodeType!=1){}if(!n){r[++ri]=ci}}return r},"last-child":function(c){var r=[],ri=-1,n;for(var i=0,ci;ci=n=c[i];i++){while((n=n.nextSibling)&&n.nodeType!=1){}if(!n){r[++ri]=ci}}return r},"nth-child":function(c,a){var r=[],ri=-1;var m=nthRe.exec(a=="even"&&"2n"||a=="odd"&&"2n+1"||!nthRe2.test(a)&&"n+"+a||a);var f=(m[1]||1)-0,l=m[2]-0;for(var i=0,n;n=c[i];i++){var pn=n.parentNode;if(batch!=pn._batch){var j=0;for(var cn=pn.firstChild;cn;cn=cn.nextSibling){if(cn.nodeType==1){cn.nodeIndex=++j}}pn._batch=batch}if(f==1){if(l==0||n.nodeIndex==l){r[++ri]=n}}else{if((n.nodeIndex+l)%f==0){r[++ri]=n}}}return r},"only-child":function(c){var r=[],ri=-1;for(var i=0,ci;ci=c[i];i++){if(!prev(ci)&&!next(ci)){r[++ri]=ci}}return r},empty:function(c){var r=[],ri=-1;for(var i=0,ci;ci=c[i];i++){var cns=ci.childNodes,j=0,cn,empty=true;while(cn=cns[j]){++j;if(cn.nodeType==1||cn.nodeType==3){empty=false;break}}if(empty){r[++ri]=ci}}return r},contains:function(c,v){var r=[],ri=-1;for(var i=0,ci;ci=c[i];i++){if((ci.textContent||ci.innerText||"").indexOf(v)!=-1){r[++ri]=ci}}return r},nodeValue:function(c,v){var r=[],ri=-1;for(var i=0,ci;ci=c[i];i++){if(ci.firstChild&&ci.firstChild.nodeValue==v){r[++ri]=ci}}return r},checked:function(c){var r=[],ri=-1;for(var i=0,ci;ci=c[i];i++){if(ci.checked==true){r[++ri]=ci}}return r},not:function(c,ss){return Ext.DomQuery.filter(c,ss,true)},any:function(c,selectors){var ss=selectors.split("|");var r=[],ri=-1,s;for(var i=0,ci;ci=c[i];i++){for(var j=0;s=ss[j];j++){if(Ext.DomQuery.is(ci,s)){r[++ri]=ci;break}}}return r},odd:function(c){return this["nth-child"](c,"odd")},even:function(c){return this["nth-child"](c,"even")},nth:function(c,a){return c[a-1]||[]},first:function(c){return c[0]||[]},last:function(c){return c[c.length-1]||[]},has:function(c,ss){var s=Ext.DomQuery.select;var r=[],ri=-1;for(var i=0,ci;ci=c[i];i++){if(s(ss,ci).length>0){r[++ri]=ci}}return r},next:function(c,ss){var is=Ext.DomQuery.is;var r=[],ri=-1;for(var i=0,ci;ci=c[i];i++){var n=next(ci);if(n&&is(n,ss)){r[++ri]=ci}}return r},prev:function(c,ss){var is=Ext.DomQuery.is;var r=[],ri=-1;for(var i=0,ci;ci=c[i];i++){var n=prev(ci);if(n&&is(n,ss)){r[++ri]=ci}}return r}}}}();Ext.query=Ext.DomQuery.select;Ext.util.Observable=function(){if(this.listeners){this.on(this.listeners);delete this.listeners}};Ext.util.Observable.prototype={fireEvent:function(){if(this.eventsSuspended!==true){var B=this.events[arguments[0].toLowerCase()];if(typeof B=="object"){return B.fire.apply(B,Array.prototype.slice.call(arguments,1))}}return true},filterOptRe:/^(?:scope|delay|buffer|single)$/,addListener:function(G,K,L,H){if(typeof G=="object"){H=G;for(var I in H){if(this.filterOptRe.test(I)){continue}if(typeof H[I]=="function"){this.addListener(I,H[I],H.scope,H)}else{this.addListener(I,H[I].fn,H[I].scope,H[I])}}return }H=(!H||typeof H=="boolean")?{}:H;G=G.toLowerCase();var J=this.events[G]||true;if(typeof J=="boolean"){J=new Ext.util.Event(this,G);this.events[G]=J}J.addListener(K,L,H)},removeListener:function(E,G,H){var F=this.events[E.toLowerCase()];if(typeof F=="object"){F.removeListener(G,H)}},purgeListeners:function(){for(var B in this.events){if(typeof this.events[B]=="object"){this.events[B].clearListeners()}}},relayEvents:function(H,J){var I=function(A){return function(){return this.fireEvent.apply(this,Ext.combine(A,Array.prototype.slice.call(arguments,0)))}};for(var K=0,G=J.length;K<G;K++){var L=J[K];if(!this.events[L]){this.events[L]=true}H.on(L,I(L),this)}},addEvents:function(F){if(!this.events){this.events={}}if(typeof F=="string"){for(var G=0,E=arguments,H;H=E[G];G++){if(!this.events[E[G]]){this.events[E[G]]=true}}}else{Ext.applyIf(this.events,F)}},hasListener:function(C){var D=this.events[C];return typeof D=="object"&&D.listeners.length>0},suspendEvents:function(){this.eventsSuspended=true},resumeEvents:function(){this.eventsSuspended=false},getMethodEvent:function(I){if(!this.methodEvents){this.methodEvents={}}var J=this.methodEvents[I];if(!J){J={};this.methodEvents[I]=J;J.originalFn=this[I];J.methodName=I;J.before=[];J.after=[];var M,N,L;var K=this;var H=function(A,B,C){if((N=A.apply(B||K,C))!==undefined){if(typeof N==="object"){if(N.returnValue!==undefined){M=N.returnValue}else{M=N}if(N.cancel===true){L=true}}else{if(N===false){L=true}else{M=N}}}};this[I]=function(){M=N=undefined;L=false;var B=Array.prototype.slice.call(arguments,0);for(var A=0,C=J.before.length;A<C;A++){H(J.before[A].fn,J.before[A].scope,B);if(L){return M}}if((N=J.originalFn.apply(K,B))!==undefined){M=N}for(var A=0,C=J.after.length;A<C;A++){H(J.after[A].fn,J.after[A].scope,B);if(L){return M}}return M}}return J},beforeMethod:function(F,H,E){var G=this.getMethodEvent(F);G.before.push({fn:H,scope:E})},afterMethod:function(F,H,E){var G=this.getMethodEvent(F);G.after.push({fn:H,scope:E})},removeMethodListener:function(H,J,K){var I=this.getMethodEvent(H);for(var L=0,G=I.before.length;L<G;L++){if(I.before[L].fn==J&&I.before[L].scope==K){I.before.splice(L,1);return }}for(var L=0,G=I.after.length;L<G;L++){if(I.after[L].fn==J&&I.after[L].scope==K){I.after.splice(L,1);return }}}};Ext.util.Observable.prototype.on=Ext.util.Observable.prototype.addListener;Ext.util.Observable.prototype.un=Ext.util.Observable.prototype.removeListener;Ext.util.Observable.capture=function(E,F,D){E.fireEvent=E.fireEvent.createInterceptor(F,D)};Ext.util.Observable.releaseCapture=function(B){B.fireEvent=Ext.util.Observable.prototype.fireEvent};(function(){var F=function(B,A,C){var H=new Ext.util.DelayedTask();return function(){H.delay(A.buffer,B,C,Array.prototype.slice.call(arguments,0))}};var E=function(B,A,C,H){return function(){A.removeListener(C,H);return B.apply(H,arguments)}};var D=function(B,A,C){return function(){var H=Array.prototype.slice.call(arguments,0);setTimeout(function(){B.apply(C,H)},A.delay||10)}};Ext.util.Event=function(A,B){this.name=B;this.obj=A;this.listeners=[]};Ext.util.Event.prototype={addListener:function(A,B,C){B=B||this.obj;if(!this.isListening(A,B)){var H=this.createListener(A,B,C);if(!this.firing){this.listeners.push(H)}else{this.listeners=this.listeners.slice(0);this.listeners.push(H)}}},createListener:function(B,C,A){A=A||{};C=C||this.obj;var J={fn:B,scope:C,options:A};var I=B;if(A.delay){I=D(I,A,C)}if(A.single){I=E(I,this,B,C)}if(A.buffer){I=F(I,A,C)}J.fireFn=I;return J},findListener:function(A,B){B=B||this.obj;var J=this.listeners;for(var C=0,L=J.length;C<L;C++){var K=J[C];if(K.fn==A&&K.scope==B){return C}}return -1},isListening:function(A,B){return this.findListener(A,B)!=-1},removeListener:function(A,B){var C;if((C=this.findListener(A,B))!=-1){if(!this.firing){this.listeners.splice(C,1)}else{this.listeners=this.listeners.slice(0);this.listeners.splice(C,1)}return true}return false},clearListeners:function(){this.listeners=[]},fire:function(){var J=this.listeners,A,L=J.length;if(L>0){this.firing=true;var C=Array.prototype.slice.call(arguments,0);for(var B=0;B<L;B++){var K=J[B];if(K.fireFn.apply(K.scope||this.obj||window,arguments)===false){this.firing=false;return false}}this.firing=false}return true}}})();Ext.EventManager=function(){var D,Z,d=false;var b,E,i,X;var a=Ext.lib.Event;var Y=Ext.lib.Dom;var k=function(){if(!d){d=true;Ext.isReady=true;if(Z){clearInterval(Z)}if(Ext.isGecko||Ext.isOpera){document.removeEventListener("DOMContentLoaded",k,false)}if(Ext.isIE){var A=document.getElementById("ie-deferred-loader");if(A){A.onreadystatechange=null;A.parentNode.removeChild(A)}}if(D){D.fire();D.clearListeners()}}};var l=function(){D=new Ext.util.Event();if(Ext.isGecko||Ext.isOpera){document.addEventListener("DOMContentLoaded",k,false)}else{if(Ext.isIE){document.write('<script id="ie-deferred-loader" defer="defer" src="//:"><\/script>');var A=document.getElementById("ie-deferred-loader");A.onreadystatechange=function(){if(this.readyState=="complete"){k()}}}else{if(Ext.isSafari){Z=setInterval(function(){var B=document.readyState;if(B=="complete"){k()}},10)}}}a.on(window,"load",k)};var U=function(B,A){var C=new Ext.util.DelayedTask(B);return function(F){F=new Ext.EventObjectImpl(F);C.delay(A.buffer,B,null,[F])}};var W=function(A,B,F,C){return function(G){Ext.EventManager.removeListener(B,F,C);A(G)}};var h=function(B,A){return function(C){C=new Ext.EventObjectImpl(C);setTimeout(function(){B(C)},A.delay||10)}};var c=function(C,F,H,I,J){var G=(!H||typeof H=="boolean")?{}:H;I=I||G.fn;J=J||G.scope;var A=Ext.getDom(C);if(!A){throw'Error listening for "'+F+'". Element "'+C+"\" doesn't exist."}var B=function(K){K=Ext.EventObject.setEvent(K);var L;if(G.delegate){L=K.getTarget(G.delegate,A);if(!L){return }}else{L=K.target}if(G.stopEvent===true){K.stopEvent()}if(G.preventDefault===true){K.preventDefault()}if(G.stopPropagation===true){K.stopPropagation()}if(G.normalized===false){K=K.browserEvent}I.call(J||A,K,L,G)};if(G.delay){B=h(B,G)}if(G.single){B=W(B,A,F,I)}if(G.buffer){B=U(B,G)}I._handlers=I._handlers||[];I._handlers.push([Ext.id(A),F,B]);a.on(A,F,B);if(F=="mousewheel"&&A.addEventListener){A.addEventListener("DOMMouseScroll",B,false);a.on(window,"unload",function(){A.removeEventListener("DOMMouseScroll",B,false)})}if(F=="mousedown"&&A==document){Ext.EventManager.stoppedMouseDownEvent.addListener(B)}return B};var g=function(K,I,B){var A=Ext.id(K),J=B._handlers,F=B;if(J){for(var H=0,C=J.length;H<C;H++){var G=J[H];if(G[0]==A&&G[1]==I){F=G[2];J.splice(H,1);break}}}a.un(K,I,F);K=Ext.getDom(K);if(I=="mousewheel"&&K.addEventListener){K.removeEventListener("DOMMouseScroll",F,false)}if(I=="mousedown"&&K==document){Ext.EventManager.stoppedMouseDownEvent.removeListener(F)}};var e=/^(?:scope|delay|buffer|single|stopEvent|preventDefault|stopPropagation|normalized|args|delegate)$/;var V={addListener:function(C,G,A,B,F){if(typeof G=="object"){var H=G;for(var I in H){if(e.test(I)){continue}if(typeof H[I]=="function"){c(C,I,H,H[I],H.scope)}else{c(C,I,H[I])}}return }return c(C,G,F,A,B)},removeListener:function(B,C,A){return g(B,C,A)},onDocumentReady:function(A,B,C){if(d){D.addListener(A,B,C);D.fire();D.clearListeners();return }if(!D){l()}D.addListener(A,B,C)},onWindowResize:function(A,B,C){if(!b){b=new Ext.util.Event();E=new Ext.util.DelayedTask(function(){b.fire(Y.getViewWidth(),Y.getViewHeight())});a.on(window,"resize",this.fireWindowResize,this)}b.addListener(A,B,C)},fireWindowResize:function(){if(b){if((Ext.isIE||Ext.isAir)&&E){E.delay(50)}else{b.fire(Y.getViewWidth(),Y.getViewHeight())}}},onTextResize:function(A,B,F){if(!i){i=new Ext.util.Event();var C=new Ext.Element(document.createElement("div"));C.dom.className="x-text-resize";C.dom.innerHTML="X";C.appendTo(document.body);X=C.dom.offsetHeight;setInterval(function(){if(C.dom.offsetHeight!=X){i.fire(X,X=C.dom.offsetHeight)}},this.textResizeInterval)}i.addListener(A,B,F)},removeResizeListener:function(A,B){if(b){b.removeListener(A,B)}},fireResize:function(){if(b){b.fire(Y.getViewWidth(),Y.getViewHeight())}},ieDeferSrc:false,textResizeInterval:50};V.on=V.addListener;V.un=V.removeListener;V.stoppedMouseDownEvent=new Ext.util.Event();return V}();Ext.onReady=Ext.EventManager.onDocumentReady;Ext.onReady(function(){var F=Ext.getBody();if(!F){return }var D=[Ext.isIE?"ext-ie "+(Ext.isIE6?"ext-ie6":"ext-ie7"):Ext.isGecko?"ext-gecko":Ext.isOpera?"ext-opera":Ext.isSafari?"ext-safari":""];if(Ext.isMac){D.push("ext-mac")}if(Ext.isLinux){D.push("ext-linux")}if(Ext.isBorderBox){D.push("ext-border-box")}if(Ext.isStrict){var E=F.dom.parentNode;if(E){E.className+=" ext-strict"}}F.addClass(D.join(" "))});Ext.EventObject=function(){var F=Ext.lib.Event;var D={63234:37,63235:39,63232:38,63233:40,63276:33,63277:34,63272:46,63273:36,63275:35};var E=Ext.isIE?{1:0,4:1,2:2}:(Ext.isSafari?{1:0,2:1,3:2}:{0:0,1:1,2:2});Ext.EventObjectImpl=function(A){if(A){this.setEvent(A.browserEvent||A)}};Ext.EventObjectImpl.prototype={browserEvent:null,button:-1,shiftKey:false,ctrlKey:false,altKey:false,BACKSPACE:8,TAB:9,RETURN:13,ENTER:13,SHIFT:16,CONTROL:17,ESC:27,SPACE:32,PAGEUP:33,PAGEDOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,DELETE:46,F5:116,setEvent:function(A){if(A==this||(A&&A.browserEvent)){return A}this.browserEvent=A;if(A){this.button=A.button?E[A.button]:(A.which?A.which-1:-1);if(A.type=="click"&&this.button==-1){this.button=0}this.type=A.type;this.shiftKey=A.shiftKey;this.ctrlKey=A.ctrlKey||A.metaKey;this.altKey=A.altKey;this.keyCode=A.keyCode;this.charCode=A.charCode;this.target=F.getTarget(A);this.xy=F.getXY(A)}else{this.button=-1;this.shiftKey=false;this.ctrlKey=false;this.altKey=false;this.keyCode=0;this.charCode=0;this.target=null;this.xy=[0,0]}return this},stopEvent:function(){if(this.browserEvent){if(this.browserEvent.type=="mousedown"){Ext.EventManager.stoppedMouseDownEvent.fire(this)}F.stopEvent(this.browserEvent)}},preventDefault:function(){if(this.browserEvent){F.preventDefault(this.browserEvent)}},isNavKeyPress:function(){var A=this.keyCode;A=Ext.isSafari?(D[A]||A):A;return(A>=33&&A<=40)||A==this.RETURN||A==this.TAB||A==this.ESC},isSpecialKey:function(){var A=this.keyCode;return(this.type=="keypress"&&this.ctrlKey)||A==9||A==13||A==40||A==27||(A==16)||(A==17)||(A>=18&&A<=20)||(A>=33&&A<=35)||(A>=36&&A<=39)||(A>=44&&A<=45)},stopPropagation:function(){if(this.browserEvent){if(this.browserEvent.type=="mousedown"){Ext.EventManager.stoppedMouseDownEvent.fire(this)}F.stopPropagation(this.browserEvent)}},getCharCode:function(){return this.charCode||this.keyCode},getKey:function(){var A=this.keyCode||this.charCode;return Ext.isSafari?(D[A]||A):A},getPageX:function(){return this.xy[0]},getPageY:function(){return this.xy[1]},getTime:function(){if(this.browserEvent){return F.getTime(this.browserEvent)}return null},getXY:function(){return this.xy},getTarget:function(B,A,C){return B?Ext.fly(this.target).findParent(B,A,C):(C?Ext.get(this.target):this.target)},getRelatedTarget:function(){if(this.browserEvent){return F.getRelatedTarget(this.browserEvent)}return null},getWheelDelta:function(){var B=this.browserEvent;var A=0;if(B.wheelDelta){A=B.wheelDelta/120}else{if(B.detail){A=-B.detail/3}}return A},hasModifier:function(){return((this.ctrlKey||this.altKey)||this.shiftKey)?true:false},within:function(B,A){var C=this[A?"getRelatedTarget":"getTarget"]();return C&&Ext.fly(B).contains(C)},getPoint:function(){return new Ext.lib.Point(this.xy[0],this.xy[1])}};return new Ext.EventObjectImpl()}();(function(){var D=Ext.lib.Dom;var E=Ext.lib.Event;var A=Ext.lib.Anim;var propCache={};var camelRe=/(-[a-z])/gi;var camelFn=function(m,a){return a.charAt(1).toUpperCase()};var view=document.defaultView;Ext.Element=function(element,forceNew){var dom=typeof element=="string"?document.getElementById(element):element;if(!dom){return null}var id=dom.id;if(forceNew!==true&&id&&Ext.Element.cache[id]){return Ext.Element.cache[id]}this.dom=dom;this.id=id||Ext.id(dom)};var El=Ext.Element;El.prototype={originalDisplay:"",visibilityMode:1,defaultUnit:"px",setVisibilityMode:function(visMode){this.visibilityMode=visMode;return this},enableDisplayMode:function(display){this.setVisibilityMode(El.DISPLAY);if(typeof display!="undefined"){this.originalDisplay=display}return this},findParent:function(simpleSelector,maxDepth,returnEl){var p=this.dom,b=document.body,depth=0,dq=Ext.DomQuery,stopEl;maxDepth=maxDepth||50;if(typeof maxDepth!="number"){stopEl=Ext.getDom(maxDepth);maxDepth=10}while(p&&p.nodeType==1&&depth<maxDepth&&p!=b&&p!=stopEl){if(dq.is(p,simpleSelector)){return returnEl?Ext.get(p):p}depth++;p=p.parentNode}return null},findParentNode:function(simpleSelector,maxDepth,returnEl){var p=Ext.fly(this.dom.parentNode,"_internal");return p?p.findParent(simpleSelector,maxDepth,returnEl):null},up:function(simpleSelector,maxDepth){return this.findParentNode(simpleSelector,maxDepth,true)},is:function(simpleSelector){return Ext.DomQuery.is(this.dom,simpleSelector)},animate:function(args,duration,onComplete,easing,animType){this.anim(args,{duration:duration,callback:onComplete,easing:easing},animType);return this},anim:function(args,opt,animType,defaultDur,defaultEase,cb){animType=animType||"run";opt=opt||{};var anim=Ext.lib.Anim[animType](this.dom,args,(opt.duration||defaultDur)||0.35,(opt.easing||defaultEase)||"easeOut",function(){Ext.callback(cb,this);Ext.callback(opt.callback,opt.scope||this,[this,opt])},this);opt.anim=anim;return anim},preanim:function(a,i){return !a[i]?false:(typeof a[i]=="object"?a[i]:{duration:a[i+1],callback:a[i+2],easing:a[i+3]})},clean:function(forceReclean){if(this.isCleaned&&forceReclean!==true){return this}var ns=/\S/;var d=this.dom,n=d.firstChild,ni=-1;while(n){var nx=n.nextSibling;if(n.nodeType==3&&!ns.test(n.nodeValue)){d.removeChild(n)}else{n.nodeIndex=++ni}n=nx}this.isCleaned=true;return this},scrollIntoView:function(container,hscroll){var c=Ext.getDom(container)||Ext.getBody().dom;var el=this.dom;var o=this.getOffsetsTo(c),l=o[0]+c.scrollLeft,t=o[1]+c.scrollTop,b=t+el.offsetHeight,r=l+el.offsetWidth;var ch=c.clientHeight;var ct=parseInt(c.scrollTop,10);var cl=parseInt(c.scrollLeft,10);var cb=ct+ch;var cr=cl+c.clientWidth;if(el.offsetHeight>ch||t<ct){c.scrollTop=t}else{if(b>cb){c.scrollTop=b-ch}}c.scrollTop=c.scrollTop;if(hscroll!==false){if(el.offsetWidth>c.clientWidth||l<cl){c.scrollLeft=l}else{if(r>cr){c.scrollLeft=r-c.clientWidth}}c.scrollLeft=c.scrollLeft}return this},scrollChildIntoView:function(child,hscroll){Ext.fly(child,"_scrollChildIntoView").scrollIntoView(this,hscroll)},autoHeight:function(animate,duration,onComplete,easing){var oldHeight=this.getHeight();this.clip();this.setHeight(1);setTimeout(function(){var height=parseInt(this.dom.scrollHeight,10);if(!animate){this.setHeight(height);this.unclip();if(typeof onComplete=="function"){onComplete()}}else{this.setHeight(oldHeight);this.setHeight(height,animate,duration,function(){this.unclip();if(typeof onComplete=="function"){onComplete()}}.createDelegate(this),easing)}}.createDelegate(this),0);return this},contains:function(el){if(!el){return false}return D.isAncestor(this.dom,el.dom?el.dom:el)},isVisible:function(deep){var vis=!(this.getStyle("visibility")=="hidden"||this.getStyle("display")=="none");if(deep!==true||!vis){return vis}var p=this.dom.parentNode;while(p&&p.tagName.toLowerCase()!="body"){if(!Ext.fly(p,"_isVisible").isVisible()){return false}p=p.parentNode}return true},select:function(selector,unique){return El.select(selector,unique,this.dom)},query:function(selector,unique){return Ext.DomQuery.select(selector,this.dom)},child:function(selector,returnDom){var n=Ext.DomQuery.selectNode(selector,this.dom);return returnDom?n:Ext.get(n)},down:function(selector,returnDom){var n=Ext.DomQuery.selectNode(" > "+selector,this.dom);return returnDom?n:Ext.get(n)},initDD:function(group,config,overrides){var dd=new Ext.dd.DD(Ext.id(this.dom),group,config);return Ext.apply(dd,overrides)},initDDProxy:function(group,config,overrides){var dd=new Ext.dd.DDProxy(Ext.id(this.dom),group,config);return Ext.apply(dd,overrides)},initDDTarget:function(group,config,overrides){var dd=new Ext.dd.DDTarget(Ext.id(this.dom),group,config);return Ext.apply(dd,overrides)},setVisible:function(visible,animate){if(!animate||!A){if(this.visibilityMode==El.DISPLAY){this.setDisplayed(visible)}else{this.fixDisplay();this.dom.style.visibility=visible?"visible":"hidden"}}else{var dom=this.dom;var visMode=this.visibilityMode;if(visible){this.setOpacity(0.01);this.setVisible(true)}this.anim({opacity:{to:(visible?1:0)}},this.preanim(arguments,1),null,0.35,"easeIn",function(){if(!visible){if(visMode==El.DISPLAY){dom.style.display="none"}else{dom.style.visibility="hidden"}Ext.get(dom).setOpacity(1)}})}return this},isDisplayed:function(){return this.getStyle("display")!="none"},toggle:function(animate){this.setVisible(!this.isVisible(),this.preanim(arguments,0));return this},setDisplayed:function(value){if(typeof value=="boolean"){value=value?this.originalDisplay:"none"}this.setStyle("display",value);return this},focus:function(){try{this.dom.focus()}catch(e){}return this},blur:function(){try{this.dom.blur()}catch(e){}return this},addClass:function(className){if(Ext.isArray(className)){for(var i=0,len=className.length;i<len;i++){this.addClass(className[i])}}else{if(className&&!this.hasClass(className)){this.dom.className=this.dom.className+" "+className}}return this},radioClass:function(className){var siblings=this.dom.parentNode.childNodes;for(var i=0;i<siblings.length;i++){var s=siblings[i];if(s.nodeType==1){Ext.get(s).removeClass(className)}}this.addClass(className);return this},removeClass:function(className){if(!className||!this.dom.className){return this}if(Ext.isArray(className)){for(var i=0,len=className.length;i<len;i++){this.removeClass(className[i])}}else{if(this.hasClass(className)){var re=this.classReCache[className];if(!re){re=new RegExp("(?:^|\\s+)"+className+"(?:\\s+|$)","g");this.classReCache[className]=re}this.dom.className=this.dom.className.replace(re," ")}}return this},classReCache:{},toggleClass:function(className){if(this.hasClass(className)){this.removeClass(className)}else{this.addClass(className)}return this},hasClass:function(className){return className&&(" "+this.dom.className+" ").indexOf(" "+className+" ")!=-1},replaceClass:function(oldClassName,newClassName){this.removeClass(oldClassName);this.addClass(newClassName);return this},getStyles:function(){var a=arguments,len=a.length,r={};for(var i=0;i<len;i++){r[a[i]]=this.getStyle(a[i])}return r},getStyle:function(){return view&&view.getComputedStyle?function(prop){var el=this.dom,v,cs,camel;if(prop=="float"){prop="cssFloat"}if(v=el.style[prop]){return v}if(cs=view.getComputedStyle(el,"")){if(!(camel=propCache[prop])){camel=propCache[prop]=prop.replace(camelRe,camelFn)}return cs[camel]}return null}:function(prop){var el=this.dom,v,cs,camel;if(prop=="opacity"){if(typeof el.style.filter=="string"){var m=el.style.filter.match(/alpha\(opacity=(.*)\)/i);if(m){var fv=parseFloat(m[1]);if(!isNaN(fv)){return fv?fv/100:0}}}return 1}else{if(prop=="float"){prop="styleFloat"}}if(!(camel=propCache[prop])){camel=propCache[prop]=prop.replace(camelRe,camelFn)}if(v=el.style[camel]){return v}if(cs=el.currentStyle){return cs[camel]}return null}}(),setStyle:function(prop,value){if(typeof prop=="string"){var camel;if(!(camel=propCache[prop])){camel=propCache[prop]=prop.replace(camelRe,camelFn)}if(camel=="opacity"){this.setOpacity(value)}else{this.dom.style[camel]=value}}else{for(var style in prop){if(typeof prop[style]!="function"){this.setStyle(style,prop[style])}}}return this},applyStyles:function(style){Ext.DomHelper.applyStyles(this.dom,style);return this},getX:function(){return D.getX(this.dom)},getY:function(){return D.getY(this.dom)},getXY:function(){return D.getXY(this.dom)},getOffsetsTo:function(el){var o=this.getXY();var e=Ext.fly(el,"_internal").getXY();return[o[0]-e[0],o[1]-e[1]]},setX:function(x,animate){if(!animate||!A){D.setX(this.dom,x)}else{this.setXY([x,this.getY()],this.preanim(arguments,1))}return this},setY:function(y,animate){if(!animate||!A){D.setY(this.dom,y)}else{this.setXY([this.getX(),y],this.preanim(arguments,1))}return this},setLeft:function(left){this.setStyle("left",this.addUnits(left));return this},setTop:function(top){this.setStyle("top",this.addUnits(top));return this},setRight:function(right){this.setStyle("right",this.addUnits(right));return this},setBottom:function(bottom){this.setStyle("bottom",this.addUnits(bottom));return this},setXY:function(pos,animate){if(!animate||!A){D.setXY(this.dom,pos)}else{this.anim({points:{to:pos}},this.preanim(arguments,1),"motion")}return this},setLocation:function(x,y,animate){this.setXY([x,y],this.preanim(arguments,2));return this},moveTo:function(x,y,animate){this.setXY([x,y],this.preanim(arguments,2));return this},getRegion:function(){return D.getRegion(this.dom)},getHeight:function(contentHeight){var h=this.dom.offsetHeight||0;h=contentHeight!==true?h:h-this.getBorderWidth("tb")-this.getPadding("tb");return h<0?0:h},getWidth:function(contentWidth){var w=this.dom.offsetWidth||0;w=contentWidth!==true?w:w-this.getBorderWidth("lr")-this.getPadding("lr");return w<0?0:w},getComputedHeight:function(){var h=Math.max(this.dom.offsetHeight,this.dom.clientHeight);if(!h){h=parseInt(this.getStyle("height"),10)||0;if(!this.isBorderBox()){h+=this.getFrameWidth("tb")}}return h},getComputedWidth:function(){var w=Math.max(this.dom.offsetWidth,this.dom.clientWidth);if(!w){w=parseInt(this.getStyle("width"),10)||0;if(!this.isBorderBox()){w+=this.getFrameWidth("lr")}}return w},getSize:function(contentSize){return{width:this.getWidth(contentSize),height:this.getHeight(contentSize)}},getStyleSize:function(){var w,h,d=this.dom,s=d.style;if(s.width&&s.width!="auto"){w=parseInt(s.width,10);if(Ext.isBorderBox){w-=this.getFrameWidth("lr")}}if(s.height&&s.height!="auto"){h=parseInt(s.height,10);if(Ext.isBorderBox){h-=this.getFrameWidth("tb")}}return{width:w||this.getWidth(true),height:h||this.getHeight(true)}},getViewSize:function(){var d=this.dom,doc=document,aw=0,ah=0;if(d==doc||d==doc.body){return{width:D.getViewWidth(),height:D.getViewHeight()}}else{return{width:d.clientWidth,height:d.clientHeight}}},getValue:function(asNumber){return asNumber?parseInt(this.dom.value,10):this.dom.value},adjustWidth:function(width){if(typeof width=="number"){if(this.autoBoxAdjust&&!this.isBorderBox()){width-=(this.getBorderWidth("lr")+this.getPadding("lr"))}if(width<0){width=0}}return width},adjustHeight:function(height){if(typeof height=="number"){if(this.autoBoxAdjust&&!this.isBorderBox()){height-=(this.getBorderWidth("tb")+this.getPadding("tb"))}if(height<0){height=0}}return height},setWidth:function(width,animate){width=this.adjustWidth(width);if(!animate||!A){this.dom.style.width=this.addUnits(width)}else{this.anim({width:{to:width}},this.preanim(arguments,1))}return this},setHeight:function(height,animate){height=this.adjustHeight(height);if(!animate||!A){this.dom.style.height=this.addUnits(height)}else{this.anim({height:{to:height}},this.preanim(arguments,1))}return this},setSize:function(width,height,animate){if(typeof width=="object"){height=width.height;width=width.width}width=this.adjustWidth(width);height=this.adjustHeight(height);if(!animate||!A){this.dom.style.width=this.addUnits(width);this.dom.style.height=this.addUnits(height)}else{this.anim({width:{to:width},height:{to:height}},this.preanim(arguments,2))}return this},setBounds:function(x,y,width,height,animate){if(!animate||!A){this.setSize(width,height);this.setLocation(x,y)}else{width=this.adjustWidth(width);height=this.adjustHeight(height);this.anim({points:{to:[x,y]},width:{to:width},height:{to:height}},this.preanim(arguments,4),"motion")}return this},setRegion:function(region,animate){this.setBounds(region.left,region.top,region.right-region.left,region.bottom-region.top,this.preanim(arguments,1));return this},addListener:function(eventName,fn,scope,options){Ext.EventManager.on(this.dom,eventName,fn,scope||this,options)},removeListener:function(eventName,fn){Ext.EventManager.removeListener(this.dom,eventName,fn);return this},removeAllListeners:function(){E.purgeElement(this.dom);return this},relayEvent:function(eventName,observable){this.on(eventName,function(e){observable.fireEvent(eventName,e)})},setOpacity:function(opacity,animate){if(!animate||!A){var s=this.dom.style;if(Ext.isIE){s.zoom=1;s.filter=(s.filter||"").replace(/alpha\([^\)]*\)/gi,"")+(opacity==1?"":" alpha(opacity="+opacity*100+")")}else{s.opacity=opacity}}else{this.anim({opacity:{to:opacity}},this.preanim(arguments,1),null,0.35,"easeIn")}return this},getLeft:function(local){if(!local){return this.getX()}else{return parseInt(this.getStyle("left"),10)||0}},getRight:function(local){if(!local){return this.getX()+this.getWidth()}else{return(this.getLeft(true)+this.getWidth())||0}},getTop:function(local){if(!local){return this.getY()}else{return parseInt(this.getStyle("top"),10)||0}},getBottom:function(local){if(!local){return this.getY()+this.getHeight()}else{return(this.getTop(true)+this.getHeight())||0}},position:function(pos,zIndex,x,y){if(!pos){if(this.getStyle("position")=="static"){this.setStyle("position","relative")}}else{this.setStyle("position",pos)}if(zIndex){this.setStyle("z-index",zIndex)}if(x!==undefined&&y!==undefined){this.setXY([x,y])}else{if(x!==undefined){this.setX(x)}else{if(y!==undefined){this.setY(y)}}}},clearPositioning:function(value){value=value||"";this.setStyle({left:value,right:value,top:value,bottom:value,"z-index":"",position:"static"});return this},getPositioning:function(){var l=this.getStyle("left");var t=this.getStyle("top");return{position:this.getStyle("position"),left:l,right:l?"":this.getStyle("right"),top:t,bottom:t?"":this.getStyle("bottom"),"z-index":this.getStyle("z-index")}},getBorderWidth:function(side){return this.addStyles(side,El.borders)},getPadding:function(side){return this.addStyles(side,El.paddings)},setPositioning:function(pc){this.applyStyles(pc);if(pc.right=="auto"){this.dom.style.right=""}if(pc.bottom=="auto"){this.dom.style.bottom=""}return this},fixDisplay:function(){if(this.getStyle("display")=="none"){this.setStyle("visibility","hidden");this.setStyle("display",this.originalDisplay);if(this.getStyle("display")=="none"){this.setStyle("display","block")}}},setOverflow:function(v){if(v=="auto"&&Ext.isMac&&Ext.isGecko){this.dom.style.overflow="hidden";(function(){this.dom.style.overflow="auto"}).defer(1,this)}else{this.dom.style.overflow=v}},setLeftTop:function(left,top){this.dom.style.left=this.addUnits(left);this.dom.style.top=this.addUnits(top);return this},move:function(direction,distance,animate){var xy=this.getXY();direction=direction.toLowerCase();switch(direction){case"l":case"left":this.moveTo(xy[0]-distance,xy[1],this.preanim(arguments,2));break;case"r":case"right":this.moveTo(xy[0]+distance,xy[1],this.preanim(arguments,2));break;case"t":case"top":case"up":this.moveTo(xy[0],xy[1]-distance,this.preanim(arguments,2));break;case"b":case"bottom":case"down":this.moveTo(xy[0],xy[1]+distance,this.preanim(arguments,2));break}return this},clip:function(){if(!this.isClipped){this.isClipped=true;this.originalClip={o:this.getStyle("overflow"),x:this.getStyle("overflow-x"),y:this.getStyle("overflow-y")};this.setStyle("overflow","hidden");this.setStyle("overflow-x","hidden");this.setStyle("overflow-y","hidden")}return this},unclip:function(){if(this.isClipped){this.isClipped=false;var o=this.originalClip;if(o.o){this.setStyle("overflow",o.o)}if(o.x){this.setStyle("overflow-x",o.x)}if(o.y){this.setStyle("overflow-y",o.y)}}return this},getAnchorXY:function(anchor,local,s){var w,h,vp=false;if(!s){var d=this.dom;if(d==document.body||d==document){vp=true;w=D.getViewWidth();h=D.getViewHeight()}else{w=this.getWidth();h=this.getHeight()}}else{w=s.width;h=s.height}var x=0,y=0,r=Math.round;switch((anchor||"tl").toLowerCase()){case"c":x=r(w*0.5);y=r(h*0.5);break;case"t":x=r(w*0.5);y=0;break;case"l":x=0;y=r(h*0.5);break;case"r":x=w;y=r(h*0.5);break;case"b":x=r(w*0.5);y=h;break;case"tl":x=0;y=0;break;case"bl":x=0;y=h;break;case"br":x=w;y=h;break;case"tr":x=w;y=0;break}if(local===true){return[x,y]}if(vp){var sc=this.getScroll();return[x+sc.left,y+sc.top]}var o=this.getXY();return[x+o[0],y+o[1]]},getAlignToXY:function(el,p,o){el=Ext.get(el);if(!el||!el.dom){throw"Element.alignToXY with an element that doesn't exist"}var d=this.dom;var c=false;var p1="",p2="";o=o||[0,0];if(!p){p="tl-bl"}else{if(p=="?"){p="tl-bl?"}else{if(p.indexOf("-")==-1){p="tl-"+p}}}p=p.toLowerCase();var m=p.match(/^([a-z]+)-([a-z]+)(\?)?$/);if(!m){throw"Element.alignTo with an invalid alignment "+p}p1=m[1];p2=m[2];c=!!m[3];var a1=this.getAnchorXY(p1,true);var a2=el.getAnchorXY(p2,false);var x=a2[0]-a1[0]+o[0];var y=a2[1]-a1[1]+o[1];if(c){var w=this.getWidth(),h=this.getHeight(),r=el.getRegion();var dw=D.getViewWidth()-5,dh=D.getViewHeight()-5;var p1y=p1.charAt(0),p1x=p1.charAt(p1.length-1);var p2y=p2.charAt(0),p2x=p2.charAt(p2.length-1);var swapY=((p1y=="t"&&p2y=="b")||(p1y=="b"&&p2y=="t"));var swapX=((p1x=="r"&&p2x=="l")||(p1x=="l"&&p2x=="r"));var doc=document;var scrollX=(doc.documentElement.scrollLeft||doc.body.scrollLeft||0)+5;var scrollY=(doc.documentElement.scrollTop||doc.body.scrollTop||0)+5;if((x+w)>dw+scrollX){x=swapX?r.left-w:dw+scrollX-w}if(x<scrollX){x=swapX?r.right:scrollX}if((y+h)>dh+scrollY){y=swapY?r.top-h:dh+scrollY-h}if(y<scrollY){y=swapY?r.bottom:scrollY}}return[x,y]},getConstrainToXY:function(){var os={top:0,left:0,bottom:0,right:0};return function(el,local,offsets,proposedXY){el=Ext.get(el);offsets=offsets?Ext.applyIf(offsets,os):os;var vw,vh,vx=0,vy=0;if(el.dom==document.body||el.dom==document){vw=Ext.lib.Dom.getViewWidth();vh=Ext.lib.Dom.getViewHeight()}else{vw=el.dom.clientWidth;vh=el.dom.clientHeight;if(!local){var vxy=el.getXY();vx=vxy[0];vy=vxy[1]}}var s=el.getScroll();vx+=offsets.left+s.left;vy+=offsets.top+s.top;vw-=offsets.right;vh-=offsets.bottom;var vr=vx+vw;var vb=vy+vh;var xy=proposedXY||(!local?this.getXY():[this.getLeft(true),this.getTop(true)]);var x=xy[0],y=xy[1];var w=this.dom.offsetWidth,h=this.dom.offsetHeight;var moved=false;if((x+w)>vr){x=vr-w;moved=true}if((y+h)>vb){y=vb-h;moved=true}if(x<vx){x=vx;moved=true}if(y<vy){y=vy;moved=true}return moved?[x,y]:false}}(),adjustForConstraints:function(xy,parent,offsets){return this.getConstrainToXY(parent||document,false,offsets,xy)||xy},alignTo:function(element,position,offsets,animate){var xy=this.getAlignToXY(element,position,offsets);this.setXY(xy,this.preanim(arguments,3));return this},anchorTo:function(el,alignment,offsets,animate,monitorScroll,callback){var action=function(){this.alignTo(el,alignment,offsets,animate);Ext.callback(callback,this)};Ext.EventManager.onWindowResize(action,this);var tm=typeof monitorScroll;if(tm!="undefined"){Ext.EventManager.on(window,"scroll",action,this,{buffer:tm=="number"?monitorScroll:50})}action.call(this);return this},clearOpacity:function(){if(window.ActiveXObject){if(typeof this.dom.style.filter=="string"&&(/alpha/i).test(this.dom.style.filter)){this.dom.style.filter=""}}else{this.dom.style.opacity="";this.dom.style["-moz-opacity"]="";this.dom.style["-khtml-opacity"]=""}return this},hide:function(animate){this.setVisible(false,this.preanim(arguments,0));return this},show:function(animate){this.setVisible(true,this.preanim(arguments,0));return this},addUnits:function(size){return Ext.Element.addUnits(size,this.defaultUnit)},update:function(html,loadScripts,callback){if(typeof html=="undefined"){html=""}if(loadScripts!==true){this.dom.innerHTML=html;if(typeof callback=="function"){callback()}return this}var id=Ext.id();var dom=this.dom;html+='<span id="'+id+'"></span>';E.onAvailable(id,function(){var hd=document.getElementsByTagName("head")[0];var re=/(?:<script([^>]*)?>)((\n|\r|.)*?)(?:<\/script>)/ig;var srcRe=/\ssrc=([\'\"])(.*?)\1/i;var typeRe=/\stype=([\'\"])(.*?)\1/i;var match;while(match=re.exec(html)){var attrs=match[1];var srcMatch=attrs?attrs.match(srcRe):false;if(srcMatch&&srcMatch[2]){var s=document.createElement("script");s.src=srcMatch[2];var typeMatch=attrs.match(typeRe);if(typeMatch&&typeMatch[2]){s.type=typeMatch[2]}hd.appendChild(s)}else{if(match[2]&&match[2].length>0){if(window.execScript){window.execScript(match[2])}else{window.eval(match[2])}}}}var el=document.getElementById(id);if(el){Ext.removeNode(el)}if(typeof callback=="function"){callback()}});dom.innerHTML=html.replace(/(?:<script.*?>)((\n|\r|.)*?)(?:<\/script>)/ig,"");return this},load:function(){var um=this.getUpdater();um.update.apply(um,arguments);return this},getUpdater:function(){if(!this.updateManager){this.updateManager=new Ext.Updater(this)}return this.updateManager},unselectable:function(){this.dom.unselectable="on";this.swallowEvent("selectstart",true);this.applyStyles("-moz-user-select:none;-khtml-user-select:none;");this.addClass("x-unselectable");return this},getCenterXY:function(){return this.getAlignToXY(document,"c-c")},center:function(centerIn){this.alignTo(centerIn||document,"c-c");return this},isBorderBox:function(){return noBoxAdjust[this.dom.tagName.toLowerCase()]||Ext.isBorderBox},getBox:function(contentBox,local){var xy;if(!local){xy=this.getXY()}else{var left=parseInt(this.getStyle("left"),10)||0;var top=parseInt(this.getStyle("top"),10)||0;xy=[left,top]}var el=this.dom,w=el.offsetWidth,h=el.offsetHeight,bx;if(!contentBox){bx={x:xy[0],y:xy[1],0:xy[0],1:xy[1],width:w,height:h}}else{var l=this.getBorderWidth("l")+this.getPadding("l");var r=this.getBorderWidth("r")+this.getPadding("r");var t=this.getBorderWidth("t")+this.getPadding("t");var b=this.getBorderWidth("b")+this.getPadding("b");bx={x:xy[0]+l,y:xy[1]+t,0:xy[0]+l,1:xy[1]+t,width:w-(l+r),height:h-(t+b)}}bx.right=bx.x+bx.width;bx.bottom=bx.y+bx.height;return bx},getFrameWidth:function(sides,onlyContentBox){return onlyContentBox&&Ext.isBorderBox?0:(this.getPadding(sides)+this.getBorderWidth(sides))},setBox:function(box,adjust,animate){var w=box.width,h=box.height;if((adjust&&!this.autoBoxAdjust)&&!this.isBorderBox()){w-=(this.getBorderWidth("lr")+this.getPadding("lr"));h-=(this.getBorderWidth("tb")+this.getPadding("tb"))}this.setBounds(box.x,box.y,w,h,this.preanim(arguments,2));return this},repaint:function(){var dom=this.dom;this.addClass("x-repaint");setTimeout(function(){Ext.get(dom).removeClass("x-repaint")},1);return this},getMargins:function(side){if(!side){return{top:parseInt(this.getStyle("margin-top"),10)||0,left:parseInt(this.getStyle("margin-left"),10)||0,bottom:parseInt(this.getStyle("margin-bottom"),10)||0,right:parseInt(this.getStyle("margin-right"),10)||0}}else{return this.addStyles(side,El.margins)}},addStyles:function(sides,styles){var val=0,v,w;for(var i=0,len=sides.length;i<len;i++){v=this.getStyle(styles[sides.charAt(i)]);if(v){w=parseInt(v,10);if(w){val+=(w>=0?w:-1*w)}}}return val},createProxy:function(config,renderTo,matchBox){config=typeof config=="object"?config:{tag:"div",cls:config};var proxy;if(renderTo){proxy=Ext.DomHelper.append(renderTo,config,true)}else{proxy=Ext.DomHelper.insertBefore(this.dom,config,true)}if(matchBox){proxy.setBox(this.getBox())}return proxy},mask:function(msg,msgCls){if(this.getStyle("position")=="static"){this.setStyle("position","relative")}if(this._maskMsg){this._maskMsg.remove()}if(this._mask){this._mask.remove()}this._mask=Ext.DomHelper.append(this.dom,{cls:"ext-el-mask"},true);this.addClass("x-masked");this._mask.setDisplayed(true);if(typeof msg=="string"){this._maskMsg=Ext.DomHelper.append(this.dom,{cls:"ext-el-mask-msg",cn:{tag:"div"}},true);var mm=this._maskMsg;mm.dom.className=msgCls?"ext-el-mask-msg "+msgCls:"ext-el-mask-msg";mm.dom.firstChild.innerHTML=msg;mm.setDisplayed(true);mm.center(this)}if(Ext.isIE&&!(Ext.isIE7&&Ext.isStrict)&&this.getStyle("height")=="auto"){this._mask.setSize(this.dom.clientWidth,this.getHeight())}return this._mask},unmask:function(){if(this._mask){if(this._maskMsg){this._maskMsg.remove();delete this._maskMsg}this._mask.remove();delete this._mask}this.removeClass("x-masked")},isMasked:function(){return this._mask&&this._mask.isVisible()},createShim:function(){var el=document.createElement("iframe");el.frameBorder="no";el.className="ext-shim";if(Ext.isIE&&Ext.isSecure){el.src=Ext.SSL_SECURE_URL}var shim=Ext.get(this.dom.parentNode.insertBefore(el,this.dom));shim.autoBoxAdjust=false;return shim},remove:function(){Ext.removeNode(this.dom);delete El.cache[this.dom.id]},hover:function(overFn,outFn,scope){var preOverFn=function(e){if(!e.within(this,true)){overFn.apply(scope||this,arguments)}};var preOutFn=function(e){if(!e.within(this,true)){outFn.apply(scope||this,arguments)}};this.on("mouseover",preOverFn,this.dom);this.on("mouseout",preOutFn,this.dom);return this},addClassOnOver:function(className){this.hover(function(){Ext.fly(this,"_internal").addClass(className)},function(){Ext.fly(this,"_internal").removeClass(className)});return this},addClassOnFocus:function(className){this.on("focus",function(){Ext.fly(this,"_internal").addClass(className)},this.dom);this.on("blur",function(){Ext.fly(this,"_internal").removeClass(className)},this.dom);return this},addClassOnClick:function(className){var dom=this.dom;this.on("mousedown",function(){Ext.fly(dom,"_internal").addClass(className);var d=Ext.getDoc();var fn=function(){Ext.fly(dom,"_internal").removeClass(className);d.removeListener("mouseup",fn)};d.on("mouseup",fn)});return this},swallowEvent:function(eventName,preventDefault){var fn=function(e){e.stopPropagation();if(preventDefault){e.preventDefault()}};if(Ext.isArray(eventName)){for(var i=0,len=eventName.length;i<len;i++){this.on(eventName[i],fn)}return this}this.on(eventName,fn);return this},parent:function(selector,returnDom){return this.matchNode("parentNode","parentNode",selector,returnDom)},next:function(selector,returnDom){return this.matchNode("nextSibling","nextSibling",selector,returnDom)},prev:function(selector,returnDom){return this.matchNode("previousSibling","previousSibling",selector,returnDom)},first:function(selector,returnDom){return this.matchNode("nextSibling","firstChild",selector,returnDom)},last:function(selector,returnDom){return this.matchNode("previousSibling","lastChild",selector,returnDom)},matchNode:function(dir,start,selector,returnDom){var n=this.dom[start];while(n){if(n.nodeType==1&&(!selector||Ext.DomQuery.is(n,selector))){return !returnDom?Ext.get(n):n}n=n[dir]}return null},appendChild:function(el){el=Ext.get(el);el.appendTo(this);return this},createChild:function(config,insertBefore,returnDom){config=config||{tag:"div"};if(insertBefore){return Ext.DomHelper.insertBefore(insertBefore,config,returnDom!==true)}return Ext.DomHelper[!this.dom.firstChild?"overwrite":"append"](this.dom,config,returnDom!==true)},appendTo:function(el){el=Ext.getDom(el);el.appendChild(this.dom);return this},insertBefore:function(el){el=Ext.getDom(el);el.parentNode.insertBefore(this.dom,el);return this},insertAfter:function(el){el=Ext.getDom(el);el.parentNode.insertBefore(this.dom,el.nextSibling);return this},insertFirst:function(el,returnDom){el=el||{};if(typeof el=="object"&&!el.nodeType&&!el.dom){return this.createChild(el,this.dom.firstChild,returnDom)}else{el=Ext.getDom(el);this.dom.insertBefore(el,this.dom.firstChild);return !returnDom?Ext.get(el):el}},insertSibling:function(el,where,returnDom){var rt;if(Ext.isArray(el)){for(var i=0,len=el.length;i<len;i++){rt=this.insertSibling(el[i],where,returnDom)}return rt}where=where?where.toLowerCase():"before";el=el||{};var refNode=where=="before"?this.dom:this.dom.nextSibling;if(typeof el=="object"&&!el.nodeType&&!el.dom){if(where=="after"&&!this.dom.nextSibling){rt=Ext.DomHelper.append(this.dom.parentNode,el,!returnDom)}else{rt=Ext.DomHelper[where=="after"?"insertAfter":"insertBefore"](this.dom,el,!returnDom)}}else{rt=this.dom.parentNode.insertBefore(Ext.getDom(el),refNode);if(!returnDom){rt=Ext.get(rt)}}return rt},wrap:function(config,returnDom){if(!config){config={tag:"div"}}var newEl=Ext.DomHelper.insertBefore(this.dom,config,!returnDom);newEl.dom?newEl.dom.appendChild(this.dom):newEl.appendChild(this.dom);return newEl},replace:function(el){el=Ext.get(el);this.insertBefore(el);el.remove();return this},replaceWith:function(el){if(typeof el=="object"&&!el.nodeType&&!el.dom){el=this.insertSibling(el,"before")}else{el=Ext.getDom(el);this.dom.parentNode.insertBefore(el,this.dom)}El.uncache(this.id);this.dom.parentNode.removeChild(this.dom);this.dom=el;this.id=Ext.id(el);El.cache[this.id]=this;return this},insertHtml:function(where,html,returnEl){var el=Ext.DomHelper.insertHtml(where,this.dom,html);return returnEl?Ext.get(el):el},set:function(o,useSet){var el=this.dom;useSet=typeof useSet=="undefined"?(el.setAttribute?true:false):useSet;for(var attr in o){if(attr=="style"||typeof o[attr]=="function"){continue}if(attr=="cls"){el.className=o.cls}else{if(o.hasOwnProperty(attr)){if(useSet){el.setAttribute(attr,o[attr])}else{el[attr]=o[attr]}}}}if(o.style){Ext.DomHelper.applyStyles(el,o.style)}return this},addKeyListener:function(key,fn,scope){var config;if(typeof key!="object"||Ext.isArray(key)){config={key:key,fn:fn,scope:scope}}else{config={key:key.key,shift:key.shift,ctrl:key.ctrl,alt:key.alt,fn:fn,scope:scope}}return new Ext.KeyMap(this,config)},addKeyMap:function(config){return new Ext.KeyMap(this,config)},isScrollable:function(){var dom=this.dom;return dom.scrollHeight>dom.clientHeight||dom.scrollWidth>dom.clientWidth},scrollTo:function(side,value,animate){var prop=side.toLowerCase()=="left"?"scrollLeft":"scrollTop";if(!animate||!A){this.dom[prop]=value}else{var to=prop=="scrollLeft"?[value,this.dom.scrollTop]:[this.dom.scrollLeft,value];this.anim({scroll:{to:to}},this.preanim(arguments,2),"scroll")}return this},scroll:function(direction,distance,animate){if(!this.isScrollable()){return }var el=this.dom;var l=el.scrollLeft,t=el.scrollTop;var w=el.scrollWidth,h=el.scrollHeight;var cw=el.clientWidth,ch=el.clientHeight;direction=direction.toLowerCase();var scrolled=false;var a=this.preanim(arguments,2);switch(direction){case"l":case"left":if(w-l>cw){var v=Math.min(l+distance,w-cw);this.scrollTo("left",v,a);scrolled=true}break;case"r":case"right":if(l>0){var v=Math.max(l-distance,0);this.scrollTo("left",v,a);scrolled=true}break;case"t":case"top":case"up":if(t>0){var v=Math.max(t-distance,0);this.scrollTo("top",v,a);scrolled=true}break;case"b":case"bottom":case"down":if(h-t>ch){var v=Math.min(t+distance,h-ch);this.scrollTo("top",v,a);scrolled=true}break}return scrolled},translatePoints:function(x,y){if(typeof x=="object"||Ext.isArray(x)){y=x[1];x=x[0]}var p=this.getStyle("position");var o=this.getXY();var l=parseInt(this.getStyle("left"),10);var t=parseInt(this.getStyle("top"),10);if(isNaN(l)){l=(p=="relative")?0:this.dom.offsetLeft}if(isNaN(t)){t=(p=="relative")?0:this.dom.offsetTop}return{left:(x-o[0]+l),top:(y-o[1]+t)}},getScroll:function(){var d=this.dom,doc=document;if(d==doc||d==doc.body){var l,t;if(Ext.isIE&&Ext.isStrict){l=doc.documentElement.scrollLeft||(doc.body.scrollLeft||0);t=doc.documentElement.scrollTop||(doc.body.scrollTop||0)}else{l=window.pageXOffset||(doc.body.scrollLeft||0);t=window.pageYOffset||(doc.body.scrollTop||0)}return{left:l,top:t}}else{return{left:d.scrollLeft,top:d.scrollTop}}},getColor:function(attr,defaultValue,prefix){var v=this.getStyle(attr);if(!v||v=="transparent"||v=="inherit"){return defaultValue}var color=typeof prefix=="undefined"?"#":prefix;if(v.substr(0,4)=="rgb("){var rvs=v.slice(4,v.length-1).split(",");for(var i=0;i<3;i++){var h=parseInt(rvs[i]);var s=h.toString(16);if(h<16){s="0"+s}color+=s}}else{if(v.substr(0,1)=="#"){if(v.length==4){for(var i=1;i<4;i++){var c=v.charAt(i);color+=c+c}}else{if(v.length==7){color+=v.substr(1)}}}}return(color.length>5?color.toLowerCase():defaultValue)},boxWrap:function(cls){cls=cls||"x-box";var el=Ext.get(this.insertHtml("beforeBegin",String.format('<div class="{0}">'+El.boxMarkup+"</div>",cls)));el.child("."+cls+"-mc").dom.appendChild(this.dom);return el},getAttributeNS:Ext.isIE?function(ns,name){var d=this.dom;var type=typeof d[ns+":"+name];if(type!="undefined"&&type!="unknown"){return d[ns+":"+name]}return d[name]}:function(ns,name){var d=this.dom;return d.getAttributeNS(ns,name)||d.getAttribute(ns+":"+name)||d.getAttribute(name)||d[name]},getTextWidth:function(text,min,max){return(Ext.util.TextMetrics.measure(this.dom,Ext.value(text,this.dom.innerHTML,true)).width).constrain(min||0,max||1000000)}};var ep=El.prototype;ep.on=ep.addListener;ep.mon=ep.addListener;ep.getUpdateManager=ep.getUpdater;ep.un=ep.removeListener;ep.autoBoxAdjust=true;El.unitPattern=/\d+(px|em|%|en|ex|pt|in|cm|mm|pc)$/i;El.addUnits=function(v,defaultUnit){if(v===""||v=="auto"){return v}if(v===undefined){return""}if(typeof v=="number"||!El.unitPattern.test(v)){return v+(defaultUnit||"px")}return v};El.boxMarkup='<div class="{0}-tl"><div class="{0}-tr"><div class="{0}-tc"></div></div></div><div class="{0}-ml"><div class="{0}-mr"><div class="{0}-mc"></div></div></div><div class="{0}-bl"><div class="{0}-br"><div class="{0}-bc"></div></div></div>';El.VISIBILITY=1;El.DISPLAY=2;El.borders={l:"border-left-width",r:"border-right-width",t:"border-top-width",b:"border-bottom-width"};El.paddings={l:"padding-left",r:"padding-right",t:"padding-top",b:"padding-bottom"};El.margins={l:"margin-left",r:"margin-right",t:"margin-top",b:"margin-bottom"};El.cache={};var docEl;El.get=function(el){var ex,elm,id;if(!el){return null}if(typeof el=="string"){if(!(elm=document.getElementById(el))){return null}if(ex=El.cache[el]){ex.dom=elm}else{ex=El.cache[el]=new El(elm)}return ex}else{if(el.tagName){if(!(id=el.id)){id=Ext.id(el)}if(ex=El.cache[id]){ex.dom=el}else{ex=El.cache[id]=new El(el)}return ex}else{if(el instanceof El){if(el!=docEl){el.dom=document.getElementById(el.id)||el.dom;El.cache[el.id]=el}return el}else{if(el.isComposite){return el}else{if(Ext.isArray(el)){return El.select(el)}else{if(el==document){if(!docEl){var f=function(){};f.prototype=El.prototype;docEl=new f();docEl.dom=document}return docEl}}}}}}return null};El.uncache=function(el){for(var i=0,a=arguments,len=a.length;i<len;i++){if(a[i]){delete El.cache[a[i].id||a[i]]}}};El.garbageCollect=function(){if(!Ext.enableGarbageCollector){clearInterval(El.collectorThread);return }for(var eid in El.cache){var el=El.cache[eid],d=el.dom;if(!d||!d.parentNode||(!d.offsetParent&&!document.getElementById(eid))){delete El.cache[eid];if(d&&Ext.enableListenerCollection){E.purgeElement(d)}}}};El.collectorThreadId=setInterval(El.garbageCollect,30000);var flyFn=function(){};flyFn.prototype=El.prototype;var _cls=new flyFn();El.Flyweight=function(dom){this.dom=dom};El.Flyweight.prototype=_cls;El.Flyweight.prototype.isFlyweight=true;El._flyweights={};El.fly=function(el,named){named=named||"_global";el=Ext.getDom(el);if(!el){return null}if(!El._flyweights[named]){El._flyweights[named]=new El.Flyweight()}El._flyweights[named].dom=el;return El._flyweights[named]};Ext.get=El.get;Ext.fly=El.fly;var noBoxAdjust=Ext.isStrict?{select:1}:{input:1,select:1,textarea:1};if(Ext.isIE||Ext.isGecko){noBoxAdjust.button=1}Ext.EventManager.on(window,"unload",function(){delete El.cache;delete El._flyweights})})();Ext.enableFx=true;Ext.Fx={slideIn:function(D,E){var F=this.getFxEl();E=E||{};F.queueFx(E,function(){D=D||"t";this.fixDisplay();var A=this.getFxRestore();var N=this.getBox();this.setSize(N);var Q=this.fxWrap(A.pos,E,"hidden");var C=this.dom.style;C.visibility="visible";C.position="absolute";var R=function(){F.fxUnwrap(Q,A.pos,E);C.width=A.width;C.height=A.height;F.afterFx(E)};var M,B={to:[N.x,N.y]},O={to:N.width},P={to:N.height};switch(D.toLowerCase()){case"t":Q.setSize(N.width,0);C.left=C.bottom="0";M={height:P};break;case"l":Q.setSize(0,N.height);C.right=C.top="0";M={width:O};break;case"r":Q.setSize(0,N.height);Q.setX(N.right);C.left=C.top="0";M={width:O,points:B};break;case"b":Q.setSize(N.width,0);Q.setY(N.bottom);C.left=C.top="0";M={height:P,points:B};break;case"tl":Q.setSize(0,0);C.right=C.bottom="0";M={width:O,height:P};break;case"bl":Q.setSize(0,0);Q.setY(N.y+N.height);C.right=C.top="0";M={width:O,height:P,points:B};break;case"br":Q.setSize(0,0);Q.setXY([N.right,N.bottom]);C.left=C.top="0";M={width:O,height:P,points:B};break;case"tr":Q.setSize(0,0);Q.setX(N.x+N.width);C.left=C.bottom="0";M={width:O,height:P,points:B};break}this.dom.style.visibility="visible";Q.show();arguments.callee.anim=Q.fxanim(M,E,"motion",0.5,"easeOut",R)});return this},slideOut:function(D,E){var F=this.getFxEl();E=E||{};F.queueFx(E,function(){D=D||"t";var B=this.getFxRestore();var N=this.getBox();this.setSize(N);var K=this.fxWrap(B.pos,E,"visible");var L=this.dom.style;L.visibility="visible";L.position="absolute";K.setSize(N);var A=function(){if(E.useDisplay){F.setDisplayed(false)}else{F.hide()}F.fxUnwrap(K,B.pos,E);L.width=B.width;L.height=B.height;F.afterFx(E)};var M,C={to:0};switch(D.toLowerCase()){case"t":L.left=L.bottom="0";M={height:C};break;case"l":L.right=L.top="0";M={width:C};break;case"r":L.left=L.top="0";M={width:C,points:{to:[N.right,N.y]}};break;case"b":L.left=L.top="0";M={height:C,points:{to:[N.x,N.bottom]}};break;case"tl":L.right=L.bottom="0";M={width:C,height:C};break;case"bl":L.right=L.top="0";M={width:C,height:C,points:{to:[N.x,N.bottom]}};break;case"br":L.left=L.top="0";M={width:C,height:C,points:{to:[N.x+N.width,N.bottom]}};break;case"tr":L.left=L.bottom="0";M={width:C,height:C,points:{to:[N.right,N.y]}};break}arguments.callee.anim=K.fxanim(M,E,"motion",0.5,"easeOut",A)});return this},puff:function(D){var C=this.getFxEl();D=D||{};C.queueFx(D,function(){this.clearOpacity();this.show();var B=this.getFxRestore();var I=this.dom.style;var A=function(){if(D.useDisplay){C.setDisplayed(false)}else{C.hide()}C.clearOpacity();C.setPositioning(B.pos);I.width=B.width;I.height=B.height;I.fontSize="";C.afterFx(D)};var H=this.getWidth();var J=this.getHeight();arguments.callee.anim=this.fxanim({width:{to:this.adjustWidth(H*2)},height:{to:this.adjustHeight(J*2)},points:{by:[-(H*0.5),-(J*0.5)]},opacity:{to:0},fontSize:{to:200,unit:"%"}},D,"motion",0.5,"easeOut",A)});return this},switchOff:function(D){var C=this.getFxEl();D=D||{};C.queueFx(D,function(){this.clearOpacity();this.clip();var B=this.getFxRestore();var F=this.dom.style;var A=function(){if(D.useDisplay){C.setDisplayed(false)}else{C.hide()}C.clearOpacity();C.setPositioning(B.pos);F.width=B.width;F.height=B.height;C.afterFx(D)};this.fxanim({opacity:{to:0.3}},null,null,0.1,null,function(){this.clearOpacity();(function(){this.fxanim({height:{to:1},points:{by:[0,this.getHeight()*0.5]}},D,"motion",0.3,"easeIn",A)}).defer(100,this)})});return this},highlight:function(D,E){var F=this.getFxEl();E=E||{};F.queueFx(E,function(){D=D||"ffff9c";var L=E.attr||"backgroundColor";this.clearOpacity();this.show();var C=this.getColor(L);var B=this.dom.style[L];var J=(E.endColor||C)||"ffffff";var A=function(){F.dom.style[L]=B;F.afterFx(E)};var K={};K[L]={from:D,to:J};arguments.callee.anim=this.fxanim(K,E,"color",1,"easeIn",A)});return this},frame:function(E,G,F){var H=this.getFxEl();F=F||{};H.queueFx(F,function(){E=E||"#C3DAF9";if(E.length==6){E="#"+E}G=G||1;var A=F.duration||1;this.show();var C=this.getBox();var B=function(){var J=Ext.getBody().createChild({style:{visbility:"hidden",position:"absolute","z-index":"35000",border:"0px solid "+E}});var D=Ext.isBorderBox?2:1;J.animate({top:{from:C.y,to:C.y-20},left:{from:C.x,to:C.x-20},borderWidth:{from:0,to:10},opacity:{from:1,to:0},height:{from:C.height,to:(C.height+(20*D))},width:{from:C.width,to:(C.width+(20*D))}},A,function(){J.remove();if(--G>0){B()}else{H.afterFx(F)}})};B.call(this)});return this},pause:function(E){var D=this.getFxEl();var F={};D.queueFx(F,function(){setTimeout(function(){D.afterFx(F)},E*1000)});return this},fadeIn:function(D){var C=this.getFxEl();D=D||{};C.queueFx(D,function(){this.setOpacity(0);this.fixDisplay();this.dom.style.visibility="visible";var A=D.endOpacity||1;arguments.callee.anim=this.fxanim({opacity:{to:A}},D,null,0.5,"easeOut",function(){if(A==1){this.clearOpacity()}C.afterFx(D)})});return this},fadeOut:function(D){var C=this.getFxEl();D=D||{};C.queueFx(D,function(){arguments.callee.anim=this.fxanim({opacity:{to:D.endOpacity||0}},D,null,0.5,"easeOut",function(){if(this.visibilityMode==Ext.Element.DISPLAY||D.useDisplay){this.dom.style.display="none"}else{this.dom.style.visibility="hidden"}this.clearOpacity();C.afterFx(D)})});return this},scale:function(D,F,E){this.shift(Ext.apply({},E,{width:D,height:F}));return this},shift:function(D){var C=this.getFxEl();D=D||{};C.queueFx(D,function(){var J={},K=D.width,I=D.height,L=D.x,A=D.y,B=D.opacity;if(K!==undefined){J.width={to:this.adjustWidth(K)}}if(I!==undefined){J.height={to:this.adjustHeight(I)}}if(D.left!==undefined){J.left={to:D.left}}if(D.top!==undefined){J.top={to:D.top}}if(D.right!==undefined){J.right={to:D.right}}if(D.bottom!==undefined){J.bottom={to:D.bottom}}if(L!==undefined||A!==undefined){J.points={to:[L!==undefined?L:this.getX(),A!==undefined?A:this.getY()]}}if(B!==undefined){J.opacity={to:B}}if(D.xy!==undefined){J.points={to:D.xy}}arguments.callee.anim=this.fxanim(J,D,"motion",0.35,"easeOut",function(){C.afterFx(D)})});return this},ghost:function(D,E){var F=this.getFxEl();E=E||{};F.queueFx(E,function(){D=D||"b";var C=this.getFxRestore();var M=this.getWidth(),K=this.getHeight();var L=this.dom.style;var A=function(){if(E.useDisplay){F.setDisplayed(false)}else{F.hide()}F.clearOpacity();F.setPositioning(C.pos);L.width=C.width;L.height=C.height;F.afterFx(E)};var N={opacity:{to:0},points:{}},B=N.points;switch(D.toLowerCase()){case"t":B.by=[0,-K];break;case"l":B.by=[-M,0];break;case"r":B.by=[M,0];break;case"b":B.by=[0,K];break;case"tl":B.by=[-M,-K];break;case"bl":B.by=[-M,K];break;case"br":B.by=[M,K];break;case"tr":B.by=[M,-K];break}arguments.callee.anim=this.fxanim(N,E,"motion",0.5,"easeOut",A)});return this},syncFx:function(){this.fxDefaults=Ext.apply(this.fxDefaults||{},{block:false,concurrent:true,stopFx:false});return this},sequenceFx:function(){this.fxDefaults=Ext.apply(this.fxDefaults||{},{block:false,concurrent:false,stopFx:false});return this},nextFx:function(){var B=this.fxQueue[0];if(B){B.call(this)}},hasActiveFx:function(){return this.fxQueue&&this.fxQueue[0]},stopFx:function(){if(this.hasActiveFx()){var B=this.fxQueue[0];if(B&&B.anim&&B.anim.isAnimated()){this.fxQueue=[B];B.anim.stop(true)}}return this},beforeFx:function(B){if(this.hasActiveFx()&&!B.concurrent){if(B.stopFx){this.stopFx();return true}return false}return true},hasFxBlock:function(){var B=this.fxQueue;return B&&B[0]&&B[0].block},queueFx:function(E,D){if(!this.fxQueue){this.fxQueue=[]}if(!this.hasFxBlock()){Ext.applyIf(E,this.fxDefaults);if(!E.concurrent){var F=this.beforeFx(E);D.block=E.block;this.fxQueue.push(D);if(F){this.nextFx()}}else{D.call(this)}}return this},fxWrap:function(H,J,K){var L;if(!J.wrap||!(L=Ext.get(J.wrap))){var G;if(J.fixPosition){G=this.getXY()}var I=document.createElement("div");I.style.visibility=K;L=Ext.get(this.dom.parentNode.insertBefore(I,this.dom));L.setPositioning(H);if(L.getStyle("position")=="static"){L.position("relative")}this.clearPositioning("auto");L.clip();L.dom.appendChild(this.dom);if(G){L.setXY(G)}}return L},fxUnwrap:function(D,E,F){this.clearPositioning();this.setPositioning(E);if(!F.wrap){D.dom.parentNode.insertBefore(this.dom,D.dom);D.remove()}},getFxRestore:function(){var B=this.dom.style;return{pos:this.getPositioning(),width:B.width,height:B.height}},afterFx:function(B){if(B.afterStyle){this.applyStyles(B.afterStyle)}if(B.afterCls){this.addClass(B.afterCls)}if(B.remove===true){this.remove()}Ext.callback(B.callback,B.scope,[this]);if(!B.concurrent){this.fxQueue.shift();this.nextFx()}},getFxEl:function(){return Ext.get(this.dom)},fxanim:function(L,K,N,J,M,H){N=N||"run";K=K||{};var I=Ext.lib.Anim[N](this.dom,L,(K.duration||J)||0.35,(K.easing||M)||"easeOut",function(){Ext.callback(H,this)},this);K.anim=I;return I}};Ext.Fx.resize=Ext.Fx.scale;Ext.apply(Ext.Element.prototype,Ext.Fx);Ext.CompositeElement=function(B){this.elements=[];this.addElements(B)};Ext.CompositeElement.prototype={isComposite:true,addElements:function(G){if(!G){return this}if(typeof G=="string"){G=Ext.Element.selectorFunction(G)}var H=this.elements;var J=H.length-1;for(var I=0,F=G.length;I<F;I++){H[++J]=Ext.get(G[I])}return this},fill:function(B){this.elements=[];this.add(B);return this},filter:function(C){var D=[];this.each(function(A){if(A.is(C)){D[D.length]=A.dom}});this.fill(D);return this},invoke:function(G,J){var H=this.elements;for(var I=0,F=H.length;I<F;I++){Ext.Element.prototype[G].apply(H[I],J)}return this},add:function(B){if(typeof B=="string"){this.addElements(Ext.Element.selectorFunction(B))}else{if(B.length!==undefined){this.addElements(B)}else{this.addElements([B])}}return this},each:function(G,H){var I=this.elements;for(var J=0,F=I.length;J<F;J++){if(G.call(H||I[J],I[J],this,J)===false){break}}return this},item:function(B){return this.elements[B]||null},first:function(){return this.item(0)},last:function(){return this.item(this.elements.length-1)},getCount:function(){return this.elements.length},contains:function(B){return this.indexOf(B)!==-1},indexOf:function(B){return this.elements.indexOf(Ext.get(B))},removeElement:function(J,H){if(Ext.isArray(J)){for(var K=0,G=J.length;K<G;K++){this.removeElement(J[K])}return this}var L=typeof J=="number"?J:this.indexOf(J);if(L!==-1&&this.elements[L]){if(H){var I=this.elements[L];if(I.dom){I.remove()}else{Ext.removeNode(I)}}this.elements.splice(L,1)}return this},replaceElement:function(F,G,E){var H=typeof F=="number"?F:this.indexOf(F);if(H!==-1){if(E){this.elements[H].replaceWith(G)}else{this.elements.splice(H,1,Ext.get(G))}}return this},clear:function(){this.elements=[]}};(function(){Ext.CompositeElement.createCall=function(D,A){if(!D[A]){D[A]=function(){return this.invoke(A,arguments)}}};for(var B in Ext.Element.prototype){if(typeof Ext.Element.prototype[B]=="function"){Ext.CompositeElement.createCall(Ext.CompositeElement.prototype,B)}}})();Ext.CompositeElementLite=function(B){Ext.CompositeElementLite.superclass.constructor.call(this,B);this.el=new Ext.Element.Flyweight()};Ext.extend(Ext.CompositeElementLite,Ext.CompositeElement,{addElements:function(G){if(G){if(Ext.isArray(G)){this.elements=this.elements.concat(G)}else{var H=this.elements;var J=H.length-1;for(var I=0,F=G.length;I<F;I++){H[++J]=G[I]}}}return this},invoke:function(H,L){var J=this.elements;var I=this.el;for(var K=0,G=J.length;K<G;K++){I.dom=J[K];Ext.Element.prototype[H].apply(I,L)}return this},item:function(B){if(!this.elements[B]){return null}this.el.dom=this.elements[B];return this.el},addListener:function(N,I,J,K){var L=this.elements;for(var M=0,H=L.length;M<H;M++){Ext.EventManager.on(L[M],N,I,J||L[M],K)}return this},each:function(H,I){var K=this.elements;var J=this.el;for(var L=0,G=K.length;L<G;L++){J.dom=K[L];if(H.call(I||J,J,this,L)===false){break}}return this},indexOf:function(B){return this.elements.indexOf(Ext.getDom(B))},replaceElement:function(H,I,F){var J=typeof H=="number"?H:this.indexOf(H);if(J!==-1){I=Ext.getDom(I);if(F){var G=this.elements[J];G.parentNode.insertBefore(I,G);Ext.removeNode(G)}this.elements.splice(J,1,I)}return this}});Ext.CompositeElementLite.prototype.on=Ext.CompositeElementLite.prototype.addListener;if(Ext.DomQuery){Ext.Element.selectorFunction=Ext.DomQuery.select}Ext.Element.select=function(E,F,H){var G;if(typeof E=="string"){G=Ext.Element.selectorFunction(E,H)}else{if(E.length!==undefined){G=E}else{throw"Invalid selector"}}if(F===true){return new Ext.CompositeElement(G)}else{return new Ext.CompositeElementLite(G)}};Ext.select=Ext.Element.select;Ext.data.Connection=function(B){Ext.apply(this,B);this.addEvents("beforerequest","requestcomplete","requestexception");Ext.data.Connection.superclass.constructor.call(this)};Ext.extend(Ext.data.Connection,Ext.util.Observable,{timeout:30000,autoAbort:false,disableCaching:true,request:function(T){if(this.fireEvent("beforerequest",this,T)!==false){var L=T.params;if(typeof L=="function"){L=L.call(T.scope||window,T)}if(typeof L=="object"){L=Ext.urlEncode(L)}if(this.extraParams){var R=Ext.urlEncode(this.extraParams);L=L?(L+"&"+R):R}var M=T.url||this.url;if(typeof M=="function"){M=M.call(T.scope||window,T)}if(T.form){var K=Ext.getDom(T.form);M=M||K.action;var P=K.getAttribute("enctype");if(T.isUpload||(P&&P.toLowerCase()=="multipart/form-data")){return this.doFormUpload(T,L,M)}var Q=Ext.lib.Ajax.serializeForm(K);L=L?(L+"&"+Q):Q}var O=T.headers;if(this.defaultHeaders){O=Ext.apply(O||{},this.defaultHeaders);if(!T.headers){T.headers=O}}var S={success:this.handleResponse,failure:this.handleFailure,scope:this,argument:{options:T},timeout:T.timeout||this.timeout};var N=T.method||this.method||(L?"POST":"GET");if(N=="GET"&&(this.disableCaching&&T.disableCaching!==false)||T.disableCaching===true){M+=(M.indexOf("?")!=-1?"&":"?")+"_dc="+(new Date().getTime())}if(typeof T.autoAbort=="boolean"){if(T.autoAbort){this.abort()}}else{if(this.autoAbort!==false){this.abort()}}if((N=="GET"||T.xmlData||T.jsonData)&&L){M+=(M.indexOf("?")!=-1?"&":"?")+L;L=""}this.transId=Ext.lib.Ajax.request(N,M,S,L,T);return this.transId}else{Ext.callback(T.callback,T.scope,[T,null,null]);return null}},isLoading:function(B){if(B){return Ext.lib.Ajax.isCallInProgress(B)}else{return this.transId?true:false}},abort:function(B){if(B||this.isLoading()){Ext.lib.Ajax.abort(B||this.transId)}},handleResponse:function(C){this.transId=false;var D=C.argument.options;C.argument=D?D.argument:null;this.fireEvent("requestcomplete",this,C,D);Ext.callback(D.success,D.scope,[C,D]);Ext.callback(D.callback,D.scope,[D,true,C])},handleFailure:function(D,E){this.transId=false;var F=D.argument.options;D.argument=F?F.argument:null;this.fireEvent("requestexception",this,D,F,E);Ext.callback(F.failure,F.scope,[D,F]);Ext.callback(F.callback,F.scope,[F,false,D])},doFormUpload:function(X,P,O){var N=Ext.id();var W=document.createElement("iframe");W.id=N;W.name=N;W.className="x-hidden";if(Ext.isIE){W.src=Ext.SSL_SECURE_URL}document.body.appendChild(W);if(Ext.isIE){document.frames[N].name=N}var M=Ext.getDom(X.form);M.target=N;M.method="POST";M.enctype=M.encoding="multipart/form-data";if(O){M.action=O}var Q,S;if(P){Q=[];P=Ext.urlDecode(P,false);for(var U in P){if(P.hasOwnProperty(U)){S=document.createElement("input");S.type="hidden";S.name=U;S.value=P[U];M.appendChild(S);Q.push(S)}}}function V(){var C={responseText:"",responseXML:null};C.argument=X?X.argument:null;try{var A;if(Ext.isIE){A=W.contentWindow.document}else{A=(W.contentDocument||window.frames[N].document)}if(A&&A.body){C.responseText=A.body.innerHTML}if(A&&A.XMLDocument){C.responseXML=A.XMLDocument}else{C.responseXML=A}}catch(B){}Ext.EventManager.removeListener(W,"load",V,this);this.fireEvent("requestcomplete",this,C,X);Ext.callback(X.success,X.scope,[C,X]);Ext.callback(X.callback,X.scope,[X,true,C]);setTimeout(function(){Ext.removeNode(W)},100)}Ext.EventManager.on(W,"load",V,this);M.submit();if(Q){for(var T=0,R=Q.length;T<R;T++){Ext.removeNode(Q[T])}}}});Ext.Ajax=new Ext.data.Connection({autoAbort:false,serializeForm:function(B){return Ext.lib.Ajax.serializeForm(B)}});Ext.Updater=function(F,D){F=Ext.get(F);if(!D&&F.updateManager){return F.updateManager}this.el=F;this.defaultUrl=null;this.addEvents("beforeupdate","update","failure");var E=Ext.Updater.defaults;this.sslBlankUrl=E.sslBlankUrl;this.disableCaching=E.disableCaching;this.indicatorText=E.indicatorText;this.showLoadIndicator=E.showLoadIndicator;this.timeout=E.timeout;this.loadScripts=E.loadScripts;this.transaction=null;this.refreshDelegate=this.refresh.createDelegate(this);this.updateDelegate=this.update.createDelegate(this);this.formUpdateDelegate=this.formUpdate.createDelegate(this);if(!this.renderer){this.renderer=new Ext.Updater.BasicRenderer()}Ext.Updater.superclass.constructor.call(this)};Ext.extend(Ext.Updater,Ext.util.Observable,{getEl:function(){return this.el},update:function(N,J,I,L){if(this.fireEvent("beforeupdate",this.el,N,J)!==false){var H,M;if(typeof N=="object"){H=N;N=H.url;J=J||H.params;I=I||H.callback;L=L||H.discardUrl;M=H.scope;if(typeof H.nocache!="undefined"){this.disableCaching=H.nocache}if(typeof H.text!="undefined"){this.indicatorText='<div class="loading-indicator">'+H.text+"</div>"}if(typeof H.scripts!="undefined"){this.loadScripts=H.scripts}if(typeof H.timeout!="undefined"){this.timeout=H.timeout}}this.showLoading();if(!L){this.defaultUrl=N}if(typeof N=="function"){N=N.call(this)}var K=Ext.apply(H||{},{url:N,params:(typeof J=="function"&&M)?J.createDelegate(M):J,success:this.processSuccess,failure:this.processFailure,scope:this,callback:undefined,timeout:(this.timeout*1000),disableCaching:this.disableCaching,argument:{options:H,url:N,form:null,callback:I,scope:M||window,params:J}});this.transaction=Ext.Ajax.request(K)}},formUpdate:function(G,E,H,F){if(this.fireEvent("beforeupdate",this.el,G,E)!==false){if(typeof E=="function"){E=E.call(this)}G=Ext.getDom(G);this.transaction=Ext.Ajax.request({form:G,url:E,success:this.processSuccess,failure:this.processFailure,scope:this,timeout:(this.timeout*1000),argument:{url:E,form:G,callback:F,reset:H}});this.showLoading.defer(1,this)}},refresh:function(B){if(this.defaultUrl==null){return }this.update(this.defaultUrl,null,B,true)},startAutoRefresh:function(J,I,H,G,F){if(F){this.update(I||this.defaultUrl,H,G,true)}if(this.autoRefreshProcId){clearInterval(this.autoRefreshProcId)}this.autoRefreshProcId=setInterval(this.update.createDelegate(this,[I||this.defaultUrl,H,G,true]),J*1000)},stopAutoRefresh:function(){if(this.autoRefreshProcId){clearInterval(this.autoRefreshProcId);delete this.autoRefreshProcId}},isAutoRefreshing:function(){return this.autoRefreshProcId?true:false},showLoading:function(){if(this.showLoadIndicator){this.el.update(this.indicatorText)}},processSuccess:function(C){this.transaction=null;if(C.argument.form&&C.argument.reset){try{C.argument.form.reset()}catch(D){}}if(this.loadScripts){this.renderer.render(this.el,C,this,this.updateComplete.createDelegate(this,[C]))}else{this.renderer.render(this.el,C,this);this.updateComplete(C)}},updateComplete:function(B){this.fireEvent("update",this.el,B);if(typeof B.argument.callback=="function"){B.argument.callback.call(B.argument.scope,this.el,true,B,B.argument.options)}},processFailure:function(B){this.transaction=null;this.fireEvent("failure",this.el,B);if(typeof B.argument.callback=="function"){B.argument.callback.call(B.argument.scope,this.el,false,B,B.argument.options)}},setRenderer:function(B){this.renderer=B},getRenderer:function(){return this.renderer},setDefaultUrl:function(B){this.defaultUrl=B},abort:function(){if(this.transaction){Ext.Ajax.abort(this.transaction)}},isUpdating:function(){if(this.transaction){return Ext.Ajax.isLoading(this.transaction)}return false}});Ext.Updater.defaults={timeout:30,loadScripts:false,sslBlankUrl:(Ext.SSL_SECURE_URL||"javascript:false"),disableCaching:false,showLoadIndicator:true,indicatorText:'<div class="loading-indicator">Loading...</div>'};Ext.Updater.updateElement=function(H,I,G,J){var F=Ext.get(H).getUpdater();Ext.apply(F,J);F.update(I,G,J?J.callback:null)};Ext.Updater.BasicRenderer=function(){};Ext.Updater.BasicRenderer.prototype={render:function(G,E,H,F){G.update(E.responseText,H.loadScripts,F)}};Ext.UpdateManager=Ext.Updater;Ext.util.DelayedTask=function(K,L,H){var I=null,J,N;var M=function(){var A=new Date().getTime();if(A-N>=J){clearInterval(I);I=null;K.apply(L,H||[])}};this.delay=function(C,A,B,D){if(I&&C!=J){this.cancel()}J=C;N=new Date().getTime();K=A||K;L=B||L;H=D||H;if(!I){I=setInterval(M,J)}};this.cancel=function(){if(I){clearInterval(I);I=null}}};Ext.util.TaskRunner=function(R){R=R||10;var Q=[],M=[];var L=0;var P=false;var J=function(){P=false;clearInterval(L);L=0};var O=function(){if(!P){P=true;L=setInterval(N,R)}};var K=function(A){M.push(A);if(A.onStop){A.onStop.apply(A.scope||A)}};var N=function(){if(M.length>0){for(var D=0,B=M.length;D<B;D++){Q.remove(M[D])}M=[];if(Q.length<1){J();return }}var F=new Date().getTime();for(var D=0,B=Q.length;D<B;++D){var E=Q[D];var C=F-E.taskRunTime;if(E.interval<=C){var A=E.run.apply(E.scope||E,E.args||[++E.taskRunCount]);E.taskRunTime=F;if(A===false||E.taskRunCount===E.repeat){K(E);return }}if(E.duration&&E.duration<=(F-E.taskStartTime)){K(E)}}};this.start=function(A){Q.push(A);A.taskStartTime=new Date().getTime();A.taskRunTime=0;A.taskRunCount=0;O();return A};this.stop=function(A){K(A);return A};this.stopAll=function(){J();for(var A=0,B=Q.length;A<B;A++){if(Q[A].onStop){Q[A].onStop()}}Q=[];M=[]}};Ext.TaskMgr=new Ext.util.TaskRunner();Ext.util.MixedCollection=function(D,C){this.items=[];this.map={};this.keys=[];this.length=0;this.addEvents("clear","add","replace","remove","sort");this.allowFunctions=D===true;if(C){this.getKey=C}Ext.util.MixedCollection.superclass.constructor.call(this)};Ext.extend(Ext.util.MixedCollection,Ext.util.Observable,{allowFunctions:false,add:function(F,E){if(arguments.length==1){E=arguments[0];F=this.getKey(E)}if(typeof F=="undefined"||F===null){this.length++;this.items.push(E);this.keys.push(null)}else{var D=this.map[F];if(D){return this.replace(F,E)}this.length++;this.items.push(E);this.map[F]=E;this.keys.push(F)}this.fireEvent("add",this.length-1,E,F);return E},getKey:function(B){return B.id},replace:function(G,F){if(arguments.length==1){F=arguments[0];G=this.getKey(F)}var E=this.item(G);if(typeof G=="undefined"||G===null||typeof E=="undefined"){return this.add(G,F)}var H=this.indexOfKey(G);this.items[H]=F;this.map[G]=F;this.fireEvent("replace",G,E,F);return F},addAll:function(G){if(arguments.length>1||Ext.isArray(G)){var J=arguments.length>1?arguments:G;for(var H=0,F=J.length;H<F;H++){this.add(J[H])}}else{for(var I in G){if(this.allowFunctions||typeof G[I]!="function"){this.add(I,G[I])}}}},each:function(G,H){var J=[].concat(this.items);for(var I=0,F=J.length;I<F;I++){if(G.call(H||J[I],J[I],I,F)===false){break}}},eachKey:function(F,G){for(var H=0,E=this.keys.length;H<E;H++){F.call(G||window,this.keys[H],this.items[H],H,E)}},find:function(F,G){for(var H=0,E=this.items.length;H<E;H++){if(F.call(G||window,this.items[H],this.keys[H])){return this.items[H]}}return null},insert:function(D,F,E){if(arguments.length==2){E=arguments[1];F=this.getKey(E)}if(D>=this.length){return this.add(F,E)}this.length++;this.items.splice(D,0,E);if(typeof F!="undefined"&&F!=null){this.map[F]=E}this.keys.splice(D,0,F);this.fireEvent("add",D,E,F);return E},remove:function(B){return this.removeAt(this.indexOf(B))},removeAt:function(D){if(D<this.length&&D>=0){this.length--;var E=this.items[D];this.items.splice(D,1);var F=this.keys[D];if(typeof F!="undefined"){delete this.map[F]}this.keys.splice(D,1);this.fireEvent("remove",E,F);return E}return false},removeKey:function(B){return this.removeAt(this.indexOfKey(B))},getCount:function(){return this.length},indexOf:function(B){return this.items.indexOf(B)},indexOfKey:function(B){return this.keys.indexOf(B)},item:function(C){var D=typeof this.map[C]!="undefined"?this.map[C]:this.items[C];return typeof D!="function"||this.allowFunctions?D:null},itemAt:function(B){return this.items[B]},key:function(B){return this.map[B]},contains:function(B){return this.indexOf(B)!=-1},containsKey:function(B){return typeof this.map[B]!="undefined"},clear:function(){this.length=0;this.items=[];this.keys=[];this.map={};this.fireEvent("clear")},first:function(){return this.items[0]},last:function(){return this.items[this.length-1]},_sort:function(N,M,O){var K=String(M).toUpperCase()=="DESC"?-1:1;O=O||function(A,B){return A-B};var P=[],L=this.keys,Q=this.items;for(var J=0,R=Q.length;J<R;J++){P[P.length]={key:L[J],value:Q[J],index:J}}P.sort(function(B,C){var A=O(B[N],C[N])*K;if(A==0){A=(B.index<C.index?-1:1)}return A});for(var J=0,R=P.length;J<R;J++){Q[J]=P[J].value;L[J]=P[J].key}this.fireEvent("sort",this)},sort:function(C,D){this._sort("value",C,D)},keySort:function(C,D){this._sort("key",C,D||function(A,B){return String(A).toUpperCase()-String(B).toUpperCase()})},getRange:function(G,F){var J=this.items;if(J.length<1){return[]}G=G||0;F=Math.min(typeof F=="undefined"?this.length-1:F,this.length-1);var H=[];if(G<=F){for(var I=G;I<=F;I++){H[H.length]=J[I]}}else{for(var I=G;I>=F;I--){H[H.length]=J[I]}}return H},filter:function(G,H,F,E){if(Ext.isEmpty(H,false)){return this.clone()}H=this.createValueMatcher(H,F,E);return this.filterBy(function(A){return A&&H.test(A[G])})},filterBy:function(J,K){var I=new Ext.util.MixedCollection();I.getKey=this.getKey;var N=this.keys,L=this.items;for(var M=0,H=L.length;M<H;M++){if(J.call(K||this,L[M],N[M])){I.add(N[M],L[M])}}return I},findIndex:function(I,J,G,H,F){if(Ext.isEmpty(J,false)){return -1}J=this.createValueMatcher(J,H,F);return this.findIndexBy(function(A){return A&&J.test(A[I])},null,G)},findIndexBy:function(J,K,I){var N=this.keys,L=this.items;for(var M=(I||0),H=L.length;M<H;M++){if(J.call(K||this,L[M],N[M])){return M}}if(typeof I=="number"&&I>0){for(var M=0;M<I;M++){if(J.call(K||this,L[M],N[M])){return M}}}return -1},createValueMatcher:function(F,E,D){if(!F.exec){F=String(F);F=new RegExp((E===true?"":"^")+Ext.escapeRe(F),D?"":"i")}return F},clone:function(){var G=new Ext.util.MixedCollection();var J=this.keys,H=this.items;for(var I=0,F=H.length;I<F;I++){G.add(J[I],H[I])}G.getKey=this.getKey;return G}});Ext.util.MixedCollection.prototype.get=Ext.util.MixedCollection.prototype.item;Ext.util.JSON=new (function(){var useHasOwn=!!{}.hasOwnProperty;var pad=function(n){return n<10?"0"+n:n};var m={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"};var encodeString=function(s){if(/["\\\x00-\x1f]/.test(s)){return'"'+s.replace(/([\x00-\x1f\\"])/g,function(a,b){var c=m[b];if(c){return c}c=b.charCodeAt();return"\\u00"+Math.floor(c/16).toString(16)+(c%16).toString(16)})+'"'}return'"'+s+'"'};var encodeArray=function(o){var a=["["],b,i,l=o.length,v;for(i=0;i<l;i+=1){v=o[i];switch(typeof v){case"undefined":case"function":case"unknown":break;default:if(b){a.push(",")}a.push(v===null?"null":Ext.util.JSON.encode(v));b=true}}a.push("]");return a.join("")};this.encodeDate=function(o){return'"'+o.getFullYear()+"-"+pad(o.getMonth()+1)+"-"+pad(o.getDate())+"T"+pad(o.getHours())+":"+pad(o.getMinutes())+":"+pad(o.getSeconds())+'"'};this.encode=function(o){if(typeof o=="undefined"||o===null){return"null"}else{if(Ext.isArray(o)){return encodeArray(o)}else{if(Ext.isDate(o)){return Ext.util.JSON.encodeDate(o)}else{if(typeof o=="string"){return encodeString(o)}else{if(typeof o=="number"){return isFinite(o)?String(o):"null"}else{if(typeof o=="boolean"){return String(o)}else{var a=["{"],b,i,v;for(i in o){if(!useHasOwn||o.hasOwnProperty(i)){v=o[i];switch(typeof v){case"undefined":case"function":case"unknown":break;default:if(b){a.push(",")}a.push(this.encode(i),":",v===null?"null":this.encode(v));b=true}}}a.push("}");return a.join("")}}}}}}};this.decode=function(json){return eval("("+json+")")}})();Ext.encode=Ext.util.JSON.encode;Ext.decode=Ext.util.JSON.decode;Ext.util.Format=function(){var trimRe=/^\s+|\s+$/g;return{ellipsis:function(value,len){if(value&&value.length>len){return value.substr(0,len-3)+"..."}return value},undef:function(value){return value!==undefined?value:""},defaultValue:function(value,defaultValue){return value!==undefined&&value!==""?value:defaultValue},htmlEncode:function(value){return !value?value:String(value).replace(/&/g,"&amp;").replace(/>/g,"&gt;").replace(/</g,"&lt;").replace(/"/g,"&quot;")},htmlDecode:function(value){return !value?value:String(value).replace(/&amp;/g,"&").replace(/&gt;/g,">").replace(/&lt;/g,"<").replace(/&quot;/g,'"')},trim:function(value){return String(value).replace(trimRe,"")},substr:function(value,start,length){return String(value).substr(start,length)},lowercase:function(value){return String(value).toLowerCase()},uppercase:function(value){return String(value).toUpperCase()},capitalize:function(value){return !value?value:value.charAt(0).toUpperCase()+value.substr(1).toLowerCase()},call:function(value,fn){if(arguments.length>2){var args=Array.prototype.slice.call(arguments,2);args.unshift(value);return eval(fn).apply(window,args)}else{return eval(fn).call(window,value)}},usMoney:function(v){v=(Math.round((v-0)*100))/100;v=(v==Math.floor(v))?v+".00":((v*10==Math.floor(v*10))?v+"0":v);v=String(v);var ps=v.split(".");var whole=ps[0];var sub=ps[1]?"."+ps[1]:".00";var r=/(\d+)(\d{3})/;while(r.test(whole)){whole=whole.replace(r,"$1,$2")}v=whole+sub;if(v.charAt(0)=="-"){return"-$"+v.substr(1)}return"$"+v},date:function(v,format){if(!v){return""}if(!Ext.isDate(v)){v=new Date(Date.parse(v))}return v.dateFormat(format||"m/d/Y")},dateRenderer:function(format){return function(v){return Ext.util.Format.date(v,format)}},stripTagsRE:/<\/?[^>]+>/gi,stripTags:function(v){return !v?v:String(v).replace(this.stripTagsRE,"")},stripScriptsRe:/(?:<script.*?>)((\n|\r|.)*?)(?:<\/script>)/ig,stripScripts:function(v){return !v?v:String(v).replace(this.stripScriptsRe,"")},fileSize:function(size){if(size<1024){return size+" bytes"}else{if(size<1048576){return(Math.round(((size*10)/1024))/10)+" KB"}else{return(Math.round(((size*10)/1048576))/10)+" MB"}}},math:function(){var fns={};return function(v,a){if(!fns[a]){fns[a]=new Function("v","return v "+a+";")}return fns[a](v)}}()}}();Ext.XTemplate=function(){Ext.XTemplate.superclass.constructor.apply(this,arguments);var U=this.html;U=["<tpl>",U,"</tpl>"].join("");var V=/<tpl\b[^>]*>((?:(?=([^<]+))\2|<(?!tpl\b[^>]*>))*?)<\/tpl>/;var W=/^<tpl\b[^>]*?for="(.*?)"/;var Y=/^<tpl\b[^>]*?if="(.*?)"/;var a=/^<tpl\b[^>]*?exec="(.*?)"/;var R,S=0;var d=[];while(R=U.match(V)){var X=R[0].match(W);var Z=R[0].match(Y);var b=R[0].match(a);var g=null,c=null,Q=null;var T=X&&X[1]?X[1]:"";if(Z){g=Z&&Z[1]?Z[1]:null;if(g){c=new Function("values","parent","xindex","xcount","with(values){ return "+(Ext.util.Format.htmlDecode(g))+"; }")}}if(b){g=b&&b[1]?b[1]:null;if(g){Q=new Function("values","parent","xindex","xcount","with(values){ "+(Ext.util.Format.htmlDecode(g))+"; }")}}if(T){switch(T){case".":T=new Function("values","parent","with(values){ return values; }");break;case"..":T=new Function("values","parent","with(values){ return parent; }");break;default:T=new Function("values","parent","with(values){ return "+T+"; }")}}d.push({id:S,target:T,exec:Q,test:c,body:R[1]||""});U=U.replace(R[0],"{xtpl"+S+"}");++S}for(var e=d.length-1;e>=0;--e){this.compileTpl(d[e])}this.master=d[d.length-1];this.tpls=d};Ext.extend(Ext.XTemplate,Ext.Template,{re:/\{([\w-\.\#]+)(?:\:([\w\.]*)(?:\((.*?)?\))?)?(\s?[\+\-\*\\]\s?[\d\.\+\-\*\\\(\)]+)?\}/g,codeRe:/\{\[((?:\\\]|.|\n)*?)\]\}/g,applySubTemplate:function(N,Q,R,K,L){var O=this.tpls[N];if(O.test&&!O.test.call(this,Q,R,K,L)){return""}if(O.exec&&O.exec.call(this,Q,R,K,L)){return""}var P=O.target?O.target.call(this,Q,R):Q;R=O.target?Q:R;if(O.target&&Ext.isArray(P)){var M=[];for(var T=0,S=P.length;T<S;T++){M[M.length]=O.compiled.call(this,P[T],R,T+1,S)}return M.join("")}return O.compiled.call(this,P,R,K,L)},compileTpl:function(tpl){var fm=Ext.util.Format;var useF=this.disableFormats!==true;var sep=Ext.isGecko?"+":",";var fn=function(m,name,format,args,math){if(name.substr(0,4)=="xtpl"){return"'"+sep+"this.applySubTemplate("+name.substr(4)+", values, parent, xindex, xcount)"+sep+"'"}var v;if(name==="."){v="values"}else{if(name==="#"){v="xindex"}else{if(name.indexOf(".")!=-1){v=name}else{v="values['"+name+"']"}}}if(math){v="("+v+math+")"}if(format&&useF){args=args?","+args:"";if(format.substr(0,5)!="this."){format="fm."+format+"("}else{format='this.call("'+format.substr(5)+'", ';args=", values"}}else{args="";format="("+v+" === undefined ? '' : "}return"'"+sep+format+v+args+")"+sep+"'"};var codeFn=function(m,code){return"'"+sep+"("+code+")"+sep+"'"};var body;if(Ext.isGecko){body="tpl.compiled = function(values, parent, xindex, xcount){ return '"+tpl.body.replace(/(\r\n|\n)/g,"\\n").replace(/'/g,"\\'").replace(this.re,fn).replace(this.codeRe,codeFn)+"';};"}else{body=["tpl.compiled = function(values, parent, xindex, xcount){ return ['"];body.push(tpl.body.replace(/(\r\n|\n)/g,"\\n").replace(/'/g,"\\'").replace(this.re,fn).replace(this.codeRe,codeFn));body.push("'].join('');};");body=body.join("")}eval(body);return this},applyTemplate:function(B){return this.master.compiled.call(this,B,{},1,1)},compile:function(){return this}});Ext.XTemplate.prototype.apply=Ext.XTemplate.prototype.applyTemplate;Ext.XTemplate.from=function(B){B=Ext.getDom(B);return new Ext.XTemplate(B.value||B.innerHTML)};Ext.util.CSS=function(){var F=null;var G=document;var H=/(-[a-z])/gi;var E=function(B,A){return A.charAt(1).toUpperCase()};return{createStyleSheet:function(D,A){var K;var L=G.getElementsByTagName("head")[0];var B=G.createElement("style");B.setAttribute("type","text/css");if(A){B.setAttribute("id",A)}if(Ext.isIE){L.appendChild(B);K=B.styleSheet;K.cssText=D}else{try{B.appendChild(G.createTextNode(D))}catch(C){B.cssText=D}L.appendChild(B);K=B.styleSheet?B.styleSheet:(B.sheet||G.styleSheets[G.styleSheets.length-1])}this.cacheStyleSheet(K);return K},removeStyleSheet:function(A){var B=G.getElementById(A);if(B){B.parentNode.removeChild(B)}},swapStyleSheet:function(A,C){this.removeStyleSheet(A);var B=G.createElement("link");B.setAttribute("rel","stylesheet");B.setAttribute("type","text/css");B.setAttribute("id",A);B.setAttribute("href",C);G.getElementsByTagName("head")[0].appendChild(B)},refreshCache:function(){return this.getRules(true)},cacheStyleSheet:function(C){if(!F){F={}}try{var A=C.cssRules||C.rules;for(var D=A.length-1;D>=0;--D){F[A[D].selectorText]=A[D]}}catch(B){}},getRules:function(D){if(F==null||D){F={};var B=G.styleSheets;for(var C=0,J=B.length;C<J;C++){try{this.cacheStyleSheet(B[C])}catch(A){}}}return F},getRule:function(D,B){var C=this.getRules(B);if(!Ext.isArray(D)){return C[D]}for(var A=0;A<D.length;A++){if(C[D[A]]){return C[D[A]]}}return null},updateRule:function(J,B,C){if(!Ext.isArray(J)){var A=this.getRule(J);if(A){A.style[B.replace(H,E)]=C;return true}}else{for(var D=0;D<J.length;D++){if(this.updateRule(J[D],B,C)){return true}}}return false}}}();Ext.util.ClickRepeater=function(D,C){this.el=Ext.get(D);this.el.unselectable();Ext.apply(this,C);this.addEvents("mousedown","click","mouseup");this.el.on("mousedown",this.handleMouseDown,this);if(this.preventDefault||this.stopDefault){this.el.on("click",function(A){if(this.preventDefault){A.preventDefault()}if(this.stopDefault){A.stopEvent()}},this)}if(this.handler){this.on("click",this.handler,this.scope||this)}Ext.util.ClickRepeater.superclass.constructor.call(this)};Ext.extend(Ext.util.ClickRepeater,Ext.util.Observable,{interval:20,delay:250,preventDefault:true,stopDefault:false,timer:0,handleMouseDown:function(){clearTimeout(this.timer);this.el.blur();if(this.pressClass){this.el.addClass(this.pressClass)}this.mousedownTime=new Date();Ext.getDoc().on("mouseup",this.handleMouseUp,this);this.el.on("mouseout",this.handleMouseOut,this);this.fireEvent("mousedown",this);this.fireEvent("click",this);if(this.accelerate){this.delay=400}this.timer=this.click.defer(this.delay||this.interval,this)},click:function(){this.fireEvent("click",this);this.timer=this.click.defer(this.accelerate?this.easeOutExpo(this.mousedownTime.getElapsed(),400,-390,12000):this.interval,this)},easeOutExpo:function(H,E,F,G){return(H==G)?E+F:F*(-Math.pow(2,-10*H/G)+1)+E},handleMouseOut:function(){clearTimeout(this.timer);if(this.pressClass){this.el.removeClass(this.pressClass)}this.el.on("mouseover",this.handleMouseReturn,this)},handleMouseReturn:function(){this.el.un("mouseover",this.handleMouseReturn);if(this.pressClass){this.el.addClass(this.pressClass)}this.click()},handleMouseUp:function(){clearTimeout(this.timer);this.el.un("mouseover",this.handleMouseReturn);this.el.un("mouseout",this.handleMouseOut);Ext.getDoc().un("mouseup",this.handleMouseUp);this.el.removeClass(this.pressClass);this.fireEvent("mouseup",this)}});Ext.KeyNav=function(D,C){this.el=Ext.get(D);Ext.apply(this,C);if(!this.disabled){this.disabled=true;this.enable()}};Ext.KeyNav.prototype={disabled:false,defaultEventAction:"stopEvent",forceKeyDown:false,prepareEvent:function(E){var D=E.getKey();var F=this.keyToHandler[D];if(Ext.isSafari2&&F&&D>=37&&D<=40){E.stopEvent()}},relay:function(E){var D=E.getKey();var F=this.keyToHandler[D];if(F&&this[F]){if(this.doRelay(E,this[F],F)!==true){E[this.defaultEventAction]()}}},doRelay:function(E,F,D){return F.call(this.scope||this,E)},enter:false,left:false,right:false,up:false,down:false,tab:false,esc:false,pageUp:false,pageDown:false,del:false,home:false,end:false,keyToHandler:{37:"left",39:"right",38:"up",40:"down",33:"pageUp",34:"pageDown",46:"del",36:"home",35:"end",13:"enter",27:"esc",9:"tab"},enable:function(){if(this.disabled){if(this.forceKeyDown||Ext.isIE||Ext.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)}else{this.el.un("keydown",this.prepareEvent);this.el.un("keypress",this.relay)}this.disabled=true}}};Ext.KeyMap=function(E,F,D){this.el=Ext.get(E);this.eventName=D||"keydown";this.bindings=[];if(F){this.addBinding(F)}this.enable()};Ext.KeyMap.prototype={stopEvent:false,addBinding:function(O){if(Ext.isArray(O)){for(var a=0,Y=O.length;a<Y;a++){this.addBinding(O[a])}return }var S=O.key,P=O.shift,R=O.ctrl,Z=O.alt,W=O.fn||O.handler,T=O.scope;if(typeof S=="string"){var V=[];var X=S.toUpperCase();for(var b=0,Y=X.length;b<Y;b++){V.push(X.charCodeAt(b))}S=V}var Q=Ext.isArray(S);var U=function(A){if((!P||A.shiftKey)&&(!R||A.ctrlKey)&&(!Z||A.altKey)){var C=A.getKey();if(Q){for(var B=0,D=S.length;B<D;B++){if(S[B]==C){if(this.stopEvent){A.stopEvent()}W.call(T||window,C,A);return }}}else{if(C==S){if(this.stopEvent){A.stopEvent()}W.call(T||window,C,A)}}}};this.bindings.push(U)},on:function(N,L,M){var I,H,K,J;if(typeof N=="object"&&!Ext.isArray(N)){I=N.key;H=N.shift;K=N.ctrl;J=N.alt}else{I=N}this.addBinding({key:I,shift:H,ctrl:K,alt:J,fn:L,scope:M})},handleKeyDown:function(F){if(this.enabled){var H=this.bindings;for(var G=0,E=H.length;G<E;G++){H[G].call(this,F)}}},isEnabled:function(){return this.enabled},enable:function(){if(!this.enabled){this.el.on(this.eventName,this.handleKeyDown,this);this.enabled=true}},disable:function(){if(this.enabled){this.el.removeListener(this.eventName,this.handleKeyDown,this);this.enabled=false}}};Ext.util.TextMetrics=function(){var B;return{measure:function(F,E,A){if(!B){B=Ext.util.TextMetrics.Instance(F,A)}B.bind(F);B.setFixedWidth(A||"auto");return B.getSize(E)},createInstance:function(D,A){return Ext.util.TextMetrics.Instance(D,A)}}}();Ext.util.TextMetrics.Instance=function(H,F){var G=new Ext.Element(document.createElement("div"));document.body.appendChild(G.dom);G.position("absolute");G.setLeftTop(-1000,-1000);G.hide();if(F){G.setWidth(F)}var E={getSize:function(A){G.update(A);var B=G.getSize();G.update("");return B},bind:function(A){G.setStyle(Ext.fly(A).getStyles("font-size","font-style","font-weight","font-family","line-height","text-transform","letter-spacing"))},setFixedWidth:function(A){G.setWidth(A)},getWidth:function(A){G.dom.style.width="auto";return this.getSize(A).width},getHeight:function(A){return this.getSize(A).height}};E.bind(H);return E};Ext.Element.measureText=Ext.util.TextMetrics.measure;(function(){var C=Ext.EventManager;var D=Ext.lib.Dom;Ext.dd.DragDrop=function(A,F,B){if(A){this.init(A,F,B)}};Ext.dd.DragDrop.prototype={id:null,config:null,dragElId:null,handleElId:null,invalidHandleTypes:null,invalidHandleIds:null,invalidHandleClasses:null,startPageX:0,startPageY:0,groups:null,locked:false,lock:function(){this.locked=true},unlock:function(){this.locked=false},isTarget:true,padding:null,_domRef:null,__ygDragDrop:true,constrainX:false,constrainY:false,minX:0,maxX:0,minY:0,maxY:0,maintainOffset:false,xTicks:null,yTicks:null,primaryButtonOnly:true,available:false,hasOuterHandles:false,b4StartDrag:function(B,A){},startDrag:function(B,A){},b4Drag:function(A){},onDrag:function(A){},onDragEnter:function(B,A){},b4DragOver:function(A){},onDragOver:function(B,A){},b4DragOut:function(A){},onDragOut:function(B,A){},b4DragDrop:function(A){},onDragDrop:function(B,A){},onInvalidDrop:function(A){},b4EndDrag:function(A){},endDrag:function(A){},b4MouseDown:function(A){},onMouseDown:function(A){},onMouseUp:function(A){},onAvailable:function(){},defaultPadding:{left:0,right:0,top:0,bottom:0},constrainTo:function(S,U,N){if(typeof U=="number"){U={left:U,right:U,top:U,bottom:U}}U=U||this.defaultPadding;var Q=Ext.get(this.getEl()).getBox();var B=Ext.get(S);var O=B.getScroll();var R,A=B.dom;if(A==document.body){R={x:O.left,y:O.top,width:Ext.lib.Dom.getViewWidth(),height:Ext.lib.Dom.getViewHeight()}}else{var P=B.getXY();R={x:P[0]+O.left,y:P[1]+O.top,width:A.clientWidth,height:A.clientHeight}}var T=Q.y-R.y;var V=Q.x-R.x;this.resetConstraints();this.setXConstraint(V-(U.left||0),R.width-V-Q.width-(U.right||0),this.xTickSize);this.setYConstraint(T-(U.top||0),R.height-T-Q.height-(U.bottom||0),this.yTickSize)},getEl:function(){if(!this._domRef){this._domRef=Ext.getDom(this.id)}return this._domRef},getDragEl:function(){return Ext.getDom(this.dragElId)},init:function(A,F,B){this.initTarget(A,F,B);C.on(this.id,"mousedown",this.handleMouseDown,this)},initTarget:function(A,F,B){this.config=B||{};this.DDM=Ext.dd.DDM;this.groups={};if(typeof A!=="string"){A=Ext.id(A)}this.id=A;this.addToGroup((F)?F:"default");this.handleElId=A;this.setDragElId(A);this.invalidHandleTypes={A:"A"};this.invalidHandleIds={};this.invalidHandleClasses=[];this.applyConfig();this.handleOnAvailable()},applyConfig:function(){this.padding=this.config.padding||[0,0,0,0];this.isTarget=(this.config.isTarget!==false);this.maintainOffset=(this.config.maintainOffset);this.primaryButtonOnly=(this.config.primaryButtonOnly!==false)},handleOnAvailable:function(){this.available=true;this.resetConstraints();this.onAvailable()},setPadding:function(B,H,A,G){if(!H&&0!==H){this.padding=[B,B,B,B]}else{if(!A&&0!==A){this.padding=[B,H,B,H]}else{this.padding=[B,H,A,G]}}},setInitPosition:function(I,J){var B=this.getEl();if(!this.DDM.verifyEl(B)){return }var K=I||0;var L=J||0;var A=D.getXY(B);this.initPageX=A[0]-K;this.initPageY=A[1]-L;this.lastPageX=A[0];this.lastPageY=A[1];this.setStartPosition(A)},setStartPosition:function(A){var B=A||D.getXY(this.getEl());this.deltaSetXY=null;this.startPageX=B[0];this.startPageY=B[1]},addToGroup:function(A){this.groups[A]=true;this.DDM.regDragDrop(this,A)},removeFromGroup:function(A){if(this.groups[A]){delete this.groups[A]}this.DDM.removeDDFromGroup(this,A)},setDragElId:function(A){this.dragElId=A},setHandleElId:function(A){if(typeof A!=="string"){A=Ext.id(A)}this.handleElId=A;this.DDM.regHandle(this.id,A)},setOuterHandleElId:function(A){if(typeof A!=="string"){A=Ext.id(A)}C.on(A,"mousedown",this.handleMouseDown,this);this.setHandleElId(A);this.hasOuterHandles=true},unreg:function(){C.un(this.id,"mousedown",this.handleMouseDown);this._domRef=null;this.DDM._remove(this)},destroy:function(){this.unreg()},isLocked:function(){return(this.DDM.isLocked()||this.locked)},handleMouseDown:function(A,B){if(this.primaryButtonOnly&&A.button!=0){return }if(this.isLocked()){return }this.DDM.refreshCache(this.groups);var F=new Ext.lib.Point(Ext.lib.Event.getPageX(A),Ext.lib.Event.getPageY(A));if(!this.hasOuterHandles&&!this.DDM.isOverTarget(F,this)){}else{if(this.clickValidator(A)){this.setStartPosition();this.b4MouseDown(A);this.onMouseDown(A);this.DDM.handleMouseDown(A,this);this.DDM.stopEvent(A)}else{}}},clickValidator:function(A){var B=A.getTarget();return(this.isValidHandleChild(B)&&(this.id==this.handleElId||this.DDM.handleWasClicked(B,this.id)))},addInvalidHandleType:function(B){var A=B.toUpperCase();this.invalidHandleTypes[A]=A},addInvalidHandleId:function(A){if(typeof A!=="string"){A=Ext.id(A)}this.invalidHandleIds[A]=A},addInvalidHandleClass:function(A){this.invalidHandleClasses.push(A)},removeInvalidHandleType:function(B){var A=B.toUpperCase();delete this.invalidHandleTypes[A]},removeInvalidHandleId:function(A){if(typeof A!=="string"){A=Ext.id(A)}delete this.invalidHandleIds[A]},removeInvalidHandleClass:function(B){for(var A=0,F=this.invalidHandleClasses.length;A<F;++A){if(this.invalidHandleClasses[A]==B){delete this.invalidHandleClasses[A]}}},isValidHandleChild:function(I){var J=true;var A;try{A=I.nodeName.toUpperCase()}catch(B){A=I.nodeName}J=J&&!this.invalidHandleTypes[A];J=J&&!this.invalidHandleIds[I.id];for(var K=0,L=this.invalidHandleClasses.length;J&&K<L;++K){J=!D.hasClass(I,this.invalidHandleClasses[K])}return J},setXTicks:function(A,H){this.xTicks=[];this.xTickSize=H;var B={};for(var G=this.initPageX;G>=this.minX;G=G-H){if(!B[G]){this.xTicks[this.xTicks.length]=G;B[G]=true}}for(G=this.initPageX;G<=this.maxX;G=G+H){if(!B[G]){this.xTicks[this.xTicks.length]=G;B[G]=true}}this.xTicks.sort(this.DDM.numericSort)},setYTicks:function(A,H){this.yTicks=[];this.yTickSize=H;var B={};for(var G=this.initPageY;G>=this.minY;G=G-H){if(!B[G]){this.yTicks[this.yTicks.length]=G;B[G]=true}}for(G=this.initPageY;G<=this.maxY;G=G+H){if(!B[G]){this.yTicks[this.yTicks.length]=G;B[G]=true}}this.yTicks.sort(this.DDM.numericSort)},setXConstraint:function(A,B,F){this.leftConstraint=A;this.rightConstraint=B;this.minX=this.initPageX-A;this.maxX=this.initPageX+B;if(F){this.setXTicks(this.initPageX,F)}this.constrainX=true},clearConstraints:function(){this.constrainX=false;this.constrainY=false;this.clearTicks()},clearTicks:function(){this.xTicks=null;this.yTicks=null;this.xTickSize=0;this.yTickSize=0},setYConstraint:function(F,A,B){this.topConstraint=F;this.bottomConstraint=A;this.minY=this.initPageY-F;this.maxY=this.initPageY+A;if(B){this.setYTicks(this.initPageY,B)}this.constrainY=true},resetConstraints:function(){if(this.initPageX||this.initPageX===0){var A=(this.maintainOffset)?this.lastPageX-this.initPageX:0;var B=(this.maintainOffset)?this.lastPageY-this.initPageY:0;this.setInitPosition(A,B)}else{this.setInitPosition()}if(this.constrainX){this.setXConstraint(this.leftConstraint,this.rightConstraint,this.xTickSize)}if(this.constrainY){this.setYConstraint(this.topConstraint,this.bottomConstraint,this.yTickSize)}},getTick:function(A,K){if(!K){return A}else{if(K[0]>=A){return K[0]}else{for(var M=0,N=K.length;M<N;++M){var L=M+1;if(K[L]&&K[L]>=A){var B=A-K[M];var J=K[L]-A;return(J>B)?K[M]:K[L]}}return K[K.length-1]}}},toString:function(){return("DragDrop "+this.id)}}})();if(!Ext.dd.DragDropMgr){Ext.dd.DragDropMgr=function(){var B=Ext.EventManager;return{ids:{},handleIds:{},dragCurrent:null,dragOvers:{},deltaX:0,deltaY:0,preventDefault:true,stopPropagation:true,initialized:false,locked:false,init:function(){this.initialized=true},POINT:0,INTERSECT:1,mode:0,_execOnAll:function(H,I){for(var G in this.ids){for(var J in this.ids[G]){var A=this.ids[G][J];if(!this.isTypeOfDD(A)){continue}A[H].apply(A,I)}}},_onLoad:function(){this.init();B.on(document,"mouseup",this.handleMouseUp,this,true);B.on(document,"mousemove",this.handleMouseMove,this,true);B.on(window,"unload",this._onUnload,this,true);B.on(window,"resize",this._onResize,this,true)},_onResize:function(A){this._execOnAll("resetConstraints",[])},lock:function(){this.locked=true},unlock:function(){this.locked=false},isLocked:function(){return this.locked},locationCache:{},useCache:true,clickPixelThresh:3,clickTimeThresh:350,dragThreshMet:false,clickTimeout:null,startX:0,startY:0,regDragDrop:function(A,D){if(!this.initialized){this.init()}if(!this.ids[D]){this.ids[D]={}}this.ids[D][A.id]=A},removeDDFromGroup:function(A,F){if(!this.ids[F]){this.ids[F]={}}var E=this.ids[F];if(E&&E[A.id]){delete E[A.id]}},_remove:function(A){for(var D in A.groups){if(D&&this.ids[D][A.id]){delete this.ids[D][A.id]}}delete this.handleIds[A.id]},regHandle:function(A,D){if(!this.handleIds[A]){this.handleIds[A]={}}this.handleIds[A][D]=D},isDragDrop:function(A){return(this.getDDById(A))?true:false},getRelated:function(A,I){var G=[];for(var H in A.groups){for(j in this.ids[H]){var J=this.ids[H][j];if(!this.isTypeOfDD(J)){continue}if(!I||J.isTarget){G[G.length]=J}}}return G},isLegalTarget:function(A,G){var I=this.getRelated(A,true);for(var H=0,J=I.length;H<J;++H){if(I[H].id==G.id){return true}}return false},isTypeOfDD:function(A){return(A&&A.__ygDragDrop)},isHandle:function(A,D){return(this.handleIds[A]&&this.handleIds[A][D])},getDDById:function(A){for(var D in this.ids){if(this.ids[D][A]){return this.ids[D][A]}}return null},handleMouseDown:function(A,E){if(Ext.QuickTips){Ext.QuickTips.disable()}this.currentTarget=A.getTarget();this.dragCurrent=E;var F=E.getEl();this.startX=A.getPageX();this.startY=A.getPageY();this.deltaX=this.startX-F.offsetLeft;this.deltaY=this.startY-F.offsetTop;this.dragThreshMet=false;this.clickTimeout=setTimeout(function(){var C=Ext.dd.DDM;C.startDrag(C.startX,C.startY)},this.clickTimeThresh)},startDrag:function(D,A){clearTimeout(this.clickTimeout);if(this.dragCurrent){this.dragCurrent.b4StartDrag(D,A);this.dragCurrent.startDrag(D,A)}this.dragThreshMet=true},handleMouseUp:function(A){if(Ext.QuickTips){Ext.QuickTips.enable()}if(!this.dragCurrent){return }clearTimeout(this.clickTimeout);if(this.dragThreshMet){this.fireEvents(A,true)}else{}this.stopDrag(A);this.stopEvent(A)},stopEvent:function(A){if(this.stopPropagation){A.stopPropagation()}if(this.preventDefault){A.preventDefault()}},stopDrag:function(A){if(this.dragCurrent){if(this.dragThreshMet){this.dragCurrent.b4EndDrag(A);this.dragCurrent.endDrag(A)}this.dragCurrent.onMouseUp(A)}this.dragCurrent=null;this.dragOvers={}},handleMouseMove:function(A){if(!this.dragCurrent){return true}if(Ext.isIE&&(A.button!==0&&A.button!==1&&A.button!==2)){this.stopEvent(A);return this.handleMouseUp(A)}if(!this.dragThreshMet){var E=Math.abs(this.startX-A.getPageX());var F=Math.abs(this.startY-A.getPageY());if(E>this.clickPixelThresh||F>this.clickPixelThresh){this.startDrag(this.startX,this.startY)}}if(this.dragThreshMet){this.dragCurrent.b4Drag(A);this.dragCurrent.onDrag(A);if(!this.dragCurrent.moveOnly){this.fireEvents(A,false)}}this.stopEvent(A);return true},fireEvents:function(V,U){var S=this.dragCurrent;if(!S||S.isLocked()){return }var R=V.getPoint();var Q=[];var b=[];var X=[];var Z=[];var A=[];for(var a in this.dragOvers){var P=this.dragOvers[a];if(!this.isTypeOfDD(P)){continue}if(!this.isOverTarget(R,P,this.mode)){b.push(P)}Q[a]=true;delete this.dragOvers[a]}for(var T in S.groups){if("string"!=typeof T){continue}for(a in this.ids[T]){var Y=this.ids[T][a];if(!this.isTypeOfDD(Y)){continue}if(Y.isTarget&&!Y.isLocked()&&Y!=S){if(this.isOverTarget(R,Y,this.mode)){if(U){Z.push(Y)}else{if(!Q[Y.id]){A.push(Y)}else{X.push(Y)}this.dragOvers[Y.id]=Y}}}}}if(this.mode){if(b.length){S.b4DragOut(V,b);S.onDragOut(V,b)}if(A.length){S.onDragEnter(V,A)}if(X.length){S.b4DragOver(V,X);S.onDragOver(V,X)}if(Z.length){S.b4DragDrop(V,Z);S.onDragDrop(V,Z)}}else{var W=0;for(a=0,W=b.length;a<W;++a){S.b4DragOut(V,b[a].id);S.onDragOut(V,b[a].id)}for(a=0,W=A.length;a<W;++a){S.onDragEnter(V,A[a].id)}for(a=0,W=X.length;a<W;++a){S.b4DragOver(V,X[a].id);S.onDragOver(V,X[a].id)}for(a=0,W=Z.length;a<W;++a){S.b4DragDrop(V,Z[a].id);S.onDragDrop(V,Z[a].id)}}if(U&&!Z.length){S.onInvalidDrop(V)}},getBestMatch:function(H){var A=null;var I=H.length;if(I==1){A=H[0]}else{for(var G=0;G<I;++G){var J=H[G];if(J.cursorIsOver){A=J;break}else{if(!A||A.overlap.getArea()<J.overlap.getArea()){A=J}}}}return A},refreshCache:function(I){for(var J in I){if("string"!=typeof J){continue}for(var H in this.ids[J]){var G=this.ids[J][H];if(this.isTypeOfDD(G)){var A=this.getLocation(G);if(A){this.locationCache[G.id]=A}else{delete this.locationCache[G.id]}}}}},verifyEl:function(E){if(E){var F;if(Ext.isIE){try{F=E.offsetParent}catch(A){}}else{F=E.offsetParent}if(F){return true}}return false},getLocation:function(V){if(!this.isTypeOfDD(V)){return null}var X=V.getEl(),S,A,N,Q,R,P,O,T,W;try{S=Ext.lib.Dom.getXY(X)}catch(U){}if(!S){return null}A=S[0];N=A+X.offsetWidth;Q=S[1];R=Q+X.offsetHeight;P=Q-V.padding[0];O=N+V.padding[1];T=R+V.padding[2];W=A-V.padding[3];return new Ext.lib.Region(P,O,T,W)},isOverTarget:function(M,L,A){var Q=this.locationCache[L.id];if(!Q||!this.useCache){Q=this.getLocation(L);this.locationCache[L.id]=Q}if(!Q){return false}L.cursorIsOver=Q.contains(M);var N=this.dragCurrent;if(!N||!N.getTargetCoord||(!A&&!N.constrainX&&!N.constrainY)){return L.cursorIsOver}L.overlap=null;var P=N.getTargetCoord(M.x,M.y);var K=N.getDragEl();var R=new Ext.lib.Region(P.y,P.x+K.offsetWidth,P.y+K.offsetHeight,P.x);var O=R.intersect(Q);if(O){L.overlap=O;return(A)?true:L.cursorIsOver}else{return false}},_onUnload:function(A,D){Ext.dd.DragDropMgr.unregAll()},unregAll:function(){if(this.dragCurrent){this.stopDrag();this.dragCurrent=null}this._execOnAll("unreg",[]);for(var A in this.elementCache){delete this.elementCache[A]}this.elementCache={};this.ids={}},elementCache:{},getElWrapper:function(A){var D=this.elementCache[A];if(!D||!D.el){D=this.elementCache[A]=new this.ElementWrapper(Ext.getDom(A))}return D},getElement:function(A){return Ext.getDom(A)},getCss:function(A){var D=Ext.getDom(A);return(D)?D.style:null},ElementWrapper:function(A){this.el=A||null;this.id=this.el&&A.id;this.css=this.el&&A.style},getPosX:function(A){return Ext.lib.Dom.getX(A)},getPosY:function(A){return Ext.lib.Dom.getY(A)},swapNode:function(F,H){if(F.swapNode){F.swapNode(H)}else{var A=H.parentNode;var G=H.nextSibling;if(G==F){A.insertBefore(F,H)}else{if(H==F.nextSibling){A.insertBefore(H,F)}else{F.parentNode.replaceChild(H,F);A.insertBefore(F,G)}}}},getScroll:function(){var F,H,A=document.documentElement,G=document.body;if(A&&(A.scrollTop||A.scrollLeft)){F=A.scrollTop;H=A.scrollLeft}else{if(G){F=G.scrollTop;H=G.scrollLeft}else{}}return{top:F,left:H}},getStyle:function(A,D){return Ext.fly(A).getStyle(D)},getScrollTop:function(){return this.getScroll().top},getScrollLeft:function(){return this.getScroll().left},moveToEl:function(F,A){var E=Ext.lib.Dom.getXY(A);Ext.lib.Dom.setXY(F,E)},numericSort:function(A,D){return(A-D)},_timeoutCount:0,_addListeners:function(){var A=Ext.dd.DDM;if(Ext.lib.Event&&document){A._onLoad()}else{if(A._timeoutCount>2000){}else{setTimeout(A._addListeners,10);if(document&&document.body){A._timeoutCount+=1}}}},handleWasClicked:function(F,A){if(this.isHandle(A,F.id)){return true}else{var E=F.parentNode;while(E){if(this.isHandle(A,E.id)){return true}else{E=E.parentNode}}}return false}}}();Ext.dd.DDM=Ext.dd.DragDropMgr;Ext.dd.DDM._addListeners()}Ext.dd.DD=function(E,D,F){if(E){this.init(E,D,F)}};Ext.extend(Ext.dd.DD,Ext.dd.DragDrop,{scroll:true,autoOffset:function(G,H){var E=G-this.startPageX;var F=H-this.startPageY;this.setDelta(E,F)},setDelta:function(D,C){this.deltaX=D;this.deltaY=C},setDragElPos:function(E,F){var D=this.getDragEl();this.alignElWithMouse(D,E,F)},alignElWithMouse:function(O,K,L){var M=this.getTargetCoord(K,L);var P=O.dom?O:Ext.fly(O,"_dd");if(!this.deltaSetXY){var J=[M.x,M.y];P.setXY(J);var N=P.getLeft(true);var I=P.getTop(true);this.deltaSetXY=[N-M.x,I-M.y]}else{P.setLeftTop(M.x+this.deltaSetXY[0],M.y+this.deltaSetXY[1])}this.cachePosition(M.x,M.y);this.autoScroll(M.x,M.y,O.offsetHeight,O.offsetWidth);return M},cachePosition:function(F,D){if(F){this.lastPageX=F;this.lastPageY=D}else{var E=Ext.lib.Dom.getXY(this.getEl());this.lastPageX=E[0];this.lastPageY=E[1]}},autoScroll:function(W,X,b,V){if(this.scroll){var U=Ext.lib.Dom.getViewHeight();var Q=Ext.lib.Dom.getViewWidth();var S=this.DDM.getScrollTop();var O=this.DDM.getScrollLeft();var Y=b+X;var T=V+W;var Z=(U+S-X-this.deltaY);var a=(Q+O-W-this.deltaX);var P=40;var R=(document.all)?80:30;if(Y>U&&Z<P){window.scrollTo(O,S+R)}if(X<S&&S>0&&X-S<P){window.scrollTo(O,S-R)}if(T>Q&&a<P){window.scrollTo(O+R,S)}if(W<O&&O>0&&W-O<P){window.scrollTo(O-R,S)}}},getTargetCoord:function(G,H){var E=G-this.deltaX;var F=H-this.deltaY;if(this.constrainX){if(E<this.minX){E=this.minX}if(E>this.maxX){E=this.maxX}}if(this.constrainY){if(F<this.minY){F=this.minY}if(F>this.maxY){F=this.maxY}}E=this.getTick(E,this.xTicks);F=this.getTick(F,this.yTicks);return{x:E,y:F}},applyConfig:function(){Ext.dd.DD.superclass.applyConfig.call(this);this.scroll=(this.config.scroll!==false)},b4MouseDown:function(B){this.autoOffset(B.getPageX(),B.getPageY())},b4Drag:function(B){this.setDragElPos(B.getPageX(),B.getPageY())},toString:function(){return("DD "+this.id)}});Ext.dd.DDProxy=function(E,D,F){if(E){this.init(E,D,F);this.initFrame()}};Ext.dd.DDProxy.dragElId="ygddfdiv";Ext.extend(Ext.dd.DDProxy,Ext.dd.DD,{resizeFrame:true,centerFrame:false,createFrame:function(){var H=this;var E=document.body;if(!E||!E.firstChild){setTimeout(function(){H.createFrame()},50);return }var F=this.getDragEl();if(!F){F=document.createElement("div");F.id=this.dragElId;var G=F.style;G.position="absolute";G.visibility="hidden";G.cursor="move";G.border="2px solid #aaa";G.zIndex=999;E.insertBefore(F,E.firstChild)}},initFrame:function(){this.createFrame()},applyConfig:function(){Ext.dd.DDProxy.superclass.applyConfig.call(this);this.resizeFrame=(this.config.resizeFrame!==false);this.centerFrame=(this.config.centerFrame);this.setDragElId(this.config.dragElId||Ext.dd.DDProxy.dragElId)},showFrame:function(G,H){var I=this.getEl();var F=this.getDragEl();var J=F.style;this._resizeProxy();if(this.centerFrame){this.setDelta(Math.round(parseInt(J.width,10)/2),Math.round(parseInt(J.height,10)/2))}this.setDragElPos(G,H);Ext.fly(F).show()},_resizeProxy:function(){if(this.resizeFrame){var B=this.getEl();Ext.fly(this.getDragEl()).setSize(B.offsetWidth,B.offsetHeight)}},b4MouseDown:function(F){var D=F.getPageX();var E=F.getPageY();this.autoOffset(D,E);this.setDragElPos(D,E)},b4StartDrag:function(C,D){this.showFrame(C,D)},b4EndDrag:function(B){Ext.fly(this.getDragEl()).hide()},endDrag:function(E){var F=this.getEl();var D=this.getDragEl();D.style.visibility="";this.beforeMove();F.style.visibility="hidden";Ext.dd.DDM.moveToEl(F,D);D.style.visibility="hidden";F.style.visibility="";this.afterDrag()},beforeMove:function(){},afterDrag:function(){},toString:function(){return("DDProxy "+this.id)}});Ext.dd.DDTarget=function(E,D,F){if(E){this.initTarget(E,D,F)}};Ext.extend(Ext.dd.DDTarget,Ext.dd.DragDrop,{toString:function(){return("DDTarget "+this.id)}});Ext.dd.DragSource=function(D,C){this.el=Ext.get(D);if(!this.dragData){this.dragData={}}Ext.apply(this,C);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(B){return this.dragData},onDragEnter:function(G,F){var H=Ext.dd.DragDropMgr.getDDById(F);this.cachedTarget=H;if(this.beforeDragEnter(H,G,F)!==false){if(H.isNotifyTarget){var E=H.notifyEnter(this,G,this.dragData);this.proxy.setStatus(E)}else{this.proxy.setStatus(this.dropAllowed)}if(this.afterDragEnter){this.afterDragEnter(H,G,F)}}},beforeDragEnter:function(F,D,E){return true},alignElWithMouse:function(){Ext.dd.DragSource.superclass.alignElWithMouse.apply(this,arguments);this.proxy.sync()},onDragOver:function(G,F){var H=this.cachedTarget||Ext.dd.DragDropMgr.getDDById(F);if(this.beforeDragOver(H,G,F)!==false){if(H.isNotifyTarget){var E=H.notifyOver(this,G,this.dragData);this.proxy.setStatus(E)}if(this.afterDragOver){this.afterDragOver(H,G,F)}}},beforeDragOver:function(F,D,E){return true},onDragOut:function(F,E){var D=this.cachedTarget||Ext.dd.DragDropMgr.getDDById(E);if(this.beforeDragOut(D,F,E)!==false){if(D.isNotifyTarget){D.notifyOut(this,F,this.dragData)}this.proxy.reset();if(this.afterDragOut){this.afterDragOut(D,F,E)}}this.cachedTarget=null},beforeDragOut:function(F,D,E){return true},onDragDrop:function(F,E){var D=this.cachedTarget||Ext.dd.DragDropMgr.getDDById(E);if(this.beforeDragDrop(D,F,E)!==false){if(D.isNotifyTarget){if(D.notifyDrop(this,F,this.dragData)){this.onValidDrop(D,F,E)}else{this.onInvalidDrop(D,F,E)}}else{this.onValidDrop(D,F,E)}if(this.afterDragDrop){this.afterDragDrop(D,F,E)}}delete this.cachedTarget},beforeDragDrop:function(F,D,E){return true},onValidDrop:function(F,D,E){this.hideProxy();if(this.afterValidDrop){this.afterValidDrop(F,D,E)}},getRepairXY:function(D,C){return this.el.getXY()},onInvalidDrop:function(F,D,E){this.beforeInvalidDrop(F,D,E);if(this.cachedTarget){if(this.cachedTarget.isNotifyTarget){this.cachedTarget.notifyOut(this,D,this.dragData)}this.cacheTarget=null}this.proxy.repair(this.getRepairXY(D,this.dragData),this.afterRepair,this);if(this.afterInvalidDrop){this.afterInvalidDrop(D,E)}},afterRepair:function(){if(Ext.enableFx){this.el.highlight(this.hlColor||"c3daf9")}this.dragging=false},beforeInvalidDrop:function(F,D,E){return true},handleMouseDown:function(D){if(this.dragging){return }var C=this.getDragData(D);if(C&&this.onBeforeDrag(C,D)!==false){this.dragData=C;this.proxy.stop();Ext.dd.DragSource.superclass.handleMouseDown.apply(this,arguments)}},onBeforeDrag:function(C,D){return true},onStartDrag:Ext.emptyFn,startDrag:function(C,D){this.proxy.reset();this.dragging=true;this.proxy.update("");this.onInitDrag(C,D);this.proxy.show()},onInitDrag:function(D,E){var F=this.el.dom.cloneNode(true);F.id=Ext.id();this.proxy.update(F);this.onStartDrag(D,E);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(B){},endDrag:function(B){this.onEndDrag(this.dragData,B)},onEndDrag:function(C,D){},autoOffset:function(C,D){this.setDelta(-12,-20)}});Ext.data.SortTypes={none:function(B){return B},stripTagsRE:/<\/?[^>]+>/gi,asText:function(B){return String(B).replace(this.stripTagsRE,"")},asUCText:function(B){return String(B).toUpperCase().replace(this.stripTagsRE,"")},asUCString:function(B){return String(B).toUpperCase()},asDate:function(B){if(!B){return 0}if(Ext.isDate(B)){return B.getTime()}return Date.parse(String(B))},asFloat:function(C){var D=parseFloat(String(C).replace(/,/g,""));if(isNaN(D)){D=0}return D},asInt:function(C){var D=parseInt(String(C).replace(/,/g,""));if(isNaN(D)){D=0}return D}};Ext.data.Record=function(C,D){this.id=(D||D===0)?D:++Ext.data.Record.AUTO_ID;this.data=C};Ext.data.Record.create=function(G){var I=Ext.extend(Ext.data.Record,{});var H=I.prototype;H.fields=new Ext.util.MixedCollection(false,function(A){return A.name});for(var J=0,F=G.length;J<F;J++){H.fields.add(new Ext.data.Field(G[J]))}I.getField=function(A){return H.fields.get(A)};return I};Ext.data.Record.AUTO_ID=1000;Ext.data.Record.EDIT="edit";Ext.data.Record.REJECT="reject";Ext.data.Record.COMMIT="commit";Ext.data.Record.prototype={dirty:false,editing:false,error:null,modified:null,join:function(B){this.store=B},set:function(C,D){if(String(this.data[C])==String(D)){return }this.dirty=true;if(!this.modified){this.modified={}}if(typeof this.modified[C]=="undefined"){this.modified[C]=this.data[C]}this.data[C]=D;if(!this.editing&&this.store){this.store.afterEdit(this)}},get:function(B){return this.data[B]},beginEdit:function(){this.editing=true;this.modified={}},cancelEdit:function(){this.editing=false;delete this.modified},endEdit:function(){this.editing=false;if(this.dirty&&this.store){this.store.afterEdit(this)}},reject:function(F){var D=this.modified;for(var E in D){if(typeof D[E]!="function"){this.data[E]=D[E]}}this.dirty=false;delete this.modified;this.editing=false;if(this.store&&F!==true){this.store.afterReject(this)}},commit:function(B){this.dirty=false;delete this.modified;this.editing=false;if(this.store&&B!==true){this.store.afterCommit(this)}},getChanges:function(){var D=this.modified,F={};for(var E in D){if(D.hasOwnProperty(E)){F[E]=this.data[E]}}return F},hasError:function(){return this.error!=null},clearError:function(){this.error=null},copy:function(B){return new this.constructor(Ext.apply({},this.data),B||this.id)},isModified:function(B){return this.modified&&this.modified.hasOwnProperty(B)}};Ext.StoreMgr=Ext.apply(new Ext.util.MixedCollection(),{register:function(){for(var C=0,D;D=arguments[C];C++){this.add(D)}},unregister:function(){for(var C=0,D;D=arguments[C];C++){this.remove(this.lookup(D))}},lookup:function(B){return typeof B=="object"?B:this.get(B)},getKey:function(B){return B.storeId||B.id}});Ext.data.Store=function(B){this.data=new Ext.util.MixedCollection(false);this.data.getKey=function(A){return A.id};this.baseParams={};this.paramNames={start:"start",limit:"limit",sort:"sort",dir:"dir"};if(B&&B.data){this.inlineData=B.data;delete B.data}Ext.apply(this,B);if(this.url&&!this.proxy){this.proxy=new Ext.data.HttpProxy({url:this.url})}if(this.reader){if(!this.recordType){this.recordType=this.reader.recordType}if(this.reader.onMetaChange){this.reader.onMetaChange=this.onMetaChange.createDelegate(this)}}if(this.recordType){this.fields=this.recordType.prototype.fields}this.modified=[];this.addEvents("datachanged","metachange","add","remove","update","clear","beforeload","load","loadexception");if(this.proxy){this.relayEvents(this.proxy,["loadexception"])}this.sortToggle={};if(this.sortInfo){this.setDefaultSort(this.sortInfo.field,this.sortInfo.direction)}Ext.data.Store.superclass.constructor.call(this);if(this.storeId||this.id){Ext.StoreMgr.register(this)}if(this.inlineData){this.loadData(this.inlineData);delete this.inlineData}else{if(this.autoLoad){this.load.defer(10,this,[typeof this.autoLoad=="object"?this.autoLoad:undefined])}}};Ext.extend(Ext.data.Store,Ext.util.Observable,{remoteSort:false,pruneModifiedRecords:false,lastOptions:null,destroy:function(){if(this.id){Ext.StoreMgr.unregister(this)}this.data=null;this.purgeListeners()},add:function(H){H=[].concat(H);if(H.length<1){return }for(var F=0,E=H.length;F<E;F++){H[F].join(this)}var G=this.data.length;this.data.addAll(H);if(this.snapshot){this.snapshot.addAll(H)}this.fireEvent("add",this,H,G)},addSorted:function(C){var D=this.findInsertIndex(C);this.insert(D,C)},remove:function(C){var D=this.data.indexOf(C);this.data.removeAt(D);if(this.pruneModifiedRecords){this.modified.remove(C)}if(this.snapshot){this.snapshot.remove(C)}this.fireEvent("remove",this,C,D)},removeAll:function(){this.data.clear();if(this.snapshot){this.snapshot.clear()}if(this.pruneModifiedRecords){this.modified=[]}this.fireEvent("clear",this)},insert:function(G,H){H=[].concat(H);for(var F=0,E=H.length;F<E;F++){this.data.insert(G,H[F]);H[F].join(this)}this.fireEvent("add",this,H,G)},indexOf:function(B){return this.data.indexOf(B)},indexOfId:function(B){return this.data.indexOfKey(B)},getById:function(B){return this.data.key(B)},getAt:function(B){return this.data.itemAt(B)},getRange:function(D,C){return this.data.getRange(D,C)},storeOptions:function(B){B=Ext.apply({},B);delete B.callback;delete B.scope;this.lastOptions=B},load:function(F){F=F||{};if(this.fireEvent("beforeload",this,F)!==false){this.storeOptions(F);var E=Ext.apply(F.params||{},this.baseParams);if(this.sortInfo&&this.remoteSort){var D=this.paramNames;E[D.sort]=this.sortInfo.field;E[D.dir]=this.sortInfo.direction}this.proxy.load(E,this.reader,this.loadRecords,this,F);return true}else{return false}},reload:function(B){this.load(Ext.applyIf(B||{},this.lastOptions))},loadRecords:function(I,N,J){if(!I||J===false){if(J!==false){this.fireEvent("load",this,[],N)}if(N.callback){N.callback.call(N.scope||this,[],N,false)}return }var K=I.records,L=I.totalRecords||K.length;if(!N||N.add!==true){if(this.pruneModifiedRecords){this.modified=[]}for(var M=0,H=K.length;M<H;M++){K[M].join(this)}if(this.snapshot){this.data=this.snapshot;delete this.snapshot}this.data.clear();this.data.addAll(K);this.totalLength=L;this.applySort();this.fireEvent("datachanged",this)}else{this.totalLength=Math.max(L,this.data.length+K.length);this.add(K)}this.fireEvent("load",this,K,N);if(N.callback){N.callback.call(N.scope||this,K,N,true)}},loadData:function(E,D){var F=this.reader.readRecords(E);this.loadRecords(F,{add:D},true)},getCount:function(){return this.data.length||0},getTotalCount:function(){return this.totalLength||0},getSortState:function(){return this.sortInfo},applySort:function(){if(this.sortInfo&&!this.remoteSort){var C=this.sortInfo,D=C.field;this.sortData(D,C.direction)}},sortData:function(G,F){F=F||"ASC";var E=this.fields.get(G).sortType;var H=function(C,D){var A=E(C.data[G]),B=E(D.data[G]);return A>B?1:(A<B?-1:0)};this.data.sort(F,H);if(this.snapshot&&this.snapshot!=this.data){this.snapshot.sort(F,H)}},setDefaultSort:function(D,C){C=C?C.toUpperCase():"ASC";this.sortInfo={field:D,direction:C};this.sortToggle[D]=C},sort:function(G,I){var H=this.fields.get(G);if(!H){return false}if(!I){if(this.sortInfo&&this.sortInfo.field==H.name){I=(this.sortToggle[H.name]||"ASC").toggle("ASC","DESC")}else{I=H.sortDir}}var J=(this.sortToggle)?this.sortToggle[H.name]:null;var F=(this.sortInfo)?this.sortInfo:null;this.sortToggle[H.name]=I;this.sortInfo={field:H.name,direction:I};if(!this.remoteSort){this.applySort();this.fireEvent("datachanged",this)}else{if(!this.load(this.lastOptions)){if(J){this.sortToggle[H.name]=J}if(F){this.sortInfo=F}}}},each:function(D,C){this.data.each(D,C)},getModifiedRecords:function(){return this.modified},createFilterFn:function(G,H,F,E){if(Ext.isEmpty(H,false)){return false}H=this.data.createValueMatcher(H,F,E);return function(A){return H.test(A.data[G])}},sum:function(I,H,G){var K=this.data.items,L=0;H=H||0;G=(G||G===0)?G:K.length-1;for(var J=H;J<=G;J++){L+=(K[J].data[I]||0)}return L},filter:function(H,I,G,F){var J=this.createFilterFn(H,I,G,F);return J?this.filterBy(J):this.clearFilter()},filterBy:function(D,C){this.snapshot=this.snapshot||this.data;this.data=this.queryBy(D,C||this);this.fireEvent("datachanged",this)},query:function(H,I,G,F){var J=this.createFilterFn(H,I,G,F);return J?this.queryBy(J):this.data.clone()},queryBy:function(F,D){var E=this.snapshot||this.data;return E.filterBy(F,D||this)},find:function(J,K,H,I,G){var L=this.createFilterFn(J,K,I,G);return L?this.data.findIndexBy(L,null,H):-1},findBy:function(F,D,E){return this.data.findIndexBy(F,D,E)},collect:function(R,Q,M){var S=(M===true&&this.snapshot)?this.snapshot.items:this.data.items;var P,O,N=[],L={};for(var K=0,T=S.length;K<T;K++){P=S[K].data[R];O=String(P);if((Q||!Ext.isEmpty(P))&&!L[O]){L[O]=true;N[N.length]=P}}return N},clearFilter:function(B){if(this.isFiltered()){this.data=this.snapshot;delete this.snapshot;if(B!==true){this.fireEvent("datachanged",this)}}},isFiltered:function(){return this.snapshot&&this.snapshot!=this.data},afterEdit:function(B){if(this.modified.indexOf(B)==-1){this.modified.push(B)}this.fireEvent("update",this,B,Ext.data.Record.EDIT)},afterReject:function(B){this.modified.remove(B);this.fireEvent("update",this,B,Ext.data.Record.REJECT)},afterCommit:function(B){this.modified.remove(B);this.fireEvent("update",this,B,Ext.data.Record.COMMIT)},commitChanges:function(){var F=this.modified.slice(0);this.modified=[];for(var E=0,D=F.length;E<D;E++){F[E].commit()}},rejectChanges:function(){var F=this.modified.slice(0);this.modified=[];for(var E=0,D=F.length;E<D;E++){F[E].reject()}},onMetaChange:function(F,D,E){this.recordType=D;this.fields=D.prototype.fields;delete this.snapshot;this.sortInfo=F.sortInfo;this.modified=[];this.fireEvent("metachange",this,this.reader.meta)},findInsertIndex:function(D){this.suspendEvents();var E=this.data.clone();this.data.add(D);this.applySort();var F=this.data.indexOf(D);this.data=E;this.resumeEvents();return F}});Ext.data.SimpleStore=function(B){Ext.data.SimpleStore.superclass.constructor.call(this,Ext.apply(B,{reader:new Ext.data.ArrayReader({id:B.id},Ext.data.Record.create(B.fields))}))};Ext.extend(Ext.data.SimpleStore,Ext.data.Store,{loadData:function(G,J){if(this.expandData===true){var H=[];for(var I=0,F=G.length;I<F;I++){H[H.length]=[G[I]]}G=H}Ext.data.SimpleStore.superclass.loadData.call(this,G,J)}});Ext.data.JsonStore=function(B){Ext.data.JsonStore.superclass.constructor.call(this,Ext.apply(B,{proxy:!B.data?new Ext.data.HttpProxy({url:B.url}):undefined,reader:new Ext.data.JsonReader(B,B.fields)}))};Ext.extend(Ext.data.JsonStore,Ext.data.Store);Ext.data.Field=function(H){if(typeof H=="string"){H={name:H}}Ext.apply(this,H);if(!this.type){this.type="auto"}var I=Ext.data.SortTypes;if(typeof this.sortType=="string"){this.sortType=I[this.sortType]}if(!this.sortType){switch(this.type){case"string":this.sortType=I.asUCString;break;case"date":this.sortType=I.asDate;break;default:this.sortType=I.none}}var G=/[\$,%]/g;if(!this.convert){var J,F=this.dateFormat;switch(this.type){case"":case"auto":case undefined:J=function(A){return A};break;case"string":J=function(A){return(A===undefined||A===null)?"":String(A)};break;case"int":J=function(A){return A!==undefined&&A!==null&&A!==""?parseInt(String(A).replace(G,""),10):""};break;case"float":J=function(A){return A!==undefined&&A!==null&&A!==""?parseFloat(String(A).replace(G,""),10):""};break;case"bool":case"boolean":J=function(A){return A===true||A==="true"||A==1};break;case"date":J=function(A){if(!A){return""}if(Ext.isDate(A)){return A}if(F){if(F=="timestamp"){return new Date(A*1000)}if(F=="time"){return new Date(parseInt(A,10))}return Date.parseDate(A,F)}var B=Date.parse(A);return B?new Date(B):null};break}this.convert=J}};Ext.data.Field.prototype={dateFormat:null,defaultValue:"",mapping:null,sortType:null,sortDir:"ASC"};Ext.data.DataReader=function(C,D){this.meta=C;this.recordType=Ext.isArray(D)?Ext.data.Record.create(D):D};Ext.data.DataReader.prototype={};Ext.data.DataProxy=function(){this.addEvents("beforeload","load");Ext.data.DataProxy.superclass.constructor.call(this)};Ext.extend(Ext.data.DataProxy,Ext.util.Observable);Ext.data.MemoryProxy=function(B){Ext.data.MemoryProxy.superclass.constructor.call(this);this.data=B};Ext.extend(Ext.data.MemoryProxy,Ext.data.DataProxy,{load:function(J,M,I,L,N){J=J||{};var H;try{H=M.readRecords(this.data)}catch(K){this.fireEvent("loadexception",this,N,null,K);I.call(L,null,N,false);return }I.call(L,H,N,true)},update:function(D,C){}});Ext.data.HttpProxy=function(B){Ext.data.HttpProxy.superclass.constructor.call(this);this.conn=B;this.useAjax=!B||!B.events};Ext.extend(Ext.data.HttpProxy,Ext.data.DataProxy,{getConnection:function(){return this.useAjax?Ext.Ajax:this.conn},load:function(I,L,H,K,G){if(this.fireEvent("beforeload",this,I)!==false){var J={params:I||{},request:{callback:H,scope:K,arg:G},reader:L,callback:this.loadResponse,scope:this};if(this.useAjax){Ext.applyIf(J,this.conn);if(this.activeRequest){Ext.Ajax.abort(this.activeRequest)}this.activeRequest=Ext.Ajax.request(J)}else{this.conn.request(J)}}else{H.call(K||this,null,G,false)}},loadResponse:function(G,H,J){delete this.activeRequest;if(!H){this.fireEvent("loadexception",this,G,J);G.request.callback.call(G.request.scope,null,G.request.arg,false);return }var F;try{F=G.reader.read(J)}catch(I){this.fireEvent("loadexception",this,G,J,I);G.request.callback.call(G.request.scope,null,G.request.arg,false);return }this.fireEvent("load",this,G,G.request.arg);G.request.callback.call(G.request.scope,F,G.request.arg,true)},update:function(B){},updateResponse:function(B){}});Ext.data.ScriptTagProxy=function(B){Ext.data.ScriptTagProxy.superclass.constructor.call(this);Ext.apply(this,B);this.head=document.getElementsByTagName("head")[0]};Ext.data.ScriptTagProxy.TRANS_ID=1000;Ext.extend(Ext.data.ScriptTagProxy,Ext.data.DataProxy,{timeout:30000,callbackParam:"callback",nocache:true,load:function(V,U,S,R,Q){if(this.fireEvent("beforeload",this,V)!==false){var M=Ext.urlEncode(Ext.apply(V,this.extraParams));var N=this.url;N+=(N.indexOf("?")!=-1?"&":"?")+M;if(this.nocache){N+="&_dc="+(new Date().getTime())}var O=++Ext.data.ScriptTagProxy.TRANS_ID;var P={id:O,cb:"stcCallback"+O,scriptId:"stcScript"+O,params:V,arg:Q,url:N,callback:S,scope:R,reader:U};var L=this;window[P.cb]=function(A){L.handleResponse(A,P)};N+=String.format("&{0}={1}",this.callbackParam,P.cb);if(this.autoAbort!==false){this.abort()}P.timeoutId=this.handleFailure.defer(this.timeout,this,[P]);var T=document.createElement("script");T.setAttribute("src",N);T.setAttribute("type","text/javascript");T.setAttribute("id",P.scriptId);this.head.appendChild(T);this.trans=P}else{S.call(R||this,null,Q,false)}},isLoading:function(){return this.trans?true:false},abort:function(){if(this.isLoading()){this.destroyTrans(this.trans)}},destroyTrans:function(F,D){this.head.removeChild(document.getElementById(F.scriptId));clearTimeout(F.timeoutId);if(D){window[F.cb]=undefined;try{delete window[F.cb]}catch(E){}}else{window[F.cb]=function(){window[F.cb]=undefined;try{delete window[F.cb]}catch(A){}}}},handleResponse:function(F,H){this.trans=false;this.destroyTrans(H,true);var E;try{E=H.reader.readRecords(F)}catch(G){this.fireEvent("loadexception",this,F,H.arg,G);H.callback.call(H.scope||window,null,H.arg,false);return }this.fireEvent("load",this,F,H.arg);H.callback.call(H.scope||window,E,H.arg,true)},handleFailure:function(B){this.trans=false;this.destroyTrans(B,false);this.fireEvent("loadexception",this,null,B.arg);B.callback.call(B.scope||window,null,B.arg,false)}});Ext.data.JsonReader=function(C,D){C=C||{};Ext.data.JsonReader.superclass.constructor.call(this,C,D||C.fields)};Ext.extend(Ext.data.JsonReader,Ext.data.DataReader,{read:function(response){var json=response.responseText;var o=eval("("+json+")");if(!o){throw {message:"JsonReader.read: Json object not found"}}return this.readRecords(o)},onMetaChange:function(D,E,F){},simpleAccess:function(D,C){return D[C]},getJsonAccessor:function(){var B=/[\[\.]/;return function(A){try{return(B.test(A))?new Function("obj","return obj."+A):function(C){return C[A]}}catch(D){}return Ext.emptyFn}}(),readRecords:function(d){this.jsonData=d;if(d.metaData){delete this.ef;this.meta=d.metaData;this.recordType=Ext.data.Record.create(d.metaData.fields);this.onMetaChange(this.meta,this.recordType,d)}var h=this.meta,p=this.recordType,W=p.prototype.fields,k=W.items,l=W.length;if(!this.ef){if(h.totalProperty){this.getTotal=this.getJsonAccessor(h.totalProperty)}if(h.successProperty){this.getSuccess=this.getJsonAccessor(h.successProperty)}this.getRoot=h.root?this.getJsonAccessor(h.root):function(A){return A};if(h.id){var X=this.getJsonAccessor(h.id);this.getId=function(A){var B=X(A);return(B===undefined||B==="")?null:B}}else{this.getId=function(){return null}}this.ef=[];for(var Z=0;Z<l;Z++){W=k[Z];var U=(W.mapping!==undefined&&W.mapping!==null)?W.mapping:W.name;this.ef[Z]=this.getJsonAccessor(U)}}var b=this.getRoot(d),V=b.length,g=V,m=true;if(h.totalProperty){var i=parseInt(this.getTotal(d),10);if(!isNaN(i)){g=i}}if(h.successProperty){var i=this.getSuccess(d);if(i===false||i==="false"){m=false}}var Y=[];for(var Z=0;Z<V;Z++){var c=b[Z];var o={};var e=this.getId(c);for(var a=0;a<l;a++){W=k[a];var i=this.ef[a](c);o[W.name]=W.convert((i!==undefined)?i:W.defaultValue,c)}var n=new p(o,e);n.json=c;Y[Z]=n}return{success:m,records:Y,totalRecords:g}}});Ext.data.ArrayReader=Ext.extend(Ext.data.JsonReader,{readRecords:function(R){var S=this.meta?this.meta.id:null;var d=this.recordType,Z=d.prototype.fields;var g=[];var X=R;for(var b=0;b<X.length;b++){var Q=X[b];var V={};var T=((S||S===0)&&Q[S]!==undefined&&Q[S]!==""?Q[S]:null);for(var c=0,U=Z.length;c<U;c++){var Y=Z.items[c];var e=Y.mapping!==undefined&&Y.mapping!==null?Y.mapping:c;var W=Q[e]!==undefined?Q[e]:Y.defaultValue;W=Y.convert(W,Q);V[Y.name]=W}var a=new d(V,T);a.json=Q;g[g.length]=a}return{records:g,totalRecords:g.length}}});Ext.data.Tree=function(B){this.nodeHash={};this.root=null;if(B){this.setRootNode(B)}this.addEvents("append","remove","move","insert","beforeappend","beforeremove","beforemove","beforeinsert");Ext.data.Tree.superclass.constructor.call(this)};Ext.extend(Ext.data.Tree,Ext.util.Observable,{pathSeparator:"/",proxyNodeEvent:function(){return this.fireEvent.apply(this,arguments)},getRootNode:function(){return this.root},setRootNode:function(B){this.root=B;B.ownerTree=this;B.isRoot=true;this.registerNode(B);return B},getNodeById:function(B){return this.nodeHash[B]},registerNode:function(B){this.nodeHash[B.id]=B},unregisterNode:function(B){delete this.nodeHash[B.id]},toString:function(){return"[Tree"+(this.id?" "+this.id:"")+"]"}});Ext.data.Node=function(B){this.attributes=B||{};this.leaf=this.attributes.leaf;this.id=this.attributes.id;if(!this.id){this.id=Ext.id(null,"ynode-");this.attributes.id=this.id}this.childNodes=[];if(!this.childNodes.indexOf){this.childNodes.indexOf=function(A){for(var E=0,F=this.length;E<F;E++){if(this[E]==A){return E}}return -1}}this.parentNode=null;this.firstChild=null;this.lastChild=null;this.previousSibling=null;this.nextSibling=null;this.addEvents({append:true,remove:true,move:true,insert:true,beforeappend:true,beforeremove:true,beforemove:true,beforeinsert:true});this.listeners=this.attributes.listeners;Ext.data.Node.superclass.constructor.call(this)};Ext.extend(Ext.data.Node,Ext.util.Observable,{fireEvent:function(D){if(Ext.data.Node.superclass.fireEvent.apply(this,arguments)===false){return false}var C=this.getOwnerTree();if(C){if(C.proxyNodeEvent.apply(C,arguments)===false){return false}}return true},isLeaf:function(){return this.leaf===true},setFirstChild:function(B){this.firstChild=B},setLastChild:function(B){this.lastChild=B},isLast:function(){return(!this.parentNode?true:this.parentNode.lastChild==this)},isFirst:function(){return(!this.parentNode?true:this.parentNode.firstChild==this)},hasChildNodes:function(){return !this.isLeaf()&&this.childNodes.length>0},appendChild:function(K){var J=false;if(Ext.isArray(K)){J=K}else{if(arguments.length>1){J=arguments}}if(J){for(var L=0,H=J.length;L<H;L++){this.appendChild(J[L])}}else{if(this.fireEvent("beforeappend",this.ownerTree,this,K)===false){return false}var N=this.childNodes.length;var M=K.parentNode;if(M){if(K.fireEvent("beforemove",K.getOwnerTree(),K,M,this,N)===false){return false}M.removeChild(K)}N=this.childNodes.length;if(N==0){this.setFirstChild(K)}this.childNodes.push(K);K.parentNode=this;var I=this.childNodes[N-1];if(I){K.previousSibling=I;I.nextSibling=K}else{K.previousSibling=null}K.nextSibling=null;this.setLastChild(K);K.setOwnerTree(this.getOwnerTree());this.fireEvent("append",this.ownerTree,this,K,N);if(M){K.fireEvent("move",this.ownerTree,K,M,this,N)}return K}},removeChild:function(D){var C=this.childNodes.indexOf(D);if(C==-1){return false}if(this.fireEvent("beforeremove",this.ownerTree,this,D)===false){return false}this.childNodes.splice(C,1);if(D.previousSibling){D.previousSibling.nextSibling=D.nextSibling}if(D.nextSibling){D.nextSibling.previousSibling=D.previousSibling}if(this.firstChild==D){this.setFirstChild(D.nextSibling)}if(this.lastChild==D){this.setLastChild(D.previousSibling)}D.setOwnerTree(null);D.parentNode=null;D.previousSibling=null;D.nextSibling=null;this.fireEvent("remove",this.ownerTree,this,D);return D},insertBefore:function(J,G){if(!G){return this.appendChild(J)}if(J==G){return false}if(this.fireEvent("beforeinsert",this.ownerTree,this,J,G)===false){return false}var L=this.childNodes.indexOf(G);var K=J.parentNode;var I=L;if(K==this&&this.childNodes.indexOf(J)<L){I--}if(K){if(J.fireEvent("beforemove",J.getOwnerTree(),J,K,this,L,G)===false){return false}K.removeChild(J)}if(I==0){this.setFirstChild(J)}this.childNodes.splice(I,0,J);J.parentNode=this;var H=this.childNodes[I-1];if(H){J.previousSibling=H;H.nextSibling=J}else{J.previousSibling=null}J.nextSibling=G;G.previousSibling=J;J.setOwnerTree(this.getOwnerTree());this.fireEvent("insert",this.ownerTree,this,J,G);if(K){J.fireEvent("move",this.ownerTree,J,K,this,I,G)}return J},remove:function(){this.parentNode.removeChild(this);return this},item:function(B){return this.childNodes[B]},replaceChild:function(C,D){this.insertBefore(C,D);this.removeChild(D);return D},indexOf:function(B){return this.childNodes.indexOf(B)},getOwnerTree:function(){if(!this.ownerTree){var B=this;while(B){if(B.ownerTree){this.ownerTree=B.ownerTree;break}B=B.parentNode}}return this.ownerTree},getDepth:function(){var D=0;var C=this;while(C.parentNode){++D;C=C.parentNode}return D},setOwnerTree:function(H){if(H!=this.ownerTree){if(this.ownerTree){this.ownerTree.unregisterNode(this)}this.ownerTree=H;var F=this.childNodes;for(var G=0,E=F.length;G<E;G++){F[G].setOwnerTree(H)}if(H){H.registerNode(this)}}},getPath:function(H){H=H||"id";var F=this.parentNode;var E=[this.attributes[H]];while(F){E.unshift(F.attributes[H]);F=F.parentNode}var G=this.getOwnerTree().pathSeparator;return G+E.join(G)},bubble:function(G,H,E){var F=this;while(F){if(G.apply(H||F,E||[F])===false){break}F=F.parentNode}},cascade:function(H,I,L){if(H.apply(I||this,L||[this])!==false){var J=this.childNodes;for(var K=0,G=J.length;K<G;K++){J[K].cascade(H,I,L)}}},eachChild:function(H,I,L){var J=this.childNodes;for(var K=0,G=J.length;K<G;K++){if(H.apply(I||this,L||[J[K]])===false){break}}},findChild:function(H,G){var I=this.childNodes;for(var J=0,F=I.length;J<F;J++){if(I[J].attributes[H]==G){return I[J]}}return null},findChildBy:function(G,H){var I=this.childNodes;for(var J=0,F=I.length;J<F;J++){if(G.call(H||I[J],I[J])===true){return I[J]}}return null},sort:function(K,L){var M=this.childNodes;var H=M.length;if(H>0){var J=L?function(){K.apply(L,arguments)}:K;M.sort(J);for(var N=0;N<H;N++){var I=M[N];I.previousSibling=M[N-1];I.nextSibling=M[N+1];if(N==0){this.setFirstChild(I)}if(N==H-1){this.setLastChild(I)}}}},contains:function(B){return B.isAncestor(this)},isAncestor:function(C){var D=this.parentNode;while(D){if(D==C){return true}D=D.parentNode}return false},toString:function(){return"[Node"+(this.id?" "+this.id:"")+"]"}});Ext.ComponentMgr=function(){var D=new Ext.util.MixedCollection();var C={};return{register:function(A){D.add(A)},unregister:function(A){D.remove(A)},get:function(A){return D.get(A)},onAvailable:function(A,B,F){D.on("add",function(H,E){if(E.id==A){B.call(F||E,E);D.un("add",B,F)}})},all:D,registerType:function(A,B){C[A]=B;B.xtype=A},create:function(B,A){return new C[B.xtype||A](B)}}}();Ext.reg=Ext.ComponentMgr.registerType;Ext.Component=function(F){F=F||{};if(F.initialConfig){if(F.isAction){this.baseAction=F}F=F.initialConfig}else{if(F.tagName||F.dom||typeof F=="string"){F={applyTo:F,id:F.id||F}}}this.initialConfig=F;Ext.apply(this,F);this.addEvents("disable","enable","beforeshow","show","beforehide","hide","beforerender","render","beforedestroy","destroy","beforestaterestore","staterestore","beforestatesave","statesave");this.getId();Ext.ComponentMgr.register(this);Ext.Component.superclass.constructor.call(this);if(this.baseAction){this.baseAction.addComponent(this)}this.initComponent();if(this.plugins){if(Ext.isArray(this.plugins)){for(var E=0,D=this.plugins.length;E<D;E++){this.plugins[E].init(this)}}else{this.plugins.init(this)}}if(this.stateful!==false){this.initState(F)}if(this.applyTo){this.applyToMarkup(this.applyTo);delete this.applyTo}else{if(this.renderTo){this.render(this.renderTo);delete this.renderTo}}};Ext.Component.AUTO_ID=1000;Ext.extend(Ext.Component,Ext.util.Observable,{disabledClass:"x-item-disabled",allowDomMove:true,autoShow:false,hideMode:"display",hideParent:false,hidden:false,disabled:false,rendered:false,ctype:"Ext.Component",actionMode:"el",getActionEl:function(){return this[this.actionMode]},initComponent:Ext.emptyFn,render:function(D,C){if(!this.rendered&&this.fireEvent("beforerender",this)!==false){if(!D&&this.el){this.el=Ext.get(this.el);D=this.el.dom.parentNode;this.allowDomMove=false}this.container=Ext.get(D);if(this.ctCls){this.container.addClass(this.ctCls)}this.rendered=true;if(C!==undefined){if(typeof C=="number"){C=this.container.dom.childNodes[C]}else{C=Ext.getDom(C)}}this.onRender(this.container,C||null);if(this.autoShow){this.el.removeClass(["x-hidden","x-hide-"+this.hideMode])}if(this.cls){this.el.addClass(this.cls);delete this.cls}if(this.style){this.el.applyStyles(this.style);delete this.style}this.fireEvent("render",this);this.afterRender(this.container);if(this.hidden){this.hide()}if(this.disabled){this.disable()}this.initStateEvents()}return this},initState:function(C){if(Ext.state.Manager){var D=Ext.state.Manager.get(this.stateId||this.id);if(D){if(this.fireEvent("beforestaterestore",this,D)!==false){this.applyState(D);this.fireEvent("staterestore",this,D)}}}},initStateEvents:function(){if(this.stateEvents){for(var C=0,D;D=this.stateEvents[C];C++){this.on(D,this.saveState,this,{delay:100})}}},applyState:function(D,C){if(D){Ext.apply(this,D)}},getState:function(){return null},saveState:function(){if(Ext.state.Manager){var B=this.getState();if(this.fireEvent("beforestatesave",this,B)!==false){Ext.state.Manager.set(this.stateId||this.id,B);this.fireEvent("statesave",this,B)}}},applyToMarkup:function(B){this.allowDomMove=false;this.el=Ext.get(B);this.render(this.el.dom.parentNode)},addClass:function(B){if(this.el){this.el.addClass(B)}else{this.cls=this.cls?this.cls+" "+B:B}},removeClass:function(B){if(this.el){this.el.removeClass(B)}else{if(this.cls){this.cls=this.cls.split(" ").remove(B).join(" ")}}},onRender:function(F,D){if(this.autoEl){if(typeof this.autoEl=="string"){this.el=document.createElement(this.autoEl)}else{var E=document.createElement("div");Ext.DomHelper.overwrite(E,this.autoEl);this.el=E.firstChild}if(!this.el.id){this.el.id=this.getId()}}if(this.el){this.el=Ext.get(this.el);if(this.allowDomMove!==false){F.dom.insertBefore(this.el.dom,D)}if(this.overCls){this.el.addClassOnOver(this.overCls)}}},getAutoCreate:function(){var B=typeof this.autoCreate=="object"?this.autoCreate:Ext.apply({},this.defaultAutoCreate);if(this.id&&!B.id){B.id=this.id}return B},afterRender:Ext.emptyFn,destroy:function(){if(this.fireEvent("beforedestroy",this)!==false){this.beforeDestroy();if(this.rendered){this.el.removeAllListeners();this.el.remove();if(this.actionMode=="container"){this.container.remove()}}this.onDestroy();Ext.ComponentMgr.unregister(this);this.fireEvent("destroy",this);this.purgeListeners()}},beforeDestroy:Ext.emptyFn,onDestroy:Ext.emptyFn,getEl:function(){return this.el},getId:function(){return this.id||(this.id="ext-comp-"+(++Ext.Component.AUTO_ID))},getItemId:function(){return this.itemId||this.getId()},focus:function(D,C){if(C){this.focus.defer(typeof C=="number"?C:10,this,[D,false]);return }if(this.rendered){this.el.focus();if(D===true){this.el.dom.select()}}return this},blur:function(){if(this.rendered){this.el.blur()}return this},disable:function(){if(this.rendered){this.onDisable()}this.disabled=true;this.fireEvent("disable",this);return this},onDisable:function(){this.getActionEl().addClass(this.disabledClass);this.el.dom.disabled=true},enable:function(){if(this.rendered){this.onEnable()}this.disabled=false;this.fireEvent("enable",this);return this},onEnable:function(){this.getActionEl().removeClass(this.disabledClass);this.el.dom.disabled=false},setDisabled:function(B){this[B?"disable":"enable"]()},show:function(){if(this.fireEvent("beforeshow",this)!==false){this.hidden=false;if(this.autoRender){this.render(typeof this.autoRender=="boolean"?Ext.getBody():this.autoRender)}if(this.rendered){this.onShow()}this.fireEvent("show",this)}return this},onShow:function(){if(this.hideParent){this.container.removeClass("x-hide-"+this.hideMode)}else{this.getActionEl().removeClass("x-hide-"+this.hideMode)}},hide:function(){if(this.fireEvent("beforehide",this)!==false){this.hidden=true;if(this.rendered){this.onHide()}this.fireEvent("hide",this)}return this},onHide:function(){if(this.hideParent){this.container.addClass("x-hide-"+this.hideMode)}else{this.getActionEl().addClass("x-hide-"+this.hideMode)}},setVisible:function(B){if(B){this.show()}else{this.hide()}return this},isVisible:function(){return this.rendered&&this.getActionEl().isVisible()},cloneConfig:function(F){F=F||{};var E=F.id||Ext.id();var D=Ext.applyIf(F,this.initialConfig);D.id=E;return new this.constructor(D)},getXType:function(){return this.constructor.xtype},isXType:function(D,C){return !C?("/"+this.getXTypes()+"/").indexOf("/"+D+"/")!=-1:this.constructor.xtype==D},getXTypes:function(){var D=this.constructor;if(!D.xtypes){var E=[],F=this;while(F&&F.constructor.xtype){E.unshift(F.constructor.xtype);F=F.constructor.superclass}D.xtypeChain=E;D.xtypes=E.join("/")}return D.xtypes},findParentBy:function(C){for(var D=this.ownerCt;(D!=null)&&!C(D,this);D=D.ownerCt){}return D||null},findParentByType:function(B){return typeof B=="function"?this.findParentBy(function(A){return A.constructor===B}):this.findParentBy(function(A){return A.constructor.xtype===B})},mon:function(G,J,H,I,F){if(!this.mons){this.mons=[];this.on("beforedestroy",function(){for(var A=0,B=this.mons.length;A<B;A++){var C=this.mons[A];C.item.un(C.ename,C.fn,C.scope)}},this)}this.mons.push({item:G,ename:J,fn:H,scope:I});G.on(J,H,I,F)}});Ext.reg("component",Ext.Component);(function(){Ext.Layer=function(K,L){K=K||{};var J=Ext.DomHelper;var B=K.parentEl,I=B?Ext.getDom(B):document.body;if(L){this.dom=Ext.getDom(L)}if(!this.dom){var A=K.dh||{tag:"div",cls:"x-layer"};this.dom=J.append(I,A)}if(K.cls){this.addClass(K.cls)}this.constrain=K.constrain!==false;this.visibilityMode=Ext.Element.VISIBILITY;if(K.id){this.id=this.dom.id=K.id}else{this.id=Ext.id(this.dom)}this.zindex=K.zindex||this.getZIndex();this.position("absolute",this.zindex);if(K.shadow){this.shadowOffset=K.shadowOffset||4;this.shadow=new Ext.Shadow({offset:this.shadowOffset,mode:K.shadow})}else{this.shadowOffset=0}this.useShim=K.shim!==false&&Ext.useShims;this.useDisplay=K.useDisplay;this.hide()};var C=Ext.Element.prototype;var D=[];Ext.extend(Ext.Layer,Ext.Element,{getZIndex:function(){return this.zindex||parseInt(this.getStyle("z-index"),10)||11000},getShim:function(){if(!this.useShim){return null}if(this.shim){return this.shim}var A=D.shift();if(!A){A=this.createShim();A.enableDisplayMode("block");A.dom.style.display="none";A.dom.style.visibility="visible"}var B=this.dom.parentNode;if(A.dom.parentNode!=B){B.insertBefore(A.dom,this.dom)}A.setStyle("z-index",this.getZIndex()-2);this.shim=A;return A},hideShim:function(){if(this.shim){this.shim.setDisplayed(false);D.push(this.shim);delete this.shim}},disableShadow:function(){if(this.shadow){this.shadowDisabled=true;this.shadow.hide();this.lastShadowOffset=this.shadowOffset;this.shadowOffset=0}},enableShadow:function(A){if(this.shadow){this.shadowDisabled=false;this.shadowOffset=this.lastShadowOffset;delete this.lastShadowOffset;if(A){this.sync(true)}}},sync:function(B){var N=this.shadow;if(!this.updating&&this.isVisible()&&(N||this.useShim)){var Q=this.getShim();var O=this.getWidth(),R=this.getHeight();var A=this.getLeft(true),M=this.getTop(true);if(N&&!this.shadowDisabled){if(B&&!N.isVisible()){N.show(this)}else{N.realign(A,M,O,R)}if(Q){if(B){Q.show()}var P=N.adjusts,L=Q.dom.style;L.left=(Math.min(A,A+P.l))+"px";L.top=(Math.min(M,M+P.t))+"px";L.width=(O+P.w)+"px";L.height=(R+P.h)+"px"}}else{if(Q){if(B){Q.show()}Q.setSize(O,R);Q.setLeftTop(A,M)}}}},destroy:function(){this.hideShim();if(this.shadow){this.shadow.hide()}this.removeAllListeners();Ext.removeNode(this.dom);Ext.Element.uncache(this.id)},remove:function(){this.destroy()},beginUpdate:function(){this.updating=true},endUpdate:function(){this.updating=false;this.sync(true)},hideUnders:function(A){if(this.shadow){this.shadow.hide()}this.hideShim()},constrainXY:function(){if(this.constrain){var R=Ext.lib.Dom.getViewWidth(),B=Ext.lib.Dom.getViewHeight();var M=Ext.getDoc().getScroll();var N=this.getXY();var Q=N[0],S=N[1];var P=this.dom.offsetWidth+this.shadowOffset,A=this.dom.offsetHeight+this.shadowOffset;var T=false;if((Q+P)>R+M.left){Q=R-P-this.shadowOffset;T=true}if((S+A)>B+M.top){S=B-A-this.shadowOffset;T=true}if(Q<M.left){Q=M.left;T=true}if(S<M.top){S=M.top;T=true}if(T){if(this.avoidY){var O=this.avoidY;if(S<=O&&(S+A)>=O){S=O-A-5}}N=[Q,S];this.storeXY(N);C.setXY.call(this,N);this.sync()}}},isVisible:function(){return this.visible},showAction:function(){this.visible=true;if(this.useDisplay===true){this.setDisplayed("")}else{if(this.lastXY){C.setXY.call(this,this.lastXY)}else{if(this.lastLT){C.setLeftTop.call(this,this.lastLT[0],this.lastLT[1])}}}},hideAction:function(){this.visible=false;if(this.useDisplay===true){this.setDisplayed(false)}else{this.setLeftTop(-10000,-10000)}},setVisible:function(J,K,B,A,I){if(J){this.showAction()}if(K&&J){var L=function(){this.sync(true);if(A){A()}}.createDelegate(this);C.setVisible.call(this,true,true,B,L,I)}else{if(!J){this.hideUnders(true)}var L=A;if(K){L=function(){this.hideAction();if(A){A()}}.createDelegate(this)}C.setVisible.call(this,J,K,B,L,I);if(J){this.sync(true)}else{if(!K){this.hideAction()}}}},storeXY:function(A){delete this.lastLT;this.lastXY=A},storeLeftTop:function(A,B){delete this.lastXY;this.lastLT=[A,B]},beforeFx:function(){this.beforeAction();return Ext.Layer.superclass.beforeFx.apply(this,arguments)},afterFx:function(){Ext.Layer.superclass.afterFx.apply(this,arguments);this.sync(this.isVisible())},beforeAction:function(){if(!this.updating&&this.shadow){this.shadow.hide()}},setLeft:function(A){this.storeLeftTop(A,this.getTop(true));C.setLeft.apply(this,arguments);this.sync()},setTop:function(A){this.storeLeftTop(this.getLeft(true),A);C.setTop.apply(this,arguments);this.sync()},setLeftTop:function(A,B){this.storeLeftTop(A,B);C.setLeftTop.apply(this,arguments);this.sync()},setXY:function(I,K,B,A,J){this.fixDisplay();this.beforeAction();this.storeXY(I);var L=this.createCB(A);C.setXY.call(this,I,K,B,L,J);if(!K){L()}},createCB:function(A){var B=this;return function(){B.constrainXY();B.sync(true);if(A){A()}}},setX:function(J,I,B,A,H){this.setXY([J,this.getY()],I,B,A,H)},setY:function(A,J,H,B,I){this.setXY([this.getX(),A],J,H,B,I)},setSize:function(L,K,M,B,A,J){this.beforeAction();var N=this.createCB(A);C.setSize.call(this,L,K,M,B,N,J);if(!M){N()}},setWidth:function(J,K,B,A,I){this.beforeAction();var L=this.createCB(A);C.setWidth.call(this,J,K,B,L,I);if(!K){L()}},setHeight:function(J,K,B,A,I){this.beforeAction();var L=this.createCB(A);C.setHeight.call(this,J,K,B,L,I);if(!K){L()}},setBounds:function(M,O,L,A,N,Q,P,R){this.beforeAction();var B=this.createCB(P);if(!N){this.storeXY([M,O]);C.setXY.call(this,[M,O]);C.setSize.call(this,L,A,N,Q,B,R);B()}else{C.setBounds.call(this,M,O,L,A,N,Q,B,R)}return this},setZIndex:function(A){this.zindex=A;this.setStyle("z-index",A+2);if(this.shadow){this.shadow.setZIndex(A+1)}if(this.shim){this.shim.setStyle("z-index",A)}}})})();Ext.Shadow=function(G){Ext.apply(this,G);if(typeof this.mode!="string"){this.mode=this.defaultMode}var F=this.offset,H={h:0};var E=Math.floor(this.offset/2);switch(this.mode.toLowerCase()){case"drop":H.w=0;H.l=H.t=F;H.t-=1;if(Ext.isIE){H.l-=this.offset+E;H.t-=this.offset+E;H.w-=E;H.h-=E;H.t+=1}break;case"sides":H.w=(F*2);H.l=-F;H.t=F-1;if(Ext.isIE){H.l-=(this.offset-E);H.t-=this.offset+E;H.l+=1;H.w-=(this.offset-E)*2;H.w-=E+1;H.h-=1}break;case"frame":H.w=H.h=(F*2);H.l=H.t=-F;H.t+=1;H.h-=2;if(Ext.isIE){H.l-=(this.offset-E);H.t-=(this.offset-E);H.l+=1;H.w-=(this.offset+E+1);H.h-=(this.offset+E);H.h+=1}break}this.adjusts=H};Ext.Shadow.prototype={offset:4,defaultMode:"drop",show:function(B){B=Ext.get(B);if(!this.el){this.el=Ext.Shadow.Pool.pull();if(this.el.dom.nextSibling!=B.dom){this.el.insertBefore(B)}}this.el.setStyle("z-index",this.zIndex||parseInt(B.getStyle("z-index"),10)-1);if(Ext.isIE){this.el.dom.style.filter="progid:DXImageTransform.Microsoft.alpha(opacity=50) progid:DXImageTransform.Microsoft.Blur(pixelradius="+(this.offset)+")"}this.realign(B.getLeft(true),B.getTop(true),B.getWidth(),B.getHeight());this.el.dom.style.display="block"},isVisible:function(){return this.el?true:false},realign:function(R,T,U,O){if(!this.el){return }var X=this.adjusts,Z=this.el.dom,S=Z.style;var b=0;S.left=(R+X.l)+"px";S.top=(T+X.t)+"px";var V=(U+X.w),P=(O+X.h),a=V+"px",W=P+"px";if(S.width!=a||S.height!=W){S.width=a;S.height=W;if(!Ext.isIE){var Y=Z.childNodes;var Q=Math.max(0,(V-12))+"px";Y[0].childNodes[1].style.width=Q;Y[1].childNodes[1].style.width=Q;Y[2].childNodes[1].style.width=Q;Y[1].style.height=Math.max(0,(P-12))+"px"}}},hide:function(){if(this.el){this.el.dom.style.display="none";Ext.Shadow.Pool.push(this.el);delete this.el}},setZIndex:function(B){this.zIndex=B;if(this.el){this.el.setStyle("z-index",B)}}};Ext.Shadow.Pool=function(){var D=[];var C=Ext.isIE?'<div class="x-ie-shadow"></div>':'<div class="x-shadow"><div class="xst"><div class="xstl"></div><div class="xstc"></div><div class="xstr"></div></div><div class="xsc"><div class="xsml"></div><div class="xsmc"></div><div class="xsmr"></div></div><div class="xsb"><div class="xsbl"></div><div class="xsbc"></div><div class="xsbr"></div></div></div>';return{pull:function(){var A=D.shift();if(!A){A=Ext.get(Ext.DomHelper.insertHtml("beforeBegin",document.body.firstChild,C));A.autoBoxAdjust=false}return A},push:function(A){D.push(A)}}}();Ext.BoxComponent=Ext.extend(Ext.Component,{initComponent:function(){Ext.BoxComponent.superclass.initComponent.call(this);this.addEvents("resize","move")},boxReady:false,deferHeight:false,setSize:function(L,J){if(typeof L=="object"){J=L.height;L=L.width}if(!this.boxReady){this.width=L;this.height=J;return this}if(this.lastSize&&this.lastSize.width==L&&this.lastSize.height==J){return this}this.lastSize={width:L,height:J};var K=this.adjustSize(L,J);var H=K.width,G=K.height;if(H!==undefined||G!==undefined){var I=this.getResizeEl();if(!this.deferHeight&&H!==undefined&&G!==undefined){I.setSize(H,G)}else{if(!this.deferHeight&&G!==undefined){I.setHeight(G)}else{if(H!==undefined){I.setWidth(H)}}}this.onResize(H,G,L,J);this.fireEvent("resize",this,H,G,L,J)}return this},setWidth:function(B){return this.setSize(B)},setHeight:function(B){return this.setSize(undefined,B)},getSize:function(){return this.el.getSize()},getPosition:function(B){if(B===true){return[this.el.getLeft(true),this.el.getTop(true)]}return this.xy||this.el.getXY()},getBox:function(D){var F=this.el.getSize();if(D===true){F.x=this.el.getLeft(true);F.y=this.el.getTop(true)}else{var E=this.xy||this.el.getXY();F.x=E[0];F.y=E[1]}return F},updateBox:function(B){this.setSize(B.width,B.height);this.setPagePosition(B.x,B.y);return this},getResizeEl:function(){return this.resizeEl||this.el},getPositionEl:function(){return this.positionEl||this.el},setPosition:function(G,H){if(G&&typeof G[1]=="number"){H=G[1];G=G[0]}this.x=G;this.y=H;if(!this.boxReady){return this}var L=this.adjustPosition(G,H);var I=L.x,J=L.y;var K=this.getPositionEl();if(I!==undefined||J!==undefined){if(I!==undefined&&J!==undefined){K.setLeftTop(I,J)}else{if(I!==undefined){K.setLeft(I)}else{if(J!==undefined){K.setTop(J)}}}this.onPosition(I,J);this.fireEvent("move",this,I,J)}return this},setPagePosition:function(D,E){if(D&&typeof D[1]=="number"){E=D[1];D=D[0]}this.pageX=D;this.pageY=E;if(!this.boxReady){return }if(D===undefined||E===undefined){return }var F=this.el.translatePoints(D,E);this.setPosition(F.left,F.top);return this},onRender:function(D,C){Ext.BoxComponent.superclass.onRender.call(this,D,C);if(this.resizeEl){this.resizeEl=Ext.get(this.resizeEl)}if(this.positionEl){this.positionEl=Ext.get(this.positionEl)}},afterRender:function(){Ext.BoxComponent.superclass.afterRender.call(this);this.boxReady=true;this.setSize(this.width,this.height);if(this.x||this.y){this.setPosition(this.x,this.y)}else{if(this.pageX||this.pageY){this.setPagePosition(this.pageX,this.pageY)}}},syncSize:function(){delete this.lastSize;this.setSize(this.autoWidth?undefined:this.el.getWidth(),this.autoHeight?undefined:this.el.getHeight());return this},onResize:function(F,H,E,G){},onPosition:function(C,D){},adjustSize:function(C,D){if(this.autoWidth){C="auto"}if(this.autoHeight){D="auto"}return{width:C,height:D}},adjustPosition:function(C,D){return{x:C,y:D}}});Ext.reg("box",Ext.BoxComponent);Ext.SplitBar=function(I,G,J,H,F){this.el=Ext.get(I,true);this.el.dom.unselectable="on";this.resizingEl=Ext.get(G,true);this.orientation=J||Ext.SplitBar.HORIZONTAL;this.minSize=0;this.maxSize=2000;this.animate=false;this.useShim=false;this.shim=null;if(!F){this.proxy=Ext.SplitBar.createProxy(this.orientation)}else{this.proxy=Ext.get(F).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=H||(this.el.getX()>this.resizingEl.getX()?Ext.SplitBar.LEFT:Ext.SplitBar.RIGHT);this.el.addClass("x-splitbar-h")}else{this.placement=H||(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(F,G){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 I=this.adapter.getElementSize(this);this.activeMinSize=this.getMinimumSize();this.activeMaxSize=this.getMaximumSize();var H=I-this.activeMinSize;var J=Math.max(this.activeMaxSize-I,0);if(this.orientation==Ext.SplitBar.HORIZONTAL){this.dd.resetConstraints();this.dd.setXConstraint(this.placement==Ext.SplitBar.LEFT?H:J,this.placement==Ext.SplitBar.LEFT?J:H);this.dd.setYConstraint(0,0)}else{this.dd.resetConstraints();this.dd.setXConstraint(0,0);this.dd.setYConstraint(this.placement==Ext.SplitBar.TOP?H:J,this.placement==Ext.SplitBar.TOP?J:H)}this.dragSpecs.startSize=I;this.dragSpecs.startPoint=[F,G];Ext.dd.DDProxy.prototype.b4StartDrag.call(this.dd,F,G)},onEndProxyDrag:function(E){Ext.get(this.proxy).setDisplayed(false);var F=Ext.lib.Event.getXY(E);if(this.overlay){this.overlay.remove();delete this.overlay}var D;if(this.orientation==Ext.SplitBar.HORIZONTAL){D=this.dragSpecs.startSize+(this.placement==Ext.SplitBar.LEFT?F[0]-this.dragSpecs.startPoint[0]:this.dragSpecs.startPoint[0]-F[0])}else{D=this.dragSpecs.startSize+(this.placement==Ext.SplitBar.TOP?F[1]-this.dragSpecs.startPoint[1]:this.dragSpecs.startPoint[1]-F[1])}D=Math.min(Math.max(D,this.activeMinSize),this.activeMaxSize);if(D!=this.dragSpecs.startSize){if(this.fireEvent("beforeapply",this,D)!==false){this.adapter.setElementSize(this,D);this.fireEvent("moved",this,D);this.fireEvent("resize",this,D)}}},getAdapter:function(){return this.adapter},setAdapter:function(B){this.adapter=B;this.adapter.init(this)},getMinimumSize:function(){return this.minSize},setMinimumSize:function(B){this.minSize=B},getMaximumSize:function(){return this.maxSize},setMaximumSize:function(B){this.maxSize=B},setCurrentSize:function(D){var C=this.animate;this.animate=false;this.adapter.setElementSize(this,D);this.animate=C},destroy:function(B){if(this.shim){this.shim.remove()}this.dd.unreg();Ext.removeNode(this.proxy);if(B){this.el.remove()}}});Ext.SplitBar.createProxy=function(F){var E=new Ext.Element(document.createElement("div"));E.unselectable();var D="x-splitbar-proxy";E.addClass(D+" "+(F==Ext.SplitBar.HORIZONTAL?D+"-h":D+"-v"));document.body.appendChild(E.dom);return E.dom};Ext.SplitBar.BasicLayoutAdapter=function(){};Ext.SplitBar.BasicLayoutAdapter.prototype={init:function(B){},getElementSize:function(B){if(B.orientation==Ext.SplitBar.HORIZONTAL){return B.resizingEl.getWidth()}else{return B.resizingEl.getHeight()}},setElementSize:function(F,D,E){if(F.orientation==Ext.SplitBar.HORIZONTAL){if(!F.animate){F.resizingEl.setWidth(D);if(E){E(F,D)}}else{F.resizingEl.setWidth(D,true,0.1,E,"easeOut")}}else{if(!F.animate){F.resizingEl.setHeight(D);if(E){E(F,D)}}else{F.resizingEl.setHeight(D,true,0.1,E,"easeOut")}}}};Ext.SplitBar.AbsoluteLayoutAdapter=function(B){this.basic=new Ext.SplitBar.BasicLayoutAdapter();this.container=Ext.get(B)};Ext.SplitBar.AbsoluteLayoutAdapter.prototype={init:function(B){this.basic.init(B)},getElementSize:function(B){return this.basic.getElementSize(B)},setElementSize:function(F,D,E){this.basic.setElementSize(F,D,this.moveSplitter.createDelegate(this,[F]))},moveSplitter:function(C){var D=Ext.SplitBar;switch(C.placement){case D.LEFT:C.el.setX(C.resizingEl.getRight());break;case D.RIGHT:C.el.setStyle("right",(this.container.getWidth()-C.resizingEl.getLeft())+"px");break;case D.TOP:C.el.setY(C.resizingEl.getBottom());break;case D.BOTTOM:C.el.setY(C.resizingEl.getTop()-C.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 B=this.items;if(B){delete this.items;if(Ext.isArray(B)){this.add.apply(this,B)}else{this.add(B)}}},initItems:function(){if(!this.items){this.items=new Ext.util.MixedCollection(false,this.getComponentId);this.getLayout()}},setLayout:function(B){if(this.layout&&this.layout!=B){this.layout.setContainer(null)}this.initItems();this.layout=B;B.setContainer(this)},render:function(){Ext.Container.superclass.render.apply(this,arguments);if(this.layout){if(typeof this.layout=="string"){this.layout=new Ext.Container.LAYOUTS[this.layout.toLowerCase()](this.layoutConfig)}this.setLayout(this.layout);if(this.activeItem!==undefined){var B=this.activeItem;delete this.activeItem;this.layout.setActiveItem(B);return }}if(!this.ownerCt){this.doLayout()}if(this.monitorResize===true){Ext.EventManager.onWindowResize(this.doLayout,this,[false])}},getLayoutTarget:function(){return this.el},getComponentId:function(B){return B.itemId||B.id},add:function(K){if(!this.items){this.initItems()}var L=arguments,G=L.length;if(G>1){for(var J=0;J<G;J++){this.add(L[J])}return }var H=this.lookupComponent(this.applyDefaults(K));var I=this.items.length;if(this.fireEvent("beforeadd",this,H,I)!==false&&this.onBeforeAdd(H)!==false){this.items.add(H);H.ownerCt=this;this.fireEvent("add",this,H,I)}return H},insert:function(J,K){if(!this.items){this.initItems()}var L=arguments,G=L.length;if(G>2){for(var I=G-1;I>=1;--I){this.insert(J,L[I])}return }var H=this.lookupComponent(this.applyDefaults(K));if(H.ownerCt==this&&this.items.indexOf(H)<J){--J}if(this.fireEvent("beforeadd",this,H,J)!==false&&this.onBeforeAdd(H)!==false){this.items.insert(J,H);H.ownerCt=this;this.fireEvent("add",this,H,J)}return H},applyDefaults:function(B){if(this.defaults){if(typeof B=="string"){B=Ext.ComponentMgr.get(B);Ext.apply(B,this.defaults)}else{if(!B.events){Ext.applyIf(B,this.defaults)}else{Ext.apply(B,this.defaults)}}}return B},onBeforeAdd:function(B){if(B.ownerCt){B.ownerCt.remove(B,false)}if(this.hideBorders===true){B.border=(B.border===true)}},remove:function(D,F){var E=this.getComponent(D);if(E&&this.fireEvent("beforeremove",this,E)!==false){this.items.remove(E);delete E.ownerCt;if(F===true||(F!==false&&this.autoDestroy)){E.destroy()}if(this.layout&&this.layout.activeItem==E){delete this.layout.activeItem}this.fireEvent("remove",this,E)}return E},getComponent:function(B){if(typeof B=="object"){return B}return this.items.get(B)},lookupComponent:function(B){if(typeof B=="string"){return Ext.ComponentMgr.get(B)}else{if(!B.events){return this.createComponent(B)}}return B},createComponent:function(B){return Ext.ComponentMgr.create(B,this.defaultType)},doLayout:function(H){if(this.rendered&&this.layout){this.layout.layout()}if(H!==false&&this.items){var I=this.items.items;for(var J=0,F=I.length;J<F;J++){var G=I[J];if(G.doLayout){G.doLayout()}}}},getLayout:function(){if(!this.layout){var B=new Ext.layout.ContainerLayout(this.layoutConfig);this.setLayout(B)}return this.layout},onDestroy:function(){if(this.items){var E=this.items.items;for(var F=0,D=E.length;F<D;F++){Ext.destroy(E[F])}}if(this.monitorResize){Ext.EventManager.removeResizeListener(this.doLayout,this)}Ext.Container.superclass.onDestroy.call(this)},bubble:function(G,H,E){var F=this;while(F){if(G.apply(H||F,E||[F])===false){break}F=F.ownerCt}},cascade:function(H,I,L){if(H.apply(I||this,L||[this])!==false){if(this.items){var J=this.items.items;for(var K=0,G=J.length;K<G;K++){if(J[K].cascade){J[K].cascade(H,I,L)}else{H.apply(I||this,L||[J[K]])}}}}},findById:function(E){var D,F=this;this.cascade(function(A){if(F!=A&&A.id===E){D=A;return false}});return D||null},findByType:function(B){return typeof B=="function"?this.findBy(function(A){return A.constructor===B}):this.findBy(function(A){return A.constructor.xtype===B})},find:function(D,C){return this.findBy(function(A){return A[D]===C})},findBy:function(F,G){var E=[],H=this;this.cascade(function(A){if(H!=A&&F.call(G||A,A,H)===true){E.push(A)}});return E}});Ext.Container.LAYOUTS={};Ext.reg("container",Ext.Container);Ext.layout.ContainerLayout=function(B){Ext.apply(this,B)};Ext.layout.ContainerLayout.prototype={monitorResize:false,activeItem:null,layout:function(){var B=this.container.getLayoutTarget();this.onLayout(this.container,B);this.container.fireEvent("afterlayout",this.container,this)},onLayout:function(C,D){this.renderAll(C,D)},isValidParent:function(E,F){var D=E.getPositionEl?E.getPositionEl():E.getEl();return D.dom.parentNode==F.dom},renderAll:function(J,I){var L=J.items.items;for(var K=0,G=L.length;K<G;K++){var H=L[K];if(H&&(!H.rendered||!this.isValidParent(H,I))){this.renderItem(H,K,I)}}},renderItem:function(F,E,G){if(F&&!F.rendered){F.render(G,E);if(this.extraCls){var H=F.getPositionEl?F.getPositionEl():F;H.addClass(this.extraCls)}if(this.renderHidden&&F!=this.activeItem){F.hide()}}else{if(F&&!this.isValidParent(F,G)){if(this.extraCls){F.addClass(this.extraCls)}if(typeof E=="number"){E=G.dom.childNodes[E]}G.dom.insertBefore(F.getEl().dom,E||null);if(this.renderHidden&&F!=this.activeItem){F.hide()}}}},onResize:function(){if(this.container.collapsed){return }var B=this.container.bufferResize;if(B){if(!this.resizeTask){this.resizeTask=new Ext.util.DelayedTask(this.layout,this);this.resizeBuffer=typeof B=="number"?B:100}this.resizeTask.delay(this.resizeBuffer)}else{this.layout()}},setContainer:function(B){if(this.monitorResize&&B!=this.container){if(this.container){this.container.un("resize",this.onResize,this)}if(B){B.on("resize",this.onResize,this)}}this.container=B},parseMargins:function(F){var E=F.split(" ");var D=E.length;if(D==1){E[1]=E[0];E[2]=E[0];E[3]=E[0]}if(D==2){E[2]=E[0];E[3]=E[1]}return{top:parseInt(E[0],10)||0,right:parseInt(E[1],10)||0,bottom:parseInt(E[2],10)||0,left:parseInt(E[3],10)||0}}};Ext.Container.LAYOUTS.auto=Ext.layout.ContainerLayout;Ext.layout.FitLayout=Ext.extend(Ext.layout.ContainerLayout,{monitorResize:true,onLayout:function(C,D){Ext.layout.FitLayout.superclass.onLayout.call(this,C,D);if(!this.container.collapsed){this.setItemSize(this.activeItem||C.items.itemAt(0),D.getStyleSize())}},setItemSize:function(D,C){if(D&&C.height>0){D.setSize(C)}}});Ext.Container.LAYOUTS.fit=Ext.layout.FitLayout;Ext.layout.CardLayout=Ext.extend(Ext.layout.FitLayout,{deferredRender:false,renderHidden:true,setActiveItem:function(B){B=this.container.getComponent(B);if(this.activeItem!=B){if(this.activeItem){this.activeItem.hide()}this.activeItem=B;B.show();this.layout()}},renderAll:function(C,D){if(this.deferredRender){this.renderItem(this.activeItem,undefined,D)}else{Ext.layout.CardLayout.superclass.renderAll.call(this,C,D)}}});Ext.Container.LAYOUTS.card=Ext.layout.CardLayout;Ext.layout.AnchorLayout=Ext.extend(Ext.layout.ContainerLayout,{monitorResize:true,getAnchorViewSize:function(C,D){return D.dom==document.body?D.getViewSize():D.getStyleSize()},onLayout:function(c,Z){Ext.layout.AnchorLayout.superclass.onLayout.call(this,c,Z);var T=this.getAnchorViewSize(c,Z);var V=T.width,d=T.height;if(V<20||d<20){return }var R,X;if(c.anchorSize){if(typeof c.anchorSize=="number"){R=c.anchorSize}else{R=c.anchorSize.width;X=c.anchorSize.height}}else{R=c.initialConfig.width;X=c.initialConfig.height}var a=c.items.items,b=a.length,P,Y,W,Q,S;for(P=0;P<b;P++){Y=a[P];if(Y.anchor){W=Y.anchorSpec;if(!W){var U=Y.anchor.split(" ");Y.anchorSpec=W={right:this.parseAnchor(U[0],Y.initialConfig.width,R),bottom:this.parseAnchor(U[1],Y.initialConfig.height,X)}}Q=W.right?this.adjustWidthAnchor(W.right(V),Y):undefined;S=W.bottom?this.adjustHeightAnchor(W.bottom(d),Y):undefined;if(Q||S){Y.setSize(Q||undefined,S||undefined)}}}},parseAnchor:function(L,H,G){if(L&&L!="none"){var J;if(/^(r|right|b|bottom)$/i.test(L)){var I=G-H;return function(A){if(A!==J){J=A;return A-I}}}else{if(L.indexOf("%")!=-1){var K=parseFloat(L.replace("%",""))*0.01;return function(A){if(A!==J){J=A;return Math.floor(A*K)}}}else{L=parseInt(L,10);if(!isNaN(L)){return function(A){if(A!==J){J=A;return A+L}}}}}}return false},adjustWidthAnchor:function(D,C){return D},adjustHeightAnchor:function(D,C){return D}});Ext.Container.LAYOUTS.anchor=Ext.layout.AnchorLayout;Ext.layout.ColumnLayout=Ext.extend(Ext.layout.ContainerLayout,{monitorResize:true,extraCls:"x-column",scrollOffset:0,isValidParent:function(D,C){return D.getEl().dom.parentNode==this.innerCt.dom},onLayout:function(L,S){var K=L.items.items,T=K.length,R,N;if(!this.innerCt){S.addClass("x-column-layout-ct");this.innerCt=S.createChild({cls:"x-column-inner"});this.innerCt.createChild({cls:"x-clear"})}this.renderAll(L,this.innerCt);var O=S.getViewSize();if(O.width<1&&O.height<1){return }var Q=O.width-S.getPadding("lr")-this.scrollOffset,M=O.height-S.getPadding("tb"),P=Q;this.innerCt.setWidth(Q);for(N=0;N<T;N++){R=K[N];if(!R.columnWidth){P-=(R.getSize().width+R.getEl().getMargins("lr"))}}P=P<0?0:P;for(N=0;N<T;N++){R=K[N];if(R.columnWidth){R.setSize(Math.floor(R.columnWidth*P)-R.getEl().getMargins("lr"))}}}});Ext.Container.LAYOUTS.column=Ext.layout.ColumnLayout;Ext.layout.BorderLayout=Ext.extend(Ext.layout.ContainerLayout,{monitorResize:true,rendered:false,onLayout:function(w,Y){var v;if(!this.rendered){Y.position();Y.addClass("x-border-layout-ct");var l=w.items.items;v=[];for(var g=0,e=l.length;g<e;g++){var b=l[g];var s=b.region;if(b.collapsed){v.push(b)}b.collapsed=false;if(!b.rendered){b.cls=b.cls?b.cls+" x-border-panel":"x-border-panel";b.render(Y,g)}this[s]=s!="center"&&b.split?new Ext.layout.BorderLayout.SplitRegion(this,b.initialConfig,s):new Ext.layout.BorderLayout.Region(this,b.initialConfig,s);this[s].render(Y,b)}this.rendered=true}var m=Y.getViewSize();if(m.width<20||m.height<20){if(v){this.restoreCollapsed=v}return }else{if(this.restoreCollapsed){v=this.restoreCollapsed;delete this.restoreCollapsed}}var o=m.width,d=m.height;var p=o,h=d,r=0,q=0;var k=this.north,n=this.south,t=this.west,c=this.east,b=this.center;if(!b){throw"No center region defined in BorderLayout "+w.id}if(k&&k.isVisible()){var Z=k.getSize();var i=k.getMargins();Z.width=o-(i.left+i.right);Z.x=i.left;Z.y=i.top;r=Z.height+Z.y+i.bottom;h-=r;k.applyLayout(Z)}if(n&&n.isVisible()){var Z=n.getSize();var i=n.getMargins();Z.width=o-(i.left+i.right);Z.x=i.left;var a=(Z.height+i.top+i.bottom);Z.y=d-a+i.top;h-=a;n.applyLayout(Z)}if(t&&t.isVisible()){var Z=t.getSize();var i=t.getMargins();Z.height=h-(i.top+i.bottom);Z.x=i.left;Z.y=r+i.top;var x=(Z.width+i.left+i.right);q+=x;p-=x;t.applyLayout(Z)}if(c&&c.isVisible()){var Z=c.getSize();var i=c.getMargins();Z.height=h-(i.top+i.bottom);var x=(Z.width+i.left+i.right);Z.x=o-x+i.left;Z.y=r+i.top;p-=x;c.applyLayout(Z)}var i=b.getMargins();var u={x:q+i.left,y:r+i.top,width:p-(i.left+i.right),height:h-(i.top+i.bottom)};b.applyLayout(u);if(v){for(var g=0,e=v.length;g<e;g++){v[g].collapse(false)}}if(Ext.isIE&&Ext.isStrict){Y.repaint()}}});Ext.layout.BorderLayout.Region=function(F,D,E){Ext.apply(this,D);this.layout=F;this.position=E;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||{},E=="north"||E=="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(H,G){this.panel=G;G.el.enableDisplayMode();this.targetEl=H;this.el=G.el;var E=G.getState,F=this.position;G.getState=function(){return Ext.apply(E.call(G)||{},this.state)}.createDelegate(this);if(F!="center"){G.allowQueuedExpand=false;G.on({beforecollapse:this.beforeCollapse,collapse:this.onCollapse,beforeexpand:this.beforeExpand,expand:this.onExpand,hide:this.onHide,show:this.onShow,scope:this});if(this.collapsible){G.collapseEl="el";G.slideAnchor=this.getSlideAnchor()}if(G.tools&&G.tools.toggle){G.tools.toggle.addClass("x-tool-collapse-"+F);G.tools.toggle.addClassOnOver("x-tool-collapse-"+F+"-over")}}},getCollapsedEl:function(){if(!this.collapsedEl){if(!this.toolTemplate){var D=new Ext.Template('<div class="x-tool x-tool-{id}">&#160;</div>');D.disableFormats=true;D.compile();Ext.layout.BorderLayout.Region.prototype.toolTemplate=D}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 C=this.toolTemplate.append(this.collapsedEl.dom,{id:"expand-"+this.position},true);C.addClassOnOver("x-tool-expand-"+this.position+"-over");C.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(B){if(this.isSlid){this.afterSlideIn();this.panel.expand(false)}else{this.panel.expand()}},onCollapseClick:function(B){this.panel.collapse()},beforeCollapse:function(D,C){this.lastAnim=C;if(this.splitEl){this.splitEl.hide()}this.getCollapsedEl().show();this.panel.el.setStyle("z-index",100);this.isCollapsed=true;this.layout.layout()},onCollapse:function(B){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(C){var D=this.getCollapsedEl();this.el.show();if(this.position=="east"||this.position=="west"){this.panel.setSize(undefined,D.getHeight())}else{this.panel.setSize(D.getWidth(),undefined)}D.hide();D.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(B){if(this.isSlid){B.stopPropagation();this.slideIn()}else{B.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(B){this.panel=B},getMinWidth:function(){return this.minWidth},getMinHeight:function(){return this.minHeight},applyLayoutCollapsed:function(C){var D=this.getCollapsedEl();D.setLeftTop(C.x,C.y);D.setSize(C.width,C.height)},applyLayout:function(B){if(this.isCollapsed){this.applyLayoutCollapsed(B)}else{this.panel.setPosition(B.x,B.y);this.panel.setSize(B.width,B.height)}},beforeSlide:function(){this.panel.beforeEffect()},afterSlide:function(){this.panel.afterEffect()},initAutoHide:function(){if(this.autoHide!==false){if(!this.autoHideHd){var B=new Ext.util.DelayedTask(this.slideIn,this);this.autoHideHd={mouseout:function(A){if(!A.within(this.el,true)){B.delay(500)}},mouseover:function(A){B.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 B=this.panel.tools;if(B&&B.toggle){B.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);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.el.dom.style.left=this.restoreLT[0];this.el.dom.style.top=this.restoreLT[1];var B=this.panel.tools;if(B&&B.toggle){B.toggle.show()}},slideIn:function(B){if(!this.isSlid||this.el.hasActiveFx()){Ext.callback(B);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(B)},scope:this,block:true})}else{this.el.hide();this.afterSlideIn()}},slideInIf:function(B){if(!B.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 B=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 D=this.collapsedEl,C=this.cmargins;switch(this.position){case"west":return[-(C.right+D.getWidth()+C.left),0];break;case"east":return[C.right+D.getWidth()+C.left,0];break;case"north":return[0,-(C.top+C.bottom+D.getHeight())];break;case"south":return[0,C.top+C.bottom+D.getHeight()];break}}};Ext.layout.BorderLayout.SplitRegion=function(F,D,E){Ext.layout.BorderLayout.SplitRegion.superclass.constructor.call(this,F,D,E);this.applyLayout=this.applyFns[E]};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(G){if(this.isCollapsed){return this.applyLayoutCollapsed(G)}var F=this.splitEl.dom,H=F.style;this.panel.setPosition(G.x,G.y);var E=F.offsetWidth;H.left=(G.x+G.width-E)+"px";H.top=(G.y)+"px";H.height=Math.max(0,G.height)+"px";this.panel.setSize(G.width-E,G.height)},east:function(G){if(this.isCollapsed){return this.applyLayoutCollapsed(G)}var F=this.splitEl.dom,H=F.style;var E=F.offsetWidth;this.panel.setPosition(G.x+E,G.y);H.left=(G.x)+"px";H.top=(G.y)+"px";H.height=Math.max(0,G.height)+"px";this.panel.setSize(G.width-E,G.height)},north:function(G){if(this.isCollapsed){return this.applyLayoutCollapsed(G)}var F=this.splitEl.dom,H=F.style;var E=F.offsetHeight;this.panel.setPosition(G.x,G.y);H.left=(G.x)+"px";H.top=(G.y+G.height-E)+"px";H.width=Math.max(0,G.width)+"px";this.panel.setSize(G.width,G.height-E)},south:function(G){if(this.isCollapsed){return this.applyLayoutCollapsed(G)}var F=this.splitEl.dom,H=F.style;var E=F.offsetHeight;this.panel.setPosition(G.x,G.y+E);H.left=(G.x)+"px";H.top=(G.y)+"px";H.width=Math.max(0,G.width)+"px";this.panel.setSize(G.width,G.height-E)}},render:function(E,G){Ext.layout.BorderLayout.SplitRegion.superclass.render.call(this,E,G);var F=this.position;this.splitEl=E.createChild({cls:"x-layout-split x-layout-split-"+F,html:"&#160;",id:this.panel.id+"-xsplit"});if(this.collapseMode=="mini"){this.miniSplitEl=this.splitEl.createChild({cls:"x-layout-mini x-layout-mini-"+F,html:"&#160;"});this.miniSplitEl.addClassOnOver("x-layout-mini-over");this.miniSplitEl.on("click",this.onCollapseClick,this,{stopEvent:true})}var H=this.splitSettings[F];this.split=new Ext.SplitBar(this.splitEl.dom,G.el,H.orientation);this.split.placement=H.placement;this.split.getMaximumSize=this[H.maxFn].createDelegate(this);this.split.minSize=this.minSize||this[H.minProp];this.split.on("beforeapply",this.onSplitMove,this);this.split.useShim=this.useShim===true;this.maxSize=this.maxSize||this[H.maxProp];if(G.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 B=this.panel.getSize();if(this.position=="north"||this.position=="south"){B.height+=this.splitEl.dom.offsetHeight}else{B.width+=this.splitEl.dom.offsetWidth}return B},getHMaxSize:function(){var D=this.maxSize||10000;var C=this.layout.center;return Math.min(D,(this.el.getWidth()+C.el.getWidth())-C.getMinWidth())},getVMaxSize:function(){var D=this.maxSize||10000;var C=this.layout.center;return Math.min(D,(this.el.getHeight()+C.el.getHeight())-C.getMinHeight())},onSplitMove:function(F,D){var E=this.panel.getSize();this.lastSplitSize=D;if(this.position=="north"||this.position=="south"){this.panel.setSize(E.width,D);this.state.height=D}else{this.panel.setSize(D,E.height);this.state.width=D}this.layout.layout();this.panel.saveState();return false},getSplitBar:function(){return this.split}});Ext.Container.LAYOUTS.border=Ext.layout.BorderLayout;Ext.layout.FormLayout=Ext.extend(Ext.layout.AnchorLayout,{labelSeparator:":",getAnchorViewSize:function(C,D){return C.body.getStyleSize()},setContainer:function(F){Ext.layout.FormLayout.superclass.setContainer.call(this,F);if(F.labelAlign){F.addClass("x-form-label-"+F.labelAlign)}if(F.hideLabels){this.labelStyle="display:none";this.elementStyle="padding-left:0;";this.labelAdjust=0}else{this.labelSeparator=F.labelSeparator||this.labelSeparator;F.labelWidth=F.labelWidth||100;if(typeof F.labelWidth=="number"){var E=(typeof F.labelPad=="number"?F.labelPad:5);this.labelAdjust=F.labelWidth+E;this.labelStyle="width:"+F.labelWidth+"px;";this.elementStyle="padding-left:"+(F.labelWidth+E)+"px"}if(F.labelAlign=="top"){this.labelStyle="width:auto;";this.labelAdjust=0;this.elementStyle="padding-left:0;"}}if(!this.fieldTpl){var D=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>");D.disableFormats=true;D.compile();Ext.layout.FormLayout.prototype.fieldTpl=D}},renderItem:function(F,E,G){if(F&&!F.rendered&&F.isFormField&&F.inputType!="hidden"){var H=[F.id,F.fieldLabel,F.labelStyle||this.labelStyle||"",this.elementStyle||"",typeof F.labelSeparator=="undefined"?this.labelSeparator:F.labelSeparator,(F.itemCls||this.container.itemCls||"")+(F.hideLabel?" x-hide-label":""),F.clearCls||"x-form-clear-left"];if(typeof E=="number"){E=G.dom.childNodes[E]||null}if(E){this.fieldTpl.insertBefore(E,H)}else{this.fieldTpl.append(G,H)}F.render("x-form-el-"+F.id)}else{Ext.layout.FormLayout.superclass.renderItem.apply(this,arguments)}},adjustWidthAnchor:function(D,C){return D-(C.isFormField?(C.hideLabel?0:this.labelAdjust):0)},isValidParent:function(D,C){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(B){if(this.animate===false){B.animCollapse=false}B.collapsible=true;if(this.autoWidth){B.autoWidth=true}if(this.titleCollapse){B.titleCollapse=true}if(this.hideCollapseTool){B.hideCollapseTool=true}if(this.collapseFirst!==undefined){B.collapseFirst=this.collapseFirst}if(!this.activeItem&&!B.collapsed){this.activeItem=B}else{if(this.activeItem){B.collapsed=true}}Ext.layout.Accordion.superclass.renderItem.apply(this,arguments);B.header.addClass("x-accordion-hd");B.on("beforeexpand",this.beforeExpand,this)},beforeExpand:function(E,F){var D=this.activeItem;if(D){if(this.sequence){delete this.activeItem;if(!D.collapsed){D.collapse({callback:function(){E.expand(F||true)},scope:this});return false}}else{D.collapse(this.animate)}}this.activeItem=E;if(this.activeOnTop){E.el.dom.parentNode.insertBefore(E.el.dom,E.el.dom.parentNode.firstChild)}this.layout()},setItemSize:function(J,K){if(this.fill&&J){var N=this.container.items.items;var L=0;for(var M=0,H=N.length;M<H;M++){var I=N[M];if(I!=J){L+=(I.getSize().height-I.bwrap.getHeight())}}K.height-=L;J.setSize(K)}}});Ext.Container.LAYOUTS.accordion=Ext.layout.Accordion;Ext.layout.TableLayout=Ext.extend(Ext.layout.ContainerLayout,{monitorResize:false,setContainer:function(B){Ext.layout.TableLayout.superclass.setContainer.call(this,B);this.currentRow=0;this.currentColumn=0;this.cells=[]},onLayout:function(K,I){var J=K.items.items,G=J.length,H,L;if(!this.table){I.addClass("x-table-layout-ct");this.table=I.createChild({tag:"table",cls:"x-table-layout",cellspacing:0,cn:{tag:"tbody"}},null,true);this.renderAll(K,I)}},getRow:function(C){var D=this.table.tBodies[0].childNodes[C];if(!D){D=document.createElement("tr");this.table.tBodies[0].appendChild(D)}return D},getNextCell:function(J){var I=this.getNextNonSpan(this.currentColumn,this.currentRow);var M=this.currentColumn=I[0],N=this.currentRow=I[1];for(var K=N;K<N+(J.rowspan||1);K++){if(!this.cells[K]){this.cells[K]=[]}for(var O=M;O<M+(J.colspan||1);O++){this.cells[K][O]=true}}var L=document.createElement("td");if(J.cellId){L.id=J.cellId}var P="x-table-layout-cell";if(J.cellCls){P+=" "+J.cellCls}L.className=P;if(J.colspan){L.colSpan=J.colspan}if(J.rowspan){L.rowSpan=J.rowspan}this.getRow(N).appendChild(L);return L},getNextNonSpan:function(D,E){var F=this.columns;while((F&&D>=F)||(this.cells[E]&&this.cells[E][D])){if(F&&D>=F){E++;D=0}else{D++}}return[D,E]},renderItem:function(E,D,F){if(E&&!E.rendered){E.render(this.getNextCell(E))}},isValidParent:function(D,C){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(B){Ext.layout.AbsoluteLayout.superclass.setContainer.call(this,B);if(B.isXType("form")){this.isForm=true}},onLayout:function(C,D){if(this.isForm){C.body.position()}else{D.position()}Ext.layout.AbsoluteLayout.superclass.onLayout.call(this,C,D)},getAnchorViewSize:function(C,D){return this.isForm?C.body.getStyleSize():Ext.layout.AbsoluteLayout.superclass.getAnchorViewSize.call(this,C,D)},isValidParent:function(D,C){return this.isForm?true:Ext.layout.AbsoluteLayout.superclass.isValidParent.call(this,D,C)},adjustWidthAnchor:function(D,C){return D?D-C.getPosition(true)[0]:D},adjustHeightAnchor:function(D,C){return D?D-C.getPosition(true)[1]:D}});Ext.Container.LAYOUTS.absolute=Ext.layout.AbsoluteLayout;Ext.Viewport=Ext.extend(Ext.Container,{initComponent:function(){Ext.Viewport.superclass.initComponent.call(this);document.getElementsByTagName("html")[0].className+=" x-viewport";this.el=Ext.getBody();this.el.setHeight=Ext.emptyFn;this.el.setWidth=Ext.emptyFn;this.el.setSize=Ext.emptyFn;this.el.dom.scroll="no";this.allowDomMove=false;this.autoWidth=true;this.autoHeight=true;Ext.EventManager.onWindowResize(this.fireResize,this);this.renderTo=this.el},fireResize:function(C,D){this.fireEvent("resize",this,C,D,C,D)}});Ext.reg("viewport",Ext.Viewport);Ext.Panel=Ext.extend(Ext.Container,{baseCls:"x-panel",collapsedCls:"x-panel-collapsed",maskDisabled:true,animCollapse:Ext.enableFx,headerAsText:true,buttonAlign:"right",collapsed:false,collapseFirst:true,minButtonWidth:75,elements:"body",toolTarget:"header",collapseEl:"bwrap",slideAnchor:"t",deferHeight:true,expandDefaults:{duration:0.25},collapseDefaults:{duration:0.25},initComponent:function(){Ext.Panel.superclass.initComponent.call(this);this.addEvents("bodyresize","titlechange","collapse","expand","beforecollapse","beforeexpand","beforeclose","close","activate","deactivate");if(this.tbar){this.elements+=",tbar";if(typeof this.tbar=="object"){this.topToolbar=this.tbar}delete this.tbar}if(this.bbar){this.elements+=",bbar";if(typeof this.bbar=="object"){this.bottomToolbar=this.bbar}delete this.bbar}if(this.header===true){this.elements+=",header";delete this.header}else{if(this.title&&this.header!==false){this.elements+=",header"}}if(this.footer===true){this.elements+=",footer";delete this.footer}if(this.buttons){var E=this.buttons;this.buttons=[];for(var F=0,D=E.length;F<D;F++){if(E[F].render){this.buttons.push(E[F])}else{this.addButton(E[F])}}}if(this.autoLoad){this.on("render",this.doAutoLoad,this,{delay:10})}},createElement:function(D,E){if(this[D]){E.appendChild(this[D].dom);return }if(D==="bwrap"||this.elements.indexOf(D)!=-1){if(this[D+"Cfg"]){this[D]=Ext.fly(E).createChild(this[D+"Cfg"])}else{var F=document.createElement("div");F.className=this[D+"Cls"];this[D]=Ext.get(E.appendChild(F))}}},onRender:function(c,d){Ext.Panel.superclass.onRender.call(this,c,d);this.createClasses();if(this.el){this.el.addClass(this.baseCls);this.header=this.el.down("."+this.headerCls);this.bwrap=this.el.down("."+this.bwrapCls);var X=this.bwrap?this.bwrap:this.el;this.tbar=X.down("."+this.tbarCls);this.body=X.down("."+this.bodyCls);this.bbar=X.down("."+this.bbarCls);this.footer=X.down("."+this.footerCls);this.fromMarkup=true}else{this.el=c.createChild({id:this.id,cls:this.baseCls},d)}var T=this.el,Z=T.dom;if(this.cls){this.el.addClass(this.cls)}if(this.buttons){this.elements+=",footer"}if(this.frame){T.insertHtml("afterBegin",String.format(Ext.Element.boxMarkup,this.baseCls));this.createElement("header",Z.firstChild.firstChild.firstChild);this.createElement("bwrap",Z);var V=this.bwrap.dom;var g=Z.childNodes[1],S=Z.childNodes[2];V.appendChild(g);V.appendChild(S);var U=V.firstChild.firstChild.firstChild;this.createElement("tbar",U);this.createElement("body",U);this.createElement("bbar",U);this.createElement("footer",V.lastChild.firstChild.firstChild);if(!this.footer){this.bwrap.dom.lastChild.className+=" x-panel-nofooter"}}else{this.createElement("header",Z);this.createElement("bwrap",Z);var V=this.bwrap.dom;this.createElement("tbar",V);this.createElement("body",V);this.createElement("bbar",V);this.createElement("footer",V);if(!this.header){this.body.addClass(this.bodyCls+"-noheader");if(this.tbar){this.tbar.addClass(this.tbarCls+"-noheader")}}}if(this.border===false){this.el.addClass(this.baseCls+"-noborder");this.body.addClass(this.bodyCls+"-noborder");if(this.header){this.header.addClass(this.headerCls+"-noborder")}if(this.footer){this.footer.addClass(this.footerCls+"-noborder")}if(this.tbar){this.tbar.addClass(this.tbarCls+"-noborder")}if(this.bbar){this.bbar.addClass(this.bbarCls+"-noborder")}}if(this.bodyBorder===false){this.body.addClass(this.bodyCls+"-noborder")}if(this.bodyStyle){this.body.applyStyles(this.bodyStyle)}this.bwrap.enableDisplayMode("block");if(this.header){this.header.unselectable();if(this.headerAsText){this.header.dom.innerHTML='<span class="'+this.headerTextCls+'">'+this.header.dom.innerHTML+"</span>";if(this.iconCls){this.setIconClass(this.iconCls)}}}if(this.floating){this.makeFloating(this.floating)}if(this.collapsible){this.tools=this.tools?this.tools.slice(0):[];if(!this.hideCollapseTool){this.tools[this.collapseFirst?"unshift":"push"]({id:"toggle",handler:this.toggleCollapse,scope:this})}if(this.titleCollapse&&this.header){this.header.on("click",this.toggleCollapse,this);this.header.setStyle("cursor","pointer")}}if(this.tools){var a=this.tools;this.tools={};this.addTool.apply(this,a)}else{this.tools={}}if(this.buttons&&this.buttons.length>0){var Q=this.footer.createChild({cls:"x-panel-btns-ct",cn:{cls:"x-panel-btns x-panel-btns-"+this.buttonAlign,html:'<table cellspacing="0"><tbody><tr></tr></tbody></table><div class="x-clear"></div>'}},null,true);var Y=Q.getElementsByTagName("tr")[0];for(var e=0,b=this.buttons.length;e<b;e++){var W=this.buttons[e];var R=document.createElement("td");R.className="x-panel-btn-td";W.render(Y.appendChild(R))}}if(this.tbar&&this.topToolbar){if(Ext.isArray(this.topToolbar)){this.topToolbar=new Ext.Toolbar(this.topToolbar)}this.topToolbar.render(this.tbar);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(H){var E=this.iconCls;this.iconCls=H;if(this.rendered&&this.header){if(this.frame){this.header.addClass("x-panel-icon");this.header.replaceClass(E,this.iconCls)}else{var F=this.header.dom;var G=F.firstChild&&String(F.firstChild.tagName).toLowerCase()=="img"?F.firstChild:null;if(G){Ext.fly(G).replaceClass(E,this.iconCls)}else{Ext.DomHelper.insertBefore(F.firstChild,{tag:"img",src:Ext.BLANK_IMAGE_URL,cls:"x-panel-inline-icon "+this.iconCls})}}}},makeFloating:function(B){this.floating=true;this.el=new Ext.Layer(typeof B=="object"?B:{shadow:this.shadow!==undefined?this.shadow:"sides",shadowOffset:this.shadowOffset,constrain:false,shim:this.shim===false?false:undefined},this.el)},getTopToolbar:function(){return this.topToolbar},getBottomToolbar:function(){return this.bottomToolbar},addButton:function(F,H,I){var G={handler:H,scope:I,minWidth:this.minButtonWidth,hideParent:true};if(typeof F=="string"){G.text=F}else{Ext.apply(G,F)}var J=new Ext.Button(G);J.ownerCt=this;if(!this.buttons){this.buttons=[]}this.buttons.push(J);return J},addTool:function(){if(!this[this.toolTarget]){return }if(!this.toolTemplate){var J=new Ext.Template('<div class="x-tool x-tool-{id}">&#160;</div>');J.disableFormats=true;J.compile();Ext.Panel.prototype.toolTemplate=J}for(var K=0,M=arguments,N=M.length;K<N;K++){var H=M[K],I="x-tool-"+H.id+"-over";var L=this.toolTemplate.insertFirst((H.align!=="left")?this[this.toolTarget]:this[this.toolTarget].child("span"),H,true);this.tools[H.id]=L;L.enableDisplayMode("block");L.on("click",this.createToolHandler(L,H,I,this));if(H.on){L.on(H.on)}if(H.hidden){L.hide()}if(H.qtip){if(typeof H.qtip=="object"){Ext.QuickTips.register(Ext.apply({target:L.id},H.qtip))}else{L.dom.qtip=H.qtip}}L.addClassOnOver(I)}},onShow:function(){if(this.floating){return this.el.show()}Ext.Panel.superclass.onShow.call(this)},onHide:function(){if(this.floating){return this.el.hide()}Ext.Panel.superclass.onHide.call(this)},createToolHandler:function(G,E,F,H){return function(A){G.removeClass(F);A.stopEvent();if(E.handler){E.handler.call(E.scope||G,A,G,H)}}},afterRender:function(){if(this.fromMarkup&&this.height===undefined&&!this.autoHeight){this.height=this.el.getHeight()}if(this.floating&&!this.hidden&&!this.initHidden){this.el.show()}if(this.title){this.setTitle(this.title)}this.setAutoScroll();if(this.html){this.body.update(typeof this.html=="object"?Ext.DomHelper.markup(this.html):this.html);delete this.html}if(this.contentEl){var B=Ext.getDom(this.contentEl);Ext.fly(B).removeClass(["x-hidden","x-hide-display"]);this.body.dom.appendChild(B)}if(this.collapsed){this.collapsed=false;this.collapse(false)}Ext.Panel.superclass.afterRender.call(this);this.initEvents()},setAutoScroll:function(){if(this.rendered&&this.autoScroll){this.body.setOverflow("auto")}},getKeyMap:function(){if(!this.keyMap){this.keyMap=new Ext.KeyMap(this.el,this.keys)}return this.keyMap},initEvents:function(){if(this.keys){this.getKeyMap()}if(this.draggable){this.initDraggable()}},initDraggable:function(){this.dd=new Ext.Panel.DD(this,typeof this.draggable=="boolean"?null:this.draggable)},beforeEffect:function(){if(this.floating){this.el.beforeAction()}this.el.addClass("x-panel-animated")},afterEffect:function(){this.syncShadow();this.el.removeClass("x-panel-animated")},createEffect:function(H,E,G){var F={scope:G,block:true};if(H===true){F.callback=E;return F}else{if(!H.callback){F.callback=E}else{F.callback=function(){E.call(G);Ext.callback(H.callback,H.scope)}}}return Ext.applyIf(F,H)},collapse:function(D){if(this.collapsed||this.el.hasFxBlock()||this.fireEvent("beforecollapse",this,D)===false){return }var C=D===true||(D!==false&&this.animCollapse);this.beforeEffect();this.onCollapse(C,D);return this},onCollapse:function(C,D){if(C){this[this.collapseEl].slideOut(this.slideAnchor,Ext.apply(this.createEffect(D||true,this.afterCollapse,this),this.collapseDefaults))}else{this[this.collapseEl].hide();this.afterCollapse()}},afterCollapse:function(){this.collapsed=true;this.el.addClass(this.collapsedCls);this.afterEffect();this.fireEvent("collapse",this)},expand:function(D){if(!this.collapsed||this.el.hasFxBlock()||this.fireEvent("beforeexpand",this,D)===false){return }var C=D===true||(D!==false&&this.animCollapse);this.el.removeClass(this.collapsedCls);this.beforeEffect();this.onExpand(C,D);return this},onExpand:function(C,D){if(C){this[this.collapseEl].slideIn(this.slideAnchor,Ext.apply(this.createEffect(D||true,this.afterExpand,this),this.expandDefaults))}else{this[this.collapseEl].show();this.afterExpand()}},afterExpand:function(){this.collapsed=false;this.afterEffect();this.fireEvent("expand",this)},toggleCollapse:function(B){this[this.collapsed?"expand":"collapse"](B);return this},onDisable:function(){if(this.rendered&&this.maskDisabled){this.el.mask()}Ext.Panel.superclass.onDisable.call(this)},onEnable:function(){if(this.rendered&&this.maskDisabled){this.el.unmask()}Ext.Panel.superclass.onEnable.call(this)},onResize:function(C,D){if(C!==undefined||D!==undefined){if(!this.collapsed){if(typeof C=="number"){this.body.setWidth(this.adjustBodyWidth(C-this.getFrameWidth()))}else{if(C=="auto"){this.body.setWidth(C)}}if(typeof D=="number"){this.body.setHeight(this.adjustBodyHeight(D-this.getFrameHeight()))}else{if(D=="auto"){this.body.setHeight(D)}}}else{this.queuedBodySize={width:C,height:D};if(!this.queuedExpand&&this.allowQueuedExpand!==false){this.queuedExpand=true;this.on("expand",function(){delete this.queuedExpand;this.onResize(this.queuedBodySize.width,this.queuedBodySize.height);this.doLayout()},this,{single:true})}}this.fireEvent("bodyresize",this,C,D)}this.syncShadow()},adjustBodyHeight:function(B){return B},adjustBodyWidth:function(B){return B},onPosition:function(){this.syncShadow()},onDestroy:function(){if(this.tools){for(var D in this.tools){Ext.destroy(this.tools[D])}}if(this.buttons){for(var C in this.buttons){Ext.destroy(this.buttons[C])}}Ext.destroy(this.topToolbar,this.bottomToolbar);Ext.Panel.superclass.onDestroy.call(this)},getFrameWidth:function(){var F=this.el.getFrameWidth("lr");if(this.frame){var D=this.bwrap.dom.firstChild;F+=(Ext.fly(D).getFrameWidth("l")+Ext.fly(D.firstChild).getFrameWidth("r"));var E=this.bwrap.dom.firstChild.firstChild.firstChild;F+=Ext.fly(E).getFrameWidth("lr")}return F},getFrameHeight:function(){var E=this.el.getFrameWidth("tb");E+=(this.tbar?this.tbar.getHeight():0)+(this.bbar?this.bbar.getHeight():0);if(this.frame){var G=this.el.dom.firstChild;var F=this.bwrap.dom.lastChild;E+=(G.offsetHeight+F.offsetHeight);var H=this.bwrap.dom.firstChild.firstChild.firstChild;E+=Ext.fly(H).getFrameWidth("tb")}else{E+=(this.header?this.header.getHeight():0)+(this.footer?this.footer.getHeight():0)}return E},getInnerWidth:function(){return this.getSize().width-this.getFrameWidth()},getInnerHeight:function(){return this.getSize().height-this.getFrameHeight()},syncShadow:function(){if(this.floating){this.el.sync(true)}},getLayoutTarget:function(){return this.body},setTitle:function(D,C){this.title=D;if(this.header&&this.headerAsText){this.header.child("span").update(D)}if(C){this.setIconClass(C)}this.fireEvent("titlechange",this,D);return this},getUpdater:function(){return this.body.getUpdater()},load:function(){var B=this.body.getUpdater();B.update.apply(B,arguments);return this},beforeDestroy:function(){Ext.Element.uncache(this.header,this.tbar,this.bbar,this.footer,this.body)},createClasses:function(){this.headerCls=this.baseCls+"-header";this.headerTextCls=this.baseCls+"-header-text";this.bwrapCls=this.baseCls+"-bwrap";this.tbarCls=this.baseCls+"-tbar";this.bodyCls=this.baseCls+"-body";this.bbarCls=this.baseCls+"-bbar";this.footerCls=this.baseCls+"-footer"},createGhost:function(F,G,J){var H=document.createElement("div");H.className="x-panel-ghost "+(F?F:"");if(this.header){H.appendChild(this.el.dom.firstChild.cloneNode(true))}Ext.fly(H.appendChild(document.createElement("ul"))).setHeight(this.bwrap.getHeight());H.style.width=this.el.dom.offsetWidth+"px";if(!J){this.container.dom.appendChild(H)}else{Ext.getDom(J).appendChild(H)}if(G!==false&&this.el.useShim!==false){var I=new Ext.Layer({shadow:false,useDisplay:true,constrain:false},H);I.show();return I}else{return new Ext.Element(H)}},doAutoLoad:function(){this.body.load(typeof this.autoLoad=="object"?this.autoLoad:{url:this.autoLoad})}});Ext.reg("panel",Ext.Panel);Ext.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(D,C){Ext.Window.superclass.onRender.call(this,D,C);if(this.plain){this.el.addClass("x-window-plain")}this.focusEl=this.el.createChild({tag:"a",href:"#",cls:"x-dlg-focus",tabIndex:"-1",html:"&#160;"});this.focusEl.swallowEvent("click",true);this.proxy=this.el.createProxy("x-window-proxy");this.proxy.enableDisplayMode("block");if(this.modal){this.mask=this.container.createChild({cls:"ext-el-mask"},this.el.dom);this.mask.enableDisplayMode("block");this.mask.hide()}},initEvents:function(){Ext.Window.superclass.initEvents.call(this);if(this.animateTarget){this.setAnimateTarget(this.animateTarget)}if(this.resizable){this.resizer=new Ext.Resizable(this.el,{minWidth:this.minWidth,minHeight:this.minHeight,handles:this.resizeHandles||"all",pinned:true,resizeElement:this.resizerAction});this.resizer.window=this;this.resizer.on("beforeresize",this.beforeResize,this)}if(this.draggable){this.header.addClass("x-window-draggable")}this.initTools();this.el.on("mousedown",this.toFront,this);this.manager=this.manager||Ext.WindowMgr;this.manager.register(this);this.hidden=true;if(this.maximized){this.maximized=false;this.maximize()}if(this.closable){var B=this.getKeyMap();B.on(27,this.onEsc,this);B.disable()}},initDraggable:function(){this.dd=new Ext.Window.DD(this)},onEsc:function(){this[this.closeAction]()},beforeDestroy:function(){Ext.destroy(this.resizer,this.dd,this.proxy,this.mask);Ext.Window.superclass.beforeDestroy.call(this)},onDestroy:function(){if(this.manager){this.manager.unregister(this)}Ext.Window.superclass.onDestroy.call(this)},initTools:function(){if(this.minimizable){this.addTool({id:"minimize",handler:this.minimize.createDelegate(this,[])})}if(this.maximizable){this.addTool({id:"maximize",handler:this.maximize.createDelegate(this,[])});this.addTool({id:"restore",handler:this.restore.createDelegate(this,[]),hidden:true});this.header.on("dblclick",this.toggleMaximize,this)}if(this.closable){this.addTool({id:"close",handler:this[this.closeAction].createDelegate(this,[])})}},resizerAction:function(){var B=this.proxy.getBox();this.proxy.hide();this.window.handleResize(B);return B},beforeResize:function(){this.resizer.minHeight=Math.max(this.minHeight,this.getFrameHeight()+40);this.resizer.minWidth=Math.max(this.minWidth,this.getFrameWidth()+40);this.resizeBox=this.el.getBox()},updateHandles:function(){if(Ext.isIE&&this.resizer){this.resizer.syncHandleHeight();this.el.repaint()}},handleResize:function(D){var C=this.resizeBox;if(C.x!=D.x||C.y!=D.y){this.updateBox(D)}else{this.setSize(D)}this.focus();this.updateHandles();this.saveState();this.fireEvent("resize",this,D.width,D.height)},focus:function(){var E=this.focusEl,D=this.defaultButton,F=typeof D;if(F!="undefined"){if(F=="number"){E=this.buttons[D]}else{if(F=="string"){E=Ext.getCmp(D)}else{E=D}}}E.focus.defer(10,E)},setAnimateTarget:function(B){B=Ext.get(B);this.animateTarget=B},beforeShow:function(){delete this.el.lastXY;delete this.el.lastLT;if(this.x===undefined||this.y===undefined){var C=this.el.getAlignToXY(this.container,"c-c");var D=this.el.translatePoints(C[0],C[1]);this.x=this.x===undefined?D.left:this.x;this.y=this.y===undefined?D.top:this.y}this.el.setLeftTop(this.x,this.y);if(this.expandOnShow){this.expand(false)}if(this.modal){Ext.getBody().addClass("x-body-masked");this.mask.setSize(Ext.lib.Dom.getViewWidth(true),Ext.lib.Dom.getViewHeight(true));this.mask.show()}},show:function(E,D,F){if(!this.rendered){this.render(Ext.getBody())}if(this.hidden===false){this.toFront();return }if(this.fireEvent("beforeshow",this)===false){return }if(D){this.on("show",D,F,{single:true})}this.hidden=false;if(E!==undefined){this.setAnimateTarget(E)}this.beforeShow();if(this.animateTarget){this.animShow()}else{this.afterShow()}},afterShow:function(){this.proxy.hide();this.el.setStyle("display","block");this.el.show();if(this.maximized){this.fitContainer()}if(Ext.isMac&&Ext.isGecko){this.cascade(this.setAutoScroll)}if(this.monitorResize||this.modal||this.constrain||this.constrainHeader){Ext.EventManager.onWindowResize(this.onWindowResize,this)}this.doConstrain();if(this.layout){this.doLayout()}if(this.keyMap){this.keyMap.enable()}this.toFront();this.updateHandles();this.fireEvent("show",this)},animShow:function(){this.proxy.show();this.proxy.setBox(this.animateTarget.getBox());this.proxy.setOpacity(0);var B=this.getBox(false);B.callback=this.afterShow;B.scope=this;B.duration=0.25;B.easing="easeNone";B.opacity=0.5;B.block=true;this.el.setStyle("display","none");this.proxy.shift(B)},hide:function(E,D,F){if(this.hidden||this.fireEvent("beforehide",this)===false){return }if(D){this.on("hide",D,F,{single:true})}this.hidden=true;if(E!==undefined){this.setAnimateTarget(E)}if(this.animateTarget){this.animHide()}else{this.el.hide();this.afterHide()}},afterHide:function(){this.proxy.hide();if(this.monitorResize||this.modal||this.constrain||this.constrainHeader){Ext.EventManager.removeResizeListener(this.onWindowResize,this)}if(this.modal){this.mask.hide();Ext.getBody().removeClass("x-body-masked")}if(this.keyMap){this.keyMap.disable()}this.fireEvent("hide",this)},animHide:function(){this.proxy.setOpacity(0.5);this.proxy.show();var D=this.getBox(false);this.proxy.setBox(D);this.el.hide();var C=this.animateTarget.getBox();C.callback=this.afterHide;C.scope=this;C.duration=0.25;C.easing="easeNone";C.block=true;C.opacity=0;this.proxy.shift(C)},onWindowResize:function(){if(this.maximized){this.fitContainer()}if(this.modal){this.mask.setSize("100%","100%");var B=this.mask.dom.offsetHeight;this.mask.setSize(Ext.lib.Dom.getViewWidth(true),Ext.lib.Dom.getViewHeight(true))}this.doConstrain()},doConstrain:function(){if(this.constrain||this.constrainHeader){var F;if(this.constrain){F={right:this.el.shadowOffset,left:this.el.shadowOffset,bottom:this.el.shadowOffset}}else{var D=this.getSize();F={right:-(D.width-100),bottom:-(D.height-25)}}var E=this.el.getConstrainToXY(this.container,true,F);if(E){this.setPosition(E[0],E[1])}}},ghost:function(D){var E=this.createGhost(D);var F=this.getBox(true);E.setLeftTop(F.x,F.y);E.setWidth(F.width);this.el.hide();this.activeGhost=E;return E},unghost:function(D,C){if(D!==false){this.el.show();this.focus();if(Ext.isMac&&Ext.isGecko){this.cascade(this.setAutoScroll)}}if(C!==false){this.setPosition(this.activeGhost.getLeft(true),this.activeGhost.getTop(true))}this.activeGhost.hide();this.activeGhost.remove();delete this.activeGhost},minimize:function(){this.fireEvent("minimize",this)},close:function(){if(this.fireEvent("beforeclose",this)!==false){this.hide(null,function(){this.fireEvent("close",this);this.destroy()},this)}},maximize:function(){if(!this.maximized){this.expand(false);this.restoreSize=this.getSize();this.restorePos=this.getPosition(true);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 B=this.container.getViewSize();this.setSize(B.width,B.height)},setZIndex:function(B){if(this.modal){this.mask.setStyle("z-index",B)}this.el.setZIndex(++B);B+=5;if(this.resizer){this.resizer.proxy.setStyle("z-index",++B)}this.lastZIndex=B},alignTo:function(H,E,G){var F=this.el.getAlignToXY(H,E,G);this.setPagePosition(F[0],F[1]);return this},anchorTo:function(M,I,L,N,J){var K=function(){this.alignTo(M,I,L)};Ext.EventManager.onWindowResize(K,this);var H=typeof N;if(H!="undefined"){Ext.EventManager.on(window,"scroll",K,this,{buffer:H=="number"?N:50})}K.call(this);this[J]=K;return this},toFront:function(){if(this.manager.bringToFront(this)){this.focus()}return this},setActive:function(B){if(B){if(!this.maximized){this.el.enableShadow(true)}this.fireEvent("activate",this)}else{this.el.disableShadow();this.fireEvent("deactivate",this)}},toBack:function(){this.manager.sendToBack(this);return this},center:function(){var B=this.el.getAlignToXY(this.container,"c-c");this.setPagePosition(B[0],B[1]);return this}});Ext.reg("window",Ext.Window);Ext.Window.DD=function(B){this.win=B;Ext.Window.DD.superclass.constructor.call(this,B.el.id,"WindowDD-"+B.id);this.setHandleElId(B.header.id);this.scroll=false};Ext.extend(Ext.Window.DD,Ext.dd.DD,{moveOnly:true,headerOffsets:[100,25],startDrag:function(){var D=this.win;this.proxy=D.ghost();if(D.constrain!==false){var E=D.el.shadowOffset;this.constrainTo(D.container,{right:E,left:E,bottom:E})}else{if(D.constrainHeader!==false){var F=this.proxy.getSize();this.constrainTo(D.container,{right:-(F.width-this.headerOffsets[0]),bottom:-(F.height-this.headerOffsets[1])})}}},b4Drag:Ext.emptyFn,onDrag:function(B){this.alignElWithMouse(this.proxy,B.getPageX(),B.getPageY())},endDrag:function(B){this.win.unghost();this.win.saveState()}});Ext.WindowGroup=function(){var J={};var L=[];var K=null;var M=function(A,B){return(!A._lastAccess||A._lastAccess<B._lastAccess)?-1:1};var I=function(){var C=L,E=C.length;if(E>0){C.sort(M);var D=C[0].manager.zseed;for(var B=0;B<E;B++){var A=C[B];if(A&&!A.hidden){A.setZIndex(D+(B*10))}}}H()};var N=function(A){if(A!=K){if(K){K.setActive(false)}K=A;if(A){A.setActive(true)}}};var H=function(){for(var A=L.length-1;A>=0;--A){if(!L[A].hidden){N(L[A]);return }}N(null)};return{zseed:9000,register:function(A){J[A.id]=A;L.push(A);A.on("hide",H)},unregister:function(A){delete J[A.id];A.un("hide",H);L.remove(A)},get:function(A){return typeof A=="object"?A:J[A]},bringToFront:function(A){A=this.get(A);if(A!=K){A._lastAccess=new Date().getTime();I();return true}return false},sendToBack:function(A){A=this.get(A);A._lastAccess=-(new Date().getTime());I();return A},hideAll:function(){for(var A in J){if(J[A]&&typeof J[A]!="function"&&J[A].isVisible()){J[A].hide()}}},getActive:function(){return K},getBy:function(C,D){var B=[];for(var E=L.length-1;E>=0;--E){var A=L[E];if(C.call(D||A,A)!==false){B.push(A)}}return B},each:function(B,C){for(var A in J){if(J[A]&&typeof J[A]!="function"){if(B.call(C||J[A],J[A])===false){return }}}}}};Ext.WindowMgr=new Ext.WindowGroup();Ext.dd.PanelProxy=function(C,D){this.panel=C;this.id=this.panel.id+"-ddproxy";Ext.apply(this,D)};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(F,E,D){this.hide();if(typeof E=="function"){E.call(D||this)}},moveProxy:function(C,D){if(this.proxy){C.insertBefore(this.proxy.dom,D)}}};Ext.Panel.DD=function(F,D){this.panel=F;this.dragData={panel:F};this.proxy=new Ext.dd.PanelProxy(F,D);Ext.Panel.DD.superclass.constructor.call(this,F.el,D);var E=F.header;if(E){this.setHandleElId(E.id)}(E?E: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(C,D){this.proxy.show()},b4MouseDown:function(F){var D=F.getPageX();var E=F.getPageY();this.autoOffset(D,E)},onInitDrag:function(C,D){this.onStartDrag(C,D);return true},createFrame:Ext.emptyFn,getDragEl:function(B){return this.proxy.ghost.dom},endDrag:function(B){this.proxy.hide();this.panel.saveState()},autoOffset:function(C,D){C-=this.startPageX;D-=this.startPageY;this.setDelta(C,D)}});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(D,C){return typeof this.state[D]=="undefined"?C:this.state[D]},clear:function(B){delete this.state[B];this.fireEvent("statechange",this,B,null)},set:function(C,D){this.state[C]=D;this.fireEvent("statechange",this,C,D)},decodeValue:function(N){var O=/^(a|n|d|b|s|o)\:(.*)$/;var L=O.exec(unescape(N));if(!L||!L[1]){return }var S=L[1];var Q=L[2];switch(S){case"n":return parseFloat(Q);case"d":return new Date(Date.parse(Q));case"b":return(Q=="1");case"a":var R=[];var P=Q.split("^");for(var M=0,K=P.length;M<K;M++){R.push(this.decodeValue(P[M]))}return R;case"o":var R={};var P=Q.split("^");for(var M=0,K=P.length;M<K;M++){var T=P[M].split("=");R[T[0]]=this.decodeValue(T[1])}return R;default:return Q}},encodeValue:function(K){var L;if(typeof K=="number"){L="n:"+K}else{if(typeof K=="boolean"){L="b:"+(K?"1":"0")}else{if(Ext.isDate(K)){L="d:"+K.toGMTString()}else{if(Ext.isArray(K)){var H="";for(var I=0,G=K.length;I<G;I++){H+=this.encodeValue(K[I]);if(I!=G-1){H+="^"}}L="a:"+H}else{if(typeof K=="object"){var H="";for(var J in K){if(typeof K[J]!="function"&&K[J]!==undefined){H+=J+"="+this.encodeValue(K[J])+"^"}}L="o:"+H.substring(0,H.length-1)}else{L="s:"+K}}}}}return escape(L)}});Ext.state.Manager=function(){var B=new Ext.state.Provider();return{setProvider:function(A){B=A},get:function(A,D){return B.get(A,D)},set:function(D,A){B.set(D,A)},clear:function(A){B.clear(A)},getProvider:function(){return B}}}();Ext.DataView=Ext.extend(Ext.BoxComponent,{selectedClass:"x-view-selected",emptyText:"",deferEmptyText:true,last:false,initComponent:function(){Ext.DataView.superclass.initComponent.call(this);if(typeof this.tpl=="string"){this.tpl=new Ext.XTemplate(this.tpl)}this.addEvents("beforeclick","click","containerclick","dblclick","contextmenu","selectionchange","beforeselect");this.all=new Ext.CompositeElementLite();this.selected=new Ext.CompositeElementLite()},onRender:function(){if(!this.el){this.el=document.createElement("div");this.el.id=this.id}Ext.DataView.superclass.onRender.apply(this,arguments)},afterRender:function(){Ext.DataView.superclass.afterRender.call(this);this.el.on({click:this.onClick,dblclick:this.onDblClick,contextmenu:this.onContextMenu,scope:this});if(this.overClass){this.el.on({mouseover:this.onMouseOver,mouseout:this.onMouseOut,scope:this})}if(this.store){this.setStore(this.store,true)}},refresh:function(){this.clearSelections(false,true);this.el.update("");var D=[];var C=this.store.getRange();if(C.length<1){if(!this.deferEmptyText||this.hasSkippedEmptyText){this.el.update(this.emptyText)}this.hasSkippedEmptyText=true;this.all.clear();return }this.tpl.overwrite(this.el,this.collectData(C,0));this.all.fill(Ext.query(this.itemSelector,this.el.dom));this.updateIndexes(0)},prepareData:function(B){return B},collectData:function(J,G){var H=[];for(var I=0,F=J.length;I<F;I++){H[H.length]=this.prepareData(J[I].data,G+I,J[I])}return H},bufferRender:function(C){var D=document.createElement("div");this.tpl.overwrite(D,this.collectData(C));return Ext.query(this.itemSelector,D)},onUpdate:function(H,G){var L=this.store.indexOf(G);var I=this.isSelected(L);var K=this.all.elements[L];var J=this.bufferRender([G],L)[0];this.all.replaceElement(L,J,true);if(I){this.selected.replaceElement(K,J);this.all.item(L).addClass(this.selectedClass)}this.updateIndexes(L,L)},onAdd:function(I,K,J){if(this.all.getCount()==0){this.refresh();return }var L=this.bufferRender(K,J),H,G=this.all.elements;if(J<this.all.getCount()){H=this.all.item(J).insertSibling(L,"before",true);G.splice.apply(G,[J,0].concat(L))}else{H=this.all.last().insertSibling(L,"after",true);G.push.apply(G,L)}this.updateIndexes(J)},onRemove:function(E,D,F){this.deselect(F);this.all.removeElement(F,true);this.updateIndexes(F)},refreshNode:function(B){this.onUpdate(this.store,this.store.getAt(B))},updateIndexes:function(F,G){var H=this.all.elements;F=F||0;G=G||((G===0)?0:(H.length-1));for(var E=F;E<=G;E++){H[E].viewIndex=E}},setStore:function(C,D){if(!D&&this.store){this.store.un("beforeload",this.onBeforeLoad,this);this.store.un("datachanged",this.refresh,this);this.store.un("add",this.onAdd,this);this.store.un("remove",this.onRemove,this);this.store.un("update",this.onUpdate,this);this.store.un("clear",this.refresh,this)}if(C){C=Ext.StoreMgr.lookup(C);C.on("beforeload",this.onBeforeLoad,this);C.on("datachanged",this.refresh,this);C.on("add",this.onAdd,this);C.on("remove",this.onRemove,this);C.on("update",this.onUpdate,this);C.on("clear",this.refresh,this)}this.store=C;if(C){this.refresh()}},findItemFromChild:function(B){return Ext.fly(B).findParent(this.itemSelector,this.el)},onClick:function(E){var F=E.getTarget(this.itemSelector,this.el);if(F){var D=this.indexOf(F);if(this.onItemClick(F,D,E)!==false){this.fireEvent("click",this,D,F,E)}}else{if(this.fireEvent("containerclick",this,E)!==false){this.clearSelections()}}},onContextMenu:function(D){var C=D.getTarget(this.itemSelector,this.el);if(C){this.fireEvent("contextmenu",this,this.indexOf(C),C,D)}},onDblClick:function(D){var C=D.getTarget(this.itemSelector,this.el);if(C){this.fireEvent("dblclick",this,this.indexOf(C),C,D)}},onMouseOver:function(D){var C=D.getTarget(this.itemSelector,this.el);if(C&&C!==this.lastItem){this.lastItem=C;Ext.fly(C).addClass(this.overClass)}},onMouseOut:function(B){if(this.lastItem){if(!B.within(this.lastItem,true)){Ext.fly(this.lastItem).removeClass(this.overClass);delete this.lastItem}}},onItemClick:function(F,D,E){if(this.fireEvent("beforeclick",this,D,F,E)===false){return false}if(this.multiSelect){this.doMultiSelection(F,D,E);E.preventDefault()}else{if(this.singleSelect){this.doSingleSelection(F,D,E);E.preventDefault()}}return true},doSingleSelection:function(F,D,E){if(E.ctrlKey&&this.isSelected(D)){this.deselect(D)}else{this.select(D,false)}},doMultiSelection:function(G,E,F){if(F.shiftKey&&this.last!==false){var H=this.last;this.selectRange(H,E,F.ctrlKey);this.last=H}else{if((F.ctrlKey||this.simpleSelect)&&this.isSelected(E)){this.deselect(E)}else{this.select(E,F.ctrlKey||F.shiftKey||this.simpleSelect)}}},getSelectionCount:function(){return this.selected.getCount()},getSelectedNodes:function(){return this.selected.elements},getSelectedIndexes:function(){var H=[],F=this.selected.elements;for(var G=0,E=F.length;G<E;G++){H.push(F[G].viewIndex)}return H},getSelectedRecords:function(){var F=[],G=this.selected.elements;for(var H=0,E=G.length;H<E;H++){F[F.length]=this.store.getAt(G[H].viewIndex)}return F},getRecords:function(J){var G=[],H=J;for(var I=0,F=H.length;I<F;I++){G[G.length]=this.store.getAt(H[I].viewIndex)}return G},getRecord:function(B){return this.store.getAt(B.viewIndex)},clearSelections:function(C,D){if((this.multiSelect||this.singleSelect)&&this.selected.getCount()>0){if(!D){this.selected.removeClass(this.selectedClass)}this.selected.clear();this.last=false;if(!C){this.fireEvent("selectionchange",this,this.selected.elements)}}},isSelected:function(B){return this.selected.contains(this.getNode(B))},deselect:function(B){if(this.isSelected(B)){var B=this.getNode(B);this.selected.removeElement(B);if(this.last==B.viewIndex){this.last=false}Ext.fly(B).removeClass(this.selectedClass);this.fireEvent("selectionchange",this,this.selected.elements)}},select:function(J,H,L){if(Ext.isArray(J)){if(!H){this.clearSelections(true)}for(var K=0,G=J.length;K<G;K++){this.select(J[K],true,true)}if(!L){this.fireEvent("selectionchange",this,this.selected.elements)}}else{var I=this.getNode(J);if(!H){this.clearSelections(true)}if(I&&!this.isSelected(I)){if(this.fireEvent("beforeselect",this,I,this.selected.elements)!==false){Ext.fly(I).addClass(this.selectedClass);this.selected.add(I);this.last=I.viewIndex;if(!L){this.fireEvent("selectionchange",this,this.selected.elements)}}}}},selectRange:function(E,D,F){if(!F){this.clearSelections(true)}this.select(this.getNodes(E,D),true)},getNode:function(B){if(typeof B=="string"){return document.getElementById(B)}else{if(typeof B=="number"){return this.all.elements[B]}}return B},getNodes:function(G,F){var H=this.all.elements;G=G||0;F=typeof F=="undefined"?H.length-1:F;var J=[],I;if(G<=F){for(I=G;I<=F;I++){J.push(H[I])}}else{for(I=G;I>=F;I--){J.push(H[I])}}return J},indexOf:function(B){B=this.getNode(B);if(typeof B.viewIndex=="number"){return B.viewIndex}return this.all.indexOf(B)},onBeforeLoad:function(){if(this.loadingText){this.clearSelections(false,true);this.el.update('<div class="loading-indicator">'+this.loadingText+"</div>");this.all.clear()}},onDestroy:function(){Ext.DataView.superclass.onDestroy.call(this);this.setStore(null)}});Ext.reg("dataview",Ext.DataView);Ext.Button=Ext.extend(Ext.Component,{hidden:false,disabled:false,pressed:false,enableToggle:false,menuAlign:"tl-bl?",type:"button",menuClassTarget:"tr",clickEvent:"click",handleMouseEvents:true,tooltipType:"qtip",buttonSelector:"button:first",initComponent:function(){Ext.Button.superclass.initComponent.call(this);this.addEvents("click","toggle","mouseover","mouseout","menushow","menuhide","menutriggerover","menutriggerout");if(this.menu){this.menu=Ext.menu.MenuMgr.get(this.menu)}if(typeof this.toggleGroup==="string"){this.enableToggle=true}},onRender:function(I,F){if(!this.template){if(!Ext.Button.buttonTemplate){Ext.Button.buttonTemplate=new Ext.Template('<table border="0" cellpadding="0" cellspacing="0" class="x-btn-wrap"><tbody><tr>','<td class="x-btn-left"><i>&#160;</i></td><td class="x-btn-center"><em unselectable="on"><button class="x-btn-text" type="{1}">{0}</button></em></td><td class="x-btn-right"><i>&#160;</i></td>',"</tr></tbody></table>")}this.template=Ext.Button.buttonTemplate}var J,G=[this.text||"&#160;",this.type];if(F){J=this.template.insertBefore(F,G,true)}else{J=this.template.append(I,G,true)}var H=J.child(this.buttonSelector);H.on("focus",this.onFocus,this);H.on("blur",this.onBlur,this);this.initButtonEl(J,H);if(this.menu){this.el.child(this.menuClassTarget).addClass("x-btn-with-menu")}Ext.ButtonToggleMgr.register(this)},initButtonEl:function(F,E){this.el=F;F.addClass("x-btn");if(this.icon){E.setStyle("background-image","url("+this.icon+")")}if(this.iconCls){E.addClass(this.iconCls);if(!this.cls){F.addClass(this.text?"x-btn-text-icon":"x-btn-icon")}}if(this.tabIndex!==undefined){E.dom.tabIndex=this.tabIndex}if(this.tooltip){if(typeof this.tooltip=="object"){Ext.QuickTips.register(Ext.apply({target:E.id},this.tooltip))}else{E.dom[this.tooltipType]=this.tooltip}}if(this.pressed){this.el.addClass("x-btn-pressed")}if(this.handleMouseEvents){F.on("mouseover",this.onMouseOver,this);F.on("mousedown",this.onMouseDown,this)}if(this.menu){this.menu.on("show",this.onMenuShow,this);this.menu.on("hide",this.onMenuHide,this)}if(this.id){this.el.dom.id=this.el.id=this.id}if(this.repeat){var D=new Ext.util.ClickRepeater(F,typeof this.repeat=="object"?this.repeat:{});D.on("click",this.onClick,this)}F.on(this.clickEvent,this.onClick,this)},afterRender:function(){Ext.Button.superclass.afterRender.call(this);if(Ext.isIE6){this.autoWidth.defer(1,this)}else{this.autoWidth()}},setIconClass:function(B){if(this.el){this.el.child(this.buttonSelector).replaceClass(this.iconCls,B)}this.iconCls=B},beforeDestroy:function(){if(this.rendered){var B=this.el.child(this.buttonSelector);if(B){B.removeAllListeners()}}if(this.menu){Ext.destroy(this.menu)}},onDestroy:function(){if(this.rendered){Ext.ButtonToggleMgr.unregister(this)}},autoWidth:function(){if(this.el){this.el.setWidth("auto");if(Ext.isIE7&&Ext.isStrict){var B=this.el.child(this.buttonSelector);if(B&&B.getWidth()>20){B.clip();B.setWidth(Ext.util.TextMetrics.measure(B,this.text).width+B.getFrameWidth("lr"))}}if(this.minWidth){if(this.el.getWidth()<this.minWidth){this.el.setWidth(this.minWidth)}}}},setHandler:function(D,C){this.handler=D;this.scope=C},setText:function(B){this.text=B;if(this.el){this.el.child("td.x-btn-center "+this.buttonSelector).update(B)}this.autoWidth()},getText:function(){return this.text},toggle:function(B){B=B===undefined?!this.pressed:B;if(B!=this.pressed){if(B){this.el.addClass("x-btn-pressed");this.pressed=true;this.fireEvent("toggle",this,true)}else{this.el.removeClass("x-btn-pressed");this.pressed=false;this.fireEvent("toggle",this,false)}if(this.toggleHandler){this.toggleHandler.call(this.scope||this,this,B)}}},focus:function(){this.el.child(this.buttonSelector).focus()},onDisable:function(){if(this.el){if(!Ext.isIE6||!this.text){this.el.addClass(this.disabledClass)}this.el.dom.disabled=true}this.disabled=true},onEnable:function(){if(this.el){if(!Ext.isIE6||!this.text){this.el.removeClass(this.disabledClass)}this.el.dom.disabled=false}this.disabled=false},showMenu:function(){if(this.menu){this.menu.show(this.el,this.menuAlign)}return this},hideMenu:function(){if(this.menu){this.menu.hide()}return this},hasVisibleMenu:function(){return this.menu&&this.menu.isVisible()},onClick:function(B){if(B){B.preventDefault()}if(B.button!=0){return }if(!this.disabled){if(this.enableToggle&&(this.allowDepress!==false||!this.pressed)){this.toggle()}if(this.menu&&!this.menu.isVisible()&&!this.ignoreNextClick){this.showMenu()}this.fireEvent("click",this,B);if(this.handler){this.handler.call(this.scope||this,this,B)}}},isMenuTriggerOver:function(D,C){return this.menu&&!C},isMenuTriggerOut:function(D,C){return this.menu&&!C},onMouseOver:function(D){if(!this.disabled){var C=D.within(this.el,true);if(!C){this.el.addClass("x-btn-over");Ext.getDoc().on("mouseover",this.monitorMouseOver,this);this.fireEvent("mouseover",this,D)}if(this.isMenuTriggerOver(D,C)){this.fireEvent("menutriggerover",this,this.menu,D)}}},monitorMouseOver:function(B){if(B.target!=this.el.dom&&!B.within(this.el)){Ext.getDoc().un("mouseover",this.monitorMouseOver,this);this.onMouseOut(B)}},onMouseOut:function(D){var C=D.within(this.el)&&D.target!=this.el.dom;this.el.removeClass("x-btn-over");this.fireEvent("mouseout",this,D);if(this.isMenuTriggerOut(D,C)){this.fireEvent("menutriggerout",this,this.menu,D)}},onFocus:function(B){if(!this.disabled){this.el.addClass("x-btn-focus")}},onBlur:function(B){this.el.removeClass("x-btn-focus")},getClickEl:function(D,C){return this.el},onMouseDown:function(B){if(!this.disabled&&B.button==0){this.getClickEl(B).addClass("x-btn-click");Ext.getDoc().on("mouseup",this.onMouseUp,this)}},onMouseUp:function(B){if(B.button==0){this.getClickEl(B,true).removeClass("x-btn-click");Ext.getDoc().un("mouseup",this.onMouseUp,this)}},onMenuShow:function(B){this.ignoreNextClick=0;this.el.addClass("x-btn-menu-active");this.fireEvent("menushow",this,this.menu)},onMenuHide:function(B){this.el.removeClass("x-btn-menu-active");this.ignoreNextClick=this.restoreClick.defer(250,this);this.fireEvent("menuhide",this,this.menu)},restoreClick:function(){this.ignoreNextClick=0}});Ext.reg("button",Ext.Button);Ext.ButtonToggleMgr=function(){var C={};function D(H,A){if(A){var B=C[H.toggleGroup];for(var I=0,J=B.length;I<J;I++){if(B[I]!=H){B[I].toggle(false)}}}}return{register:function(B){if(!B.toggleGroup){return }var A=C[B.toggleGroup];if(!A){A=C[B.toggleGroup]=[]}A.push(B);B.on("toggle",D)},unregister:function(B){if(!B.toggleGroup){return }var A=C[B.toggleGroup];if(A){A.remove(B);B.un("toggle",D)}}}}();Ext.Resizable=function(N,Z){this.el=Ext.get(N);if(Z&&Z.wrap){Z.resizeChild=this.el;this.el=this.el.wrap(typeof Z.wrap=="object"?Z.wrap:{cls:"xresizable-wrap"});this.el.id=this.el.dom.id=Z.resizeChild.id+"-rzwrap";this.el.setStyle("overflow","hidden");this.el.setPositioning(Z.resizeChild.getPositioning());Z.resizeChild.clearPositioning();if(!Z.width||!Z.height){var Y=Z.resizeChild.getSize();this.el.setSize(Y.width,Y.height)}if(Z.pinned&&!Z.adjustments){Z.adjustments="auto"}}this.proxy=this.el.createProxy({tag:"div",cls:"x-resizable-proxy",id:this.el.id+"-rzproxy"});this.proxy.unselectable();this.proxy.enableDisplayMode("block");Ext.apply(this,Z);if(this.pinned){this.disableTrackOver=true;this.el.addClass("x-resizable-pinned")}var V=this.el.getStyle("position");if(V!="absolute"&&V!="fixed"){this.el.setStyle("position","relative")}if(!this.handles){this.handles="s,e,se";if(this.multiDirectional){this.handles+=",n,w"}}if(this.handles=="all"){this.handles="n s e w ne nw se sw"}var R=this.handles.split(/\s*?[,;]\s*?| /);var O=Ext.Resizable.positions;for(var W=0,U=R.length;W<U;W++){if(R[W]&&O[R[W]]){var S=O[R[W]];this[S]=new Ext.Resizable.Handle(this,S,this.disableTrackOver,this.transparent)}}this.corner=this.southeast;if(this.handles.indexOf("n")!=-1||this.handles.indexOf("w")!=-1){this.updateBox=true}this.activeHandle=null;if(this.resizeChild){if(typeof this.resizeChild=="boolean"){this.resizeChild=Ext.get(this.el.dom.firstChild,true)}else{this.resizeChild=Ext.get(this.resizeChild,true)}}if(this.adjustments=="auto"){var P=this.resizeChild;var T=this.west,X=this.east,Q=this.north,R=this.south;if(P&&(T||Q)){P.position("relative");P.setLeft(T?T.el.getWidth():0);P.setTop(Q?Q.el.getHeight():0)}this.adjustments=[(X?-X.el.getWidth():0)+(T?-T.el.getWidth():0),(Q?-Q.el.getHeight():0)+(R?-R.el.getHeight():0)-1]}if(this.draggable){this.dd=this.dynamic?this.el.initDD(null):this.el.initDDProxy(null,{dragElId:this.proxy.id});this.dd.setHandleElId(this.resizeChild?this.resizeChild.id:this.el.id)}this.addEvents("beforeresize","resize");if(this.width!==null&&this.height!==null){this.resizeTo(this.width,this.height)}else{this.updateChildSize()}if(Ext.isIE){this.el.dom.style.zoom=1}Ext.Resizable.superclass.constructor.call(this)};Ext.extend(Ext.Resizable,Ext.util.Observable,{resizeChild:false,adjustments:[0,0],minWidth:5,minHeight:5,maxWidth:10000,maxHeight:10000,enabled:true,animate:false,duration:0.35,dynamic:false,handles:false,multiDirectional:false,disableTrackOver:false,easing:"easeOutStrong",widthIncrement:0,heightIncrement:0,pinned:false,width:null,height:null,preserveRatio:false,transparent:false,minX:0,minY:0,draggable:false,resizeTo:function(D,C){this.el.setSize(D,C);this.updateChildSize();this.fireEvent("resize",this,D,C,null)},startSizing:function(E,F){this.fireEvent("beforeresize",this,E);if(this.enabled){if(!this.overlay){this.overlay=this.el.createProxy({tag:"div",cls:"x-resizable-overlay",html:"&#160;"},Ext.getBody());this.overlay.unselectable();this.overlay.enableDisplayMode("block");this.overlay.on("mousemove",this.onMouseMove,this);this.overlay.on("mouseup",this.onMouseUp,this)}this.overlay.setStyle("cursor",F.el.getStyle("cursor"));this.resizing=true;this.startBox=this.el.getBox();this.startPoint=E.getXY();this.offsets=[(this.startBox.x+this.startBox.width)-this.startPoint[0],(this.startBox.y+this.startBox.height)-this.startPoint[1]];this.overlay.setSize(Ext.lib.Dom.getViewWidth(true),Ext.lib.Dom.getViewHeight(true));this.overlay.show();if(this.constrainTo){var D=Ext.get(this.constrainTo);this.resizeRegion=D.getRegion().adjust(D.getFrameWidth("t"),D.getFrameWidth("l"),-D.getFrameWidth("b"),-D.getFrameWidth("r"))}this.proxy.setStyle("visibility","hidden");this.proxy.show();this.proxy.setBox(this.startBox);if(!this.dynamic){this.proxy.setStyle("visibility","visible")}}},onMouseDown:function(C,D){if(this.enabled){D.stopEvent();this.activeHandle=C;this.startSizing(D,C)}},onMouseUp:function(D){var C=this.resizeElement();this.resizing=false;this.handleOut();this.overlay.hide();this.proxy.hide();this.fireEvent("resize",this,C.width,C.height,D)},updateChildSize:function(){if(this.resizeChild){var G=this.el;var F=this.resizeChild;var H=this.adjustments;if(G.dom.offsetWidth){var E=G.getSize(true);F.setSize(E.width+H[0],E.height+H[1])}if(Ext.isIE){setTimeout(function(){if(G.dom.offsetWidth){var A=G.getSize(true);F.setSize(A.width+H[0],A.height+H[1])}},10)}}},snap:function(I,G,J){if(!G||!I){return I}var H=I;var F=I%G;if(F>0){if(F>(G/2)){H=I+(G-F)}else{H=I-F}}return Math.max(J,H)},resizeElement:function(){var B=this.proxy.getBox();if(this.updateBox){this.el.setBox(B,false,this.animate,this.duration,null,this.easing)}else{this.el.setSize(B.width,B.height,this.animate,this.duration,null,this.easing)}this.updateChildSize();if(!this.dynamic){this.proxy.hide()}return B},constrain:function(H,G,E,F){if(H-G<E){G=H-E}else{if(H-G>F){G=F-H}}return G},onMouseMove:function(d){if(this.enabled){try{if(this.resizeRegion&&!this.resizeRegion.contains(d.getPoint())){return }var g=this.curSize||this.startBox;var p=this.startBox.x,q=this.startBox.y;var v=p,w=q;var o=g.width,e=g.height;var u=o,m=e;var n=this.minWidth,c=this.minHeight;var h=this.maxWidth,Z=this.maxHeight;var s=this.widthIncrement;var x=this.heightIncrement;var b=d.getXY();var i=-(this.startPoint[0]-Math.max(this.minX,b[0]));var l=-(this.startPoint[1]-Math.max(this.minY,b[1]));var r=this.activeHandle.position;switch(r){case"east":o+=i;o=Math.min(Math.max(n,o),h);break;case"south":e+=l;e=Math.min(Math.max(c,e),Z);break;case"southeast":o+=i;e+=l;o=Math.min(Math.max(n,o),h);e=Math.min(Math.max(c,e),Z);break;case"north":l=this.constrain(e,l,c,Z);q+=l;e-=l;break;case"west":i=this.constrain(o,i,n,h);p+=i;o-=i;break;case"northeast":o+=i;o=Math.min(Math.max(n,o),h);l=this.constrain(e,l,c,Z);q+=l;e-=l;break;case"northwest":i=this.constrain(o,i,n,h);l=this.constrain(e,l,c,Z);q+=l;e-=l;p+=i;o-=i;break;case"southwest":i=this.constrain(o,i,n,h);e+=l;e=Math.min(Math.max(c,e),Z);p+=i;o-=i;break}var k=this.snap(o,s,n);var a=this.snap(e,x,c);if(k!=o||a!=e){switch(r){case"northeast":q-=a-e;break;case"north":q-=a-e;break;case"southwest":p-=k-o;break;case"west":p-=k-o;break;case"northwest":p-=k-o;q-=a-e;break}o=k;e=a}if(this.preserveRatio){switch(r){case"southeast":case"east":e=m*(o/u);e=Math.min(Math.max(c,e),Z);o=u*(e/m);break;case"south":o=u*(e/m);o=Math.min(Math.max(n,o),h);e=m*(o/u);break;case"northeast":o=u*(e/m);o=Math.min(Math.max(n,o),h);e=m*(o/u);break;case"north":var Y=o;o=u*(e/m);o=Math.min(Math.max(n,o),h);e=m*(o/u);p+=(Y-o)/2;break;case"southwest":e=m*(o/u);e=Math.min(Math.max(c,e),Z);var Y=o;o=u*(e/m);p+=Y-o;break;case"west":var t=e;e=m*(o/u);e=Math.min(Math.max(c,e),Z);q+=(t-e)/2;var Y=o;o=u*(e/m);p+=Y-o;break;case"northwest":var Y=o;var t=e;e=m*(o/u);e=Math.min(Math.max(c,e),Z);o=u*(e/m);q+=t-e;p+=Y-o;break}}this.proxy.setBounds(p,q,o,e);if(this.dynamic){this.resizeElement()}}catch(d){}}},handleOver:function(){if(this.enabled){this.el.addClass("x-resizable-over")}},handleOut:function(){if(!this.resizing){this.el.removeClass("x-resizable-over")}},getEl:function(){return this.el},getResizeChild:function(){return this.resizeChild},destroy:function(G){this.proxy.remove();if(this.overlay){this.overlay.removeAllListeners();this.overlay.remove()}var F=Ext.Resizable.positions;for(var E in F){if(typeof F[E]!="function"&&this[F[E]]){var H=this[F[E]];H.el.removeAllListeners();H.el.remove()}}if(G){this.el.update("");this.el.remove()}},syncHandleHeight:function(){var B=this.el.getHeight(true);if(this.west){this.west.el.setHeight(B)}if(this.east){this.east.el.setHeight(B)}}});Ext.Resizable.positions={n:"north",s:"south",e:"east",w:"west",se:"southeast",sw:"southwest",nw:"northwest",ne:"northeast"};Ext.Resizable.Handle=function(I,G,J,H){if(!this.tpl){var F=Ext.DomHelper.createTemplate({tag:"div",cls:"x-resizable-handle x-resizable-handle-{0}"});F.compile();Ext.Resizable.Handle.prototype.tpl=F}this.position=G;this.rz=I;this.el=this.tpl.append(I.el.dom,[this.position],true);this.el.unselectable();if(H){this.el.setOpacity(0)}this.el.on("mousedown",this.onMouseDown,this);if(!J){this.el.on("mouseover",this.onMouseOver,this);this.el.on("mouseout",this.onMouseOut,this)}};Ext.Resizable.Handle.prototype={afterResize:function(B){},onMouseDown:function(B){this.rz.onMouseDown(this,B)},onMouseOver:function(B){this.rz.handleOver(this,B)},onMouseOut:function(B){this.rz.handleOut(this,B)}};Ext.MessageBox=function(){var W,o,a,X;var i,e,Y,p,d,b,h,k;var Z,V,c,n="";var m=function(A){if(W.isVisible()){W.hide();Ext.callback(o.fn,o.scope||window,[A,V.dom.value],1)}};var U=function(){if(o&&o.cls){W.el.removeClass(o.cls)}d.reset()};var l=function(A,C,B){if(o&&o.closable!==false){W.hide()}if(B){B.stopEvent()}};var g=function(C){var A=0;if(!C){Z.ok.hide();Z.cancel.hide();Z.yes.hide();Z.no.hide();return A}W.footer.dom.style.display="";for(var B in Z){if(typeof Z[B]!="function"){if(C[B]){Z[B].show();Z[B].setText(typeof C[B]=="string"?C[B]:Ext.MessageBox.buttonText[B]);A+=Z[B].el.getWidth()+15}else{Z[B].hide()}}}return A};return{getDialog:function(C){if(!W){W=new Ext.Window({autoCreate:true,title:C,resizable:false,constrain:true,constrainHeader:true,minimizable:false,maximizable:false,stateful:false,modal:true,shim:true,buttonAlign:"center",width:400,height:100,minHeight:80,plain:true,footer:true,closable:true,close:function(){if(o&&o.buttons&&o.buttons.no&&!o.buttons.cancel){m("no")}else{m("cancel")}}});Z={};var B=this.buttonText;Z.ok=W.addButton(B.ok,m.createCallback("ok"));Z.yes=W.addButton(B.yes,m.createCallback("yes"));Z.no=W.addButton(B.no,m.createCallback("no"));Z.cancel=W.addButton(B.cancel,m.createCallback("cancel"));Z.ok.hideMode=Z.yes.hideMode=Z.no.hideMode=Z.cancel.hideMode="offsets";W.render(document.body);W.getEl().addClass("x-window-dlg");a=W.mask;i=W.body.createChild({html:'<div class="ext-mb-icon"></div><div class="ext-mb-content"><span class="ext-mb-text"></span><br /><div class="ext-mb-fix-cursor"><input type="text" class="ext-mb-input" /><textarea class="ext-mb-textarea"></textarea></div></div>'});h=Ext.get(i.dom.firstChild);var A=i.dom.childNodes[1];e=Ext.get(A.firstChild);Y=Ext.get(A.childNodes[2].firstChild);Y.enableDisplayMode();Y.addKeyListener([10,13],function(){if(W.isVisible()&&o&&o.buttons){if(o.buttons.ok){m("ok")}else{if(o.buttons.yes){m("yes")}}}});p=Ext.get(A.childNodes[2].childNodes[1]);p.enableDisplayMode();d=new Ext.ProgressBar({renderTo:i});i.createChild({cls:"x-clear"})}return W},updateText:function(F){if(!W.isVisible()&&!o.width){W.setSize(this.maxWidth,100)}e.update(F||"&#160;");var B=n!=""?(h.getWidth()+h.getMargins("lr")):0;var D=e.getWidth()+e.getMargins("lr");var A=W.getFrameWidth("lr");var E=W.body.getFrameWidth("lr");if(Ext.isIE&&B>0){B+=3}var C=Math.max(Math.min(o.width||B+D+A+E,this.maxWidth),Math.max(o.minWidth||this.minWidth,c||0));if(o.prompt===true){V.setWidth(C-B-A-E)}if(o.progress===true||o.wait===true){d.setSize(C-B-A-E)}W.setSize(C,"auto").center();return this},updateProgress:function(B,C,A){d.updateProgress(B,C);if(A){this.updateText(A)}return this},isVisible:function(){return W&&W.isVisible()},hide:function(){if(this.isVisible()){W.hide();U()}return this},show:function(E){if(this.isVisible()){this.hide()}o=E;var D=this.getDialog(o.title||"&#160;");D.setTitle(o.title||"&#160;");var C=(o.closable!==false&&o.progress!==true&&o.wait!==true);D.tools.close.setDisplayed(C);V=Y;o.prompt=o.prompt||(o.multiline?true:false);if(o.prompt){if(o.multiline){Y.hide();p.show();p.setHeight(typeof o.multiline=="number"?o.multiline:this.defaultTextHeight);V=p}else{Y.show();p.hide()}}else{Y.hide();p.hide()}V.dom.value=o.value||"";if(o.prompt){D.focusEl=V}else{var A=o.buttons;var B=null;if(A&&A.ok){B=Z.ok}else{if(A&&A.yes){B=Z.yes}}if(B){D.focusEl=B}}if(o.iconCls){D.setIconClass(o.iconCls)}this.setIcon(o.icon);c=g(o.buttons);d.setVisible(o.progress===true||o.wait===true);this.updateProgress(0,o.progressText);this.updateText(o.msg);if(o.cls){D.el.addClass(o.cls)}D.proxyDrag=o.proxyDrag===true;D.modal=o.modal!==false;D.mask=o.modal!==false?a:false;if(!D.isVisible()){document.body.appendChild(W.el.dom);D.setAnimateTarget(o.animEl);D.show(o.animEl)}D.on("show",function(){if(C===true){D.keyMap.enable()}else{D.keyMap.disable()}},this,{single:true});if(o.wait===true){d.wait(o.waitConfig)}return this},setIcon:function(A){if(A&&A!=""){h.removeClass("x-hidden");h.replaceClass(n,A);n=A}else{h.replaceClass(n,"x-hidden");n=""}return this},progress:function(A,B,C){this.show({title:A,msg:B,buttons:false,progress:true,closable:false,minWidth:this.minProgressWidth,progressText:C});return this},wait:function(A,B,C){this.show({title:B,msg:A,buttons:false,closable:false,wait:true,modal:true,minWidth:this.minProgressWidth,waitConfig:C});return this},alert:function(D,A,B,C){this.show({title:D,msg:A,buttons:this.OK,fn:B,scope:C});return this},confirm:function(D,A,B,C){this.show({title:D,msg:A,buttons:this.YESNO,fn:B,scope:C,icon:this.QUESTION});return this},prompt:function(D,E,A,B,C,F){this.show({title:D,msg:E,buttons:this.OKCANCEL,fn:A,minWidth:250,scope:B,prompt:true,multiline:C,value:F});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(B){Ext.Tip.superclass.show.call(this);if(this.measureWidth!==false&&(!this.initialConfig||typeof this.initialConfig.width!="number")){this.doAutoWidth()}if(this.constrainPosition){B=this.el.adjustForConstraints(B)}this.setPagePosition(B[0],B[1])},doAutoWidth:function(){var B=this.body.getTextWidth();if(this.title){B=Math.max(B,this.header.child("span").getTextWidth(this.title))}B+=this.getFrameWidth()+(this.closable?20:0)+this.body.getPadding("lr");this.setWidth(B.constrain(this.minWidth,this.maxWidth))},showBy:function(C,D){if(!this.rendered){this.render(Ext.getBody())}this.showAt(this.el.getAlignToXY(C,D||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(D,C){Ext.apply(this,C);this.tip=D;Ext.Tip.DD.superclass.constructor.call(this,D.el.id,"WindowDD-"+D.id);this.setHandleElId(D.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(B){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(B){this.targetXY=B.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(B){if(this.disabled||B.within(this.target.dom,true)){return }this.clearTimer("hide");this.targetXY=B.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(B){if(this.disabled||B.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(B){this.lastActive=new Date();this.clearTimers();Ext.ToolTip.superclass.showAt.call(this,B);if(this.dismissDelay&&this.autoHide!==false){this.dismissTimer=this.hide.defer(this.dismissDelay,this)}},clearTimer:function(B){B=B+"Timer";clearTimeout(this[B]);delete this[B]},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(B){if(this.autoHide!==false&&!B.within(this.el.dom)){this.disable();this.enable.defer(100,this)}},onDisable:function(){this.clearTimers();this.hide()},adjustPosition:function(E,F){var G=this.targetXY[1],H=this.getSize().height;if(this.constrainPosition&&F<=G&&(F+H)>=G){F=G-H-5}return{x:E,y:F}},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(N){var L=Ext.isArray(N)?N:arguments;for(var M=0,I=L.length;M<I;M++){var J=L[M];var K=J.target;if(K){if(Ext.isArray(K)){for(var O=0,P=K.length;O<P;O++){this.targets[Ext.id(K[O])]=J}}else{this.targets[Ext.id(K)]=J}}}},unregister:function(B){delete this.targets[Ext.id(B)]},onTargetOver:function(I){if(this.disabled){return }this.targetXY=I.getXY();var M=I.getTarget();if(!M||M.nodeType!==1||M==document||M==document.body){return }if(this.activeTarget&&M==this.activeTarget.el){this.clearTimer("hide");this.show();return }if(M&&this.targets[M.id]){this.activeTarget=this.targets[M.id];this.activeTarget.el=M;this.delayShow();return }var K,J=Ext.fly(M),N=this.tagConfig;var L=N.namespace;if(this.interceptTitles&&M.title){K=M.title;M.qtip=K;M.removeAttribute("title");I.preventDefault()}else{K=M.qtip||J.getAttributeNS(L,N.attribute)}if(K){var H=J.getAttributeNS(L,N.hide);this.activeTarget={el:M,text:K,width:J.getAttributeNS(L,N.width),autoHide:H!="user"&&H!=="false",title:J.getAttributeNS(L,N.title),cls:J.getAttributeNS(L,N.cls),align:J.getAttributeNS(L,N.align)};this.delayShow()}},onTargetOut:function(B){this.clearTimer("show");if(this.autoHide!==false){this.delayHide()}},showAt:function(D){var C=this.activeTarget;if(C){if(!this.rendered){this.render(Ext.getBody());this.activeTarget=C}if(C.width){this.setWidth(C.width);this.body.setWidth(this.adjustBodyWidth(C.width-this.getFrameWidth()));this.measureWidth=false}else{this.measureWidth=true}this.setTitle(C.title||"");this.body.update(C.text);this.autoHide=C.autoHide;this.dismissDelay=C.dismissDelay||this.dismissDelay;if(this.lastCls){this.el.removeClass(this.lastCls);delete this.lastCls}if(C.cls){this.el.addClass(C.cls);this.lastCls=C.cls}if(C.align){D=this.el.getAlignToXY(C.el,C.align);this.constrainPosition=false}else{this.constrainPosition=true}}Ext.QuickTip.superclass.showAt.call(this,D)},hide:function(){delete this.activeTarget;Ext.QuickTip.superclass.hide.call(this)}});Ext.QuickTips=function(){var D,C=[];return{init:function(){if(!D){D=new Ext.QuickTip({elements:"header,body"})}},enable:function(){if(D){C.pop();if(C.length<1){D.enable()}}},disable:function(){if(D){D.disable()}C.push(1)},isEnabled:function(){return D!==undefined&&!D.disabled},getQuickTip:function(){return D},register:function(){D.register.apply(D,arguments)},unregister:function(){D.unregister.apply(D,arguments)},tips:function(){D.register.apply(D,arguments)}}}();Ext.tree.TreePanel=Ext.extend(Ext.Panel,{rootVisible:true,animate:Ext.enableFx,lines:true,enableDD:false,hlDrop:Ext.enableFx,pathSeparator:"/",initComponent:function(){Ext.tree.TreePanel.superclass.initComponent.call(this);if(!this.eventModel){this.eventModel=new Ext.tree.TreeEventModel(this)}this.nodeHash={};if(this.root){this.setRootNode(this.root)}this.addEvents("append","remove","movenode","insert","beforeappend","beforeremove","beforemovenode","beforeinsert","beforeload","load","textchange","beforeexpandnode","beforecollapsenode","expandnode","disabledchange","collapsenode","beforeclick","click","checkchange","dblclick","contextmenu","beforechildrenrendered","startdrag","enddrag","dragdrop","beforenodedrop","nodedrop","nodedragover");if(this.singleExpand){this.on("beforeexpandnode",this.restrictExpand,this)}},proxyNodeEvent:function(M,N,H,I,J,K,L){if(M=="collapse"||M=="expand"||M=="beforecollapse"||M=="beforeexpand"||M=="move"||M=="beforemove"){M=M+"node"}return this.fireEvent(M,N,H,I,J,K,L)},getRootNode:function(){return this.root},setRootNode:function(D){this.root=D;D.ownerTree=this;D.isRoot=true;this.registerNode(D);if(!this.rootVisible){var C=D.attributes.uiProvider;D.ui=C?new C(D):new Ext.tree.RootTreeNodeUI(D)}return D},getNodeById:function(B){return this.nodeHash[B]},registerNode:function(B){this.nodeHash[B.id]=B},unregisterNode:function(B){delete this.nodeHash[B.id]},toString:function(){return"[Tree"+(this.id?" "+this.id:"")+"]"},restrictExpand:function(C){var D=C.parentNode;if(D){if(D.expandedChild&&D.expandedChild.parentNode==D){D.expandedChild.collapse()}D.expandedChild=C}},getChecked:function(E,H){H=H||this.root;var G=[];var F=function(){if(this.attributes.checked){G.push(!E?this:(E=="id"?this.id:this.attributes[E]))}};H.cascade(F);return G},getEl:function(){return this.el},getLoader:function(){return this.loader},expandAll:function(){this.root.expand(true)},collapseAll:function(){this.root.collapse(true)},getSelectionModel:function(){if(!this.selModel){this.selModel=new Ext.tree.DefaultSelectionModel()}return this.selModel},expandPath:function(J,H,I){H=H||"id";var L=J.split(this.pathSeparator);var M=this.root;if(M.attributes[H]!=L[1]){if(I){I(false,null)}return }var N=1;var K=function(){if(++N==L.length){if(I){I(true,M)}return }var A=M.findChild(H,L[N]);if(!A){if(I){I(false,M)}return }M=A;A.expand(false,false,K)};M.expand(false,false,K)},selectPath:function(I,G,H){G=G||"id";var K=I.split(this.pathSeparator);var L=K.pop();if(K.length>0){var J=function(B,C){if(B&&C){var A=C.findChild(G,L);if(A){A.select();if(H){H(true,A)}}else{if(H){H(false,A)}}}else{if(H){H(false,A)}}};this.expandPath(K.join(this.pathSeparator),G,J)}else{this.root.select();if(H){H(true,this.root)}}},getTreeEl:function(){return this.body},onRender:function(D,C){Ext.tree.TreePanel.superclass.onRender.call(this,D,C);this.el.addClass("x-tree");this.innerCt=this.body.createChild({tag:"ul",cls:"x-tree-root-ct "+(this.useArrows?"x-tree-arrows":this.lines?"x-tree-lines":"x-tree-no-lines")})},initEvents:function(){Ext.tree.TreePanel.superclass.initEvents.call(this);if(this.containerScroll){Ext.dd.ScrollManager.register(this.body)}if((this.enableDD||this.enableDrop)&&!this.dropZone){this.dropZone=new Ext.tree.TreeDropZone(this,this.dropConfig||{ddGroup:this.ddGroup||"TreeDD",appendOnly:this.ddAppendOnly===true})}if((this.enableDD||this.enableDrag)&&!this.dragZone){this.dragZone=new Ext.tree.TreeDragZone(this,this.dragConfig||{ddGroup:this.ddGroup||"TreeDD",scroll:this.ddScroll})}this.getSelectionModel().init(this)},afterRender:function(){Ext.tree.TreePanel.superclass.afterRender.call(this);this.root.render();if(!this.rootVisible){this.root.renderChildren()}},onDestroy:function(){if(this.rendered){this.body.removeAllListeners();Ext.dd.ScrollManager.unregister(this.body);if(this.dropZone){this.dropZone.unreg()}if(this.dragZone){this.dragZone.unreg()}}this.root.destroy();this.nodeHash=null;Ext.tree.TreePanel.superclass.onDestroy.call(this)}});Ext.reg("treepanel",Ext.tree.TreePanel);Ext.tree.TreeEventModel=function(B){this.tree=B;this.tree.on("render",this.initEvents,this)};Ext.tree.TreeEventModel.prototype={initEvents:function(){var B=this.tree.getTreeEl();B.on("click",this.delegateClick,this);if(this.tree.trackMouseOver!==false){B.on("mouseover",this.delegateOver,this);B.on("mouseout",this.delegateOut,this)}B.on("dblclick",this.delegateDblClick,this);B.on("contextmenu",this.delegateContextMenu,this)},getNode:function(F){var D;if(D=F.getTarget(".x-tree-node-el",10)){var E=Ext.fly(D,"_treeEvents").getAttributeNS("ext","tree-node-id");if(E){return this.tree.getNodeById(E)}}return null},getNodeTarget:function(D){var C=D.getTarget(".x-tree-node-icon",1);if(!C){C=D.getTarget(".x-tree-node-el",6)}return C},delegateOut:function(F,D){if(!this.beforeEvent(F)){return }if(F.getTarget(".x-tree-ec-icon",1)){var E=this.getNode(F);this.onIconOut(F,E);if(E==this.lastEcOver){delete this.lastEcOver}}if((D=this.getNodeTarget(F))&&!F.within(D,true)){this.onNodeOut(F,this.getNode(F))}},delegateOver:function(D,C){if(!this.beforeEvent(D)){return }if(this.lastEcOver){this.onIconOut(D,this.lastEcOver);delete this.lastEcOver}if(D.getTarget(".x-tree-ec-icon",1)){this.lastEcOver=this.getNode(D);this.onIconOver(D,this.lastEcOver)}if(C=this.getNodeTarget(D)){this.onNodeOver(D,this.getNode(D))}},delegateClick:function(D,C){if(!this.beforeEvent(D)){return }if(D.getTarget("input[type=checkbox]",1)){this.onCheckboxClick(D,this.getNode(D))}else{if(D.getTarget(".x-tree-ec-icon",1)){this.onIconClick(D,this.getNode(D))}else{if(this.getNodeTarget(D)){this.onNodeClick(D,this.getNode(D))}}}},delegateDblClick:function(D,C){if(this.beforeEvent(D)&&this.getNodeTarget(D)){this.onNodeDblClick(D,this.getNode(D))}},delegateContextMenu:function(D,C){if(this.beforeEvent(D)&&this.getNodeTarget(D)){this.onNodeContextMenu(D,this.getNode(D))}},onNodeClick:function(D,C){C.ui.onClick(D)},onNodeOver:function(D,C){C.ui.onOver(D)},onNodeOut:function(D,C){C.ui.onOut(D)},onIconOver:function(D,C){C.ui.addClass("x-tree-ec-over")},onIconOut:function(D,C){C.ui.removeClass("x-tree-ec-over")},onIconClick:function(D,C){C.ui.ecClick(D)},onCheckboxClick:function(D,C){C.ui.onCheckChange(D)},onNodeDblClick:function(D,C){C.ui.onDblClick(D)},onNodeContextMenu:function(D,C){C.ui.onContextMenu(D)},beforeEvent:function(B){if(this.disabled){B.stopEvent();return false}return true},disable:function(){this.disabled=true},enable:function(){this.disabled=false}};Ext.tree.DefaultSelectionModel=function(B){this.selNode=null;this.addEvents("selectionchange","beforeselect");Ext.apply(this,B);Ext.tree.DefaultSelectionModel.superclass.constructor.call(this)};Ext.extend(Ext.tree.DefaultSelectionModel,Ext.util.Observable,{init:function(B){this.tree=B;B.getTreeEl().on("keydown",this.onKeyDown,this);B.on("click",this.onNodeClick,this)},onNodeClick:function(C,D){this.select(C)},select:function(D){var C=this.selNode;if(C!=D&&this.fireEvent("beforeselect",this,D,C)!==false){if(C){C.ui.onSelectedChange(false)}this.selNode=D;D.ui.onSelectedChange(true);this.fireEvent("selectionchange",this,D,C)}return D},unselect:function(B){if(this.selNode==B){this.clearSelections()}},clearSelections:function(){var B=this.selNode;if(B){B.ui.onSelectedChange(false);this.selNode=null;this.fireEvent("selectionchange",this,null)}return B},getSelectedNode:function(){return this.selNode},isSelected:function(B){return this.selNode==B},selectPrevious:function(){var D=this.selNode||this.lastSelNode;if(!D){return null}var E=D.previousSibling;if(E){if(!E.isExpanded()||E.childNodes.length<1){return this.select(E)}else{var F=E.lastChild;while(F&&F.isExpanded()&&F.childNodes.length>0){F=F.lastChild}return this.select(F)}}else{if(D.parentNode&&(this.tree.rootVisible||!D.parentNode.isRoot)){return this.select(D.parentNode)}}return null},selectNext:function(){var D=this.selNode||this.lastSelNode;if(!D){return null}if(D.firstChild&&D.isExpanded()){return this.select(D.firstChild)}else{if(D.nextSibling){return this.select(D.nextSibling)}else{if(D.parentNode){var C=null;D.parentNode.bubble(function(){if(this.nextSibling){C=this.getOwnerTree().selModel.select(this.nextSibling);return false}});return C}}}return null},onKeyDown:function(G){var H=this.selNode||this.lastSelNode;var F=this;if(!H){return }var E=G.getKey();switch(E){case G.DOWN:G.stopEvent();this.selectNext();break;case G.UP:G.stopEvent();this.selectPrevious();break;case G.RIGHT:G.preventDefault();if(H.hasChildNodes()){if(!H.isExpanded()){H.expand()}else{if(H.firstChild){this.select(H.firstChild,G)}}}break;case G.LEFT:G.preventDefault();if(H.hasChildNodes()&&H.isExpanded()){H.collapse()}else{if(H.parentNode&&(this.tree.rootVisible||H.parentNode!=this.tree.getRootNode())){this.select(H.parentNode,G)}}break}}});Ext.tree.MultiSelectionModel=function(B){this.selNodes=[];this.selMap={};this.addEvents("selectionchange");Ext.apply(this,B);Ext.tree.MultiSelectionModel.superclass.constructor.call(this)};Ext.extend(Ext.tree.MultiSelectionModel,Ext.util.Observable,{init:function(B){this.tree=B;B.getTreeEl().on("keydown",this.onKeyDown,this);B.on("click",this.onNodeClick,this)},onNodeClick:function(C,D){this.select(C,D,D.ctrlKey)},select:function(D,E,F){if(F!==true){this.clearSelections(true)}if(this.isSelected(D)){this.lastSelNode=D;return D}this.selNodes.push(D);this.selMap[D.id]=D;this.lastSelNode=D;D.ui.onSelectedChange(true);this.fireEvent("selectionchange",this,this.selNodes);return D},unselect:function(F){if(this.selMap[F.id]){F.ui.onSelectedChange(false);var E=this.selNodes;var D=E.indexOf(F);if(D!=-1){this.selNodes.splice(D,1)}delete this.selMap[F.id];this.fireEvent("selectionchange",this,this.selNodes)}},clearSelections:function(H){var F=this.selNodes;if(F.length>0){for(var G=0,E=F.length;G<E;G++){F[G].ui.onSelectedChange(false)}this.selNodes=[];this.selMap={};if(H!==true){this.fireEvent("selectionchange",this,this.selNodes)}}},isSelected:function(B){return this.selMap[B.id]?true:false},getSelectedNodes:function(){return this.selNodes},onKeyDown:Ext.tree.DefaultSelectionModel.prototype.onKeyDown,selectNext:Ext.tree.DefaultSelectionModel.prototype.selectNext,selectPrevious:Ext.tree.DefaultSelectionModel.prototype.selectPrevious});Ext.tree.TreeNode=function(C){C=C||{};if(typeof C=="string"){C={text:C}}this.childrenRendered=false;this.rendered=false;Ext.tree.TreeNode.superclass.constructor.call(this,C);this.expanded=C.expanded===true;this.isTarget=C.isTarget!==false;this.draggable=C.draggable!==false&&C.allowDrag!==false;this.allowChildren=C.allowChildren!==false&&C.allowDrop!==false;this.text=C.text;this.disabled=C.disabled===true;this.addEvents("textchange","beforeexpand","beforecollapse","expand","disabledchange","collapse","beforeclick","click","checkchange","dblclick","contextmenu","beforechildrenrendered");var D=this.attributes.uiProvider||this.defaultUI||Ext.tree.TreeNodeUI;this.ui=new D(this)};Ext.extend(Ext.tree.TreeNode,Ext.data.Node,{preventHScroll:true,isExpanded:function(){return this.expanded},getUI:function(){return this.ui},setFirstChild:function(C){var D=this.firstChild;Ext.tree.TreeNode.superclass.setFirstChild.call(this,C);if(this.childrenRendered&&D&&C!=D){D.renderIndent(true,true)}if(this.rendered){this.renderIndent(true,true)}},setLastChild:function(D){var C=this.lastChild;Ext.tree.TreeNode.superclass.setLastChild.call(this,D);if(this.childrenRendered&&C&&D!=C){C.renderIndent(true,true)}if(this.rendered){this.renderIndent(true,true)}},appendChild:function(){var B=Ext.tree.TreeNode.superclass.appendChild.apply(this,arguments);if(B&&this.childrenRendered){B.render()}this.ui.updateExpandIcon();return B},removeChild:function(B){this.ownerTree.getSelectionModel().unselect(B);Ext.tree.TreeNode.superclass.removeChild.apply(this,arguments);if(this.childrenRendered){B.ui.remove()}if(this.childNodes.length<1){this.collapse(false,false)}else{this.ui.updateExpandIcon()}if(!this.firstChild&&!this.isHiddenRoot()){this.childrenRendered=false}return B},insertBefore:function(E,D){var F=Ext.tree.TreeNode.superclass.insertBefore.apply(this,arguments);if(F&&D&&this.childrenRendered){E.render()}this.ui.updateExpandIcon();return F},setText:function(D){var C=this.text;this.text=D;this.attributes.text=D;if(this.rendered){this.ui.onTextChange(this,D,C)}this.fireEvent("textchange",this,D,C)},select:function(){this.getOwnerTree().getSelectionModel().select(this)},unselect:function(){this.getOwnerTree().getSelectionModel().unselect(this)},isSelected:function(){return this.getOwnerTree().getSelectionModel().isSelected(this)},expand:function(D,F,E){if(!this.expanded){if(this.fireEvent("beforeexpand",this,D,F)===false){return }if(!this.childrenRendered){this.renderChildren()}this.expanded=true;if(!this.isHiddenRoot()&&(this.getOwnerTree().animate&&F!==false)||F){this.ui.animExpand(function(){this.fireEvent("expand",this);if(typeof E=="function"){E(this)}if(D===true){this.expandChildNodes(true)}}.createDelegate(this));return }else{this.ui.expand();this.fireEvent("expand",this);if(typeof E=="function"){E(this)}}}else{if(typeof E=="function"){E(this)}}if(D===true){this.expandChildNodes(true)}},isHiddenRoot:function(){return this.isRoot&&!this.getOwnerTree().rootVisible},collapse:function(J,G){if(this.expanded&&!this.isHiddenRoot()){if(this.fireEvent("beforecollapse",this,J,G)===false){return }this.expanded=false;if((this.getOwnerTree().animate&&G!==false)||G){this.ui.animCollapse(function(){this.fireEvent("collapse",this);if(J===true){this.collapseChildNodes(true)}}.createDelegate(this));return }else{this.ui.collapse();this.fireEvent("collapse",this)}}if(J===true){var H=this.childNodes;for(var I=0,F=H.length;I<F;I++){H[I].collapse(true,false)}}},delayedExpand:function(B){if(!this.expandProcId){this.expandProcId=this.expand.defer(B,this)}},cancelExpand:function(){if(this.expandProcId){clearTimeout(this.expandProcId)}this.expandProcId=false},toggle:function(){if(this.expanded){this.collapse()}else{this.expand()}},ensureVisible:function(D){var C=this.getOwnerTree();C.expandPath(this.parentNode.getPath(),false,function(){var A=C.getNodeById(this.id);C.getTreeEl().scrollChildIntoView(A.ui.anchor);Ext.callback(D)}.createDelegate(this))},expandChildNodes:function(H){var F=this.childNodes;for(var G=0,E=F.length;G<E;G++){F[G].expand(H)}},collapseChildNodes:function(H){var F=this.childNodes;for(var G=0,E=F.length;G<E;G++){F[G].collapse(H)}},disable:function(){this.disabled=true;this.unselect();if(this.rendered&&this.ui.onDisableChange){this.ui.onDisableChange(this,true)}this.fireEvent("disabledchange",this,true)},enable:function(){this.disabled=false;if(this.rendered&&this.ui.onDisableChange){this.ui.onDisableChange(this,false)}this.fireEvent("disabledchange",this,false)},renderChildren:function(H){if(H!==false){this.fireEvent("beforechildrenrendered",this)}var F=this.childNodes;for(var G=0,E=F.length;G<E;G++){F[G].render(true)}this.childrenRendered=true},sort:function(G,H){Ext.tree.TreeNode.superclass.sort.apply(this,arguments);if(this.childrenRendered){var I=this.childNodes;for(var J=0,F=I.length;J<F;J++){I[J].render(true)}}},render:function(B){this.ui.render(B);if(!this.rendered){this.getOwnerTree().registerNode(this);this.rendered=true;if(this.expanded){this.expanded=false;this.expand(false,false)}}},renderIndent:function(J,G){if(G){this.ui.childIndent=null}this.ui.renderIndent();if(J===true&&this.childrenRendered){var H=this.childNodes;for(var I=0,F=H.length;I<F;I++){H[I].renderIndent(true,G)}}},beginUpdate:function(){this.childrenRendered=false},endUpdate:function(){if(this.expanded&&this.rendered){this.renderChildren()}},destroy:function(){for(var D=0,C=this.childNodes.length;D<C;D++){this.childNodes[D].destroy()}this.childNodes=null;if(this.ui.destroy){this.ui.destroy()}}});Ext.tree.AsyncTreeNode=function(B){this.loaded=false;this.loading=false;Ext.tree.AsyncTreeNode.superclass.constructor.apply(this,arguments);this.addEvents("beforeload","load")};Ext.extend(Ext.tree.AsyncTreeNode,Ext.tree.TreeNode,{expand:function(L,J,H){if(this.loading){var I;var K=function(){if(!this.loading){clearInterval(I);this.expand(L,J,H)}}.createDelegate(this);I=setInterval(K,200);return }if(!this.loaded){if(this.fireEvent("beforeload",this)===false){return }this.loading=true;this.ui.beforeLoad(this);var G=this.loader||this.attributes.loader||this.getOwnerTree().getLoader();if(G){G.load(this,this.loadComplete.createDelegate(this,[L,J,H]));return }}Ext.tree.AsyncTreeNode.superclass.expand.call(this,L,J,H)},isLoading:function(){return this.loading},loadComplete:function(D,F,E){this.loading=false;this.loaded=true;this.ui.afterLoad(this);this.fireEvent("load",this);this.expand(D,F,E)},isLoaded:function(){return this.loaded},hasChildNodes:function(){if(!this.isLeaf()&&!this.loaded){return true}else{return Ext.tree.AsyncTreeNode.superclass.hasChildNodes.call(this)}},reload:function(B){this.collapse(false,false);while(this.firstChild){this.removeChild(this.firstChild)}this.childrenRendered=false;this.loaded=false;if(this.isHiddenRoot()){this.expanded=false}this.expand(false,false,B)}});Ext.tree.TreeNodeUI=function(B){this.node=B;this.rendered=false;this.animating=false;this.wasLeaf=true;this.ecc="x-tree-ec-icon x-tree-elbow";this.emptyIcon=Ext.BLANK_IMAGE_URL};Ext.tree.TreeNodeUI.prototype={removeChild:function(B){if(this.rendered){this.ctNode.removeChild(B.ui.getEl())}},beforeLoad:function(){this.addClass("x-tree-node-loading")},afterLoad:function(){this.removeClass("x-tree-node-loading")},onTextChange:function(F,E,D){if(this.rendered){this.textNode.innerHTML=E}},onDisableChange:function(C,D){this.disabled=D;if(this.checkbox){this.checkbox.disabled=D}if(D){this.addClass("x-tree-node-disabled")}else{this.removeClass("x-tree-node-disabled")}},onSelectedChange:function(B){if(B){this.focus();this.addClass("x-tree-selected")}else{this.removeClass("x-tree-selected")}},onMove:function(I,K,M,L,N,P){this.childIndent=null;if(this.rendered){var J=L.ui.getContainer();if(!J){this.holder=document.createElement("div");this.holder.appendChild(this.wrap);return }var O=P?P.ui.getEl():null;if(O){J.insertBefore(this.wrap,O)}else{J.appendChild(this.wrap)}this.node.renderIndent(true)}},addClass:function(B){if(this.elNode){Ext.fly(this.elNode).addClass(B)}},removeClass:function(B){if(this.elNode){Ext.fly(this.elNode).removeClass(B)}},remove:function(){if(this.rendered){this.holder=document.createElement("div");this.holder.appendChild(this.wrap)}},fireEvent:function(){return this.node.fireEvent.apply(this.node,arguments)},initEvents:function(){this.node.on("move",this.onMove,this);if(this.node.disabled){this.addClass("x-tree-node-disabled");if(this.checkbox){this.checkbox.disabled=true}}if(this.node.hidden){this.hide()}var D=this.node.getOwnerTree();var C=D.enableDD||D.enableDrag||D.enableDrop;if(C&&(!this.node.isRoot||D.rootVisible)){Ext.dd.Registry.register(this.elNode,{node:this.node,handles:this.getDDHandles(),isHandle:false})}},getDDHandles:function(){return[this.iconNode,this.textNode,this.elNode]},hide:function(){this.node.hidden=true;if(this.wrap){this.wrap.style.display="none"}},show:function(){this.node.hidden=false;if(this.wrap){this.wrap.style.display=""}},onContextMenu:function(B){if(this.node.hasListener("contextmenu")||this.node.getOwnerTree().hasListener("contextmenu")){B.preventDefault();this.focus();this.fireEvent("contextmenu",this.node,B)}},onClick:function(D){if(this.dropping){D.stopEvent();return }if(this.fireEvent("beforeclick",this.node,D)!==false){var C=D.getTarget("a");if(!this.disabled&&this.node.attributes.href&&C){this.fireEvent("click",this.node,D);return }else{if(C&&D.ctrlKey){D.stopEvent()}}D.preventDefault();if(this.disabled){return }if(this.node.attributes.singleClickExpand&&!this.animating&&this.node.hasChildNodes()){this.node.toggle()}this.fireEvent("click",this.node,D)}else{D.stopEvent()}},onDblClick:function(B){B.preventDefault();if(this.disabled){return }if(this.checkbox){this.toggleCheck()}if(!this.animating&&this.node.hasChildNodes()){this.node.toggle()}this.fireEvent("dblclick",this.node,B)},onOver:function(B){this.addClass("x-tree-node-over")},onOut:function(B){this.removeClass("x-tree-node-over")},onCheckChange:function(){var B=this.checkbox.checked;this.checkbox.defaultChecked=B;this.node.attributes.checked=B;this.fireEvent("checkchange",this.node,B)},ecClick:function(B){if(!this.animating&&(this.node.hasChildNodes()||this.node.attributes.expandable)){this.node.toggle()}},startDrop:function(){this.dropping=true},endDrop:function(){setTimeout(function(){this.dropping=false}.createDelegate(this),50)},expand:function(){this.updateExpandIcon();this.ctNode.style.display=""},focus:function(){if(!this.node.preventHScroll){try{this.anchor.focus()}catch(E){}}else{if(!Ext.isIE){try{var F=this.node.getOwnerTree().getTreeEl().dom;var D=F.scrollLeft;this.anchor.focus();F.scrollLeft=D}catch(E){}}}},toggleCheck:function(D){var C=this.checkbox;if(C){C.checked=(D===undefined?!C.checked:D);this.onCheckChange()}},blur:function(){try{this.anchor.blur()}catch(B){}},animExpand:function(D){var C=Ext.get(this.ctNode);C.stopFx();if(!this.node.hasChildNodes()){this.updateExpandIcon();this.ctNode.style.display="";Ext.callback(D);return }this.animating=true;this.updateExpandIcon();C.slideIn("t",{callback:function(){this.animating=false;Ext.callback(D)},scope:this,duration:this.node.ownerTree.duration||0.25})},highlight:function(){var B=this.node.getOwnerTree();Ext.fly(this.wrap).highlight(B.hlColor||"C3DAF9",{endColor:B.hlBaseColor})},collapse:function(){this.updateExpandIcon();this.ctNode.style.display="none"},animCollapse:function(D){var C=Ext.get(this.ctNode);C.enableDisplayMode("block");C.stopFx();this.animating=true;this.updateExpandIcon();C.slideOut("t",{callback:function(){this.animating=false;Ext.callback(D)},scope:this,duration:this.node.ownerTree.duration||0.25})},getContainer:function(){return this.ctNode},getEl:function(){return this.wrap},appendDDGhost:function(B){B.appendChild(this.elNode.cloneNode(true))},getDDRepairXY:function(){return Ext.lib.Dom.getXY(this.iconNode)},onRender:function(){this.render()},render:function(H){var F=this.node,E=F.attributes;var G=F.parentNode?F.parentNode.ui.getContainer():F.ownerTree.innerCt.dom;if(!this.rendered){this.rendered=true;this.renderElements(F,E,G,H);if(E.qtip){if(this.textNode.setAttributeNS){this.textNode.setAttributeNS("ext","qtip",E.qtip);if(E.qtipTitle){this.textNode.setAttributeNS("ext","qtitle",E.qtipTitle)}}else{this.textNode.setAttribute("ext:qtip",E.qtip);if(E.qtipTitle){this.textNode.setAttribute("ext:qtitle",E.qtipTitle)}}}else{if(E.qtipCfg){E.qtipCfg.target=Ext.id(this.textNode);Ext.QuickTips.register(E.qtipCfg)}}this.initEvents();if(!this.node.expanded){this.updateExpandIcon(true)}}else{if(H===true){G.appendChild(this.wrap)}}},renderElements:function(K,P,Q,O){this.indentMarkup=K.parentNode?K.parentNode.ui.getChildIndent():"";var T=typeof P.checked=="boolean";var M=P.href?P.href:Ext.isGecko?"":"#";var L=['<li class="x-tree-node"><div ext:tree-node-id="',K.id,'" class="x-tree-node-el x-tree-node-leaf x-unselectable ',P.cls,'" unselectable="on">','<span class="x-tree-node-indent">',this.indentMarkup,"</span>",'<img src="',this.emptyIcon,'" class="x-tree-ec-icon x-tree-elbow" />','<img src="',P.icon||this.emptyIcon,'" class="x-tree-node-icon',(P.icon?" x-tree-node-inline-icon":""),(P.iconCls?" "+P.iconCls:""),'" unselectable="on" />',T?('<input class="x-tree-node-cb" type="checkbox" '+(P.checked?'checked="checked" />':"/>")):"",'<a hidefocus="on" class="x-tree-node-anchor" href="',M,'" tabIndex="1" ',P.hrefTarget?' target="'+P.hrefTarget+'"':"",'><span unselectable="on">',K.text,"</span></a></div>",'<ul class="x-tree-node-ct" style="display:none;"></ul>',"</li>"].join("");var N;if(O!==true&&K.nextSibling&&(N=K.nextSibling.ui.getEl())){this.wrap=Ext.DomHelper.insertHtml("beforeBegin",N,L)}else{this.wrap=Ext.DomHelper.insertHtml("beforeEnd",Q,L)}this.elNode=this.wrap.childNodes[0];this.ctNode=this.wrap.childNodes[1];var R=this.elNode.childNodes;this.indentNode=R[0];this.ecNode=R[1];this.iconNode=R[2];var S=3;if(T){this.checkbox=R[3];this.checkbox.defaultChecked=this.checkbox.checked;S++}this.anchor=R[S];this.textNode=R[S].firstChild},getAnchor:function(){return this.anchor},getTextEl:function(){return this.textNode},getIconEl:function(){return this.iconNode},isChecked:function(){return this.checkbox?this.checkbox.checked:false},updateExpandIcon:function(){if(this.rendered){var H=this.node,J,K;var G=H.isLast()?"x-tree-elbow-end":"x-tree-elbow";var I=H.hasChildNodes();if(I||H.attributes.expandable){if(H.expanded){G+="-minus";J="x-tree-node-collapsed";K="x-tree-node-expanded"}else{G+="-plus";J="x-tree-node-expanded";K="x-tree-node-collapsed"}if(this.wasLeaf){this.removeClass("x-tree-node-leaf");this.wasLeaf=false}if(this.c1!=J||this.c2!=K){Ext.fly(this.elNode).replaceClass(J,K);this.c1=J;this.c2=K}}else{if(!this.wasLeaf){Ext.fly(this.elNode).replaceClass("x-tree-node-expanded","x-tree-node-leaf");delete this.c1;delete this.c2;this.wasLeaf=true}}var L="x-tree-ec-icon "+G;if(this.ecc!=L){this.ecNode.className=L;this.ecc=L}}},getChildIndent:function(){if(!this.childIndent){var C=[];var D=this.node;while(D){if(!D.isRoot||(D.isRoot&&D.ownerTree.rootVisible)){if(!D.isLast()){C.unshift('<img src="'+this.emptyIcon+'" class="x-tree-elbow-line" />')}else{C.unshift('<img src="'+this.emptyIcon+'" class="x-tree-icon" />')}}D=D.parentNode}this.childIndent=C.join("")}return this.childIndent},renderIndent:function(){if(this.rendered){var C="";var D=this.node.parentNode;if(D){C=D.ui.getChildIndent()}if(this.indentMarkup!=C){this.indentNode.innerHTML=C;this.indentMarkup=C}this.updateExpandIcon()}},destroy:function(){if(this.elNode){Ext.dd.Registry.unregister(this.elNode.id)}delete this.elNode;delete this.ctNode;delete this.indentNode;delete this.ecNode;delete this.iconNode;delete this.checkbox;delete this.anchor;delete this.textNode;Ext.removeNode(this.ctNode)}};Ext.tree.RootTreeNodeUI=Ext.extend(Ext.tree.TreeNodeUI,{render:function(){if(!this.rendered){var B=this.node.ownerTree.innerCt.dom;this.node.expanded=true;B.innerHTML='<div class="x-tree-root-node"></div>';this.wrap=this.ctNode=B.firstChild}},collapse:Ext.emptyFn,expand:Ext.emptyFn});Ext.tree.TreeLoader=function(B){this.baseParams={};Ext.apply(this,B);this.addEvents("beforeload","load","loadexception");Ext.tree.TreeLoader.superclass.constructor.call(this)};Ext.extend(Ext.tree.TreeLoader,Ext.util.Observable,{uiProviders:{},clearOnLoad:true,load:function(C,D){if(this.clearOnLoad){while(C.firstChild){C.removeChild(C.firstChild)}}if(this.doPreload(C)){if(typeof D=="function"){D()}}else{if(this.dataUrl||this.url){this.requestData(C,D)}}},doPreload:function(H){if(H.attributes.children){if(H.childNodes.length<1){var I=H.attributes.children;H.beginUpdate();for(var J=0,F=I.length;J<F;J++){var G=H.appendChild(this.createNode(I[J]));if(this.preloadChildren){this.doPreload(G)}}H.endUpdate()}return true}else{return false}},getParams:function(F){var E=[],G=this.baseParams;for(var H in G){if(typeof G[H]!="function"){E.push(encodeURIComponent(H),"=",encodeURIComponent(G[H]),"&")}}E.push("node=",encodeURIComponent(F.id));return E.join("")},requestData:function(C,D){if(this.fireEvent("beforeload",this,C,D)!==false){this.transId=Ext.Ajax.request({method:this.requestMethod,url:this.dataUrl||this.url,success:this.handleResponse,failure:this.handleFailure,scope:this,argument:{callback:D,node:C},params:this.getParams(C)})}else{if(typeof D=="function"){D()}}},isLoading:function(){return this.transId?true:false},abort:function(){if(this.isLoading()){Ext.Ajax.abort(this.transId)}},createNode:function(attr){if(this.baseAttrs){Ext.applyIf(attr,this.baseAttrs)}if(this.applyLoader!==false){attr.loader=this}if(typeof attr.uiProvider=="string"){attr.uiProvider=this.uiProviders[attr.uiProvider]||eval(attr.uiProvider)}return(attr.leaf?new Ext.tree.TreeNode(attr):new Ext.tree.AsyncTreeNode(attr))},processResponse:function(response,node,callback){var json=response.responseText;try{var o=eval("("+json+")");node.beginUpdate();for(var i=0,len=o.length;i<len;i++){var n=this.createNode(o[i]);if(n){node.appendChild(n)}}node.endUpdate();if(typeof callback=="function"){callback(this,node)}}catch(e){this.handleFailure(response)}},handleResponse:function(D){this.transId=false;var C=D.argument;this.processResponse(D,C.node,C.callback);this.fireEvent("load",this,C.node,D)},handleFailure:function(D){this.transId=false;var C=D.argument;this.fireEvent("loadexception",this,C.node,D);if(typeof C.callback=="function"){C.callback(this,C.node)}}});Ext.tree.TreeFilter=function(C,D){this.tree=C;this.filtered={};Ext.apply(this,D)};Ext.tree.TreeFilter.prototype={clearBlank:false,reverse:false,autoClear:false,remove:false,filter:function(H,F,J){F=F||"text";var I;if(typeof H=="string"){var G=H.length;if(G==0&&this.clearBlank){this.clear();return }H=H.toLowerCase();I=function(A){return A.attributes[F].substr(0,G).toLowerCase()==H}}else{if(H.exec){I=function(A){return H.test(A.attributes[F])}}else{throw"Illegal filter type, must be string or regex"}}this.filterBy(I,null,J)},filterBy:function(N,O,P){P=P||this.tree.root;if(this.autoClear){this.clear()}var I=this.filtered,J=this.reverse;var M=function(A){if(A==P){return true}if(I[A.id]){return false}var B=N.call(O||A,A);if(!B||J){I[A.id]=A;A.ui.hide();return false}return true};P.cascade(M);if(this.remove){for(var K in I){if(typeof K!="function"){var L=I[K];if(L&&L.parentNode){L.parentNode.removeChild(L)}}}}},clear:function(){var H=this.tree;var E=this.filtered;for(var F in E){if(typeof F!="function"){var G=E[F];if(G){G.ui.show()}}}this.filtered={}}};Ext.tree.TreeSorter=function(P,O){Ext.apply(this,O);P.on("beforechildrenrendered",this.doSort,this);P.on("append",this.updateSort,this);P.on("insert",this.updateSort,this);P.on("textchange",this.updateSortParent,this);var M=this.dir&&this.dir.toLowerCase()=="desc";var L=this.property||"text";var K=this.sortType;var I=this.folderSort;var N=this.caseSensitive===true;var J=this.leafAttr||"leaf";this.sortFn=function(C,D){if(I){if(C.attributes[J]&&!D.attributes[J]){return 1}if(!C.attributes[J]&&D.attributes[J]){return -1}}var A=K?K(C):(N?C.attributes[L]:C.attributes[L].toUpperCase());var B=K?K(D):(N?D.attributes[L]:D.attributes[L].toUpperCase());if(A<B){return M?+1:-1}else{if(A>B){return M?-1:+1}else{return 0}}}};Ext.tree.TreeSorter.prototype={doSort:function(B){B.sort(this.sortFn)},compareNodes:function(D,C){return(D.text.toUpperCase()>C.text.toUpperCase()?1:-1)},updateSort:function(C,D){if(D.childrenRendered){this.doSort.defer(1,this,[D])}},updateSortParent:function(C){var D=C.parentNode;if(D&&D.childrenRendered){this.doSort.defer(1,this,[D])}}};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(G,E){Ext.form.Field.superclass.onRender.call(this,G,E);if(!this.el){var H=this.getAutoCreate();if(!H.name){H.name=this.name||this.id}if(this.inputType){H.type=this.inputType}this.el=G.createChild(H,E)}var F=this.el.dom.type;if(F){if(F=="password"){F="text"}this.el.addClass("x-form-"+F)}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]);this.initValue()},initValue:function(){if(this.value!==undefined){this.setValue(this.value)}else{if(this.el.dom.value.length>0){this.setValue(this.el.dom.value)}}},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()},fireKey:function(B){if(B.isSpecialKey()){this.fireEvent("specialkey",this,B)}},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);this.el.on("blur",this.onBlur,this);this.originalValue=this.getValue()},onFocus:function(){if(!Ext.isOpera&&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(!Ext.isOpera&&this.focusClass){this.el.removeClass(this.focusClass)}this.hasFocus=false;if(this.validationEvent!==false&&this.validateOnBlur&&this.validationEvent!="blur"){this.validate()}var B=this.getValue();if(String(B)!==String(this.startValue)){this.fireEvent("change",this,B,this.startValue)}this.fireEvent("blur",this)},isValid:function(D){if(this.disabled){return true}var E=this.preventMark;this.preventMark=D===true;var F=this.validateValue(this.processValue(this.getRawValue()));this.preventMark=E;return F},validate:function(){if(this.disabled||this.validateValue(this.processValue(this.getRawValue()))){this.clearInvalid();return true}return false},processValue:function(B){return B},validateValue:function(B){return true},markInvalid:function(E){if(!this.rendered||this.preventMark){return }this.el.addClass(this.invalidClass);E=E||this.invalidText;switch(this.msgTarget){case"qtip":this.el.dom.qtip=E;this.el.dom.qclass="x-form-invalid-tip";if(Ext.QuickTips){Ext.QuickTips.enable()}break;case"title":this.el.dom.title=E;break;case"under":if(!this.errorEl){var F=this.getErrorCt();this.errorEl=F.createChild({cls:"x-form-invalid-msg"});this.errorEl.setWidth(F.getWidth(true)-20)}this.errorEl.update(E);Ext.form.Field.msgFx[this.msgFx].show(this.errorEl,this);break;case"side":if(!this.errorIcon){var F=this.getErrorCt();this.errorIcon=F.createChild({cls:"x-form-invalid-icon"})}this.alignErrorIcon();this.errorIcon.dom.qtip=E;this.errorIcon.dom.qclass="x-form-invalid-tip";this.errorIcon.show();this.on("resize",this.alignErrorIcon,this);break;default:var D=Ext.getDom(this.msgTarget);D.innerHTML=E;D.style.display=this.msgDisplay;break}this.fireEvent("invalid",this,E)},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 B=Ext.getDom(this.msgTarget);B.innerHTML="";B.style.display="none";break}this.fireEvent("valid",this)},getRawValue:function(){var B=this.rendered?this.el.getValue():Ext.value(this.value,"");if(B===this.emptyText){B=""}return B},getValue:function(){if(!this.rendered){return this.value}var B=this.el.getValue();if(B===this.emptyText||B===undefined){B=""}return B},setRawValue:function(B){return this.el.dom.value=(B===null||B===undefined?"":B)},setValue:function(B){this.value=B;if(this.rendered){this.el.dom.value=(B===null||B===undefined?"":B);this.validate()}},adjustSize:function(D,E){var F=Ext.form.Field.superclass.adjustSize.call(this,D,E);F.width=this.adjustWidth(this.el.dom.tagName,F.width);return F},adjustWidth:function(C,D){C=C.toLowerCase();if(typeof D=="number"&&!Ext.isSafari){if(Ext.isIE&&(C=="input"||C=="textarea")){if(C=="input"&&!Ext.isStrict){return this.inEditor?D:D-3}if(C=="input"&&Ext.isStrict){return D-(Ext.isIE6?4:1)}if(C=="textarea"&&Ext.isStrict){return D-2}}else{if(Ext.isOpera&&Ext.isStrict){if(C=="input"){return D+2}if(C=="textarea"){return D-2}}}}return D}});Ext.form.Field.msgFx={normal:{show:function(C,D){C.setDisplayed("block")},hide:function(C,D){C.setDisplayed(false).update("")}},slide:{show:function(C,D){C.slideIn("t",{stopFx:true})},hide:function(C,D){C.slideOut("t",{stopFx:true,useDisplay:true})}},slideRight:{show:function(C,D){C.fixDisplay();C.alignTo(D.el,"tl-tr");C.slideIn("l",{stopFx:true})},hide:function(C,D){C.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);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(C){if(this.stripCharsRe){var D=C.replace(this.stripCharsRe,"");if(D!==C){this.setRawValue(D);return D}}return C},filterValidation:function(B){if(!B.isNavKeyPress()){this.validationTask.delay(this.validationDelay)}},onKeyUpBuffered:function(B){if(!B.isNavKeyPress()){this.autoSize()}},onKeyUp:function(B){this.fireEvent("keyup",this,B)},onKeyDown:function(B){this.fireEvent("keydown",this,B)},onKeyPress:function(B){this.fireEvent("keypress",this,B)},reset:function(){Ext.form.TextField.superclass.reset.call(this);this.applyEmptyText()},applyEmptyText:function(){if(this.rendered&&this.emptyText&&this.getRawValue().length<1){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(H){var E=H.getKey();if(!Ext.isIE&&(H.isNavKeyPress()||E==H.BACKSPACE||(E==H.DELETE&&H.button==-1))){return }var F=H.getCharCode(),G=String.fromCharCode(F);if(Ext.isIE&&(H.isSpecialKey()||!G)){return }if(!this.maskRe.test(G)){H.stopEvent()}},setValue:function(B){if(this.emptyText&&this.el&&B!==undefined&&B!==null&&B!==""){this.el.removeClass(this.emptyClass)}Ext.form.TextField.superclass.setValue.apply(this,arguments);this.applyEmptyText();this.autoSize()},validateValue:function(D){if(D.length<1||D===this.emptyText){if(this.allowBlank){this.clearInvalid();return true}else{this.markInvalid(this.blankText);return false}}if(D.length<this.minLength){this.markInvalid(String.format(this.minLengthText,this.minLength));return false}if(D.length>this.maxLength){this.markInvalid(String.format(this.maxLengthText,this.maxLength));return false}if(this.vtype){var E=Ext.form.VTypes;if(!E[this.vtype](D,this)){this.markInvalid(this.vtypeText||E[this.vtype+"Text"]);return false}}if(typeof this.validator=="function"){var F=this.validator(D);if(F!==true){this.markInvalid(F);return false}}if(this.regex&&!this.regex.test(D)){this.markInvalid(this.regexText);return false}return true},selectText:function(G,F){var I=this.getRawValue();if(I.length>0){G=G===undefined?0:G;F=F===undefined?I.length:F;var H=this.el.dom;if(H.setSelectionRange){H.setSelectionRange(G,F)}else{if(H.createTextRange){var J=H.createTextRange();J.moveStart("character",G);J.moveEnd("character",F-I.length);J.select()}}}},autoSize:function(){if(!this.grow||!this.rendered){return }if(!this.metrics){this.metrics=Ext.util.TextMetrics.createInstance(this.el)}var G=this.el;var H=G.dom.value;var F=document.createElement("div");F.appendChild(document.createTextNode(H));H=F.innerHTML;F=null;H+="&#160;";var E=Math.min(this.growMax,Math.max(this.metrics.getWidth(H)+10,this.growMin));this.el.setWidth(E);this.fireEvent("autosize",this,E)}});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(C,D){Ext.form.TriggerField.superclass.onResize.call(this,C,D);if(typeof C=="number"){this.el.setWidth(this.adjustWidth("input",C-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(){this.errorIcon.alignTo(this.wrap,"tl-tr",[2,0])},onRender:function(D,C){Ext.form.TriggerField.superclass.onRender.call(this,D,C);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())}},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(B){if(B.getKey()==B.TAB){this.triggerBlur()}},onBlur:function(){},mimicBlur:function(B){if(!this.wrap.contains(B.target)&&this.validateBlur(B)){this.triggerBlur()}},triggerBlur:function(){this.mimicing=false;Ext.get(Ext.isIE?document.body:document).un("mousedown",this.mimicBlur);if(this.monitorTab){this.el.un("keydown",this.checkTab,this)}this.beforeBlur();this.wrap.removeClass("x-trigger-wrap-focus");Ext.form.TriggerField.superclass.onBlur.call(this)},beforeBlur:Ext.emptyFn,validateBlur:function(B){return true},onDisable:function(){Ext.form.TriggerField.superclass.onDisable.call(this);if(this.wrap){this.wrap.addClass("x-item-disabled")}},onEnable:function(){Ext.form.TriggerField.superclass.onEnable.call(this);if(this.wrap){this.wrap.removeClass("x-item-disabled")}},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(B){return this.triggers[B]},initTrigger:function(){var C=this.trigger.select(".x-form-trigger",true);this.wrap.setStyle("overflow","hidden");var D=this;C.each(function(G,A,H){G.hide=function(){var E=D.wrap.getWidth();this.dom.style.display="none";D.el.setWidth(E-D.trigger.getWidth())};G.show=function(){var E=D.wrap.getWidth();this.dom.style.display="";D.el.setWidth(E-D.trigger.getWidth())};var B="Trigger"+(H+1);if(this["hide"+B]){G.dom.style.display="none"}G.on("click",this["on"+B+"Click"],this,{preventDefault:true});G.addClassOnOver("x-form-trigger-over");G.addClassOnClick("x-form-trigger-click")},this);this.triggers=C.elements},onTrigger1Click:Ext.emptyFn,onTrigger2Click:Ext.emptyFn});Ext.reg("trigger",Ext.form.TriggerField);Ext.form.TextArea=Ext.extend(Ext.form.TextField,{growMin:60,growMax:1000,growAppend:"&#160;\n&#160;",growPad:0,enterIsSpecial:false,preventScrollbars:false,onRender:function(D,C){if(!this.el){this.defaultAutoCreate={tag:"textarea",style:"width:100px;height:60px;",autocomplete:"off"}}Ext.form.TextArea.superclass.onRender.call(this,D,C);if(this.grow){this.textSizeEl=Ext.DomHelper.append(document.body,{tag:"pre",cls:"x-form-grow-sizer"});if(this.preventScrollbars){this.el.setStyle("overflow","hidden")}this.el.setHeight(this.growMin)}},onDestroy:function(){if(this.textSizeEl){Ext.removeNode(this.textSizeEl)}Ext.form.TextArea.superclass.onDestroy.call(this)},fireKey:function(B){if(B.isSpecialKey()&&(this.enterIsSpecial||(B.getKey()!=B.ENTER||B.hasModifier()))){this.fireEvent("specialkey",this,B)}},onKeyUp:function(B){if(!B.isNavKeyPress()||B.getKey()==B.ENTER){this.autoSize()}},autoSize:function(){if(!this.grow||!this.textSizeEl){return }var G=this.el;var E=G.dom.value;var F=this.textSizeEl;F.innerHTML="";F.appendChild(document.createTextNode(E));E=F.innerHTML;Ext.fly(F).setWidth(this.el.getWidth());if(E.length<1){E="&#160;&#160;"}else{if(Ext.isIE){E=E.replace(/\n/g,"<p>&#160;</p>")}E+=this.growAppend}F.innerHTML=E;var H=Math.min(this.growMax,Math.max(F.offsetHeight,this.growMin)+this.growPad);if(H!=this.lastHeight){this.lastHeight=H;this.el.setHeight(H);this.fireEvent("autosize",this,H)}}});Ext.reg("textarea",Ext.form.TextArea);Ext.form.NumberField=Ext.extend(Ext.form.TextField,{fieldClass:"x-form-field x-form-num-field",allowDecimals:true,decimalSeparator:".",decimalPrecision:2,allowNegative:true,minValue:Number.NEGATIVE_INFINITY,maxValue:Number.MAX_VALUE,minText:"The minimum value for this field is {0}",maxText:"The maximum value for this field is {0}",nanText:"{0} is not a valid number",baseChars:"0123456789",initEvents:function(){Ext.form.NumberField.superclass.initEvents.call(this);var D=this.baseChars+"";if(this.allowDecimals){D+=this.decimalSeparator}if(this.allowNegative){D+="-"}this.stripCharsRe=new RegExp("[^"+D+"]","gi");var C=function(B){var F=B.getKey();if(!Ext.isIE&&(B.isSpecialKey()||F==B.BACKSPACE||F==B.DELETE)){return }var A=B.getCharCode();if(D.indexOf(String.fromCharCode(A))===-1){B.stopEvent()}};this.el.on("keypress",C,this)},validateValue:function(D){if(!Ext.form.NumberField.superclass.validateValue.call(this,D)){return false}if(D.length<1){return true}D=String(D).replace(this.decimalSeparator,".");if(isNaN(D)){this.markInvalid(String.format(this.nanText,D));return false}var C=this.parseValue(D);if(C<this.minValue){this.markInvalid(String.format(this.minText,this.minValue));return false}if(C>this.maxValue){this.markInvalid(String.format(this.maxText,this.maxValue));return false}return true},getValue:function(){return this.fixPrecision(this.parseValue(Ext.form.NumberField.superclass.getValue.call(this)))},setValue:function(B){B=typeof B=="number"?B:parseFloat(String(B).replace(this.decimalSeparator,"."));B=isNaN(B)?"":String(B).replace(".",this.decimalSeparator);Ext.form.NumberField.superclass.setValue.call(this,B)},parseValue:function(B){B=parseFloat(String(B).replace(this.decimalSeparator,"."));return isNaN(B)?"":B},fixPrecision:function(D){var C=isNaN(D);if(!this.allowDecimals||this.decimalPrecision==-1||C||!D){return C?"":D}return parseFloat(parseFloat(D).toFixed(this.decimalPrecision))},beforeBlur:function(){var B=this.parseValue(this.getRawValue());if(B){this.setValue(this.fixPrecision(B))}}});Ext.reg("numberfield",Ext.form.NumberField);Ext.form.ComboBox=Ext.extend(Ext.form.TriggerField,{defaultAutoCreate:{tag:"input",type:"text",size:"24",autocomplete:"off"},listClass:"",selectedClass:"x-combo-selected",triggerClass:"x-form-arrow-trigger",shadow:"sides",listAlign:"tl-bl?",maxHeight:300,minHeight:90,triggerAction:"query",minChars:4,typeAhead:false,queryDelay:500,pageSize:0,selectOnFocus:false,queryParam:"query",loadingText:"Loading...",resizable:false,handleHeight:8,editable:true,allQuery:"",mode:"remote",minListWidth:70,forceSelection:false,typeAheadDelay:250,lazyInit:true,initComponent:function(){Ext.form.ComboBox.superclass.initComponent.call(this);this.addEvents("expand","collapse","beforeselect","select","beforequery");if(this.transform){this.allowDomMove=false;var M=Ext.getDom(this.transform);if(!this.hiddenName){this.hiddenName=M.name}if(!this.store){this.mode="local";var I=[],L=M.options;for(var N=0,H=L.length;N<H;N++){var J=L[N];var K=(Ext.isIE?J.getAttributeNode("value").specified:J.hasAttribute("value"))?J.value:J.text;if(J.selected){this.value=K}I.push([K,J.text])}this.store=new Ext.data.SimpleStore({id:0,fields:["value","text"],data:I});this.valueField="value";this.displayField="text"}M.name=Ext.id();if(!this.lazyRender){this.target=true;this.el=Ext.DomHelper.insertBefore(M,this.autoCreate||this.defaultAutoCreate);Ext.removeNode(M);this.render(this.el.parentNode)}else{Ext.removeNode(M)}}else{if(Ext.isArray(this.store)){if(Ext.isArray(this.store[0])){this.store=new Ext.data.SimpleStore({fields:["value","text"],data:this.store});this.valueField="value"}else{this.store=new Ext.data.SimpleStore({fields:["text"],data:this.store,expandData:true});this.valueField="text"}this.displayField="text";this.mode="local"}}this.selectedIndex=-1;if(this.mode=="local"){if(this.initialConfig.queryDelay===undefined){this.queryDelay=10}if(this.initialConfig.minChars===undefined){this.minChars=0}}},onRender:function(D,C){Ext.form.ComboBox.superclass.onRender.call(this,D,C);if(this.hiddenName){this.hiddenField=this.el.insertSibling({tag:"input",type:"hidden",name:this.hiddenName,id:(this.hiddenId||this.hiddenName)},"before",true);this.hiddenField.value=this.hiddenValue!==undefined?this.hiddenValue:this.value!==undefined?this.value:"";this.el.dom.removeAttribute("name")}if(Ext.isGecko){this.el.dom.setAttribute("autocomplete","off")}if(!this.lazyInit){this.initList()}else{this.on("focus",this.initList,this,{single:true})}if(!this.editable){this.editable=true;this.setEditable(false)}},initList:function(){if(!this.list){var C="x-combo-list";this.list=new Ext.Layer({shadow:this.shadow,cls:[C,this.listClass].join(" "),constrain:false});var D=this.listWidth||Math.max(this.wrap.getWidth(),this.minListWidth);this.list.setWidth(D);this.list.swallowEvent("mousewheel");this.assetHeight=0;if(this.title){this.header=this.list.createChild({cls:C+"-hd",html:this.title});this.assetHeight+=this.header.getHeight()}this.innerList=this.list.createChild({cls:C+"-inner"});this.innerList.on("mouseover",this.onViewOver,this);this.innerList.on("mousemove",this.onViewMove,this);this.innerList.setWidth(D-this.list.getFrameWidth("lr"));if(this.pageSize){this.footer=this.list.createChild({cls:C+"-ft"});this.pageTb=new Ext.PagingToolbar({store:this.store,pageSize:this.pageSize,renderTo:this.footer});this.assetHeight+=this.footer.getHeight()}if(!this.tpl){this.tpl='<tpl for="."><div class="'+C+'-item">{'+this.displayField+"}</div></tpl>"}this.view=new Ext.DataView({applyTo:this.innerList,tpl:this.tpl,singleSelect:true,selectedClass:this.selectedClass,itemSelector:this.itemSelector||"."+C+"-item"});this.view.on("click",this.onViewClick,this);this.bindStore(this.store,true);if(this.resizable){this.resizer=new Ext.Resizable(this.list,{pinned:true,handles:"se"});this.resizer.on("resize",function(A,F,B){this.maxHeight=B-this.handleHeight-this.list.getFrameWidth("tb")-this.assetHeight;this.listWidth=F;this.innerList.setWidth(F-this.list.getFrameWidth("lr"));this.restrictHeight()},this);this[this.pageSize?"footer":"innerList"].setStyle("margin-bottom",this.handleHeight+"px")}}},bindStore:function(C,D){if(this.store&&!D){this.store.un("beforeload",this.onBeforeLoad,this);this.store.un("load",this.onLoad,this);this.store.un("loadexception",this.collapse,this);if(!C){this.store=null;if(this.view){this.view.setStore(null)}}}if(C){this.store=Ext.StoreMgr.lookup(C);this.store.on("beforeload",this.onBeforeLoad,this);this.store.on("load",this.onLoad,this);this.store.on("loadexception",this.collapse,this);if(this.view){this.view.setStore(C)}}},initEvents:function(){Ext.form.ComboBox.superclass.initEvents.call(this);this.keyNav=new Ext.KeyNav(this.el,{up:function(B){this.inKeyMode=true;this.selectPrev()},down:function(B){if(!this.isExpanded()){this.onTriggerClick()}else{this.inKeyMode=true;this.selectNext()}},enter:function(B){this.onViewClick();this.delayedCheck=true;this.unsetDelayCheck.defer(10,this)},esc:function(B){this.collapse()},tab:function(B){this.onViewClick(false);return true},scope:this,doRelay:function(E,F,D){if(D=="down"||this.scope.isExpanded()){return Ext.KeyNav.prototype.doRelay.apply(this,arguments)}return true},forceKeyDown:true});this.queryDelay=Math.max(this.queryDelay||10,this.mode=="local"?10:250);this.dqTask=new Ext.util.DelayedTask(this.initQuery,this);if(this.typeAhead){this.taTask=new Ext.util.DelayedTask(this.onTypeAhead,this)}if(this.editable!==false){this.el.on("keyup",this.onKeyUp,this)}if(this.forceSelection){this.on("blur",this.doForce,this)}},onDestroy:function(){if(this.view){this.view.el.removeAllListeners();this.view.el.remove();this.view.purgeListeners()}if(this.list){this.list.destroy()}this.bindStore(null);Ext.form.ComboBox.superclass.onDestroy.call(this)},unsetDelayCheck:function(){delete this.delayedCheck},fireKey:function(B){if(B.isNavKeyPress()&&!this.isExpanded()&&!this.delayedCheck){this.fireEvent("specialkey",this,B)}},onResize:function(D,F){Ext.form.ComboBox.superclass.onResize.apply(this,arguments);if(this.list&&this.listWidth===undefined){var E=Math.max(D,this.minListWidth);this.list.setWidth(E);this.innerList.setWidth(E-this.list.getFrameWidth("lr"))}},onEnable:function(){Ext.form.ComboBox.superclass.onEnable.apply(this,arguments);if(this.hiddenField){this.hiddenField.disabled=false}},onDisable:function(){Ext.form.ComboBox.superclass.onDisable.apply(this,arguments);if(this.hiddenField){this.hiddenField.disabled=true}},setEditable:function(B){if(B==this.editable){return }this.editable=B;if(!B){this.el.dom.setAttribute("readOnly",true);this.el.on("mousedown",this.onTriggerClick,this);this.el.addClass("x-combo-noedit")}else{this.el.dom.setAttribute("readOnly",false);this.el.un("mousedown",this.onTriggerClick,this);this.el.removeClass("x-combo-noedit")}},onBeforeLoad:function(){if(!this.hasFocus){return }this.innerList.update(this.loadingText?'<div class="loading-indicator">'+this.loadingText+"</div>":"");this.restrictHeight();this.selectedIndex=-1},onLoad:function(){if(!this.hasFocus){return }if(this.store.getCount()>0){this.expand();this.restrictHeight();if(this.lastQuery==this.allQuery){if(this.editable){this.el.dom.select()}if(!this.selectByValue(this.value,true)){this.select(0,true)}}else{this.selectNext();if(this.typeAhead&&this.lastKey!=Ext.EventObject.BACKSPACE&&this.lastKey!=Ext.EventObject.DELETE){this.taTask.delay(this.typeAheadDelay)}}}else{this.onEmptyResults()}},onTypeAhead:function(){if(this.store.getCount()>0){var H=this.store.getAt(0);var G=H.data[this.displayField];var E=G.length;var F=this.getRawValue().length;if(F!=E){this.setRawValue(G);this.selectText(F,G.length)}}},onSelect:function(C,D){if(this.fireEvent("beforeselect",this,C,D)!==false){this.setValue(C.data[this.valueField||this.displayField]);this.collapse();this.fireEvent("select",this,C,D)}},getValue:function(){if(this.valueField){return typeof this.value!="undefined"?this.value:""}else{return Ext.form.ComboBox.superclass.getValue.call(this)}},clearValue:function(){if(this.hiddenField){this.hiddenField.value=""}this.setRawValue("");this.lastSelectionText="";this.applyEmptyText();this.value=""},setValue:function(D){var E=D;if(this.valueField){var F=this.findRecord(this.valueField,D);if(F){E=F.data[this.displayField]}else{if(this.valueNotFoundText!==undefined){E=this.valueNotFoundText}}}this.lastSelectionText=E;if(this.hiddenField){this.hiddenField.value=D}Ext.form.ComboBox.superclass.setValue.call(this,E);this.value=D},findRecord:function(E,F){var D;if(this.store.getCount()>0){this.store.each(function(A){if(A.data[E]==F){D=A;return false}})}return D},onViewMove:function(D,C){this.inKeyMode=false},onViewOver:function(F,H){if(this.inKeyMode){return }var G=this.view.findItemFromChild(H);if(G){var E=this.view.indexOf(G);this.select(E,false)}},onViewClick:function(F){var D=this.view.getSelectedIndexes()[0];var E=this.store.getAt(D);if(E){this.onSelect(E,D)}if(F!==false){this.el.focus()}},restrictHeight:function(){this.innerList.dom.style.height="";var L=this.innerList.dom;var I=this.list.getFrameWidth("tb")+(this.resizable?this.handleHeight:0)+this.assetHeight;var K=Math.max(L.clientHeight,L.offsetHeight,L.scrollHeight);var G=this.getPosition()[1]-Ext.getBody().getScroll().top;var H=Ext.lib.Dom.getViewHeight()-G-this.getSize().height;var J=Math.max(G,H,this.minHeight||0)-this.list.shadowOffset-I-5;K=Math.min(K,J,this.maxHeight);this.innerList.setHeight(K);this.list.beginUpdate();this.list.setHeight(K+I);this.list.alignTo(this.wrap,this.listAlign);this.list.endUpdate()},onEmptyResults:function(){this.collapse()},isExpanded:function(){return this.list&&this.list.isVisible()},selectByValue:function(D,E){if(D!==undefined&&D!==null){var F=this.findRecord(this.valueField||this.displayField,D);if(F){this.select(this.store.indexOf(F),E);return true}}return false},select:function(D,E){this.selectedIndex=D;this.view.select(D);if(E!==false){var F=this.view.getNode(D);if(F){this.innerList.scrollChildIntoView(F,false)}}},selectNext:function(){var B=this.store.getCount();if(B>0){if(this.selectedIndex==-1){this.select(0)}else{if(this.selectedIndex<B-1){this.select(this.selectedIndex+1)}}}},selectPrev:function(){var B=this.store.getCount();if(B>0){if(this.selectedIndex==-1){this.select(0)}else{if(this.selectedIndex!=0){this.select(this.selectedIndex-1)}}}},onKeyUp:function(B){if(this.editable!==false&&!B.isSpecialKey()){this.lastKey=B.getKey();this.dqTask.delay(this.queryDelay)}},validateBlur:function(){return !this.list||!this.list.isVisible()},initQuery:function(){this.doQuery(this.getRawValue())},doForce:function(){if(this.el.dom.value.length>0){this.el.dom.value=this.lastSelectionText===undefined?"":this.lastSelectionText;this.applyEmptyText()}},doQuery:function(E,F){if(E===undefined||E===null){E=""}var D={query:E,forceAll:F,combo:this,cancel:false};if(this.fireEvent("beforequery",D)===false||D.cancel){return false}E=D.query;F=D.forceAll;if(F===true||(E.length>=this.minChars)){if(this.lastQuery!==E){this.lastQuery=E;if(this.mode=="local"){this.selectedIndex=-1;if(F){this.store.clearFilter()}else{this.store.filter(this.displayField,E)}this.onLoad()}else{this.store.baseParams[this.queryParam]=E;this.store.load({params:this.getParams(E)});this.expand()}}else{this.selectedIndex=-1;this.onLoad()}}},getParams:function(C){var D={};if(this.pageSize){D.start=0;D.limit=this.pageSize}return D},collapse:function(){if(!this.isExpanded()){return }this.list.hide();Ext.getDoc().un("mousewheel",this.collapseIf,this);Ext.getDoc().un("mousedown",this.collapseIf,this);this.fireEvent("collapse",this)},collapseIf:function(B){if(!B.within(this.wrap)&&!B.within(this.list)){this.collapse()}},expand:function(){if(this.isExpanded()||!this.hasFocus){return }this.list.alignTo(this.wrap,this.listAlign);this.list.show();this.innerList.setOverflow("auto");Ext.getDoc().on("mousewheel",this.collapseIf,this);Ext.getDoc().on("mousedown",this.collapseIf,this);this.fireEvent("expand",this)},onTriggerClick:function(){if(this.disabled){return }if(this.isExpanded()){this.collapse();this.el.focus()}else{this.onFocus({});if(this.triggerAction=="all"){this.doQuery(this.allQuery,true)}else{this.doQuery(this.getRawValue())}this.el.focus()}}});Ext.reg("combo",Ext.form.ComboBox);Ext.form.Checkbox=Ext.extend(Ext.form.Field,{focusClass:undefined,fieldClass:"x-form-field",checked:false,defaultAutoCreate:{tag:"input",type:"checkbox",autocomplete:"off"},initComponent:function(){Ext.form.Checkbox.superclass.initComponent.call(this);this.addEvents("check")},onResize:function(){Ext.form.Checkbox.superclass.onResize.apply(this,arguments);if(!this.boxLabel){this.el.alignTo(this.wrap,"c-c")}},initEvents:function(){Ext.form.Checkbox.superclass.initEvents.call(this);this.el.on("click",this.onClick,this);this.el.on("change",this.onClick,this)},getResizeEl:function(){return this.wrap},getPositionEl:function(){return this.wrap},markInvalid:Ext.emptyFn,clearInvalid:Ext.emptyFn,onRender:function(D,C){Ext.form.Checkbox.superclass.onRender.call(this,D,C);if(this.inputValue!==undefined){this.el.dom.value=this.inputValue}this.wrap=this.el.wrap({cls:"x-form-check-wrap"});if(this.boxLabel){this.wrap.createChild({tag:"label",htmlFor:this.el.id,cls:"x-form-cb-label",html:this.boxLabel})}if(this.checked){this.setValue(true)}else{this.checked=this.el.dom.checked}},onDestroy:function(){if(this.wrap){this.wrap.remove()}Ext.form.Checkbox.superclass.onDestroy.call(this)},initValue:Ext.emptyFn,getValue:function(){if(this.rendered){return this.el.dom.checked}return false},onClick:function(){if(this.el.dom.checked!=this.checked){this.setValue(this.el.dom.checked)}},setValue:function(B){this.checked=(B===true||B==="true"||B=="1"||String(B).toLowerCase()=="on");if(this.el&&this.el.dom){this.el.dom.checked=this.checked;this.el.dom.defaultChecked=this.checked}this.fireEvent("check",this,this.checked)}});Ext.reg("checkbox",Ext.form.Checkbox);Ext.form.Radio=Ext.extend(Ext.form.Checkbox,{inputType:"radio",markInvalid:Ext.emptyFn,clearInvalid:Ext.emptyFn,getGroupValue:function(){var C=this.el.up("form")||Ext.getBody();var D=C.child("input[name="+this.el.dom.name+"]:checked",true);return D?D.value:null},onClick:function(){if(this.el.dom.checked!=this.checked){var D=this.el.up("form")||Ext.getBody();var C=D.select("input[name="+this.el.dom.name+"]");C.each(function(A){if(A.dom.id==this.id){this.setValue(true)}else{Ext.getCmp(A.dom.id).setValue(false)}},this)}},setValue:function(C){if(typeof C=="boolean"){Ext.form.Radio.superclass.setValue.call(this,C)}else{var D=this.el.up("form").child("input[name="+this.el.dom.name+"][value="+C+"]",true);if(D){D.checked=true}}}});Ext.reg("radio",Ext.form.Radio);Ext.form.Hidden=Ext.extend(Ext.form.Field,{inputType:"hidden",onRender:function(){Ext.form.Hidden.superclass.onRender.apply(this,arguments)},initEvents:function(){this.originalValue=this.getValue()},setSize:Ext.emptyFn,setWidth:Ext.emptyFn,setHeight:Ext.emptyFn,setPosition:Ext.emptyFn,setPagePosition:Ext.emptyFn,markInvalid:Ext.emptyFn,clearInvalid:Ext.emptyFn});Ext.reg("hidden",Ext.form.Hidden);Ext.form.BasicForm=function(D,C){Ext.apply(this,C);this.items=new Ext.util.MixedCollection(false,function(A){return A.id||(A.id=Ext.id())});this.addEvents("beforeaction","actionfailed","actioncomplete");if(D){this.initEl(D)}Ext.form.BasicForm.superclass.constructor.call(this)};Ext.extend(Ext.form.BasicForm,Ext.util.Observable,{timeout:30,activeAction:null,trackResetOnLoad:false,initEl:function(B){this.el=Ext.get(B);this.id=this.el.id||Ext.id();if(!this.standardSubmit){this.el.on("submit",this.onSubmit,this)}this.el.addClass("x-form")},getEl:function(){return this.el},onSubmit:function(B){B.stopEvent()},destroy:function(){this.items.each(function(B){Ext.destroy(B)});if(this.el){this.el.removeAllListeners();this.el.remove()}this.purgeListeners()},isValid:function(){var B=true;this.items.each(function(A){if(!A.validate()){B=false}});return B},isDirty:function(){var B=false;this.items.each(function(A){if(A.isDirty()){B=true;return false}});return B},doAction:function(D,C){if(typeof D=="string"){D=new Ext.form.Action.ACTION_TYPES[D](this,C)}if(this.fireEvent("beforeaction",this,D)!==false){this.beforeAction(D);D.run.defer(100,D)}return this},submit:function(D){if(this.standardSubmit){var C=this.isValid();if(C){this.el.dom.submit()}return C}this.doAction("submit",D);return this},load:function(B){this.doAction("load",B);return this},updateRecord:function(D){D.beginEdit();var C=D.fields;C.each(function(B){var A=this.findField(B.name);if(A){D.set(B.name,A.getValue())}},this);D.endEdit();return this},loadRecord:function(B){this.setValues(B.data);return this},beforeAction:function(C){var D=C.options;if(D.waitMsg){if(this.waitMsgTarget===true){this.el.mask(D.waitMsg,"x-mask-loading")}else{if(this.waitMsgTarget){this.waitMsgTarget=Ext.get(this.waitMsgTarget);this.waitMsgTarget.mask(D.waitMsg,"x-mask-loading")}else{Ext.MessageBox.wait(D.waitMsg,D.waitTitle||this.waitTitle||"Please Wait...")}}}},afterAction:function(D,E){this.activeAction=null;var F=D.options;if(F.waitMsg){if(this.waitMsgTarget===true){this.el.unmask()}else{if(this.waitMsgTarget){this.waitMsgTarget.unmask()}else{Ext.MessageBox.updateProgress(1);Ext.MessageBox.hide()}}}if(E){if(F.reset){this.reset()}Ext.callback(F.success,F.scope,[this,D]);this.fireEvent("actioncomplete",this,D)}else{Ext.callback(F.failure,F.scope,[this,D]);this.fireEvent("actionfailed",this,D)}},findField:function(D){var C=this.items.get(D);if(!C){this.items.each(function(A){if(A.isFormField&&(A.dataIndex==D||A.id==D||A.getName()==D)){C=A;return false}})}return C||null},markInvalid:function(I){if(Ext.isArray(I)){for(var M=0,H=I.length;M<H;M++){var N=I[M];var L=this.findField(N.id);if(L){L.markInvalid(N.msg)}}}else{var K,J;for(J in I){if(typeof I[J]!="function"&&(K=this.findField(J))){K.markInvalid(I[J])}}}return this},setValues:function(M){if(Ext.isArray(M)){for(var L=0,H=M.length;L<H;L++){var N=M[L];var K=this.findField(N.id);if(K){K.setValue(N.value);if(this.trackResetOnLoad){K.originalValue=K.getValue()}}}}else{var J,I;for(I in M){if(typeof M[I]!="function"&&(J=this.findField(I))){J.setValue(M[I]);if(this.trackResetOnLoad){J.originalValue=J.getValue()}}}}return this},getValues:function(D){var C=Ext.lib.Ajax.serializeForm(this.el.dom);if(D===true){return C}return Ext.urlDecode(C)},clearInvalid:function(){this.items.each(function(B){B.clearInvalid()});return this},reset:function(){this.items.each(function(B){B.reset()});return this},add:function(){this.items.addAll(Array.prototype.slice.call(arguments,0));return this},remove:function(B){this.items.remove(B);return this},render:function(){this.items.each(function(B){if(B.isFormField&&!B.rendered&&document.getElementById(B.id)){B.applyToMarkup(B.id)}});return this},applyToFields:function(B){this.items.each(function(A){Ext.apply(A,B)});return this},applyIfToFields:function(B){this.items.each(function(A){Ext.applyIf(A,B)});return this}});Ext.BasicForm=Ext.form.BasicForm;Ext.FormPanel=Ext.extend(Ext.Panel,{buttonAlign:"center",minButtonWidth:75,labelAlign:"left",monitorValid:false,monitorPoll:200,layout:"form",initComponent:function(){this.form=this.createForm();Ext.FormPanel.superclass.initComponent.call(this);this.addEvents("clientvalidation");this.relayEvents(this.form,["beforeaction","actionfailed","actioncomplete"])},createForm:function(){delete this.initialConfig.listeners;return new Ext.form.BasicForm(null,this.initialConfig)},initFields:function(){var E=this.form;var D=this;var F=function(A){if(A.doLayout&&A!=D){Ext.applyIf(A,{labelAlign:A.ownerCt.labelAlign,labelWidth:A.ownerCt.labelWidth,itemCls:A.ownerCt.itemCls});if(A.items){A.items.each(F)}}else{if(A.isFormField){E.add(A)}}};this.items.each(F)},getLayoutTarget:function(){return this.form.el},getForm:function(){return this.form},onRender:function(F,D){this.initFields();Ext.FormPanel.superclass.onRender.call(this,F,D);var E={tag:"form",method:this.method||"POST",id:this.formId||Ext.id()};if(this.fileUpload){E.enctype="multipart/form-data"}this.form.initEl(this.body.createChild(E))},beforeDestroy:function(){Ext.FormPanel.superclass.beforeDestroy.call(this);Ext.destroy(this.form)},initEvents:function(){Ext.FormPanel.superclass.initEvents.call(this);this.items.on("remove",this.onRemove,this);this.items.on("add",this.onAdd,this);if(this.monitorValid){this.startMonitoring()}},onAdd:function(C,D){if(D.isFormField){this.form.add(D)}},onRemove:function(B){if(B.isFormField){Ext.destroy(B.container.up(".x-form-item"));this.form.remove(B)}},startMonitoring:function(){if(!this.bound){this.bound=true;Ext.TaskMgr.start({run:this.bindHandler,interval:this.monitorPoll||200,scope:this})}},stopMonitoring:function(){this.bound=false},load:function(){this.form.load.apply(this.form,arguments)},onDisable:function(){Ext.FormPanel.superclass.onDisable.call(this);if(this.form){this.form.items.each(function(){this.disable()})}},onEnable:function(){Ext.FormPanel.superclass.onEnable.call(this);if(this.form){this.form.items.each(function(){this.enable()})}},bindHandler:function(){if(!this.bound){return false}var F=true;this.form.items.each(function(A){if(!A.isValid(true)){F=false;return false}});if(this.buttons){for(var G=0,E=this.buttons.length;G<E;G++){var H=this.buttons[G];if(H.formBind===true&&H.disabled===F){H.setDisabled(!F)}}}this.fireEvent("clientvalidation",this,F)}});Ext.reg("form",Ext.FormPanel);Ext.form.FormPanel=Ext.FormPanel;Ext.form.FieldSet=Ext.extend(Ext.Panel,{baseCls:"x-fieldset",layout:"form",onRender:function(F,D){if(!this.el){this.el=document.createElement("fieldset");this.el.id=this.id;if(this.title||this.header||this.checkboxToggle){this.el.appendChild(document.createElement("legend")).className="x-fieldset-header"}}Ext.form.FieldSet.superclass.onRender.call(this,F,D);if(this.checkboxToggle){var E=typeof this.checkboxToggle=="object"?this.checkboxToggle:{tag:"input",type:"checkbox",name:this.checkboxName||this.id+"-checkbox"};this.checkbox=this.header.insertFirst(E);this.checkbox.dom.checked=!this.collapsed;this.checkbox.on("click",this.onCheckClick,this)}},onCollapse:function(C,D){if(this.checkbox){this.checkbox.dom.checked=false}this.afterCollapse()},onExpand:function(C,D){if(this.checkbox){this.checkbox.dom.checked=true}this.afterExpand()},onCheckClick:function(){this[this.checkbox.dom.checked?"expand":"collapse"]()}});Ext.reg("fieldset",Ext.form.FieldSet);Ext.form.Action=function(D,C){this.form=D;this.options=C||{}};Ext.form.Action.CLIENT_INVALID="client";Ext.form.Action.SERVER_INVALID="server";Ext.form.Action.CONNECT_FAILURE="connect";Ext.form.Action.LOAD_FAILURE="load";Ext.form.Action.prototype={type:"default",run:function(B){},success:function(B){},handleResponse:function(B){},failure:function(B){this.response=B;this.failureType=Ext.form.Action.CONNECT_FAILURE;this.form.afterAction(this,false)},processResponse:function(B){this.response=B;if(!B.responseText){return true}this.result=this.handleResponse(B);return this.result},getUrl:function(E){var D=this.options.url||this.form.url||this.form.el.dom.action;if(E){var F=this.getParams();if(F){D+=(D.indexOf("?")!=-1?"&":"?")+F}}return D},getMethod:function(){return(this.options.method||this.form.method||this.form.el.dom.method||"POST").toUpperCase()},getParams:function(){var C=this.form.baseParams;var D=this.options.params;if(D){if(typeof D=="object"){D=Ext.urlEncode(Ext.applyIf(D,C))}else{if(typeof D=="string"&&C){D+="&"+Ext.urlEncode(C)}}}else{if(C){D=Ext.urlEncode(C)}}return D},createCallback:function(B){var B=B||{};return{success:this.success,failure:this.failure,scope:this,timeout:(B.timeout*1000)||(this.form.timeout*1000),upload:this.form.fileUpload?this.success:undefined}}};Ext.form.Action.Submit=function(D,C){Ext.form.Action.Submit.superclass.constructor.call(this,D,C)};Ext.extend(Ext.form.Action.Submit,Ext.form.Action,{type:"submit",run:function(){var F=this.options;var E=this.getMethod();var D=E=="GET";if(F.clientValidation===false||this.form.isValid()){Ext.Ajax.request(Ext.apply(this.createCallback(F),{form:this.form.el.dom,url:this.getUrl(D),method:E,headers:F.headers,params:!D?this.getParams():null,isUpload:this.form.fileUpload}))}else{if(F.clientValidation!==false){this.failureType=Ext.form.Action.CLIENT_INVALID;this.form.afterAction(this,false)}}},success:function(D){var C=this.processResponse(D);if(C===true||C.success){this.form.afterAction(this,true);return }if(C.errors){this.form.markInvalid(C.errors);this.failureType=Ext.form.Action.SERVER_INVALID}this.form.afterAction(this,false)},handleResponse:function(K){if(this.form.errorReader){var L=this.form.errorReader.read(K);var H=[];if(L.records){for(var J=0,G=L.records.length;J<G;J++){var I=L.records[J];H[J]=I.data}}if(H.length<1){H=null}return{success:L.success,errors:H}}return Ext.decode(K.responseText)}});Ext.form.Action.Load=function(D,C){Ext.form.Action.Load.superclass.constructor.call(this,D,C);this.reader=this.form.reader};Ext.extend(Ext.form.Action.Load,Ext.form.Action,{type:"load",run:function(){Ext.Ajax.request(Ext.apply(this.createCallback(this.options),{method:this.getMethod(),url:this.getUrl(false),headers:this.options.headers,params:this.getParams()}))},success:function(D){var C=this.processResponse(D);if(C===true||!C.success||!C.data){this.failureType=Ext.form.Action.LOAD_FAILURE;this.form.afterAction(this,false);return }this.form.clearInvalid();this.form.setValues(C.data);this.form.afterAction(this,true)},handleResponse:function(F){if(this.form.reader){var D=this.form.reader.read(F);var E=D.records&&D.records[0]?D.records[0].data:null;return{success:D.success,data:E}}return Ext.decode(F.responseText)}});Ext.form.Action.ACTION_TYPES={load:Ext.form.Action.Load,submit:Ext.form.Action.Submit};Ext.LoadMask=function(E,F){this.el=Ext.get(E);Ext.apply(this,F);if(this.store){this.store.on("beforeload",this.onBeforeLoad,this);this.store.on("load",this.onLoad,this);this.store.on("loadexception",this.onLoad,this);this.removeMask=Ext.value(this.removeMask,false)}else{var D=this.el.getUpdater();D.showLoadIndicator=false;D.on("beforeupdate",this.onBeforeLoad,this);D.on("update",this.onLoad,this);D.on("failure",this.onLoad,this);this.removeMask=Ext.value(this.removeMask,true)}};Ext.LoadMask.prototype={msg:"Loading...",msgCls:"x-mask-loading",disabled:false,disable:function(){this.disabled=true},enable:function(){this.disabled=false},onLoad:function(){this.el.unmask(this.removeMask)},onBeforeLoad:function(){if(!this.disabled){this.el.mask(this.msg,this.msgCls)}},show:function(){this.onBeforeLoad()},hide:function(){this.onLoad()},destroy:function(){if(this.store){this.store.un("beforeload",this.onBeforeLoad,this);this.store.un("load",this.onLoad,this);this.store.un("loadexception",this.onLoad,this)}else{var B=this.el.getUpdater();B.un("beforeupdate",this.onBeforeLoad,this);B.un("update",this.onLoad,this);B.un("failure",this.onLoad,this)}}};Ext.ProgressBar=Ext.extend(Ext.BoxComponent,{baseCls:"x-progress",waitTimer:null,initComponent:function(){Ext.ProgressBar.superclass.initComponent.call(this);this.addEvents("update")},onRender:function(H,F){Ext.ProgressBar.superclass.onRender.call(this,H,F);var I=new Ext.Template('<div class="{cls}-wrap">','<div class="{cls}-inner">','<div class="{cls}-bar">','<div class="{cls}-text">',"<div>&#160;</div>","</div>","</div>",'<div class="{cls}-text {cls}-text-back">',"<div>&#160;</div>","</div>","</div>","</div>");if(F){this.el=I.insertBefore(F,{cls:this.baseCls},true)}else{this.el=I.append(H,{cls:this.baseCls},true)}if(this.id){this.el.dom.id=this.id}var J=this.el.dom.firstChild;this.progressBar=Ext.get(J.firstChild);if(this.textEl){this.textEl=Ext.get(this.textEl);delete this.textTopEl}else{this.textTopEl=Ext.get(this.progressBar.dom.firstChild);var G=Ext.get(J.childNodes[1]);this.textTopEl.setStyle("z-index",99).addClass("x-hidden");this.textEl=new Ext.CompositeElement([this.textTopEl.dom.firstChild,G.dom.firstChild]);this.textEl.setWidth(J.offsetWidth)}this.progressBar.setHeight(J.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(F,E){this.value=F||0;if(E){this.updateText(E)}var D=Math.floor(F*this.el.dom.firstChild.offsetWidth);this.progressBar.setWidth(D);if(this.textTopEl){this.textTopEl.removeClass("x-hidden").setWidth(D)}this.fireEvent("update",this,F,E);return this},wait:function(D){if(!this.waitTimer){var C=this;D=D||{};this.waitTimer=Ext.TaskMgr.start({run:function(B){var A=D.increment||10;this.updateProgress(((((B+A)%A)+1)*(100/A))*0.01)},interval:D.interval||1000,duration:D.duration,onStop:function(){if(D.fn){D.fn.apply(D.scope||this)}this.reset()},scope:C})}return this},isWaiting:function(){return this.waitTimer!=null},updateText:function(B){this.text=B||"&#160;";this.textEl.update(this.text);return this},setSize:function(D,E){Ext.ProgressBar.superclass.setSize.call(this,D,E);if(this.textTopEl){var F=this.el.dom.firstChild;this.textEl.setSize(F.offsetWidth,F.offsetHeight)}return this},reset:function(B){this.updateProgress(0);if(this.textTopEl){this.textTopEl.addClass("x-hidden")}if(this.waitTimer){this.waitTimer.onStop=null;Ext.TaskMgr.stop(this.waitTimer);this.waitTimer=null}if(B===true){this.hide()}return this}});Ext.reg("progress",Ext.ProgressBar);function MarkerManager(D,E){var B=this;B.map_=D;B.mapZoom_=D.getZoom();B.projection_=D.getCurrentMapType().getProjection();E=E||{};B.tileSize_=MarkerManager.DEFAULT_TILE_SIZE_;var A=MarkerManager.DEFAULT_MAX_ZOOM_;if(E.maxZoom!=undefined){A=E.maxZoom}B.maxZoom_=A;B.trackMarkers_=E.trackMarkers;var C;if(typeof E.borderPadding=="number"){C=E.borderPadding}else{C=MarkerManager.DEFAULT_BORDER_PADDING_}B.swPadding_=new GSize(-C,C);B.nePadding_=new GSize(C,-C);B.borderPadding_=C;B.gridWidth_=[];B.grid_=[];B.grid_[A]=[];B.numMarkers_=[];B.numMarkers_[A]=0;GEvent.bind(D,"moveend",B,B.onMapMoveEnd_);B.removeOverlay_=function(F){D.removeOverlay(F);B.shownMarkers_--};B.addOverlay_=function(F){D.addOverlay(F);B.shownMarkers_++};B.resetManager_();B.shownMarkers_=0;B.shownBounds_=B.getMapGridBounds_()}MarkerManager.DEFAULT_TILE_SIZE_=1024;MarkerManager.DEFAULT_MAX_ZOOM_=17;MarkerManager.DEFAULT_BORDER_PADDING_=100;MarkerManager.MERCATOR_ZOOM_LEVEL_ZERO_RANGE=256;MarkerManager.prototype.resetManager_=function(){var C=this;var A=MarkerManager.MERCATOR_ZOOM_LEVEL_ZERO_RANGE;for(var B=0;B<=C.maxZoom_;++B){C.grid_[B]=[];C.numMarkers_[B]=0;C.gridWidth_[B]=Math.ceil(A/C.tileSize_);A<<=1}};MarkerManager.prototype.clearMarkers=function(){var A=this;A.processAll_(A.shownBounds_,A.removeOverlay_);A.resetManager_()};MarkerManager.prototype.getTilePoint_=function(D,B,C){var A=this.projection_.fromLatLngToPixel(D,B);return new GPoint(Math.floor((A.x+C.width)/this.tileSize_),Math.floor((A.y+C.height)/this.tileSize_))};MarkerManager.prototype.addMarkerBatch_=function(C,G,B){var F=C.getPoint();if(this.trackMarkers_){GEvent.bind(C,"changed",this,this.onMarkerMoved_)}var D=this.getTilePoint_(F,B,GSize.ZERO);for(var E=B;E>=G;E--){var A=this.getGridCellCreate_(D.x,D.y,E);A.push(C);D.x=D.x>>1;D.y=D.y>>1}};MarkerManager.prototype.isGridPointVisible_=function(B){var F=this;var D=F.shownBounds_.minY<=B.y&&B.y<=F.shownBounds_.maxY;var A=F.shownBounds_.minX;var C=A<=B.x&&B.x<=F.shownBounds_.maxX;if(!C&&A<0){var E=F.gridWidth_[F.shownBounds_.z];C=A+E<=B.x&&B.x<=E-1}return D&&C};MarkerManager.prototype.onMarkerMoved_=function(E,A,C){var G=this;var I=G.maxZoom_;var D=false;var B=G.getTilePoint_(A,I,GSize.ZERO);var F=G.getTilePoint_(C,I,GSize.ZERO);while(I>=0&&(B.x!=F.x||B.y!=F.y)){var H=G.getGridCellNoCreate_(B.x,B.y,I);if(H){if(G.removeFromArray(H,E)){G.getGridCellCreate_(F.x,F.y,I).push(E)}}if(I==G.mapZoom_){if(G.isGridPointVisible_(B)){if(!G.isGridPointVisible_(F)){G.removeOverlay_(E);D=true}}else{if(G.isGridPointVisible_(F)){G.addOverlay_(E);D=true}}}B.x=B.x>>1;B.y=B.y>>1;F.x=F.x>>1;F.y=F.y>>1;--I}if(D){G.notifyListeners_()}};MarkerManager.prototype.removeMarker=function(C){var F=this;var E=F.maxZoom_;var G=false;var B=C.getPoint();var D=F.getTilePoint_(B,E,GSize.ZERO);while(E>=0){var A=F.getGridCellNoCreate_(D.x,D.y,E);if(A){F.removeFromArray(A,C)}if(E==F.mapZoom_){if(F.isGridPointVisible_(D)){F.removeOverlay_(C);G=true}}D.x=D.x>>1;D.y=D.y>>1;--E}if(G){F.notifyListeners_()}};MarkerManager.prototype.addMarkers=function(D,E,C){var A=this.getOptMaxZoom_(C);for(var B=D.length-1;B>=0;B--){this.addMarkerBatch_(D[B],E,A)}this.numMarkers_[E]+=D.length};MarkerManager.prototype.getOptMaxZoom_=function(A){return A!=undefined?A:this.maxZoom_};MarkerManager.prototype.getMarkerCount=function(B){var A=0;for(var C=0;C<=B;C++){A+=this.numMarkers_[C]}return A};MarkerManager.prototype.addMarker=function(B,F,D){var E=this;var A=this.getOptMaxZoom_(D);E.addMarkerBatch_(B,F,A);var C=E.getTilePoint_(B.getPoint(),E.mapZoom_,GSize.ZERO);if(E.isGridPointVisible_(C)&&F<=E.shownBounds_.z&&E.shownBounds_.z<=A){E.addOverlay_(B);E.notifyListeners_()}this.numMarkers_[F]++};GBounds.prototype.containsPoint=function(A){var B=this;return(B.minX<=A.x&&B.maxX>=A.x&&B.minY<=A.y&&B.maxY>=A.y)};MarkerManager.prototype.getGridCellCreate_=function(A,F,E){var C=this.grid_[E];if(A<0){A+=this.gridWidth_[E]}var B=C[A];if(!B){B=C[A]=[];return B[F]=[]}var D=B[F];if(!D){return B[F]=[]}return D};MarkerManager.prototype.getGridCellNoCreate_=function(A,E,D){var C=this.grid_[D];if(A<0){A+=this.gridWidth_[D]}var B=C[A];return B?B[E]:undefined};MarkerManager.prototype.getGridBounds_=function(A,I,H,F){I=Math.min(I,this.maxZoom_);var B=A.getSouthWest();var E=A.getNorthEast();var G=this.getTilePoint_(B,I,H);var D=this.getTilePoint_(E,I,F);var J=this.gridWidth_[I];if(E.lng()<B.lng()||D.x<G.x){G.x-=J}if(D.x-G.x+1>=J){G.x=0;D.x=J-1}var C=new GBounds([G,D]);C.z=I;return C};MarkerManager.prototype.getMapGridBounds_=function(){var A=this;return A.getGridBounds_(A.map_.getBounds(),A.mapZoom_,A.swPadding_,A.nePadding_)};MarkerManager.prototype.onMapMoveEnd_=function(){var A=this;A.objectSetTimeout_(this,this.updateMarkers_,0)};MarkerManager.prototype.objectSetTimeout_=function(B,C,A){return window.setTimeout(function(){C.call(B)},A)};MarkerManager.prototype.refresh=function(){var A=this;if(A.shownMarkers_>0){A.processAll_(A.shownBounds_,A.removeOverlay_)}A.processAll_(A.shownBounds_,A.addOverlay_);A.notifyListeners_()};MarkerManager.prototype.updateMarkers_=function(){var A=this;A.mapZoom_=this.map_.getZoom();var B=A.getMapGridBounds_();if(B.equals(A.shownBounds_)&&B.z==A.shownBounds_.z){return }if(B.z!=A.shownBounds_.z){A.processAll_(A.shownBounds_,A.removeOverlay_);A.processAll_(B,A.addOverlay_)}else{A.rectangleDiff_(A.shownBounds_,B,A.removeCellMarkers_);A.rectangleDiff_(B,A.shownBounds_,A.addCellMarkers_)}A.shownBounds_=B;A.notifyListeners_()};MarkerManager.prototype.notifyListeners_=function(){GEvent.trigger(this,"changed",this.shownBounds_,this.shownMarkers_)};MarkerManager.prototype.processAll_=function(B,D){for(var A=B.minX;A<=B.maxX;A++){for(var C=B.minY;C<=B.maxY;C++){this.processCellMarkers_(A,C,B.z,D)}}};MarkerManager.prototype.processCellMarkers_=function(B,F,D,E){var A=this.getGridCellNoCreate_(B,F,D);if(A){for(var C=A.length-1;C>=0;C--){E(A[C])}}};MarkerManager.prototype.removeCellMarkers_=function(A,C,B){this.processCellMarkers_(A,C,B,this.removeOverlay_)};MarkerManager.prototype.addCellMarkers_=function(A,C,B){this.processCellMarkers_(A,C,B,this.addOverlay_)};MarkerManager.prototype.rectangleDiff_=function(B,A,D){var C=this;C.rectangleDiffCoords(B,A,function(E,F){D.apply(C,[E,F,B.z])})};MarkerManager.prototype.rectangleDiffCoords=function(B,A,L){var F=B.minX;var M=B.minY;var H=B.maxX;var D=B.maxY;var E=A.minX;var K=A.minY;var G=A.maxX;var C=A.maxY;for(var J=F;J<=H;J++){for(var I=M;I<=D&&I<K;I++){L(J,I)}for(var I=Math.max(C+1,M);I<=D;I++){L(J,I)}}for(var I=Math.max(M,K);I<=Math.min(D,C);I++){for(var J=Math.min(H+1,E)-1;J>=F;J--){L(J,I)}for(var J=Math.max(F,G+1);J<=H;J++){L(J,I)}}};MarkerManager.prototype.removeFromArray=function(E,C,D){var A=0;for(var B=0;B<E.length;++B){if(E[B]===C||(D&&E[B]==C)){E.splice(B--,1);A++}}return A};function LabeledMarker(B,A){this.latlng_=B;var A=A||{};this.opts_=A;this.labelText_=A.labelText||"";this.labelClass_=A.labelClass||"LabeledMarker_markerLabel";this.labelOffset_=A.labelOffset||new GSize(0,0);this.clickable_=A.clickable||true;this.title_=A.title||"";this.labelVisibility_=true;this.dynamicZIndex_=A.dynamicZIndex||true;if(A.draggable){A.draggable=false}GMarker.apply(this,arguments)}LabeledMarker.prototype=new GMarker(new GLatLng(0,0));LabeledMarker.prototype.initialize=function(E){GMarker.prototype.initialize.apply(this,arguments);this.map_=E;this.div_=document.createElement("div");this.div_.className=this.labelClass_;this.div_.innerHTML=this.labelText_;this.div_.style.position="absolute";this.div_.style.cursor="pointer";this.div_.title=this.title_;E.getPane(G_MAP_MARKER_PANE).appendChild(this.div_);if(this.dynamicZIndex_){var H=this;var G=function(){H.div_.previousSibling.style.zIndex=0;H.div_.style.zIndex=0};var B=function(){var I=GOverlay.getZIndex(H.latlng_.lat());H.div_.previousSibling.style.zIndex=I;H.div_.style.zIndex=I};GEvent.addDomListener(this,"mouseover",G);GEvent.addDomListener(this,"mouseout",B)}if(this.clickable_||this.dynamicZIndex_){function A(J,I){return function(){GEvent.trigger(J,I)}}var F=["click","dblclick","mousedown","mouseup","mouseover","mouseout"];for(var D=0;D<F.length;D++){var C=F[D];GEvent.addDomListener(this.div_,C,A(this,C))}}};LabeledMarker.prototype.redraw=function(A){GMarker.prototype.redraw.apply(this,arguments);var B=this.map_.fromLatLngToDivPixel(this.latlng_);var C=GOverlay.getZIndex(this.latlng_.lat());this.div_.style.left=(B.x+this.labelOffset_.width)+"px";this.div_.style.top=(B.y+this.labelOffset_.height)+"px";this.div_.style.zIndex=C};LabeledMarker.prototype.remove=function(){GEvent.clearInstanceListeners(this.div_);if(this.div_.outerHTML){this.div_.outerHTML=""}if(this.div_.parentNode){this.div_.parentNode.removeChild(this.div_)}this.div_=null;GMarker.prototype.remove.apply(this,arguments)};LabeledMarker.prototype.copy=function(){return new LabeledMarker(this.latlng_,this.opt_opts_)};LabeledMarker.prototype.show=function(){GMarker.prototype.show.apply(this,arguments);if(this.labelVisibility_){this.showLabel()}else{this.hideLabel()}};LabeledMarker.prototype.hide=function(){GMarker.prototype.hide.apply(this,arguments);this.hideLabel()};LabeledMarker.prototype.setLabelVisibility=function(A){this.labelVisibility_=A;if(!this.isHidden()){if(this.labelVisibility_){this.showLabel()}else{this.hideLabel()}}};LabeledMarker.prototype.getLabelVisibility=function(){return this.labelVisibility_};LabeledMarker.prototype.hideLabel=function(){this.div_.style.visibility="hidden"};LabeledMarker.prototype.showLabel=function(){this.div_.style.visibility="visible"};Ext.BLANK_IMAGE_URL="js/ext/resources/images/default/s.gif";Ext.namespace("kreisalarm");kreisalarm.drkmap=function(){var d="http://localhost:8080";var V=(""+window.location).indexOf("jsessionid")!=-1;var H;if(V){var g=decodeURIComponent(""+window.location);d=g.substring(g.indexOf("include=")+"include=".length);d=d.substring(0,d.indexOf("/","https://".length));H=g.substring(g.indexOf("jsessionid=")+"jsessionid=".length)}var R=null;var G=null;var T=0;var b=0;var A=null;var W=[];var P=null;var e=null;var Z=null;var J=null;var k=null;var S=false;var C=false;var I=true;var a=null;var B=null;var F=null;var E=/<!--ADDITIONAL/g;var D=/\/ADDITIONAL-->/g;var N=[];var M=[];var X=new Ext.XTemplate("<table><tbody>","<tr><th>Name:</th><td>{typ} {name}</td></tr>","<tr><th>Adresse:</th> <td>{strasse}<br> {plz} {ort}</td></tr>","<tr><th>Telefon:</th> <td>{telefon}</td></tr>","<tr><th>Telefax:</th><td>{telefax}</td></tr>",'<!--ADDITIONAL{[email=""]}<tpl if="this.exists(email)"><tr><th>E-Mail:</th><td><a href="mailto:{email}">{email}</a></td></tr></tpl>',' {[web=""]}<tpl if="this.exists(web)"><tr><th>Web:</th><td><a href="{web}" target="_blank">{web}</a></td></tr></tpl>','<tr><td></td><td><a href="#" onclick="kreisalarm.drkmap.routeBerechnenAnzeigen(null, \'{strasse}, {plz} {ort}\');return false">Route berechnen</a></td></tr>/ADDITIONAL-->',"</tbody></table>",{exists:function(l){return typeof l!="undefined"&&l!==null&&l!==""}});var O=function(o){O=function(p){if(typeof p=="function"){p()}};var l=Ext.getCmp("lvTree").root;var n=Ext.getCmp("kvTree").root;Ext.Ajax.request({url:"js/lvkv.json",method:"GET",disableCaching:false,failure:function(p,q){Ext.MessageBox.alert("Fehler",p.statusText)},success:function(q,s){var v=Ext.util.JSON.decode(q.responseText);for(var t=0;t<v.length;t++){v[t].zoomLevel=8;v[t].qtip=X.applyTemplate(v[t]);var p=v[t].kvs;delete v[t].kvs;var w=new Ext.tree.TreeNode(v[t]);for(var r=0;r<p.length;r++){p[r].zoomLevel=12;p[r].isLeaf=true;p[r].qtip=X.applyTemplate(p[r]);var u=new Ext.tree.TreeNode(p[r]);w.appendChild(u);n.appendChild(new Ext.tree.TreeNode(u.attributes))}l.appendChild(w)}if(typeof o=="function"){o()}}})};var L=function(s){L=function(){if(typeof s=="function"){s()}};var n=[];var u=[];var t=new GIcon();t.image="img/marker_lv.png";t.shadow="img/marker_lv_shadow.png";t.iconSize=new GSize(130,29);t.shadowSize=new GSize(144,29);t.iconAnchor=new GPoint(12,28);t.infoWindowAnchor=new GPoint(10,1);t.infoShadowAnchor=new GPoint(10,1);var o=new GIcon(t);o.image="img/marker_kv.png";var r=Ext.getCmp("lvTree");var l=Ext.getCmp("kvTree");r.getRootNode().eachChild(function(AA){var w=AA.text;var z=X.applyTemplate(AA.attributes);var x=AA.attributes.lat;var y=AA.attributes.lon;var v=new LabeledMarker(new GLatLng(y,x),{title:"LV "+w,labelText:"LV "+w,labelClass:"lvmarker",icon:t,labelOffset:new GSize(-9,-25)});v.bindInfoWindowHtml(z.replace(E,"").replace(D,""));n.push(v);AA.marker=v});markerManager.addMarkers(n,5);l.getRootNode().eachChild(function(AA){var w=AA.text;var z=X.applyTemplate({name:AA.attributes.name,strasse:AA.attributes.strasse,plz:AA.attributes.plz,ort:AA.attributes.ort,telefon:AA.attributes.telefon,telefax:AA.attributes.telefax,email:AA.attributes.email,web:AA.attributes.web});var x=AA.attributes.lat;var y=AA.attributes.lon;var v=new LabeledMarker(new GLatLng(y,x),{title:"KV "+w,labelText:"KV "+w,labelClass:"kvmarker",icon:o,labelOffset:new GSize(-9,-25)});v.bindInfoWindowHtml(z.replace(E,"").replace(D,""));u.push(v);AA.marker=v});markerManager.addMarkers(u,8);if(V){var q=new GLatLng(54.92238569063361,6.0765625);var p=new GIcon();p.image="img/lv_overlay2.png";p.iconSize=new GSize(420,566);p.iconAnchor=new GPoint(10,10);brdMmarker=new GMarker(q,{icon:p,clickable:false,draggable:false});markerManager.addMarkers([brdMmarker],6,6)}markerManager.refresh();Ext.get("chkLV").dom.checked=true;Ext.get("chkKV").dom.checked=true;if(typeof s=="function"){s()}};var c=function(){G=G||new GClientGeocoder();var l=P.findById("sucheStrasseFeld").getValue()+" "+P.findById("suchePLZFeld").getValue()+" "+P.findById("sucheOrtFeld").getValue();G.getLatLng(l,function(n){if(!n){Ext.get("ortSuchenErgebnisDiv").update("Adresse nicht gefunden").show(true);h()}else{R.setCenter(n,11);if(k!==null){R.removeOverlay(k)}k=new GMarker(n,{draggable:true,bouncy:false});T=n.lat();b=n.lng();R.addOverlay(k);k.openInfoWindowHtml(l);GEvent.addListener(k,"dragend",function(){T=this.getPoint().lat();b=this.getPoint().lng()});Q();if(!V){Ext.get("ortSuchenErgebnisDiv").update('<a href="#" onclick="kreisalarm.drkmap.routeBerechnenAnzeigen(\''+l+"');return false\">Route berechnen</a>").show(true)}else{Ext.get("ortSuchenErgebnisDiv").update('<a href="#" onclick="kreisalarm.drkmap.routeBerechnenAnzeigen(\''+l+'\');return false">Route berechnen</a><br><br><a href="#" onclick="Ext.getCmp(\'materialsuchePanel\').expand(true)">Materialsuche</a>').show(true)}}})};var U=function(n,l){if(n.distance&&l.distance){return(n.distance==l.distance)?0:(n.distance>l.distance)?1:-1}};var i=function(){if(A){R.removeOverlay(F)}A=A||new GDirections();var n=materialsuchePanel.findById("anzahlMaterialSuche").getValue();var AD=Ext.getCmp("optionenMaterialSuche");var t=AD.getValue();var q=(t==1);var r=(t==2);for(var v=0;v<M.length;v++){markerManager.removeMarker(M[v])}while(M.length){M.pop()}var p=null;if(!a){p=new GLatLng(T,b)}else{p=a}for(var w=0;w<N.length;w++){var AE=new GLatLng(N[w].lat,N[w].lon);var AC=p.distanceFrom(AE);N[w].distance=AC}N.sort(U);var u=new GIcon();u.image="img/marker_lv.png";u.shadow="img/marker_lv_shadow.png";u.iconSize=new GSize(130,29);u.shadowSize=new GSize(144,29);u.iconAnchor=new GPoint(12,28);u.infoWindowAnchor=new GPoint(10,1);u.infoShadowAnchor=new GPoint(10,1);var s=new GIcon();s.image="img/marker_kv.png";s.shadow="img/marker_lv_shadow.png";s.iconSize=new GSize(130,29);s.shadowSize=new GSize(144,29);s.iconAnchor=new GPoint(12,28);s.infoWindowAnchor=new GPoint(10,1);s.infoShadowAnchor=new GPoint(10,1);var y=0;var z=[];for(var x=0;x<N.length;x++){var AA=true;if(q){AA=N[x].anzahlMaterial>4}else{if(r){AA=N[x].anzahlMaterial>9}else{AA=true}}if(y<n&&N[x].anzahlMaterial!=0&&AA){z[z.length]=N[x];var o=new LabeledMarker(new GLatLng(N[x].lat,N[x].lon),{title:N[x].name,labelText:N[x].name+" (<b>"+N[x].anzahlMaterial+")</b>",labelClass:"lvmarker",icon:u,labelOffset:new GSize(-9,-25)});o.bindInfoWindowHtml("<b>"+N[x].name+"</b><br />"+N[x].adresse);M.push(o);y+=N[x].anzahlMaterial}else{var o=new LabeledMarker(new GLatLng(N[x].lat,N[x].lon),{title:N[x].name,labelText:N[x].name+" (<b>"+N[x].anzahlMaterial+")</b>",labelClass:"lvmarker",icon:s,labelOffset:new GSize(-9,-25)});o.bindInfoWindowHtml("<b>"+N[x].name+"</b><br />"+N[x].adresse);M.push(o)}}if(y==0){Ext.MessageBox.alert("Fehler","Es wurden keine Materialien gefunden.")}else{if(y<n){Ext.MessageBox.alert("Fehler","Es wurden weniger Materialien gefunden als gesucht.")}}var l=[new GLatLng(T,b)];for(var w=1;w<=z.length;w++){var AB=new GLatLng(z[w-1].lat,z[w-1].lon);l[w]=AB}A.loadFromWaypoints(l,{getPolyline:true});GEvent.addListener(A,"load",function(){F=this.getPolyline();R.addOverlay(F)});markerManager.addMarkers(M,8);markerManager.refresh()};var m=function(l){var n=document.createElement("script");n.setAttribute("type","text/javascript");n.setAttribute("src",l);document.getElementsByTagName("head").item(0).appendChild(n)};var Y=function(){if(window.self&&self.innerHeight){return self.innerHeight}if(document.documentElement&&document.documentElement.clientHeight){return document.documentElement.clientHeight}return 0};var K=function(){if(window.self&&self.innerHeight){return self.innerWidth}if(document.documentElement&&document.documentElement.clientWidth){return document.documentElement.clientWidth}return 0};var Q=function(){Ext.getCmp("sucheMaterialFeld").enable();Ext.getCmp("anzahlMaterialSuche").enable();Ext.getCmp("optionenMaterialSuche").enable()};var h=function(){Ext.getCmp("sucheMaterialFeld").disable();Ext.getCmp("buttonMaterialSuchen").disable();Ext.getCmp("anzahlMaterialSuche").disable();Ext.getCmp("optionenMaterialSuche").disable()};return{qtipTemplate:new Ext.XTemplate("<table><tbody>","<tr><th>Name:</th><td>{typ} {name}</td></tr>","<tr><th>Adresse:</th> <td>{strasse}<br> {plz} {ort}</td></tr>",'{[tel=""]}<tpl if="this.exists(tel)"><tr><th>Telefon:</th><td>{tel}</td></tr></tpl>','{[fax=""]}<tpl if="this.exists(fax)"><tr><th>Telefax:</th><td>{fax}</td></tr></tpl>','<!--ADDITIONAL{[email=""]}<tpl if="this.exists(email)"><tr><th>E-Mail:</th><td><a href="mailto:{email}">{email}</a></td></tr></tpl>',' {[web=""]}<tpl if="this.exists(web)"><tr><th>Web:</th><td><a href="{web}" target="_blank">{web}</a></td></tr></tpl>','<tr><td></td><td><a href="#" onclick="kreisalarm.drkmap.routeBerechnenAnzeigen(null, \'{strasse}, {plz} {ort}\');return false">Route berechnen</a></td></tr>/ADDITIONAL-->',"</tbody></table>",{exists:function(l){return typeof l!="undefined"&&l!==null&&l!==""}}),addOVs:function(l){for(var o=0;o<l.length;o++){if(l[o].lat!==""){N[N.length]=l[o]}}var q=new GIcon();q.image="img/marker_lv.png";q.shadow="img/marker_lv_shadow.png";q.iconSize=new GSize(130,29);q.shadowSize=new GSize(144,29);q.iconAnchor=new GPoint(12,28);q.infoWindowAnchor=new GPoint(10,1);q.infoShadowAnchor=new GPoint(10,1);var p=false;for(var o=0;o<N.length;o++){if(!p){R.setCenter(new GLatLng(N[o].lat,N[o].lon),11);p=true}var n=new LabeledMarker(new GLatLng(N[o].lat,N[o].lon),{title:N[o].name,labelText:N[o].name,labelClass:"lvmarker",icon:q,labelOffset:new GSize(-9,-25)});n.bindInfoWindowHtml("<b>"+N[o].name+"</b><br />"+N[o].adresse);M.push(n)}markerManager.addMarkers(M,8);markerManager.refresh()},gpsStandortBestimmen:function(){a=new GLatLng(49.141598,9.222083);R.setCenter(a,11);b=a.lng();T=a.lat();var n=new GIcon();n.image="img/rtw.gif";n.iconSize=new GSize(22,14);n.iconAnchor=new GPoint(0,0);n.iconSize=new GSize(22,14);var l=new GMarker(a,{title:name,icon:n});R.addOverlay(l);Q()},addMaterialDatas:function(l){for(var o=0;o<l.length;o++){for(var n=0;n<N.length;n++){if(N[n].id==l[o].ovID){N[n].anzahlMaterial=l[o].anzahl}}}i()},addMaterialTypes:function(l){for(var n=0;n<l.length;n++){W[n]=l[n]}kreisalarm.drkmap.init()},routeBerechnenAnzeigen:function(p,n){if(J==null){var l=new Ext.FormPanel({labelWidth:40,bodyStyle:"padding:5px 5px 0px 0px",height:140,region:"north",items:[{xtype:"textarea",fieldLabel:"Von",name:"routeVon",id:"routeVon",width:210,height:50,allowBlank:false,blankText:"Dieses Feld muss ausgefüllt werden"},{xtype:"textarea",fieldLabel:"Nach",name:"routeNach",id:"routeNach",value:n,width:210,height:50,allowBlank:false,blankText:"Dieses Feld muss ausgefüllt werden"},{xtype:"button",text:"Route berechnen",listeners:{click:function(){Ext.get("routeBeschreibung").update('<div style="width:100%;overflow:hidden;text-align:center">Bitte warten...</div>');J.gdir.load("from: "+Ext.DomQuery.selectNode("textarea[name=routeVon]").value+" to: "+Ext.DomQuery.selectNode("textarea[name=routeNach]").value,{locale:"de_DE"})}}}]});var o=navigator.appName=="Netscape"?window.innerWidth:navigator.appName.indexOf("Microsoft")!=-1?document.body.offsetWidth:630;J=new Ext.Window({title:"Route berechnen",width:300,height:400,closeAction:"hide",plain:false,resizable:true,layout:"border",x:o-595,y:90,items:[l,{autoScroll:true,contentEl:"routeBeschreibung",region:"center",height:192}],buttons:[{text:"Abbrechen",handler:function(){J.hide()}}],listeners:{hide:function(){J.gdir.clear();Ext.getCmp("routeVon").setValue("");Ext.getCmp("routeNach").setValue("");Ext.get("routeBeschreibung").update("")}}});J.gdir=new GDirections(R,document.getElementById("routeBeschreibung"));GEvent.addListener(J.gdir,"load",function(){Ext.get("routeBeschreibung").update('<div style="width:100%;text-align:center;font-weight:bold"><a href="http://maps.google.de/?ie=UTF8&hl=de&q=von+'+encodeURIComponent(Ext.DomQuery.selectNode("textarea[name=routeVon]").value)+"+nach+"+encodeURIComponent(Ext.DomQuery.selectNode("textarea[name=routeNach]").value)+'&f=q" target="_blank">Direkt in Google Maps \u00F6ffnen</a></div>')});GEvent.addListener(J.gdir,"error",function(){Ext.get("routeBeschreibung").update('<div style="font-weight:bold;color:#800000">'+(J.gdir.getStatus().code==G_GEO_UNKNOWN_ADDRESS?"Adresse nicht gefunden.":J.gdir.getStatus().code==G_GEO_SERVER_ERROR?"Fehler bei der \u00DCbertragung.":J.gdir.getStatus().code==G_GEO_MISSING_QUERY?"Query fehlt.":J.gdir.getStatus().code==G_GEO_BAD_KEY?"Falscher Key.":J.gdir.getStatus().code==G_GEO_BAD_REQUEST?"Bitte geben Sie die Adressen an.":"Unbekannter Fehler.")+"</div>").show(true)});if(p&&p!==""){Ext.getCmp("routeVon").setValue(p);p=p.replace(/´/g,"'")}if(n&&n!==""){n=n.replace(/´/g,"'");Ext.getCmp("routeNach").setValue(n)}}J.show(this)},filter:function(r){var p=r.id.substring(3,r.id.length);var q=r.checked;if(p=="LV"){var o=[];if(lvtree!==null){lvtree.getRootNode().eachChild(function(s){if(q){o.push(s.marker)}else{markerManager.removeMarker(s.marker)}})}if(o.length!==0){markerManager.addMarkers(o,5);markerManager.refresh()}}else{if(p=="KV"){var o=[];if(kvtree!==null){kvtree.getRootNode().eachChild(function(s){if(q){o.push(s.marker)}else{markerManager.removeMarker(s.marker)}})}if(o.length!=0){markerManager.addMarkers(o,8);markerManager.refresh()}}else{if(B==null){Ext.Ajax.request({url:"js/kategorien.json",method:"GET",disableCaching:false,success:function(u,w){var z=Ext.util.JSON.decode(u.responseText);B=[];for(var x=0;x<z.length;x++){B[z[x].name]=[];var y=new GIcon();y.image="img/marker_"+z[x].dateiname+".png";y.shadow="img/marker_lv_shadow.png";y.iconSize=new GSize(130,29);y.shadowSize=new GSize(144,29);y.iconAnchor=new GPoint(12,28);y.infoWindowAnchor=new GPoint(10,1);y.infoShadowAnchor=new GPoint(10,1);var s=z[x].eintraege;for(var v=0;v<s.length;v++){var t=new LabeledMarker(new GLatLng(s[v].lon,s[v].lat),{title:s[v].name,labelText:z[x].kuerzel==""?s[v].name:z[x].kuerzel+" in "+s[v].ort,labelClass:"lvmarker",icon:y,labelOffset:new GSize(-9,-25)});t.bindInfoWindowHtml(kreisalarm.drkmap.qtipTemplate.applyTemplate(s[v]).replace(E,"").replace(D,""));B[z[x].name].push(t)}}kreisalarm.drkmap.filter(r)},failure:function(s,t){alert("failure")}});return }var l=B[p];if(q){markerManager.addMarkers(l,5);markerManager.refresh()}else{for(var n=0;n<l.length;n++){markerManager.removeMarker(l[n])}}}}},preinit:function(){if(V){var l=d+"/alarmdaten/drkmap/materialtypen.js;jsessionid="+H;m(l)}else{kreisalarm.drkmap.init()}},init:function(){if(GBrowserIsCompatible()){var n=function(){document.getElementById("map").style.height=Y()+"px";document.getElementById("map").style.width=K()+"px";if(R){R.checkResize()}};n();R=new GMap2(document.getElementById("map"));R.addControl(new GLargeMapControl());R.enableScrollWheelZoom();R.setCenter(new GLatLng(49.140186,9.214486),6);var r=new GOverviewMapControl();R.addControl(r);var o=new GMapTypeControl();R.addControl(o);Ext.QuickTips.init();e={xtype:"panel",animate:true,title:"Kreisverb\u00E4nde",autoScroll:true,collapsed:true,iconCls:"kv-panel",listeners:{beforeexpand:{fn:function(w){O(L)},single:true}},items:[{xtype:"form",id:"filterForm",labelAlign:"left",labelWidth:40,items:[{xtype:"textfield",emptyText:"Name und Return",value:"",fieldLabel:"Name",name:"filterSucheFeld",id:"filterSucheFeld",listeners:{specialkey:function(w,x){if(x.getKey()==Ext.EventObject.ENTER){var y=Ext.getCmp("filterSucheFeld");kvFilter.clear();kvFilter.filter(y.getValue())}}}}]},{xtype:"treepanel",rootVisible:false,id:"kvTree",root:new Ext.tree.TreeNode({id:4711,leaf:false,expanded:true,text:"Kreisverbaende"}),listeners:{click:function(w){var x=new GLatLng(w.attributes.lon,w.attributes.lat);R.setCenter(x,w.attributes.zoomLevel);var y=X.applyTemplate(w.attributes);R.openInfoWindowHtml(x,y.replace(E,"").replace(D,""))},render:{fn:function(w){kvFilter=new Ext.tree.TreeFilter(w)},single:true}}}]};Z={xtype:"panel",animate:true,title:"Landesverb\u00E4nde",collapsed:true,autoScroll:true,iconCls:"lv-panel",layout:"fit",listeners:{beforeexpand:{fn:function(w){O(L)},single:true}},items:[{xtype:"treepanel",id:"lvTree",rootVisible:false,autoScroll:true,root:new Ext.tree.TreeNode({leaf:false,id:4712,text:"Landesverbaende"}),listeners:{click:function(w){var x=new GLatLng(w.attributes.lon,w.attributes.lat);R.setCenter(x,w.attributes.zoomLevel);var y=X.applyTemplate(w.attributes);R.openInfoWindowHtml(x,y.replace(E,"").replace(D,""))}}}]};addressauswahlPanel={xtype:"panel",animate:true,title:"Adressauswahl",bodyStyle:"padding:3px",hideBorders:true,collapsed:true,autoScroll:true,iconCls:"adress-panel",items:[{contentEl:"panelAnzeige"}],listeners:{beforeexpand:function(){O(L)}}};P=new Ext.Panel({xtype:"panel",animate:true,id:"ortssuchePanel",title:"Ortssuche",labelWidth:48,bodyStyle:"padding:3px",autoScroll:true,collapsed:true,iconCls:"os-panel",hideBorders:true,contentEl:"panelOrtSuche",items:[{xtype:"fieldset",autoHeight:true,labelWidth:50,items:[{xtype:"textfield",fieldLabel:"Stra\u00DFe",name:"sucheStrasseFeld",id:"sucheStrasseFeld",width:120},{xtype:"textfield",fieldLabel:"PLZ",name:"suchePLZFeld",id:"suchePLZFeld",width:120},{xtype:"textfield",fieldLabel:"Ort",name:"sucheOrtFeld",id:"sucheOrtFeld",width:120},{xtype:"button",text:"suchen",listeners:{click:c}}]}]});materialsuchePanel=!V?null:new Ext.Panel({xtype:"panel",animate:true,title:"Materialsuche",bodyStyle:"padding: 3px",defaultType:"textfield",collapsed:false,iconCls:"ms-panel",id:"materialsuchePanel",hideBorders:true,items:[{xtype:"fieldset",id:"fieldsetMaterialsuche",autoHeight:true,hideBorders:true,labelWidth:50,items:[{contentEl:"materialSuchenAnleitung"},{xtype:"combo",fieldLabel:"Material",name:"sucheMaterialFeld",id:"sucheMaterialFeld",typeAhead:true,valueField:"id",displayField:"typ",store:new Ext.data.SimpleStore({fields:["id","typ"],data:W}),displayField:"typ",width:120,listWidth:160,allowBlank:false,triggerAction:"all",editable:false,disabled:true,mode:"local",emptyText:"Material ausw\u00E4hlen...",tpl:'<tpl for="."><div ext:qtip="{typ}" class="x-combo-list-item">{typ}</div></tpl>',blankText:"Dieses Feld muss ausgef\u00FCllt werden",listeners:{select:function(){S=true;if(C&&I){Ext.getCmp("buttonMaterialSuchen").enable()}}}},{xtype:"numberfield",fieldLabel:"Anzahl",name:"anzahlMaterialSuche",id:"anzahlMaterialSuche",allowBlank:false,blankText:"Dieses Feld muss ausgef\u00FCllt werden",width:60,disabled:true,listeners:{valid:function(){C=true;if(S&&I){Ext.getCmp("buttonMaterialSuchen").enable()}},invalid:function(){C=false;Ext.getCmp("buttonMaterialSuchen").disable()}}},{xtype:"combo",fieldLabel:"Option",name:"optionenMaterialSuche",id:"optionenMaterialSuche",valueField:"id",displayField:"typ",value:0,store:new Ext.data.SimpleStore({fields:["id","typ"],data:[[0,"keine"],[1,"nur Anzahl >=5"],[2,"nur Anzahl >=10"]]}),displayField:"typ",mode:"local",width:120,listWidth:120,triggerAction:"all",editable:false,allowBlank:false,blankText:"Bitte geben Sie eine Suchoption an",emptyText:"Suchoption ...",listeners:{select:function(){I=true;if(S&&C){Ext.getCmp("buttonMaterialSuchen").enable()}}},disabled:true},{xtype:"button",text:"Material suchen",id:"buttonMaterialSuchen",disabled:true,listeners:{click:function(){var x=Ext.getCmp("sucheMaterialFeld");var y=x.getValue();var w=d+"/alarmdaten/drkmap/materialsuche.js;jsessionid="+H+"?materialID="+y;m(w)}}}]}]});hilfePanel=V?null:{xtype:"panel",animate:true,title:"Hilfe",bodyStyle:"padding: 5px",hideBorders:true,collapsed:false,autoScroll:true,iconCls:"hilfe-panel",items:[{contentEl:"panelHilfe"}]};var t=navigator.appName=="Netscape"?window.innerWidth:navigator.appName.indexOf("Microsoft")!=-1?document.body.offsetWidth:630;var q=[e,Z,addressauswahlPanel,P,materialsuchePanel,hilfePanel];for(var p=0;p<q.length;p++){if(q[p]==null){q.splice(p--,1)}}accordion=new Ext.Window({id:"accordion",layout:"accordion",closeAction:"hide",plain:false,closable:false,resizable:true,title:"Navigation",collapsible:true,width:232,height:372,x:t-255,y:90,items:q});accordion.show(this);viewport=new Ext.Viewport({layout:"fit",items:[{contentEl:"map"}],listeners:{resize:function(){var w=navigator.appName=="Netscape"?window.innerWidth:navigator.appName.indexOf("Microsoft")!=-1?document.body.offsetWidth:630;accordion.setPagePosition(w-255,90);if(J!=null){J.setPagePosition(w-595,90)}n()}}});markerManager=new MarkerManager(R);if(!V){O(L);var u=new GLatLng(54.92238569063361,6.0765625);var s=new GIcon();s.image="img/lv_overlay2.png";s.iconSize=new GSize(420,566);s.iconAnchor=new GPoint(10,10);brdMmarker=new GMarker(u,{icon:s,clickable:false,draggable:false});markerManager.addMarkers([brdMmarker],6,6);markerManager.refresh()}else{var v=window.location+"&";var l=v.indexOf("include=")+"include=".length;v=decodeURIComponent(v.substring(l,v.indexOf("&",l)));m(v)}}}}}();Ext.onReady(kreisalarm.drkmap.preinit,kreisalarm.drkmap);