Ext={};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),isIE=ua.indexOf("msie")>-1,isIE7=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),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]}};return function(sb,sp,overrides){if(typeof sp=="object"){overrides=sp;sp=sb;sb=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==Object.prototype.constructor){spp.constructor=sp}sb.override=function(o){Ext.override(sb,o)};sbp.override=io;Ext.override(sb,overrides);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(ov instanceof Array){if(ov.length){for(var i=0,len=ov.length;i<len;i++){buf.push(k,"=",encodeURIComponent(ov[i]===undefined?"":ov[i]),"&")}}else{buf.push(k,"=&")}}}}}buf.pop();return buf.join("")},urlDecode:function(string,overwrite){if(!string||!string.length){return{}}var obj={};var pairs=string.split("&");var pair,name,value;for(var i=0,len=pairs.length;i<len;i++){pair=pairs[i].split("=");name=decodeURIComponent(pair[0]);value=decodeURIComponent(pair[1]);if(overwrite!==true){if(typeof obj[name]=="undefined"){obj[name]=value}else{if(typeof obj[name]=="string"){obj[name]=[obj[name]];obj[name].push(value)}else{obj[name].push(value)}}}else{obj[name]=value}}return obj},each:function(array,fn,scope){if(typeof array.length=="undefined"||typeof array=="string"){array=[array]}for(var i=0,len=array.length;i<len;i++){if(fn.call(scope||array[i],array[i],i,array)===false){return i}}},combine:function(){var as=arguments,l=as.length,r=[];for(var i=0;i<l;i++){var a=as[i];if(a instanceof Array){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){return null}return el.dom?el.dom:(typeof el=="string"?document.getElementById(el):el)},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(as.dom){as.removeAllListeners();as.remove();continue}if(typeof as.purgeListeners=="function"){as.purgeListeners()}if(typeof as.destroy=="function"){as.destroy()}}}},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)},isOpera:isOpera,isSafari:isSafari,isIE:isIE,isIE7:isIE7,isGecko:isGecko,isBorderBox:isBorderBox,isWindows:isWindows,isLinux:isLinux,isMac:isMac,useShims:((isIE&&!isIE7)||(isGecko&&isMac))})})();Ext.namespace("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===null||G===undefined||G===""){G=" "}while(E.length<H){E=G+E}return E},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};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)}}});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(){var B=self.innerHeight;var A=document.compatMode;if((A||Ext.isIE)&&!Ext.isOpera){B=(A=="CSS1Compat")?document.documentElement.clientHeight:document.body.clientHeight}return B},getViewportWidth:function(){var B=self.innerWidth;var A=document.compatMode;if(A||Ext.isIE){B=(A=="CSS1Compat")?document.documentElement.clientWidth:document.body.clientWidth}return B},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;V=Ext.getDom(V);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 K(Ext.lib.Event.getEvent(O))};var I=[J,T,K,R];var S=L.length;L[S]=I;this.doAdd(J,T,R,false);return true},removeListener:function(J,V,K){var T,W;J=Ext.getDom(J);if(!K){return this.purgeElement(J,false,V)}if("unload"==V){for(T=0,W=A.length;T<W;T++){var X=A[T];if(X&&X[0]==J&&X[1]==V&&X[2]==K){A.splice(T,1);return true}}return false}var I=null;var U=arguments[3];if("undefined"==typeof U){U=this._getCacheIndex(J,V,K)}if(U>=0){I=L[U]}if(!J||!I){return false}this.doRemove(J,V,I[this.WFN],false);delete L[U][this.WFN];delete L[U][this.FN];L.splice(U,1);return true},getTarget:function(J,K){J=J.browserEvent||J;var I=J.target||J.srcElement;return this.resolveTextNode(I)},resolveTextNode:function(I){if(Ext.isSafari&&I&&3==I.nodeType){return I.parentNode}else{return I}},getPageX:function(J){J=J.browserEvent||J;var I=J.pageX;if(!I&&0!==I){I=J.clientX||0;if(Ext.isIE){I+=this.getScroll()[1]}}return I},getPageY:function(I){I=I.browserEvent||I;var J=I.pageY;if(!J&&0!==J){J=I.clientY||0;if(Ext.isIE){J+=this.getScroll()[0]}}return J},getXY:function(I){I=I.browserEvent||I;return[this.getPageX(I),this.getPageY(I)]},getRelatedTarget:function(J){J=J.browserEvent||J;var I=J.relatedTarget;if(!I){if(J.type=="mouseout"){I=J.toElement}else{if(J.type=="mouseover"){I=J.fromElement}}}return this.resolveTextNode(I)},getTime:function(J){J=J.browserEvent||J;if(!J.time){var K=new Date().getTime();try{J.time=K}catch(I){this.lastError=I;return K}}return J.time},stopEvent:function(I){this.stopPropagation(I);this.preventDefault(I)},stopPropagation:function(I){I=I.browserEvent||I;if(I.stopPropagation){I.stopPropagation()}else{I.cancelBubble=true}},preventDefault:function(I){I=I.browserEvent||I;if(I.preventDefault){I.preventDefault()}else{I.returnValue=false}},getEvent:function(K){var I=K||window.event;if(!I){var J=this.getEvent.caller;while(J){I=J.arguments[0];if(I&&Event==I.constructor){break}J=J.caller}}return I},getCharCode:function(I){I=I.browserEvent||I;return I.charCode||I.keyCode||0},_getCacheIndex:function(J,S,K){for(var R=0,T=L.length;R<T;++R){var I=L[R];if(I&&I[this.FN]==K&&I[this.EL]==J&&I[this.TYPE]==S){return R}}return -1},elCache:{},getEl:function(I){return document.getElementById(I)},clearCache:function(){},_load:function(J){M=true;var I=Ext.lib.Event;if(Ext.isIE){I.doRemove(window,"load",I._load)}},_tryPreloadAttach:function(){if(this.locked){return false}this.locked=true;var J=!M;if(!J){J=(C>0)}var K=[];for(var V=0,I=D.length;V<I;++V){var S=D[V];if(S){var T=this.getEl(S.id);if(T){if(!S.checkReady||M||T.nextSibling||(document&&document.body)){var U=T;if(S.override){if(S.override===true){U=S.obj}else{U=S.override}}S.fn.call(U,S.obj);D[V]=null}}else{K.push(S)}}}C=(K.length===0)?0:C-1;if(J){this.startInterval()}else{clearInterval(this._interval);this._interval=null}this.locked=false;return true},purgeElement:function(S,K,U){var J=this.getListeners(S,U);if(J){for(var T=0,I=J.length;T<I;++T){var V=J[T];this.removeListener(S,V.type,V.fn)}}if(K&&S&&S.childNodes){for(T=0,I=S.childNodes.length;T<I;++T){this.purgeElement(S.childNodes[T],K,U)}}},getListeners:function(Y,K){var V=[],Z;if(!K){Z=[L,A]}else{if(K=="unload"){Z=[A]}else{Z=[L]}}for(var W=0;W<Z.length;++W){var I=Z[W];if(I&&I.length>0){for(var U=0,J=I.length;U<J;++U){var X=I[U];if(X&&X[this.EL]===Y&&(!K||K===X[this.TYPE])){V.push({type:X[this.TYPE],fn:X[this.FN],obj:X[this.OBJ],adjust:X[this.ADJ_SCOPE],index:U})}}}}return(V.length)?V:null},_unload:function(J){var K=Ext.lib.Event,U,V,X,I,W;for(U=0,I=A.length;U<I;++U){X=A[U];if(X){var T=window;if(X[K.ADJ_SCOPE]){if(X[K.ADJ_SCOPE]===true){T=X[K.OBJ]}else{T=X[K.ADJ_SCOPE]}}X[K.FN].call(T,K.getEvent(J),X[K.OBJ]);A[U]=null;X=null;T=null}}A=null;if(L&&L.length>0){V=L.length;while(V){W=V-1;X=L[W];if(X){K.removeListener(X[K.EL],X[K.TYPE],X[K.FN],W)}V=V-1}X=null;K.clearCache()}K.doRemove(window,"unload",K._unload)},getScroll:function(){var I=document.documentElement,J=document.body;if(I&&(I.scrollTop||I.scrollLeft)){return[I.scrollTop,I.scrollLeft]}else{if(J){return[J.scrollTop,J.scrollLeft]}else{return[0,0]}}},doAdd:function(){if(window.addEventListener){return function(J,P,K,I){J.addEventListener(P,K,(I))}}else{if(window.attachEvent){return function(J,P,K,I){J.attachEvent("on"+P,K)}}else{return function(){}}}}(),doRemove:function(){if(window.removeEventListener){return function(J,P,K,I){J.removeEventListener(P,K,(I))}}else{if(window.detachEvent){return function(J,I,K){J.detachEvent("on"+I,K)}}else{return function(){}}}}()}}();var F=Ext.lib.Event;F.on=F.addListener;F.un=F.removeListener;if(document&&document.body){F._load()}else{F.doAdd(window,"load",F._load)}F.doAdd(window,"unload",F._unload);F._tryPreloadAttach();Ext.lib.Ajax={request:function(A,C,N,B,M){if(M){var L=M.headers;if(L){for(var D in L){if(L.hasOwnProperty(D)){this.initHeader(D,L[D],false)}}}if(M.xmlData){this.initHeader("Content-Type","text/xml",false);A="POST";B=M.xmlData}}return this.asyncRequest(A,C,N,B)},serializeForm:function(Q){if(typeof Q=="string"){Q=(document.getElementById(Q)||document.forms[Q])}var P,R,O,D,C="",A=false;for(var B=0;B<Q.elements.length;B++){P=Q.elements[B];D=Q.elements[B].disabled;R=Q.elements[B].name;O=Q.elements[B].value;if(!D&&R){switch(P.type){case"select-one":case"select-multiple":for(var N=0;N<P.options.length;N++){if(P.options[N].selected){if(Ext.isIE){C+=encodeURIComponent(R)+"="+encodeURIComponent(P.options[N].attributes["value"].specified?P.options[N].value:P.options[N].text)+"&"}else{C+=encodeURIComponent(R)+"="+encodeURIComponent(P.options[N].hasAttribute("value")?P.options[N].value:P.options[N].text)+"&"}}}break;case"radio":case"checkbox":if(P.checked){C+=encodeURIComponent(R)+"="+encodeURIComponent(O)+"&"}break;case"file":case undefined:case"reset":case"button":break;case"submit":if(A==false){C+=encodeURIComponent(R)+"="+encodeURIComponent(O)+"&";A=true}break;default:C+=encodeURIComponent(R)+"="+encodeURIComponent(O)+"&";break}}}C=C.substr(0,C.length-1);return C},headers:{},hasHeaders:false,useDefaultHeader:true,defaultPostHeader:"application/x-www-form-urlencoded",useDefaultXhrHeader:true,defaultXhrHeader:"XMLHttpRequest",hasDefaultHeaders:true,defaultHeaders:{},poll:{},timeout:{},pollInterval:50,transactionId:0,setProgId:function(A){this.activeX.unshift(A)},setDefaultPostHeader:function(A){this.useDefaultHeader=A},setDefaultXhrHeader:function(A){this.useDefaultXhrHeader=A},setPollingInterval:function(A){if(typeof A=="number"&&isFinite(A)){this.pollInterval=A}},createXhrObject:function(A){var B,J;try{J=new XMLHttpRequest();B={conn:J,tId:A}}catch(C){for(var D=0;D<this.activeX.length;++D){try{J=new ActiveXObject(this.activeX[D]);B={conn:J,tId:A};break}catch(C){}}}finally{return B}},getConnectionObject:function(){var B;var A=this.transactionId;try{B=this.createXhrObject(A);if(B){this.transactionId++}}catch(C){}finally{return B}},asyncRequest:function(A,D,B,J){var C=this.getConnectionObject();if(!C){return null}else{C.conn.open(A,D,true);if(this.useDefaultXhrHeader){if(!this.defaultHeaders["X-Requested-With"]){this.initHeader("X-Requested-With",this.defaultXhrHeader,true)}}if(J&&this.useDefaultHeader){this.initHeader("Content-Type",this.defaultPostHeader)}if(this.hasDefaultHeaders||this.hasHeaders){this.setHeader(C)}this.handleReadyState(C,B);C.conn.send(J||null);return C}},handleReadyState:function(B,A){var C=this;if(A&&A.timeout){this.timeout[B.tId]=window.setTimeout(function(){C.abort(B,A,true)},A.timeout)}this.poll[B.tId]=window.setInterval(function(){if(B.conn&&B.conn.readyState==4){window.clearInterval(C.poll[B.tId]);delete C.poll[B.tId];if(A&&A.timeout){window.clearTimeout(C.timeout[B.tId]);delete C.timeout[B.tId]}C.handleTransactionResponse(B,A)}},this.pollInterval)},handleTransactionResponse:function(B,A,L){if(!A){this.releaseObject(B);return }var D,K;try{if(B.conn.status!==undefined&&B.conn.status!=0){D=B.conn.status}else{D=13030}}catch(C){D=13030}if(D>=200&&D<300){K=this.createResponseObject(B,A.argument);if(A.success){if(!A.scope){A.success(K)}else{A.success.apply(A.scope,[K])}}}else{switch(D){case 12002:case 12029:case 12030:case 12031:case 12152:case 13030:K=this.createExceptionObject(B.tId,A.argument,(L?L:false));if(A.failure){if(!A.scope){A.failure(K)}else{A.failure.apply(A.scope,[K])}}break;default:K=this.createResponseObject(B,A.argument);if(A.failure){if(!A.scope){A.failure(K)}else{A.failure.apply(A.scope,[K])}}}}this.releaseObject(B);K=null},createResponseObject:function(R,C){var O={};var A={};try{var P=R.conn.getAllResponseHeaders();var D=P.split("\n");for(var N=0;N<D.length;N++){var Q=D[N].indexOf(":");if(Q!=-1){A[D[N].substring(0,Q)]=D[N].substring(Q+2)}}}catch(B){}O.tId=R.tId;O.status=R.conn.status;O.statusText=R.conn.statusText;O.getResponseHeader=A;O.getAllResponseHeaders=P;O.responseText=R.conn.responseText;O.responseXML=R.conn.responseXML;if(typeof C!==undefined){O.argument=C}return O},createExceptionObject:function(A,M,P){var C=0;var B="communication failure";var N=-1;var O="transaction aborted";var D={};D.tId=A;if(P){D.status=N;D.statusText=O}else{D.status=C;D.statusText=B}if(M){D.argument=M}return D},initHeader:function(D,A,B){var C=(B)?this.defaultHeaders:this.headers;if(C[D]===undefined){C[D]=A}else{C[D]=A+","+C[D]}if(B){this.hasDefaultHeaders=true}else{this.hasHeaders=true}},setHeader:function(B){if(this.hasDefaultHeaders){for(var A in this.defaultHeaders){if(this.defaultHeaders.hasOwnProperty(A)){B.conn.setRequestHeader(A,this.defaultHeaders[A])}}}if(this.hasHeaders){for(var A in this.headers){if(this.headers.hasOwnProperty(A)){B.conn.setRequestHeader(A,this.headers[A])}}this.headers={};this.hasHeaders=false}},resetDefaultHeaders:function(){delete this.defaultHeaders;this.defaultHeaders={};this.hasDefaultHeaders=false},abort:function(B,A,C){if(this.isCallInProgress(B)){B.conn.abort();window.clearInterval(this.poll[B.tId]);delete this.poll[B.tId];if(C){delete this.timeout[B.tId]}this.handleTransactionResponse(B,A,true);return true}else{return false}},isCallInProgress:function(A){if(A&&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)},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(B instanceof Array){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){this.run(C,K,B,A,L,D,Ext.lib.Scroll)},motion:function(C,K,B,A,L,D){this.run(C,K,B,A,L,D,Ext.lib.Motion)},color:function(C,K,B,A,L,D){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&&!(W[0] instanceof Array)){W=[W]}else{var X=[];for(V=0,T=W.length;V<T;++V){X[V]=W[V]}W=X}Ext.fly(a).position();if(C(Y["points"]["from"])){Ext.lib.Dom.setXY(a,Y["points"]["from"])}else{Ext.lib.Dom.setXY(a,Ext.lib.Dom.getXY(a))}b=this.getAttribute("points");if(C(Y["points"]["to"])){Z=J.call(this,Y["points"]["to"],b);var U=Ext.lib.Dom.getXY(this.getEl());for(V=0,T=W.length;V<T;++V){W[V]=J.call(this,W[V],b)}}else{if(C(Y["points"]["by"])){Z=[b[0]+Y["points"]["by"][0],b[1]+Y["points"]["by"][1]];for(V=0,T=W.length;V<T;++V){W[V]=[b[0]+W[V][0],b[1]+W[V][1]]}}}this.runtimeAttributes[I]=[b];if(W.length>0){this.runtimeAttributes[I]=this.runtimeAttributes[I].concat(W)}this.runtimeAttributes[I][this.runtimeAttributes[I].length]=Z}else{A.setRuntimeAttribute.call(this,I)}};var J=function(N,I){var M=Ext.lib.Dom.getXY(this.getEl());N=[N[0]-M[0]+I[0],N[1]-M[1]+I[1]];return N};var C=function(I){return(typeof I!=="undefined")}})();(function(){Ext.lib.Scroll=function(M,N,L,D){if(M){Ext.lib.Scroll.superclass.constructor.call(this,M,N,L,D)}};Ext.extend(Ext.lib.Scroll,Ext.lib.ColorAnim);var B=Ext.lib;var A=B.Scroll.superclass;var C=B.Scroll.prototype;C.toString=function(){var J=this.getEl();var D=J.id||J.tagName;return("Scroll "+D)};C.doMethod=function(N,D,M){var L=null;if(N=="scroll"){L=[this.method(this.currentFrame,D[0],M[0]-D[0],this.totalFrames),this.method(this.currentFrame,D[1],M[1]-D[1],this.totalFrames)]}else{L=A.doMethod.call(this,N,D,M)}return L};C.getAttribute=function(L){var D=null;var K=this.getEl();if(L=="scroll"){D=[K.scrollLeft,K.scrollTop]}else{D=A.getAttribute.call(this,L)}return D};C.setAttribute=function(N,D,L){var M=this.getEl();if(N=="scroll"){M.scrollLeft=D[0];M.scrollTop=D[1]}else{A.setAttribute.call(this,N,D,L)}}})()})();Ext.DomHelper=function(){var S=null;var Y=/^(?:br|frame|hr|img|input|link|meta|range|spacer|wbr|area|param|col)$/i;var P=/^table|tbody|tr|td$/i;var Q=function(B){if(typeof B=="string"){return B}var F="";if(!B.tag){B.tag="div"}F+="<"+B.tag;for(var G in B){if(G=="tag"||G=="children"||G=="cn"||G=="html"||typeof B[G]=="function"){continue}if(G=="style"){var C=B["style"];if(typeof C=="function"){C=C.call()}if(typeof C=="string"){F+=' style="'+C+'"'}else{if(typeof C=="object"){F+=' style="';for(var D in C){if(typeof C[D]!="function"){F+=D+":"+C[D]+";"}}F+='"'}}}else{if(G=="cls"){F+=' class="'+B["cls"]+'"'}else{if(G=="htmlFor"){F+=' for="'+B["htmlFor"]+'"'}else{F+=" "+G+'="'+B[G]+'"'}}}}if(Y.test(B.tag)){F+="/>"}else{F+=">";var A=B.children||B.cn;if(A){if(A instanceof Array){for(var E=0,H=A.length;E<H;E++){F+=Q(A[E],F)}}else{F+=Q(A,F)}}if(B.html){F+=B.html}F+="</"+B.tag+">"}return F};var R=function(B,F){var C=document.createElement(B.tag||"div");var E=C.setAttribute?true:false;for(var G in B){if(G=="tag"||G=="children"||G=="cn"||G=="html"||G=="style"||typeof B[G]=="function"){continue}if(G=="cls"){C.className=B["cls"]}else{if(E){C.setAttribute(G,B[G])}else{C[G]=B[G]}}}Ext.DomHelper.applyStyles(C,B.style);var A=B.children||B.cn;if(A){if(A instanceof Array){for(var D=0,H=A.length;D<H;D++){R(A[D],C)}}else{R(A,C)}}if(B.html){C.innerHTML=B.html}if(F){F.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")},doInsert:function(D,B,C,A,E){D=Ext.getDom(D);var F;if(this.useDom){F=R(B,null);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(B){if(B instanceof Array){B=B.join("")}else{if(arguments.length>1){B=Array.prototype.join.call(arguments,"")}}this.html=B};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(B){B=Ext.getDom(B);return new Ext.Template(B.value||B.innerHTML)};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=(el instanceof Array);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)},"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(){var B=this.events[arguments[0].toLowerCase()];if(typeof B=="object"){return B.fire.apply(B,Array.prototype.slice.call(arguments,1))}else{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(B){if(!this.events){this.events={}}Ext.applyIf(this.events,B)},hasListener:function(C){var D=this.events[C];return typeof D=="object"&&D.listeners.length>0}};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(B,C,K){var A=K||{};C=C||this.obj;if(!this.isListening(B,C)){var L={fn:B,scope:C,options:A};var J=B;if(A.delay){J=D(J,A,C)}if(A.single){J=E(J,this,B,C)}if(A.buffer){J=F(J,A,C)}L.fireFn=J;if(!this.firing){this.listeners.push(L)}else{this.listeners=this.listeners.slice(0);this.listeners.push(L)}}},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,k,X;var a=Ext.lib.Event;var Y=Ext.lib.Dom;var l=function(){if(!d){d=true;Ext.isReady=true;if(Z){clearInterval(Z)}if(Ext.isGecko||Ext.isOpera){document.removeEventListener("DOMContentLoaded",l,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 m=function(){D=new Ext.util.Event();if(Ext.isGecko||Ext.isOpera){document.addEventListener("DOMContentLoaded",l,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"){l()}}}else{if(Ext.isSafari){Z=setInterval(function(){var B=document.readyState;if(B=="complete"){l()}},10)}}}a.on(window,"load",l)};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={wrap:function(A,B,C){return function(F){Ext.EventObject.setEvent(F);A.call(C?B||window:window,Ext.EventObject,B)}},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){m()}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",function(){if(Ext.isIE){E.delay(50)}else{b.fire(Y.getViewWidth(),Y.getViewHeight())}})}b.addListener(A,B,C)},onTextResize:function(A,B,F){if(!k){k=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){k.fire(X,X=C.dom.offsetHeight)}},this.textResizeInterval)}k.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.get(document.body);if(!F){return }var D=[Ext.isIE?"ext-ie":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.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):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)},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},calcOffsetsTo:function(el){el=Ext.get(el);var d=el.dom;var restorePos=false;if(el.getStyle("position")=="static"){el.position("relative");restorePos=true}var x=0,y=0;var op=this.dom;while(op&&op!=d&&op.tagName!="HTML"){x+=op.offsetLeft;y+=op.offsetTop;op=op.offsetParent}if(restorePos){el.position("static")}return[x,y]},scrollIntoView:function(container,hscroll){var c=Ext.getDom(container)||document.body;var el=this.dom;var o=this.calcOffsetsTo(c),l=o[0],t=o[1],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(t<ct){c.scrollTop=t}else{if(b>cb){c.scrollTop=b-ch}}if(hscroll!==false){if(l<cl){c.scrollLeft=l}else{if(r>cr){c.scrollLeft=r-c.clientWidth}}}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(className instanceof Array){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(className instanceof Array){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)},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;return contentHeight!==true?h:h-this.getBorderWidth("tb")-this.getPadding("tb")},getWidth:function(contentWidth){var w=this.dom.offsetWidth||0;return contentWidth!==true?w:w-this.getBorderWidth("lr")-this.getPadding("lr")},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)}},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")}}},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);var d=this.dom;if(!el.dom){throw"Element.alignTo with an element that doesn't exist"}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)},beginMeasure:function(){var el=this.dom;if(el.offsetWidth||el.offsetHeight){return this}var changed=[];var p=this.dom,b=document.body;while((!el.offsetWidth&&!el.offsetHeight)&&p&&p.tagName&&p!=b){var pe=Ext.get(p);if(pe.getStyle("display")=="none"){changed.push({el:p,visibility:pe.getStyle("visibility")});p.style.visibility="hidden";p.style.display="block"}p=p.parentNode}this._measureChanged=changed;return this},endMeasure:function(){var changed=this._measureChanged;if(changed){for(var i=0,len=changed.length;i<len;i++){var r=changed[i];r.el.style.visibility=r.visibility;r.el.style.display="none"}this._measureChanged=null}return this},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){el.parentNode.removeChild(el)}if(typeof callback=="function"){callback()}});dom.innerHTML=html.replace(/(?:<script.*?>)((\n|\r|.)*?)(?:<\/script>)/ig,"");return this},load:function(){var um=this.getUpdateManager();um.update.apply(um,arguments);return this},getUpdateManager:function(){if(!this.updateManager){this.updateManager=new Ext.UpdateManager(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}}}return val},createProxy:function(config,renderTo,matchBox){if(renderTo){renderTo=Ext.getDom(renderTo)}else{renderTo=document.body}config=typeof config=="object"?config:{tag:"div",cls:config};var proxy=Ext.DomHelper.append(renderTo,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._mask){this._mask=Ext.DomHelper.append(this.dom,{cls:"ext-el-mask"},true)}this.addClass("x-masked");this._mask.setDisplayed(true);if(typeof msg=="string"){if(!this._maskMsg){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.setHeight(this.getHeight())}return this._mask},unmask:function(removeEl){if(this._mask){if(removeEl===true){this._mask.remove();delete this._mask;if(this._maskMsg){this._maskMsg.remove();delete this._maskMsg}}else{this._mask.setDisplayed(false);if(this._maskMsg){this._maskMsg.setDisplayed(false)}}}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(){if(this.dom.parentNode){this.dom.parentNode.removeChild(this.dom)}delete El.cache[this.dom.id]},addClassOnOver:function(className,preventFlicker){this.on("mouseover",function(){Ext.fly(this,"_internal").addClass(className)},this.dom);var removeFn=function(e){if(preventFlicker!==true||!e.within(this,true)){Ext.fly(this,"_internal").removeClass(className)}};this.on("mouseout",removeFn,this.dom);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.get(document);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(eventName instanceof Array){for(var i=0,len=eventName.length;i<len;i++){this.on(eventName[i],fn)}return this}this.on(eventName,fn);return this},fitToParentDelegate:Ext.emptyFn,fitToParent:function(monitorResize,targetParent){Ext.EventManager.removeResizeListener(this.fitToParentDelegate);this.fitToParentDelegate=Ext.emptyFn;if(monitorResize===true&&!this.dom.parentNode){return }var p=Ext.get(targetParent||this.dom.parentNode);this.setSize(p.getComputedWidth()-p.getFrameWidth("lr"),p.getComputedHeight()-p.getFrameWidth("tb"));if(monitorResize===true){this.fitToParentDelegate=this.fitToParent.createDelegate(this,[true,targetParent]);Ext.EventManager.onWindowResize(this.fitToParentDelegate)}return this},getNextSibling:function(){var n=this.dom.nextSibling;while(n&&n.nodeType!=1){n=n.nextSibling}return n},getPrevSibling:function(){var n=this.dom.previousSibling;while(n&&n.nodeType!=1){n=n.previousSibling}return n},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){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){where=where?where.toLowerCase():"before";el=el||{};var rt,refNode=where=="before"?this.dom:this.dom.nextSibling;if(typeof el=="object"&&!el.nodeType){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),where=="before"?this.dom:this.dom.nextSibling);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},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(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"||key instanceof Array){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"||x instanceof Array){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=window.pageXOffset||doc.documentElement.scrollLeft||doc.body.scrollLeft||0;var t=window.pageYOffset||doc.documentElement.scrollTop||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]).toString(16);if(h<16){h="0"+h}color+=h}}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]}};var ep=El.prototype;ep.on=ep.addListener;ep.mon=ep.addListener;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(el instanceof Array){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);El.Flyweight=function(dom){this.dom=dom};El.Flyweight.prototype=El.prototype;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";attr=E.attr||"backgroundColor";this.clearOpacity();this.show();var C=this.getColor(attr);var B=this.dom.style[attr];endColor=(E.endColor||C)||"ffffff";var A=function(){F.dom.style[attr]=B;F.afterFx(E)};var H={};H[attr]={from:D,to:endColor};arguments.callee.anim=this.fxanim(H,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;duration=F.duration||1;this.show();var B=this.getBox();var A=function(){var D=this.createProxy({style:{visbility:"hidden",position:"absolute","z-index":"35000",border:"0px solid "+E}});var C=Ext.isBorderBox?2:1;D.animate({top:{from:B.y,to:B.y-20},left:{from:B.x,to:B.x-20},borderWidth:{from:0,to:10},opacity:{from:1,to:0},height:{from:B.height,to:(B.height+(20*C))},width:{from:B.width,to:(B.width+(20*C))}},duration,function(){D.remove()});if(--G>0){A.defer((duration/2)*1000,this)}else{H.afterFx(F)}};A.call(this)});return this},pause:function(E){var D=this.getFxEl();var F={};D.queueFx(F,function(){setTimeout(function(){D.afterFx(F)},E*1000)});return this},fadeIn:function(D){var C=this.getFxEl();D=D||{};C.queueFx(D,function(){this.setOpacity(0);this.fixDisplay();this.dom.style.visibility="visible";var A=D.endOpacity||1;arguments.callee.anim=this.fxanim({opacity:{to:A}},D,null,0.5,"easeOut",function(){if(A==1){this.clearOpacity()}C.afterFx(D)})});return this},fadeOut:function(D){var C=this.getFxEl();D=D||{};C.queueFx(D,function(){arguments.callee.anim=this.fxanim({opacity:{to:D.endOpacity||0}},D,null,0.5,"easeOut",function(){if(this.visibilityMode==Ext.Element.DISPLAY||D.useDisplay){this.dom.style.display="none"}else{this.dom.style.visibility="hidden"}this.clearOpacity();C.afterFx(D)})});return this},scale:function(D,F,E){this.shift(Ext.apply({},E,{width:D,height:F}));return this},shift:function(D){var C=this.getFxEl();D=D||{};C.queueFx(D,function(){var J={},K=D.width,I=D.height,L=D.x,A=D.y,B=D.opacity;if(K!==undefined){J.width={to:this.adjustWidth(K)}}if(I!==undefined){J.height={to:this.adjustHeight(I)}}if(L!==undefined||A!==undefined){J.points={to:[L!==undefined?L:this.getX(),A!==undefined?A:this.getY()]}}if(B!==undefined){J.opacity={to:B}}if(D.xy!==undefined){J.points={to:D.xy}}arguments.callee.anim=this.fxanim(J,D,"motion",0.35,"easeOut",function(){C.afterFx(D)})});return this},ghost:function(D,E){var F=this.getFxEl();E=E||{};F.queueFx(E,function(){D=D||"b";var C=this.getFxRestore();var M=this.getWidth(),K=this.getHeight();var L=this.dom.style;var A=function(){if(E.useDisplay){F.setDisplayed(false)}else{F.hide()}F.clearOpacity();F.setPositioning(C.pos);L.width=C.width;L.height=C.height;F.afterFx(E)};var N={opacity:{to:0},points:{}},B=N.points;switch(D.toLowerCase()){case"t":B.by=[0,-K];break;case"l":B.by=[-M,0];break;case"r":B.by=[M,0];break;case"b":B.by=[0,K];break;case"tl":B.by=[-M,-K];break;case"bl":B.by=[-M,K];break;case"br":B.by=[M,K];break;case"tr":B.by=[M,-K];break}arguments.callee.anim=this.fxanim(N,E,"motion",0.5,"easeOut",A)});return this},syncFx:function(){this.fxDefaults=Ext.apply(this.fxDefaults||{},{block:false,concurrent:true,stopFx:false});return this},sequenceFx:function(){this.fxDefaults=Ext.apply(this.fxDefaults||{},{block:false,concurrent:false,stopFx:false});return this},nextFx:function(){var B=this.fxQueue[0];if(B){B.call(this)}},hasActiveFx:function(){return this.fxQueue&&this.fxQueue[0]},stopFx:function(){if(this.hasActiveFx()){var B=this.fxQueue[0];if(B&&B.anim&&B.anim.isAnimated()){this.fxQueue=[B];B.anim.stop(true)}}return this},beforeFx:function(B){if(this.hasActiveFx()&&!B.concurrent){if(B.stopFx){this.stopFx();return true}return false}return true},hasFxBlock:function(){var B=this.fxQueue;return B&&B[0]&&B[0].block},queueFx:function(E,D){if(!this.fxQueue){this.fxQueue=[]}if(!this.hasFxBlock()){Ext.applyIf(E,this.fxDefaults);if(!E.concurrent){var F=this.beforeFx(E);D.block=E.block;this.fxQueue.push(D);if(F){this.nextFx()}}else{D.call(this)}}return this},fxWrap:function(H,J,K){var L;if(!J.wrap||!(L=Ext.get(J.wrap))){var G;if(J.fixPosition){G=this.getXY()}var I=document.createElement("div");I.style.visibility=K;L=Ext.get(this.dom.parentNode.insertBefore(I,this.dom));L.setPositioning(H);if(L.getStyle("position")=="static"){L.position("relative")}this.clearPositioning("auto");L.clip();L.dom.appendChild(this.dom);if(G){L.setXY(G)}}return L},fxUnwrap:function(D,E,F){this.clearPositioning();this.setPositioning(E);if(!F.wrap){D.dom.parentNode.insertBefore(this.dom,D.dom);D.remove()}},getFxRestore:function(){var B=this.dom.style;return{pos:this.getPositioning(),width:B.width,height:B.height}},afterFx:function(B){if(B.afterStyle){this.applyStyles(B.afterStyle)}if(B.afterCls){this.addClass(B.afterCls)}if(B.remove===true){this.remove()}Ext.callback(B.callback,B.scope,[this]);if(!B.concurrent){this.fxQueue.shift();this.nextFx()}},getFxEl:function(){return Ext.get(this.dom)},fxanim:function(L,K,N,J,M,H){N=N||"run";K=K||{};var I=Ext.lib.Anim[N](this.dom,L,(K.duration||J)||0.35,(K.easing||M)||"easeOut",function(){Ext.callback(H,this)},this);K.anim=I;return I}};Ext.Fx.resize=Ext.Fx.scale;Ext.apply(Ext.Element.prototype,Ext.Fx);Ext.CompositeElement=function(B){this.elements=[];this.addElements(B)};Ext.CompositeElement.prototype={isComposite:true,addElements:function(G){if(!G){return this}if(typeof G=="string"){G=Ext.Element.selectorFunction(G)}var H=this.elements;var J=H.length-1;for(var I=0,F=G.length;I<F;I++){H[++J]=Ext.get(G[I])}return this},fill:function(B){this.elements=[];this.add(B);return this},filter:function(C){var D=[];this.each(function(A){if(A.is(C)){D[D.length]=A.dom}});this.fill(D);return this},invoke:function(G,J){var H=this.elements;for(var I=0,F=H.length;I<F;I++){Ext.Element.prototype[G].apply(H[I],J)}return this},add:function(B){if(typeof B=="string"){this.addElements(Ext.Element.selectorFunction(B))}else{if(B.length!==undefined){this.addElements(B)}else{this.addElements([B])}}return this},each:function(G,H){var I=this.elements;for(var J=0,F=I.length;J<F;J++){if(G.call(H||I[J],I[J],this,J)===false){break}}return this},item:function(B){return this.elements[B]||null},first:function(){return this.item(0)},last:function(){return this.item(this.elements.length-1)},getCount:function(){return this.elements.length},contains:function(B){return this.indexOf(B)!==-1},indexOf:function(B){return this.elements.indexOf(Ext.get(B))},removeElement:function(J,H){if(J instanceof Array){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){if(H){var I=this.elements[L];if(I.dom){I.remove()}else{I.parentNode.removeChild(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(G instanceof Array){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);G.parentNode.removeChild(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":true,"requestcomplete":true,"requestexception":true});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(T.params)}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:this.timeout};var N=T.method||this.method||(L?"POST":"GET");if(N=="GET"&&(this.disableCaching&&T.disableCaching!==false)||T.disableCaching===true){M+=(M.indexOf("?")!=-1?"&":"?")+"_dc="+(new Date().getTime())}if(typeof T.autoAbort=="boolean"){if(T.autoAbort){this.abort()}}else{if(this.autoAbort!==false){this.abort()}}if((N=="GET"&&L)||T.xmlData){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(){document.body.removeChild(W)},100)}Ext.EventManager.on(W,"load",V,this);M.submit();if(Q){for(var T=0,R=Q.length;T<R;T++){M.removeChild(Q[T])}}}});Ext.Ajax=new Ext.data.Connection({autoAbort:false,serializeForm:function(B){return Ext.lib.Ajax.serializeForm(B)}});Ext.UpdateManager=function(F,D){F=Ext.get(F);if(!D&&F.updateManager){return F.updateManager}this.el=F;this.defaultUrl=null;this.addEvents({"beforeupdate":true,"update":true,"failure":true});var E=Ext.UpdateManager.defaults;this.sslBlankUrl=E.sslBlankUrl;this.disableCaching=E.disableCaching;this.indicatorText=E.indicatorText;this.showLoadIndicator=E.showLoadIndicator;this.timeout=E.timeout;this.loadScripts=E.loadScripts;this.transaction=null;this.autoRefreshProcId=null;this.refreshDelegate=this.refresh.createDelegate(this);this.updateDelegate=this.update.createDelegate(this);this.formUpdateDelegate=this.formUpdate.createDelegate(this);this.successDelegate=this.processSuccess.createDelegate(this);this.failureDelegate=this.processFailure.createDelegate(this);if(!this.renderer){this.renderer=new Ext.UpdateManager.BasicRenderer()}Ext.UpdateManager.superclass.constructor.call(this)};Ext.extend(Ext.UpdateManager,Ext.util.Observable,{getEl:function(){return this.el},update:function(N,K,I,M){if(this.fireEvent("beforeupdate",this.el,N,K)!==false){var J=this.method,H;if(typeof N=="object"){H=N;N=H.url;K=K||H.params;I=I||H.callback;M=M||H.discardUrl;if(I&&H.scope){I=I.createDelegate(H.scope)}if(typeof H.method!="undefined"){J=H.method}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(!M){this.defaultUrl=N}if(typeof N=="function"){N=N.call(this)}J=J||(K?"POST":"GET");if(J=="GET"){N=this.prepareUrl(N)}var L=Ext.apply(H||{},{url:N,params:K,success:this.successDelegate,failure:this.failureDelegate,callback:undefined,timeout:(this.timeout*1000),argument:{"url":N,"form":null,"callback":I,"params":K}});this.transaction=Ext.Ajax.request(L)}},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.successDelegate,failure:this.failureDelegate,timeout:(this.timeout*1000),argument:{"url":E,"form":G,"callback":F,"reset":H}});this.showLoading.defer(1,this)}},refresh:function(B){if(this.defaultUrl==null){return }this.update(this.defaultUrl,null,B,true)},startAutoRefresh:function(J,I,H,G,F){if(F){this.update(I||this.defaultUrl,H,G,true)}if(this.autoRefreshProcId){clearInterval(this.autoRefreshProcId)}this.autoRefreshProcId=setInterval(this.update.createDelegate(this,[I||this.defaultUrl,H,G,true]),J*1000)},stopAutoRefresh:function(){if(this.autoRefreshProcId){clearInterval(this.autoRefreshProcId);delete this.autoRefreshProcId}},isAutoRefreshing:function(){return this.autoRefreshProcId?true:false},showLoading:function(){if(this.showLoadIndicator){this.el.update(this.indicatorText)}},prepareUrl:function(D){if(this.disableCaching){var C="_dc="+(new Date().getTime());if(D.indexOf("?")!==-1){D+="&"+C}else{D+="?"+C}}return D},processSuccess:function(C){this.transaction=null;if(C.argument.form&&C.argument.reset){try{C.argument.form.reset()}catch(D){}}if(this.loadScripts){this.renderer.render(this.el,C,this,this.updateComplete.createDelegate(this,[C]))}else{this.renderer.render(this.el,C,this);this.updateComplete(C)}},updateComplete:function(B){this.fireEvent("update",this.el,B);if(typeof B.argument.callback=="function"){B.argument.callback(this.el,true,B)}},processFailure:function(B){this.transaction=null;this.fireEvent("failure",this.el,B);if(typeof B.argument.callback=="function"){B.argument.callback(this.el,false,B)}},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.UpdateManager.defaults={timeout:30,loadScripts:false,sslBlankUrl:(Ext.SSL_SECURE_URL||"javascript:false"),disableCaching:false,showLoadIndicator:true,indicatorText:'<div class="loading-indicator">Loading...</div>'};Ext.UpdateManager.updateElement=function(H,I,G,J){var F=Ext.get(H,true).getUpdateManager();Ext.apply(F,J);F.update(I,G,J?J.callback:null)};Ext.UpdateManager.update=Ext.UpdateManager.updateElement;Ext.UpdateManager.BasicRenderer=function(){};Ext.UpdateManager.BasicRenderer.prototype={render:function(G,E,H,F){G.update(E.responseText,H.loadScripts,F)}};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()}};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":true,"add":true,"replace":true,"remove":true,"sort":true});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||G instanceof Array){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)}},removeKey:function(B){return this.removeAt(this.indexOfKey(B))},getCount:function(){return this.length},indexOf:function(E){if(!this.items.indexOf){for(var F=0,D=this.items.length;F<D;F++){if(this.items[F]==E){return F}}return -1}else{return this.items.indexOf(E)}},indexOfKey:function(E){if(!this.keys.indexOf){for(var F=0,D=this.keys.length;F<D;F++){if(this.keys[F]==E){return F}}return -1}else{return this.keys.indexOf(E)}},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(D,C){if(!C.exec){C=String(C);if(C.length==0){return this.clone()}C=new RegExp("^"+Ext.escapeRe(C),"i")}return this.filterBy(function(A){return A&&C.test(A[D])})},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},clone:function(){var G=new Ext.util.MixedCollection();var J=this.keys,H=this.items;for(var I=0,F=H.length;I<F;I++){G.add(J[I],H[I])}G.getKey=this.getKey;return G}});Ext.util.MixedCollection.prototype.get=Ext.util.MixedCollection.prototype.item;Ext.util.JSON=new (function(){var useHasOwn={}.hasOwnProperty?true:false;var pad=function(n){return n<10?"0"+n:n};var m={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"};var encodeString=function(s){if(/["\\\x00-\x1f]/.test(s)){return'"'+s.replace(/([\x00-\x1f\\"])/g,function(a,b){var c=m[b];if(c){return c}c=b.charCodeAt();return"\\u00"+Math.floor(c/16).toString(16)+(c%16).toString(16)})+'"'}return'"'+s+'"'};var encodeArray=function(o){var a=["["],b,i,l=o.length,v;for(i=0;i<l;i+=1){v=o[i];switch(typeof v){case"undefined":case"function":case"unknown":break;default:if(b){a.push(",")}a.push(v===null?"null":Ext.util.JSON.encode(v));b=true}}a.push("]");return a.join("")};var encodeDate=function(o){return'"'+o.getFullYear()+"-"+pad(o.getMonth()+1)+"-"+pad(o.getDate())+"T"+pad(o.getHours())+":"+pad(o.getMinutes())+":"+pad(o.getSeconds())+'"'};this.encode=function(o){if(typeof o=="undefined"||o===null){return"null"}else{if(o instanceof Array){return encodeArray(o)}else{if(o instanceof Date){return encodeDate(o)}else{if(typeof o=="string"){return encodeString(o)}else{if(typeof o=="number"){return isFinite(o)?String(o):"null"}else{if(typeof o=="boolean"){return String(o)}else{var a=["{"],b,i,v;for(i in o){if(!useHasOwn||o.hasOwnProperty(i)){v=o[i];switch(typeof v){case"undefined":case"function":case"unknown":break;default:if(b){a.push(",")}a.push(this.encode(i),":",v===null?"null":this.encode(v));b=true}}}a.push("}");return a.join("")}}}}}}};this.decode=function(json){return eval("("+json+")")}})();Ext.encode=Ext.util.JSON.encode;Ext.decode=Ext.util.JSON.decode;Ext.util.Format=function(){var trimRe=/^\s+|\s+$/g;return{ellipsis:function(value,len){if(value&&value.length>len){return value.substr(0,len-3)+"..."}return value},undef:function(value){return typeof value!="undefined"?value:""},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")}return"$"+whole+sub},date:function(v,format){if(!v){return""}if(!(v instanceof Date)){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,"")}}}();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(!(D instanceof Array)){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(!(J instanceof Array)){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":true,"click":true,"mouseup":true});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.get(document).on("mouseup",this.handleMouseUp,this);this.el.on("mouseout",this.handleMouseOut,this);this.fireEvent("mousedown",this);this.fireEvent("click",this);this.timer=this.click.defer(this.delay||this.interval,this)},click:function(){this.fireEvent("click",this);this.timer=this.click.defer(this.getInterval(),this)},getInterval:function(){if(!this.accelerate){return this.interval}var B=this.mousedownTime.getElapsed();if(B<500){return 400}else{if(B<1700){return 320}else{if(B<2600){return 250}else{if(B<3500){return 180}else{if(B<4400){return 140}else{if(B<5300){return 80}else{if(B<6200){return 50}else{return 10}}}}}}}},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.get(document).un("mouseup",this.handleMouseUp);this.el.removeClass(this.pressClass);this.fireEvent("mouseup",this)}});Ext.KeyNav=function(D,C){this.el=Ext.get(D);Ext.apply(this,C);if(!this.disabled){this.disabled=true;this.enable()}};Ext.KeyNav.prototype={disabled:false,defaultEventAction:"stopEvent",forceKeyDown:false,prepareEvent:function(E){var D=E.getKey();var F=this.keyToHandler[D];if(Ext.isSafari&&F&&D>=37&&D<=40){E.stopEvent()}},relay:function(E){var D=E.getKey();var F=this.keyToHandler[D];if(F&&this[F]){if(this.doRelay(E,this[F],F)!==true){E[this.defaultEventAction]()}}},doRelay:function(E,F,D){return F.call(this.scope||this,E)},enter:false,left:false,right:false,up:false,down:false,tab:false,esc:false,pageUp:false,pageDown:false,del:false,home:false,end:false,keyToHandler:{37:"left",39:"right",38:"up",40:"down",33:"pageUp",34:"pageDown",46:"del",36:"home",35:"end",13:"enter",27:"esc",9:"tab"},enable:function(){if(this.disabled){if(this.forceKeyDown||Ext.isIE||Ext.isAir){this.el.on("keydown",this.relay,this)}else{this.el.on("keydown",this.prepareEvent,this);this.el.on("keypress",this.relay,this)}this.disabled=false}},disable:function(){if(!this.disabled){if(this.forceKeyDown||Ext.isIE||Ext.isAir){this.el.un("keydown",this.relay)}else{this.el.un("keydown",this.prepareEvent);this.el.un("keypress",this.relay)}this.disabled=true}}};Ext.KeyMap=function(E,F,D){this.el=Ext.get(E);this.eventName=D||"keydown";this.bindings=[];if(F){this.addBinding(F)}this.enable()};Ext.KeyMap.prototype={stopEvent:false,addBinding:function(O){if(O instanceof Array){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,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=S instanceof Array;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"&&!(N instanceof Array)){I=N.key;H=N.shift;K=N.ctrl;J=N.alt}else{I=N}this.addBinding({key:I,shift:H,ctrl:K,alt:J,fn:L,scope:M})},handleKeyDown:function(F){if(this.enabled){var H=this.bindings;for(var G=0,E=H.length;G<E;G++){H[G].call(this,F)}}},isEnabled:function(){return this.enabled},enable:function(){if(!this.enabled){this.el.on(this.eventName,this.handleKeyDown,this);this.enabled=true}},disable:function(){if(this.enabled){this.el.removeListener(this.eventName,this.handleKeyDown,this);this.enabled=false}}};Ext.util.TextMetrics=function(){var B;return{measure:function(F,E,A){if(!B){B=Ext.util.TextMetrics.Instance(F,A)}B.bind(F);B.setFixedWidth(A||"auto");return B.getSize(E)},createInstance:function(D,A){return Ext.util.TextMetrics.Instance(D,A)}}}();Ext.util.TextMetrics.Instance=function(H,F){var G=new Ext.Element(document.createElement("div"));document.body.appendChild(G.dom);G.position("absolute");G.setLeftTop(-1000,-1000);G.hide();if(F){G.setWidth(F)}var E={getSize:function(A){G.update(A);var B=G.getSize();G.update("");return B},bind:function(A){G.setStyle(Ext.fly(A).getStyles("font-size","font-style","font-weight","font-family","line-height"))},setFixedWidth:function(A){G.setWidth(A)},getWidth:function(A){G.dom.style.width="auto";return this.getSize(A).width},getHeight:function(A){return this.getSize(A).height}};E.bind(H);return E};Ext.Element.measureText=Ext.util.TextMetrics.measure;Ext.state.Provider=function(){this.addEvents({"statechange":true});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(K instanceof Date){L="d:"+K.toGMTString()}else{if(K instanceof Array){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"){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.state.CookieProvider=function(B){Ext.state.CookieProvider.superclass.constructor.call(this);this.path="/";this.expires=new Date(new Date().getTime()+(1000*60*60*24*7));this.domain=null;this.secure=false;Ext.apply(this,B);this.state=this.readCookies()};Ext.extend(Ext.state.CookieProvider,Ext.state.Provider,{set:function(C,D){if(typeof D=="undefined"||D===null){this.clear(C);return }this.setCookie(C,D);Ext.state.CookieProvider.superclass.set.call(this,C,D)},clear:function(B){this.clearCookie(B);Ext.state.CookieProvider.superclass.clear.call(this,B)},readCookies:function(){var K={};var H=document.cookie+";";var L=/\s?(.*?)=(.*?);/g;var I;while((I=L.exec(H))!=null){var G=I[1];var J=I[2];if(G&&G.substring(0,3)=="ys-"){K[G.substr(3)]=this.decodeValue(J)}}return K},setCookie:function(C,D){document.cookie="ys-"+C+"="+this.encodeValue(D)+((this.expires==null)?"":("; expires="+this.expires.toGMTString()))+((this.path==null)?"":("; path="+this.path))+((this.domain==null)?"":("; domain="+this.domain))+((this.secure==true)?"; secure":"")},clearCookie:function(B){document.cookie="ys-"+B+"=null; expires=Thu, 01-Jan-70 00:00:01 GMT"+((this.path==null)?"":("; path="+this.path))+((this.domain==null)?"":("; domain="+this.domain))+((this.secure==true)?"; secure":"")}});(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(Q,S,M){if(typeof S=="number"){S={left:S,right:S,top:S,bottom:S}}S=S||this.defaultPadding;var O=Ext.get(this.getEl()).getBox();var B=Ext.get(Q);var N=B.getScroll();var P,A=B.dom;if(A==document.body){P={x:N.left,y:N.top,width:Ext.lib.Dom.getViewWidth(),height:Ext.lib.Dom.getViewHeight()}}else{xy=B.getXY();P={x:xy[0]+N.left,y:xy[1]+N.top,width:A.clientWidth,height:A.clientHeight}}var R=O.y-P.y;var T=O.x-P.x;this.resetConstraints();this.setXConstraint(T-(S.left||0),P.width-T-O.width-(S.right||0));this.setYConstraint(R-(S.top||0),P.height-R-O.height-(S.bottom||0))},getEl:function(){if(!this._domRef){this._domRef=Ext.getDom(this.id)}return this._domRef},getDragEl:function(){return Ext.getDom(this.dragElId)},init:function(A,F,B){this.initTarget(A,F,B);C.on(this.id,"mousedown",this.handleMouseDown,this)},initTarget:function(A,F,B){this.config=B||{};this.DDM=Ext.dd.DDM;this.groups={};if(typeof A!=="string"){A=Ext.id(A)}this.id=A;this.addToGroup((F)?F:"default");this.handleElId=A;this.setDragElId(A);this.invalidHandleTypes={A:"A"};this.invalidHandleIds={};this.invalidHandleClasses=[];this.applyConfig();this.handleOnAvailable()},applyConfig:function(){this.padding=this.config.padding||[0,0,0,0];this.isTarget=(this.config.isTarget!==false);this.maintainOffset=(this.config.maintainOffset);this.primaryButtonOnly=(this.config.primaryButtonOnly!==false)},handleOnAvailable:function(){this.available=true;this.resetConstraints();this.onAvailable()},setPadding:function(B,H,A,G){if(!H&&0!==H){this.padding=[B,B,B,B]}else{if(!A&&0!==A){this.padding=[B,H,B,H]}else{this.padding=[B,H,A,G]}}},setInitPosition:function(I,J){var B=this.getEl();if(!this.DDM.verifyEl(B)){return }var K=I||0;var L=J||0;var A=D.getXY(B);this.initPageX=A[0]-K;this.initPageY=A[1]-L;this.lastPageX=A[0];this.lastPageY=A[1];this.setStartPosition(A)},setStartPosition:function(A){var B=A||D.getXY(this.getEl());this.deltaSetXY=null;this.startPageX=B[0];this.startPageY=B[1]},addToGroup:function(A){this.groups[A]=true;this.DDM.regDragDrop(this,A)},removeFromGroup:function(A){if(this.groups[A]){delete this.groups[A]}this.DDM.removeDDFromGroup(this,A)},setDragElId:function(A){this.dragElId=A},setHandleElId:function(A){if(typeof A!=="string"){A=Ext.id(A)}this.handleElId=A;this.DDM.regHandle(this.id,A)},setOuterHandleElId:function(A){if(typeof A!=="string"){A=Ext.id(A)}C.on(A,"mousedown",this.handleMouseDown,this);this.setHandleElId(A);this.hasOuterHandles=true},unreg:function(){C.un(this.id,"mousedown",this.handleMouseDown);this._domRef=null;this.DDM._remove(this)},destroy:function(){this.unreg()},isLocked:function(){return(this.DDM.isLocked()||this.locked)},handleMouseDown:function(A,B){if(this.primaryButtonOnly&&A.button!=0){return }if(this.isLocked()){return }this.DDM.refreshCache(this.groups);var F=new Ext.lib.Point(Ext.lib.Event.getPageX(A),Ext.lib.Event.getPageY(A));if(!this.hasOuterHandles&&!this.DDM.isOverTarget(F,this)){}else{if(this.clickValidator(A)){this.setStartPosition();this.b4MouseDown(A);this.onMouseDown(A);this.DDM.handleMouseDown(A,this);this.DDM.stopEvent(A)}else{}}},clickValidator:function(A){var B=A.getTarget();return(this.isValidHandleChild(B)&&(this.id==this.handleElId||this.DDM.handleWasClicked(B,this.id)))},addInvalidHandleType:function(B){var A=B.toUpperCase();this.invalidHandleTypes[A]=A},addInvalidHandleId:function(A){if(typeof A!=="string"){A=Ext.id(A)}this.invalidHandleIds[A]=A},addInvalidHandleClass:function(A){this.invalidHandleClasses.push(A)},removeInvalidHandleType:function(B){var A=B.toUpperCase();delete this.invalidHandleTypes[A]},removeInvalidHandleId:function(A){if(typeof A!=="string"){A=Ext.id(A)}delete this.invalidHandleIds[A]},removeInvalidHandleClass:function(B){for(var A=0,F=this.invalidHandleClasses.length;A<F;++A){if(this.invalidHandleClasses[A]==B){delete this.invalidHandleClasses[A]}}},isValidHandleChild:function(I){var J=true;var A;try{A=I.nodeName.toUpperCase()}catch(B){A=I.nodeName}J=J&&!this.invalidHandleTypes[A];J=J&&!this.invalidHandleIds[I.id];for(var K=0,L=this.invalidHandleClasses.length;J&&K<L;++K){J=!D.hasClass(I,this.invalidHandleClasses[K])}return J},setXTicks:function(A,H){this.xTicks=[];this.xTickSize=H;var B={};for(var G=this.initPageX;G>=this.minX;G=G-H){if(!B[G]){this.xTicks[this.xTicks.length]=G;B[G]=true}}for(G=this.initPageX;G<=this.maxX;G=G+H){if(!B[G]){this.xTicks[this.xTicks.length]=G;B[G]=true}}this.xTicks.sort(this.DDM.numericSort)},setYTicks:function(A,H){this.yTicks=[];this.yTickSize=H;var B={};for(var G=this.initPageY;G>=this.minY;G=G-H){if(!B[G]){this.yTicks[this.yTicks.length]=G;B[G]=true}}for(G=this.initPageY;G<=this.maxY;G=G+H){if(!B[G]){this.yTicks[this.yTicks.length]=G;B[G]=true}}this.yTicks.sort(this.DDM.numericSort)},setXConstraint:function(A,B,F){this.leftConstraint=A;this.rightConstraint=B;this.minX=this.initPageX-A;this.maxX=this.initPageX+B;if(F){this.setXTicks(this.initPageX,F)}this.constrainX=true},clearConstraints:function(){this.constrainX=false;this.constrainY=false;this.clearTicks()},clearTicks:function(){this.xTicks=null;this.yTicks=null;this.xTickSize=0;this.yTickSize=0},setYConstraint:function(F,A,B){this.topConstraint=F;this.bottomConstraint=A;this.minY=this.initPageY-F;this.maxY=this.initPageY+A;if(B){this.setYTicks(this.initPageY,B)}this.constrainY=true},resetConstraints:function(){if(this.initPageX||this.initPageX===0){var A=(this.maintainOffset)?this.lastPageX-this.initPageX:0;var B=(this.maintainOffset)?this.lastPageY-this.initPageY:0;this.setInitPosition(A,B)}else{this.setInitPosition()}if(this.constrainX){this.setXConstraint(this.leftConstraint,this.rightConstraint,this.xTickSize)}if(this.constrainY){this.setYConstraint(this.topConstraint,this.bottomConstraint,this.yTickSize)}},getTick:function(A,K){if(!K){return A}else{if(K[0]>=A){return K[0]}else{for(var M=0,N=K.length;M<N;++M){var L=M+1;if(K[L]&&K[L]>=A){var B=A-K[M];var J=K[L]-A;return(J>B)?K[M]:K[L]}}return K[K.length-1]}}},toString:function(){return("DragDrop "+this.id)}}})();if(!Ext.dd.DragDropMgr){Ext.dd.DragDropMgr=function(){var B=Ext.EventManager;return{ids:{},handleIds:{},dragCurrent:null,dragOvers:{},deltaX:0,deltaY:0,preventDefault:true,stopPropagation:true,initalized:false,locked:false,init:function(){this.initialized=true},POINT:0,INTERSECT:1,mode:0,_execOnAll:function(H,I){for(var G in this.ids){for(var J in this.ids[G]){var A=this.ids[G][J];if(!this.isTypeOfDD(A)){continue}A[H].apply(A,I)}}},_onLoad:function(){this.init();B.on(document,"mouseup",this.handleMouseUp,this,true);B.on(document,"mousemove",this.handleMouseMove,this,true);B.on(window,"unload",this._onUnload,this,true);B.on(window,"resize",this._onResize,this,true)},_onResize:function(A){this._execOnAll("resetConstraints",[])},lock:function(){this.locked=true},unlock:function(){this.locked=false},isLocked:function(){return this.locked},locationCache:{},useCache:true,clickPixelThresh:3,clickTimeThresh:350,dragThreshMet:false,clickTimeout:null,startX:0,startY:0,regDragDrop:function(A,D){if(!this.initialized){this.init()}if(!this.ids[D]){this.ids[D]={}}this.ids[D][A.id]=A},removeDDFromGroup:function(A,F){if(!this.ids[F]){this.ids[F]={}}var E=this.ids[F];if(E&&E[A.id]){delete E[A.id]}},_remove:function(A){for(var D in A.groups){if(D&&this.ids[D][A.id]){delete this.ids[D][A.id]}}delete this.handleIds[A.id]},regHandle:function(A,D){if(!this.handleIds[A]){this.handleIds[A]={}}this.handleIds[A][D]=D},isDragDrop:function(A){return(this.getDDById(A))?true:false},getRelated:function(A,I){var G=[];for(var H in A.groups){for(j in this.ids[H]){var J=this.ids[H][j];if(!this.isTypeOfDD(J)){continue}if(!I||J.isTarget){G[G.length]=J}}}return G},isLegalTarget:function(A,G){var I=this.getRelated(A,true);for(var H=0,J=I.length;H<J;++H){if(I[H].id==G.id){return true}}return false},isTypeOfDD:function(A){return(A&&A.__ygDragDrop)},isHandle:function(A,D){return(this.handleIds[A]&&this.handleIds[A][D])},getDDById:function(A){for(var D in this.ids){if(this.ids[D][A]){return this.ids[D][A]}}return null},handleMouseDown:function(A,E){if(Ext.QuickTips){Ext.QuickTips.disable()}this.currentTarget=A.getTarget();this.dragCurrent=E;var F=E.getEl();this.startX=A.getPageX();this.startY=A.getPageY();this.deltaX=this.startX-F.offsetLeft;this.deltaY=this.startY-F.offsetTop;this.dragThreshMet=false;this.clickTimeout=setTimeout(function(){var C=Ext.dd.DDM;C.startDrag(C.startX,C.startY)},this.clickTimeThresh)},startDrag:function(D,A){clearTimeout(this.clickTimeout);if(this.dragCurrent){this.dragCurrent.b4StartDrag(D,A);this.dragCurrent.startDrag(D,A)}this.dragThreshMet=true},handleMouseUp:function(A){if(Ext.QuickTips){Ext.QuickTips.enable()}if(!this.dragCurrent){return }clearTimeout(this.clickTimeout);if(this.dragThreshMet){this.fireEvents(A,true)}else{}this.stopDrag(A);this.stopEvent(A)},stopEvent:function(A){if(this.stopPropagation){A.stopPropagation()}if(this.preventDefault){A.preventDefault()}},stopDrag:function(A){if(this.dragCurrent){if(this.dragThreshMet){this.dragCurrent.b4EndDrag(A);this.dragCurrent.endDrag(A)}this.dragCurrent.onMouseUp(A)}this.dragCurrent=null;this.dragOvers={}},handleMouseMove:function(A){if(!this.dragCurrent){return true}if(Ext.isIE&&(A.button!==0&&A.button!==1&&A.button!==2)){this.stopEvent(A);return this.handleMouseUp(A)}if(!this.dragThreshMet){var E=Math.abs(this.startX-A.getPageX());var F=Math.abs(this.startY-A.getPageY());if(E>this.clickPixelThresh||F>this.clickPixelThresh){this.startDrag(this.startX,this.startY)}}if(this.dragThreshMet){this.dragCurrent.b4Drag(A);this.dragCurrent.onDrag(A);if(!this.dragCurrent.moveOnly){this.fireEvents(A,false)}}this.stopEvent(A);return true},fireEvents:function(V,U){var S=this.dragCurrent;if(!S||S.isLocked()){return }var R=V.getPoint();var Q=[];var b=[];var X=[];var Z=[];var A=[];for(var a in this.dragOvers){var P=this.dragOvers[a];if(!this.isTypeOfDD(P)){continue}if(!this.isOverTarget(R,P,this.mode)){b.push(P)}Q[a]=true;delete this.dragOvers[a]}for(var T in S.groups){if("string"!=typeof T){continue}for(a in this.ids[T]){var Y=this.ids[T][a];if(!this.isTypeOfDD(Y)){continue}if(Y.isTarget&&!Y.isLocked()&&Y!=S){if(this.isOverTarget(R,Y,this.mode)){if(U){Z.push(Y)}else{if(!Q[Y.id]){A.push(Y)}else{X.push(Y)}this.dragOvers[Y.id]=Y}}}}}if(this.mode){if(b.length){S.b4DragOut(V,b);S.onDragOut(V,b)}if(A.length){S.onDragEnter(V,A)}if(X.length){S.b4DragOver(V,X);S.onDragOver(V,X)}if(Z.length){S.b4DragDrop(V,Z);S.onDragDrop(V,Z)}}else{var W=0;for(a=0,W=b.length;a<W;++a){S.b4DragOut(V,b[a].id);S.onDragOut(V,b[a].id)}for(a=0,W=A.length;a<W;++a){S.onDragEnter(V,A[a].id)}for(a=0,W=X.length;a<W;++a){S.b4DragOver(V,X[a].id);S.onDragOver(V,X[a].id)}for(a=0,W=Z.length;a<W;++a){S.b4DragDrop(V,Z[a].id);S.onDragDrop(V,Z[a].id)}}if(U&&!Z.length){S.onInvalidDrop(V)}},getBestMatch:function(H){var A=null;var I=H.length;if(I==1){A=H[0]}else{for(var G=0;G<I;++G){var J=H[G];if(J.cursorIsOver){A=J;break}else{if(!A||A.overlap.getArea()<J.overlap.getArea()){A=J}}}}return A},refreshCache:function(I){for(var J in I){if("string"!=typeof J){continue}for(var H in this.ids[J]){var G=this.ids[J][H];if(this.isTypeOfDD(G)){var A=this.getLocation(G);if(A){this.locationCache[G.id]=A}else{delete this.locationCache[G.id]}}}}},verifyEl:function(E){if(E){var F;if(Ext.isIE){try{F=E.offsetParent}catch(A){}}else{F=E.offsetParent}if(F){return true}}return false},getLocation:function(V){if(!this.isTypeOfDD(V)){return null}var X=V.getEl(),S,A,N,Q,R,P,O,T,W;try{S=Ext.lib.Dom.getXY(X)}catch(U){}if(!S){return null}A=S[0];N=A+X.offsetWidth;Q=S[1];R=Q+X.offsetHeight;P=Q-V.padding[0];O=N+V.padding[1];T=R+V.padding[2];W=A-V.padding[3];return new Ext.lib.Region(P,O,T,W)},isOverTarget:function(M,L,A){var Q=this.locationCache[L.id];if(!Q||!this.useCache){Q=this.getLocation(L);this.locationCache[L.id]=Q}if(!Q){return false}L.cursorIsOver=Q.contains(M);var N=this.dragCurrent;if(!N||!N.getTargetCoord||(!A&&!N.constrainX&&!N.constrainY)){return L.cursorIsOver}L.overlap=null;var P=N.getTargetCoord(M.x,M.y);var K=N.getDragEl();var R=new Ext.lib.Region(P.y,P.x+K.offsetWidth,P.y+K.offsetHeight,P.x);var O=R.intersect(Q);if(O){L.overlap=O;return(A)?true:L.cursorIsOver}else{return false}},_onUnload:function(A,D){Ext.dd.DragDropMgr.unregAll()},unregAll:function(){if(this.dragCurrent){this.stopDrag();this.dragCurrent=null}this._execOnAll("unreg",[]);for(i in this.elementCache){delete this.elementCache[i]}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);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.getViewWidth();var Q=Ext.lib.Dom.getViewHeight();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.ScrollManager=function(){var L=Ext.dd.DragDropMgr;var T={};var M=null;var Q={};var R=function(A){M=null;N()};var P=function(){if(L.dragCurrent){L.refreshCache(L.dragCurrent.groups)}};var K=function(){if(L.dragCurrent){var A=Ext.dd.ScrollManager;if(!A.animate){if(Q.el.scroll(Q.dir,A.increment)){P()}}else{Q.el.scroll(Q.dir,A.increment,true,A.animDuration,P)}}};var N=function(){if(Q.id){clearInterval(Q.id)}Q.id=0;Q.el=null;Q.dir=""};var S=function(A,B){N();Q.el=A;Q.dir=B;Q.id=setInterval(K,Ext.dd.ScrollManager.frequency)};var O=function(D,A){if(A||!L.dragCurrent){return }var B=Ext.dd.ScrollManager;if(!M||M!=L.dragCurrent){M=L.dragCurrent;B.refreshCache()}var E=Ext.lib.Event.getXY(D);var F=new Ext.lib.Point(E[0],E[1]);for(var C in T){var H=T[C],G=H._region;if(G&&G.contains(F)&&H.isScrollable()){if(G.bottom-F.y<=B.thresh){if(Q.el!=H){S(H,"down")}return }else{if(G.right-F.x<=B.thresh){if(Q.el!=H){S(H,"left")}return }else{if(F.y-G.top<=B.thresh){if(Q.el!=H){S(H,"up")}return }else{if(F.x-G.left<=B.thresh){if(Q.el!=H){S(H,"right")}return }}}}}}N()};L.fireEvents=L.fireEvents.createSequence(O,L);L.stopDrag=L.stopDrag.createSequence(R,L);return{register:function(C){if(C instanceof Array){for(var A=0,B=C.length;A<B;A++){this.register(C[A])}}else{C=Ext.get(C);T[C.id]=C}},unregister:function(C){if(C instanceof Array){for(var A=0,B=C.length;A<B;A++){this.unregister(C[A])}}else{C=Ext.get(C);delete T[C.id]}},thresh:25,increment:100,frequency:500,animate:true,animDuration:0.4,refreshCache:function(){for(var A in T){if(typeof T[A]=="object"){T[A]._region=T[A].getRegion()}}}}}();Ext.dd.Registry=function(){var F={};var H={};var E=0;var G=function(B,C){if(typeof B=="string"){return B}var A=B.id;if(!A&&C!==false){A="extdd-"+(++E);B.id=A}return A};return{register:function(B,A){A=A||{};if(typeof B=="string"){B=document.getElementById(B)}A.ddel=B;F[G(B)]=A;if(A.isHandle!==false){H[A.ddel.id]=A}if(A.handles){var C=A.handles;for(var D=0,J=C.length;D<J;D++){H[G(C[D])]=A}}},unregister:function(C){var A=G(C,false);var B=F[A];if(B){delete F[A];if(B.handles){var D=B.handles;for(var K=0,L=D.length;K<L;K++){delete H[G(D[K],false)]}}}},getHandle:function(A){if(typeof A!="string"){A=A.id}return H[A]},getHandleFromEvent:function(A){var B=Ext.lib.Event.getTarget(A);return B?H[B.id]:null},getTarget:function(A){if(typeof A!="string"){A=A.id}return F[A]},getTargetFromEvent:function(A){var B=Ext.lib.Event.getTarget(A);return B?F[B.id]||H[B.id]:null}}}();Ext.dd.StatusProxy=function(B){Ext.apply(this,B);this.id=this.id||Ext.id();this.el=new Ext.Layer({dh:{id:this.id,tag:"div",cls:"x-dd-drag-proxy "+this.dropNotAllowed,children:[{tag:"div",cls:"x-dd-drop-icon"},{tag:"div",cls:"x-dd-drag-ghost"}]},shadow:!B||B.shadow!==false});this.ghost=Ext.get(this.el.dom.childNodes[1]);this.dropStatus=this.dropNotAllowed};Ext.dd.StatusProxy.prototype={dropAllowed:"x-dd-drop-ok",dropNotAllowed:"x-dd-drop-nodrop",setStatus:function(B){B=B||this.dropNotAllowed;if(this.dropStatus!=B){this.el.replaceClass(this.dropStatus,B);this.dropStatus=B}},reset:function(B){this.el.dom.className="x-dd-drag-proxy "+this.dropNotAllowed;this.dropStatus=this.dropNotAllowed;if(B){this.ghost.update("")}},update:function(B){if(typeof B=="string"){this.ghost.update(B)}else{this.ghost.update("");B.style.margin="0";this.ghost.dom.appendChild(B)}},getEl:function(){return this.el},getGhost:function(){return this.ghost},hide:function(B){this.el.hide();if(B){this.reset(true)}},stop:function(){if(this.anim&&this.anim.isAnimated&&this.anim.isAnimated()){this.anim.stop()}},show:function(){this.el.show()},sync:function(){this.el.sync()},repair:function(F,E,D){this.callback=E;this.scope=D;if(F&&this.animRepair!==false){this.el.addClass("x-dd-drag-repair");this.el.hideUnders(true);this.anim=this.el.shift({duration:this.repairDuration||0.5,easing:"easeOut",xy:F,stopFx:true,callback:this.afterRepair,scope:this})}else{this.afterRepair()}},afterRepair:function(){this.hide(true);if(typeof this.callback=="function"){this.callback.call(this.scope||this)}this.callback=null;this.scope=null}};Ext.dd.DragSource=function(D,C){this.el=Ext.get(D);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.dd.DropTarget=function(D,C){this.el=Ext.get(D);Ext.apply(this,C);if(this.containerScroll){Ext.dd.ScrollManager.register(this.el)}Ext.dd.DropTarget.superclass.constructor.call(this,this.el.dom,this.ddGroup||this.group,{isTarget:true})};Ext.extend(Ext.dd.DropTarget,Ext.dd.DDTarget,{dropAllowed:"x-dd-drop-ok",dropNotAllowed:"x-dd-drop-nodrop",isTarget:true,isNotifyTarget:true,notifyEnter:function(D,E,F){if(this.overClass){this.el.addClass(this.overClass)}return this.dropAllowed},notifyOver:function(D,E,F){return this.dropAllowed},notifyOut:function(D,E,F){if(this.overClass){this.el.removeClass(this.overClass)}},notifyDrop:function(D,E,F){return false}});Ext.dd.DragZone=function(D,C){Ext.dd.DragZone.superclass.constructor.call(this,D,C);if(this.containerScroll){Ext.dd.ScrollManager.register(this.el)}};Ext.extend(Ext.dd.DragZone,Ext.dd.DragSource,{getDragData:function(B){return Ext.dd.Registry.getHandleFromEvent(B)},onInitDrag:function(C,D){this.proxy.update(this.dragData.ddel.cloneNode(true));this.onStartDrag(C,D);return true},afterRepair:function(){if(Ext.enableFx){Ext.Element.fly(this.dragData.ddel).highlight(this.hlColor||"c3daf9")}this.dragging=false},getRepairXY:function(B){return Ext.Element.fly(this.dragData.ddel).getXY()}});Ext.dd.DropZone=function(D,C){Ext.dd.DropZone.superclass.constructor.call(this,D,C)};Ext.extend(Ext.dd.DropZone,Ext.dd.DropTarget,{getTargetFromEvent:function(B){return Ext.dd.Registry.getTargetFromEvent(B)},onNodeEnter:function(F,E,G,H){},onNodeOver:function(F,E,G,H){return this.dropAllowed},onNodeOut:function(F,E,G,H){},onNodeDrop:function(F,E,G,H){return false},onContainerOver:function(D,E,F){return this.dropNotAllowed},onContainerDrop:function(D,E,F){return false},notifyEnter:function(D,E,F){return this.dropNotAllowed},notifyOver:function(E,G,H){var F=this.getTargetFromEvent(G);if(!F){if(this.lastOverNode){this.onNodeOut(this.lastOverNode,E,G,H);this.lastOverNode=null}return this.onContainerOver(E,G,H)}if(this.lastOverNode!=F){if(this.lastOverNode){this.onNodeOut(this.lastOverNode,E,G,H)}this.onNodeEnter(F,E,G,H);this.lastOverNode=F}return this.onNodeOver(F,E,G,H)},notifyOut:function(D,E,F){if(this.lastOverNode){this.onNodeOut(this.lastOverNode,D,E,F);this.lastOverNode=null}},notifyDrop:function(E,G,H){if(this.lastOverNode){this.onNodeOut(this.lastOverNode,E,G,H);this.lastOverNode=null}var F=this.getTargetFromEvent(G);return F?this.onNodeDrop(F,E,G,H):this.onContainerDrop(E,G,H)},triggerCacheRefresh:function(){Ext.dd.DDM.refreshCache(this.groups)}});Ext.ComponentMgr=function(){var B=new Ext.util.MixedCollection();return{register:function(A){B.add(A)},unregister:function(A){B.remove(A)},get:function(A){return B.get(A)},onAvailable:function(A,E,F){B.on("add",function(D,C){if(C.id==A){E.call(F||C,C);B.un("add",E,F)}})}}}();Ext.Component=function(B){B=B||{};if(B.tagName||B.dom||typeof B=="string"){B={el:B,id:B.id||B}}this.initialConfig=B;Ext.apply(this,B);this.addEvents({disable:true,enable:true,beforeshow:true,show:true,beforehide:true,hide:true,beforerender:true,render:true,beforedestroy:true,destroy:true});if(!this.id){this.id="ext-comp-"+(++Ext.Component.AUTO_ID)}Ext.ComponentMgr.register(this);Ext.Component.superclass.constructor.call(this);this.initComponent();if(this.renderTo){this.render(this.renderTo);delete this.renderTo}};Ext.Component.AUTO_ID=1000;Ext.extend(Ext.Component,Ext.util.Observable,{hidden:false,disabled:false,rendered:false,disabledClass:"x-item-disabled",allowDomMove:true,hideMode:"display",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);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.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()}}return this},onRender:function(D,C){if(this.el){this.el=Ext.get(this.el);if(this.allowDomMove!==false){D.dom.insertBefore(this.el.dom,C)}}},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.purgeListeners();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)}},beforeDestroy:function(){},onDestroy:function(){},getEl:function(){return this.el},getId:function(){return this.id},focus:function(B){if(this.rendered){this.el.focus();if(B===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.rendered){this.onShow()}this.fireEvent("show",this)}return this},onShow:function(){var B=this.getActionEl();if(this.hideMode=="visibility"){B.dom.style.visibility="visible"}else{if(this.hideMode=="offsets"){B.removeClass("x-hidden")}else{B.dom.style.display=""}}},hide:function(){if(this.fireEvent("beforehide",this)!==false){this.hidden=true;if(this.rendered){this.onHide()}this.fireEvent("hide",this)}return this},onHide:function(){var B=this.getActionEl();if(this.hideMode=="visibility"){B.dom.style.visibility="hidden"}else{if(this.hideMode=="offsets"){B.addClass("x-hidden")}else{B.dom.style.display="none"}}},setVisible:function(B){if(B){this.show()}else{this.hide()}return this},isVisible:function(){return 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)}});(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();var A=this.dom.parentNode;if(A){A.removeChild(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.get(document).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.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":true,"moved":true,"beforeresize":true,"beforeapply":true});Ext.SplitBar.superclass.constructor.call(this)};Ext.extend(Ext.SplitBar,Ext.util.Observable,{onStartProxyDrag:function(G,H){this.fireEvent("beforeresize",this);if(!this.overlay){var I=Ext.DomHelper.insertFirst(document.body,{cls:"x-drag-overlay",html:"&#160;"},true);I.unselectable();I.enableDisplayMode("block");Ext.SplitBar.prototype.overlay=I}this.overlay.setSize(Ext.lib.Dom.getViewWidth(true),Ext.lib.Dom.getViewHeight(true));this.overlay.show();Ext.get(this.proxy).setDisplayed("block");var K=this.adapter.getElementSize(this);this.activeMinSize=this.getMinimumSize();this.activeMaxSize=this.getMaximumSize();var J=K-this.activeMinSize;var L=Math.max(this.activeMaxSize-K,0);if(this.orientation==Ext.SplitBar.HORIZONTAL){this.dd.resetConstraints();this.dd.setXConstraint(this.placement==Ext.SplitBar.LEFT?J:L,this.placement==Ext.SplitBar.LEFT?L:J);this.dd.setYConstraint(0,0)}else{this.dd.resetConstraints();this.dd.setXConstraint(0,0);this.dd.setYConstraint(this.placement==Ext.SplitBar.TOP?J:L,this.placement==Ext.SplitBar.TOP?L:J)}this.dragSpecs.startSize=K;this.dragSpecs.startPoint=[G,H];Ext.dd.DDProxy.prototype.b4StartDrag.call(this.dd,G,H)},onEndProxyDrag:function(E){Ext.get(this.proxy).setDisplayed(false);var F=Ext.lib.Event.getXY(E);if(this.overlay){this.overlay.hide()}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();this.proxy.parentNode.removeChild(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.TabPanel=function(C,D){this.el=Ext.get(C,true);if(D){if(typeof D=="boolean"){this.tabPosition=D?"bottom":"top"}else{Ext.apply(this,D)}}if(this.tabPosition=="bottom"){this.bodyEl=Ext.get(this.createBody(this.el.dom));this.el.addClass("x-tabs-bottom")}this.stripWrap=Ext.get(this.createStrip(this.el.dom),true);this.stripEl=Ext.get(this.createStripList(this.stripWrap.dom),true);this.stripBody=Ext.get(this.stripWrap.dom.firstChild.firstChild,true);if(Ext.isIE){Ext.fly(this.stripWrap.dom.firstChild).setStyle("overflow-x","hidden")}if(this.tabPosition!="bottom"){this.bodyEl=Ext.get(this.createBody(this.el.dom));this.el.addClass("x-tabs-top")}this.items=[];this.bodyEl.setStyle("position","relative");this.active=null;this.activateDelegate=this.activate.createDelegate(this);this.addEvents({"tabchange":true,"beforetabchange":true});Ext.EventManager.onWindowResize(this.onResize,this);this.cpad=this.el.getPadding("lr");this.hiddenCount=0;Ext.TabPanel.superclass.constructor.call(this)};Ext.extend(Ext.TabPanel,Ext.util.Observable,{tabPosition:"top",currentTabWidth:0,minTabWidth:40,maxTabWidth:250,preferredTabWidth:175,resizeTabs:false,monitorResize:true,addTab:function(G,H,I,F){var J=new Ext.TabPanelItem(this,G,H,F);this.addTabItem(J);if(I){J.setContent(I)}return J},getTab:function(B){return this.items[B]},hideTab:function(D){var C=this.items[D];if(!C.isHidden()){C.setHidden(true);this.hiddenCount++;this.autoSizeTabs()}},unhideTab:function(D){var C=this.items[D];if(C.isHidden()){C.setHidden(false);this.hiddenCount--;this.autoSizeTabs()}},addTabItem:function(B){this.items[B.id]=B;this.items.push(B);if(this.resizeTabs){B.setWidth(this.currentTabWidth||this.preferredTabWidth);this.autoSizeTabs()}else{B.autoSize()}},removeTab:function(G){var F=this.items;var I=F[G];if(!I){return }var J=F.indexOf(I);if(this.active==I&&F.length>1){var H=this.getNextAvailable(J);if(H){H.activate()}}this.stripEl.dom.removeChild(I.pnode.dom);if(I.bodyEl.dom.parentNode==this.bodyEl.dom){this.bodyEl.dom.removeChild(I.bodyEl.dom)}F.splice(J,1);delete this.items[I.id];I.fireEvent("close",I);I.purgeListeners();this.autoSizeTabs()},getNextAvailable:function(F){var E=this.items;var H=F;while(H<E.length){var G=E[++H];if(G&&!G.isHidden()){return G}}H=F;while(H>=0){var G=E[--H];if(G&&!G.isHidden()){return G}}return null},disableTab:function(D){var C=this.items[D];if(C&&this.active!=C){C.disable()}},enableTab:function(D){var C=this.items[D];C.enable()},activate:function(E){var D=this.items[E];if(!D){return null}if(D==this.active||D.disabled){return D}var F={};this.fireEvent("beforetabchange",this,F,D);if(F.cancel!==true&&!D.disabled){if(this.active){this.active.hide()}this.active=this.items[E];this.active.show();this.fireEvent("tabchange",this,this.active)}return D},getActiveTab:function(){return this.active},syncHeight:function(H){var E=(H||this.el.getHeight())-this.el.getBorderWidth("tb")-this.el.getPadding("tb");var F=this.bodyEl.getMargins();var G=E-(this.stripWrap.getHeight()||0)-(F.top+F.bottom);this.bodyEl.setHeight(G);return G},onResize:function(){if(this.monitorResize){this.autoSizeTabs()}},beginUpdate:function(){this.updating=true},endUpdate:function(){this.updating=false;this.autoSizeTabs()},autoSizeTabs:function(){var I=this.items.length;var L=I-this.hiddenCount;if(!this.resizeTabs||I<1||L<1||this.updating){return }var K=Math.max(this.el.getWidth()-this.cpad,10);var H=Math.floor(K/L);var G=this.stripBody;if(G.getWidth()>K){var J=this.items;this.setTabWidth(Math.max(H,this.minTabWidth)-2);if(H<this.minTabWidth){}}else{if(this.currentTabWidth<this.preferredTabWidth){this.setTabWidth(Math.min(H,this.preferredTabWidth)-2)}}},getCount:function(){return this.items.length},setTabWidth:function(E){this.currentTabWidth=E;for(var F=0,D=this.items.length;F<D;F++){if(!this.items[F].isHidden()){this.items[F].setWidth(E)}}},destroy:function(E){Ext.EventManager.removeResizeListener(this.onResize,this);for(var F=0,D=this.items.length;F<D;F++){this.items[F].purgeListeners()}if(E===true){this.el.update("");this.el.remove()}}});Ext.TabPanelItem=function(J,H,K,L){this.tabPanel=J;this.id=H;this.disabled=false;this.text=K;this.loaded=false;this.closable=L;this.bodyEl=Ext.get(J.createItemBody(J.bodyEl.dom,H));this.bodyEl.setVisibilityMode(Ext.Element.VISIBILITY);this.bodyEl.setStyle("display","block");this.bodyEl.setStyle("zoom","1");this.hideAction();var G=J.createStripElements(J.stripEl.dom,K,L);this.el=Ext.get(G.el,true);this.inner=Ext.get(G.inner,true);this.textEl=Ext.get(this.el.dom.firstChild.firstChild.firstChild,true);this.pnode=Ext.get(G.el.parentNode,true);this.el.on("mousedown",this.onTabMouseDown,this);this.el.on("click",this.onTabClick,this);if(L){var I=Ext.get(G.close,true);I.dom.title=this.closeText;I.addClassOnOver("close-over");I.on("click",this.closeClick,this)}this.addEvents({"activate":true,"beforeclose":true,"close":true,"deactivate":true});this.hidden=false;Ext.TabPanelItem.superclass.constructor.call(this)};Ext.extend(Ext.TabPanelItem,Ext.util.Observable,{purgeListeners:function(){Ext.util.Observable.prototype.purgeListeners.call(this);this.el.removeAllListeners()},show:function(){this.pnode.addClass("on");this.showAction();if(Ext.isOpera){this.tabPanel.stripWrap.repaint()}this.fireEvent("activate",this.tabPanel,this)},isActive:function(){return this.tabPanel.getActiveTab()==this},hide:function(){this.pnode.removeClass("on");this.hideAction();this.fireEvent("deactivate",this.tabPanel,this)},hideAction:function(){this.bodyEl.hide();this.bodyEl.setStyle("position","absolute");this.bodyEl.setLeft("-20000px");this.bodyEl.setTop("-20000px")},showAction:function(){this.bodyEl.setStyle("position","relative");this.bodyEl.setTop("");this.bodyEl.setLeft("");this.bodyEl.show()},setTooltip:function(B){if(Ext.QuickTips&&Ext.QuickTips.isEnabled()){this.textEl.dom.qtip=B;this.textEl.dom.removeAttribute("title")}else{this.textEl.dom.title=B}},onTabClick:function(B){B.preventDefault();this.tabPanel.activate(this.id)},onTabMouseDown:function(B){B.preventDefault();this.tabPanel.activate(this.id)},getWidth:function(){return this.inner.getWidth()},setWidth:function(D){var C=D-this.pnode.getPadding("lr");this.inner.setWidth(C);this.textEl.setWidth(C-this.inner.getPadding("lr"));this.pnode.setWidth(D)},setHidden:function(B){this.hidden=B;this.pnode.setStyle("display",B?"none":"")},isHidden:function(){return this.hidden},getText:function(){return this.text},autoSize:function(){this.textEl.setWidth(1);this.setWidth(this.textEl.dom.scrollWidth+this.pnode.getPadding("lr")+this.inner.getPadding("lr"))},setText:function(B){this.text=B;this.textEl.update(B);this.setTooltip(B);if(!this.tabPanel.resizeTabs){this.autoSize()}},activate:function(){this.tabPanel.activate(this.id)},disable:function(){if(this.tabPanel.active!=this){this.disabled=true;this.pnode.addClass("disabled")}},enable:function(){this.disabled=false;this.pnode.removeClass("disabled")},setContent:function(D,C){this.bodyEl.update(D,C)},getUpdateManager:function(){return this.bodyEl.getUpdateManager()},setUrl:function(D,E,F){if(this.refreshDelegate){this.un("activate",this.refreshDelegate)}this.refreshDelegate=this._handleRefresh.createDelegate(this,[D,E,F]);this.on("activate",this.refreshDelegate);return this.bodyEl.getUpdateManager()},_handleRefresh:function(E,F,G){if(!G||!this.loaded){var H=this.bodyEl.getUpdateManager();H.update(E,F,this._setLoaded.createDelegate(this))}},refresh:function(){if(this.refreshDelegate){this.loaded=false;this.refreshDelegate()}},_setLoaded:function(){this.loaded=true},closeClick:function(C){var D={};C.stopEvent();this.fireEvent("beforeclose",this,D);if(D.cancel!==true){this.tabPanel.removeTab(this.id)}},closeText:"Close this tab"});Ext.TabPanel.prototype.createStrip=function(C){var D=document.createElement("div");D.className="x-tabs-wrap";C.appendChild(D);return D};Ext.TabPanel.prototype.createStripList=function(B){B.innerHTML='<div class="x-tabs-strip-wrap"><table class="x-tabs-strip" cellspacing="0" cellpadding="0" border="0"><tbody><tr></tr></tbody></table></div>';return B.firstChild.firstChild.firstChild.firstChild};Ext.TabPanel.prototype.createBody=function(D){var C=document.createElement("div");Ext.id(C,"tab-body");Ext.fly(C).addClass("x-tabs-body");D.appendChild(C);return C};Ext.TabPanel.prototype.createItemBody=function(F,E){var D=Ext.getDom(E);if(!D){D=document.createElement("div");D.id=E}Ext.fly(D).addClass("x-tabs-item-body");F.insertBefore(D,F.firstChild);return D};Ext.TabPanel.prototype.createStripElements=function(L,J,M){var I=document.createElement("td");L.appendChild(I);if(M){I.className="x-tabs-closable";if(!this.closeTpl){this.closeTpl=new Ext.Template('<a href="#" class="x-tabs-right"><span class="x-tabs-left"><em class="x-tabs-inner"><span unselectable="on"'+(this.disableTooltips?"":' title="{text}"')+' class="x-tabs-text">{text}</span><div unselectable="on" class="close-icon">&#160;</div></em></span></a>')}var N=this.closeTpl.overwrite(I,{"text":J});var K=N.getElementsByTagName("div")[0];var H=N.getElementsByTagName("em")[0];return{"el":N,"close":K,"inner":H}}else{if(!this.tabTpl){this.tabTpl=new Ext.Template('<a href="#" class="x-tabs-right"><span class="x-tabs-left"><em class="x-tabs-inner"><span unselectable="on"'+(this.disableTooltips?"":' title="{text}"')+' class="x-tabs-text">{text}</span></em></span></a>')}var N=this.tabTpl.overwrite(I,{"text":J});var H=N.getElementsByTagName("em")[0];return{"el":N,"inner":H}}};Ext.Button=function(D,C){Ext.apply(this,C);this.addEvents({"click":true,"toggle":true,"mouseover":true,"mouseout":true});if(this.menu){this.menu=Ext.menu.MenuMgr.get(this.menu)}if(D){this.render(D)}Ext.Button.superclass.constructor.call(this)};Ext.extend(Ext.Button,Ext.util.Observable,{hidden:false,disabled:false,pressed:false,tabIndex:undefined,enableToggle:false,menu:undefined,menuAlign:"tl-bl?",iconCls:undefined,type:"button",menuClassTarget:"tr",clickEvent:"click",handleMouseEvents:true,tooltipType:"qtip",render:function(F){var H;if(this.hideParent){this.parentEl=Ext.get(F)}if(!this.dhconfig){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}H=this.template.append(F,[this.text||"&#160;",this.type],true);var G=H.child("button:first");G.on("focus",this.onFocus,this);G.on("blur",this.onBlur,this);if(this.cls){H.addClass(this.cls)}if(this.icon){G.setStyle("background-image","url("+this.icon+")")}if(this.iconCls){G.addClass(this.iconCls);if(!this.cls){H.addClass(this.text?"x-btn-text-icon":"x-btn-icon")}}if(this.tabIndex!==undefined){G.dom.tabIndex=this.tabIndex}if(this.tooltip){if(typeof this.tooltip=="object"){Ext.QuickTips.tips(Ext.apply({target:G.id},this.tooltip))}else{G.dom[this.tooltipType]=this.tooltip}}}else{H=Ext.DomHelper.append(Ext.get(F).dom,this.dhconfig,true)}this.el=H;if(this.id){this.el.dom.id=this.el.id=this.id}if(this.menu){this.el.child(this.menuClassTarget).addClass("x-btn-with-menu");this.menu.on("show",this.onMenuShow,this);this.menu.on("hide",this.onMenuHide,this)}H.addClass("x-btn");if(Ext.isIE&&!Ext.isIE7){this.autoWidth.defer(1,this)}else{this.autoWidth()}if(this.handleMouseEvents){H.on("mouseover",this.onMouseOver,this);H.on("mouseout",this.onMouseOut,this);H.on("mousedown",this.onMouseDown,this)}H.on(this.clickEvent,this.onClick,this);if(this.hidden){this.hide()}if(this.disabled){this.disable()}Ext.ButtonToggleMgr.register(this);if(this.pressed){this.el.addClass("x-btn-pressed")}if(this.repeat){var E=new Ext.util.ClickRepeater(H,typeof this.repeat=="object"?this.repeat:{});E.on("click",this.onClick,this)}},getEl:function(){return this.el},destroy:function(){Ext.ButtonToggleMgr.unregister(this);this.el.removeAllListeners();this.purgeListeners();this.el.remove()},autoWidth:function(){if(this.el){this.el.setWidth("auto");if(Ext.isIE7&&Ext.isStrict){var B=this.el.child("button");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.hidden){this.el.beginMeasure()}if(this.el.getWidth()<this.minWidth){this.el.setWidth(this.minWidth)}if(this.hidden){this.el.endMeasure()}}}},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 button.x-btn-text").update(B)}this.autoWidth()},getText:function(){return this.text},show:function(){this.hidden=false;if(this.el){this[this.hideParent?"parentEl":"el"].setStyle("display","")}},hide:function(){this.hidden=true;if(this.el){this[this.hideParent?"parentEl":"el"].setStyle("display","none")}},setVisible:function(B){if(B){this.show()}else{this.hide()}},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("button:first").focus()},disable:function(){if(this.el){this.el.addClass("x-btn-disabled")}this.disabled=true},enable:function(){if(this.el){this.el.removeClass("x-btn-disabled")}this.disabled=false},setDisabled:function(B){this[B!==true?"enable":"disable"]()},onClick:function(B){if(B){B.preventDefault()}if(B.button!=0){return }if(!this.disabled){if(this.enableToggle){this.toggle()}if(this.menu&&!this.menu.isVisible()){this.menu.show(this.el,this.menuAlign)}this.fireEvent("click",this,B);if(this.handler){this.el.removeClass("x-btn-over");this.handler.call(this.scope||this,this,B)}}},onMouseOver:function(B){if(!this.disabled){this.el.addClass("x-btn-over");this.fireEvent("mouseover",this,B)}},onMouseOut:function(B){if(!B.within(this.el,true)){this.el.removeClass("x-btn-over");this.fireEvent("mouseout",this,B)}},onFocus:function(B){if(!this.disabled){this.el.addClass("x-btn-focus")}},onBlur:function(B){this.el.removeClass("x-btn-focus")},onMouseDown:function(B){if(!this.disabled&&B.button==0){this.el.addClass("x-btn-click");Ext.get(document).on("mouseup",this.onMouseUp,this)}},onMouseUp:function(B){if(B.button==0){this.el.removeClass("x-btn-click");Ext.get(document).un("mouseup",this.onMouseUp,this)}},onMenuShow:function(B){this.el.addClass("x-btn-menu-active")},onMenuHide:function(B){this.el.removeClass("x-btn-menu-active")}});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.SplitButton=function(D,C){Ext.SplitButton.superclass.constructor.call(this,D,C);this.addEvents({"arrowclick":true})};Ext.extend(Ext.SplitButton,Ext.Button,{render:function(F){var E=new Ext.Template('<table cellspacing="0" class="x-btn-menu-wrap x-btn"><tr><td>','<table cellspacing="0" class="x-btn-wrap x-btn-menu-text-wrap"><tbody>','<tr><td class="x-btn-left"><i>&#160;</i></td><td class="x-btn-center"><button class="x-btn-text" type="{1}">{0}</button></td></tr>',"</tbody></table></td><td>",'<table cellspacing="0" class="x-btn-wrap x-btn-menu-arrow-wrap"><tbody>','<tr><td class="x-btn-center"><button class="x-btn-menu-arrow-el" type="button">&#160;</button></td><td class="x-btn-right"><i>&#160;</i></td></tr>',"</tbody></table></td></tr></table>");var H=E.append(F,[this.text,this.type],true);var G=H.child("button");if(this.cls){H.addClass(this.cls)}if(this.icon){G.setStyle("background-image","url("+this.icon+")")}if(this.iconCls){G.addClass(this.iconCls);if(!this.cls){H.addClass(this.text?"x-btn-text-icon":"x-btn-icon")}}this.el=H;if(this.handleMouseEvents){H.on("mouseover",this.onMouseOver,this);H.on("mouseout",this.onMouseOut,this);H.on("mousedown",this.onMouseDown,this);H.on("mouseup",this.onMouseUp,this)}H.on(this.clickEvent,this.onClick,this);if(this.tooltip){if(typeof this.tooltip=="object"){Ext.QuickTips.tips(Ext.apply({target:G.id},this.tooltip))}else{G.dom[this.tooltipType]=this.tooltip}}if(this.arrowTooltip){H.child("button:nth(2)").dom[this.tooltipType]=this.arrowTooltip}if(this.hidden){this.hide()}if(this.disabled){this.disable()}if(this.pressed){this.el.addClass("x-btn-pressed")}if(Ext.isIE&&!Ext.isIE7){this.autoWidth.defer(1,this)}else{this.autoWidth()}if(this.menu){this.menu.on("show",this.onMenuShow,this);this.menu.on("hide",this.onMenuHide,this)}},autoWidth:function(){if(this.el){var E=this.el.child("table:first");var F=this.el.child("table:last");this.el.setWidth("auto");E.setWidth("auto");if(Ext.isIE7&&Ext.isStrict){var D=this.el.child("button:first");if(D&&D.getWidth()>20){D.clip();D.setWidth(Ext.util.TextMetrics.measure(D,this.text).width+D.getFrameWidth("lr"))}}if(this.minWidth){if(this.hidden){this.el.beginMeasure()}if((E.getWidth()+F.getWidth())<this.minWidth){E.setWidth(this.minWidth-F.getWidth())}if(this.hidden){this.el.endMeasure()}}this.el.setWidth(E.getWidth()+F.getWidth())}},setHandler:function(D,C){this.handler=D;this.scope=C},setArrowHandler:function(D,C){this.arrowHandler=D;this.scope=C},focus:function(){if(this.el){this.el.child("button:first").focus()}},onClick:function(B){B.preventDefault();if(!this.disabled){if(B.getTarget(".x-btn-menu-arrow-wrap")){if(this.menu&&!this.menu.isVisible()){this.menu.show(this.el,this.menuAlign)}this.fireEvent("arrowclick",this,B);if(this.arrowHandler){this.arrowHandler.call(this.scope||this,this,B)}}else{this.fireEvent("click",this,B);if(this.handler){this.handler.call(this.scope||this,this,B)}}}},onMouseDown:function(B){if(!this.disabled){Ext.fly(B.getTarget("table")).addClass("x-btn-click")}},onMouseUp:function(B){Ext.fly(B.getTarget("table")).removeClass("x-btn-click")}});Ext.MenuButton=Ext.SplitButton;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":true,"resize":true});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,constrainTo:undefined,resizeRegion:undefined,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;"});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 q=this.startBox.x,r=this.startBox.y;var w=q,x=r;var p=g.width,e=g.height;var v=p,n=e;var o=this.minWidth,c=this.minHeight;var h=this.maxWidth,Z=this.maxHeight;var t=this.widthIncrement;var y=this.heightIncrement;var b=d.getXY();var k=-(this.startPoint[0]-Math.max(this.minX,b[0]));var m=-(this.startPoint[1]-Math.max(this.minY,b[1]));var s=this.activeHandle.position;switch(s){case"east":p+=k;p=Math.min(Math.max(o,p),h);break;case"south":e+=m;e=Math.min(Math.max(c,e),Z);break;case"southeast":p+=k;e+=m;p=Math.min(Math.max(o,p),h);e=Math.min(Math.max(c,e),Z);break;case"north":m=this.constrain(e,m,c,Z);r+=m;e-=m;break;case"west":k=this.constrain(p,k,o,h);q+=k;p-=k;break;case"northeast":p+=k;p=Math.min(Math.max(o,p),h);m=this.constrain(e,m,c,Z);r+=m;e-=m;break;case"northwest":k=this.constrain(p,k,o,h);m=this.constrain(e,m,c,Z);r+=m;e-=m;q+=k;p-=k;break;case"southwest":k=this.constrain(p,k,o,h);e+=m;e=Math.min(Math.max(c,e),Z);q+=k;p-=k;break}var l=this.snap(p,t,o);var a=this.snap(e,y,c);if(l!=p||a!=e){switch(s){case"northeast":r-=a-e;break;case"north":r-=a-e;break;case"southwest":q-=l-p;break;case"west":q-=l-p;break;case"northwest":q-=l-p;r-=a-e;break}p=l;e=a}if(this.preserveRatio){switch(s){case"southeast":case"east":e=n*(p/v);e=Math.min(Math.max(c,e),Z);p=v*(e/n);break;case"south":p=v*(e/n);p=Math.min(Math.max(o,p),h);e=n*(p/v);break;case"northeast":p=v*(e/n);p=Math.min(Math.max(o,p),h);e=n*(p/v);break;case"north":var Y=p;p=v*(e/n);p=Math.min(Math.max(o,p),h);e=n*(p/v);q+=(Y-p)/2;break;case"southwest":e=n*(p/v);e=Math.min(Math.max(c,e),Z);var Y=p;p=v*(e/n);q+=Y-p;break;case"west":var u=e;e=n*(p/v);e=Math.min(Math.max(c,e),Z);r+=(u-e)/2;var Y=p;p=v*(e/n);q+=Y-p;break;case"northwest":var Y=p;var u=e;e=n*(p/v);e=Math.min(Math.max(c,e),Z);p=v*(e/n);r+=u-e;q+=Y-p;break}}this.proxy.setBounds(q,r,p,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()}}});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.BasicDialog=function(G,H){this.el=Ext.get(G);var F=Ext.DomHelper;if(!this.el&&H&&H.autoCreate){if(typeof H.autoCreate=="object"){if(!H.autoCreate.id){H.autoCreate.id=G}this.el=F.append(document.body,H.autoCreate,true)}else{this.el=F.append(document.body,{tag:"div",id:G,style:"visibility:hidden;"},true)}}G=this.el;G.setDisplayed(true);G.hide=this.hideAction;this.id=G.id;G.addClass("x-dlg");Ext.apply(this,H);this.proxy=G.createProxy("x-dlg-proxy");this.proxy.hide=this.hideAction;this.proxy.setOpacity(0.5);this.proxy.hide();if(H.width){G.setWidth(H.width)}if(H.height){G.setHeight(H.height)}this.size=G.getSize();if(typeof H.x!="undefined"&&typeof H.y!="undefined"){this.xy=[H.x,H.y]}else{this.xy=G.getCenterXY(true)}this.header=G.child("> .x-dlg-hd");this.body=G.child("> .x-dlg-bd");this.footer=G.child("> .x-dlg-ft");if(!this.header){this.header=G.createChild({tag:"div",cls:"x-dlg-hd",html:"&#160;"},this.body?this.body.dom:null)}if(!this.body){this.body=G.createChild({tag:"div",cls:"x-dlg-bd"})}this.header.unselectable();if(this.title){this.header.update(this.title)}this.focusEl=G.createChild({tag:"a",href:"#",cls:"x-dlg-focus",tabIndex:"-1"});this.focusEl.swallowEvent("click",true);this.header.wrap({cls:"x-dlg-hd-right"}).wrap({cls:"x-dlg-hd-left"},true);this.bwrap=this.body.wrap({tag:"div",cls:"x-dlg-dlg-body"});if(this.footer){this.bwrap.dom.appendChild(this.footer.dom)}this.bg=this.el.createChild({tag:"div",cls:"x-dlg-bg",html:'<div class="x-dlg-bg-left"><div class="x-dlg-bg-right"><div class="x-dlg-bg-center">&#160;</div></div></div>'});this.centerBg=this.bg.child("div.x-dlg-bg-center");if(this.autoScroll!==false&&!this.autoTabs){this.body.setStyle("overflow","auto")}this.toolbox=this.el.createChild({cls:"x-dlg-toolbox"});if(this.closable!==false){this.el.addClass("x-dlg-closable");this.close=this.toolbox.createChild({cls:"x-dlg-close"});this.close.on("click",this.closeClick,this);this.close.addClassOnOver("x-dlg-close-over")}if(this.collapsible!==false){this.collapseBtn=this.toolbox.createChild({cls:"x-dlg-collapse"});this.collapseBtn.on("click",this.collapseClick,this);this.collapseBtn.addClassOnOver("x-dlg-collapse-over");this.header.on("dblclick",this.collapseClick,this)}if(this.resizable!==false){this.el.addClass("x-dlg-resizable");this.resizer=new Ext.Resizable(G,{minWidth:this.minWidth||80,minHeight:this.minHeight||80,handles:this.resizeHandles||"all",pinned:true});this.resizer.on("beforeresize",this.beforeResize,this);this.resizer.on("resize",this.onResize,this)}if(this.draggable!==false){G.addClass("x-dlg-draggable");if(!this.proxyDrag){var E=new Ext.dd.DD(G.dom.id,"WindowDrag")}else{var E=new Ext.dd.DDProxy(G.dom.id,"WindowDrag",{dragElId:this.proxy.id})}E.setHandleElId(this.header.id);E.endDrag=this.endMove.createDelegate(this);E.startDrag=this.startMove.createDelegate(this);E.onDrag=this.onDrag.createDelegate(this);E.scroll=false;this.dd=E}if(this.modal){this.mask=F.append(document.body,{tag:"div",cls:"x-dlg-mask"},true);this.mask.enableDisplayMode("block");this.mask.hide();this.el.addClass("x-dlg-modal")}if(this.shadow){this.shadow=new Ext.Shadow({mode:typeof this.shadow=="string"?this.shadow:"sides",offset:this.shadowOffset})}else{this.shadowOffset=0}if(Ext.useShims&&this.shim!==false){this.shim=this.el.createShim();this.shim.hide=this.hideAction;this.shim.hide()}else{this.shim=false}if(this.autoTabs){this.initTabs()}this.addEvents({"keydown":true,"move":true,"resize":true,"beforehide":true,"hide":true,"beforeshow":true,"show":true});G.on("keydown",this.onKeyDown,this);G.on("mousedown",this.toFront,this);Ext.EventManager.onWindowResize(this.adjustViewport,this,true);this.el.hide();Ext.DialogManager.register(this);Ext.BasicDialog.superclass.constructor.call(this)};Ext.extend(Ext.BasicDialog,Ext.util.Observable,{shadowOffset:Ext.isIE?6:5,minHeight:80,minWidth:200,minButtonWidth:75,defaultButton:null,buttonAlign:"right",tabTag:"div",firstShow:true,setTitle:function(B){this.header.update(B);return this},closeClick:function(){this.hide()},collapseClick:function(){this[this.collapsed?"expand":"collapse"]()},collapse:function(){if(!this.collapsed){this.collapsed=true;this.el.addClass("x-dlg-collapsed");this.restoreHeight=this.el.getHeight();this.resizeTo(this.el.getWidth(),this.header.getHeight())}},expand:function(){if(this.collapsed){this.collapsed=false;this.el.removeClass("x-dlg-collapsed");this.resizeTo(this.el.getWidth(),this.restoreHeight)}},initTabs:function(){var B=this.getTabs();while(B.getTab(0)){B.removeTab(0)}this.el.select(this.tabTag+".x-dlg-tab").each(function(D){var A=D.dom;B.addTab(Ext.id(A),A.title);A.title=""});B.activate(0);return B},beforeResize:function(){this.resizer.minHeight=Math.max(this.minHeight,this.getHeaderFooterHeight(true)+40)},onResize:function(){this.refreshSize();this.syncBodyHeight();this.adjustAssets();this.focus();this.fireEvent("resize",this,this.size.width,this.size.height)},onKeyDown:function(B){if(this.isVisible()){this.fireEvent("keydown",this,B)}},resizeTo:function(D,C){this.el.setSize(D,C);this.size={width:D,height:C};this.syncBodyHeight();if(this.fixedcenter){this.center()}if(this.isVisible()){this.constrainXY();this.adjustAssets()}this.fireEvent("resize",this,D,C);return this},setContentSize:function(C,D){D+=this.getHeaderFooterHeight()+this.body.getMargins("tb");C+=this.body.getMargins("lr")+this.bwrap.getMargins("lr")+this.centerBg.getPadding("lr");D+=this.body.getPadding("tb")+this.bwrap.getBorderWidth("tb")+this.body.getBorderWidth("tb")+this.el.getBorderWidth("tb");C+=this.body.getPadding("lr")+this.bwrap.getBorderWidth("lr")+this.body.getBorderWidth("lr")+this.bwrap.getPadding("lr")+this.el.getBorderWidth("lr");if(this.tabs){D+=this.tabs.stripWrap.getHeight()+this.tabs.bodyEl.getMargins("tb")+this.tabs.bodyEl.getPadding("tb");C+=this.tabs.bodyEl.getMargins("lr")+this.tabs.bodyEl.getPadding("lr")}this.resizeTo(C,D);return this},addKeyListener:function(P,M,N){var J,I,L,K;if(typeof P=="object"&&!(P instanceof Array)){J=P["key"];I=P["shift"];L=P["ctrl"];K=P["alt"]}else{J=P}var O=function(E,A){if((!I||A.shiftKey)&&(!L||A.ctrlKey)&&(!K||A.altKey)){var C=A.getKey();if(J instanceof Array){for(var B=0,D=J.length;B<D;B++){if(J[B]==C){M.call(N||window,E,C,A);return }}}else{if(C==J){M.call(N||window,E,C,A)}}}};this.on("keydown",O);return this},getTabs:function(){if(!this.tabs){this.el.addClass("x-dlg-auto-tabs");this.body.addClass(this.tabPosition=="bottom"?"x-tabs-bottom":"x-tabs-top");this.tabs=new Ext.TabPanel(this.body.dom,this.tabPosition=="bottom")}return this.tabs},addButton:function(N,J,K){var I=Ext.DomHelper;if(!this.footer){this.footer=I.append(this.bwrap,{tag:"div",cls:"x-dlg-ft"},true)}if(!this.btnContainer){var H=this.footer.createChild({cls:"x-dlg-btns x-dlg-btns-"+this.buttonAlign,html:'<table cellspacing="0"><tbody><tr></tr></tbody></table><div class="x-clear"></div>'},null,true);this.btnContainer=H.firstChild.firstChild.firstChild}var L={handler:J,scope:K,minWidth:this.minButtonWidth,hideParent:true};if(typeof N=="string"){L.text=N}else{if(N.tag){L.dhconfig=N}else{Ext.apply(L,N)}}var M=new Ext.Button(this.btnContainer.appendChild(document.createElement("td")),L);this.syncBodyHeight();if(!this.buttons){this.buttons=[]}this.buttons.push(M);return M},setDefaultButton:function(B){this.defaultButton=B;return this},getHeaderFooterHeight:function(E){var D=0;if(this.header){D+=this.header.getHeight()}if(this.footer){var F=this.footer.getMargins();D+=(this.footer.getHeight()+F.top+F.bottom)}D+=this.bwrap.getPadding("tb")+this.bwrap.getBorderWidth("tb");D+=this.centerBg.getPadding("tb");return D},syncBodyHeight:function(){var I=this.body,L=this.centerBg,H=this.bwrap;var G=this.size.height-this.getHeaderFooterHeight(false);I.setHeight(G-I.getMargins("tb"));var K=this.header.getHeight();var J=this.size.height-K;L.setHeight(J);H.setLeftTop(L.getPadding("l"),K+L.getPadding("t"));H.setHeight(J-L.getPadding("tb"));H.setWidth(this.el.getWidth(true)-L.getPadding("lr"));I.setWidth(H.getWidth(true));if(this.tabs){this.tabs.syncHeight();if(Ext.isIE){this.tabs.el.repaint()}}},restoreState:function(){var B=Ext.state.Manager.get(this.stateId||(this.el.id+"-state"));if(B&&B.width){this.xy=[B.x,B.y];this.resizeTo(B.width,B.height)}return this},beforeShow:function(){this.expand();if(this.fixedcenter){this.xy=this.el.getCenterXY(true)}if(this.modal){Ext.get(document.body).addClass("x-body-masked");this.mask.setSize(Ext.lib.Dom.getViewWidth(true),Ext.lib.Dom.getViewHeight(true));this.mask.show()}this.constrainXY()},animShow:function(){var B=Ext.get(this.animateTarget,true).getBox();this.proxy.setSize(B.width,B.height);this.proxy.setLocation(B.x,B.y);this.proxy.show();this.proxy.setBounds(this.xy[0],this.xy[1],this.size.width,this.size.height,true,0.35,this.showEl.createDelegate(this))},show:function(B){if(this.fireEvent("beforeshow",this)===false){return }if(this.syncHeightBeforeShow){this.syncBodyHeight()}else{if(this.firstShow){this.firstShow=false;this.syncBodyHeight()}}this.animateTarget=B||this.animateTarget;if(!this.el.isVisible()){this.beforeShow();if(this.animateTarget){this.animShow()}else{this.showEl()}}return this},showEl:function(){this.proxy.hide();this.el.setXY(this.xy);this.el.show();this.adjustAssets(true);this.toFront();this.focus();if(Ext.isIE){this.el.repaint()}this.fireEvent("show",this)},focus:function(){if(this.defaultButton){this.defaultButton.focus()}else{this.focusEl.focus()}},constrainXY:function(){if(this.constraintoviewport!==false){if(!this.viewSize){if(this.container){var M=this.container.getSize();this.viewSize=[M.width,M.height]}else{this.viewSize=[Ext.lib.Dom.getViewWidth(),Ext.lib.Dom.getViewHeight()]}}var M=Ext.get(this.container||document).getScroll();var I=this.xy[0],J=this.xy[1];var P=this.size.width,N=this.size.height;var L=this.viewSize[0],K=this.viewSize[1];var O=false;if(I+P>L+M.left){I=L-P;O=true}if(J+N>K+M.top){J=K-N;O=true}if(I<M.left){I=M.left;O=true}if(J<M.top){J=M.top;O=true}if(O){this.xy=[I,J];if(this.isVisible()){this.el.setLocation(I,J);this.adjustAssets()}}}},onDrag:function(){if(!this.proxyDrag){this.xy=this.el.getXY();this.adjustAssets()}},adjustAssets:function(H){var F=this.xy[0],G=this.xy[1];var J=this.size.width,I=this.size.height;if(H===true){if(this.shadow){this.shadow.show(this.el)}if(this.shim){this.shim.show()}}if(this.shadow&&this.shadow.isVisible()){this.shadow.show(this.el)}if(this.shim&&this.shim.isVisible()){this.shim.setBounds(F,G,J,I)}},adjustViewport:function(C,D){if(!C||!D){C=Ext.lib.Dom.getViewWidth();D=Ext.lib.Dom.getViewHeight()}this.viewSize=[C,D];if(this.modal&&this.mask.isVisible()){this.mask.setSize(C,D);this.mask.setSize(Ext.lib.Dom.getViewWidth(true),Ext.lib.Dom.getViewHeight(true))}if(this.isVisible()){this.constrainXY()}},destroy:function(E){if(this.isVisible()){this.animateTarget=null;this.hide()}Ext.EventManager.removeResizeListener(this.adjustViewport,this);if(this.tabs){this.tabs.destroy(E)}Ext.destroy(this.shim,this.proxy,this.resizer,this.close,this.mask);if(this.dd){this.dd.unreg()}if(this.buttons){for(var F=0,D=this.buttons.length;F<D;F++){this.buttons[F].destroy()}}this.el.removeAllListeners();if(E===true){this.el.update("");this.el.remove()}Ext.DialogManager.unregister(this)},startMove:function(){if(this.proxyDrag){this.proxy.show()}if(this.constraintoviewport!==false){this.dd.constrainTo(document.body,{right:this.shadowOffset,bottom:this.shadowOffset})}},endMove:function(){if(!this.proxyDrag){Ext.dd.DD.prototype.endDrag.apply(this.dd,arguments)}else{Ext.dd.DDProxy.prototype.endDrag.apply(this.dd,arguments);this.proxy.hide()}this.refreshSize();this.adjustAssets();this.focus();this.fireEvent("move",this,this.xy[0],this.xy[1])},toFront:function(){Ext.DialogManager.bringToFront(this);return this},toBack:function(){Ext.DialogManager.sendToBack(this);return this},center:function(){var B=this.el.getCenterXY(true);this.moveTo(B[0],B[1]);return this},moveTo:function(C,D){this.xy=[C,D];if(this.isVisible()){this.el.setXY(this.xy);this.adjustAssets()}return this},alignTo:function(F,D,E){this.xy=this.el.getAlignToXY(F,D,E);if(this.isVisible()){this.el.setXY(this.xy);this.adjustAssets()}return this},anchorTo:function(K,H,J,L){var I=function(){this.alignTo(K,H,J)};Ext.EventManager.onWindowResize(I,this);var G=typeof L;if(G!="undefined"){Ext.EventManager.on(window,"scroll",I,this,{buffer:G=="number"?L:50})}I.call(this);return this},isVisible:function(){return this.el.isVisible()},animHide:function(D){var C=Ext.get(this.animateTarget).getBox();this.proxy.show();this.proxy.setBounds(this.xy[0],this.xy[1],this.size.width,this.size.height);this.el.hide();this.proxy.setBounds(C.x,C.y,C.width,C.height,true,0.35,this.hideEl.createDelegate(this,[D]))},hide:function(B){if(this.fireEvent("beforehide",this)===false){return }if(this.shadow){this.shadow.hide()}if(this.shim){this.shim.hide()}if(this.animateTarget){this.animHide(B)}else{this.el.hide();this.hideEl(B)}return this},hideEl:function(B){this.proxy.hide();if(this.modal){this.mask.hide();Ext.get(document.body).removeClass("x-body-masked")}this.fireEvent("hide",this);if(typeof B=="function"){B()}},hideAction:function(){this.setLeft("-10000px");this.setTop("-10000px");this.setStyle("visibility","hidden")},refreshSize:function(){this.size=this.el.getSize();this.xy=this.el.getXY();Ext.state.Manager.set(this.stateId||this.el.id+"-state",this.el.getBox())},setZIndex:function(B){if(this.modal){this.mask.setStyle("z-index",B)}if(this.shim){this.shim.setStyle("z-index",++B)}if(this.shadow){this.shadow.setZIndex(++B)}this.el.setStyle("z-index",++B);if(this.proxy){this.proxy.setStyle("z-index",++B)}if(this.resizer){this.resizer.proxy.setStyle("z-index",++B)}this.lastZIndex=B},getEl:function(){return this.el}});Ext.DialogManager=function(){var H={};var J=[];var I=null;var F=function(A,B){return(!A._lastAccess||A._lastAccess<B._lastAccess)?-1:1};var G=function(){J.sort(F);var C=Ext.DialogManager.zseed;for(var B=0,D=J.length;B<D;B++){var A=J[B];if(A){A.setZIndex(C+(B*10))}}};return{zseed:9000,register:function(A){H[A.id]=A;J.push(A)},unregister:function(A){delete H[A.id];if(!J.indexOf){for(var B=0,C=J.length;B<C;B++){if(J[B]==A){J.splice(B,1);return }}}else{var B=J.indexOf(A);if(B!=-1){J.splice(B,1)}}},get:function(A){return typeof A=="object"?A:H[A]},bringToFront:function(A){A=this.get(A);if(A!=I){I=A;A._lastAccess=new Date().getTime();G()}return A},sendToBack:function(A){A=this.get(A);A._lastAccess=-(new Date().getTime());G();return A},hideAll:function(){for(var A in H){if(H[A]&&typeof H[A]!="function"&&H[A].isVisible()){H[A].hide()}}}}}();Ext.LayoutDialog=function(D,C){C.autoTabs=false;Ext.LayoutDialog.superclass.constructor.call(this,D,C);this.body.setStyle({overflow:"hidden",position:"relative"});this.layout=new Ext.BorderLayout(this.body.dom,C);this.layout.monitorWindowResize=false;this.el.addClass("x-dlg-auto-layout");this.center=Ext.BasicDialog.prototype.center;this.on("show",this.layout.layout,this.layout,true)};Ext.extend(Ext.LayoutDialog,Ext.BasicDialog,{endUpdate:function(){this.layout.endUpdate()},beginUpdate:function(){this.layout.beginUpdate()},getLayout:function(){return this.layout},showEl:function(){Ext.LayoutDialog.superclass.showEl.apply(this,arguments);if(Ext.isIE7){this.layout.layout()}},syncBodyHeight:function(){Ext.LayoutDialog.superclass.syncBodyHeight.call(this);if(this.layout){this.layout.layout()}}});Ext.MessageBox=function(){var c,U,V,g;var X,k,e,b,Y,T;var d,a,R;var S=function(A){c.hide();Ext.callback(U.fn,U.scope||window,[A,a.dom.value],1)};var h=function(){if(U&&U.cls){c.el.removeClass(U.cls)}if(g){Ext.TaskMgr.stop(g);g=null}};var Z=function(C){var A=0;if(!C){d["ok"].hide();d["cancel"].hide();d["yes"].hide();d["no"].hide();c.footer.dom.style.display="none";return A}c.footer.dom.style.display="";for(var B in d){if(typeof d[B]!="function"){if(C[B]){d[B].show();d[B].setText(typeof C[B]=="string"?C[B]:Ext.MessageBox.buttonText[B]);A+=d[B].el.getWidth()+15}else{d[B].hide()}}}return A};var W=function(A,C,B){if(U&&U.closable!==false){c.hide()}if(B){B.stopEvent()}};return{getDialog:function(){if(!c){c=new Ext.BasicDialog("x-msg-box",{autoCreate:true,shadow:true,draggable:true,resizable:false,constraintoviewport:false,fixedcenter:true,collapsible:false,shim:true,modal:true,width:400,height:100,buttonAlign:"center",closeClick:function(){if(U&&U.buttons&&U.buttons.no&&!U.buttons.cancel){S("no")}else{S("cancel")}}});c.on("hide",h);V=c.mask;c.addKeyListener(27,W);d={};var A=this.buttonText;d["ok"]=c.addButton(A["ok"],S.createCallback("ok"));d["yes"]=c.addButton(A["yes"],S.createCallback("yes"));d["no"]=c.addButton(A["no"],S.createCallback("no"));d["cancel"]=c.addButton(A["cancel"],S.createCallback("cancel"));X=c.body.createChild({html:'<span class="ext-mb-text"></span><br /><input type="text" class="ext-mb-input" /><textarea class="ext-mb-textarea"></textarea><div class="ext-mb-progress-wrap"><div class="ext-mb-progress"><div class="ext-mb-progress-bar">&#160;</div></div></div>'});k=X.dom.firstChild;e=Ext.get(X.dom.childNodes[2]);e.enableDisplayMode();e.addKeyListener([10,13],function(){if(c.isVisible()&&U&&U.buttons){if(U.buttons.ok){S("ok")}else{if(U.buttons.yes){S("yes")}}}});b=Ext.get(X.dom.childNodes[3]);b.enableDisplayMode();Y=Ext.get(X.dom.childNodes[4]);Y.enableDisplayMode();var B=Y.dom.firstChild;T=Ext.get(B.firstChild);T.setHeight(B.offsetHeight)}return c},updateText:function(A){if(!c.isVisible()&&!U.width){c.resizeTo(this.maxWidth,100)}k.innerHTML=A||"&#160;";var B=Math.max(Math.min(U.width||k.offsetWidth,this.maxWidth),Math.max(U.minWidth||this.minWidth,R));if(U.prompt){a.setWidth(B)}if(c.isVisible()){c.fixedcenter=false}c.setContentSize(B,X.getHeight());if(c.isVisible()){c.fixedcenter=true}return this},updateProgress:function(B,A){if(A){this.updateText(A)}T.setWidth(Math.floor(B*Y.dom.firstChild.offsetWidth));return this},isVisible:function(){return c&&c.isVisible()},hide:function(){if(this.isVisible()){c.hide()}},show:function(B){if(this.isVisible()){this.hide()}var A=this.getDialog();U=B;A.setTitle(U.title||"&#160;");A.close.setDisplayed(U.closable!==false);a=e;U.prompt=U.prompt||(U.multiline?true:false);if(U.prompt){if(U.multiline){e.hide();b.show();b.setHeight(typeof U.multiline=="number"?U.multiline:this.defaultTextHeight);a=b}else{e.show();b.hide()}}else{e.hide();b.hide()}Y.setDisplayed(U.progress===true);this.updateProgress(0);a.dom.value=U.value||"";if(U.prompt){c.setDefaultButton(a)}else{var C=U.buttons;var D=null;if(C&&C.ok){D=d["ok"]}else{if(C&&C.yes){D=d["yes"]}}c.setDefaultButton(D)}R=Z(U.buttons);this.updateText(U.msg);if(U.cls){A.el.addClass(U.cls)}A.proxyDrag=U.proxyDrag===true;A.modal=U.modal!==false;A.mask=U.modal!==false?V:false;if(!A.isVisible()){document.body.appendChild(c.el.dom);A.animateTarget=null;A.show(B.animEl)}return this},progress:function(A,B){this.show({title:A,msg:B,buttons:false,progress:true,closable:false,minWidth:this.minProgressWidth});return this},alert:function(A,B,C,D){this.show({title:A,msg:B,buttons:this.OK,fn:C,scope:D});return this},wait:function(A,B){this.show({title:B,msg:A,buttons:false,closable:false,progress:true,modal:true,width:300,wait:true});g=Ext.TaskMgr.start({run:function(C){Ext.MessageBox.updateProgress(((((C+20)%20)+1)*5)*0.01)},interval:1000});return this},confirm:function(A,B,C,D){this.show({title:A,msg:B,buttons:this.YESNO,fn:C,scope:D});return this},prompt:function(A,B,C,D,E){this.show({title:A,msg:B,buttons:this.OKCANCEL,fn:C,minWidth:250,scope:D,prompt:true,multiline:E});return this},OK:{ok:true},YESNO:{yes:true,no:true},OKCANCEL:{ok:true,cancel:true},YESNOCANCEL:{yes:true,no:true,cancel:true},defaultTextHeight:75,maxWidth:600,minWidth:100,minProgressWidth:250,buttonText:{ok:"OK",cancel:"Cancel",yes:"Yes",no:"No"}}}();Ext.Msg=Ext.MessageBox;Ext.QuickTips=function(){var AF,AA,o,AD,AB,v,m,AI={},AN,AG=null,AE,AH;var n,x,w,g;var AC=false,y=true,l=false;var AJ=1,t=1,AK=1,h=[];var p=function(A){if(y){return }var E=A.getTarget();if(!E||E.nodeType!==1||E==document||E==document.body){return }if(n&&E==n.el){clearTimeout(t);return }if(E&&AI[E.id]){AI[E.id].el=E;AJ=k.defer(AB.showDelay,AB,[AI[E.id]]);return }var C,B=Ext.fly(E);var D=v.namespace;if(AB.interceptTitles&&E.title){C=E.title;E.qtip=C;E.removeAttribute("title");A.preventDefault()}else{C=E.qtip||B.getAttributeNS(D,v.attribute)}if(C){AJ=k.defer(AB.showDelay,AB,[{el:E,text:C,width:B.getAttributeNS(D,v.width),autoHide:B.getAttributeNS(D,v.hide)!="user",title:B.getAttributeNS(D,v.title),cls:B.getAttributeNS(D,v.cls)}])}};var AL=function(A){clearTimeout(AJ);var B=A.getTarget();if(B&&n&&n.el==B&&(AB.autoHide&&n.autoHide!==false)){t=setTimeout(r,AB.hideDelay)}};var s=function(A){if(y){return }w=A.getXY();w[1]+=18;if(AB.trackMouse&&n){AF.setXY(w)}};var z=function(A){clearTimeout(AJ);clearTimeout(t);if(!A.within(AF)){if(AB.hideOnClick){r();AB.disable();AB.enable.defer(100,AB)}}};var u=function(){return AE.getPadding("l")+AH.getPadding("r")};var k=function(B){if(y){return }clearTimeout(AK);n=B;if(AG){AF.removeClass(AG);AG=null}if(n.cls){AF.addClass(n.cls);AG=n.cls}if(n.title){AD.update(n.title);AD.show()}else{AD.update("");AD.hide()}AF.dom.style.width=AB.maxWidth+"px";o.update(B.text);var C=u(),E=n.width;if(!E){var A=o.dom;var D=Math.max(A.offsetWidth,A.clientWidth,A.scrollWidth);if(D>AB.maxWidth){E=AB.maxWidth}else{if(D<AB.minWidth){E=AB.minWidth}else{E=D}}}AF.setWidth(parseInt(E,10)+C);if(n.autoHide===false){m.setDisplayed(true);if(g){g.unlock()}}else{m.setDisplayed(false);if(g){g.lock()}}if(w){AF.avoidY=w[1]-18;AF.setXY(w)}if(AB.animate){AF.setOpacity(0.1);AF.setStyle("visibility","visible");AF.fadeIn({callback:AM})}else{AM()}};var AM=function(){if(n){AF.show();AN.enable();if(AB.autoDismiss&&n.autoHide!==false){AK=setTimeout(r,AB.autoDismissDelay)}}};var r=function(A){clearTimeout(AK);clearTimeout(t);n=null;if(AF.isVisible()){AN.disable();if(A!==true&&AB.animate){AF.fadeOut({callback:q})}else{q()}}};var q=function(){AF.hide();if(AG){AF.removeClass(AG);AG=null}};return{minWidth:40,maxWidth:300,interceptTitles:false,trackMouse:false,hideOnClick:true,showDelay:500,hideDelay:200,autoHide:true,autoDismiss:true,autoDismissDelay:5000,animate:false,init:function(){AB=Ext.QuickTips;v=AB.tagConfig;if(!l){if(!Ext.isReady){Ext.onReady(Ext.QuickTips.init,Ext.QuickTips);return }AF=new Ext.Layer({cls:"x-tip",shadow:"drop",shim:true,constrain:true,shadowOffset:4});AF.fxDefaults={stopFx:true};AF.update('<div class="x-tip-top-left"><div class="x-tip-top-right"><div class="x-tip-top"></div></div></div><div class="x-tip-bd-left"><div class="x-tip-bd-right"><div class="x-tip-bd"><div class="x-tip-close"></div><h3></h3><div class="x-tip-bd-inner"></div><div class="x-clear"></div></div></div></div><div class="x-tip-ft-left"><div class="x-tip-ft-right"><div class="x-tip-ft"></div></div></div>');AD=AF.child("h3");AD.enableDisplayMode("block");AA=AF.child("div.x-tip-bd");o=AF.child("div.x-tip-bd-inner");AE=AF.child("div.x-tip-bd-left");AH=AF.child("div.x-tip-bd-right");m=AF.child("div.x-tip-close");m.enableDisplayMode("block");m.on("click",r);var A=Ext.get(document);A.on("mousedown",z);A.on("mouseover",p);A.on("mouseout",AL);A.on("mousemove",s);AN=A.addKeyListener(27,r);AN.disable();if(Ext.dd.DD){g=AF.initDD("default",null,{onDrag:function(){AF.sync()}});g.setHandleElId(AD.id);g.lock()}l=true}this.enable()},register:function(B){var H=B instanceof Array?B:arguments;for(var A=0,E=H.length;A<E;A++){var F=H[A];var G=F.target;if(G){if(G instanceof Array){for(var C=0,D=G.length;C<D;C++){AI[G[C]]=F}}else{AI[typeof G=="string"?G:Ext.id(G)]=F}}}},unregister:function(A){delete AI[Ext.id(A)]},enable:function(){if(l&&y){h.pop();if(h.length<1){y=false}}},disable:function(){y=true;clearTimeout(AJ);clearTimeout(t);clearTimeout(AK);if(n){r(true)}h.push(1)},isEnabled:function(){return !y},tagConfig:{namespace:"ext",attribute:"qtip",width:"width",target:"target",title:"qtitle",hide:"hide",cls:"qclass"}}}();Ext.QuickTips.tips=Ext.QuickTips.register;Ext.LayoutManager=function(C,D){Ext.LayoutManager.superclass.constructor.call(this);this.el=Ext.get(C);if(this.el.dom==document.body&&Ext.isIE&&!D.allowScroll){document.body.scroll="no"}else{if(this.el.dom!=document.body&&this.el.getStyle("position")=="static"){this.el.position("relative")}}this.id=this.el.id;this.el.addClass("x-layout-container");this.monitorWindowResize=true;this.regions={};this.addEvents({"layout":true,"regionresized":true,"regioncollapsed":true,"regionexpanded":true});this.updating=false;Ext.EventManager.onWindowResize(this.onWindowResize,this,true)};Ext.extend(Ext.LayoutManager,Ext.util.Observable,{isUpdating:function(){return this.updating},beginUpdate:function(){this.updating=true},endUpdate:function(B){this.updating=false;if(!B){this.layout()}},layout:function(){},onRegionResized:function(D,C){this.fireEvent("regionresized",D,C);this.layout()},onRegionCollapsed:function(B){this.fireEvent("regioncollapsed",B)},onRegionExpanded:function(B){this.fireEvent("regionexpanded",B)},getViewSize:function(){var B;if(this.el.dom!=document.body){B=this.el.getSize()}else{B={width:Ext.lib.Dom.getViewWidth(),height:Ext.lib.Dom.getViewHeight()}}B.width-=this.el.getBorderWidth("lr")-this.el.getPadding("lr");B.height-=this.el.getBorderWidth("tb")-this.el.getPadding("tb");return B},getEl:function(){return this.el},getRegion:function(B){return this.regions[B.toLowerCase()]},onWindowResize:function(){if(this.monitorWindowResize){this.layout()}}});Ext.BorderLayout=function(J,I){I=I||{};Ext.BorderLayout.superclass.constructor.call(this,J,I);this.factory=I.factory||Ext.BorderLayout.RegionFactory;for(var H=0,F=this.factory.validRegions.length;H<F;H++){var G=this.factory.validRegions[H];if(I[G]){this.addRegion(G,I[G])}}};Ext.extend(Ext.BorderLayout,Ext.LayoutManager,{addRegion:function(E,D){if(!this.regions[E]){var F=this.factory.create(E,this,D);this.bindRegion(E,F)}return this.regions[E]},bindRegion:function(C,D){this.regions[C]=D;D.on("visibilitychange",this.layout,this);D.on("paneladded",this.layout,this);D.on("panelremoved",this.layout,this);D.on("invalidated",this.layout,this);D.on("resized",this.onRegionResized,this);D.on("collapsed",this.onRegionCollapsed,this);D.on("expanded",this.onRegionExpanded,this)},layout:function(){if(this.updating){return }var a=this.getViewSize();var c=a.width,W=a.height;var d=c,X=W,g=0,e=0;var h=this.regions;var Z=h["north"],b=h["south"],k=h["west"],V=h["east"],U=h["center"];if(Z&&Z.isVisible()){var T=Z.getBox();var Y=Z.getMargins();T.width=c-(Y.left+Y.right);T.x=Y.left;T.y=Y.top;g=T.height+T.y+Y.bottom;X-=g;Z.updateBox(this.safeBox(T))}if(b&&b.isVisible()){var T=b.getBox();var Y=b.getMargins();T.width=c-(Y.left+Y.right);T.x=Y.left;var S=(T.height+Y.top+Y.bottom);T.y=W-S+Y.top;X-=S;b.updateBox(this.safeBox(T))}if(k&&k.isVisible()){var T=k.getBox();var Y=k.getMargins();T.height=X-(Y.top+Y.bottom);T.x=Y.left;T.y=g+Y.top;var m=(T.width+Y.left+Y.right);e+=m;d-=m;k.updateBox(this.safeBox(T))}if(V&&V.isVisible()){var T=V.getBox();var Y=V.getMargins();T.height=X-(Y.top+Y.bottom);var m=(T.width+Y.left+Y.right);T.x=c-m+Y.left;T.y=g+Y.top;d-=m;V.updateBox(this.safeBox(T))}if(U){var Y=U.getMargins();var l={x:e+Y.left,y:g+Y.top,width:d-(Y.left+Y.right),height:X-(Y.top+Y.bottom)};U.updateBox(this.safeBox(l))}this.el.repaint();this.fireEvent("layout",this)},safeBox:function(B){B.width=Math.max(0,B.width);B.height=Math.max(0,B.height);return B},add:function(D,C){D=D.toLowerCase();return this.regions[D].add(C)},remove:function(D,C){D=D.toLowerCase();return this.regions[D].remove(C)},findPanel:function(H){var E=this.regions;for(var F in E){if(typeof E[F]!="function"){var G=E[F].getPanel(H);if(G){return G}}}return null},showPanel:function(H){var E=this.regions;for(var F in E){var G=E[F];if(typeof G!="function"){if(G.hasPanel(H)){return G.showPanel(H)}}}return null},restoreState:function(C){if(!C){C=Ext.state.Manager}var D=new Ext.LayoutStateManager();D.init(this,C)},batchAdd:function(E){this.beginUpdate();for(var F in E){var D=this.regions[F];if(D){this.addTypedPanels(D,E[F])}}this.endUpdate()},addTypedPanels:function(J,G){if(typeof G=="string"){J.add(new Ext.ContentPanel(G))}else{if(G instanceof Array){for(var I=0,F=G.length;I<F;I++){this.addTypedPanels(J,G[I])}}else{if(!G.events){var H=G.el;delete G.el;J.add(new Ext.ContentPanel(H||Ext.id(),G))}else{J.add(G)}}}}});Ext.BorderLayout.create=function(K,O){var P=new Ext.BorderLayout(O||document.body,K);P.beginUpdate();var J=Ext.BorderLayout.RegionFactory.validRegions;for(var R=0,N=J.length;R<N;R++){var Q=J[R];if(P.regions[Q]&&K[Q].panels){var L=P.regions[Q];var M=K[Q].panels;P.addTypedPanels(L,M)}}P.endUpdate();return P};Ext.BorderLayout.RegionFactory={validRegions:["north","south","east","west","center"],create:function(E,F,D){E=E.toLowerCase();if(D.lightweight||D.basic){return new Ext.BasicLayoutRegion(F,D,E)}switch(E){case"north":return new Ext.NorthLayoutRegion(F,D);case"south":return new Ext.SouthLayoutRegion(F,D);case"east":return new Ext.EastLayoutRegion(F,D);case"west":return new Ext.WestLayoutRegion(F,D);case"center":return new Ext.CenterLayoutRegion(F,D)}throw'Layout region "'+E+'" not supported.'}};Ext.BasicLayoutRegion=function(G,H,F,E){this.mgr=G;this.position=F;this.events={"beforeremove":true,"invalidated":true,"visibilitychange":true,"paneladded":true,"panelremoved":true,"collapsed":true,"expanded":true,"slideshow":true,"slidehide":true,"panelactivated":true,"resized":true};this.panels=new Ext.util.MixedCollection();this.panels.getKey=this.getPanelId.createDelegate(this);this.box=null;this.activePanel=null;if(E!==true){this.applyConfig(H)}};Ext.extend(Ext.BasicLayoutRegion,Ext.util.Observable,{getPanelId:function(B){return B.getId()},applyConfig:function(B){this.margins=B.margins||this.margins||{top:0,left:0,right:0,bottom:0};this.config=B},resizeTo:function(C){var D=this.el?this.el:(this.activePanel?this.activePanel.getEl():null);if(D){switch(this.position){case"east":case"west":D.setWidth(C);this.fireEvent("resized",this,C);break;case"north":case"south":D.setHeight(C);this.fireEvent("resized",this,C);break}}},getBox:function(){return this.activePanel?this.activePanel.getEl().getBox(false,true):null},getMargins:function(){return this.margins},updateBox:function(D){this.box=D;var C=this.activePanel.getEl();C.dom.style.left=D.x+"px";C.dom.style.top=D.y+"px";this.activePanel.setSize(D.width,D.height)},getEl:function(){return this.activePanel},isVisible:function(){return this.activePanel?true:false},setActivePanel:function(B){B=this.getPanel(B);if(this.activePanel&&this.activePanel!=B){this.activePanel.setActiveState(false);this.activePanel.getEl().setLeftTop(-10000,-10000)}this.activePanel=B;B.setActiveState(true);if(this.box){B.setSize(this.box.width,this.box.height)}this.fireEvent("panelactivated",this,B);this.fireEvent("invalidated")},showPanel:function(B){if(B=this.getPanel(B)){this.setActivePanel(B)}return B},getActivePanel:function(){return this.activePanel},add:function(H){if(arguments.length>1){for(var G=0,E=arguments.length;G<E;G++){this.add(arguments[G])}return null}if(this.hasPanel(H)){this.showPanel(H);return H}var F=H.getEl();if(F.dom.parentNode!=this.mgr.el.dom){this.mgr.el.dom.appendChild(F.dom)}if(H.setRegion){H.setRegion(this)}this.panels.add(H);F.setStyle("position","absolute");if(!H.background){this.setActivePanel(H);if(this.config.initialSize&&this.panels.getCount()==1){this.resizeTo(this.config.initialSize)}}this.fireEvent("paneladded",this,H);return H},hasPanel:function(B){if(typeof B=="object"){B=B.getId()}return this.getPanel(B)?true:false},remove:function(H,E){H=this.getPanel(H);if(!H){return null}var F={};this.fireEvent("beforeremove",this,H,F);if(F.cancel===true){return null}var G=H.getId();this.panels.removeKey(G);return H},getPanel:function(B){if(typeof B=="object"){return B}return this.panels.get(B)},getPosition:function(){return this.position}});Ext.LayoutRegion=function(G,E,F){Ext.LayoutRegion.superclass.constructor.call(this,G,E,F,true);var H=Ext.DomHelper;this.el=H.append(G.el.dom,{tag:"div",cls:"x-layout-panel x-layout-panel-"+this.position},true);this.titleEl=H.append(this.el.dom,{tag:"div",unselectable:"on",cls:"x-unselectable x-layout-panel-hd x-layout-title-"+this.position,children:[{tag:"span",cls:"x-unselectable x-layout-panel-hd-text",unselectable:"on",html:"&#160;"},{tag:"div",cls:"x-unselectable x-layout-panel-hd-tools",unselectable:"on"}]},true);this.titleEl.enableDisplayMode();this.titleTextEl=this.titleEl.dom.firstChild;this.tools=Ext.get(this.titleEl.dom.childNodes[1],true);this.closeBtn=this.createTool(this.tools.dom,"x-layout-close");this.closeBtn.enableDisplayMode();this.closeBtn.on("click",this.closeClicked,this);this.closeBtn.hide();this.createBody(E);this.visible=true;this.collapsed=false;if(E.hideWhenEmpty){this.hide();this.on("paneladded",this.validateVisibility,this);this.on("panelremoved",this.validateVisibility,this)}this.applyConfig(E)};Ext.extend(Ext.LayoutRegion,Ext.BasicLayoutRegion,{createBody:function(){this.bodyEl=this.el.createChild({tag:"div",cls:"x-layout-panel-body"})},applyConfig:function(D){if(D.collapsible&&this.position!="center"&&!this.collapsedEl){var C=Ext.DomHelper;if(D.titlebar!==false){this.collapseBtn=this.createTool(this.tools.dom,"x-layout-collapse-"+this.position);this.collapseBtn.on("click",this.collapse,this);this.collapseBtn.enableDisplayMode();if(D.showPin===true||this.showPin){this.stickBtn=this.createTool(this.tools.dom,"x-layout-stick");this.stickBtn.enableDisplayMode();this.stickBtn.on("click",this.expand,this);this.stickBtn.hide()}}this.collapsedEl=C.append(this.mgr.el.dom,{cls:"x-layout-collapsed x-layout-collapsed-"+this.position,children:[{cls:"x-layout-collapsed-tools",children:[{cls:"x-layout-ctools-inner"}]}]},true);if(D.floatable!==false){this.collapsedEl.addClassOnOver("x-layout-collapsed-over");this.collapsedEl.on("click",this.collapseClick,this)}if(D.collapsedTitle&&(this.position=="north"||this.position=="south")){this.collapsedTitleTextEl=C.append(this.collapsedEl.dom,{tag:"div",cls:"x-unselectable x-layout-panel-hd-text",id:"message",unselectable:"on",style:{"float":"left"}});this.collapsedTitleTextEl.innerHTML=D.collapsedTitle}this.expandBtn=this.createTool(this.collapsedEl.dom.firstChild.firstChild,"x-layout-expand-"+this.position);this.expandBtn.on("click",this.expand,this)}if(this.collapseBtn){this.collapseBtn.setVisible(D.collapsible==true)}this.cmargins=D.cmargins||this.cmargins||(this.position=="west"||this.position=="east"?{top:0,left:2,right:2,bottom:0}:{top:2,left:0,right:0,bottom:2});this.margins=D.margins||this.margins||{top:0,left:0,right:0,bottom:0};this.bottomTabs=D.tabPosition!="top";this.autoScroll=D.autoScroll||false;if(this.autoScroll){this.bodyEl.setStyle("overflow","auto")}else{this.bodyEl.setStyle("overflow","hidden")}if((!D.titlebar&&!D.title)||D.titlebar===false){this.titleEl.hide()}else{this.titleEl.show();if(D.title){this.titleTextEl.innerHTML=D.title}}this.duration=D.duration||0.3;this.slideDuration=D.slideDuration||0.45;this.config=D;if(D.collapsed){this.collapse(true)}if(D.hidden){this.hide()}},isVisible:function(){return this.visible},setCollapsedTitle:function(B){B=B||"&#160;";if(this.collapsedTitleTextEl){this.collapsedTitleTextEl.innerHTML=B}},getBox:function(){var B;if(!this.collapsed){B=this.el.getBox(false,true)}else{B=this.collapsedEl.getBox(false,true)}return B},getMargins:function(){return this.collapsed?this.cmargins:this.margins},highlight:function(){this.el.addClass("x-layout-panel-dragover")},unhighlight:function(){this.el.removeClass("x-layout-panel-dragover")},updateBox:function(B){this.box=B;if(!this.collapsed){this.el.dom.style.left=B.x+"px";this.el.dom.style.top=B.y+"px";this.updateBody(B.width,B.height)}else{this.collapsedEl.dom.style.left=B.x+"px";this.collapsedEl.dom.style.top=B.y+"px";this.collapsedEl.setSize(B.width,B.height)}if(this.tabs){this.tabs.autoSizeTabs()}},updateBody:function(D,E){if(D!==null){this.el.setWidth(D);D-=this.el.getBorderWidth("rl");if(this.config.adjustments){D+=this.config.adjustments[0]}}if(E!==null){this.el.setHeight(E);E=this.titleEl&&this.titleEl.isDisplayed()?E-(this.titleEl.getHeight()||0):E;E-=this.el.getBorderWidth("tb");if(this.config.adjustments){E+=this.config.adjustments[1]}this.bodyEl.setHeight(E);if(this.tabs){E=this.tabs.syncHeight(E)}}if(this.panelSize){D=D!==null?D:this.panelSize.width;E=E!==null?E:this.panelSize.height}if(this.activePanel){var F=this.activePanel.getEl();D=D!==null?D:F.getWidth();E=E!==null?E:F.getHeight();this.panelSize={width:D,height:E};this.activePanel.setSize(D,E)}if(Ext.isIE&&this.tabs){this.tabs.el.repaint()}},getEl:function(){return this.el},hide:function(){if(!this.collapsed){this.el.dom.style.left="-2000px";this.el.hide()}else{this.collapsedEl.dom.style.left="-2000px";this.collapsedEl.hide()}this.visible=false;this.fireEvent("visibilitychange",this,false)},show:function(){if(!this.collapsed){this.el.show()}else{this.collapsedEl.show()}this.visible=true;this.fireEvent("visibilitychange",this,true)},closeClicked:function(){if(this.activePanel){this.remove(this.activePanel)}},collapseClick:function(B){if(this.isSlid){B.stopPropagation();this.slideIn()}else{B.stopPropagation();this.slideOut()}},collapse:function(B){if(this.collapsed){return }this.collapsed=true;if(this.split){this.split.el.hide()}if(this.config.animate&&B!==true){this.fireEvent("invalidated",this);this.animateCollapse()}else{this.el.setLocation(-20000,-20000);this.el.hide();this.collapsedEl.show();this.fireEvent("collapsed",this);this.fireEvent("invalidated",this)}},animateCollapse:function(){},expand:function(D,C){if(D){D.stopPropagation()}if(!this.collapsed||this.el.hasActiveFx()){return }if(this.isSlid){this.afterSlideIn();C=true}this.collapsed=false;if(this.config.animate&&C!==true){this.animateExpand()}else{this.el.show();if(this.split){this.split.el.show()}this.collapsedEl.setLocation(-2000,-2000);this.collapsedEl.hide();this.fireEvent("invalidated",this);this.fireEvent("expanded",this)}},animateExpand:function(){},initTabs:function(){this.bodyEl.setStyle("overflow","hidden");var B=new Ext.TabPanel(this.bodyEl.dom,{tabPosition:this.bottomTabs?"bottom":"top",disableTooltips:this.config.disableTabTips});if(this.config.hideTabs){B.stripWrap.setDisplayed(false)}this.tabs=B;B.resizeTabs=this.config.resizeTabs===true;B.minTabWidth=this.config.minTabWidth||40;B.maxTabWidth=this.config.maxTabWidth||250;B.preferredTabWidth=this.config.preferredTabWidth||150;B.monitorResize=false;B.bodyEl.setStyle("overflow",this.config.autoScroll?"auto":"hidden");B.bodyEl.addClass("x-layout-tabs-body");this.panels.each(this.initPanelAsTab,this)},initPanelAsTab:function(C){var D=this.tabs.addTab(C.getEl().id,C.getTitle(),null,this.config.closeOnTab&&C.isClosable());if(C.tabTip!==undefined){D.setTooltip(C.tabTip)}D.on("activate",function(){this.setActivePanel(C)},this);if(this.config.closeOnTab){D.on("beforeclose",function(B,A){A.cancel=true;this.remove(C)},this)}return D},updatePanelTitle:function(D,E){if(this.activePanel==D){this.updateTitle(E)}if(this.tabs){var F=this.tabs.getTab(D.getEl().id);F.setText(E);if(D.tabTip!==undefined){F.setTooltip(D.tabTip)}}},updateTitle:function(B){if(this.titleTextEl&&!this.config.title){this.titleTextEl.innerHTML=(typeof B!="undefined"&&B.length>0?B:"&#160;")}},setActivePanel:function(B){B=this.getPanel(B);if(this.activePanel&&this.activePanel!=B){this.activePanel.setActiveState(false)}this.activePanel=B;B.setActiveState(true);if(this.panelSize){B.setSize(this.panelSize.width,this.panelSize.height)}if(this.closeBtn){this.closeBtn.setVisible(!this.config.closeOnTab&&!this.isSlid&&B.isClosable())}this.updateTitle(B.getTitle());if(this.tabs){this.fireEvent("invalidated",this)}this.fireEvent("panelactivated",this,B)},showPanel:function(C){if(C=this.getPanel(C)){if(this.tabs){var D=this.tabs.getTab(C.getEl().id);if(D.isHidden()){this.tabs.unhideTab(D.id)}D.activate()}else{this.setActivePanel(C)}}return C},getActivePanel:function(){return this.activePanel},validateVisibility:function(){if(this.panels.getCount()<1){this.updateTitle("&#160;");this.closeBtn.hide();this.hide()}else{if(!this.isVisible()){this.show()}}},add:function(F){if(arguments.length>1){for(var E=0,D=arguments.length;E<D;E++){this.add(arguments[E])}return null}if(this.hasPanel(F)){this.showPanel(F);return F}F.setRegion(this);this.panels.add(F);if(this.panels.getCount()==1&&!this.config.alwaysShowTabs){this.bodyEl.dom.appendChild(F.getEl().dom);if(F.background!==true){this.setActivePanel(F)}this.fireEvent("paneladded",this,F);return F}if(!this.tabs){this.initTabs()}else{this.initPanelAsTab(F)}if(F.background!==true){this.tabs.activate(F.getEl().id)}this.fireEvent("paneladded",this,F);return F},hidePanel:function(B){if(this.tabs&&(B=this.getPanel(B))){this.tabs.hideTab(B.getEl().id)}},unhidePanel:function(B){if(this.tabs&&(B=this.getPanel(B))){this.tabs.unhideTab(B.getEl().id)}},clearPanels:function(){while(this.panels.getCount()>0){this.remove(this.panels.first())}},remove:function(L,G){L=this.getPanel(L);if(!L){return null}var I={};this.fireEvent("beforeremove",this,L,I);if(I.cancel===true){return null}G=(typeof G!="undefined"?G:(this.config.preservePanels===true||L.preserve===true));var K=L.getId();this.panels.removeKey(K);if(G){document.body.appendChild(L.getEl().dom)}if(this.tabs){this.tabs.removeTab(L.getEl().id)}else{if(!G){this.bodyEl.dom.removeChild(L.getEl().dom)}}if(this.panels.getCount()==1&&this.tabs&&!this.config.alwaysShowTabs){var J=this.panels.first();var H=document.createElement("div");H.appendChild(J.getEl().dom);this.bodyEl.update("");this.bodyEl.dom.appendChild(J.getEl().dom);H=null;this.updateTitle(J.getTitle());this.tabs=null;this.bodyEl.setStyle("overflow",this.config.autoScroll?"auto":"hidden");this.setActivePanel(J)}L.setRegion(null);if(this.activePanel==L){this.activePanel=null}if(this.config.autoDestroy!==false&&G!==true){try{L.destroy()}catch(I){}}this.fireEvent("panelremoved",this,L);return L},getTabs:function(){return this.tabs},createTool:function(E,F){var D=Ext.DomHelper.append(E,{tag:"div",cls:"x-layout-tools-button",children:[{tag:"div",cls:"x-layout-tools-button-inner "+F,html:"&#160;"}]},true);D.addClassOnOver("x-layout-tools-button-over");return D}});Ext.SplitLayoutRegion=function(H,E,F,G){this.cursor=G;Ext.SplitLayoutRegion.superclass.constructor.call(this,H,E,F)};Ext.extend(Ext.SplitLayoutRegion,Ext.LayoutRegion,{splitTip:"Drag to resize.",collapsibleSplitTip:"Drag to resize. Double click to hide.",useSplitTips:false,applyConfig:function(C){Ext.SplitLayoutRegion.superclass.applyConfig.call(this,C);if(C.split){if(!this.split){var D=Ext.DomHelper.append(this.mgr.el.dom,{tag:"div",id:this.el.id+"-split",cls:"x-layout-split x-layout-split-"+this.position,html:"&#160;"});this.split=new Ext.SplitBar(D,this.el,this.orientation);this.split.on("moved",this.onSplitMove,this);this.split.useShim=C.useShim===true;this.split.getMaximumSize=this[this.position=="north"||this.position=="south"?"getVMaxSize":"getHMaxSize"].createDelegate(this);if(this.useSplitTips){this.split.el.dom.title=C.collapsible?this.collapsibleSplitTip:this.splitTip}if(C.collapsible){this.split.el.on("dblclick",this.collapse,this)}}if(typeof C.minSize!="undefined"){this.split.minSize=C.minSize}if(typeof C.maxSize!="undefined"){this.split.maxSize=C.maxSize}if(C.hideWhenEmpty||C.hidden||C.collapsed){this.hideSplitter()}}},getHMaxSize:function(){var D=this.config.maxSize||10000;var C=this.mgr.getRegion("center");return Math.min(D,(this.el.getWidth()+C.getEl().getWidth())-C.getMinWidth())},getVMaxSize:function(){var D=this.config.maxSize||10000;var C=this.mgr.getRegion("center");return Math.min(D,(this.el.getHeight()+C.getEl().getHeight())-C.getMinHeight())},onSplitMove:function(D,C){this.fireEvent("resized",this,C)},getSplitBar:function(){return this.split},hide:function(){this.hideSplitter();Ext.SplitLayoutRegion.superclass.hide.call(this)},hideSplitter:function(){if(this.split){this.split.el.setLocation(-2000,-2000);this.split.el.hide()}},show:function(){if(this.split){this.split.el.show()}Ext.SplitLayoutRegion.superclass.show.call(this)},beforeSlide:function(){if(Ext.isGecko){this.bodyEl.clip();if(this.tabs){this.tabs.bodyEl.clip()}if(this.activePanel){this.activePanel.getEl().clip();if(this.activePanel.beforeSlide){this.activePanel.beforeSlide()}}}},afterSlide:function(){if(Ext.isGecko){this.bodyEl.unclip();if(this.tabs){this.tabs.bodyEl.unclip()}if(this.activePanel){this.activePanel.getEl().unclip();if(this.activePanel.afterSlide){this.activePanel.afterSlide()}}}},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.get(document).un("click",this.slideInIf,this)},slideOut:function(){if(this.isSlid||this.el.hasActiveFx()){return }this.isSlid=true;if(this.collapseBtn){this.collapseBtn.hide()}this.closeBtnState=this.closeBtn.getStyle("display");this.closeBtn.hide();if(this.stickBtn){this.stickBtn.show()}this.el.show();this.el.alignTo(this.collapsedEl,this.getCollapseAnchor());this.beforeSlide();this.el.setStyle("z-index",10001);this.el.slideIn(this.getSlideAnchor(),{callback:function(){this.afterSlide();this.initAutoHide();Ext.get(document).on("click",this.slideInIf,this);this.fireEvent("slideshow",this)},scope:this,block:true})},afterSlideIn:function(){this.clearAutoHide();this.isSlid=false;this.clearMonitor();this.el.setStyle("z-index","");if(this.collapseBtn){this.collapseBtn.show()}this.closeBtn.setStyle("display",this.closeBtnState);if(this.stickBtn){this.stickBtn.hide()}this.fireEvent("slidehide",this)},slideIn:function(B){if(!this.isSlid||this.el.hasActiveFx()){Ext.callback(B);return }this.isSlid=false;this.beforeSlide();this.el.slideOut(this.getSlideAnchor(),{callback:function(){this.el.setLeftTop(-10000,-10000);this.afterSlide();this.afterSlideIn();Ext.callback(B)},scope:this,block:true})},slideInIf:function(B){if(!B.within(this.el)){this.slideIn()}},animateCollapse:function(){this.beforeSlide();this.el.setStyle("z-index",20000);var B=this.getSlideAnchor();this.el.slideOut(B,{callback:function(){this.el.setStyle("z-index","");this.collapsedEl.slideIn(B,{duration:0.3});this.afterSlide();this.el.setLocation(-10000,-10000);this.el.hide();this.fireEvent("collapsed",this)},scope:this,block:true})},animateExpand:function(){this.beforeSlide();this.el.alignTo(this.collapsedEl,this.getCollapseAnchor(),this.getExpandAdj());this.el.setStyle("z-index",20000);this.collapsedEl.hide({duration:0.1});this.el.slideIn(this.getSlideAnchor(),{callback:function(){this.el.setStyle("z-index","");this.afterSlide();if(this.split){this.split.el.show()}this.fireEvent("invalidated",this);this.fireEvent("expanded",this)},scope:this,block:true})},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.CenterLayoutRegion=function(D,C){Ext.CenterLayoutRegion.superclass.constructor.call(this,D,C,"center");this.visible=true;this.minWidth=C.minWidth||20;this.minHeight=C.minHeight||20};Ext.extend(Ext.CenterLayoutRegion,Ext.LayoutRegion,{hide:function(){},show:function(){},getMinWidth:function(){return this.minWidth},getMinHeight:function(){return this.minHeight}});Ext.NorthLayoutRegion=function(E,D){Ext.NorthLayoutRegion.superclass.constructor.call(this,E,D,"north","n-resize");if(this.split){this.split.placement=Ext.SplitBar.TOP;this.split.orientation=Ext.SplitBar.VERTICAL;this.split.el.addClass("x-layout-split-v")}var F=D.initialSize||D.height;if(typeof F!="undefined"){this.el.setHeight(F)}};Ext.extend(Ext.NorthLayoutRegion,Ext.SplitLayoutRegion,{orientation:Ext.SplitBar.VERTICAL,getBox:function(){if(this.collapsed){return this.collapsedEl.getBox()}var B=this.el.getBox();if(this.split){B.height+=this.split.el.getHeight()}return B},updateBox:function(B){if(this.split&&!this.collapsed){B.height-=this.split.el.getHeight();this.split.el.setLeft(B.x);this.split.el.setTop(B.y+B.height);this.split.el.setWidth(B.width)}if(this.collapsed){this.updateBody(B.width,null)}Ext.NorthLayoutRegion.superclass.updateBox.call(this,B)}});Ext.SouthLayoutRegion=function(E,D){Ext.SouthLayoutRegion.superclass.constructor.call(this,E,D,"south","s-resize");if(this.split){this.split.placement=Ext.SplitBar.BOTTOM;this.split.orientation=Ext.SplitBar.VERTICAL;this.split.el.addClass("x-layout-split-v")}var F=D.initialSize||D.height;if(typeof F!="undefined"){this.el.setHeight(F)}};Ext.extend(Ext.SouthLayoutRegion,Ext.SplitLayoutRegion,{orientation:Ext.SplitBar.VERTICAL,getBox:function(){if(this.collapsed){return this.collapsedEl.getBox()}var D=this.el.getBox();if(this.split){var C=this.split.el.getHeight();D.height+=C;D.y-=C}return D},updateBox:function(D){if(this.split&&!this.collapsed){var C=this.split.el.getHeight();D.height-=C;D.y+=C;this.split.el.setLeft(D.x);this.split.el.setTop(D.y-C);this.split.el.setWidth(D.width)}if(this.collapsed){this.updateBody(D.width,null)}Ext.SouthLayoutRegion.superclass.updateBox.call(this,D)}});Ext.EastLayoutRegion=function(E,D){Ext.EastLayoutRegion.superclass.constructor.call(this,E,D,"east","e-resize");if(this.split){this.split.placement=Ext.SplitBar.RIGHT;this.split.orientation=Ext.SplitBar.HORIZONTAL;this.split.el.addClass("x-layout-split-h")}var F=D.initialSize||D.width;if(typeof F!="undefined"){this.el.setWidth(F)}};Ext.extend(Ext.EastLayoutRegion,Ext.SplitLayoutRegion,{orientation:Ext.SplitBar.HORIZONTAL,getBox:function(){if(this.collapsed){return this.collapsedEl.getBox()}var D=this.el.getBox();if(this.split){var C=this.split.el.getWidth();D.width+=C;D.x-=C}return D},updateBox:function(D){if(this.split&&!this.collapsed){var C=this.split.el.getWidth();D.width-=C;this.split.el.setLeft(D.x);this.split.el.setTop(D.y);this.split.el.setHeight(D.height);D.x+=C}if(this.collapsed){this.updateBody(null,D.height)}Ext.EastLayoutRegion.superclass.updateBox.call(this,D)}});Ext.WestLayoutRegion=function(E,D){Ext.WestLayoutRegion.superclass.constructor.call(this,E,D,"west","w-resize");if(this.split){this.split.placement=Ext.SplitBar.LEFT;this.split.orientation=Ext.SplitBar.HORIZONTAL;this.split.el.addClass("x-layout-split-h")}var F=D.initialSize||D.width;if(typeof F!="undefined"){this.el.setWidth(F)}};Ext.extend(Ext.WestLayoutRegion,Ext.SplitLayoutRegion,{orientation:Ext.SplitBar.HORIZONTAL,getBox:function(){if(this.collapsed){return this.collapsedEl.getBox()}var B=this.el.getBox();if(this.split){B.width+=this.split.el.getWidth()}return B},updateBox:function(D){if(this.split&&!this.collapsed){var C=this.split.el.getWidth();D.width-=C;this.split.el.setLeft(D.x+D.width);this.split.el.setTop(D.y);this.split.el.setHeight(D.height)}if(this.collapsed){this.updateBody(null,D.height)}Ext.WestLayoutRegion.superclass.updateBox.call(this,D)}});Ext.LayoutStateManager=function(B){this.state={north:{},south:{},east:{},west:{}}};Ext.LayoutStateManager.prototype={init:function(L,I){this.provider=I;var J=I.get(L.id+"-layout-state");if(J){var K=L.isUpdating();if(!K){L.beginUpdate()}for(var H in J){if(typeof J[H]!="function"){var N=J[H];var M=L.getRegion(H);if(M&&N){if(N.size){M.resizeTo(N.size)}if(N.collapsed==true){M.collapse(true)}else{M.expand(null,true)}}}}if(!K){L.endUpdate()}this.state=J}this.layout=L;L.on("regionresized",this.onRegionResized,this);L.on("regioncollapsed",this.onRegionCollapsed,this);L.on("regionexpanded",this.onRegionExpanded,this)},storeState:function(){this.provider.set(this.layout.id+"-layout-state",this.state)},onRegionResized:function(D,C){this.state[D.getPosition()].size=C;this.storeState()},onRegionCollapsed:function(B){this.state[B.getPosition()].collapsed=true;this.storeState()},onRegionExpanded:function(B){this.state[B.getPosition()].collapsed=false;this.storeState()}};Ext.ContentPanel=function(F,D,E){if(F.autoCreate){D=F;F=Ext.id()}this.el=Ext.get(F);if(!this.el&&D&&D.autoCreate){if(typeof D.autoCreate=="object"){if(!D.autoCreate.id){D.autoCreate.id=D.id||F}this.el=Ext.DomHelper.append(document.body,D.autoCreate,true)}else{this.el=Ext.DomHelper.append(document.body,{tag:"div",cls:"x-layout-inactive-content",id:D.id||F},true)}}this.closable=false;this.loaded=false;this.active=false;if(typeof D=="string"){this.title=D}else{Ext.apply(this,D)}if(this.resizeEl){this.resizeEl=Ext.get(this.resizeEl,true)}else{this.resizeEl=this.el}this.addEvents({"activate":true,"deactivate":true,"resize":true});if(this.autoScroll){this.resizeEl.setStyle("overflow","auto")}E=E||this.content;if(E){this.setContent(E)}if(D&&D.url){this.setUrl(this.url,this.params,this.loadOnce)}Ext.ContentPanel.superclass.constructor.call(this)};Ext.extend(Ext.ContentPanel,Ext.util.Observable,{tabTip:"",setRegion:function(B){this.region=B;if(B){this.el.replaceClass("x-layout-inactive-content","x-layout-active-content")}else{this.el.replaceClass("x-layout-active-content","x-layout-inactive-content")}},getToolbar:function(){return this.toolbar},setActiveState:function(B){this.active=B;if(!B){this.fireEvent("deactivate",this)}else{this.fireEvent("activate",this)}},setContent:function(D,C){this.el.update(D,C)},ignoreResize:function(C,D){if(this.lastSize&&this.lastSize.width==C&&this.lastSize.height==D){return true}else{this.lastSize={width:C,height:D};return false}},getUpdateManager:function(){return this.el.getUpdateManager()},load:function(){var B=this.el.getUpdateManager();B.update.apply(B,arguments);return this},setUrl:function(D,E,F){if(this.refreshDelegate){this.removeListener("activate",this.refreshDelegate)}this.refreshDelegate=this._handleRefresh.createDelegate(this,[D,E,F]);this.on("activate",this.refreshDelegate);return this.el.getUpdateManager()},_handleRefresh:function(E,F,G){if(!G||!this.loaded){var H=this.el.getUpdateManager();H.update(E,F,this._setLoaded.createDelegate(this))}},_setLoaded:function(){this.loaded=true},getId:function(){return this.el.id},getEl:function(){return this.el},adjustForComponents:function(F,D){if(this.resizeEl!=this.el){F-=this.el.getFrameWidth("lr");D-=this.el.getFrameWidth("tb")}if(this.toolbar){var E=this.toolbar.getEl();D-=E.getHeight();E.setWidth(F)}if(this.adjustments){F+=this.adjustments[0];D+=this.adjustments[1]}return{"width":F,"height":D}},setSize:function(E,D){if(this.fitToFrame&&!this.ignoreResize(E,D)){if(this.fitContainer&&this.resizeEl!=this.el){this.el.setSize(E,D)}var F=this.adjustForComponents(E,D);this.resizeEl.setSize(this.autoWidth?"auto":F.width,this.autoHeight?"auto":F.height);this.fireEvent("resize",this,F.width,F.height)}},getTitle:function(){return this.title},setTitle:function(B){this.title=B;if(this.region){this.region.updatePanelTitle(this,B)}},isClosable:function(){return this.closable},beforeSlide:function(){this.el.clip();this.resizeEl.clip()},afterSlide:function(){this.el.unclip();this.resizeEl.unclip()},refresh:function(){if(this.refreshDelegate){this.loaded=false;this.refreshDelegate()}},destroy:function(){this.el.removeAllListeners();var B=document.createElement("span");B.appendChild(this.el.dom);B.innerHTML="";this.el.remove();this.el=null}});Ext.GridPanel=function(D,C){this.wrapper=Ext.DomHelper.append(document.body,{tag:"div",cls:"x-layout-grid-wrapper x-layout-inactive-content"},true);this.wrapper.dom.appendChild(D.getGridEl().dom);Ext.GridPanel.superclass.constructor.call(this,this.wrapper,C);if(this.toolbar){this.toolbar.el.insertBefore(this.wrapper.dom.firstChild)}D.monitorWindowResize=false;D.autoHeight=false;D.autoWidth=false;this.grid=D;this.grid.getGridEl().replaceClass("x-layout-inactive-content","x-layout-component-panel")};Ext.extend(Ext.GridPanel,Ext.ContentPanel,{getId:function(){return this.grid.id},getGrid:function(){return this.grid},setSize:function(F,E){if(!this.ignoreResize(F,E)){var G=this.grid;var H=this.adjustForComponents(F,E);G.getGridEl().setSize(H.width,H.height);G.autoSize()}},beforeSlide:function(){this.grid.getView().scroller.clip()},afterSlide:function(){this.grid.getView().scroller.unclip()},destroy:function(){this.grid.destroy();delete this.grid;Ext.GridPanel.superclass.destroy.call(this)}});Ext.NestedLayoutPanel=function(D,C){Ext.NestedLayoutPanel.superclass.constructor.call(this,D.getEl(),C);D.monitorWindowResize=false;this.layout=D;this.layout.getEl().addClass("x-layout-nested-layout")};Ext.extend(Ext.NestedLayoutPanel,Ext.ContentPanel,{setSize:function(H,F){if(!this.ignoreResize(H,F)){var J=this.adjustForComponents(H,F);var I=this.layout.getEl();I.setSize(J.width,J.height);var G=I.dom.offsetWidth;this.layout.layout();if(Ext.isIE&&!this.initialized){this.initialized=true;this.layout.layout()}}},getLayout:function(){return this.layout}});Ext.ScrollPanel=function(J,L,I){L=L||{};L.fitToFrame=true;Ext.ScrollPanel.superclass.constructor.call(this,J,L,I);this.el.dom.style.overflow="hidden";var K=this.el.wrap({cls:"x-scroller x-layout-inactive-content"});this.el.removeClass("x-layout-inactive-content");this.el.on("mousewheel",this.onWheel,this);var G=K.createChild({cls:"x-scroller-up",html:"&#160;"},this.el.dom);var H=K.createChild({cls:"x-scroller-down",html:"&#160;"});G.unselectable();H.unselectable();G.on("click",this.scrollUp,this);H.on("click",this.scrollDown,this);G.addClassOnOver("x-scroller-btn-over");H.addClassOnOver("x-scroller-btn-over");G.addClassOnClick("x-scroller-btn-click");H.addClassOnClick("x-scroller-btn-click");this.adjustments=[0,-(G.getHeight()+H.getHeight())];this.resizeEl=this.el;this.el=K;this.up=G;this.down=H};Ext.extend(Ext.ScrollPanel,Ext.ContentPanel,{increment:100,wheelIncrement:5,scrollUp:function(){this.resizeEl.scroll("up",this.increment,{callback:this.afterScroll,scope:this})},scrollDown:function(){this.resizeEl.scroll("down",this.increment,{callback:this.afterScroll,scope:this})},afterScroll:function(){var F=this.resizeEl;var E=F.dom.scrollTop,G=F.dom.scrollHeight,H=F.dom.clientHeight;this.up[E==0?"addClass":"removeClass"]("x-scroller-btn-disabled");this.down[G-E<=H?"addClass":"removeClass"]("x-scroller-btn-disabled")},setSize:function(){Ext.ScrollPanel.superclass.setSize.apply(this,arguments);this.afterScroll()},onWheel:function(C){var D=C.getWheelDelta();this.resizeEl.dom.scrollTop-=(D*this.wheelIncrement);this.afterScroll();C.stopEvent()},setContent:function(D,C){this.resizeEl.update(D,C)}});Ext.ReaderLayout=function(H,G){var F=H||{size:{}};Ext.ReaderLayout.superclass.constructor.call(this,G||document.body,{north:F.north!==false?Ext.apply({split:false,initialSize:32,titlebar:false},F.north):false,west:F.west!==false?Ext.apply({split:true,initialSize:200,minSize:175,maxSize:400,titlebar:true,collapsible:true,animate:true,margins:{left:5,right:0,bottom:5,top:5},cmargins:{left:5,right:5,bottom:5,top:5}},F.west):false,east:F.east!==false?Ext.apply({split:true,initialSize:200,minSize:175,maxSize:400,titlebar:true,collapsible:true,animate:true,margins:{left:0,right:5,bottom:5,top:5},cmargins:{left:5,right:5,bottom:5,top:5}},F.east):false,center:Ext.apply({tabPosition:"top",autoScroll:false,closeOnTab:true,titlebar:false,margins:{left:F.west!==false?0:5,right:F.east!==false?0:5,bottom:5,top:2}},F.center)});this.el.addClass("x-reader");this.beginUpdate();var E=new Ext.BorderLayout(Ext.get(document.body).createChild(),{south:F.preview!==false?Ext.apply({split:true,initialSize:200,minSize:100,autoScroll:true,collapsible:true,titlebar:true,cmargins:{top:5,left:0,right:0,bottom:0}},F.preview):false,center:Ext.apply({autoScroll:false,titlebar:false,minHeight:200},F.listView)});this.add("center",new Ext.NestedLayoutPanel(E,Ext.apply({title:F.mainTitle||"",tabTip:""},F.innerPanelCfg)));this.endUpdate();this.regions.preview=E.getRegion("south");this.regions.listView=E.getRegion("center")};Ext.extend(Ext.ReaderLayout,Ext.BorderLayout)
