Ext.DomHelper=function(){var L=null;
var K=/^(?:br|frame|hr|img|input|link|meta|range|spacer|wbr|area|param|col)$/i;
var J=function(S){if(typeof S=="string"){return S
}var M="";
if(!S.tag){S.tag="div"
}M+="<"+S.tag;
for(var P in S){if(P=="tag"||P=="children"||P=="cn"||P=="html"||typeof S[P]=="function"){continue
}if(P=="style"){var R=S.style;
if(typeof R=="function"){R=R.call()
}if(typeof R=="string"){M+=' style="'+R+'"'
}else{if(typeof R=="object"){M+=' style="';
for(var N in R){if(typeof R[N]!="function"){M+=N+":"+R[N]+";"
}}M+='"'
}}}else{if(P=="cls"){M+=' class="'+S.cls+'"'
}else{if(P=="htmlFor"){M+=' for="'+S.htmlFor+'"'
}else{M+=" "+P+'="'+S[P]+'"'
}}}}if(K.test(S.tag)){M+="/>"
}else{M+=">";
var T=S.children||S.cn;
if(T){if(T instanceof Array){for(var Q=0,O=T.length;
Q<O;
Q++){M+=J(T[Q],M)
}}else{M+=J(T,M)
}}if(S.html){M+=S.html
}M+="</"+S.tag+">"
}return M
};
var H=function(R,N){var P=document.createElement(R.tag);
var T=P.setAttribute?true:false;
for(var Q in R){if(Q=="tag"||Q=="children"||Q=="cn"||Q=="html"||Q=="style"||typeof R[Q]=="function"){continue
}if(Q=="cls"){P.className=R.cls
}else{if(T){P.setAttribute(Q,R[Q])
}else{P[Q]=R[Q]
}}}Ext.DomHelper.applyStyles(P,R.style);
var S=R.children||R.cn;
if(S){if(S instanceof Array){for(var O=0,M=S.length;
O<M;
O++){H(S[O],P)
}}else{H(S,P)
}}if(R.html){P.innerHTML=R.html
}if(N){N.appendChild(P)
}return P
};
var E=function(N,Q,P,R){L.innerHTML=[Q,P,R].join("");
var M=-1,O=L;
while(++M<N){O=O.firstChild
}return O
};
var G="<table>",D="</table>",B=G+"<tbody>",I="</tbody>"+D,F=B+"<tr>",C="</tr>"+I;
var A=function(M,R,P,Q){if(!L){L=document.createElement("div")
}var O;
var N=null;
if(M=="td"){if(R=="afterbegin"||R=="beforeend"){return 
}if(R=="beforebegin"){N=P;
P=P.parentNode
}else{N=P.nextSibling;
P=P.parentNode
}O=E(4,F,Q,C)
}else{if(M=="tr"){if(R=="beforebegin"){N=P;
P=P.parentNode;
O=E(3,B,Q,I)
}else{if(R=="afterend"){N=P.nextSibling;
P=P.parentNode;
O=E(3,B,Q,I)
}else{if(R=="afterbegin"){N=P.firstChild
}O=E(4,F,Q,C)
}}}else{if(M=="tbody"){if(R=="beforebegin"){N=P;
P=P.parentNode;
O=E(2,G,Q,D)
}else{if(R=="afterend"){N=P.nextSibling;
P=P.parentNode;
O=E(2,G,Q,D)
}else{if(R=="afterbegin"){N=P.firstChild
}O=E(3,B,Q,I)
}}}else{if(R=="beforebegin"||R=="afterend"){return 
}if(R=="afterbegin"){N=P.firstChild
}O=E(2,G,Q,D)
}}}P.insertBefore(O,N);
return O
};
return{useDom:false,markup:function(M){return J(M)
},applyStyles:function(P,Q){if(Q){P=Ext.fly(P);
if(typeof Q=="string"){var O=/\s?([a-z\-]*)\:\s?([^;]*);?/gi;
var N;
while((N=O.exec(Q))!=null){P.setStyle(N[1],N[2])
}}else{if(typeof Q=="object"){for(var M in Q){P.setStyle(M,Q[M])
}}else{if(typeof Q=="function"){Ext.DomHelper.applyStyles(P,Q.call())
}}}}},insertHtml:function(P,Q,O){P=P.toLowerCase();
if(Q.insertAdjacentHTML){var M=Q.tagName.toLowerCase();
if(M=="table"||M=="tbody"||M=="tr"||M=="td"){var N;
if(N=A(M,P,Q,O)){return N
}}switch(P){case"beforebegin":Q.insertAdjacentHTML(P,O);
return Q.previousSibling;
case"afterbegin":Q.insertAdjacentHTML(P,O);
return Q.firstChild;
case"beforeend":Q.insertAdjacentHTML(P,O);
return Q.lastChild;
case"afterend":Q.insertAdjacentHTML(P,O);
return Q.nextSibling
}throw'Illegal insertion point -> "'+P+'"'
}var S=Q.ownerDocument.createRange();
var R;
switch(P){case"beforebegin":S.setStartBefore(Q);
R=S.createContextualFragment(O);
Q.parentNode.insertBefore(R,Q);
return Q.previousSibling;
case"afterbegin":if(Q.firstChild){S.setStartBefore(Q.firstChild);
R=S.createContextualFragment(O);
Q.insertBefore(R,Q.firstChild);
return Q.firstChild
}else{Q.innerHTML=O;
return Q.firstChild
}case"beforeend":if(Q.lastChild){S.setStartAfter(Q.lastChild);
R=S.createContextualFragment(O);
Q.appendChild(R);
return Q.lastChild
}else{Q.innerHTML=O;
return Q.lastChild
}case"afterend":S.setStartAfter(Q);
R=S.createContextualFragment(O);
Q.parentNode.insertBefore(R,Q.nextSibling);
return Q.nextSibling
}throw'Illegal insertion point -> "'+P+'"'
},insertBefore:function(M,O,N){return this.doInsert(M,O,N,"beforeBegin")
},insertAfter:function(M,O,N){return this.doInsert(M,O,N,"afterEnd","nextSibling")
},insertFirst:function(N,O,M){return this.doInsert(N,O,M,"afterBegin")
},doInsert:function(Q,R,P,S,O){Q=Ext.getDom(Q);
var N;
if(this.useDom){N=H(R,null);
Q.parentNode.insertBefore(N,O?Q[O]:Q)
}else{var M=J(R);
N=this.insertHtml(S,Q,M)
}return P?Ext.get(N,true):N
},append:function(N,Q,P){N=Ext.getDom(N);
var O;
if(this.useDom){O=H(Q,null);
N.appendChild(O)
}else{var M=J(Q);
O=this.insertHtml("beforeEnd",N,M)
}return P?Ext.get(O,true):O
},overwrite:function(M,O,N){M=Ext.getDom(M);
M.innerHTML=J(O);
return N?Ext.get(M.firstChild,true):M.firstChild
},createTemplate:function(N){var M=J(N);
return new Ext.Template(M)
}}
}();
Ext.Template=function(A){if(A instanceof Array){A=A.join("")
}else{if(arguments.length>1){A=Array.prototype.join.call(arguments,"")
}}this.html=A
};
Ext.Template.prototype={applyTemplate:function(E){if(this.compiled){return this.compiled(E)
}var D=this.disableFormats!==true;
var C=Ext.util.Format,A=this;
var B=function(G,I,F,K){if(F&&D){if(F.substr(0,5)=="this."){return A.call(F.substr(5),E[I])
}else{if(K){var L=/^\s*['"](.*)["']\s*$/;
K=K.split(",");
for(var J=0,H=K.length;
J<H;
J++){K[J]=K[J].replace(L,"$1")
}K=[E[I]].concat(K)
}else{K=[E[I]]
}return C[F].apply(C,K)
}}else{return E[I]!==undefined?E[I]:""
}};
return this.html.replace(this.re,B)
},set:function(A,B){this.html=A;
this.compiled=null;
if(B){this.compile()
}return this
},disableFormats:false,re:/\{([\w-]+)(?:\:([\w\.]*)(?:\((.*?)?\))?)?\}/g,compile:function(){var fm=Ext.util.Format;
var _11=this.disableFormats!==true;
var sep=Ext.isGecko?"+":",";
var fn=function(m,_15,_16,_17){if(_16&&_11){_17=_17?","+_17:"";
if(_16.substr(0,5)!="this."){_16="fm."+_16+"("
}else{_16='this.call("'+_16.substr(5)+'", ';
_17=""
}}else{_17="",_16="(values['"+_15+"'] == undefined ? '' : "
}return"'"+sep+_16+"values['"+_15+"']"+_17+")"+sep+"'"
};
var _18;
if(Ext.isGecko){_18="this.compiled = function(values){ return '"+this.html.replace(/(\r\n|\n)/g,"\\n").replace("'","\\'").replace(this.re,fn)+"';};"
}else{_18=["this.compiled = function(values){ return ['"];
_18.push(this.html.replace(/(\r\n|\n)/g,"\\n").replace("'","\\'").replace(this.re,fn));
_18.push("'].join('');};");
_18=_18.join("")
}eval(_18);
return this
},call:function(A,B){return this[A](B)
},insertFirst:function(C,B,A){return this.doInsert("afterBegin",C,B,A)
},insertBefore:function(C,A,B){return this.doInsert("beforeBegin",C,A,B)
},insertAfter:function(A,C,B){return this.doInsert("afterEnd",A,C,B)
},append:function(A,C,B){return this.doInsert("beforeEnd",A,C,B)
},doInsert:function(C,B,A,E){B=Ext.getDom(B);
var D=Ext.DomHelper.insertHtml(C,B,this.applyTemplate(A));
return E?Ext.get(D,true):D
},overwrite:function(C,B,A){C=Ext.getDom(C);
C.innerHTML=this.applyTemplate(B);
return A?Ext.get(C.firstChild,true):C.firstChild
}};
Ext.Template.prototype.apply=Ext.Template.prototype.applyTemplate;
Ext.DomHelper.Template=Ext.Template;
Ext.Template.from=function(A){A=Ext.getDom(A);
return new Ext.Template(A.value||A.innerHTML)
};
Ext.MasterTemplate=function(){Ext.MasterTemplate.superclass.constructor.apply(this,arguments);
this.originalHtml=this.html;
var C={};
var B,D=this.subTemplateRe;
D.lastIndex=0;
var A=0;
while(B=D.exec(this.html)){var F=B[1],E=B[2];
C[A]={name:F,index:A,buffer:[],tpl:new Ext.Template(E)};
if(F){C[F]=C[A]
}C[A].tpl.compile();
C[A].tpl.call=this.call.createDelegate(this);
A++
}this.subCount=A;
this.subs=C
};
Ext.extend(Ext.MasterTemplate,Ext.Template,{subTemplateRe:/<tpl(?:\sname="([\w-]+)")?>((?:.|\n)*?)<\/tpl>/gi,add:function(C,B){if(arguments.length==1){B=arguments[0];
C=0
}var A=this.subs[C];
A.buffer[A.buffer.length]=A.tpl.apply(B);
return this
},fill:function(D,F,E){var B=arguments;
if(B.length==1||(B.length==2&&typeof B[1]=="boolean")){F=B[0];
D=0;
E=B[1]
}if(E){this.reset()
}for(var C=0,A=F.length;
C<A;
C++){this.add(D,F[C])
}return this
},reset:function(){var B=this.subs;
for(var A=0;
A<this.subCount;
A++){B[A].buffer=[]
}return this
},applyTemplate:function(B){var C=this.subs;
var A=-1;
this.html=this.originalHtml.replace(this.subTemplateRe,function(E,D){return C[++A].buffer.join("")
});
return Ext.MasterTemplate.superclass.applyTemplate.call(this,B)
},apply:function(){return this.applyTemplate.apply(this,arguments)
},compile:function(){return this
}});
Ext.MasterTemplate.prototype.addAll=Ext.MasterTemplate.prototype.fill;
Ext.MasterTemplate.from=function(A){A=Ext.getDom(A);
return new Ext.MasterTemplate(A.value||A.innerHTML)
};
Ext.DomQuery=function(){var _1={},_2={},_3={};
var _4=/\S/;
var _5=/^\s+|\s+$/g;
var _6=/\{(\d+)\}/g;
var _7=/^(\s?[\/>]\s?|\s|$)/;
var _8=/^(#)?([\w-\*]+)/;
function child(p,_a){var i=0;
var n=p.firstChild;
while(n){if(n.nodeType==1){if(++i==_a){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 clean(d){var n=d.firstChild,ni=-1;
while(n){var nx=n.nextSibling;
if(n.nodeType==3&&!_4.test(n.nodeValue)){d.removeChild(n)
}else{n.nodeIndex=++ni
}n=nx
}return this
}function byClassName(c,a,v,re,cn){if(!v){return c
}var r=[];
for(var i=0,ci;
ci=c[i];
i++){cn=ci.className;
if(cn&&(" "+cn+" ").indexOf(v)!=-1){r[r.length]=ci
}}return r
}function attrValue(n,_1c){if(!n.tagName&&typeof n.length!="undefined"){n=n[0]
}if(!n){return null
}if(_1c=="for"){return n.htmlFor
}if(_1c=="class"||_1c=="className"){return n.className
}return n.getAttribute(_1c)||n[_1c]
}function getNodes(ns,_1e,_1f){var _20=[],cs;
if(!ns){return _20
}_1e=_1e?_1e.replace(_5,""):"";
_1f=_1f||"*";
if(typeof ns.getElementsByTagName!="undefined"){ns=[ns]
}if(_1e!="/"&&_1e!=">"){for(var i=0,ni;
ni=ns[i];
i++){cs=ni.getElementsByTagName(_1f);
for(var j=0,ci;
ci=cs[j];
j++){_20[_20.length]=ci
}}}else{for(var i=0,ni;
ni=ns[i];
i++){var cn=ni.getElementsByTagName(_1f);
for(var j=0,cj;
cj=cn[j];
j++){if(cj.parentNode==ni){_20[_20.length]=cj
}}}}return _20
}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,_2d){if(cs.tagName||cs==document){cs=[cs]
}if(!_2d){return cs
}var r=[];
_2d=_2d.toLowerCase();
for(var i=0,ci;
ci=cs[i];
i++){if(ci.nodeType==1&&ci.tagName.toLowerCase()==_2d){r[r.length]=ci
}}return r
}function byId(cs,_32,id){if(cs.tagName||cs==document){cs=[cs]
}if(!id){return cs
}var r=[];
for(var i=0,ci;
ci=cs[i];
i++){if(ci&&ci.id==id){r[r.length]=ci;
return r
}}return r
}function byAttribute(cs,_38,_39,op,_3b){var r=[],st=_3b=="{";
var f=Ext.DomQuery.operators[op];
for(var i=0;
ci=cs[i];
i++){var a;
if(st){a=Ext.DomQuery.getStyle(ci,_38)
}else{if(_38=="class"||_38=="className"){a=ci.className
}else{if(_38=="for"){a=ci.htmlFor
}else{if(_38=="href"){a=ci.getAttribute("href",2)
}else{a=ci.getAttribute(_38)
}}}}if((f&&f(a,_39))||(!f&&a)){r[r.length]=ci
}}return r
}function byPseudo(cs,_42,_43){return Ext.DomQuery.pseudos[_42](cs,_43)
}var _44=window.ActiveXObject?true:false;
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;
if(!len||typeof cs.nodeType!="undefined"||len==1){return cs
}if(_44&&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[r.length]=cs[j]
}for(j=i+1;
cj=cs[j];
j++){if(cj._nodup!=d){cj._nodup=d;
r[r.length]=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 _5c=c1.length;
if(!_5c){return c2
}if(_44&&c1[0].selectSingleNode){return quickDiffIEXml(c1,c2)
}var d=++key;
for(var i=0;
i<_5c;
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,_62,_63,id){if(ns==_63){var d=_63.ownerDocument||_63;
return d.getElementById(id)
}ns=getNodes(ns,_62,"*");
return byId(ns,null,id)
}return{getStyle:function(el,_67){return Ext.fly(el).getStyle(_67)
},compile:function(_68,_69){while(_68.substr(0,1)=="/"){_68=_68.substr(1)
}_69=_69||"select";
var fn=["var f = function(root){\n var mode; var n = root || document;\n"];
var q=_68,_6c,lq;
var tk=Ext.DomQuery.matchers;
var _6f=tk.length;
var mm;
while(q&&lq!=q){lq=q;
var tm=q.match(_8);
if(_69=="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(_7))){var _72=false;
for(var j=0;
j<_6f;
j++){var t=tk[j];
var m=q.match(t.re);
if(m){fn[fn.length]=t.select.replace(_6,function(x,i){return m[i]
});
q=q.replace(m[0],"");
_72=true;
break
}}if(!_72){throw'Error parsing selector, parsing failed at "'+q+'"'
}}if(mm[1]){fn[fn.length]='mode="'+mm[1]+'";';
q=q.replace(mm[1],"")
}}fn[fn.length]="return nodup(n);\n}";
eval(fn.join(""));
return f
},select:function(_78,_79,_7a){if(!_79||_79==document){_79=document
}if(typeof _79=="string"){_79=document.getElementById(_79)
}var _7b=_78.split(",");
var _7c=[];
for(var i=0,len=_7b.length;
i<len;
i++){var p=_7b[i].replace(_5,"");
if(!_1[p]){_1[p]=Ext.DomQuery.compile(p);
if(!_1[p]){throw p+" is not a valid selector"
}}var _80=_1[p](_79);
if(_80&&_80!=document){_7c=_7c.concat(_80)
}}return _7c
},selectNode:function(_81,_82){return Ext.DomQuery.select(_81,_82)[0]
},selectValue:function(_83,_84,_85){_83=_83.replace(_5,"");
if(!_3[_83]){_3[_83]=Ext.DomQuery.compile(_83,"select")
}var n=_3[_83](_84);
n=n[0]?n[0]:n;
var v=(n&&n.firstChild?n.firstChild.nodeValue:null);
return(v===null?_85:v)
},selectNumber:function(_88,_89,_8a){var v=Ext.DomQuery.selectValue(_88,_89,_8a||0);
return parseFloat(v)
},is:function(el,ss){if(typeof el=="string"){el=document.getElementById(el)
}var _8e=(el instanceof Array);
var _8f=Ext.DomQuery.filter(_8e?el:[el],ss);
return _8e?(_8f.length==el.length):(_8f.length>0)
},filter:function(els,ss,_92){ss=ss.replace(_5,"");
if(!_2[ss]){_2[ss]=Ext.DomQuery.compile(ss,"simple")
}var _93=_2[ss](els);
return _92?quickDiff(_93,els):_93
},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
}},pseudos:{"first-child":function(c){var r=[],n;
for(var i=0,ci;
ci=n=c[i];
i++){while((n=n.previousSibling)&&n.nodeType!=1){}if(!n){r[r.length]=ci
}}return r
},"last-child":function(c){var r=[];
for(var i=0,ci;
ci=n=c[i];
i++){while((n=n.nextSibling)&&n.nodeType!=1){}if(!n){r[r.length]=ci
}}return r
},"nth-child":function(c,a){var r=[];
if(a!="odd"&&a!="even"){for(var i=0,ci;
ci=c[i];
i++){var m=child(ci.parentNode,a);
if(m==ci){r[r.length]=m
}}return r
}var p;
for(var i=0,l=c.length;
i<l;
i++){var cp=c[i].parentNode;
if(cp!=p){clean(cp);
p=cp
}}for(var i=0,ci;
ci=c[i];
i++){var m=false;
if(a=="odd"){m=((ci.nodeIndex+1)%2==1)
}else{if(a=="even"){m=((ci.nodeIndex+1)%2==0)
}}if(m){r[r.length]=ci
}}return r
},"only-child":function(c){var r=[];
for(var i=0,ci;
ci=c[i];
i++){if(!prev(ci)&&!next(ci)){r[r.length]=ci
}}return r
},empty:function(c){var r=[];
for(var i=0,ci;
ci=c[i];
i++){var cns=ci.childNodes,j=0,cn,_bd=true;
while(cn=cns[j]){++j;
if(cn.nodeType==1||cn.nodeType==3){_bd=false;
break
}}if(_bd){r[r.length]=ci
}}return r
},contains:function(c,v){var r=[];
for(var i=0,ci;
ci=c[i];
i++){if(ci.innerHTML.indexOf(v)!==-1){r[r.length]=ci
}}return r
},nodeValue:function(c,v){var r=[];
for(var i=0,ci;
ci=c[i];
i++){if(ci.firstChild&&ci.firstChild.nodeValue==v){r[r.length]=ci
}}return r
},checked:function(c){var r=[];
for(var i=0,ci;
ci=c[i];
i++){if(ci.checked==true){r[r.length]=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=[];
for(var i=0,ci;
ci=c[i];
i++){if(s(ss,ci).length>0){r[r.length]=ci
}}return r
},next:function(c,ss){var is=Ext.DomQuery.is;
var r=[];
for(var i=0,ci;
ci=c[i];
i++){var n=next(ci);
if(n&&is(n,ss)){r[r.length]=ci
}}return r
},prev:function(c,ss){var is=Ext.DomQuery.is;
var r=[];
for(var i=0,ci;
ci=c[i];
i++){var n=prev(ci);
if(n&&is(n,ss)){r[r.length]=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 A=this.events[arguments[0].toLowerCase()];
if(typeof A=="object"){return A.fire.apply(A,Array.prototype.slice.call(arguments,1))
}else{return true
}},filterOptRe:/^(?:scope|delay|buffer|single)$/,addListener:function(C,B,A,F){if(typeof C=="object"){F=C;
for(var E in F){if(this.filterOptRe.test(E)){continue
}if(typeof F[E]=="function"){this.addListener(E,F[E],F.scope,F)
}else{this.addListener(E,F[E].fn,F[E].scope,F[E])
}}return 
}F=(!F||typeof F=="boolean")?{}:F;
C=C.toLowerCase();
var D=this.events[C]||true;
if(typeof D=="boolean"){D=new Ext.util.Event(this,C);
this.events[C]=D
}D.addListener(B,A,F)
},removeListener:function(A,C,B){var D=this.events[A.toLowerCase()];
if(typeof D=="object"){D.removeListener(C,B)
}},purgeListeners:function(){for(var A in this.events){if(typeof this.events[A]=="object"){this.events[A].clearListeners()
}}},relayEvents:function(E,B){var F=function(G){return function(){return this.fireEvent.apply(this,Ext.combine(G,Array.prototype.slice.call(arguments,0)))
}
};
for(var C=0,A=B.length;
C<A;
C++){var D=B[C];
if(!this.events[D]){this.events[D]=true
}E.on(D,F(D),this)
}},addEvents:function(A){if(!this.events){this.events={}
}Ext.applyIf(this.events,A)
},hasListener:function(A){var B=this.events[A];
return typeof B=="object"&&B.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(C,B,A){C.fireEvent=C.fireEvent.createInterceptor(B,A)
};
Ext.util.Observable.releaseCapture=function(A){A.fireEvent=Ext.util.Observable.prototype.fireEvent
};
(function(){var B=function(F,G,E){var D=new Ext.util.DelayedTask();
return function(){D.delay(G.buffer,F,E,Array.prototype.slice.call(arguments,0))
}
};
var A=function(E,G,D,F){return function(){G.removeListener(D,F);
return E.apply(F,arguments)
}
};
var C=function(E,F,D){return function(){var G=Array.prototype.slice.call(arguments,0);
setTimeout(function(){E.apply(D,G)
},F.delay||10)
}
};
Ext.util.Event=function(E,D){this.name=D;
this.obj=E;
this.listeners=[]
};
Ext.util.Event.prototype={addListener:function(H,F,E){var I=E||{};
F=F||this.obj;
if(!this.isListening(H,F)){var D={fn:H,scope:F,options:I};
var G=H;
if(I.delay){G=C(G,I,F)
}if(I.single){G=A(G,this,H,F)
}if(I.buffer){G=B(G,I,F)
}D.fireFn=G;
if(!this.firing){this.listeners.push(D)
}else{this.listeners=this.listeners.slice(0);
this.listeners.push(D)
}}},findListener:function(I,E){E=E||this.obj;
var G=this.listeners;
for(var H=0,D=G.length;
H<D;
H++){var F=G[H];
if(F.fn==I&&F.scope==E){return H
}}return -1
},isListening:function(E,D){return this.findListener(E,D)!=-1
},removeListener:function(D,F){var E;
if((E=this.findListener(D,F))!=-1){if(!this.firing){this.listeners.splice(E,1)
}else{this.listeners=this.listeners.slice(0);
this.listeners.splice(E,1)
}return true
}return false
},clearListeners:function(){this.listeners=[]
},fire:function(){var F=this.listeners,I,D=F.length;
if(D>0){this.firing=true;
var H=Array.prototype.slice.call(arguments,0);
for(var G=0;
G<D;
G++){var E=F[G];
if(E.fireFn.apply(E.scope,arguments)===false){this.firing=false;
return false
}}this.firing=false
}return true
}}
})();
Ext.EventManager=function(){var O,M,K=false;
var J,I,G,F;
var Q=Ext.lib.Event;
var R=Ext.lib.Dom;
var N=function(){if(!K){K=true;
Ext.isReady=true;
if(M){clearInterval(M)
}if(Ext.isGecko||Ext.isOpera){document.removeEventListener("DOMContentLoaded",N,false)
}if(O){O.fire();
O.clearListeners()
}}};
var L=function(){O=new Ext.util.Event();
if(Ext.isGecko||Ext.isOpera){document.addEventListener("DOMContentLoaded",N,false)
}else{if(Ext.isIE){document.write('<script id="ie-deferred-loader" defer="defer" src="//:"><\/script>');
var D=document.getElementById("ie-deferred-loader");
D.onreadystatechange=function(){if(this.readyState=="complete"){N();
D.onreadystatechange=null;
D.parentNode.removeChild(D)
}}
}else{if(Ext.isSafari){M=setInterval(function(){var E=document.readyState;
if(E=="complete"){N()
}},10)
}}}Q.on(window,"load",N)
};
var H=function(D,U){var E=new Ext.util.DelayedTask(D);
return function(V){V=new Ext.EventObjectImpl(V);
E.delay(U.buffer,D,null,[V])
}
};
var C=function(V,U,D,E){return function(W){Ext.EventManager.removeListener(U,D,E);
V(W)
}
};
var A=function(D,E){return function(U){U=new Ext.EventObjectImpl(U);
setTimeout(function(){D(U)
},E.delay||10)
}
};
var B=function(E,D,U,X,Z){var Y=(!U||typeof U=="boolean")?{}:U;
X=X||Y.fn;
Z=Z||Y.scope;
var W=Ext.getDom(E);
if(!W){throw'Error listening for "'+D+'". Element "'+E+"\" doesn't exist."
}var V=function(b){b=Ext.EventObject.setEvent(b);
var a;
if(Y.delegate){a=b.getTarget(Y.delegate,W);
if(!a){return 
}}else{a=b.target
}if(Y.stopEvent===true){b.stopEvent()
}if(Y.preventDefault===true){b.preventDefault()
}if(Y.stopPropagation===true){b.stopPropagation()
}if(Y.normalized===false){b=b.browserEvent
}X.call(Z||W,b,a,Y)
};
if(Y.delay){V=A(V,Y)
}if(Y.single){V=C(V,W,D,X)
}if(Y.buffer){V=H(V,Y)
}X._handlers=X._handlers||[];
X._handlers.push([Ext.id(W),D,V]);
Q.on(W,D,V);
if(D=="mousewheel"&&W.addEventListener){W.addEventListener("DOMMouseScroll",V,false);
Q.on(window,"unload",function(){W.removeEventListener("DOMMouseScroll",V,false)
})
}if(D=="mousedown"&&W==document){Ext.EventManager.stoppedMouseDownEvent.addListener(V)
}return V
};
var P=function(U,D,Z){var E=Ext.id(U),a=Z._handlers,X=Z;
if(a){for(var V=0,Y=a.length;
V<Y;
V++){var W=a[V];
if(W[0]==E&&W[1]==D){X=W[2];
a.splice(V,1);
break
}}}Q.un(U,D,X);
U=Ext.getDom(U);
if(D=="mousewheel"&&U.addEventListener){U.removeEventListener("DOMMouseScroll",X,false)
}if(D=="mousedown"&&U==document){Ext.EventManager.stoppedMouseDownEvent.removeListener(X)
}};
var T=/^(?:scope|delay|buffer|single|stopEvent|preventDefault|stopPropagation|normalized)$/;
var S={wrap:function(D,U,E){return function(V){Ext.EventObject.setEvent(V);
D.call(E?U||window:window,Ext.EventObject,U)
}
},addListener:function(U,E,D,X,V){if(typeof E=="object"){var Y=E;
for(var W in Y){if(T.test(W)){continue
}if(typeof Y[W]=="function"){B(U,W,Y,Y[W],Y.scope)
}else{B(U,W,Y[W])
}}return 
}return B(U,E,V,D,X)
},removeListener:function(D,U,E){return P(D,U,E)
},onDocumentReady:function(U,E,D){if(K){U.call(E||window,E);
return 
}if(!O){L()
}O.addListener(U,E,D)
},onWindowResize:function(D,U,E){if(!J){J=new Ext.util.Event();
I=new Ext.util.DelayedTask(function(){J.fire(R.getViewWidth(),R.getViewHeight())
});
Q.on(window,"resize",function(){if(Ext.isIE){I.delay(50)
}else{J.fire(R.getViewWidth(),R.getViewHeight())
}})
}J.addListener(D,U,E)
},onTextResize:function(E,U,D){if(!G){G=new Ext.util.Event();
var V=new Ext.Element(document.createElement("div"));
V.dom.className="x-text-resize";
V.dom.innerHTML="X";
V.appendTo(document.body);
F=V.dom.offsetHeight;
setInterval(function(){if(V.dom.offsetHeight!=F){G.fire(F,F=V.dom.offsetHeight)
}},this.textResizeInterval)
}G.addListener(E,U,D)
},removeResizeListener:function(D,E){if(J){J.removeListener(D,E)
}},fireResize:function(){if(J){J.fire(R.getViewWidth(),R.getViewHeight())
}},ieDeferSrc:false,textResizeInterval:50};
S.on=S.addListener;
S.un=S.removeListener;
S.stoppedMouseDownEvent=new Ext.util.Event();
return S
}();
Ext.onReady=Ext.EventManager.onDocumentReady;
Ext.onReady(function(){var B=Ext.get(document.body);
if(!B){return 
}var A=Ext.isIE?"ext-ie":Ext.isGecko?"ext-gecko":Ext.isOpera?"ext-opera":Ext.isSafari?"ext-safari":"";
if(Ext.isBorderBox){A+=" ext-border-box"
}if(Ext.isStrict){A+=" ext-strict"
}B.addClass(A)
});
Ext.EventObject=function(){var C=Ext.lib.Event;
var B={63234:37,63235:39,63232:38,63233:40,63276:33,63277:34,63272:46,63273:36,63275:35};
var A=Ext.isIE?{1:0,4:1,2:2}:(Ext.isSafari?{1:0,2:1,3:2}:{0:0,1:1,2:2});
Ext.EventObjectImpl=function(D){if(D){this.setEvent(D.browserEvent||D)
}};
Ext.EventObjectImpl.prototype={browserEvent:null,button:-1,shiftKey:false,ctrlKey:false,altKey:false,BACKSPACE:8,TAB:9,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(D){if(D==this||(D&&D.browserEvent)){return D
}this.browserEvent=D;
if(D){this.button=D.button?A[D.button]:(D.which?D.which-1:-1);
this.shiftKey=D.shiftKey;
this.ctrlKey=D.ctrlKey||D.metaKey;
this.altKey=D.altKey;
this.keyCode=D.keyCode;
this.charCode=D.charCode;
this.target=C.getTarget(D);
this.xy=C.getXY(D)
}else{this.button=-1;
this.shiftKey=false;
this.ctrlKey=false;
this.altKey=false;
this.keyCode=0;
this.charCode=0;
this.target=null;
this.xy=[0,0]
}return this
},stopEvent:function(){if(this.browserEvent){if(this.browserEvent.type=="mousedown"){Ext.EventManager.stoppedMouseDownEvent.fire(this)
}C.stopEvent(this.browserEvent)
}},preventDefault:function(){if(this.browserEvent){C.preventDefault(this.browserEvent)
}},isNavKeyPress:function(){var D=this.keyCode;
D=Ext.isSafari?(B[D]||D):D;
return(D>=33&&D<=40)||D==this.RETURN||D==this.TAB||D==this.ESC
},isSpecialKey:function(){var D=this.keyCode;
return D==9||D==13||D==40||D==27||(D==16)||(D==17)||(D>=18&&D<=20)||(D>=33&&D<=35)||(D>=36&&D<=39)||(D>=44&&D<=45)
},stopPropagation:function(){if(this.browserEvent){if(this.browserEvent.type=="mousedown"){Ext.EventManager.stoppedMouseDownEvent.fire(this)
}C.stopPropagation(this.browserEvent)
}},getCharCode:function(){return this.charCode||this.keyCode
},getKey:function(){var D=this.keyCode||this.charCode;
return Ext.isSafari?(B[D]||D):D
},getPageX:function(){return this.xy[0]
},getPageY:function(){return this.xy[1]
},getTime:function(){if(this.browserEvent){return C.getTime(this.browserEvent)
}return null
},getXY:function(){return this.xy
},getTarget:function(F,E,D){return F?Ext.fly(this.target).findParent(F,E,D):this.target
},getRelatedTarget:function(){if(this.browserEvent){return C.getRelatedTarget(this.browserEvent)
}return null
},getWheelDelta:function(){var E=this.browserEvent;
var D=0;
if(E.wheelDelta){D=E.wheelDelta/120;
if(window.opera){D=-D
}}else{if(E.detail){D=-E.detail/3
}}return D
},hasModifier:function(){return((this.ctrlKey||this.altKey)||this.shiftKey)?true:false
},within:function(E,F){var D=this[F?"getRelatedTarget":"getTarget"]();
return D&&Ext.fly(E).contains(D)
},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 _4={};
var _5=/(-[a-z])/gi;
var _6=function(m,a){return a.charAt(1).toUpperCase()
};
var _9=document.defaultView;
Ext.Element=function(_a,_b){var _c=typeof _a=="string"?document.getElementById(_a):_a;
if(!_c){return null
}if(!_b&&Ext.Element.cache[_c.id]){return Ext.Element.cache[_c.id]
}this.dom=_c;
this.id=_c.id||Ext.id(_c)
};
var El=Ext.Element;
El.prototype={originalDisplay:"",visibilityMode:1,defaultUnit:"px",setVisibilityMode:function(_e){this.visibilityMode=_e;
return this
},enableDisplayMode:function(_f){this.setVisibilityMode(El.DISPLAY);
if(typeof _f!="undefined"){this.originalDisplay=_f
}return this
},findParent:function(_10,_11,_12){var p=this.dom,b=document.body,_15=0,dq=Ext.DomQuery,_17;
_11=_11||50;
if(typeof _11!="number"){_17=Ext.getDom(_11);
_11=10
}while(p&&p.nodeType==1&&_15<_11&&p!=b&&p!=_17){if(dq.is(p,_10)){return _12?Ext.get(p):p
}_15++;
p=p.parentNode
}return null
},findParentNode:function(_18,_19,_1a){var p=Ext.fly(this.dom.parentNode,"_internal");
return p?p.findParent(_18,_19,_1a):null
},up:function(_1c,_1d){return this.findParentNode(_1c,_1d,true)
},is:function(_1e){return Ext.DomQuery.is(this.dom,_1e)
},animate:function(_1f,_20,_21,_22,_23){this.anim(_1f,{duration:_20,callback:_21,easing:_22},_23);
return this
},anim:function(_24,opt,_26,_27,_28,cb){_26=_26||"run";
opt=opt||{};
var _2a=Ext.lib.Anim[_26](this.dom,_24,(opt.duration||_27)||0.35,(opt.easing||_28)||"easeOut",function(){Ext.callback(cb,this);
Ext.callback(opt.callback,opt.scope||this,[this,opt])
},this);
opt.anim=_2a;
return _2a
},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(_2d){if(this.isCleaned&&_2d!==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),d=el.dom;
var _34=false;
if(el.getStyle("position")=="static"){el.position("relative");
_34=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(_34){el.position("static")
}return[x,y]
},scrollIntoView:function(_38,_39){var c=Ext.getDom(_38)||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(_39!==false){if(l<cl){c.scrollLeft=l
}else{if(r>cr){c.scrollLeft=r-c.clientWidth
}}}return this
},scrollChildIntoView:function(_46){Ext.fly(_46,"_scrollChildIntoView").scrollIntoView(this)
},autoHeight:function(_47,_48,_49,_4a){var _4b=this.getHeight();
this.clip();
this.setHeight(1);
setTimeout(function(){var _4c=parseInt(this.dom.scrollHeight,10);
if(!_47){this.setHeight(_4c);
this.unclip();
if(typeof _49=="function"){_49()
}}else{this.setHeight(_4b);
this.setHeight(_4c,_47,_48,function(){this.unclip();
if(typeof _49=="function"){_49()
}}.createDelegate(this),_4a)
}}.createDelegate(this),0);
return this
},contains:function(el){if(!el){return false
}return D.isAncestor(this.dom,el.dom?el.dom:el)
},isVisible:function(_4e){var vis=!(this.getStyle("visibility")=="hidden"||this.getStyle("display")=="none");
if(_4e!==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(_51,_52){return El.select("#"+Ext.id(this.dom)+" "+_51,_52)
},query:function(_53,_54){return Ext.DomQuery.select("#"+Ext.id(this.dom)+" "+_53)
},child:function(_55,_56){var n=Ext.DomQuery.selectNode("#"+Ext.id(this.dom)+" "+_55);
return _56?n:Ext.get(n)
},down:function(_58,_59){var n=Ext.DomQuery.selectNode("#"+Ext.id(this.dom)+" > "+_58);
return _59?n:Ext.get(n)
},initDD:function(_5b,_5c,_5d){var dd=new Ext.dd.DD(Ext.id(this.dom),_5b,_5c);
return Ext.apply(dd,_5d)
},initDDProxy:function(_5f,_60,_61){var dd=new Ext.dd.DDProxy(Ext.id(this.dom),_5f,_60);
return Ext.apply(dd,_61)
},initDDTarget:function(_63,_64,_65){var dd=new Ext.dd.DDTarget(Ext.id(this.dom),_63,_64);
return Ext.apply(dd,_65)
},setVisible:function(_67,_68){if(!_68||!A){if(this.visibilityMode==El.DISPLAY){this.setDisplayed(_67)
}else{this.fixDisplay();
this.dom.style.visibility=_67?"visible":"hidden"
}}else{var dom=this.dom;
var _6a=this.visibilityMode;
if(_67){this.setOpacity(0.01);
this.setVisible(true)
}this.anim({opacity:{to:(_67?1:0)}},this.preanim(arguments,1),null,0.35,"easeIn",function(){if(!_67){if(_6a==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(_6b){this.setVisible(!this.isVisible(),this.preanim(arguments,0));
return this
},setDisplayed:function(_6c){if(typeof _6c=="boolean"){_6c=_6c?this.originalDisplay:"none"
}this.setStyle("display",_6c);
return this
},focus:function(){try{this.dom.focus()
}catch(e){}return this
},blur:function(){try{this.dom.blur()
}catch(e){}return this
},addClass:function(_6d){if(_6d instanceof Array){for(var i=0,len=_6d.length;
i<len;
i++){this.addClass(_6d[i])
}}else{if(_6d&&!this.hasClass(_6d)){this.dom.className=this.dom.className+" "+_6d
}}return this
},radioClass:function(_70){var _71=this.dom.parentNode.childNodes;
for(var i=0;
i<_71.length;
i++){var s=_71[i];
if(s.nodeType==1){Ext.get(s).removeClass(_70)
}}this.addClass(_70);
return this
},removeClass:function(_74){if(!_74||!this.dom.className){return this
}if(_74 instanceof Array){for(var i=0,len=_74.length;
i<len;
i++){this.removeClass(_74[i])
}}else{if(this.hasClass(_74)){var re=this.classReCache[_74];
if(!re){re=new RegExp("(?:^|\\s+)"+_74+"(?:\\s+|$)","g");
this.classReCache[_74]=re
}this.dom.className=this.dom.className.replace(re," ")
}}return this
},classReCache:{},toggleClass:function(_78){if(this.hasClass(_78)){this.removeClass(_78)
}else{this.addClass(_78)
}return this
},hasClass:function(_79){return _79&&(" "+this.dom.className+" ").indexOf(" "+_79+" ")!=-1
},replaceClass:function(_7a,_7b){this.removeClass(_7a);
this.addClass(_7b);
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 _9&&_9.getComputedStyle?function(_80){var el=this.dom,v,cs,_84;
if(_80=="float"){_80="cssFloat"
}if(v=el.style[_80]){return v
}if(cs=_9.getComputedStyle(el,"")){if(!(_84=_4[_80])){_84=_4[_80]=_80.replace(_5,_6)
}return cs[_84]
}return null
}:function(_85){var el=this.dom,v,cs,_89;
if(_85=="opacity"){if(typeof el.filter=="string"){var fv=parseFloat(el.filter.match(/alpha\(opacity=(.*)\)/i)[1]);
if(!isNaN(fv)){return fv?fv/100:0
}}return 1
}else{if(_85=="float"){_85="styleFloat"
}}if(!(_89=_4[_85])){_89=_4[_85]=_85.replace(_5,_6)
}if(v=el.style[_89]){return v
}if(cs=el.currentStyle){return cs[_89]
}return null
}
}(),setStyle:function(_8b,_8c){if(typeof _8b=="string"){var _8d;
if(!(_8d=_4[_8b])){_8d=_4[_8b]=_8b.replace(_5,_6)
}if(_8d=="opacity"){this.setOpacity(_8c)
}else{this.dom.style[_8d]=_8c
}}else{for(var _8e in _8b){if(typeof _8b[_8e]!="function"){this.setStyle(_8e,_8b[_8e])
}}}return this
},applyStyles:function(_8f){Ext.DomHelper.applyStyles(this.dom,_8f);
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,_91){if(!_91||!A){D.setX(this.dom,x)
}else{this.setXY([x,this.getY()],this.preanim(arguments,1))
}return this
},setY:function(y,_93){if(!_93||!A){D.setY(this.dom,y)
}else{this.setXY([this.getX(),y],this.preanim(arguments,1))
}return this
},setLeft:function(_94){this.setStyle("left",this.addUnits(_94));
return this
},setTop:function(top){this.setStyle("top",this.addUnits(top));
return this
},setRight:function(_96){this.setStyle("right",this.addUnits(_96));
return this
},setBottom:function(_97){this.setStyle("bottom",this.addUnits(_97));
return this
},setXY:function(pos,_99){if(!_99||!A){D.setXY(this.dom,pos)
}else{this.anim({points:{to:pos}},this.preanim(arguments,1),"motion")
}return this
},setLocation:function(x,y,_9c){this.setXY([x,y],this.preanim(arguments,2));
return this
},moveTo:function(x,y,_9f){this.setXY([x,y],this.preanim(arguments,2));
return this
},getRegion:function(){return D.getRegion(this.dom)
},getHeight:function(_a0){var h=this.dom.offsetHeight||0;
return _a0!==true?h:h-this.getBorderWidth("tb")-this.getPadding("tb")
},getWidth:function(_a2){var w=this.dom.offsetWidth||0;
return _a2!==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(_a6){return{width:this.getWidth(_a6),height:this.getHeight(_a6)}
},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(_ab){return _ab?parseInt(this.dom.value,10):this.dom.value
},adjustWidth:function(_ac){if(typeof _ac=="number"){if(this.autoBoxAdjust&&!this.isBorderBox()){_ac-=(this.getBorderWidth("lr")+this.getPadding("lr"))
}if(_ac<0){_ac=0
}}return _ac
},adjustHeight:function(_ad){if(typeof _ad=="number"){if(this.autoBoxAdjust&&!this.isBorderBox()){_ad-=(this.getBorderWidth("tb")+this.getPadding("tb"))
}if(_ad<0){_ad=0
}}return _ad
},setWidth:function(_ae,_af){_ae=this.adjustWidth(_ae);
if(!_af||!A){this.dom.style.width=this.addUnits(_ae)
}else{this.anim({width:{to:_ae}},this.preanim(arguments,1))
}return this
},setHeight:function(_b0,_b1){_b0=this.adjustHeight(_b0);
if(!_b1||!A){this.dom.style.height=this.addUnits(_b0)
}else{this.anim({height:{to:_b0}},this.preanim(arguments,1))
}return this
},setSize:function(_b2,_b3,_b4){if(typeof _b2=="object"){_b3=_b2.height;
_b2=_b2.width
}_b2=this.adjustWidth(_b2);
_b3=this.adjustHeight(_b3);
if(!_b4||!A){this.dom.style.width=this.addUnits(_b2);
this.dom.style.height=this.addUnits(_b3)
}else{this.anim({width:{to:_b2},height:{to:_b3}},this.preanim(arguments,2))
}return this
},setBounds:function(x,y,_b7,_b8,_b9){if(!_b9||!A){this.setSize(_b7,_b8);
this.setLocation(x,y)
}else{_b7=this.adjustWidth(_b7);
_b8=this.adjustHeight(_b8);
this.anim({points:{to:[x,y]},width:{to:_b7},height:{to:_b8}},this.preanim(arguments,4),"motion")
}return this
},setRegion:function(_ba,_bb){this.setBounds(_ba.left,_ba.top,_ba.right-_ba.left,_ba.bottom-_ba.top,this.preanim(arguments,1));
return this
},addListener:function(_bc,fn,_be,_bf){Ext.EventManager.on(this.dom,_bc,fn,_be||this,_bf)
},removeListener:function(_c0,fn){Ext.EventManager.removeListener(this.dom,_c0,fn);
return this
},removeAllListeners:function(){E.purgeElement(this.dom);
return this
},relayEvent:function(_c2,_c3){this.on(_c2,function(e){_c3.fireEvent(_c2,e)
})
},setOpacity:function(_c5,_c6){if(!_c6||!A){var s=this.dom.style;
if(Ext.isIE){s.zoom=1;
s.filter=(s.filter||"").replace(/alpha\([^\)]*\)/gi,"")+(_c5==1?"":"alpha(opacity="+_c5*100+")")
}else{s.opacity=_c5
}}else{this.anim({opacity:{to:_c5}},this.preanim(arguments,1),null,0.35,"easeIn")
}return this
},getLeft:function(_c8){if(!_c8){return this.getX()
}else{return parseInt(this.getStyle("left"),10)||0
}},getRight:function(_c9){if(!_c9){return this.getX()+this.getWidth()
}else{return(this.getLeft(true)+this.getWidth())||0
}},getTop:function(_ca){if(!_ca){return this.getY()
}else{return parseInt(this.getStyle("top"),10)||0
}},getBottom:function(_cb){if(!_cb){return this.getY()+this.getHeight()
}else{return(this.getTop(true)+this.getHeight())||0
}},position:function(pos,_cd,x,y){if(!pos){if(this.getStyle("position")=="static"){this.setStyle("position","relative")
}}else{this.setStyle("position",pos)
}if(_cd){this.setStyle("z-index",_cd)
}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(_d0){_d0=_d0||"";
this.setStyle({left:_d0,right:_d0,top:_d0,bottom:_d0,"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(_d3){return this.addStyles(_d3,El.borders)
},getPadding:function(_d4){return this.addStyles(_d4,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(_d6,top){this.dom.style.left=this.addUnits(_d6);
this.dom.style.top=this.addUnits(top);
return this
},move:function(_d8,_d9,_da){var xy=this.getXY();
_d8=_d8.toLowerCase();
switch(_d8){case"l":case"left":this.moveTo(xy[0]-_d9,xy[1],this.preanim(arguments,2));
break;
case"r":case"right":this.moveTo(xy[0]+_d9,xy[1],this.preanim(arguments,2));
break;
case"t":case"top":case"up":this.moveTo(xy[0],xy[1]-_d9,this.preanim(arguments,2));
break;
case"b":case"bottom":case"down":this.moveTo(xy[0],xy[1]+_d9,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(_dd,_de,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((_dd||"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(_de===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),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]?true:false;
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 _fd=((p1y=="t"&&p2y=="b")||(p1y=="b"&&p2y=="t"));
var _fe=((p1x=="r"&&p2x=="l")||(p1x=="l"&&p2x=="r"));
var doc=document;
var _100=(doc.documentElement.scrollLeft||doc.body.scrollLeft||0)+5;
var _101=(doc.documentElement.scrollTop||doc.body.scrollTop||0)+5;
if((x+w)>dw){x=_fe?r.left-w:dw-w
}if(x<_100){x=_fe?r.right:_100
}if((y+h)>dh){y=_fd?r.top-h:dh-h
}if(y<_101){y=_fd?r.bottom:_101
}}return[x,y]
},getConstrainToXY:function(){var os={top:0,left:0,bottom:0,right:0};
return function(el,_104,_105){el=Ext.get(el);
_105=_105?Ext.applyIf(_105,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(!_104){var vxy=el.getXY();
vx=vxy[0];
vy=vxy[1]
}}var s=el.getScroll();
vx+=_105.left+s.left;
vy+=_105.top+s.top;
vw-=_105.right;
vh-=_105.bottom;
var vr=vx+vw;
var vb=vy+vh;
var xy=!_104?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 _113=false;
if((x+w)>vr){x=vr-w;
_113=true
}if((y+h)>vb){y=vb-h;
_113=true
}if(x<vx){x=vx;
_113=true
}if(y<vy){y=vy;
_113=true
}return _113?[x,y]:false
}
}(),alignTo:function(_114,_115,_116,_117){var xy=this.getAlignToXY(_114,_115,_116);
this.setXY(xy,this.preanim(arguments,3));
return this
},anchorTo:function(el,_11a,_11b,_11c,_11d,_11e){var _11f=function(){this.alignTo(el,_11a,_11b,_11c);
Ext.callback(_11e,this)
};
Ext.EventManager.onWindowResize(_11f,this);
var tm=typeof _11d;
if(tm!="undefined"){Ext.EventManager.on(window,"scroll",_11f,this,{buffer:tm=="number"?_11d:50})
}_11f.call(this);
return this
},clearOpacity:function(){if(window.ActiveXObject){this.dom.style.filter=""
}else{this.dom.style.opacity="";
this.dom.style["-moz-opacity"]="";
this.dom.style["-khtml-opacity"]=""
}return this
},hide:function(_121){this.setVisible(false,this.preanim(arguments,0));
return this
},show:function(_122){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 _125=[];
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"){_125.push({el:p,visibility:pe.getStyle("visibility")});
p.style.visibility="hidden";
p.style.display="block"
}p=p.parentNode
}this._measureChanged=_125;
return this
},endMeasure:function(){var _129=this._measureChanged;
if(_129){for(var i=0,len=_129.length;
i<len;
i++){var r=_129[i];
r.el.style.visibility=r.visibility;
r.el.style.display="none"
}this._measureChanged=null
}return this
},update:function(html,_12e,_12f){if(typeof html=="undefined"){html=""
}if(_12e!==true){this.dom.innerHTML=html;
if(typeof _12f=="function"){_12f()
}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 _134=/\ssrc=([\'\"])(.*?)\1/i;
var _135=/\stype=([\'\"])(.*?)\1/i;
var _136;
while(_136=re.exec(html)){var _137=_136[1];
var _138=_137?_137.match(_134):false;
if(_138&&_138[2]){var s=document.createElement("script");
s.src=_138[2];
var _13a=_137.match(_135);
if(_13a&&_13a[2]){s.type=_13a[2]
}hd.appendChild(s)
}else{if(_136[2]&&_136[2].length>0){eval(_136[2])
}}}var el=document.getElementById(id);
if(el){el.parentNode.removeChild(el)
}if(typeof _12f=="function"){_12f()
}});
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(_13d){this.alignTo(_13d||document,"c-c");
return this
},isBorderBox:function(){return _13e[this.dom.tagName.toLowerCase()]||Ext.isBorderBox
},getBox:function(_13f,_140){var xy;
if(!_140){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(!_13f){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(_14c){return this.getPadding(_14c)+this.getBorderWidth(_14c)
},setBox:function(box,_14e,_14f){var w=box.width,h=box.height;
if((_14e&&!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(_154,_155){var val=0;
for(var i=0,len=_154.length;
i<len;
i++){var w=parseInt(this.getStyle(_155[_154.charAt(i)]),10);
if(!isNaN(w)){val+=w
}}return val
},createProxy:function(_15a,_15b,_15c){if(_15b){_15b=Ext.getDom(_15b)
}else{_15b=document.body
}_15a=typeof _15a=="object"?_15a:{tag:"div",cls:_15a};
var _15d=Ext.DomHelper.append(_15b,_15a,true);
if(_15c){_15d.setBox(this.getBox())
}return _15d
},mask:function(msg,_15f){if(this.getStyle("position")=="static"){this.setStyle("position","relative")
}if(!this._mask){this._mask=Ext.DomHelper.append(this.dom,{tag:"div",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,{tag:"div",cls:"ext-el-mask-msg",cn:{tag:"div"}},true)
}var mm=this._maskMsg;
mm.dom.className=_15f?"ext-el-mask-msg "+_15f:"ext-el-mask-msg";
mm.dom.firstChild.innerHTML=msg;
mm.setDisplayed(true);
mm.center(this)
}return this._mask
},unmask:function(_161){if(this._mask){if(_161===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(_164,_165){this.on("mouseover",function(){Ext.fly(this,"_internal").addClass(_164)
},this.dom);
var _166=function(e){if(_165!==true||!e.within(this,true)){Ext.fly(this,"_internal").removeClass(_164)
}};
this.on("mouseout",_166,this.dom);
return this
},addClassOnFocus:function(_168){this.on("focus",function(){Ext.fly(this,"_internal").addClass(_168)
},this.dom);
this.on("blur",function(){Ext.fly(this,"_internal").removeClass(_168)
},this.dom);
return this
},addClassOnClick:function(_169){var dom=this.dom;
this.on("mousedown",function(){Ext.fly(dom,"_internal").addClass(_169);
var d=Ext.get(document);
var fn=function(){Ext.fly(dom,"_internal").removeClass(_169);
d.removeListener("mouseup",fn)
};
d.on("mouseup",fn)
});
return this
},swallowEvent:function(_16d,_16e){var fn=function(e){e.stopPropagation();
if(_16e){e.preventDefault()
}};
if(_16d instanceof Array){for(var i=0,len=_16d.length;
i<len;
i++){this.on(_16d[i],fn)
}return this
}this.on(_16d,fn);
return this
},fitToParent:function(_173,_174){var p=Ext.get(_174||this.dom.parentNode);
this.setSize(p.getComputedWidth()-p.getFrameWidth("lr"),p.getComputedHeight()-p.getFrameWidth("tb"));
if(_173===true){Ext.EventManager.onWindowResize(this.fitToParent.createDelegate(this,[]))
}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(_179,_17a,_17b){_179=_179||{tag:"div"};
if(_17a){return Ext.DomHelper.insertBefore(_17a,_179,_17b!==true)
}return Ext.DomHelper[!this.dom.firstChild?"overwrite":"append"](this.dom,_179,_17b!==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,_180){el=el||{};
if(typeof el=="object"&&!el.nodeType){return this.createChild(el,this.dom.firstChild,_180)
}else{el=Ext.getDom(el);
this.dom.insertBefore(el,this.dom.firstChild);
return !_180?Ext.get(el):el
}},insertSibling:function(el,_182,_183){_182=_182?_182.toLowerCase():"before";
el=el||{};
var rt,_185=_182=="before"?this.dom:this.dom.nextSibling;
if(typeof el=="object"&&!el.nodeType){if(_182=="after"&&!this.dom.nextSibling){rt=Ext.DomHelper.append(this.dom.parentNode,el,!_183)
}else{rt=Ext.DomHelper[_182=="after"?"insertAfter":"insertBefore"](this.dom,el,!_183)
}}else{rt=this.dom.parentNode.insertBefore(Ext.getDom(el),_182=="before"?this.dom:this.dom.nextSibling);
if(!_183){rt=Ext.get(rt)
}}return rt
},wrap:function(_186,_187){if(!_186){_186={tag:"div"}
}var _188=Ext.DomHelper.insertBefore(this.dom,_186,!_187);
_188.dom?_188.dom.appendChild(this.dom):_188.appendChild(this.dom);
return _188
},replace:function(el){el=Ext.get(el);
this.insertBefore(el);
el.remove();
return this
},insertHtml:function(_18a,html){return Ext.DomHelper.insertHtml(_18a,this.dom,html)
},set:function(o,_18d){var el=this.dom;
_18d=typeof _18d=="undefined"?(el.setAttribute?true:false):_18d;
for(var attr in o){if(attr=="style"||typeof o[attr]=="function"){continue
}if(attr=="cls"){el.className=o.cls
}else{if(_18d){el.setAttribute(attr,o[attr])
}else{el[attr]=o[attr]
}}}Ext.DomHelper.applyStyles(el,o.style);
return this
},addKeyListener:function(key,fn,_192){var _193;
if(typeof key!="object"||key instanceof Array){_193={key:key,fn:fn,scope:_192}
}else{_193={key:key.key,shift:key.shift,ctrl:key.ctrl,alt:key.alt,fn:fn,scope:_192}
}return new Ext.KeyMap(this,_193)
},addKeyMap:function(_194){return new Ext.KeyMap(this,_194)
},isScrollable:function(){var dom=this.dom;
return dom.scrollHeight>dom.clientHeight||dom.scrollWidth>dom.clientWidth
},scrollTo:function(side,_197,_198){var prop=side.toLowerCase()=="left"?"scrollLeft":"scrollTop";
if(!_198||!A){this.dom[prop]=_197
}else{var to=prop=="scrollLeft"?[_197,this.dom.scrollTop]:[this.dom.scrollLeft,_197];
this.anim({scroll:{to:to}},this.preanim(arguments,2),"scroll")
}return this
},scroll:function(_19b,_19c,_19d){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;
_19b=_19b.toLowerCase();
var _1a5=false;
var a=this.preanim(arguments,2);
switch(_19b){case"l":case"left":if(w-l>cw){var v=Math.min(l+_19c,w-cw);
this.scrollTo("left",v,a);
_1a5=true
}break;
case"r":case"right":if(l>0){var v=Math.max(l-_19c,0);
this.scrollTo("left",v,a);
_1a5=true
}break;
case"t":case"top":case"up":if(t>0){var v=Math.max(t-_19c,0);
this.scrollTo("top",v,a);
_1a5=true
}break;
case"b":case"bottom":case"down":if(h-t>ch){var v=Math.min(t+_19c,h-ch);
this.scrollTo("top",v,a);
_1a5=true
}break
}return _1a5
},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,_1b3,_1b4){var v=this.getStyle(attr);
if(!v||v=="transparent"||v=="inherit"){return _1b3
}var _1b6=typeof _1b4=="undefined"?"#":_1b4;
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
}_1b6+=h
}}else{if(v.substr(0,1)=="#"){if(v.length==4){for(var i=1;
i<4;
i++){var c=v.charAt(i);
_1b6+=c+c
}}else{if(v.length==7){_1b6+=v.substr(1)
}}}}return(_1b6.length>5?_1b6.toLowerCase():_1b3)
},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;
ep.autoDisplayMode=true;
El.unitPattern=/\d+(px|em|%|en|ex|pt|in|cm|mm|pc)$/i;
El.addUnits=function(v,_1c6){if(v===""||v=="auto"){return v
}if(v===undefined){return""
}if(typeof v=="number"||!El.unitPattern.test(v)){return v+(_1c6||"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 _1c7;
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!=_1c7){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(!_1c7){var f=function(){};
f.prototype=El.prototype;
_1c7=new f();
_1c7.dom=document
}return _1c7
}}}}}}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.Flyweight=function(dom){this.dom=dom
};
El.Flyweight.prototype=El.prototype;
El._flyweights={};
El.fly=function(el,_1d3){_1d3=_1d3||"_global";
el=Ext.getDom(el);
if(!el){return null
}if(!El._flyweights[_1d3]){El._flyweights[_1d3]=new El.Flyweight()
}El._flyweights[_1d3].dom=el;
return El._flyweights[_1d3]
};
Ext.get=El.get;
Ext.fly=El.fly;
var _13e=Ext.isStrict?{select:1}:{input:1,select:1,textarea:1};
if(Ext.isIE||Ext.isGecko){_13e.button=1
}Ext.EventManager.on(window,"unload",function(){delete El.cache;
delete El._flyweights
})
})();
Ext.enableFx=true;
Ext.Fx={slideIn:function(B,C){var A=this.getFxEl();
C=C||{};
A.queueFx(C,function(){B=B||"t";
this.fixDisplay();
var D=this.getFxRestore();
var I=this.getBox();
this.setSize(I);
var G=this.fxWrap(D.pos,C,"hidden");
var K=this.dom.style;
K.visibility="visible";
K.position="absolute";
var F=function(){A.fxUnwrap(G,D.pos,C);
K.width=D.width;
K.height=D.height;
A.afterFx(C)
};
var J,L={to:[I.x,I.y]},H={to:I.width},E={to:I.height};
switch(B.toLowerCase()){case"t":G.setSize(I.width,0);
K.left=K.bottom="0";
J={height:E};
break;
case"l":G.setSize(0,I.height);
K.right=K.top="0";
J={width:H};
break;
case"r":G.setSize(0,I.height);
G.setX(I.right);
K.left=K.top="0";
J={width:H,points:L};
break;
case"b":G.setSize(I.width,0);
G.setY(I.bottom);
K.left=K.top="0";
J={height:E,points:L};
break;
case"tl":G.setSize(0,0);
K.right=K.bottom="0";
J={width:H,height:E};
break;
case"bl":G.setSize(0,0);
G.setY(I.y+I.height);
K.right=K.top="0";
J={width:H,height:E,points:L};
break;
case"br":G.setSize(0,0);
G.setXY([I.right,I.bottom]);
K.left=K.top="0";
J={width:H,height:E,points:L};
break;
case"tr":G.setSize(0,0);
G.setX(I.x+I.width);
K.left=K.bottom="0";
J={width:H,height:E,points:L};
break
}this.dom.style.visibility="visible";
G.show();
arguments.callee.anim=G.fxanim(J,C,"motion",0.5,"easeOut",F)
});
return this
},slideOut:function(A,C){var B=this.getFxEl();
C=C||{};
B.queueFx(C,function(){A=A||"t";
var I=this.getFxRestore();
var D=this.getBox();
this.setSize(D);
var J=this.fxWrap(I.pos,C,"visible");
var F=this.dom.style;
F.visibility="visible";
F.position="absolute";
J.setSize(D);
var H=function(){if(C.useDisplay){B.setDisplayed(false)
}else{B.hide()
}B.fxUnwrap(J,I.pos,C);
F.width=I.width;
F.height=I.height;
B.afterFx(C)
};
var E,G={to:0};
switch(A.toLowerCase()){case"t":F.left=F.bottom="0";
E={height:G};
break;
case"l":F.right=F.top="0";
E={width:G};
break;
case"r":F.left=F.top="0";
E={width:G,points:{to:[D.right,D.y]}};
break;
case"b":F.left=F.top="0";
E={height:G,points:{to:[D.x,D.bottom]}};
break;
case"tl":F.right=F.bottom="0";
E={width:G,height:G};
break;
case"bl":F.right=F.top="0";
E={width:G,height:G,points:{to:[D.x,D.bottom]}};
break;
case"br":F.left=F.top="0";
E={width:G,height:G,points:{to:[D.x+D.width,D.bottom]}};
break;
case"tr":F.left=F.bottom="0";
E={width:G,height:G,points:{to:[D.right,D.y]}};
break
}arguments.callee.anim=J.fxanim(E,C,"motion",0.5,"easeOut",H)
});
return this
},puff:function(B){var A=this.getFxEl();
B=B||{};
A.queueFx(B,function(){this.clearOpacity();
this.show();
var G=this.getFxRestore();
var E=this.dom.style;
var F=function(){if(B.useDisplay){A.setDisplayed(false)
}else{A.hide()
}A.clearOpacity();
A.setPositioning(G.pos);
E.width=G.width;
E.height=G.height;
E.fontSize="";
A.afterFx(B)
};
var D=this.getWidth();
var C=this.getHeight();
arguments.callee.anim=this.fxanim({width:{to:this.adjustWidth(D*2)},height:{to:this.adjustHeight(C*2)},points:{by:[-(D*0.5),-(C*0.5)]},opacity:{to:0},fontSize:{to:200,unit:"%"}},B,"motion",0.5,"easeOut",F)
});
return this
},switchOff:function(B){var A=this.getFxEl();
B=B||{};
A.queueFx(B,function(){this.clearOpacity();
this.clip();
var D=this.getFxRestore();
var C=this.dom.style;
var E=function(){if(B.useDisplay){A.setDisplayed(false)
}else{A.hide()
}A.clearOpacity();
A.setPositioning(D.pos);
C.width=D.width;
C.height=D.height;
A.afterFx(B)
};
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]}},B,"motion",0.3,"easeIn",E)
}).defer(100,this)
})
});
return this
},highlight:function(C,B){var A=this.getFxEl();
B=B||{};
A.queueFx(B,function(){C=C||"ffff9c";
attr=B.attr||"backgroundColor";
this.clearOpacity();
this.show();
var G=this.getColor(attr);
var F=this.dom.style[attr];
endColor=(B.endColor||G)||"ffffff";
var E=function(){A.dom.style[attr]=F;
A.afterFx(B)
};
var D={};
D[attr]={from:C,to:endColor};
arguments.callee.anim=this.fxanim(D,B,"color",1,"easeIn",E)
});
return this
},frame:function(C,B,D){var A=this.getFxEl();
D=D||{};
A.queueFx(D,function(){C=C||"#C3DAF9";
if(C.length==6){C="#"+C
}B=B||1;
duration=D.duration||1;
this.show();
var E=this.getBox();
var F=function(){var H=this.createProxy({tag:"div",style:{visbility:"hidden",position:"absolute","z-index":"35000",border:"0px solid "+C}});
var G=Ext.isBorderBox?2:1;
H.animate({top:{from:E.y,to:E.y-20},left:{from:E.x,to:E.x-20},borderWidth:{from:0,to:10},opacity:{from:1,to:0},height:{from:E.height,to:(E.height+(20*G))},width:{from:E.width,to:(E.width+(20*G))}},duration,function(){H.remove()
});
if(--B>0){F.defer((duration/2)*1000,this)
}else{A.afterFx(D)
}};
F.call(this)
});
return this
},pause:function(A){var B=this.getFxEl();
var C={};
B.queueFx(C,function(){setTimeout(function(){B.afterFx(C)
},A*1000)
});
return this
},fadeIn:function(B){var A=this.getFxEl();
B=B||{};
A.queueFx(B,function(){this.setOpacity(0);
this.fixDisplay();
this.dom.style.visibility="visible";
var C=B.endOpacity||1;
arguments.callee.anim=this.fxanim({opacity:{to:C}},B,null,0.5,"easeOut",function(){if(C==1){this.clearOpacity()
}A.afterFx(B)
})
});
return this
},fadeOut:function(B){var A=this.getFxEl();
B=B||{};
A.queueFx(B,function(){arguments.callee.anim=this.fxanim({opacity:{to:B.endOpacity||0}},B,null,0.5,"easeOut",function(){if(this.visibilityMode==Ext.Element.DISPLAY||B.useDisplay){this.dom.style.display="none"
}else{this.dom.style.visibility="hidden"
}this.clearOpacity();
A.afterFx(B)
})
});
return this
},scale:function(A,B,C){this.shift(Ext.apply({},C,{width:A,height:B}));
return this
},shift:function(B){var A=this.getFxEl();
B=B||{};
A.queueFx(B,function(){var E={},D=B.width,F=B.height,C=B.x,H=B.y,G=B.opacity;
if(D!==undefined){E.width={to:this.adjustWidth(D)}
}if(F!==undefined){E.height={to:this.adjustHeight(F)}
}if(C!==undefined||H!==undefined){E.points={to:[C!==undefined?C:this.getX(),H!==undefined?H:this.getY()]}
}if(G!==undefined){E.opacity={to:G}
}if(B.xy!==undefined){E.points={to:B.xy}
}arguments.callee.anim=this.fxanim(E,B,"motion",0.35,"easeOut",function(){A.afterFx(B)
})
});
return this
},ghost:function(A,C){var B=this.getFxEl();
C=C||{};
B.queueFx(C,function(){A=A||"b";
var H=this.getFxRestore();
var E=this.getWidth(),G=this.getHeight();
var F=this.dom.style;
var J=function(){if(C.useDisplay){B.setDisplayed(false)
}else{B.hide()
}B.clearOpacity();
B.setPositioning(H.pos);
F.width=H.width;
F.height=H.height;
B.afterFx(C)
};
var D={opacity:{to:0},points:{}},I=D.points;
switch(A.toLowerCase()){case"t":I.by=[0,-G];
break;
case"l":I.by=[-E,0];
break;
case"r":I.by=[E,0];
break;
case"b":I.by=[0,G];
break;
case"tl":I.by=[-E,-G];
break;
case"bl":I.by=[-E,G];
break;
case"br":I.by=[E,G];
break;
case"tr":I.by=[E,-G];
break
}arguments.callee.anim=this.fxanim(D,C,"motion",0.5,"easeOut",J)
});
return this
},syncFx:function(){this.fxDefaults=Ext.apply(this.fxDefaults||{},{block:false,concurrent:true,stopFx:false});
return this
},sequenceFx:function(){this.fxDefaults=Ext.apply(this.fxDefaults||{},{block:false,concurrent:false,stopFx:false});
return this
},nextFx:function(){var A=this.fxQueue[0];
if(A){A.call(this)
}},hasActiveFx:function(){return this.fxQueue&&this.fxQueue[0]
},stopFx:function(){if(this.hasActiveFx()){var A=this.fxQueue[0];
if(A&&A.anim&&A.anim.isAnimated()){this.fxQueue=[A];
A.anim.stop(true)
}}return this
},beforeFx:function(A){if(this.hasActiveFx()&&!A.concurrent){if(A.stopFx){this.stopFx();
return true
}return false
}return true
},hasFxBlock:function(){var A=this.fxQueue;
return A&&A[0]&&A[0].block
},queueFx:function(C,A){if(!this.fxQueue){this.fxQueue=[]
}if(!this.hasFxBlock()){Ext.applyIf(C,this.fxDefaults);
if(!C.concurrent){var B=this.beforeFx(C);
A.block=C.block;
this.fxQueue.push(A);
if(B){this.nextFx()
}}else{A.call(this)
}}return this
},fxWrap:function(F,D,B){var C;
if(!D.wrap||!(C=Ext.get(D.wrap))){var A;
if(D.fixPosition){A=this.getXY()
}var E=document.createElement("div");
E.style.visibility=B;
C=Ext.get(this.dom.parentNode.insertBefore(E,this.dom));
C.setPositioning(F);
if(C.getStyle("position")=="static"){C.position("relative")
}this.clearPositioning("auto");
C.clip();
C.dom.appendChild(this.dom);
if(A){C.setXY(A)
}}return C
},fxUnwrap:function(A,C,B){this.clearPositioning();
this.setPositioning(C);
if(!B.wrap){A.dom.parentNode.insertBefore(this.dom,A.dom);
A.remove()
}},getFxRestore:function(){var A=this.dom.style;
return{pos:this.getPositioning(),width:A.width,height:A.height}
},afterFx:function(A){if(A.afterStyle){this.applyStyles(A.afterStyle)
}if(A.afterCls){this.addClass(A.afterCls)
}if(A.remove===true){this.remove()
}Ext.callback(A.callback,A.scope,[this]);
if(!A.concurrent){this.fxQueue.shift();
this.nextFx()
}},getFxEl:function(){return Ext.get(this.dom)
},fxanim:function(G,D,F,E,C,A){F=F||"run";
D=D||{};
var B=Ext.lib.Anim[F](this.dom,G,(D.duration||E)||0.35,(D.easing||C)||"easeOut",function(){Ext.callback(A,this)
},this);
D.anim=B;
return B
}};
Ext.Fx.resize=Ext.Fx.scale;
Ext.apply(Ext.Element.prototype,Ext.Fx);
Ext.CompositeElement=function(A){this.elements=[];
this.addElements(A)
};
Ext.CompositeElement.prototype={isComposite:true,addElements:function(E){if(!E){return this
}if(typeof E=="string"){E=Ext.Element.selectorFunction(E)
}var D=this.elements;
var C=D.length-1;
for(var B=0,A=E.length;
B<A;
B++){D[++C]=Ext.get(E[B],true)
}return this
},invoke:function(E,B){var A=this.elements;
for(var D=0,C=A.length;
D<C;
D++){Ext.Element.prototype[E].apply(A[D],B)
}return this
},add:function(A){if(typeof A=="string"){this.addElements(Ext.Element.selectorFunction(A))
}else{if(A.length!==undefined){this.addElements(A)
}else{this.addElements([A])
}}return this
},each:function(D,B){var E=this.elements;
for(var C=0,A=E.length;
C<A;
C++){if(D.call(B||E[C],E[C],this,C)===false){break
}}return this
},item:function(A){return this.elements[A]
}};
(function(){Ext.CompositeElement.createCall=function(C,B){if(!C[B]){C[B]=function(){return this.invoke(B,arguments)
}
}};
for(var A in Ext.Element.prototype){if(typeof Ext.Element.prototype[A]=="function"){Ext.CompositeElement.createCall(Ext.CompositeElement.prototype,A)
}}})();
Ext.CompositeElementLite=function(B){Ext.CompositeElementLite.superclass.constructor.call(this,B);
var A=function(){};
A.prototype=Ext.Element.prototype;
this.el=new Ext.Element.Flyweight()
};
Ext.extend(Ext.CompositeElementLite,Ext.CompositeElement,{addElements:function(D){if(D){if(D instanceof Array){this.elements=this.elements.concat(D)
}else{var B=this.elements;
var E=B.length-1;
for(var C=0,A=D.length;
C<A;
C++){B[++E]=D[C]
}}}return this
},invoke:function(F,B){var D=this.elements;
var E=this.el;
for(var C=0,A=D.length;
C<A;
C++){E.dom=D[C];
Ext.Element.prototype[F].apply(E,B)
}return this
},item:function(A){this.el.dom=this.elements[A];
return this.el
},addListener:function(G,F,E,D){var C=this.elements;
for(var B=0,A=C.length;
B<A;
B++){Ext.EventManager.on(C[B],G,F,E||C[B],D)
}return this
},each:function(F,E){var C=this.elements;
var D=this.el;
for(var B=0,A=C.length;
B<A;
B++){D.dom=C[B];
if(F.call(E||D,D,this,B)===false){break
}}return this
}});
Ext.CompositeElementLite.prototype.on=Ext.CompositeElementLite.prototype.addListener;
if(Ext.DomQuery){Ext.Element.selectorFunction=Ext.DomQuery.select
}Ext.Element.select=function(B,A){var C;
if(typeof B=="string"){C=Ext.Element.selectorFunction(B)
}else{if(B.length!==undefined){C=B
}else{throw"Invalid selector"
}}if(A===true){return new Ext.CompositeElement(C)
}else{return new Ext.CompositeElementLite(C)
}};
Ext.select=Ext.Element.select;
Ext.UpdateManager=function(A,B){A=Ext.get(A);
if(!B&&A.updateManager){return A.updateManager
}this.el=A;
this.defaultUrl=null;
this.addEvents({beforeupdate:true,update:true,failure:true});
var C=Ext.UpdateManager.defaults;
this.sslBlankUrl=C.sslBlankUrl;
this.disableCaching=C.disableCaching;
this.indicatorText=C.indicatorText;
this.showLoadIndicator=C.showLoadIndicator;
this.timeout=C.timeout;
this.loadScripts=C.loadScripts;
this.transaction=null;
this.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);
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(G,F,E,D){if(this.fireEvent("beforeupdate",this.el,G,F)!==false){var C=this.method;
if(typeof G=="object"){var B=G;
G=B.url;
F=F||B.params;
E=E||B.callback;
D=D||B.discardUrl;
if(E&&B.scope){E=E.createDelegate(B.scope)
}if(typeof B.method!="undefined"){C=B.method
}if(typeof B.nocache!="undefined"){this.disableCaching=B.nocache
}if(typeof B.text!="undefined"){this.indicatorText='<div class="loading-indicator">'+B.text+"</div>"
}if(typeof B.scripts!="undefined"){this.loadScripts=B.scripts
}if(typeof B.timeout!="undefined"){this.timeout=B.timeout
}}this.showLoading();
if(!D){this.defaultUrl=G
}if(typeof G=="function"){G=G.call(this)
}if(typeof F=="function"){F=F()
}if(F&&typeof F!="string"){var I=[];
for(var H in F){if(typeof F[H]!="function"){I.push(encodeURIComponent(H),"=",encodeURIComponent(F[H]),"&")
}}delete I[I.length-1];
F=I.join("")
}var A={success:this.successDelegate,failure:this.failureDelegate,timeout:(this.timeout*1000),argument:{url:G,form:null,callback:E,params:F}};
C=C||(F?"POST":"GET");
if(C=="GET"){G=this.prepareUrl(G)
}this.transaction=Ext.lib.Ajax.request(C,G,A,F)
}},formUpdate:function(C,B,G,F){if(this.fireEvent("beforeupdate",this.el,C,B)!==false){formEl=Ext.getDom(C);
if(typeof B=="function"){B=B.call(this)
}if(typeof params=="function"){params=params()
}B=B||formEl.action;
var A={success:this.successDelegate,failure:this.failureDelegate,timeout:(this.timeout*1000),argument:{url:B,form:formEl,callback:F,reset:G}};
var E=false;
var D=formEl.getAttribute("enctype");
if(D&&D.toLowerCase()=="multipart/form-data"){E=true;
A.upload=this.successDelegate
}this.transaction=Ext.lib.Ajax.formRequest(formEl,B,A,null,E,this.sslBlankUrl);
this.showLoading.defer(1,this)
}},refresh:function(A){if(this.defaultUrl==null){return 
}this.update(this.defaultUrl,null,A,true)
},startAutoRefresh:function(E,D,C,B,A){if(A){this.update(D||this.defaultUrl,C,B,true)
}if(this.autoRefreshProcId){clearInterval(this.autoRefreshProcId)
}this.autoRefreshProcId=setInterval(this.update.createDelegate(this,[D||this.defaultUrl,C,B,true]),E*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(A){if(this.disableCaching){var B="_dc="+(new Date().getTime());
if(A.indexOf("?")!==-1){A+="&"+B
}else{A+="?"+B
}}return A
},processSuccess:function(A){this.transaction=null;
if(A.argument.form&&A.argument.reset){try{A.argument.form.reset()
}catch(B){}}if(this.loadScripts){this.renderer.render(this.el,A,this,this.updateComplete.createDelegate(this,[A]))
}else{this.renderer.render(this.el,A,this);
this.updateComplete(A)
}},updateComplete:function(A){this.fireEvent("update",this.el,A);
if(typeof A.argument.callback=="function"){A.argument.callback(this.el,true,A)
}},processFailure:function(A){this.transaction=null;
this.fireEvent("failure",this.el,A);
if(typeof A.argument.callback=="function"){A.argument.callback(this.el,false,A)
}},setRenderer:function(A){this.renderer=A
},getRenderer:function(){return this.renderer
},setDefaultUrl:function(A){this.defaultUrl=A
},abort:function(){if(this.transaction){Ext.lib.Ajax.abort(this.transaction)
}},isUpdating:function(){if(this.transaction){return Ext.lib.Ajax.isCallInProgress(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(C,B,E,D){var A=Ext.get(C,true).getUpdateManager();
Ext.apply(A,D);
A.update(B,E,D?D.callback:null)
};
Ext.UpdateManager.update=Ext.UpdateManager.updateElement;
Ext.UpdateManager.BasicRenderer=function(){};
Ext.UpdateManager.BasicRenderer.prototype={render:function(D,C,B,A){D.update(C.responseText,B.loadScripts,A)
}};
Date.parseFunctions={count:0};
Date.parseRegexes=[];
Date.formatFunctions={count:0};
Date.prototype.dateFormat=function(B){if(Date.formatFunctions[B]==null){Date.createNewFormat(B)
}var A=Date.formatFunctions[B];
return this[A]()
};
Date.prototype.format=Date.prototype.dateFormat;
Date.createNewFormat=function(_3){var _4="format"+Date.formatFunctions.count++;
Date.formatFunctions[_3]=_4;
var _5="Date.prototype."+_4+" = function(){return ";
var _6=false;
var ch="";
for(var i=0;
i<_3.length;
++i){ch=_3.charAt(i);
if(!_6&&ch=="\\"){_6=true
}else{if(_6){_6=false;
_5+="'"+String.escape(ch)+"' + "
}else{_5+=Date.getFormatCode(ch)
}}}eval(_5.substring(0,_5.length-3)+";}")
};
Date.getFormatCode=function(A){switch(A){case"d":return"String.leftPad(this.getDate(), 2, '0') + ";
case"D":return"Date.dayNames[this.getDay()].substring(0, 3) + ";
case"j":return"this.getDate() + ";
case"l":return"Date.dayNames[this.getDay()] + ";
case"S":return"this.getSuffix() + ";
case"w":return"this.getDay() + ";
case"z":return"this.getDayOfYear() + ";
case"W":return"this.getWeekOfYear() + ";
case"F":return"Date.monthNames[this.getMonth()] + ";
case"m":return"String.leftPad(this.getMonth() + 1, 2, '0') + ";
case"M":return"Date.monthNames[this.getMonth()].substring(0, 3) + ";
case"n":return"(this.getMonth() + 1) + ";
case"t":return"this.getDaysInMonth() + ";
case"L":return"(this.isLeapYear() ? 1 : 0) + ";
case"Y":return"this.getFullYear() + ";
case"y":return"('' + this.getFullYear()).substring(2, 4) + ";
case"a":return"(this.getHours() < 12 ? 'am' : 'pm') + ";
case"A":return"(this.getHours() < 12 ? 'AM' : 'PM') + ";
case"g":return"((this.getHours() %12) ? this.getHours() % 12 : 12) + ";
case"G":return"this.getHours() + ";
case"h":return"String.leftPad((this.getHours() %12) ? this.getHours() % 12 : 12, 2, '0') + ";
case"H":return"String.leftPad(this.getHours(), 2, '0') + ";
case"i":return"String.leftPad(this.getMinutes(), 2, '0') + ";
case"s":return"String.leftPad(this.getSeconds(), 2, '0') + ";
case"O":return"this.getGMTOffset() + ";
case"T":return"this.getTimezone() + ";
case"Z":return"(this.getTimezoneOffset() * -60) + ";
default:return"'"+String.escape(A)+"' + "
}};
Date.parseDate=function(C,B){if(Date.parseFunctions[B]==null){Date.createParser(B)
}var A=Date.parseFunctions[B];
return Date[A](C)
};
Date.createParser=function(_d){var _e="parse"+Date.parseFunctions.count++;
var _f=Date.parseRegexes.length;
var _10=1;
Date.parseFunctions[_d]=_e;
var _11="Date."+_e+" = function(input){\nvar y = -1, m = -1, d = -1, h = -1, i = -1, s = -1;\nvar d = new Date();\ny = d.getFullYear();\nm = d.getMonth();\nd = d.getDate();\nvar results = input.match(Date.parseRegexes["+_f+"]);\nif (results && results.length > 0) {";
var _12="";
var _13=false;
var ch="";
for(var i=0;
i<_d.length;
++i){ch=_d.charAt(i);
if(!_13&&ch=="\\"){_13=true
}else{if(_13){_13=false;
_12+=String.escape(ch)
}else{var obj=Date.formatCodeToRegex(ch,_10);
_10+=obj.g;
_12+=obj.s;
if(obj.g&&obj.c){_11+=obj.c
}}}}_11+="if (y > 0 && m >= 0 && d > 0 && h >= 0 && i >= 0 && s >= 0)\n{return new Date(y, m, d, h, i, s);}\nelse if (y > 0 && m >= 0 && d > 0 && h >= 0 && i >= 0)\n{return new Date(y, m, d, h, i);}\nelse if (y > 0 && m >= 0 && d > 0 && h >= 0)\n{return new Date(y, m, d, h);}\nelse if (y > 0 && m >= 0 && d > 0)\n{return new Date(y, m, d);}\nelse if (y > 0 && m >= 0)\n{return new Date(y, m);}\nelse if (y > 0)\n{return new Date(y);}\n}return null;}";
Date.parseRegexes[_f]=new RegExp("^"+_12+"$");
eval(_11)
};
Date.formatCodeToRegex=function(B,A){switch(B){case"D":return{g:0,c:null,s:"(?:Sun|Mon|Tue|Wed|Thu|Fri|Sat)"};
case"j":case"d":return{g:1,c:"d = parseInt(results["+A+"], 10);\n",s:"(\\d{1,2})"};
case"l":return{g:0,c:null,s:"(?:"+Date.dayNames.join("|")+")"};
case"S":return{g:0,c:null,s:"(?:st|nd|rd|th)"};
case"w":return{g:0,c:null,s:"\\d"};
case"z":return{g:0,c:null,s:"(?:\\d{1,3})"};
case"W":return{g:0,c:null,s:"(?:\\d{2})"};
case"F":return{g:1,c:"m = parseInt(Date.monthNumbers[results["+A+"].substring(0, 3)], 10);\n",s:"("+Date.monthNames.join("|")+")"};
case"M":return{g:1,c:"m = parseInt(Date.monthNumbers[results["+A+"]], 10);\n",s:"(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)"};
case"n":case"m":return{g:1,c:"m = parseInt(results["+A+"], 10) - 1;\n",s:"(\\d{1,2})"};
case"t":return{g:0,c:null,s:"\\d{1,2}"};
case"L":return{g:0,c:null,s:"(?:1|0)"};
case"Y":return{g:1,c:"y = parseInt(results["+A+"], 10);\n",s:"(\\d{4})"};
case"y":return{g:1,c:"var ty = parseInt(results["+A+"], 10);\ny = ty > Date.y2kYear ? 1900 + ty : 2000 + ty;\n",s:"(\\d{1,2})"};
case"a":return{g:1,c:"if (results["+A+"] == 'am') {\nif (h == 12) { h = 0; }\n} else { if (h < 12) { h += 12; }}",s:"(am|pm)"};
case"A":return{g:1,c:"if (results["+A+"] == 'AM') {\nif (h == 12) { h = 0; }\n} else { if (h < 12) { h += 12; }}",s:"(AM|PM)"};
case"g":case"G":case"h":case"H":return{g:1,c:"h = parseInt(results["+A+"], 10);\n",s:"(\\d{1,2})"};
case"i":return{g:1,c:"i = parseInt(results["+A+"], 10);\n",s:"(\\d{2})"};
case"s":return{g:1,c:"s = parseInt(results["+A+"], 10);\n",s:"(\\d{2})"};
case"O":return{g:0,c:null,s:"[+-]\\d{4}"};
case"T":return{g:0,c:null,s:"[A-Z]{3}"};
case"Z":return{g:0,c:null,s:"[+-]\\d{1,5}"};
default:return{g:0,c:null,s:String.escape(B)}
}};
Date.prototype.getTimezone=function(){return this.toString().replace(/^.*? ([A-Z]{3}) [0-9]{4}.*$/,"$1").replace(/^.*?\(([A-Z])[a-z]+ ([A-Z])[a-z]+ ([A-Z])[a-z]+\)$/,"$1$2$3")
};
Date.prototype.getGMTOffset=function(){return(this.getTimezoneOffset()>0?"-":"+")+String.leftPad(Math.floor(this.getTimezoneOffset()/60),2,"0")+String.leftPad(this.getTimezoneOffset()%60,2,"0")
};
Date.prototype.getDayOfYear=function(){var A=0;
Date.daysInMonth[1]=this.isLeapYear()?29:28;
for(var B=0;
B<this.getMonth();
++B){A+=Date.daysInMonth[B]
}return A+this.getDate()-1
};
Date.prototype.getWeekOfYear=function(){var C=this.getDayOfYear()+(4-this.getDay());
var B=new Date(this.getFullYear(),0,1);
var A=(7-B.getDay()+4);
return String.leftPad(((C-A)/7)+1,2,"0")
};
Date.prototype.isLeapYear=function(){var A=this.getFullYear();
return((A&3)==0&&(A%100||(A%400==0&&A)))
};
Date.prototype.getFirstDayOfMonth=function(){var A=(this.getDay()-(this.getDate()-1))%7;
return(A<0)?(A+7):A
};
Date.prototype.getLastDayOfMonth=function(){var A=(this.getDay()+(Date.daysInMonth[this.getMonth()]-this.getDate()))%7;
return(A<0)?(A+7):A
};
Date.prototype.getFirstDateOfMonth=function(){return new Date(this.getFullYear(),this.getMonth(),1)
};
Date.prototype.getLastDateOfMonth=function(){return new Date(this.getFullYear(),this.getMonth(),this.getDaysInMonth())
};
Date.prototype.getDaysInMonth=function(){Date.daysInMonth[1]=this.isLeapYear()?29:28;
return Date.daysInMonth[this.getMonth()]
};
Date.prototype.getSuffix=function(){switch(this.getDate()){case 1:case 21:case 31:return"st";
case 2:case 22:return"nd";
case 3:case 23:return"rd";
default:return"th"
}};
Date.daysInMonth=[31,28,31,30,31,30,31,31,30,31,30,31];
Date.monthNames=["January","February","March","April","May","June","July","August","September","October","November","December"];
Date.dayNames=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"];
Date.y2kYear=50;
Date.monthNumbers={Jan:0,Feb:1,Mar:2,Apr:3,May:4,Jun:5,Jul:6,Aug:7,Sep:8,Oct:9,Nov:10,Dec:11};
Date.prototype.clone=function(){return new Date(this.getTime())
};
Date.prototype.clearTime=function(A){if(A){return this.clone().clearTime()
}this.setHours(0);
this.setMinutes(0);
this.setSeconds(0);
this.setMilliseconds(0);
return this
};
if(Ext.isSafari){Date.brokenSetMonth=Date.prototype.setMonth;
Date.prototype.setMonth=function(A){if(A<=-1){var D=Math.ceil(-A);
var C=Math.ceil(D/12);
var B=(D%12)?12-D%12:0;
this.setFullYear(this.getFullYear()-C);
return Date.brokenSetMonth.call(this,B)
}else{return Date.brokenSetMonth.apply(this,arguments)
}}
}Date.MILLI="ms";
Date.SECOND="s";
Date.MINUTE="mi";
Date.HOUR="h";
Date.DAY="d";
Date.MONTH="mo";
Date.YEAR="y";
Date.prototype.add=function(C,B){var D=this.clone();
if(!C||B===0){return D
}switch(C.toLowerCase()){case Date.MILLI:D.setMilliseconds(this.getMilliseconds()+B);
break;
case Date.SECOND:D.setSeconds(this.getSeconds()+B);
break;
case Date.MINUTE:D.setMinutes(this.getMinutes()+B);
break;
case Date.HOUR:D.setHours(this.getHours()+B);
break;
case Date.DAY:D.setDate(this.getDate()+B);
break;
case Date.MONTH:var A=this.getDate();
if(A>28){A=Math.min(A,this.getFirstDateOfMonth().add("mo",B).getLastDateOfMonth().getDate())
}D.setDate(A);
D.setMonth(this.getMonth()+B);
break;
case Date.YEAR:D.setFullYear(this.getFullYear()+B);
break
}return D
};
Ext.util.DelayedTask=function(C,E,D){var G=null,F,B;
var A=function(){var H=new Date().getTime();
if(H-B>=F){clearInterval(G);
G=null;
C.apply(E,D||[])
}};
this.delay=function(H,K,J,I){if(G&&H!=F){this.cancel()
}F=H;
B=new Date().getTime();
C=K||C;
E=J||E;
D=I||D;
if(!G){G=setInterval(A,F)
}};
this.cancel=function(){if(G){clearInterval(G);
G=null
}}
};
Ext.util.TaskRunner=function(I){I=I||10;
var H=[],G=[];
var A=0;
var F=false;
var E=function(){F=false;
clearInterval(A);
A=0
};
var D=function(){if(!F){F=true;
A=setInterval(C,I)
}};
var B=function(J){G.push(J);
if(J.onStop){J.onStop()
}};
var C=function(){if(G.length>0){for(var N=0,L=G.length;
N<L;
N++){H.remove(G[N])
}G=[];
if(H.length<1){E();
return 
}}var K=new Date().getTime();
for(var N=0,L=H.length;
N<L;
++N){var M=H[N];
var O=K-M.taskRunTime;
if(M.interval<=O){var J=M.run.apply(M.scope||M,M.args||[++M.taskRunCount]);
M.taskRunTime=K;
if(J===false||M.taskRunCount===M.repeat){B(M);
return 
}}if(M.duration&&M.duration<=(K-M.taskStartTime)){B(M)
}}};
this.start=function(J){H.push(J);
J.taskStartTime=new Date().getTime();
J.taskRunTime=0;
J.taskRunCount=0;
D();
return J
};
this.stop=function(J){B(J);
return J
};
this.stopAll=function(){E();
for(var K=0,J=H.length;
K<J;
K++){if(H[K].onStop){H[K].onStop()
}}H=[];
G=[]
}
};
Ext.TaskMgr=new Ext.util.TaskRunner();
Ext.util.MixedCollection=function(B,A){this.items=[];
this.map={};
this.keys=[];
this.length=0;
this.addEvents({clear:true,add:true,replace:true,remove:true,sort:true});
this.allowFunctions=B===true;
if(A){this.getKey=A
}Ext.util.MixedCollection.superclass.constructor.call(this)
};
Ext.extend(Ext.util.MixedCollection,Ext.util.Observable,{allowFunctions:false,add:function(B,C){if(arguments.length==1){C=arguments[0];
B=this.getKey(C)
}if(typeof B=="undefined"||B===null){this.length++;
this.items.push(C);
this.keys.push(null)
}else{var A=this.map[B];
if(A){return this.replace(B,C)
}this.length++;
this.items.push(C);
this.map[B]=C;
this.keys.push(B)
}this.fireEvent("add",this.length-1,C,B);
return C
},getKey:function(A){return A.id
},replace:function(B,D){if(arguments.length==1){D=arguments[0];
B=this.getKey(D)
}var A=this.item(B);
if(typeof B=="undefined"||B===null||typeof A=="undefined"){return this.add(B,D)
}var C=this.indexOfKey(B);
this.items[C]=D;
this.map[B]=D;
this.fireEvent("replace",B,A,D);
return D
},addAll:function(C){if(arguments.length>1||C instanceof Array){var B=arguments.length>1?arguments:C;
for(var D=0,A=B.length;
D<A;
D++){this.add(B[D])
}}else{for(var E in C){if(this.allowFunctions||typeof C[E]!="function"){this.add(C[E],E)
}}}},each:function(C,E){var D=[].concat(this.items);
for(var B=0,A=D.length;
B<A;
B++){if(C.call(E||D[B],D[B],B,A)===false){break
}}},eachKey:function(D,C){for(var B=0,A=this.keys.length;
B<A;
B++){D.call(C||window,this.keys[B],this.items[B],B,A)
}},find:function(D,C){for(var B=0,A=this.items.length;
B<A;
B++){if(D.call(C||window,this.items[B],this.keys[B])){return this.items[B]
}}return null
},insert:function(A,B,C){if(arguments.length==2){C=arguments[1];
B=this.getKey(C)
}if(A>=this.length){return this.add(B,C)
}this.length++;
this.items.splice(A,0,C);
if(typeof B!="undefined"&&B!=null){this.map[B]=C
}this.keys.splice(A,0,B);
this.fireEvent("add",A,C,B);
return C
},remove:function(A){return this.removeAt(this.indexOf(A))
},removeAt:function(A){if(A<this.length&&A>=0){this.length--;
var C=this.items[A];
this.items.splice(A,1);
var B=this.keys[A];
if(typeof B!="undefined"){delete this.map[B]
}this.keys.splice(A,1);
this.fireEvent("remove",C,B)
}},removeKey:function(A){return this.removeAt(this.indexOfKey(A))
},getCount:function(){return this.length
},indexOf:function(C){if(!this.items.indexOf){for(var B=0,A=this.items.length;
B<A;
B++){if(this.items[B]==C){return B
}}return -1
}else{return this.items.indexOf(C)
}},indexOfKey:function(C){if(!this.keys.indexOf){for(var B=0,A=this.keys.length;
B<A;
B++){if(this.keys[B]==C){return B
}}return -1
}else{return this.keys.indexOf(C)
}},item:function(A){var B=typeof this.map[A]!="undefined"?this.map[A]:this.items[A];
return typeof B!="function"||this.allowFunctions?B:null
},itemAt:function(A){return this.items[A]
},key:function(A){return this.map[A]
},contains:function(A){return this.indexOf(A)!=-1
},containsKey:function(A){return typeof this.map[A]!="undefined"
},clear:function(){this.length=0;
this.items=[];
this.keys=[];
this.map={};
this.fireEvent("clear")
},first:function(){return this.items[0]
},last:function(){return this.items[this.length-1]
},_sort:function(I,A,H){var C=String(A).toUpperCase()=="DESC"?-1:1;
H=H||function(K,J){return K-J
};
var G=[],B=this.keys,D=this.items;
for(var E=0,F=D.length;
E<F;
E++){G[G.length]={key:B[E],value:D[E],index:E}
}G.sort(function(K,J){var L=H(K[I],J[I])*C;
if(L==0){L=(K.index<J.index?-1:1)
}return L
});
for(var E=0,F=G.length;
E<F;
E++){D[E]=G[E].value;
B[E]=G[E].key
}this.fireEvent("sort",this)
},sort:function(A,B){this._sort("value",A,B)
},keySort:function(A,B){this._sort("key",A,B||function(D,C){return String(D).toUpperCase()-String(C).toUpperCase()
})
},getRange:function(A,B){var E=this.items;
if(E.length<1){return[]
}A=A||0;
B=Math.min(typeof B=="undefined"?this.length-1:B,this.length-1);
var D=[];
if(A<=B){for(var C=A;
C<=B;
C++){D[D.length]=E[C]
}}else{for(var C=A;
C>=B;
C--){D[D.length]=E[C]
}}return D
},filter:function(A,B){if(!B.exec){B=String(B);
if(B.length==0){return this.clone()
}B=new RegExp("^"+Ext.escapeRe(B),"i")
}return this.filterBy(function(C){return C&&B.test(C[A])
})
},filterBy:function(E,G){var F=new Ext.util.MixedCollection();
F.getKey=this.getKey;
var B=this.keys,D=this.items;
for(var C=0,A=D.length;
C<A;
C++){if(E.call(G||this,D[C],B[C])){F.add(B[C],D[C])
}}return F
},clone:function(){var E=new Ext.util.MixedCollection();
var B=this.keys,D=this.items;
for(var C=0,A=D.length;
C<A;
C++){E.add(B[C],D[C])
}E.getKey=this.getKey;
return E
}});
Ext.util.MixedCollection.prototype.get=Ext.util.MixedCollection.prototype.item;
Ext.util.JSON=new (function(){var _1={}.hasOwnProperty?true:false;
var _2=function(n){return n<10?"0"+n:n
};
var m={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"};
var _5=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 _a=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 _11=function(o){return'"'+o.getFullYear()+"-"+_2(o.getMonth()+1)+"-"+_2(o.getDate())+"T"+_2(o.getHours())+":"+_2(o.getMinutes())+":"+_2(o.getSeconds())+'"'
};
this.encode=function(o){if(typeof o=="undefined"||o===null){return"null"
}else{if(o instanceof Array){return _a(o)
}else{if(o instanceof Date){return _11(o)
}else{if(typeof o=="string"){return _5(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(!_1||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(_18){return eval("("+_18+")")
}
})();
Ext.encode=Ext.util.JSON.encode;
Ext.decode=Ext.util.JSON.decode;
Ext.util.Format=function(){var _1=/^\s+|\s+$/g;
return{ellipsis:function(_2,_3){if(_2&&_2.length>_3){return _2.substr(0,_3-3)+"..."
}return _2
},undef:function(_4){return typeof _4!="undefined"?_4:""
},htmlEncode:function(_5){return !_5?_5:String(_5).replace(/&/g,"&amp;").replace(/>/g,"&gt;").replace(/</g,"&lt;").replace(/"/g,"&quot;")
},trim:function(_6){return String(_6).replace(_1,"")
},substr:function(_7,_8,_9){return String(_7).substr(_8,_9)
},lowercase:function(_a){return String(_a).toLowerCase()
},uppercase:function(_b){return String(_b).toUpperCase()
},capitalize:function(_c){return !_c?_c:_c.charAt(0).toUpperCase()+_c.substr(1).toLowerCase()
},call:function(_d,fn){if(arguments.length>2){var _f=Array.prototype.slice.call(arguments,2);
_f.unshift(_d);
return eval(fn).apply(window,_f)
}else{return eval(fn).call(window,_d)
}},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);
return"$"+v
},date:function(v,_12){if(!v){return""
}if(!(v instanceof Date)){v=new Date(Date.parse(v))
}return v.dateFormat(_12||"m/d/Y")
},dateRenderer:function(_13){return function(v){return Ext.util.Format.date(v,_13)
}
},stripTagsRE:/<\/?[^>]+>/gi,stripTags:function(v){return !v?v:String(v).replace(this.stripTagsRE,"")
}}
}();
Ext.util.CSS=function(){var D=null;
var C=document;
var B=/(-[a-z])/gi;
var A=function(E,F){return F.charAt(1).toUpperCase()
};
return{createStyleSheet:function(F){var H;
if(Ext.isIE){H=C.createStyleSheet();
H.cssText=F
}else{var E=C.getElementsByTagName("head")[0];
var G=C.createElement("style");
G.setAttribute("type","text/css");
try{G.appendChild(C.createTextNode(F))
}catch(I){G.cssText=F
}E.appendChild(G);
H=G.styleSheet?G.styleSheet:(G.sheet||C.styleSheets[C.styleSheets.length-1])
}this.cacheStyleSheet(H);
return H
},removeStyleSheet:function(F){var E=C.getElementById(F);
if(E){E.parentNode.removeChild(E)
}},swapStyleSheet:function(G,E){this.removeStyleSheet(G);
var F=C.createElement("link");
F.setAttribute("rel","stylesheet");
F.setAttribute("type","text/css");
F.setAttribute("id",G);
F.setAttribute("href",E);
C.getElementsByTagName("head")[0].appendChild(F)
},refreshCache:function(){return this.getRules(true)
},cacheStyleSheet:function(F){if(!D){D={}
}try{var H=F.cssRules||F.rules;
for(var E=H.length-1;
E>=0;
--E){D[H[E].selectorText]=H[E]
}}catch(G){}},getRules:function(H){if(D==null||H){D={};
var G=C.styleSheets;
for(var F=0,E=G.length;
F<E;
F++){try{this.cacheStyleSheet(G[F])
}catch(I){}}}return D
},getRule:function(G,F){var E=this.getRules(F);
if(!(G instanceof Array)){return E[G]
}for(var H=0;
H<G.length;
H++){if(E[G[H]]){return E[G[H]]
}}return null
},updateRule:function(I,G,F){if(!(I instanceof Array)){var E=this.getRule(I);
if(E){E.style[G.replace(B,A)]=F;
return true
}}else{for(var H=0;
H<I.length;
H++){if(this.updateRule(I[H],G,F)){return true
}}}return false
}}
}();
Ext.util.ClickRepeater=function(A,B){this.el=Ext.get(A);
this.el.unselectable();
Ext.apply(this,B);
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(C){if(this.preventDefault){C.preventDefault()
}if(this.stopDefault){C.stopEvent()
}},this)
}if(this.handler){this.on("click",this.handler,this.scope||this)
}Ext.util.ClickRepeater.superclass.constructor.call(this)
};
Ext.extend(Ext.util.ClickRepeater,Ext.util.Observable,{interval:20,delay:250,preventDefault:true,stopDefault:false,timer:0,docEl:Ext.get(document),handleMouseDown:function(){clearTimeout(this.timer);
this.el.blur();
if(this.pressClass){this.el.addClass(this.pressClass)
}this.mousedownTime=new Date();
this.docEl.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 A=this.mousedownTime.getElapsed();
if(A<500){return 400
}else{if(A<1700){return 320
}else{if(A<2600){return 250
}else{if(A<3500){return 180
}else{if(A<4400){return 140
}else{if(A<5300){return 80
}else{if(A<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);
this.docEl.un("mouseup",this.handleMouseUp);
this.el.removeClass(this.pressClass);
this.fireEvent("mouseup",this)
}});
Ext.KeyNav=function(A,B){this.el=Ext.get(A);
Ext.apply(this,B);
if(!this.disabled){this.disabled=true;
this.enable()
}};
Ext.KeyNav.prototype={disabled:false,defaultEventAction:"stopEvent",prepareEvent:function(C){var A=C.getKey();
var B=this.keyToHandler[A];
if(Ext.isSafari&&B&&A>=37&&A<=40){C.stopEvent()
}},relay:function(C){var A=C.getKey();
var B=this.keyToHandler[A];
if(B&&this[B]){if(this.doRelay(C,this[B],B)!==true){C[this.defaultEventAction]()
}}},doRelay:function(C,B,A){return B.call(this.scope||this,C)
},enter:false,left:false,right:false,up:false,down:false,tab:false,esc:false,pageUp:false,pageDown:false,del:false,home:false,end:false,keyToHandler:{37:"left",39:"right",38:"up",40:"down",33:"pageUp",34:"pageDown",46:"del",36:"home",35:"end",13:"enter",27:"esc",9:"tab"},enable:function(){if(this.disabled){if(Ext.isIE){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(Ext.isIE){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(C,E,D){this.el=Ext.get(C);
this.eventName=D||"keydown";
this.bindings=[];
if(E instanceof Array){for(var B=0,A=E.length;
B<A;
B++){this.addBinding(E[B])
}}else{this.addBinding(E)
}this.keyDownDelegate=Ext.EventManager.wrap(this.handleKeyDown,this,true);
this.enable()
};
Ext.KeyMap.prototype={stopEvent:false,addBinding:function(I){var H=I.key,E=I.shift,D=I.ctrl,L=I.alt,K=I.fn,J=I.scope;
if(typeof H=="string"){var M=[];
var G=H.toUpperCase();
for(var A=0,F=G.length;
A<F;
A++){M.push(G.charCodeAt(A))
}H=M
}var C=H instanceof Array;
var B=function(Q){if((!E||Q.shiftKey)&&(!D||Q.ctrlKey)&&(!L||Q.altKey)){var O=Q.getKey();
if(C){for(var P=0,N=H.length;
P<N;
P++){if(H[P]==O){if(this.stopEvent){Q.stopEvent()
}K.call(J||window,O,Q);
return 
}}}else{if(O==H){if(this.stopEvent){Q.stopEvent()
}K.call(J||window,O,Q)
}}}};
this.bindings.push(B)
},handleKeyDown:function(D){if(this.enabled){var B=this.bindings;
for(var C=0,A=B.length;
C<A;
C++){B[C].call(this,D)
}}},isEnabled:function(){return this.enabled
},enable:function(){if(!this.enabled){this.el.on(this.eventName,this.keyDownDelegate);
this.enabled=true
}},disable:function(){if(this.enabled){this.el.removeListener(this.eventName,this.keyDownDelegate);
this.enabled=false
}}};
Ext.util.TextMetrics=function(){var A;
return{measure:function(C,D,B){if(!A){A=Ext.util.TextMetrics.Instance(C,B)
}A.bind(C);
A.setFixedWidth(B||"auto");
return A.getSize(D)
},createInstance:function(C,B){return Ext.util.TextMetrics.Instance(C,B)
}}
}();
Ext.util.TextMetrics.Instance=function(B,A){var D=new Ext.Element(document.createElement("div"));
document.body.appendChild(D.dom);
D.position("absolute");
D.setLeftTop(-1000,-1000);
D.hide();
if(A){mi.setWidth(A)
}var C={getSize:function(E){D.update(E);
var F=D.getSize();
D.update("");
return F
},bind:function(E){D.setStyle(Ext.fly(E).getStyles("font-size","font-style","font-weight","font-family","line-height"))
},setFixedWidth:function(E){D.setWidth(E)
},getWidth:function(E){D.dom.style.width="auto";
return this.getSize(E).width
},getHeight:function(E){return this.getSize(E).height
}};
C.bind(B);
return C
};
Ext.Element.measureText=Ext.util.TextMetrics.measure;
Ext.state.Provider=function(){Ext.state.Provider.superclass.constructor.call(this);
this.addEvents({statechange:true});
this.state={};
Ext.state.Provider.superclass.constructor.call(this)
};
Ext.extend(Ext.state.Provider,Ext.util.Observable,{get:function(B,A){return typeof this.state[B]=="undefined"?A:this.state[B]
},clear:function(A){delete this.state[A];
this.fireEvent("statechange",this,A,null)
},set:function(B,A){this.state[B]=A;
this.fireEvent("statechange",this,B,A)
},decodeValue:function(E){var J=/^(a|n|d|b|s|o)\:(.*)$/;
var C=J.exec(unescape(E));
if(!C||!C[1]){return 
}var B=C[1];
var I=C[2];
switch(B){case"n":return parseFloat(I);
case"d":return new Date(Date.parse(I));
case"b":return(I=="1");
case"a":var H=[];
var G=I.split("^");
for(var A=0,D=G.length;
A<D;
A++){H.push(this.decodeValue(G[A]))
}return H;
case"o":var H={};
var G=I.split("^");
for(var A=0,D=G.length;
A<D;
A++){var F=G[A].split("=");
H[F[0]]=this.decodeValue(F[1])
}return H;
default:return I
}},encodeValue:function(C){var B;
if(typeof C=="number"){B="n:"+C
}else{if(typeof C=="boolean"){B="b:"+(C?"1":"0")
}else{if(C instanceof Date){B="d:"+C.toGMTString()
}else{if(C instanceof Array){var F="";
for(var E=0,A=C.length;
E<A;
E++){F+=this.encodeValue(C[E]);
if(E!=A-1){F+="^"
}}B="a:"+F
}else{if(typeof C=="object"){var F="";
for(var D in C){if(typeof C[D]!="function"){F+=D+"="+this.encodeValue(C[D])+"^"
}}B="o:"+F.substring(0,F.length-1)
}else{B="s:"+C
}}}}}return escape(B)
}});
Ext.state.Manager=function(){var A=new Ext.state.Provider();
return{setProvider:function(B){A=B
},get:function(C,B){return A.get(C,B)
},set:function(C,B){A.set(C,B)
},clear:function(B){A.clear(B)
},getProvider:function(){return A
}}
}();
Ext.state.CookieProvider=function(A){Ext.state.CookieProvider.superclass.constructor.call(this);
this.path="/";
this.expires=new Date(new Date().getTime()+(1000*60*60*24*7));
this.domain=null;
this.secure=false;
Ext.apply(this,A);
this.state=this.readCookies()
};
Ext.extend(Ext.state.CookieProvider,Ext.state.Provider,{set:function(B,A){if(typeof A=="undefined"||A===null){this.clear(B);
return 
}this.setCookie(B,A);
Ext.state.CookieProvider.superclass.set.call(this,B,A)
},clear:function(A){this.clearCookie(A);
Ext.state.CookieProvider.superclass.clear.call(this,A)
},readCookies:function(){var A={};
var F=document.cookie+";";
var B=/\s?(.*?)=(.*?);/g;
var E;
while((E=B.exec(F))!=null){var D=E[1];
var C=E[2];
if(D&&D.substring(0,3)=="ys-"){A[D.substr(3)]=this.decodeValue(C)
}}return A
},setCookie:function(B,A){document.cookie="ys-"+B+"="+this.encodeValue(A)+((this.expires==null)?"":("; expires="+this.expires.toGMTString()))+((this.path==null)?"":("; path="+this.path))+((this.domain==null)?"":("; domain="+this.domain))+((this.secure==true)?"; secure":"")
},clearCookie:function(A){document.cookie="ys-"+A+"=null; expires=Thu, 01-Jan-70 00:00:01 GMT"+((this.path==null)?"":("; path="+this.path))+((this.domain==null)?"":("; domain="+this.domain))+((this.secure==true)?"; secure":"")
}});
(function(){var B=Ext.EventManager;
var A=Ext.lib.Dom;
Ext.dd.DragDrop=function(E,D,C){if(E){this.init(E,D,C)
}};
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(C,D){},startDrag:function(C,D){},b4Drag:function(C){},onDrag:function(C){},onDragEnter:function(C,D){},b4DragOver:function(C){},onDragOver:function(C,D){},b4DragOut:function(C){},onDragOut:function(C,D){},b4DragDrop:function(C){},onDragDrop:function(C,D){},onInvalidDrop:function(C){},b4EndDrag:function(C){},endDrag:function(C){},b4MouseDown:function(C){},onMouseDown:function(C){},onMouseUp:function(C){},onAvailable:function(){},defaultPadding:{left:0,right:0,top:0,bottom:0},constrainTo:function(G,F,D){if(typeof F=="number"){F={left:F,right:F,top:F,bottom:F}
}F=F||this.defaultPadding;
var I=Ext.get(this.getEl()).getBox();
var C=Ext.get(G);
var L=C.getScroll();
var H,E=C.dom;
if(E==document.body){H={x:L.left,y:L.top,width:Ext.lib.Dom.getViewWidth(),height:Ext.lib.Dom.getViewHeight()}
}else{xy=C.getXY();
H={x:xy[0]+L.left,y:xy[1]+L.top,width:E.clientWidth,height:E.clientHeight}
}var K=I.y-H.y;
var J=I.x-H.x;
this.resetConstraints();
this.setXConstraint(J-(F.left||0),H.width-J-I.width-(F.right||0));
this.setYConstraint(K-(F.top||0),H.height-K-I.height-(F.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(E,D,C){this.initTarget(E,D,C);
B.on(this.id,"mousedown",this.handleMouseDown,this)
},initTarget:function(E,D,C){this.config=C||{};
this.DDM=Ext.dd.DDM;
this.groups={};
if(typeof E!=="string"){E=Ext.id(E)
}this.id=E;
this.addToGroup((D)?D:"default");
this.handleElId=E;
this.setDragElId(E);
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(F,E,C,D){if(!E&&0!==E){this.padding=[F,F,F,F]
}else{if(!C&&0!==C){this.padding=[F,E,F,E]
}else{this.padding=[F,E,C,D]
}}},setInitPosition:function(F,D){var G=this.getEl();
if(!this.DDM.verifyEl(G)){return 
}var E=F||0;
var C=D||0;
var H=A.getXY(G);
this.initPageX=H[0]-E;
this.initPageY=H[1]-C;
this.lastPageX=H[0];
this.lastPageY=H[1];
this.setStartPosition(H)
},setStartPosition:function(D){var C=D||A.getXY(this.getEl());
this.deltaSetXY=null;
this.startPageX=C[0];
this.startPageY=C[1]
},addToGroup:function(C){this.groups[C]=true;
this.DDM.regDragDrop(this,C)
},removeFromGroup:function(C){if(this.groups[C]){delete this.groups[C]
}this.DDM.removeDDFromGroup(this,C)
},setDragElId:function(C){this.dragElId=C
},setHandleElId:function(C){if(typeof C!=="string"){C=Ext.id(C)
}this.handleElId=C;
this.DDM.regHandle(this.id,C)
},setOuterHandleElId:function(C){if(typeof C!=="string"){C=Ext.id(C)
}B.on(C,"mousedown",this.handleMouseDown,this);
this.setHandleElId(C);
this.hasOuterHandles=true
},unreg:function(){B.un(this.id,"mousedown",this.handleMouseDown);
this._domRef=null;
this.DDM._remove(this)
},isLocked:function(){return(this.DDM.isLocked()||this.locked)
},handleMouseDown:function(E,D){if(this.primaryButtonOnly&&E.button!=0){return 
}if(this.isLocked()){return 
}this.DDM.refreshCache(this.groups);
var C=new Ext.lib.Point(Ext.lib.Event.getPageX(E),Ext.lib.Event.getPageY(E));
if(!this.hasOuterHandles&&!this.DDM.isOverTarget(C,this)){}else{if(this.clickValidator(E)){this.setStartPosition();
this.b4MouseDown(E);
this.onMouseDown(E);
this.DDM.handleMouseDown(E,this);
this.DDM.stopEvent(E)
}else{}}},clickValidator:function(D){var C=Ext.lib.Event.getTarget(D);
return(this.isValidHandleChild(C)&&(this.id==this.handleElId||this.DDM.handleWasClicked(C,this.id)))
},addInvalidHandleType:function(D){var C=D.toUpperCase();
this.invalidHandleTypes[C]=C
},addInvalidHandleId:function(C){if(typeof C!=="string"){C=Ext.id(C)
}this.invalidHandleIds[C]=C
},addInvalidHandleClass:function(C){this.invalidHandleClasses.push(C)
},removeInvalidHandleType:function(D){var C=D.toUpperCase();
delete this.invalidHandleTypes[C]
},removeInvalidHandleId:function(C){if(typeof C!=="string"){C=Ext.id(C)
}delete this.invalidHandleIds[C]
},removeInvalidHandleClass:function(D){for(var E=0,C=this.invalidHandleClasses.length;
E<C;
++E){if(this.invalidHandleClasses[E]==D){delete this.invalidHandleClasses[E]
}}},isValidHandleChild:function(H){var F=true;
var E;
try{E=H.nodeName.toUpperCase()
}catch(G){E=H.nodeName
}F=F&&!this.invalidHandleTypes[E];
F=F&&!this.invalidHandleIds[H.id];
for(var D=0,C=this.invalidHandleClasses.length;
F&&D<C;
++D){F=!A.hasClass(H,this.invalidHandleClasses[D])
}return F
},setXTicks:function(F,E){this.xTicks=[];
this.xTickSize=E;
var C={};
for(var D=this.initPageX;
D>=this.minX;
D=D-E){if(!C[D]){this.xTicks[this.xTicks.length]=D;
C[D]=true
}}for(D=this.initPageX;
D<=this.maxX;
D=D+E){if(!C[D]){this.xTicks[this.xTicks.length]=D;
C[D]=true
}}this.xTicks.sort(this.DDM.numericSort)
},setYTicks:function(D,C){this.yTicks=[];
this.yTickSize=C;
var F={};
for(var E=this.initPageY;
E>=this.minY;
E=E-C){if(!F[E]){this.yTicks[this.yTicks.length]=E;
F[E]=true
}}for(E=this.initPageY;
E<=this.maxY;
E=E+C){if(!F[E]){this.yTicks[this.yTicks.length]=E;
F[E]=true
}}this.yTicks.sort(this.DDM.numericSort)
},setXConstraint:function(E,D,C){this.leftConstraint=E;
this.rightConstraint=D;
this.minX=this.initPageX-E;
this.maxX=this.initPageX+D;
if(C){this.setXTicks(this.initPageX,C)
}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(C,E,D){this.topConstraint=C;
this.bottomConstraint=E;
this.minY=this.initPageY-C;
this.maxY=this.initPageY+E;
if(D){this.setYTicks(this.initPageY,D)
}this.constrainY=true
},resetConstraints:function(){if(this.initPageX||this.initPageX===0){var D=(this.maintainOffset)?this.lastPageX-this.initPageX:0;
var C=(this.maintainOffset)?this.lastPageY-this.initPageY:0;
this.setInitPosition(D,C)
}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(I,H){if(!H){return I
}else{if(H[0]>=I){return H[0]
}else{for(var G=0,C=H.length;
G<C;
++G){var F=G+1;
if(H[F]&&H[F]>=I){var E=I-H[G];
var D=H[F]-I;
return(D>E)?H[G]:H[F]
}}return H[H.length-1]
}}},toString:function(){return("DragDrop "+this.id)
}}
})();
if(!Ext.dd.DragDropMgr){Ext.dd.DragDropMgr=function(){var A=Ext.EventManager;
return{ids:{},handleIds:{},dragCurrent:null,dragOvers:{},deltaX:0,deltaY:0,preventDefault:true,stopPropagation:true,initalized:false,locked:false,init:function(){this.initialized=true
},POINT:0,INTERSECT:1,mode:0,_execOnAll:function(E,C){for(var D in this.ids){for(var B in this.ids[D]){var F=this.ids[D][B];
if(!this.isTypeOfDD(F)){continue
}F[E].apply(F,C)
}}},_onLoad:function(){this.init();
A.on(document,"mouseup",this.handleMouseUp,this,true);
A.on(document,"mousemove",this.handleMouseMove,this,true);
A.on(window,"unload",this._onUnload,this,true);
A.on(window,"resize",this._onResize,this,true)
},_onResize:function(B){this._execOnAll("resetConstraints",[])
},lock:function(){this.locked=true
},unlock:function(){this.locked=false
},isLocked:function(){return this.locked
},locationCache:{},useCache:true,clickPixelThresh:3,clickTimeThresh:350,dragThreshMet:false,clickTimeout:null,startX:0,startY:0,regDragDrop:function(B,C){if(!this.initialized){this.init()
}if(!this.ids[C]){this.ids[C]={}
}this.ids[C][B.id]=B
},removeDDFromGroup:function(D,C){if(!this.ids[C]){this.ids[C]={}
}var B=this.ids[C];
if(B&&B[D.id]){delete B[D.id]
}},_remove:function(C){for(var B in C.groups){if(B&&this.ids[B][C.id]){delete this.ids[B][C.id]
}}delete this.handleIds[C.id]
},regHandle:function(C,B){if(!this.handleIds[C]){this.handleIds[C]={}
}this.handleIds[C][B]=B
},isDragDrop:function(B){return(this.getDDById(B))?true:false
},getRelated:function(F,E){var D=[];
for(var C in F.groups){for(j in this.ids[C]){var B=this.ids[C][j];
if(!this.isTypeOfDD(B)){continue
}if(!E||B.isTarget){D[D.length]=B
}}}return D
},isLegalTarget:function(F,D){var C=this.getRelated(F,true);
for(var E=0,B=C.length;
E<B;
++E){if(C[E].id==D.id){return true
}}return false
},isTypeOfDD:function(B){return(B&&B.__ygDragDrop)
},isHandle:function(C,B){return(this.handleIds[C]&&this.handleIds[C][B])
},getDDById:function(C){for(var B in this.ids){if(this.ids[B][C]){return this.ids[B][C]
}}return null
},handleMouseDown:function(D,C){this.currentTarget=Ext.lib.Event.getTarget(D);
this.dragCurrent=C;
var B=C.getEl();
this.startX=Ext.lib.Event.getPageX(D);
this.startY=Ext.lib.Event.getPageY(D);
this.deltaX=this.startX-B.offsetLeft;
this.deltaY=this.startY-B.offsetTop;
this.dragThreshMet=false;
this.clickTimeout=setTimeout(function(){var E=Ext.dd.DDM;
E.startDrag(E.startX,E.startY)
},this.clickTimeThresh)
},startDrag:function(B,C){clearTimeout(this.clickTimeout);
if(this.dragCurrent){this.dragCurrent.b4StartDrag(B,C);
this.dragCurrent.startDrag(B,C)
}this.dragThreshMet=true
},handleMouseUp:function(B){if(!this.dragCurrent){return 
}clearTimeout(this.clickTimeout);
if(this.dragThreshMet){this.fireEvents(B,true)
}else{}this.stopDrag(B);
this.stopEvent(B)
},stopEvent:function(B){if(this.stopPropagation){B.stopPropagation()
}if(this.preventDefault){B.preventDefault()
}},stopDrag:function(B){if(this.dragCurrent){if(this.dragThreshMet){this.dragCurrent.b4EndDrag(B);
this.dragCurrent.endDrag(B)
}this.dragCurrent.onMouseUp(B)
}this.dragCurrent=null;
this.dragOvers={}
},handleMouseMove:function(D){if(!this.dragCurrent){return true
}if(Ext.isIE&&(D.button!==0&&D.button!==1&&D.button!==2)){this.stopEvent(D);
return this.handleMouseUp(D)
}if(!this.dragThreshMet){var C=Math.abs(this.startX-Ext.lib.Event.getPageX(D));
var B=Math.abs(this.startY-Ext.lib.Event.getPageY(D));
if(C>this.clickPixelThresh||B>this.clickPixelThresh){this.startDrag(this.startX,this.startY)
}}if(this.dragThreshMet){this.dragCurrent.b4Drag(D);
this.dragCurrent.onDrag(D);
if(!this.dragCurrent.moveOnly){this.fireEvents(D,false)
}}this.stopEvent(D);
return true
},fireEvents:function(L,G){var P=this.dragCurrent;
if(!P||P.isLocked()){return 
}var O=Ext.lib.Event.getPageX(L);
var N=Ext.lib.Event.getPageY(L);
var Q=new Ext.lib.Point(O,N);
var K=[];
var I=[];
var F=[];
var E=[];
var C=[];
for(var D in this.dragOvers){var B=this.dragOvers[D];
if(!this.isTypeOfDD(B)){continue
}if(!this.isOverTarget(Q,B,this.mode)){I.push(B)
}K[D]=true;
delete this.dragOvers[D]
}for(var M in P.groups){if("string"!=typeof M){continue
}for(D in this.ids[M]){var H=this.ids[M][D];
if(!this.isTypeOfDD(H)){continue
}if(H.isTarget&&!H.isLocked()&&H!=P){if(this.isOverTarget(Q,H,this.mode)){if(G){E.push(H)
}else{if(!K[H.id]){C.push(H)
}else{F.push(H)
}this.dragOvers[H.id]=H
}}}}}if(this.mode){if(I.length){P.b4DragOut(L,I);
P.onDragOut(L,I)
}if(C.length){P.onDragEnter(L,C)
}if(F.length){P.b4DragOver(L,F);
P.onDragOver(L,F)
}if(E.length){P.b4DragDrop(L,E);
P.onDragDrop(L,E)
}}else{var J=0;
for(D=0,J=I.length;
D<J;
++D){P.b4DragOut(L,I[D].id);
P.onDragOut(L,I[D].id)
}for(D=0,J=C.length;
D<J;
++D){P.onDragEnter(L,C[D].id)
}for(D=0,J=F.length;
D<J;
++D){P.b4DragOver(L,F[D].id);
P.onDragOver(L,F[D].id)
}for(D=0,J=E.length;
D<J;
++D){P.b4DragDrop(L,E[D].id);
P.onDragDrop(L,E[D].id)
}}if(G&&!E.length){P.onInvalidDrop(L)
}},getBestMatch:function(E){var D=null;
var C=E.length;
if(C==1){D=E[0]
}else{for(var F=0;
F<C;
++F){var B=E[F];
if(B.cursorIsOver){D=B;
break
}else{if(!D||D.overlap.getArea()<B.overlap.getArea()){D=B
}}}}return D
},refreshCache:function(C){for(var B in C){if("string"!=typeof B){continue
}for(var D in this.ids[B]){var E=this.ids[B][D];
if(this.isTypeOfDD(E)){var F=this.getLocation(E);
if(F){this.locationCache[E.id]=F
}else{delete this.locationCache[E.id]
}}}}},verifyEl:function(B){try{if(B){var D=B.offsetParent;
if(D){return true
}}}catch(C){}return false
},getLocation:function(G){if(!this.isTypeOfDD(G)){return null
}var E=G.getEl(),J,D,C,L,K,M,B,I,F;
try{J=Ext.lib.Dom.getXY(E)
}catch(H){}if(!J){return null
}D=J[0];
C=D+E.offsetWidth;
L=J[1];
K=L+E.offsetHeight;
M=L-G.padding[0];
B=C+G.padding[1];
I=K+G.padding[2];
F=D-G.padding[3];
return new Ext.lib.Region(M,B,I,F)
},isOverTarget:function(I,D,C){var E=this.locationCache[D.id];
if(!E||!this.useCache){E=this.getLocation(D);
this.locationCache[D.id]=E
}if(!E){return false
}D.cursorIsOver=E.contains(I);
var G=this.dragCurrent;
if(!G||!G.getTargetCoord||(!C&&!G.constrainX&&!G.constrainY)){return D.cursorIsOver
}D.overlap=null;
var F=G.getTargetCoord(I.x,I.y);
var B=G.getDragEl();
var J=new Ext.lib.Region(F.y,F.x+B.offsetWidth,F.y+B.offsetHeight,F.x);
var H=J.intersect(E);
if(H){D.overlap=H;
return(C)?true:D.cursorIsOver
}else{return false
}},_onUnload:function(C,B){Ext.dd.DragDropMgr.unregAll()
},unregAll:function(){if(this.dragCurrent){this.stopDrag();
this.dragCurrent=null
}this._execOnAll("unreg",[]);
for(i in this.elementCache){delete this.elementCache[i]
}this.elementCache={};
this.ids={}
},elementCache:{},getElWrapper:function(C){var B=this.elementCache[C];
if(!B||!B.el){B=this.elementCache[C]=new this.ElementWrapper(Ext.getDom(C))
}return B
},getElement:function(B){return Ext.getDom(B)
},getCss:function(C){var B=Ext.getDom(C);
return(B)?B.style:null
},ElementWrapper:function(B){this.el=B||null;
this.id=this.el&&B.id;
this.css=this.el&&B.style
},getPosX:function(B){return Ext.lib.Dom.getX(B)
},getPosY:function(B){return Ext.lib.Dom.getY(B)
},swapNode:function(D,B){if(D.swapNode){D.swapNode(B)
}else{var E=B.parentNode;
var C=B.nextSibling;
if(C==D){E.insertBefore(D,B)
}else{if(B==D.nextSibling){E.insertBefore(B,D)
}else{D.parentNode.replaceChild(B,D);
E.insertBefore(D,C)
}}}},getScroll:function(){var D,B,E=document.documentElement,C=document.body;
if(E&&(E.scrollTop||E.scrollLeft)){D=E.scrollTop;
B=E.scrollLeft
}else{if(C){D=C.scrollTop;
B=C.scrollLeft
}else{}}return{top:D,left:B}
},getStyle:function(C,B){return Ext.fly(C).getStyle(B)
},getScrollTop:function(){return this.getScroll().top
},getScrollLeft:function(){return this.getScroll().left
},moveToEl:function(B,D){var C=Ext.lib.Dom.getXY(D);
Ext.lib.Dom.setXY(B,C)
},numericSort:function(C,B){return(C-B)
},_timeoutCount:0,_addListeners:function(){var B=Ext.dd.DDM;
if(Ext.lib.Event&&document){B._onLoad()
}else{if(B._timeoutCount>2000){}else{setTimeout(B._addListeners,10);
if(document&&document.body){B._timeoutCount+=1
}}}},handleWasClicked:function(B,D){if(this.isHandle(D,B.id)){return true
}else{var C=B.parentNode;
while(C){if(this.isHandle(D,C.id)){return true
}else{C=C.parentNode
}}}return false
}}
}();
Ext.dd.DDM=Ext.dd.DragDropMgr;
Ext.dd.DDM._addListeners()
}Ext.dd.DD=function(C,B,A){if(C){this.init(C,B,A)
}};
Ext.extend(Ext.dd.DD,Ext.dd.DragDrop,{scroll:true,autoOffset:function(D,B){var A=D-this.startPageX;
var C=B-this.startPageY;
this.setDelta(A,C)
},setDelta:function(A,B){this.deltaX=A;
this.deltaY=B
},setDragElPos:function(C,B){var A=this.getDragEl();
this.alignElWithMouse(A,C,B)
},alignElWithMouse:function(G,F,H){var E=this.getTargetCoord(F,H);
var D=G.dom?G:Ext.fly(G);
if(!this.deltaSetXY){var C=[E.x,E.y];
D.setXY(C);
var B=D.getLeft(true);
var A=D.getTop(true);
this.deltaSetXY=[B-E.x,A-E.y]
}else{D.setLeftTop(E.x+this.deltaSetXY[0],E.y+this.deltaSetXY[1])
}this.cachePosition(E.x,E.y);
this.autoScroll(E.x,E.y,G.offsetHeight,G.offsetWidth);
return E
},cachePosition:function(A,C){if(A){this.lastPageX=A;
this.lastPageY=C
}else{var B=Ext.lib.Dom.getXY(this.getEl());
this.lastPageX=B[0];
this.lastPageY=B[1]
}},autoScroll:function(F,D,B,I){if(this.scroll){var H=Ext.lib.Dom.getViewWidth();
var E=Ext.lib.Dom.getViewHeight();
var M=this.DDM.getScrollTop();
var A=this.DDM.getScrollLeft();
var C=B+D;
var N=I+F;
var L=(H+M-D-this.deltaY);
var K=(E+A-F-this.deltaX);
var J=40;
var G=(document.all)?80:30;
if(C>H&&L<J){window.scrollTo(A,M+G)
}if(D<M&&M>0&&D-M<J){window.scrollTo(A,M-G)
}if(N>E&&K<J){window.scrollTo(A+G,M)
}if(F<A&&A>0&&F-A<J){window.scrollTo(A-G,M)
}}},getTargetCoord:function(D,B){var A=D-this.deltaX;
var C=B-this.deltaY;
if(this.constrainX){if(A<this.minX){A=this.minX
}if(A>this.maxX){A=this.maxX
}}if(this.constrainY){if(C<this.minY){C=this.minY
}if(C>this.maxY){C=this.maxY
}}A=this.getTick(A,this.xTicks);
C=this.getTick(C,this.yTicks);
return{x:A,y:C}
},applyConfig:function(){Ext.dd.DD.superclass.applyConfig.call(this);
this.scroll=(this.config.scroll!==false)
},b4MouseDown:function(A){this.autoOffset(Ext.lib.Event.getPageX(A),Ext.lib.Event.getPageY(A))
},b4Drag:function(A){this.setDragElPos(Ext.lib.Event.getPageX(A),Ext.lib.Event.getPageY(A))
},toString:function(){return("DD "+this.id)
}});
Ext.dd.DDProxy=function(C,B,A){if(C){this.init(C,B,A);
this.initFrame()
}};
Ext.dd.DDProxy.dragElId="ygddfdiv";
Ext.extend(Ext.dd.DDProxy,Ext.dd.DD,{resizeFrame:true,centerFrame:false,createFrame:function(){var B=this;
var A=document.body;
if(!A||!A.firstChild){setTimeout(function(){B.createFrame()
},50);
return 
}var D=this.getDragEl();
if(!D){D=document.createElement("div");
D.id=this.dragElId;
var C=D.style;
C.position="absolute";
C.visibility="hidden";
C.cursor="move";
C.border="2px solid #aaa";
C.zIndex=999;
A.insertBefore(D,A.firstChild)
}},initFrame:function(){this.createFrame()
},applyConfig:function(){Ext.dd.DDProxy.superclass.applyConfig.call(this);
this.resizeFrame=(this.config.resizeFrame!==false);
this.centerFrame=(this.config.centerFrame);
this.setDragElId(this.config.dragElId||Ext.dd.DDProxy.dragElId)
},showFrame:function(C,B){var E=this.getEl();
var A=this.getDragEl();
var D=A.style;
this._resizeProxy();
if(this.centerFrame){this.setDelta(Math.round(parseInt(D.width,10)/2),Math.round(parseInt(D.height,10)/2))
}this.setDragElPos(C,B);
Ext.fly(A).show()
},_resizeProxy:function(){if(this.resizeFrame){var A=this.getEl();
Ext.fly(this.getDragEl()).setSize(A.offsetWidth,A.offsetHeight)
}},b4MouseDown:function(B){var A=Ext.lib.Event.getPageX(B);
var C=Ext.lib.Event.getPageY(B);
this.autoOffset(A,C);
this.setDragElPos(A,C)
},b4StartDrag:function(A,B){this.showFrame(A,B)
},b4EndDrag:function(A){Ext.fly(this.getDragEl()).hide()
},endDrag:function(C){var B=this.getEl();
var A=this.getDragEl();
A.style.visibility="";
this.beforeMove();
B.style.visibility="hidden";
Ext.dd.DDM.moveToEl(B,A);
A.style.visibility="hidden";
B.style.visibility="";
this.afterDrag()
},beforeMove:function(){},afterDrag:function(){},toString:function(){return("DDProxy "+this.id)
}});
Ext.dd.DDTarget=function(C,B,A){if(C){this.initTarget(C,B,A)
}};
Ext.extend(Ext.dd.DDTarget,Ext.dd.DragDrop,{toString:function(){return("DDTarget "+this.id)
}});
Ext.dd.ScrollManager=function(){var J=Ext.dd.DragDropMgr;
var I={};
var H=null;
var G={};
var E=function(K){H=null;
D()
};
var B=function(){if(J.dragCurrent){J.refreshCache(J.dragCurrent.groups)
}};
var A=function(){if(J.dragCurrent){var K=Ext.dd.ScrollManager;
if(!K.animate){if(G.el.scroll(G.dir,K.increment)){B()
}}else{G.el.scroll(G.dir,K.increment,true,K.animDuration,B)
}}};
var D=function(){if(G.id){clearInterval(G.id)
}G.id=0;
G.el=null;
G.dir=""
};
var F=function(L,K){D();
G.el=L;
G.dir=K;
G.id=setInterval(A,Ext.dd.ScrollManager.frequency)
};
var C=function(P,R){if(R||!J.dragCurrent){return 
}var K=Ext.dd.ScrollManager;
if(!H||H!=J.dragCurrent){H=J.dragCurrent;
K.refreshCache()
}var O=Ext.lib.Event.getXY(P);
var N=new Ext.lib.Point(O[0],O[1]);
for(var Q in I){var L=I[Q],M=L._region;
if(M.contains(N)&&L.isScrollable()){if(M.bottom-N.y<=K.thresh){if(G.el!=L){F(L,"down")
}return 
}else{if(M.right-N.x<=K.thresh){if(G.el!=L){F(L,"left")
}return 
}else{if(N.y-M.top<=K.thresh){if(G.el!=L){F(L,"up")
}return 
}else{if(N.x-M.left<=K.thresh){if(G.el!=L){F(L,"right")
}return 
}}}}}}D()
};
J.fireEvents=J.fireEvents.createSequence(C,J);
J.stopDrag=J.stopDrag.createSequence(E,J);
return{register:function(M){if(M instanceof Array){for(var L=0,K=M.length;
L<K;
L++){this.register(M[L])
}}else{M=Ext.get(M);
I[M.id]=M
}},unregister:function(M){if(M instanceof Array){for(var L=0,K=M.length;
L<K;
L++){this.unregister(M[L])
}}else{M=Ext.get(M);
delete I[M.id]
}},thresh:25,increment:100,frequency:500,animate:true,animDuration:0.4,refreshCache:function(){for(var K in I){if(typeof I[K]=="object"){I[K]._region=I[K].getRegion()
}}}}
}();
Ext.dd.Registry=function(){var D={};
var C={};
var B=0;
var A=function(F,E){if(typeof F=="string"){return F
}var G=F.id;
if(!G&&E!==false){G="extdd-"+(++B);
F.id=G
}return G
};
return{register:function(I,E){E=E||{};
if(typeof I=="string"){I=document.getElementById(I)
}E.ddel=I;
D[A(I)]=E;
if(E.isHandle!==false){C[E.ddel.id]=E
}if(E.handles){var H=E.handles;
for(var G=0,F=H.length;
G<F;
G++){C[A(H[G])]=E
}}},unregister:function(H){var J=A(H,false);
var I=D[J];
if(I){delete D[J];
if(I.handles){var G=I.handles;
for(var F=0,E=G.length;
F<E;
F++){delete C[A(G[F],false)]
}}}},getHandle:function(E){if(typeof E!="string"){E=E.id
}return C[E]
},getHandleFromEvent:function(F){var E=Ext.lib.Event.getTarget(F);
return E?C[E.id]:null
},getTarget:function(E){if(typeof E!="string"){E=E.id
}return D[E]
},getTargetFromEvent:function(F){var E=Ext.lib.Event.getTarget(F);
return E?D[E.id]||C[E.id]:null
}}
}();
Ext.dd.StatusProxy=function(A){Ext.apply(this,A);
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:!A||A.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(A){A=A||this.dropNotAllowed;
if(this.dropStatus!=A){this.el.replaceClass(this.dropStatus,A);
this.dropStatus=A
}},reset:function(A){this.el.dom.className="x-dd-drag-proxy "+this.dropNotAllowed;
this.dropStatus=this.dropNotAllowed;
if(A){this.ghost.update("")
}},update:function(A){if(typeof A=="string"){this.ghost.update(A)
}else{this.ghost.update("");
A.style.margin="0";
this.ghost.dom.appendChild(A)
}},getEl:function(){return this.el
},getGhost:function(){return this.ghost
},hide:function(A){this.el.hide();
if(A){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(C,B,A){this.callback=B;
this.scope=A;
if(C&&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:C,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(A,B){this.el=Ext.get(A);
this.dragData={};
Ext.apply(this,B);
if(!this.proxy){this.proxy=new Ext.dd.StatusProxy()
}this.el.on("mouseup",this.handleMouseUp);
Ext.dd.DragSource.superclass.constructor.call(this,this.el.dom,this.ddGroup||this.group,{dragElId:this.proxy.id,resizeFrame:false,isTarget:false,scroll:this.scroll===true});
this.dragging=false
};
Ext.extend(Ext.dd.DragSource,Ext.dd.DDProxy,{dropAllowed:"x-dd-drop-ok",dropNotAllowed:"x-dd-drop-nodrop",getDragData:function(A){return this.dragData
},onDragEnter:function(C,D){var B=Ext.dd.DragDropMgr.getDDById(D);
this.cachedTarget=B;
if(this.beforeDragEnter(B,C,D)!==false){if(B.isNotifyTarget){var A=B.notifyEnter(this,C,this.dragData);
this.proxy.setStatus(A)
}else{this.proxy.setStatus(this.dropAllowed)
}if(this.afterDragEnter){this.afterDragEnter(B,C,D)
}}},beforeDragEnter:function(A,B,C){return true
},alignElWithMouse:function(){Ext.dd.DragSource.superclass.alignElWithMouse.apply(this,arguments);
this.proxy.sync()
},onDragOver:function(C,D){var B=this.cachedTarget||Ext.dd.DragDropMgr.getDDById(D);
if(this.beforeDragOver(B,C,D)!==false){if(B.isNotifyTarget){var A=B.notifyOver(this,C,this.dragData);
this.proxy.setStatus(A)
}if(this.afterDragOver){this.afterDragOver(B,C,D)
}}},beforeDragOver:function(C,A,B){return true
},onDragOut:function(B,C){var A=this.cachedTarget||Ext.dd.DragDropMgr.getDDById(C);
if(this.beforeDragOut(A,B,C)!==false){if(A.isNotifyTarget){A.notifyOut(this,B,this.dragData)
}this.proxy.reset();
if(this.afterDragOut){this.afterDragOut(A,B,C)
}}this.cachedTarget=null
},beforeDragOut:function(A,B,C){return true
},onDragDrop:function(B,C){var A=this.cachedTarget||Ext.dd.DragDropMgr.getDDById(C);
if(this.beforeDragDrop(A,B,C)!==false){if(A.isNotifyTarget){if(A.notifyDrop(this,B,this.dragData)){this.onValidDrop(A,B,C)
}else{this.onInvalidDrop(A,B,C)
}}else{this.onValidDrop(A,B,C)
}if(this.afterDragDrop){this.afterDragDrop(A,B,C)
}}},beforeDragDrop:function(A,B,C){return true
},onValidDrop:function(A,B,C){this.hideProxy()
},getRepairXY:function(A,B){return this.el.getXY()
},onInvalidDrop:function(B,A,C){this.beforeInvalidDrop(B,A,C);
if(this.cachedTarget){if(this.cachedTarget.isNotifyTarget){this.cachedTarget.notifyOut(this,A,this.dragData)
}this.cacheTarget=null
}this.proxy.repair(this.getRepairXY(A,this.dragData),this.afterRepair,this);
if(this.afterInvalidDrop){this.afterInvalidDrop(A,C)
}},afterRepair:function(){if(Ext.enableFx){this.el.highlight(this.hlColor||"c3daf9")
}this.dragging=false
},beforeInvalidDrop:function(A,B,C){return true
},handleMouseDown:function(B){if(this.dragging){return 
}if(Ext.QuickTips){Ext.QuickTips.disable()
}var A=this.getDragData(B);
if(A&&this.onBeforeDrag(A,B)!==false){this.dragData=A;
this.proxy.stop();
Ext.dd.DragSource.superclass.handleMouseDown.apply(this,arguments)
}},handleMouseUp:function(A){if(Ext.QuickTips){Ext.QuickTips.enable()
}},onBeforeDrag:function(A,B){return true
},onStartDrag:Ext.emptyFn,startDrag:function(A,B){this.proxy.reset();
this.dragging=true;
this.proxy.update("");
this.onInitDrag(A,B);
this.proxy.show()
},onInitDrag:function(A,C){var B=this.el.dom.cloneNode(true);
B.id=Ext.id();
this.proxy.update(B);
this.onStartDrag(A,C);
return true
},getProxy:function(){return this.proxy
},hideProxy:function(){this.proxy.hide();
this.proxy.reset(true);
this.dragging=false
},triggerCacheRefresh:function(){Ext.dd.DDM.refreshCache(this.groups)
},b4EndDrag:function(A){},endDrag:function(A){this.onEndDrag(this.dragData,A)
},onEndDrag:function(B,A){},autoOffset:function(A,B){this.setDelta(-12,-20)
}});
Ext.dd.DropTarget=function(A,B){this.el=Ext.get(A);
Ext.apply(this,B);
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(A,C,B){if(this.overClass){this.el.addClass(this.overClass)
}return this.dropAllowed
},notifyOver:function(A,C,B){return this.dropAllowed
},notifyOut:function(A,C,B){if(this.overClass){this.el.removeClass(this.overClass)
}},notifyDrop:function(B,C,A){return false
}});
Ext.dd.DragZone=function(A,B){Ext.dd.DragZone.superclass.constructor.call(this,A,B);
if(this.containerScroll){Ext.dd.ScrollManager.register(this.el)
}};
Ext.extend(Ext.dd.DragZone,Ext.dd.DragSource,{getDragData:function(A){return Ext.dd.Registry.getHandleFromEvent(A)
},onInitDrag:function(A,B){this.proxy.update(this.dragData.ddel.cloneNode(true));
this.onStartDrag(A,B);
return true
},afterRepair:function(){if(Ext.enableFx){Ext.Element.fly(this.dragData.ddel).highlight(this.hlColor||"c3daf9")
}this.dragging=false
},getRepairXY:function(A){return Ext.Element.fly(this.dragData.ddel).getXY()
}});
Ext.dd.DropZone=function(A,B){Ext.dd.DropZone.superclass.constructor.call(this,A,B)
};
Ext.extend(Ext.dd.DropZone,Ext.dd.DropTarget,{getTargetFromEvent:function(A){return Ext.dd.Registry.getTargetFromEvent(A)
},onNodeEnter:function(D,A,C,B){},onNodeOver:function(D,A,C,B){return this.dropAllowed
},onNodeOut:function(D,A,B,C){},onNodeDrop:function(D,A,C,B){return false
},onContainerOver:function(A,C,B){return this.dropNotAllowed
},onContainerDrop:function(A,C,B){return false
},notifyEnter:function(A,C,B){return this.dropNotAllowed
},notifyOver:function(B,C,A){var D=this.getTargetFromEvent(C);
if(!D){if(this.lastOverNode){this.onNodeOut(this.lastOverNode,B,C,A);
this.lastOverNode=null
}return this.onContainerOver(B,C,A)
}if(this.lastOverNode!=D){if(this.lastOverNode){this.onNodeOut(this.lastOverNode,B,C,A)
}this.onNodeEnter(D,B,C,A);
this.lastOverNode=D
}return this.onNodeOver(D,B,C,A)
},notifyOut:function(A,B,C){if(this.lastOverNode){this.onNodeOut(this.lastOverNode,A,B,C);
this.lastOverNode=null
}},notifyDrop:function(A,C,B){if(this.lastOverNode){this.onNodeOut(this.lastOverNode,A,C,B);
this.lastOverNode=null
}var D=this.getTargetFromEvent(C);
return D?this.onNodeDrop(D,A,C,B):this.onContainerDrop(A,C,B)
},triggerCacheRefresh:function(){Ext.dd.DDM.refreshCache(this.groups)
}});
Ext.data.SortTypes={none:function(A){return A
},stripTagsRE:/<\/?[^>]+>/gi,asText:function(A){return String(A).replace(this.stripTagsRE,"")
},asUCText:function(A){return String(A).toUpperCase().replace(this.stripTagsRE,"")
},asUCString:function(A){return String(A).toUpperCase()
},asDate:function(A){if(!A){return 0
}if(A instanceof Date){return A.getTime()
}return Date.parse(String(A))
},asFloat:function(B){var A=parseFloat(String(B).replace(/,/g,""));
if(isNaN(A)){A=0
}return A
},asInt:function(B){var A=parseInt(String(B).replace(/,/g,""));
if(isNaN(A)){A=0
}return A
}};
Ext.data.Record=function(A,B){this.id=(B||B===0)?B:++Ext.data.Record.AUTO_ID;
this.data=A
};
Ext.data.Record.create=function(E){var C=function(){C.superclass.constructor.apply(this,arguments)
};
Ext.extend(C,Ext.data.Record);
var D=C.prototype;
D.fields=new Ext.util.MixedCollection(false,function(F){return F.name
});
for(var B=0,A=E.length;
B<A;
B++){D.fields.add(new Ext.data.Field(E[B]))
}C.getField=function(F){return D.fields.get(F)
};
return C
};
Ext.data.Record.AUTO_ID=1000;
Ext.data.Record.EDIT="edit";
Ext.data.Record.REJECT="reject";
Ext.data.Record.COMMIT="commit";
Ext.data.Record.prototype={dirty:false,editing:false,error:null,modified:null,join:function(A){this.store=A
},set:function(B,A){if(this.data[B]==A){return 
}this.dirty=true;
if(!this.modified){this.modified={}
}if(typeof this.modified[B]=="undefined"){this.modified[B]=this.data[B]
}this.data[B]=A;
if(!this.editing){this.store.afterEdit(this)
}},get:function(A){return this.data[A]
},beginEdit:function(){this.editing=true;
this.modified={}
},cancelEdit:function(){this.editing=false;
delete this.modified
},endEdit:function(){this.editing=false;
if(this.dirty&&this.store){this.store.afterEdit(this)
}},reject:function(){var A=this.modified;
for(var B in A){if(typeof A[B]!="function"){this.data[B]=A[B]
}}this.dirty=false;
delete this.modified;
this.editing=false;
if(this.store){this.store.afterReject(this)
}},commit:function(){this.dirty=false;
delete this.modified;
this.editing=false;
if(this.store){this.store.afterCommit(this)
}},hasError:function(){return this.error!=null
},clearError:function(){this.error=null
}};
Ext.data.Store=function(A){this.data=new Ext.util.MixedCollection(false);
this.data.getKey=function(B){return B.id
};
this.baseParams={};
this.paramNames={start:"start",limit:"limit",sort:"sort",dir:"dir"};
Ext.apply(this,A);
if(this.reader&&!this.recordType){this.recordType=this.reader.recordType
}this.fields=this.recordType.prototype.fields;
this.modified=[];
this.addEvents({datachanged:true,add:true,remove:true,update:true,clear:true,beforeload:true,load:true,loadexception:true});
if(this.proxy){this.relayEvents(this.proxy,["loadexception"])
}this.sortToggle={};
Ext.data.Store.superclass.constructor.call(this)
};
Ext.extend(Ext.data.Store,Ext.util.Observable,{remoteSort:false,lastOptions:null,add:function(D){D=[].concat(D);
for(var C=0,B=D.length;
C<B;
C++){D[C].join(this)
}var A=this.data.length;
this.data.addAll(D);
this.fireEvent("add",this,D,A)
},remove:function(B){var A=this.data.indexOf(B);
this.data.removeAt(A);
this.fireEvent("remove",this,B,A)
},removeAll:function(){this.data.clear();
this.fireEvent("clear",this)
},insert:function(A,D){D=[].concat(D);
for(var C=0,B=D.length;
C<B;
C++){this.data.insert(A,D[C]);
D[C].join(this)
}this.fireEvent("add",this,D,A)
},indexOf:function(A){return this.data.indexOf(A)
},indexOfId:function(A){return this.data.indexOfKey(A)
},getById:function(A){return this.data.key(A)
},getAt:function(A){return this.data.itemAt(A)
},getRange:function(B,A){return this.data.getRange(B,A)
},storeOptions:function(A){A=Ext.apply({},A);
delete A.callback;
delete A.scope;
this.lastOptions=A
},load:function(B){B=B||{};
if(this.fireEvent("beforeload",this,B)!==false){this.storeOptions(B);
var C=Ext.apply(B.params||{},this.baseParams);
if(this.sortInfo&&this.remoteSort){var A=this.paramNames;
C[A.sort]=this.sortInfo.field;
C[A.dir]=this.sortInfo.direction
}this.proxy.load(C,this.reader,this.loadRecords,this,B)
}},reload:function(A){this.load(Ext.applyIf(A||{},this.lastOptions))
},loadRecords:function(G,B,E){if(!G||E===false){if(E!==false){this.fireEvent("load",this,[],B)
}if(B.callback){B.callback.call(B.scope||this,[],B,false)
}return 
}var F=G.records,D=G.totalRecords||F.length;
for(var C=0,A=F.length;
C<A;
C++){F[C].join(this)
}if(!B||B.add!==true){this.data.clear();
this.data.addAll(F);
this.totalLength=D;
this.applySort();
this.fireEvent("datachanged",this)
}else{this.totalLength=Math.max(D,this.data.length+F.length);
this.data.addAll(F)
}this.fireEvent("load",this,F,B);
if(B.callback){B.callback.call(B.scope||this,F,B,true)
}},loadData:function(C,A){var B=this.reader.readRecords(C);
this.loadRecords(B,{add:A},true)
},getCount:function(){return this.data.length||0
},getTotalCount:function(){return this.totalLength||0
},getSortState:function(){return this.sortInfo
},applySort:function(){if(this.sortInfo&&!this.remoteSort){var C=this.sortInfo,D=C.field;
var A=this.fields.get(D).sortType;
var B=function(F,E){var H=A(F.data[D]),G=A(E.data[D]);
return H>G?1:(H<G?-1:0)
};
this.data.sort(C.direction,B);
if(this.snapshot&&this.snapshot!=this.data){this.snapshot.sort(C.direction,B)
}}},setDefaultSort:function(B,A){this.sortInfo={field:B,direction:A?A.toUpperCase():"ASC"}
},sort:function(B,A){var C=this.fields.get(B);
if(!A){if(this.sortInfo&&this.sortInfo.field==C.name){A=(this.sortToggle[C.name]||"ASC").toggle("ASC","DESC")
}else{A=C.sortDir
}}this.sortToggle[C.name]=A;
this.sortInfo={field:C.name,direction:A};
if(!this.remoteSort){this.applySort();
this.fireEvent("datachanged",this)
}else{this.load(this.lastOptions)
}},each:function(B,A){this.data.each(B,A)
},getModifiedRecords:function(){return this.modified
},filter:function(B,A){if(!A.exec){A=String(A);
if(A.length==0){return this.clearFilter()
}A=new RegExp("^"+Ext.escapeRe(A),"i")
}this.filterBy(function(C){return A.test(C.data[B])
})
},filterBy:function(A,C){var B=this.snapshot||this.data;
this.snapshot=B;
this.data=B.filterBy(A,C);
this.fireEvent("datachanged",this)
},clearFilter:function(A){if(this.snapshot&&this.snapshot!=this.data){this.data=this.snapshot;
delete this.snapshot;
if(A!==true){this.fireEvent("datachanged",this)
}}},afterEdit:function(A){if(this.modified.indexOf(A)==-1){this.modified.push(A)
}this.fireEvent("update",this,A,Ext.data.Record.EDIT)
},afterReject:function(A){this.modified.remove(A);
this.fireEvent("update",this,A,Ext.data.Record.REJECT)
},afterCommit:function(A){this.modified.remove(A);
this.fireEvent("update",this,A,Ext.data.Record.COMMIT)
},commitChanges:function(){var B=this.modified.slice(0);
this.modified=[];
for(var C=0,A=B.length;
C<A;
C++){B[C].commit()
}},rejectChanges:function(){var B=this.modified.slice(0);
this.modified=[];
for(var C=0,A=B.length;
C<A;
C++){B[C].reject()
}}});
Ext.data.SimpleStore=function(A){Ext.data.SimpleStore.superclass.constructor.call(this,{reader:new Ext.data.ArrayReader({id:A.id},Ext.data.Record.create(A.fields)),proxy:new Ext.data.MemoryProxy(A.data)});
this.load()
};
Ext.extend(Ext.data.SimpleStore,Ext.data.Store);
Ext.data.Connection=function(A){Ext.apply(this,A);
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,request:function(D){if(this.fireEvent("beforerequest",this,D)!==false){var E=D.params;
if(typeof E=="object"){E=Ext.urlEncode(Ext.apply(D.params,this.extraParams))
}var A={success:this.handleResponse,failure:this.handleFailure,scope:this,argument:{options:D},timeout:this.timeout};
var C=D.method||this.method||(E?"POST":"GET");
var B=D.url||this.url;
if(this.autoAbort!==false){this.abort()
}if(C=="GET"&&E){B+=(B.indexOf("?")!=-1?"&":"?")+E;
E=""
}this.transId=Ext.lib.Ajax.request(C,B,A,E)
}else{if(typeof D.callback=="function"){D.callback.call(D.scope||window,D,null,null)
}}},isLoading:function(){return this.transId?true:false
},abort:function(){if(this.isLoading()){Ext.lib.Ajax.abort(this.transId)
}},handleResponse:function(B){this.transId=false;
var A=B.argument.options;
this.fireEvent("requestcomplete",this,B,A);
if(typeof A.callback=="function"){A.callback.call(A.scope||window,A,true,B)
}},handleFailure:function(A,C){this.transId=false;
var B=A.argument.options;
this.fireEvent("requestexception",this,A,B,C);
if(typeof B.callback=="function"){B.callback.call(B.scope||window,B,false,A)
}}});
Ext.data.Field=function(E){if(typeof E=="string"){E={name:E}
}Ext.apply(this,E);
if(!this.type){this.type="auto"
}var B=Ext.data.SortTypes;
if(typeof this.sortType=="string"){this.sortType=B[this.sortType]
}if(!this.sortType){switch(this.type){case"string":this.sortType=B.asUCString;
break;
case"date":this.sortType=B.asDate;
break;
default:this.sortType=B.none
}}var D=/[\$,%]/g;
if(!this.convert){var A,C=this.dateFormat;
switch(this.type){case"":case"auto":case undefined:A=function(F){return F
};
break;
case"string":A=function(F){return String(F)
};
break;
case"int":A=function(F){return F!==undefined&&F!==null&&F!==""?parseInt(String(F).replace(D,""),10):""
};
break;
case"float":A=function(F){return F!==undefined&&F!==null&&F!==""?parseFloat(String(F).replace(D,""),10):""
};
break;
case"bool":case"boolean":A=function(F){return F===true||F==="true"||F==1
};
break;
case"date":A=function(G){if(!G){return""
}if(G instanceof Date){return G
}if(C){if(C=="timestamp"){return new Date(G*1000)
}return Date.parseDate(G,C)
}var F=Date.parse(G);
return F?new Date(F):null
};
break
}this.convert=A
}};
Ext.data.Field.prototype={dateFormat:null,defaultValue:"",mapping:null,sortType:null,sortDir:"ASC"};
Ext.data.DataReader=function(B,A){this.meta=B;
this.recordType=A instanceof Array?Ext.data.Record.create(A):A
};
Ext.data.DataReader.prototype={};
Ext.data.DataProxy=function(){this.addEvents({beforeload:true,load:true,loadexception:true});
Ext.data.DataProxy.superclass.constructor.call(this)
};
Ext.extend(Ext.data.DataProxy,Ext.util.Observable);
Ext.data.MemoryProxy=function(A){Ext.data.MemoryProxy.superclass.constructor.call(this);
this.data=A
};
Ext.extend(Ext.data.MemoryProxy,Ext.data.DataProxy,{load:function(F,E,D,C,B){F=F||{};
var A;
try{A=E.readRecords(this.data)
}catch(G){this.fireEvent("loadexception",this,B,null,G);
D.call(C,null,B,false);
return 
}D.call(C,A,B,true)
},update:function(B,A){}});
Ext.data.HttpProxy=function(A){Ext.data.HttpProxy.superclass.constructor.call(this);
this.conn=A.events?A:new Ext.data.Connection(A)
};
Ext.extend(Ext.data.HttpProxy,Ext.data.DataProxy,{getConnection:function(){return this.conn
},load:function(E,D,C,B,A){if(this.fireEvent("beforeload",this,E)!==false){this.conn.request({params:E||{},request:{callback:C,scope:B,arg:A},reader:D,callback:this.loadResponse,scope:this})
}else{C.call(B||this,null,A,false)
}},loadResponse:function(E,B,A){if(!B){this.fireEvent("loadexception",this,E,A);
E.request.callback.call(E.request.scope,null,E.request.arg,false);
return 
}var C;
try{C=E.reader.read(A)
}catch(D){this.fireEvent("loadexception",this,E,A,D);
E.request.callback.call(E.request.scope,null,E.request.arg,false);
return 
}this.fireEvent("load",this,E,E.request.arg);
E.request.callback.call(E.request.scope,C,E.request.arg,true)
},update:function(A){},updateResponse:function(A){}});
Ext.data.ScriptTagProxy=function(A){Ext.data.ScriptTagProxy.superclass.constructor.call(this);
Ext.apply(this,A);
this.head=document.getElementsByTagName("head")[0]
};
Ext.data.ScriptTagProxy.TRANS_ID=1000;
Ext.extend(Ext.data.ScriptTagProxy,Ext.data.DataProxy,{timeout:30000,callbackParam:"callback",nocache:true,load:function(K,J,H,F,E){if(this.fireEvent("beforeload",this,K)!==false){var A=Ext.urlEncode(Ext.apply(K,this.extraParams));
var C=this.url;
C+=(C.indexOf("?")!=-1?"&":"?")+A;
if(this.nocache){C+="&_dc="+(new Date().getTime())
}var B=++Ext.data.ScriptTagProxy.TRANS_ID;
var I={id:B,cb:"stcCallback"+B,scriptId:"stcScript"+B,params:K,arg:E,url:C,callback:H,scope:F,reader:J};
var G=this;
window[I.cb]=function(L){G.handleResponse(L,I)
};
C+=String.format("&{0}={1}",this.callbackParam,I.cb);
if(this.autoAbort!==false){this.abort()
}I.timeoutId=this.handleFailure.defer(this.timeout,this,[I]);
var D=document.createElement("script");
D.setAttribute("src",C);
D.setAttribute("type","text/javascript");
D.setAttribute("id",I.scriptId);
this.head.appendChild(D);
this.trans=I
}else{H.call(F||this,null,E,false)
}},isLoading:function(){return this.trans?true:false
},abort:function(){if(this.isLoading()){this.destroyTrans(this.trans)
}},destroyTrans:function(A,C){this.head.removeChild(document.getElementById(A.scriptId));
clearTimeout(A.timeoutId);
if(C){window[A.cb]=undefined;
try{delete window[A.cb]
}catch(B){}}else{window[A.cb]=function(){window[A.cb]=undefined;
try{delete window[A.cb]
}catch(D){}}
}},handleResponse:function(D,C){this.trans=false;
this.destroyTrans(C,true);
var B;
try{B=C.reader.readRecords(D)
}catch(A){this.fireEvent("loadexception",this,D,C.arg,A);
C.callback.call(C.scope||window,null,C.arg,false);
return 
}this.fireEvent("load",this,D,C.arg);
C.callback.call(C.scope||window,B,C.arg,true)
},handleFailure:function(A){this.trans=false;
this.destroyTrans(A,false);
this.fireEvent("loadexception",this,null,A.arg);
A.callback.call(A.scope||window,null,A.arg,false)
}});
Ext.data.JsonReader=function(B,A){Ext.data.JsonReader.superclass.constructor.call(this,B,A)
};
Ext.extend(Ext.data.JsonReader,Ext.data.DataReader,{read:function(_3){var _4=_3.responseText;
var o=eval("("+_4+")");
if(!o){throw {message:"JsonReader.read: Json object not found"}
}return this.readRecords(o)
},simpleAccess:function(B,A){return B[A]
},getJsonAccessor:function(){var A=/[\[\.]/;
return function(B){try{return(A.test(B))?new Function("obj","return obj."+B):function(D){return D[B]
}
}catch(C){}return Ext.emptyFn
}
}(),readRecords:function(M){this.jsonData=M;
var K=this.meta,F=this.recordType,R=F.prototype.fields,H=R.items,G=R.length;
if(!this.ef){if(K.totalProperty){this.getTotal=this.getJsonAccessor(K.totalProperty)
}if(K.successProperty){this.getSuccess=this.getJsonAccessor(K.successProperty)
}this.getRoot=K.root?this.getJsonAccessor(K.root):function(U){return U
};
if(K.id){var Q=this.getJsonAccessor(K.id);
this.getId=function(V){var U=Q(V);
return(U===undefined||U==="")?null:U
}
}else{this.getId=function(){return null
}
}this.ef=[];
for(var P=0;
P<G;
P++){R=H[P];
var T=(R.mapping!==undefined&&R.mapping!==null)?R.mapping:R.name;
this.ef[P]=this.getJsonAccessor(T)
}}var B=this.getRoot(M),S=B.length,A=S,E=true;
if(K.totalProperty){var I=parseInt(this.getTotal(M),10);
if(!isNaN(I)){A=I
}}if(K.successProperty){var I=this.getSuccess(M);
if(I===false||I==="false"){E=false
}}var D=[];
for(var P=0;
P<S;
P++){var N=B[P];
var C={};
var L=this.getId(N);
for(var O=0;
O<G;
O++){R=H[O];
var I=this.ef[O](N);
C[R.name]=R.convert((I!==undefined)?I:R.defaultValue)
}var J=new F(C,L);
J.json=N;
D[P]=J
}return{success:E,records:D,totalRecords:A}
}});
Ext.data.XmlReader=function(B,A){Ext.data.XmlReader.superclass.constructor.call(this,B,A)
};
Ext.extend(Ext.data.XmlReader,Ext.data.DataReader,{read:function(B){var A=B.responseXML;
if(!A){throw {message:"XmlReader.read: XML Document not available"}
}return this.readRecords(A)
},readRecords:function(H){this.xmlData=H;
var F=H.documentElement||H;
var M=Ext.DomQuery;
var D=this.recordType,C=D.prototype.fields;
var K=this.meta.id;
var J=0,I=true;
if(this.meta.totalRecords){J=M.selectNumber(this.meta.totalRecords,F,0)
}if(this.meta.success){var O=M.selectValue(this.meta.success,F,true);
I=O!==false&&O!=="false"
}var G=[];
var U=M.select(this.meta.record,F);
for(var R=0,S=U.length;
R<S;
R++){var P=U[R];
var E={};
var N=K?M.selectValue(K,P):undefined;
for(var Q=0,B=C.length;
Q<B;
Q++){var T=C.items[Q];
var L=M.selectValue(T.mapping||T.name,P,T.defaultValue);
L=T.convert(L);
E[T.name]=L
}var A=new D(E,N);
A.node=P;
G[G.length]=A
}return{success:I,records:G,totalRecords:J||G.length}
}});
Ext.data.ArrayReader=function(B,A){Ext.data.ArrayReader.superclass.constructor.call(this,B,A)
};
Ext.extend(Ext.data.ArrayReader,Ext.data.JsonReader,{readRecords:function(B){var O=this.meta?this.meta.id:null;
var M=this.recordType,L=M.prototype.fields;
var K=[];
var H=B;
for(var G=0;
G<H.length;
G++){var C=H[G];
var N={};
var A=((O||O===0)&&C[O]!==undefined&&C[O]!==""?C[O]:null);
for(var E=0,J=L.length;
E<J;
E++){var I=L.items[E];
var D=I.mapping!==undefined&&I.mapping!==null?I.mapping:E;
var P=C[D]!==undefined?C[D]:I.defaultValue;
P=I.convert(P);
N[I.name]=P
}var F=new M(N,A);
F.json=C;
K[K.length]=F
}return{records:K,totalRecords:K.length}
}});
Ext.data.Tree=function(A){this.nodeHash={};
this.root=null;
if(A){this.setRootNode(A)
}this.addEvents({append:true,remove:true,move:true,insert:true,beforeappend:true,beforeremove:true,beforemove:true,beforeinsert:true});
Ext.data.Tree.superclass.constructor.call(this)
};
Ext.extend(Ext.data.Tree,Ext.util.Observable,{pathSeparator:"/",getRootNode:function(){return this.root
},setRootNode:function(A){this.root=A;
A.ownerTree=this;
A.isRoot=true;
this.registerNode(A);
return A
},getNodeById:function(A){return this.nodeHash[A]
},registerNode:function(A){this.nodeHash[A.id]=A
},unregisterNode:function(A){delete this.nodeHash[A.id]
},toString:function(){return"[Tree"+(this.id?" "+this.id:"")+"]"
}});
Ext.data.Node=function(A){this.attributes=A||{};
this.leaf=this.attributes.leaf;
this.id=this.attributes.id;
if(!this.id){this.id=Ext.id(null,"ynode-");
this.attributes.id=this.id
}this.childNodes=[];
if(!this.childNodes.indexOf){this.childNodes.indexOf=function(D){for(var C=0,B=this.length;
C<B;
C++){if(this[C]==D){return C
}}return -1
}
}this.parentNode=null;
this.firstChild=null;
this.lastChild=null;
this.previousSibling=null;
this.nextSibling=null;
this.addEvents({append:true,remove:true,move:true,insert:true,beforeappend:true,beforeremove:true,beforemove:true,beforeinsert:true});
this.listeners=this.attributes.listeners;
Ext.data.Node.superclass.constructor.call(this)
};
Ext.extend(Ext.data.Node,Ext.util.Observable,{fireEvent:function(A){if(Ext.data.Node.superclass.fireEvent.apply(this,arguments)===false){return false
}var B=this.getOwnerTree();
if(B){if(B.fireEvent.apply(this.ownerTree,arguments)===false){return false
}}return true
},isLeaf:function(){return this.leaf===true
},setFirstChild:function(A){this.firstChild=A
},setLastChild:function(A){this.lastChild=A
},isLast:function(){return(!this.parentNode?true:this.parentNode.lastChild==this)
},isFirst:function(){return(!this.parentNode?true:this.parentNode.firstChild==this)
},hasChildNodes:function(){return !this.isLeaf()&&this.childNodes.length>0
},appendChild:function(B){var G=false;
if(B instanceof Array){G=B
}else{if(arguments.length>1){G=arguments
}}if(G){for(var C=0,A=G.length;
C<A;
C++){this.appendChild(G[C])
}}else{if(this.fireEvent("beforeappend",this.ownerTree,this,B)===false){return false
}var E=this.childNodes.length;
var D=B.parentNode;
if(D){if(B.fireEvent("beforemove",B.getOwnerTree(),B,D,this,E)===false){return false
}D.removeChild(B)
}E=this.childNodes.length;
if(E==0){this.setFirstChild(B)
}this.childNodes.push(B);
B.parentNode=this;
var F=this.childNodes[E-1];
if(F){B.previousSibling=F;
F.nextSibling=B
}else{B.previousSibling=null
}B.nextSibling=null;
this.setLastChild(B);
B.setOwnerTree(this.getOwnerTree());
this.fireEvent("append",this.ownerTree,this,B,E);
if(D){B.fireEvent("move",this.ownerTree,B,D,this,E)
}return B
}},removeChild:function(B){var A=this.childNodes.indexOf(B);
if(A==-1){return false
}if(this.fireEvent("beforeremove",this.ownerTree,this,B)===false){return false
}this.childNodes.splice(A,1);
if(B.previousSibling){B.previousSibling.nextSibling=B.nextSibling
}if(B.nextSibling){B.nextSibling.previousSibling=B.previousSibling
}if(this.firstChild==B){this.setFirstChild(B.nextSibling)
}if(this.lastChild==B){this.setLastChild(B.previousSibling)
}B.setOwnerTree(null);
B.parentNode=null;
B.previousSibling=null;
B.nextSibling=null;
this.fireEvent("remove",this.ownerTree,this,B);
return B
},insertBefore:function(C,B){if(!B){return this.appendChild(C)
}if(C==B){return false
}if(this.fireEvent("beforeinsert",this.ownerTree,this,C,B)===false){return false
}var A=this.childNodes.indexOf(B);
var E=C.parentNode;
var D=A;
if(E==this&&this.childNodes.indexOf(C)<A){D--
}if(E){if(C.fireEvent("beforemove",C.getOwnerTree(),C,E,this,A,B)===false){return false
}E.removeChild(C)
}if(D==0){this.setFirstChild(C)
}this.childNodes.splice(D,0,C);
C.parentNode=this;
var F=this.childNodes[D-1];
if(F){C.previousSibling=F;
F.nextSibling=C
}else{C.previousSibling=null
}C.nextSibling=B;
B.previousSibling=C;
C.setOwnerTree(this.getOwnerTree());
this.fireEvent("insert",this.ownerTree,this,C,B);
if(E){C.fireEvent("move",this.ownerTree,C,E,this,D,B)
}return C
},item:function(A){return this.childNodes[A]
},replaceChild:function(B,A){this.insertBefore(B,A);
this.removeChild(A);
return A
},indexOf:function(A){return this.childNodes.indexOf(A)
},getOwnerTree:function(){if(!this.ownerTree){var A=this;
while(A){if(A.ownerTree){this.ownerTree=A.ownerTree;
break
}A=A.parentNode
}}return this.ownerTree
},getDepth:function(){var B=0;
var A=this;
while(A.parentNode){++B;
A=A.parentNode
}return B
},setOwnerTree:function(D){if(D!=this.ownerTree){if(this.ownerTree){this.ownerTree.unregisterNode(this)
}this.ownerTree=D;
var C=this.childNodes;
for(var B=0,A=C.length;
B<A;
B++){C[B].setOwnerTree(D)
}if(D){D.registerNode(this)
}}},getPath:function(C){C=C||"id";
var D=this.parentNode;
var A=[this.attributes[C]];
while(D){A.unshift(D.attributes[C]);
D=D.parentNode
}var B=this.getOwnerTree().pathSeparator;
return B+A.join(B)
},bubble:function(C,B,A){var D=this;
while(D){if(C.call(B||D,A||D)===false){break
}D=D.parentNode
}},cascade:function(F,C,B){if(F.call(C||this,B||this)!==false){var E=this.childNodes;
for(var D=0,A=E.length;
D<A;
D++){E[D].cascade(F,C,B)
}}},eachChild:function(D,F,E){var C=this.childNodes;
for(var B=0,A=C.length;
B<A;
B++){if(D.call(F||this,E||C[B])===false){break
}}},findChild:function(E,D){var C=this.childNodes;
for(var B=0,A=C.length;
B<A;
B++){if(C[B].attributes[E]==D){return C[B]
}}return null
},findChildBy:function(E,B){var D=this.childNodes;
for(var C=0,A=D.length;
C<A;
C++){if(E.call(B||D[C],D[C])===true){return D[C]
}}return null
},sort:function(E,F){var D=this.childNodes;
var B=D.length;
if(B>0){var A=F?function(){E.apply(F,arguments)
}:E;
D.sort(A);
for(var C=0;
C<B;
C++){var G=D[C];
G.previousSibling=D[C-1];
G.nextSibling=D[C+1];
if(C==0){this.setFirstChild(G)
}if(C==B-1){this.setLastChild(G)
}}}},contains:function(A){return A.isAncestor(this)
},isAncestor:function(A){var B=this.parentNode;
while(B){if(B==A){return true
}B=B.parentNode
}return false
},toString:function(){return"[Node"+(this.id?" "+this.id:"")+"]"
}});
Ext.ComponentMgr=function(){var A=new Ext.util.MixedCollection();
return{register:function(B){A.add(B)
},unregister:function(B){A.remove(B)
},get:function(B){return A.get(B)
},onAvailable:function(D,C,B){A.on("add",function(E,F){if(F.id==D){C.call(B||F,F);
A.un("add",C,B)
}})
}}
}();
Ext.Component=function(A){A=A||{};
if(A.tagName||A.dom||typeof A=="string"){A={el:A,id:A.id||A}
}this.initialConfig=A;
Ext.apply(this,A);
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()
};
Ext.Component.AUTO_ID=1000;
Ext.extend(Ext.Component,Ext.util.Observable,{hidden:false,disabled:false,disabledClass:"x-item-disabled",rendered:false,allowDomMove:true,ctype:"Ext.Component",actionMode:"el",getActionEl:function(){return this[this.actionMode]
},initComponent:Ext.emptyFn,render:function(B,A){if(!this.rendered&&this.fireEvent("beforerender",this)!==false){if(!B&&this.el){this.el=Ext.get(this.el);
B=this.el.dom.parentNode;
this.allowDomMove=false
}this.container=Ext.get(B);
this.rendered=true;
if(A!==undefined){if(typeof A=="number"){A=this.container.dom.childNodes[A]
}else{A=Ext.getDom(A)
}}this.onRender(this.container,A||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(B,A){if(this.el){this.el=Ext.get(this.el);
if(this.allowDomMove!==false){B.dom.insertBefore(this.el.dom,A)
}}},getAutoCreate:function(){var A=typeof this.autoCreate=="object"?this.autoCreate:Ext.apply({},this.defaultAutoCreate);
if(this.id&&!A.id){A.id=this.id
}return A
},afterRender:Ext.emptyFn,destroy:function(){if(this.fireEvent("beforedestroy",this)!==false){this.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(A){if(this.rendered){this.el.focus();
if(A===true){this.el.dom.select()
}}return this
},blur:function(){if(this.rendered){this.el.blur()
}return this
},disable:function(){if(this.rendered){this.onDisable()
}this.disabled=true;
this.fireEvent("disable",this);
return this
},onDisable:function(){this.getActionEl().addClass(this.disabledClass);
this.el.dom.disabled=true
},enable:function(){if(this.rendered){this.onEnable()
}this.disabled=false;
this.fireEvent("enable",this);
return this
},onEnable:function(){this.getActionEl().removeClass(this.disabledClass);
this.el.dom.disabled=false
},setDisabled:function(A){this[A?"disable":"enable"]()
},show:function(){if(this.fireEvent("beforeshow",this)!==false){this.hidden=false;
if(this.rendered){this.onShow()
}this.fireEvent("show",this)
}return this
},onShow:function(){var A=this.getActionEl().dom.style;
A.display="";
A.visibility="visible"
},hide:function(){if(this.fireEvent("beforehide",this)!==false){this.hidden=true;
if(this.rendered){this.onHide()
}this.fireEvent("hide",this)
}return this
},onHide:function(){this.getActionEl().dom.style.display="none"
},setVisible:function(A){if(A){this.show()
}else{this.hide()
}return this
},isVisible:function(){return this.getActionEl().isVisible()
},cloneConfig:function(B){B=B||{};
var C=B.id||Ext.id();
var A=Ext.applyIf(B,this.initialConfig);
A.id=C;
return new this.__extcls(A)
}});
(function(){Ext.Layer=function(G,E){G=G||{};
var D=Ext.DomHelper;
var F=G.parentEl,C=F?Ext.getDom(F):document.body;
if(E){this.dom=Ext.getDom(E)
}if(!this.dom){var H=G.dh||{tag:"div",cls:"x-layer"};
this.dom=D.append(C,H)
}if(G.cls){this.addClass(G.cls)
}this.constrain=G.constrain!==false;
this.visibilityMode=Ext.Element.VISIBILITY;
if(G.id){this.id=this.dom.id=G.id
}else{this.id=Ext.id(this.dom)
}this.zindex=G.zindex||this.getZIndex();
this.position("absolute",this.zindex);
if(G.shadow){this.shadowOffset=G.shadowOffset||4;
this.shadow=new Ext.Shadow({offset:this.shadowOffset,mode:G.shadow})
}else{this.shadowOffset=0
}this.useShim=G.shim!==false&&Ext.useShims;
this.useDisplay=G.useDisplay;
this.hide()
};
var B=Ext.Element.prototype;
var A=[];
Ext.extend(Ext.Layer,Ext.Element,{getZIndex:function(){return this.zindex||parseInt(this.getStyle("z-index"),10)||11000
},getShim:function(){if(!this.useShim){return null
}if(this.shim){return this.shim
}var C=A.shift();
if(!C){C=this.createShim();
C.enableDisplayMode("block");
C.dom.style.display="none";
C.dom.style.visibility="visible"
}var D=this.dom.parentNode;
if(C.dom.parentNode!=D){D.insertBefore(C.dom,this.dom)
}C.setStyle("z-index",this.getZIndex()-2);
this.shim=C;
return C
},hideShim:function(){if(this.shim){this.shim.setDisplayed(false);
A.push(this.shim);
delete this.shim
}},disableShadow:function(){if(this.shadow){this.shadowDisabled=true;
this.shadow.hide();
this.lastShadowOffset=this.shadowOffset;
this.shadowOffset=0
}},enableShadow:function(C){if(this.shadow){this.shadowDisabled=false;
this.shadowOffset=this.lastShadowOffset;
delete this.lastShadowOffset;
if(C){this.sync(true)
}}},sync:function(F){var I=this.shadow;
if(!this.updating&&this.isVisible()&&(I||this.useShim)){var E=this.getShim();
var H=this.getWidth(),D=this.getHeight();
var C=this.getLeft(true),J=this.getTop(true);
if(I&&!this.shadowDisabled){if(F&&!I.isVisible()){I.show(this)
}else{I.realign(C,J,H,D)
}if(E){if(F){E.show()
}var G=I.adjusts,K=E.dom.style;
K.left=(Math.min(C,C+G.l))+"px";
K.top=(Math.min(J,J+G.t))+"px";
K.width=(H+G.w)+"px";
K.height=(D+G.h)+"px"
}}else{if(E){if(F){E.show()
}E.setSize(H,D);
E.setLeftTop(C,J)
}}}},destroy:function(){this.hideShim();
if(this.shadow){this.shadow.hide()
}this.removeAllListeners();
var C=this.dom.parentNode;
if(C){C.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(C){if(this.shadow){this.shadow.hide()
}this.hideShim()
},constrainXY:function(){if(this.constrain){var G=Ext.lib.Dom.getViewWidth(),D=Ext.lib.Dom.getViewHeight();
var L=Ext.get(document).getScroll();
var K=this.getXY();
var H=K[0],F=K[1];
var I=this.dom.offsetWidth+this.shadowOffset,E=this.dom.offsetHeight+this.shadowOffset;
var C=false;
if((H+I)>G+L.left){H=G-I-this.shadowOffset;
C=true
}if((F+E)>D+L.top){F=D-E-this.shadowOffset;
C=true
}if(H<L.left){H=L.left;
C=true
}if(F<L.top){F=L.top;
C=true
}if(C){if(this.avoidY){var J=this.avoidY;
if(F<=J&&(F+E)>=J){F=J-E-5
}}K=[H,F];
this.storeXY(K);
B.setXY.call(this,K);
this.sync()
}}},isVisible:function(){return this.visible
},showAction:function(){this.visible=true;
if(this.useDisplay===true){this.setDisplayed("")
}else{if(this.lastXY){B.setXY.call(this,this.lastXY)
}else{if(this.lastLT){B.setLeftTop.call(this,this.lastLT[0],this.lastLT[1])
}}}},hideAction:function(){this.visible=false;
if(this.useDisplay===true){this.setDisplayed(false)
}else{this.setLeftTop(-10000,-10000)
}},setVisible:function(E,D,G,H,F){if(E){this.showAction()
}if(D&&E){var C=function(){this.sync(true);
if(H){H()
}}.createDelegate(this);
B.setVisible.call(this,true,true,G,C,F)
}else{if(!E){this.hideUnders(true)
}var C=H;
if(D){C=function(){this.hideAction();
if(H){H()
}}.createDelegate(this)
}B.setVisible.call(this,E,D,G,C,F);
if(E){this.sync(true)
}else{if(!D){this.hideAction()
}}}},storeXY:function(C){delete this.lastLT;
this.lastXY=C
},storeLeftTop:function(C,D){delete this.lastXY;
this.lastLT=[C,D]
},beforeFx:function(){this.beforeAction();
return Ext.Layer.superclass.beforeFx.apply(this,arguments)
},afterFx:function(){Ext.Layer.superclass.afterFx.apply(this,arguments);
this.sync(this.isVisible())
},beforeAction:function(){if(!this.updating&&this.shadow){this.shadow.hide()
}},setLeft:function(C){this.storeLeftTop(C,this.getTop(true));
B.setLeft.apply(this,arguments);
this.sync()
},setTop:function(C){this.storeLeftTop(this.getLeft(true),C);
B.setTop.apply(this,arguments);
this.sync()
},setLeftTop:function(C,D){this.storeLeftTop(C,D);
B.setLeftTop.apply(this,arguments);
this.sync()
},setXY:function(F,D,G,H,E){this.fixDisplay();
this.beforeAction();
this.storeXY(F);
var C=this.createCB(H);
B.setXY.call(this,F,D,G,C,E);
if(!D){C()
}},createCB:function(D){var C=this;
return function(){C.constrainXY();
C.sync(true);
if(D){D()
}}
},setX:function(C,D,F,G,E){this.setXY([C,this.getY()],D,F,G,E)
},setY:function(G,C,E,F,D){this.setXY([this.getX(),G],C,E,F,D)
},setSize:function(E,F,D,H,I,G){this.beforeAction();
var C=this.createCB(I);
B.setSize.call(this,E,F,D,H,C,G);
if(!D){C()
}},setWidth:function(E,D,G,H,F){this.beforeAction();
var C=this.createCB(H);
B.setWidth.call(this,E,D,G,C,F);
if(!D){C()
}},setHeight:function(E,D,G,H,F){this.beforeAction();
var C=this.createCB(H);
B.setHeight.call(this,E,D,G,C,F);
if(!D){C()
}},setBounds:function(J,H,K,D,I,F,G,E){this.beforeAction();
var C=this.createCB(G);
if(!I){this.storeXY([J,H]);
B.setXY.call(this,[J,H]);
B.setSize.call(this,K,D,I,F,C,E);
C()
}else{B.setBounds.call(this,J,H,K,D,I,F,C,E)
}return this
},setZIndex:function(C){this.zindex=C;
this.setStyle("z-index",C+2);
if(this.shadow){this.shadow.setZIndex(C+1)
}if(this.shim){this.shim.setStyle("z-index",C)
}}})
})();
Ext.Shadow=function(B){Ext.apply(this,B);
if(typeof this.mode!="string"){this.mode=this.defaultMode
}var C=this.offset,A={h:0};
switch(this.mode.toLowerCase()){case"drop":A.w=0;
A.l=A.t=C;
break;
case"sides":A.w=(C*2);
A.l=-C;
A.t=C;
break;
case"frame":A.w=A.h=(C*2);
A.l=A.t=-C;
break
}this.adjusts=A
};
Ext.Shadow.prototype={offset:4,defaultMode:"drop",show:function(A){A=Ext.get(A);
if(!this.el){this.el=Ext.Shadow.Pool.pull();
if(this.el.dom.nextSibling!=A.dom){this.el.insertBefore(A)
}}this.el.setStyle("z-index",this.zIndex||parseInt(A.getStyle("z-index"),10)-1);
if(Ext.isIE){this.el.dom.style.filter="progid:DXImageTransform.Microsoft.alpha(opacity=50) progid:DXImageTransform.Microsoft.Blur(pixelradius="+this.offset+")"
}this.realign(A.getLeft(true),A.getTop(true),A.getWidth(),A.getHeight());
this.el.dom.style.display="block"
},isVisible:function(){return this.el?true:false
},realign:function(A,M,L,D){if(!this.el){return 
}var I=this.adjusts,F=this.el.dom,N=F.style;
var G=0;
if(Ext.isIE){G=-(this.offset)
}N.left=(A+I.l+G)+"px";
N.top=(M+I.t+G)+"px";
var K=(L+I.w),C=(D+I.h),E=K+"px",J=C+"px";
if(N.width!=E||N.height!=J){N.width=E;
N.height=J;
if(!Ext.isIE){var H=F.childNodes;
var B=Math.max(0,(K-12))+"px";
H[0].childNodes[1].style.width=B;
H[1].childNodes[1].style.width=B;
H[2].childNodes[1].style.width=B;
H[1].style.height=Math.max(0,(C-12))+"px"
}}},hide:function(){if(this.el){this.el.dom.style.display="none";
Ext.Shadow.Pool.push(this.el);
delete this.el
}},setZIndex:function(A){this.zIndex=A;
if(this.el){this.el.setStyle("z-index",A)
}}};
Ext.Shadow.Pool=function(){var B=[];
var A=Ext.isIE?'<div class="x-ie-shadow"></div>':'<div class="x-shadow"><div class="xst"><div class="xstl"></div><div class="xstc"></div><div class="xstr"></div></div><div class="xsc"><div class="xsml"></div><div class="xsmc"></div><div class="xsmr"></div></div><div class="xsb"><div class="xsbl"></div><div class="xsbc"></div><div class="xsbr"></div></div></div>';
return{pull:function(){var C=B.shift();
if(!C){C=Ext.get(Ext.DomHelper.insertHtml("beforeBegin",document.body.firstChild,A));
C.autoBoxAdjust=false
}return C
},push:function(C){B.push(C)
}}
}();
Ext.BoxComponent=function(A){Ext.BoxComponent.superclass.constructor.call(this,A);
this.addEvents({resize:true,move:true})
};
Ext.extend(Ext.BoxComponent,Ext.Component,{boxReady:false,deferHeight:false,setSize:function(B,D){if(typeof B=="object"){D=B.height;
B=B.width
}if(!this.boxReady){this.width=B;
this.height=D;
return 
}if(this.lastSize&&this.lastSize.width==B&&this.lastSize.height==D){return 
}this.lastSize={width:B,height:D};
var C=this.adjustSize(B,D);
var F=C.width,A=C.height;
if(F!==undefined||A!==undefined){var E=this.getResizeEl();
if(!this.deferHeight&&F!==undefined&&A!==undefined){E.setSize(F,A)
}else{if(!this.deferHeight&&A!==undefined){E.setHeight(A)
}else{if(F!==undefined){E.setWidth(F)
}}}this.onResize(F,A,B,D);
this.fireEvent("resize",this,F,A,B,D)
}return this
},getSize:function(){return this.el.getSize()
},getPosition:function(A){if(A===true){return[this.el.getLeft(true),this.el.getTop(true)]
}return this.xy||this.el.getXY()
},getBox:function(A){var B=this.el.getSize();
if(A){B.x=this.el.getLeft(true);
B.y=this.el.getTop(true)
}else{var C=this.xy||this.el.getXY();
B.x=C[0];
B.y=C[1]
}return B
},updateBox:function(A){this.setSize(A.width,A.height);
this.setPagePosition(A.x,A.y)
},getResizeEl:function(){return this.resizeEl||this.el
},setPosition:function(A,E){this.x=A;
this.y=E;
if(!this.boxReady){return 
}var D=this.adjustPosition(A,E);
var C=D.x,B=D.y;
if(C!==undefined||B!==undefined){if(C!==undefined&&B!==undefined){this.el.setLeftTop(C,B)
}else{if(C!==undefined){this.el.setLeft(C)
}else{if(B!==undefined){this.el.setTop(B)
}}}this.onPosition(C,B);
this.fireEvent("move",this,C,B)
}return this
},setPagePosition:function(A,C){this.pageX=A;
this.pageY=C;
if(!this.boxReady){return 
}if(A===undefined||C===undefined){return 
}var B=this.el.translatePoints(A,C);
this.setPosition(B.left,B.top);
return this
},onRender:function(B,A){Ext.BoxComponent.superclass.onRender.call(this,B,A);
if(this.resizeEl){this.resizeEl=Ext.get(this.resizeEl)
}},afterRender:function(){Ext.BoxComponent.superclass.afterRender.call(this);
this.boxReady=true;
this.setSize(this.width,this.height);
if(this.x||this.y){this.setPosition(this.x,this.y)
}if(this.pageX||this.pageY){this.setPagePosition(this.pageX,this.pageY)
}},syncSize:function(){this.setSize(this.el.getWidth(),this.el.getHeight())
},onResize:function(C,B,A,D){},onPosition:function(A,B){},adjustSize:function(A,B){if(this.autoWidth){A="auto"
}if(this.autoHeight){B="auto"
}return{width:A,height:B}
},adjustPosition:function(A,B){return{x:A,y:B}
}});
Ext.View=function(C,B,A){this.el=Ext.get(C,true);
if(typeof B=="string"){B=new Ext.Template(B)
}B.compile();
this.tpl=B;
Ext.apply(this,A);
this.addEvents({beforeclick:true,click:true,dblclick:true,contextmenu:true,selectionchange:true,beforeselect:true});
this.el.on({click:this.onClick,dblclick:this.onDblClick,contextmenu:this.onContextMenu,scope:this});
this.selections=[];
this.nodes=[];
this.cmp=new Ext.CompositeElementLite([]);
if(this.store){this.setStore(this.store,true)
}Ext.View.superclass.constructor.call(this)
};
Ext.extend(Ext.View,Ext.util.Observable,{selectedClass:"x-view-selected",emptyText:"",getEl:function(){return this.el
},refresh:function(){var F=this.tpl;
this.clearSelections();
this.el.update("");
var E=[];
var C=this.store.getRange();
if(C.length<1){this.el.update(this.emptyText);
return 
}for(var D=0,B=C.length;
D<B;
D++){var A=this.prepareData(C[D].data,D,C[D]);
E[E.length]=F.apply(A)
}this.el.update(E.join(""));
this.nodes=this.el.dom.childNodes;
this.updateIndexes(0)
},prepareData:function(A){return A
},onUpdate:function(C,B){this.clearSelections();
var A=this.store.indexOf(B);
var D=this.nodes[A];
this.tpl.insertBefore(D,this.prepareData(B.data));
D.parentNode.removeChild(D);
this.updateIndexes(A,A)
},onAdd:function(C,G,E){this.clearSelections();
if(this.nodes.length==0){this.refresh();
return 
}var F=this.nodes[E];
for(var B=0,A=G.length;
B<A;
B++){var D=this.prepareData(G[B].data);
if(F){this.tpl.insertBefore(F,D)
}else{this.tpl.append(this.el,D)
}}this.updateIndexes(E)
},onRemove:function(C,B,A){this.clearSelections();
this.el.dom.removeChild(this.nodes[A]);
this.updateIndexes(A)
},refreshNode:function(A){this.onUpdate(this.store,this.store.getAt(A))
},updateIndexes:function(D,B){var C=this.nodes;
D=D||0;
B=B||C.length-1;
for(var A=D;
A<=B;
A++){C[A].nodeIndex=A
}},setStore:function(B,A){if(!A&&this.store){this.store.un("datachanged",this.refresh);
this.store.un("add",this.onAdd);
this.store.un("remove",this.onRemove);
this.store.un("update",this.onUpdate);
this.store.un("clear",this.refresh)
}if(B){B.on("datachanged",this.refresh,this);
B.on("add",this.onAdd,this);
B.on("remove",this.onRemove,this);
B.on("update",this.onUpdate,this);
B.on("clear",this.refresh,this)
}this.store=B;
this.refresh()
},findItemFromChild:function(A){var B=this.el.dom;
if(!A||A.parentNode==B){return A
}var C=A.parentNode;
while(C&&C!=B){if(C.parentNode==B){return C
}C=C.parentNode
}return null
},onClick:function(C){var B=this.findItemFromChild(C.getTarget());
if(B){var A=this.indexOf(B);
if(this.onItemClick(B,A,C)!==false){this.fireEvent("click",this,A,B,C)
}}else{this.clearSelections()
}},onContextMenu:function(B){var A=this.findItemFromChild(B.getTarget());
if(A){this.fireEvent("contextmenu",this,this.indexOf(A),A,B)
}},onDblClick:function(B){var A=this.findItemFromChild(B.getTarget());
if(A){this.fireEvent("dblclick",this,this.indexOf(A),A,B)
}},onItemClick:function(B,A,C){if(this.fireEvent("beforeclick",this,A,B,C)===false){return false
}if(this.multiSelect||this.singleSelect){if(this.multiSelect&&C.shiftKey&&this.lastSelection){this.select(this.getNodes(this.indexOf(this.lastSelection),A),false)
}else{this.select(B,this.multiSelect&&C.ctrlKey);
this.lastSelection=B
}C.preventDefault()
}return true
},getSelectionCount:function(){return this.selections.length
},getSelectedNodes:function(){return this.selections
},getSelectedIndexes:function(){var C=[],D=this.selections;
for(var B=0,A=D.length;
B<A;
B++){C.push(D[B].nodeIndex)
}return C
},clearSelections:function(A){if(this.nodes&&(this.multiSelect||this.singleSelect)&&this.selections.length>0){this.cmp.elements=this.selections;
this.cmp.removeClass(this.selectedClass);
this.selections=[];
if(!A){this.fireEvent("selectionchange",this,this.selections)
}}},isSelected:function(A){var B=this.selections;
if(B.length<1){return false
}A=this.getNode(A);
return B.indexOf(A)!==-1
},select:function(F,E,D){if(F instanceof Array){if(!E){this.clearSelections(true)
}for(var B=0,A=F.length;
B<A;
B++){this.select(F[B],true,true)
}}else{var C=this.getNode(F);
if(C&&!this.isSelected(C)){if(!E){this.clearSelections(true)
}if(this.fireEvent("beforeselect",this,C,this.selections)!==false){Ext.fly(C).addClass(this.selectedClass);
this.selections.push(C);
if(!D){this.fireEvent("selectionchange",this,this.selections)
}}}}},getNode:function(A){if(typeof A=="string"){return document.getElementById(A)
}else{if(typeof A=="number"){return this.nodes[A]
}}return A
},getNodes:function(E,A){var D=this.nodes;
E=E||0;
A=typeof A=="undefined"?D.length-1:A;
var C=[];
if(E<=A){for(var B=E;
B<=A;
B++){C.push(D[B])
}}else{for(var B=E;
B>=A;
B--){C.push(D[B])
}}return C
},indexOf:function(D){D=this.getNode(D);
if(typeof D.nodeIndex=="number"){return D.nodeIndex
}var C=this.nodes;
for(var B=0,A=C.length;
B<A;
B++){if(C[B]==D){return B
}}return -1
}});
Ext.JsonView=function(D,C,B){Ext.JsonView.superclass.constructor.call(this,D,C,B);
var A=this.el.getUpdateManager();
A.setRenderer(this);
A.on("update",this.onLoad,this);
A.on("failure",this.onLoadException,this);
this.addEvents({beforerender:true,load:true,loadexception:true})
};
Ext.extend(Ext.JsonView,Ext.View,{jsonRoot:"",refresh:function(){this.clearSelections();
this.el.update("");
var D=[];
var E=this.jsonData;
if(E&&E.length>0){for(var C=0,B=E.length;
C<B;
C++){var A=this.prepareData(E[C],C,E);
D[D.length]=this.tpl.apply(A)
}}else{D.push(this.emptyText)
}this.el.update(D.join(""));
this.nodes=this.el.dom.childNodes;
this.updateIndexes(0)
},load:function(){var A=this.el.getUpdateManager();
A.update.apply(A,arguments)
},render:function(el,_c){this.clearSelections();
this.el.update("");
var o;
try{o=Ext.util.JSON.decode(_c.responseText);
if(this.jsonRoot){o=eval("o."+this.jsonRoot)
}}catch(e){}this.jsonData=o;
this.beforeRender();
this.refresh()
},getCount:function(){return this.jsonData?this.jsonData.length:0
},getNodeData:function(B){if(B instanceof Array){var D=[];
for(var C=0,A=B.length;
C<A;
C++){D.push(this.getNodeData(B[C]))
}return D
}return this.jsonData[this.indexOf(B)]||null
},beforeRender:function(){this.snapshot=this.jsonData;
if(this.sortInfo){this.sort.apply(this,this.sortInfo)
}this.fireEvent("beforerender",this,this.jsonData)
},onLoad:function(A,B){this.fireEvent("load",this,this.jsonData,B)
},onLoadException:function(A,B){this.fireEvent("loadexception",this,B)
},filter:function(F,C){if(this.jsonData){var B=[];
var E=this.snapshot;
if(typeof C=="string"){var G=C.length;
if(G==0){this.clearFilter();
return 
}C=C.toLowerCase();
for(var D=0,A=E.length;
D<A;
D++){var H=E[D];
if(H[F].substr(0,G).toLowerCase()==C){B.push(H)
}}}else{if(C.exec){for(var D=0,A=E.length;
D<A;
D++){var H=E[D];
if(C.test(H[F])){B.push(H)
}}}else{return 
}}this.jsonData=B;
this.refresh()
}},filterBy:function(F,B){if(this.jsonData){var C=[];
var E=this.snapshot;
for(var D=0,A=E.length;
D<A;
D++){var G=E[D];
if(F.call(B||this,G)){C.push(G)
}}this.jsonData=C;
this.refresh()
}},clearFilter:function(){if(this.snapshot&&this.jsonData!=this.snapshot){this.jsonData=this.snapshot;
this.refresh()
}},sort:function(E,A,C){this.sortInfo=Array.prototype.slice.call(arguments,0);
if(this.jsonData){var F=E;
var B=A&&A.toLowerCase()=="desc";
var D=function(H,G){var J=C?C(H[F]):H[F];
var I=C?C(G[F]):G[F];
if(J<I){return B?+1:-1
}else{if(J>I){return B?-1:+1
}else{return 0
}}};
this.jsonData.sort(D);
this.refresh();
if(this.jsonData!=this.snapshot){this.snapshot.sort(D)
}}}});
Ext.ColorPalette=function(A){Ext.ColorPalette.superclass.constructor.call(this,A);
this.addEvents({select:true});
if(this.handler){this.on("select",this.handler,this.scope,true)
}};
Ext.extend(Ext.ColorPalette,Ext.Component,{itemCls:"x-color-palette",value:null,ctype:"Ext.ColorPalette",colors:["000000","993300","333300","003300","003366","000080","333399","333333","800000","FF6600","808000","008000","008080","0000FF","666699","808080","FF0000","FF9900","99CC00","339966","33CCCC","3366FF","800080","969696","FF00FF","FFCC00","FFFF00","00FF00","00FFFF","00CCFF","993366","C0C0C0","FF99CC","FFCC99","FFFF99","CCFFCC","CCFFFF","99CCFF","CC99FF","FFFFFF"],onRender:function(F,E){var C=new Ext.MasterTemplate('<tpl><a href="#" class="color-{0}" hidefocus="on"><em><span style="background:#{0}">&#160;</span></em></a></tpl>');
var G=this.colors;
for(var B=0,A=G.length;
B<A;
B++){C.add([G[B]])
}var D=document.createElement("div");
D.className=this.itemCls;
C.overwrite(D);
F.dom.insertBefore(D,E);
this.el=Ext.get(D);
this.el.on("click",this.handleClick,this,{delegate:"a"})
},afterRender:function(){Ext.ColorPalette.superclass.afterRender.call(this);
if(this.value){var A=this.value;
this.value=null;
this.select(A)
}},handleClick:function(B,A){B.preventDefault();
if(!this.disabled){var C=A.className.match(/(?:^|\s)color-(.{6})(?:\s|$)/)[1];
this.select(C.toUpperCase())
}},select:function(A){A=A.replace("#","");
if(A!=this.value){var B=this.el;
if(this.value){B.child("a.color-"+this.value).removeClass("x-color-palette-sel")
}B.child("a.color-"+A).addClass("x-color-palette-sel");
this.value=A;
this.fireEvent("select",this,A)
}}});
Ext.DatePicker=function(D){Ext.DatePicker.superclass.constructor.call(this,D);
this.value=D&&D.value?D.value.clearTime():new Date().clearTime();
this.addEvents({select:true});
if(this.handler){this.on("select",this.handler,this.scope||this)
}if(!this.disabledDatesRE&&this.disabledDates){var A=this.disabledDates;
var C="(?:";
for(var B=0;
B<A.length;
B++){C+=A[B];
if(B!=A.length-1){C+="|"
}}this.disabledDatesRE=new RegExp(C+")")
}};
Ext.extend(Ext.DatePicker,Ext.Component,{todayText:"Today",todayTip:"{0} (Spacebar)",minDate:null,maxDate:null,minText:"This date is before the minimum date",maxText:"This date is after the maximum date",format:"m/d/y",disabledDays:null,disabledDaysText:"",disabledDatesRE:null,disabledDatesText:"",constrainToViewport:true,monthNames:Date.monthNames,dayNames:Date.dayNames,nextText:"Next Month (Control+Right)",prevText:"Previous Month (Control+Left)",monthYearText:"Choose a month (Control+Up/Down to move years)",startDay:0,setValue:function(B){var A=this.value;
this.value=B.clearTime(true);
if(this.el){this.update(this.value)
}},getValue:function(){return this.value
},focus:function(){if(this.el){this.update(this.activeDate)
}},onRender:function(J,I){var F=['<table cellspacing="0">','<tr><td class="x-date-left"><a href="#" title="',this.prevText,'">&#160;</a></td><td class="x-date-middle" align="center"></td><td class="x-date-right"><a href="#" title="',this.nextText,'">&#160;</a></td></tr>','<tr><td colspan="3"><table class="x-date-inner" cellspacing="0"><thead><tr>'];
var H=this.dayNames;
for(var G=0;
G<7;
G++){var K=this.startDay+G;
if(K>6){K=K-7
}F.push("<th><span>",H[K].substr(0,1),"</span></th>")
}F[F.length]="</tr></thead><tbody><tr>";
for(var G=0;
G<42;
G++){if(G%7==0&&G!=0){F[F.length]="</tr><tr>"
}F[F.length]='<td><a href="#" hidefocus="on" class="x-date-date" tabIndex="1"><em><span></span></em></a></td>'
}F[F.length]='</tr></tbody></table></td></tr><tr><td colspan="3" class="x-date-bottom" align="center"></td></tr></table>';
var A=document.createElement("div");
A.className="x-date-picker";
A.innerHTML=F.join("");
J.dom.insertBefore(A,I);
this.el=Ext.get(A);
new Ext.util.ClickRepeater(this.el.child("td.x-date-left a"),{handler:this.showPrevMonth,scope:this});
new Ext.util.ClickRepeater(this.el.child("td.x-date-right a"),{handler:this.showNextMonth,scope:this});
this.el.on("mousewheel",this.handleMouseWheel,this);
var L=new Ext.KeyNav(this.el,{left:function(M){M.ctrlKey?this.showPrevMonth():this.update(this.activeDate.add("d",-1))
},right:function(M){M.ctrlKey?this.showNextMonth():this.update(this.activeDate.add("d",1))
},up:function(M){M.ctrlKey?this.showNextYear():this.update(this.activeDate.add("d",-7))
},down:function(M){M.ctrlKey?this.showPrevYear():this.update(this.activeDate.add("d",7))
},pageUp:function(M){this.showNextMonth()
},pageDown:function(M){this.showPrevMonth()
},enter:function(M){M.stopPropagation();
return true
},scope:this});
this.el.on("click",this.handleDateClick,this,{delegate:"a.x-date-date"});
this.el.addKeyListener(Ext.EventObject.SPACE,this.selectToday,this);
this.el.unselectable();
this.cells=this.el.select("table.x-date-inner tbody td");
this.textNodes=this.el.query("table.x-date-inner tbody span");
var E=new Ext.menu.Menu({plain:true,cls:"x-date-mmenu",allowOtherMenus:true});
var C=Ext.id()+"months";
for(var G=0;
G<12;
G++){E.add(new Ext.menu.CheckItem({id:"mm-"+G,text:this.monthNames[G],group:C,month:G}))
}E.on({beforeshow:function(){E.items.get("mm-"+(this.activeDate||this.value).getMonth()).setChecked(true)
},itemclick:function(M){var N=(this.activeDate||this.value).clone();
N.setMonth(M.month);
this.update(N)
},show:function(M){this.visibleRegion=M.el.getRegion().adjust(2,2,-2,-2)
},mouseout:function(M,N){if(!this.visibleRegion.contains(N.getPoint())){M.hide()
}},scope:this});
this.mbtn=new Ext.Button(this.el.child("td.x-date-middle",true),{menu:E,text:"&#160;",menuAlign:"c-c?",tooltip:this.monthYearText});
var D=(new Date()).dateFormat(this.format);
var B=new Ext.Button(this.el.child("td.x-date-bottom",true),{text:String.format(this.todayText,D),tooltip:String.format(this.todayTip,D),handler:this.selectToday,scope:this});
if(Ext.isIE){this.el.repaint()
}this.update(this.value)
},showPrevMonth:function(A){this.update(this.activeDate.add("mo",-1))
},showNextMonth:function(A){this.update(this.activeDate.add("mo",1))
},showPrevYear:function(){this.update(this.activeDate.add("y",-1))
},showNextYear:function(){this.update(this.activeDate.add("y",1))
},handleMouseWheel:function(A){var B=A.getWheelDelta();
if(B>0){this.showPrevMonth();
A.stopEvent()
}else{if(B<0){this.showNextMonth();
A.stopEvent()
}}},handleDateClick:function(B,A){B.stopEvent();
if(A.dateValue&&!Ext.fly(A.parentNode).hasClass("x-date-disabled")){this.setValue(new Date(A.dateValue));
this.fireEvent("select",this,this.value)
}},selectToday:function(){this.setValue(new Date().clearTime());
this.fireEvent("select",this,this.value)
},update:function(G){var A=this.activeDate;
this.activeDate=G;
if(A&&this.el){var L=G.getTime();
if(A.getMonth()==G.getMonth()&&A.getFullYear()==G.getFullYear()){this.cells.removeClass("x-date-selected");
this.cells.each(function(a){if(a.dom.firstChild.dateValue==L){a.addClass("x-date-selected");
setTimeout(function(){try{a.dom.firstChild.focus()
}catch(b){}},50);
return false
}});
return 
}}var D=G.getDaysInMonth();
var K=G.getFirstDateOfMonth();
var J=K.getDay()-this.startDay;
if(J<=this.startDay){J+=7
}var V=G.add("mo",-1);
var H=V.getDaysInMonth()-J;
var F=this.cells.elements;
var E=this.textNodes;
D+=J;
var S=86400000;
var Z=(new Date(V.getFullYear(),V.getMonth(),H)).clearTime();
var Y=new Date().clearTime().getTime();
var O=G.clearTime().getTime();
var N=this.minDate?this.minDate.clearTime():Number.NEGATIVE_INFINITY;
var T=this.maxDate?this.maxDate.clearTime():Number.POSITIVE_INFINITY;
var U=this.disabledDatesRE;
var Q=this.disabledDatesText;
var P=this.disabledDays?this.disabledDays.join(""):false;
var M=this.disabledDaysText;
var X=this.format;
var W=function(e,c){c.title="";
var b=Z.getTime();
c.firstChild.dateValue=b;
if(b==Y){c.className+=" x-date-today";
c.title=e.todayText
}if(b==O){c.className+=" x-date-selected";
setTimeout(function(){try{c.firstChild.focus()
}catch(g){}},50)
}if(b<N){c.className=" x-date-disabled";
c.title=e.minText;
return 
}if(b>T){c.className=" x-date-disabled";
c.title=e.maxText;
return 
}if(P){if(P.indexOf(Z.getDay())!=-1){c.title=M;
c.className=" x-date-disabled"
}}if(U&&X){var a=Z.dateFormat(X);
if(U.test(a)){c.title=Q.replace("%0",a);
c.className=" x-date-disabled"
}}};
var R=0;
for(;
R<J;
R++){E[R].innerHTML=(++H);
Z.setDate(Z.getDate()+1);
F[R].className="x-date-prevday";
W(this,F[R])
}for(;
R<D;
R++){intDay=R-J+1;
E[R].innerHTML=(intDay);
Z.setDate(Z.getDate()+1);
F[R].className="x-date-active";
W(this,F[R])
}var C=0;
for(;
R<42;
R++){E[R].innerHTML=(++C);
Z.setDate(Z.getDate()+1);
F[R].className="x-date-nextday";
W(this,F[R])
}this.mbtn.setText(this.monthNames[G.getMonth()]+" "+G.getFullYear());
if(!this.internalRender){var B=this.el.dom.firstChild;
var I=B.offsetWidth;
this.el.setWidth(I+this.el.getBorderWidth("lr"));
Ext.fly(B).setWidth(I);
this.internalRender=true;
if(Ext.isOpera&&!this.secondPass){B.rows[0].cells[1].style.width=(I-(B.rows[0].cells[0].offsetWidth+B.rows[0].cells[2].offsetWidth))+"px";
this.secondPass=true;
this.update.defer(10,this,[G])
}}}});
Ext.TabPanel=function(B,A){this.el=Ext.get(B,true);
if(A){if(typeof A=="boolean"){this.tabPosition=A?"bottom":"top"
}else{Ext.apply(this,A)
}}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(E,D,C,B){var A=new Ext.TabPanelItem(this,E,D,B);
this.addTabItem(A);
if(C){A.setContent(C)
}return A
},getTab:function(A){return this.items[A]
},hideTab:function(B){var A=this.items[B];
if(!A.isHidden()){A.setHidden(true);
this.hiddenCount++;
this.autoSizeTabs()
}},unhideTab:function(B){var A=this.items[B];
if(A.isHidden()){A.setHidden(false);
this.hiddenCount--;
this.autoSizeTabs()
}},addTabItem:function(A){this.items[A.id]=A;
this.items.push(A);
if(this.resizeTabs){A.setWidth(this.currentTabWidth||this.preferredTabWidth);
this.autoSizeTabs()
}else{A.autoSize()
}},removeTab:function(E){var D=this.items;
var A=D[E];
if(!A){return 
}var C=D.indexOf(A);
if(this.active==A&&D.length>1){var B=this.getNextAvailable(C);
if(B){B.activate()
}}this.stripEl.dom.removeChild(A.pnode.dom);
if(A.bodyEl.dom.parentNode==this.bodyEl.dom){this.bodyEl.dom.removeChild(A.bodyEl.dom)
}D.splice(C,1);
delete this.items[A.id];
A.fireEvent("close",A);
A.purgeListeners();
this.autoSizeTabs()
},getNextAvailable:function(D){var C=this.items;
var B=D;
while(B<C.length){var A=C[++B];
if(A&&!A.isHidden()){return A
}}B=D;
while(B>=0){var A=C[--B];
if(A&&!A.isHidden()){return A
}}return null
},disableTab:function(B){var A=this.items[B];
if(A&&this.active!=A){A.disable()
}},enableTab:function(B){var A=this.items[B];
A.enable()
},activate:function(C){var A=this.items[C];
if(!A){return null
}if(A==this.active){return A
}var B={};
this.fireEvent("beforetabchange",this,B,A);
if(B.cancel!==true&&!A.disabled){if(this.active){this.active.hide()
}this.active=this.items[C];
this.active.show();
this.fireEvent("tabchange",this,this.active)
}return A
},getActiveTab:function(){return this.active
},syncHeight:function(C){var B=(C||this.el.getHeight())-this.el.getBorderWidth("tb")-this.el.getPadding("tb");
var D=this.bodyEl.getMargins();
var A=B-(this.stripWrap.getHeight()||0)-(D.top+D.bottom);
this.bodyEl.setHeight(A);
return A
},onResize:function(){if(this.monitorResize){this.autoSizeTabs()
}},beginUpdate:function(){this.updating=true
},endUpdate:function(){this.updating=false;
this.autoSizeTabs()
},autoSizeTabs:function(){var F=this.items.length;
var E=F-this.hiddenCount;
if(!this.resizeTabs||F<1||E<1||this.updating){return 
}var B=Math.max(this.el.getWidth()-this.cpad,10);
var D=Math.floor(B/E);
var A=this.stripBody;
if(A.getWidth()>B){var C=this.items;
this.setTabWidth(Math.max(D,this.minTabWidth)-2);
if(D<this.minTabWidth){}}else{if(this.currentTabWidth<this.preferredTabWidth){this.setTabWidth(Math.min(D,this.preferredTabWidth)-2)
}}},getCount:function(){return this.items.length
},setTabWidth:function(C){this.currentTabWidth=C;
for(var B=0,A=this.items.length;
B<A;
B++){if(!this.items[B].isHidden()){this.items[B].setWidth(C)
}}},destroy:function(C){Ext.EventManager.removeResizeListener(this.onResize,this);
for(var B=0,A=this.items.length;
B<A;
B++){this.items[B].purgeListeners()
}if(C===true){this.el.update("");
this.el.remove()
}}});
Ext.TabPanelItem=function(C,F,B,A){this.tabPanel=C;
this.id=F;
this.disabled=false;
this.text=B;
this.loaded=false;
this.closable=A;
this.bodyEl=Ext.get(C.createItemBody(C.bodyEl.dom,F));
this.bodyEl.setVisibilityMode(Ext.Element.VISIBILITY);
this.bodyEl.setStyle("display","block");
this.bodyEl.setStyle("zoom","1");
this.hideAction();
var D=C.createStripElements(C.stripEl.dom,B,A);
this.el=Ext.get(D.el,true);
this.inner=Ext.get(D.inner,true);
this.textEl=Ext.get(this.el.dom.firstChild.firstChild.firstChild,true);
this.pnode=Ext.get(D.el.parentNode,true);
this.el.on("mousedown",this.onTabMouseDown,this);
this.el.on("click",this.onTabClick,this);
if(A){var E=Ext.get(D.close,true);
E.dom.title=this.closeText;
E.addClassOnOver("close-over");
E.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(A){if(Ext.QuickTips&&Ext.QuickTips.isEnabled()){this.textEl.dom.qtip=A;
this.textEl.dom.removeAttribute("title")
}else{this.textEl.dom.title=A
}},onTabClick:function(A){A.preventDefault();
this.tabPanel.activate(this.id)
},onTabMouseDown:function(A){A.preventDefault();
this.tabPanel.activate(this.id)
},getWidth:function(){return this.inner.getWidth()
},setWidth:function(B){var A=B-this.pnode.getPadding("lr");
this.inner.setWidth(A);
this.textEl.setWidth(A-this.inner.getPadding("lr"));
this.pnode.setWidth(B)
},setHidden:function(A){this.hidden=A;
this.pnode.setStyle("display",A?"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(A){this.text=A;
this.textEl.update(A);
this.setTooltip(A);
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(B,A){this.bodyEl.update(B,A)
},getUpdateManager:function(){return this.bodyEl.getUpdateManager()
},setUrl:function(A,C,B){if(this.refreshDelegate){this.un("activate",this.refreshDelegate)
}this.refreshDelegate=this._handleRefresh.createDelegate(this,[A,C,B]);
this.on("activate",this.refreshDelegate);
return this.bodyEl.getUpdateManager()
},_handleRefresh:function(C,D,B){if(!B||!this.loaded){var A=this.bodyEl.getUpdateManager();
A.update(C,D,this._setLoaded.createDelegate(this))
}},refresh:function(){if(this.refreshDelegate){this.loaded=false;
this.refreshDelegate()
}},_setLoaded:function(){this.loaded=true
},closeClick:function(A){var B={};
A.stopEvent();
this.fireEvent("beforeclose",this,B);
if(B.cancel!==true){this.tabPanel.removeTab(this.id)
}},closeText:"Close this tab"});
Ext.TabPanel.prototype.createStrip=function(B){var A=document.createElement("div");
A.className="x-tabs-wrap";
B.appendChild(A);
return A
};
Ext.TabPanel.prototype.createStripList=function(A){A.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 A.firstChild.firstChild.firstChild.firstChild
};
Ext.TabPanel.prototype.createBody=function(B){var A=document.createElement("div");
Ext.id(A,"tab-body");
Ext.fly(A).addClass("x-tabs-body");
B.appendChild(A);
return A
};
Ext.TabPanel.prototype.createItemBody=function(C,B){var A=Ext.getDom(B);
if(!A){A=document.createElement("div");
A.id=B
}Ext.fly(A).addClass("x-tabs-item-body");
C.insertBefore(A,C.firstChild);
return A
};
Ext.TabPanel.prototype.createStripElements=function(F,D,E){var G=document.createElement("td");
F.appendChild(G);
if(E){G.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 C=this.closeTpl.overwrite(G,{text:D});
var B=C.getElementsByTagName("div")[0];
var A=C.getElementsByTagName("em")[0];
return{el:C,close:B,inner:A}
}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 C=this.tabTpl.overwrite(G,{text:D});
var A=C.getElementsByTagName("em")[0];
return{el:C,inner:A}
}};
Ext.Button=function(B,A){Ext.apply(this,A);
this.addEvents({click:true,toggle:true,mouseover:true,mouseout:true});
if(this.menu){this.menu=Ext.menu.MenuMgr.get(this.menu)
}if(B){this.render(B)
}Ext.Button.superclass.constructor.call(this)
};
Ext.extend(Ext.Button,Ext.util.Observable,{hidden:false,disabled:false,pressed:false,enableToggle:false,menu:undefined,menuAlign:"tl-bl?",menuClassTarget:"tr",clickEvent:"click",handleMouseEvents:true,tooltipType:"qtip",render:function(D){var C;
if(this.hideParent){this.parentEl=Ext.get(D)
}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><button class="x-btn-text">{0}</button></em></td><td class="x-btn-right"><i>&#160;</i></td>',"</tr></tbody></table>")
}this.template=Ext.Button.buttonTemplate
}C=this.template.append(D,[this.text||"&#160;"],true);
var B=C.child("button:first");
B.on("focus",this.onFocus,this);
B.on("blur",this.onBlur,this);
if(this.cls){C.addClass(this.cls)
}if(this.icon){B.setStyle("background-image","url("+this.icon+")")
}if(this.tooltip){if(typeof this.tooltip=="object"){Ext.QuickTips.tips(Ext.apply({target:B.id},this.tooltip))
}else{B.dom[this.tooltipType]=this.tooltip
}}}else{C=Ext.DomHelper.append(Ext.get(D).dom,this.dhconfig,true)
}this.el=C;
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)
}C.addClass("x-btn");
if(Ext.isIE&&!Ext.isIE7){this.autoWidth.defer(1,this)
}else{this.autoWidth()
}if(this.handleMouseEvents){C.on("mouseover",this.onMouseOver,this);
C.on("mouseout",this.onMouseOut,this);
C.on("mousedown",this.onMouseDown,this)
}C.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 A=new Ext.util.ClickRepeater(C,typeof this.repeat=="object"?this.repeat:{});
A.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 A=this.el.child("button");
if(A&&A.getWidth()>20){A.clip();
A.setWidth(Ext.util.TextMetrics.measure(A,this.text).width+A.getFrameWidth("lr"))
}}if(this.minWidth){if(this.hidden){this.el.beginMeasure()
}if(this.el.getWidth()<this.minWidth){this.el.setWidth(this.minWidth)
}if(this.hidden){this.el.endMeasure()
}}}},setHandler:function(B,A){this.handler=B;
this.scope=A
},setText:function(A){this.text=A;
if(this.el){this.el.child("td.x-btn-center button.x-btn-text").update(A)
}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(A){if(A){this.show()
}else{this.hide()
}},toggle:function(A){A=A===undefined?!this.pressed:A;
if(A!=this.pressed){if(A){this.el.addClass("x-btn-pressed");
this.pressed=true;
this.fireEvent("toggle",this,true)
}else{this.el.removeClass("x-btn-pressed");
this.pressed=false;
this.fireEvent("toggle",this,false)
}if(this.toggleHandler){this.toggleHandler.call(this.scope||this,this,A)
}}},focus:function(){this.el.child("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(A){this[A!==true?"enable":"disable"]()
},onClick:function(A){if(A){A.preventDefault()
}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,A);
if(this.handler){this.el.removeClass("x-btn-over");
this.handler.call(this.scope||this,this,A)
}}},onMouseOver:function(A){if(!this.disabled){this.el.addClass("x-btn-over");
this.fireEvent("mouseover",this,A)
}},onMouseOut:function(A){if(!A.within(this.el,true)){this.el.removeClass("x-btn-over");
this.fireEvent("mouseout",this,A)
}},onFocus:function(A){if(!this.disabled){this.el.addClass("x-btn-focus")
}},onBlur:function(A){this.el.removeClass("x-btn-focus")
},onMouseDown:function(){if(!this.disabled){this.el.addClass("x-btn-click");
Ext.get(document).on("mouseup",this.onMouseUp,this)
}},onMouseUp:function(){this.el.removeClass("x-btn-click");
Ext.get(document).un("mouseup",this.onMouseUp,this)
},onMenuShow:function(A){this.el.addClass("x-btn-menu-active")
},onMenuHide:function(A){this.el.removeClass("x-btn-menu-active")
}});
Ext.ButtonToggleMgr=function(){var B={};
function A(F,D){if(D){var G=B[F.toggleGroup];
for(var E=0,C=G.length;
E<C;
E++){if(G[E]!=F){G[E].toggle(false)
}}}}return{register:function(C){if(!C.toggleGroup){return 
}var D=B[C.toggleGroup];
if(!D){D=B[C.toggleGroup]=[]
}D.push(C);
C.on("toggle",A)
},unregister:function(C){if(!C.toggleGroup){return 
}var D=B[C.toggleGroup];
if(D){D.remove(C);
C.un("toggle",A)
}}}
}();
Ext.MenuButton=function(B,A){Ext.MenuButton.superclass.constructor.call(this,B,A);
this.addEvents({arrowclick:true})
};
Ext.extend(Ext.MenuButton,Ext.Button,{render:function(D){var C=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">{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">&#160;</button></td><td class="x-btn-right"><i>&#160;</i></td></tr>',"</tbody></table></td></tr></table>");
var B=C.append(D,[this.text],true);
if(this.cls){B.addClass(this.cls)
}if(this.icon){B.child("button").setStyle("background-image","url("+this.icon+")")
}this.el=B;
this.autoWidth();
if(this.handleMouseEvents){B.on("mouseover",this.onMouseOver,this);
B.on("mouseout",this.onMouseOut,this);
B.on("mousedown",this.onMouseDown,this);
B.on("mouseup",this.onMouseUp,this)
}B.on(this.clickEvent,this.onClick,this);
if(this.tooltip){var A=B.child("button:first");
if(typeof this.tooltip=="object"){Ext.QuickTips.tips(Ext.apply({target:A.id},this.tooltip))
}else{A.dom[this.tooltipType]=this.tooltip
}}if(this.arrowTooltip){var A=B.child("button:nth(2)");
A.dom[this.tooltipType]=this.arrowTooltip
}if(this.hidden){this.hide()
}if(this.disabled){this.disable()
}if(this.menu){this.menu.on("show",this.onMenuShow,this);
this.menu.on("hide",this.onMenuHide,this)
}},autoWidth:function(){if(this.el){var C=this.el.child("table:first");
var B=this.el.child("table:last");
this.el.setWidth("auto");
C.setWidth("auto");
if(Ext.isIE7&&Ext.isStrict){var A=this.el.child("button:first");
if(A&&A.getWidth()>20){A.clip();
A.setWidth(Ext.util.TextMetrics.measure(A,this.text).width+A.getFrameWidth("lr"))
}}if(this.minWidth){if(this.hidden){this.el.beginMeasure()
}if((C.getWidth()+B.getWidth())<this.minWidth){C.setWidth(this.minWidth-B.getWidth())
}if(this.hidden){this.el.endMeasure()
}}this.el.setWidth(C.getWidth()+B.getWidth())
}},setHandler:function(B,A){this.handler=B;
this.scope=A
},setArrowHandler:function(B,A){this.arrowHandler=B;
this.scope=A
},focus:function(){if(this.el){this.el.child("a:first").focus()
}},onClick:function(A){A.preventDefault();
if(!this.disabled){if(A.getTarget(".x-btn-menu-arrow-wrap")){if(this.menu&&!this.menu.isVisible()){this.menu.show(this.el,this.menuAlign)
}this.fireEvent("arrowclick",this,A);
if(this.arrowHandler){this.arrowHandler.call(this.scope||this,this,A)
}}else{this.fireEvent("click",this,A);
if(this.handler){this.handler.call(this.scope||this,this,A)
}}}},onMouseDown:function(A){if(!this.disabled){Ext.fly(A.getTarget("table")).addClass("x-btn-click")
}},onMouseUp:function(A){Ext.fly(A.getTarget("table")).removeClass("x-btn-click")
}});
Ext.Toolbar=function(C,B,A){if(C instanceof Array){B=C;
A=B;
C=null
}Ext.apply(this,A);
this.buttons=B;
if(C){this.render(C)
}};
Ext.Toolbar.prototype={render:function(B){this.el=Ext.get(B);
if(this.cls){this.el.addClass(this.cls)
}this.el.update('<div class="x-toolbar x-small-editor"><table cellspacing="0"><tr></tr></table></div>');
this.tr=this.el.child("tr",true);
var A=0;
this.items=new Ext.util.MixedCollection(false,function(C){return C.id||("item"+(++A))
});
if(this.buttons){this.add.apply(this,this.buttons);
delete this.buttons
}},add:function(){var B=arguments,A=B.length;
for(var C=0;
C<A;
C++){var D=B[C];
if(D.applyTo){this.addField(D)
}else{if(D.render){this.addItem(D)
}else{if(typeof D=="string"){if(D=="separator"||D=="-"){this.addSeparator()
}else{if(D==" "){this.addSpacer()
}else{this.addText(D)
}}}else{if(D.tagName){this.addElement(D)
}else{if(typeof D=="object"){this.addButton(D)
}}}}}}},getEl:function(){return this.el
},addSeparator:function(){return this.addItem(new Ext.Toolbar.Separator())
},addSpacer:function(){return this.addItem(new Ext.Toolbar.Spacer())
},addElement:function(A){return this.addItem(new Ext.Toolbar.Item(A))
},addItem:function(A){var B=this.nextBlock();
A.render(B);
this.items.add(A);
return A
},addButton:function(C){if(C instanceof Array){var F=[];
for(var D=0,B=C.length;
D<B;
D++){F.push(this.addButton(C[D]))
}return F
}var A=C;
if(!(C instanceof Ext.Toolbar.Button)){A=new Ext.Toolbar.Button(C)
}var E=this.nextBlock();
A.render(E);
this.items.add(A);
return A
},addText:function(A){return this.addItem(new Ext.Toolbar.TextItem(A))
},insertButton:function(E,D){if(D instanceof Array){var B=[];
for(var C=0,A=D.length;
C<A;
C++){B.push(this.insertButton(E+C,D[C]))
}return B
}if(!(D instanceof Ext.Toolbar.Button)){D=new Ext.Toolbar.Button(D)
}var F=document.createElement("td");
this.tr.insertBefore(F,this.tr.childNodes[E]);
D.render(F);
this.items.insert(E,D);
return D
},addDom:function(B,A){var D=this.nextBlock();
Ext.DomHelper.overwrite(D,B);
var C=new Ext.Toolbar.Item(D.firstChild);
C.render(D);
this.items.add(C);
return C
},addField:function(A){var C=this.nextBlock();
A.render(C);
var B=new Ext.Toolbar.Item(C.firstChild);
B.render(C);
this.items.add(B);
return B
},nextBlock:function(){var A=document.createElement("td");
this.tr.appendChild(A);
return A
}};
Ext.Toolbar.Item=function(A){this.el=Ext.getDom(A);
this.id=Ext.id(this.el);
this.hidden=false
};
Ext.Toolbar.Item.prototype={getEl:function(){return this.el
},render:function(A){this.td=A;
A.appendChild(this.el)
},destroy:function(){this.td.parentNode.removeChild(this.td)
},show:function(){this.hidden=false;
this.td.style.display=""
},hide:function(){this.hidden=true;
this.td.style.display="none"
},setVisible:function(A){if(A){this.show()
}else{this.hide()
}},focus:function(){Ext.fly(this.el).focus()
},disable:function(){Ext.fly(this.td).addClass("x-item-disabled");
this.disabled=true;
this.el.disabled=true
},enable:function(){Ext.fly(this.td).removeClass("x-item-disabled");
this.disabled=false;
this.el.disabled=false
}};
Ext.Toolbar.Separator=function(){var A=document.createElement("span");
A.className="ytb-sep";
Ext.Toolbar.Separator.superclass.constructor.call(this,A)
};
Ext.extend(Ext.Toolbar.Separator,Ext.Toolbar.Item);
Ext.Toolbar.Spacer=function(){var A=document.createElement("div");
A.className="ytb-spacer";
Ext.Toolbar.Separator.superclass.constructor.call(this,A)
};
Ext.extend(Ext.Toolbar.Spacer,Ext.Toolbar.Item);
Ext.Toolbar.TextItem=function(A){var B=document.createElement("span");
B.className="ytb-text";
B.innerHTML=A;
Ext.Toolbar.TextItem.superclass.constructor.call(this,B)
};
Ext.extend(Ext.Toolbar.TextItem,Ext.Toolbar.Item);
Ext.Toolbar.Button=function(A){Ext.Toolbar.Button.superclass.constructor.call(this,null,A)
};
Ext.extend(Ext.Toolbar.Button,Ext.Button,{render:function(A){this.td=A;
Ext.Toolbar.Button.superclass.render.call(this,A)
},destroy:function(){Ext.Toolbar.Button.superclass.destroy.call(this);
this.td.parentNode.removeChild(this.td)
},show:function(){this.hidden=false;
this.td.style.display=""
},hide:function(){this.hidden=true;
this.td.style.display="none"
},disable:function(){Ext.fly(this.td).addClass("x-item-disabled");
this.disabled=true
},enable:function(){Ext.fly(this.td).removeClass("x-item-disabled");
this.disabled=false
}});
Ext.ToolbarButton=Ext.Toolbar.Button;
Ext.Toolbar.MenuButton=function(A){Ext.Toolbar.MenuButton.superclass.constructor.call(this,null,A)
};
Ext.extend(Ext.Toolbar.MenuButton,Ext.MenuButton,{render:function(A){this.td=A;
Ext.Toolbar.MenuButton.superclass.render.call(this,A)
},destroy:function(){Ext.Toolbar.MenuButton.superclass.destroy.call(this);
this.td.parentNode.removeChild(this.td)
},show:function(){this.hidden=false;
this.td.style.display=""
},hide:function(){this.hidden=true;
this.td.style.display="none"
}});
Ext.PagingToolbar=function(A,C,B){Ext.PagingToolbar.superclass.constructor.call(this,A,null,B);
this.ds=C;
this.cursor=0;
this.renderButtons(this.el);
this.bind(C)
};
Ext.extend(Ext.PagingToolbar,Ext.Toolbar,{pageSize:20,displayMsg:"Displaying {0} - {1} of {2}",emptyMsg:"No data to display",beforePageText:"Page",afterPageText:"of {0}",firstText:"First Page",prevText:"Previous Page",nextText:"Next Page",lastText:"Last Page",refreshText:"Refresh",renderButtons:function(A){this.first=this.addButton({tooltip:this.firstText,cls:"x-btn-icon x-grid-page-first",disabled:true,handler:this.onClick.createDelegate(this,["first"])});
this.prev=this.addButton({tooltip:this.prevText,cls:"x-btn-icon x-grid-page-prev",disabled:true,handler:this.onClick.createDelegate(this,["prev"])});
this.addSeparator();
this.add(this.beforePageText);
this.field=Ext.get(this.addDom({tag:"input",type:"text",size:"3",value:"1",cls:"x-grid-page-number"}).el);
this.field.on("keydown",this.onPagingKeydown,this);
this.field.on("focus",function(){this.dom.select()
});
this.afterTextEl=this.addText(String.format(this.afterPageText,1));
this.field.setHeight(18);
this.addSeparator();
this.next=this.addButton({tooltip:this.nextText,cls:"x-btn-icon x-grid-page-next",disabled:true,handler:this.onClick.createDelegate(this,["next"])});
this.last=this.addButton({tooltip:this.lastText,cls:"x-btn-icon x-grid-page-last",disabled:true,handler:this.onClick.createDelegate(this,["last"])});
this.addSeparator();
this.loading=this.addButton({tooltip:this.refreshText,cls:"x-btn-icon x-grid-loading",disabled:true,handler:this.onClick.createDelegate(this,["refresh"])});
if(this.displayInfo){this.displayEl=this.el.createChild({cls:"x-paging-info"})
}},updateInfo:function(){if(this.displayEl){var B=this.ds.getCount();
var A=B==0?this.emptyMsg:String.format(this.displayMsg,this.cursor+1,this.cursor+B,this.ds.getTotalCount());
this.displayEl.update(A)
}},onLoad:function(C,B,F){this.cursor=F.params?F.params.start:0;
var E=this.getPageData(),A=E.activePage,D=E.pages;
this.afterTextEl.el.innerHTML=String.format(this.afterPageText,E.pages);
this.field.dom.value=A;
this.first.setDisabled(A==1);
this.prev.setDisabled(A==1);
this.next.setDisabled(A==D);
this.last.setDisabled(A==D);
this.loading.enable();
this.updateInfo()
},getPageData:function(){var A=this.ds.getTotalCount();
return{total:A,activePage:Math.ceil((this.cursor+this.pageSize)/this.pageSize),pages:A<this.pageSize?1:Math.ceil(A/this.pageSize)}
},onLoadError:function(){this.loading.enable()
},onPagingKeydown:function(E){var B=E.getKey();
var F=this.getPageData();
if(B==E.RETURN){var A=this.field.dom.value,D;
if(!A||isNaN(D=parseInt(A,10))){this.field.dom.value=F.activePage;
return 
}D=Math.min(Math.max(1,D),F.pages)-1;
this.ds.load({params:{start:D*this.pageSize,limit:this.pageSize}});
E.stopEvent()
}else{if(B==E.HOME||(B==E.UP&&E.ctrlKey)||(B==E.PAGEUP&&E.ctrlKey)||(B==E.RIGHT&&E.ctrlKey)||B==E.END||(B==E.DOWN&&E.ctrlKey)||(B==E.LEFT&&E.ctrlKey)||(B==E.PAGEDOWN&&E.ctrlKey)){var D=(B==E.HOME||(B==E.DOWN&&E.ctrlKey)||(B==E.LEFT&&E.ctrlKey)||(B==E.PAGEDOWN&&E.ctrlKey))?1:F.pages;
this.field.dom.value=D;
this.ds.load({params:{start:(D-1)*this.pageSize,limit:this.pageSize}});
E.stopEvent()
}else{if(B==E.UP||B==E.RIGHT||B==E.PAGEUP||B==E.DOWN||B==E.LEFT||B==E.PAGEDOWN){var A=this.field.dom.value,D;
var C=(E.shiftKey)?10:1;
if(B==E.DOWN||B==E.LEFT||B==E.PAGEDOWN){C*=-1
}if(!A||isNaN(D=parseInt(A,10))){this.field.dom.value=F.activePage;
return 
}else{if(parseInt(A,10)+C>=1&parseInt(A,10)+C<=F.pages){this.field.dom.value=parseInt(A,10)+C;
D=Math.min(Math.max(1,D+C),F.pages)-1;
this.ds.load({params:{start:D*this.pageSize,limit:this.pageSize}})
}}E.stopEvent()
}}}},beforeLoad:function(){if(this.loading){this.loading.disable()
}},onClick:function(D){var E=this.ds;
switch(D){case"first":E.load({params:{start:0,limit:this.pageSize}});
break;
case"prev":E.load({params:{start:Math.max(0,this.cursor-this.pageSize),limit:this.pageSize}});
break;
case"next":E.load({params:{start:this.cursor+this.pageSize,limit:this.pageSize}});
break;
case"last":var C=E.getTotalCount();
var B=C%this.pageSize;
var A=B?(C-B):C-this.pageSize;
E.load({params:{start:A,limit:this.pageSize}});
break;
case"refresh":E.load({params:{start:this.cursor,limit:this.pageSize}});
break
}},unbind:function(A){A.un("beforeload",this.beforeLoad,this);
A.un("load",this.onLoad,this);
A.un("loadexception",this.onLoadError,this)
},bind:function(A){A.on("beforeload",this.beforeLoad,this);
A.on("load",this.onLoad,this);
A.on("loadexception",this.onLoadError,this)
}});
Ext.Resizable=function(D,L){this.el=Ext.get(D);
if(L&&L.wrap){L.resizeChild=this.el;
this.el=this.el.wrap(typeof L.wrap=="object"?L.wrap:{cls:"xresizable-wrap"});
this.el.id=this.el.dom.id=L.resizeChild.id+"-rzwrap";
this.el.setStyle("overflow","hidden");
this.el.setPositioning(L.resizeChild.getPositioning());
L.resizeChild.clearPositioning();
if(!L.width||!L.height){var K=L.resizeChild.getSize();
this.el.setSize(K.width,K.height)
}if(L.pinned&&!L.adjustments){L.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,L);
if(this.pinned){this.disableTrackOver=true;
this.el.addClass("x-resizable-pinned")
}var J=this.el.getStyle("position");
if(J!="absolute"&&J!="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 M=this.handles.split(/\s*?[,;]\s*?| /);
var C=Ext.Resizable.positions;
for(var F=0,H=M.length;
F<H;
F++){if(M[F]&&C[M[F]]){var G=C[M[F]];
this[G]=new Ext.Resizable.Handle(this,G,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 B=this.resizeChild;
var I=this.west,E=this.east,A=this.north,M=this.south;
if(B&&(I||A)){B.position("relative");
B.setLeft(I?I.el.getWidth():0);
B.setTop(A?A.el.getHeight():0)
}this.adjustments=[(E?-E.el.getWidth():0)+(I?-I.el.getWidth():0),(A?-A.el.getHeight():0)+(M?-M.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,resizeTo:function(A,B){this.el.setSize(A,B);
this.updateChildSize();
this.fireEvent("resize",this,A,B,null)
},startSizing:function(A,B){this.fireEvent("beforeresize",this,A);
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",B.el.getStyle("cursor"));
this.resizing=true;
this.startBox=this.el.getBox();
this.startPoint=A.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();
this.proxy.setStyle("visibility","hidden");
this.proxy.show();
this.proxy.setBox(this.startBox);
if(!this.dynamic){this.proxy.setStyle("visibility","visible")
}}},onMouseDown:function(B,A){if(this.enabled){A.stopEvent();
this.activeHandle=B;
this.startSizing(A,B)
}},onMouseUp:function(B){var A=this.resizeElement();
this.resizing=false;
this.handleOut();
this.overlay.hide();
this.fireEvent("resize",this,A.width,A.height,B)
},updateChildSize:function(){if(this.resizeChild){var D=this.el;
var C=this.resizeChild;
var B=this.adjustments;
if(D.dom.offsetWidth){var A=D.getSize(true);
C.setSize(A.width+B[0],A.height+B[1])
}if(Ext.isIE){setTimeout(function(){if(D.dom.offsetWidth){var E=D.getSize(true);
C.setSize(E.width+B[0],E.height+B[1])
}},10)
}}},snap:function(D,E,C){if(!E||!D){return D
}var B=D;
var A=D%E;
if(A>0){if(A>(E/2)){B=D+(E-A)
}else{B=D-A
}}return Math.max(C,B)
},resizeElement:function(){var A=this.proxy.getBox();
if(this.updateBox){this.el.setBox(A,false,this.animate,this.duration,null,this.easing)
}else{this.el.setSize(A.width,A.height,this.animate,this.duration,null,this.easing)
}this.updateChildSize();
this.proxy.hide();
return A
},constrain:function(B,D,A,C){if(B-D<A){D=B-A
}else{if(B-D>C){D=C-B
}}return D
},onMouseMove:function(T){if(this.enabled){try{var H=this.curSize||this.startBox;
var J=this.startBox.x,I=this.startBox.y;
var C=J,B=I;
var K=H.width,S=H.height;
var D=K,M=S;
var L=this.minWidth,U=this.minHeight;
var O=this.maxWidth,W=this.maxHeight;
var F=this.widthIncrement;
var A=this.heightIncrement;
var R=T.getXY();
var Q=-(this.startPoint[0]-Math.max(this.minX,R[0]));
var P=-(this.startPoint[1]-Math.max(this.minY,R[1]));
var G=this.activeHandle.position;
switch(G){case"east":K+=Q;
K=Math.min(Math.max(L,K),O);
break;
case"south":S+=P;
S=Math.min(Math.max(U,S),W);
break;
case"southeast":K+=Q;
S+=P;
K=Math.min(Math.max(L,K),O);
S=Math.min(Math.max(U,S),W);
break;
case"north":P=this.constrain(S,P,U,W);
I+=P;
S-=P;
break;
case"west":Q=this.constrain(K,Q,L,O);
J+=Q;
K-=Q;
break;
case"northeast":K+=Q;
K=Math.min(Math.max(L,K),O);
P=this.constrain(S,P,U,W);
I+=P;
S-=P;
break;
case"northwest":Q=this.constrain(K,Q,L,O);
P=this.constrain(S,P,U,W);
I+=P;
S-=P;
J+=Q;
K-=Q;
break;
case"southwest":Q=this.constrain(K,Q,L,O);
S+=P;
S=Math.min(Math.max(U,S),W);
J+=Q;
K-=Q;
break
}var N=this.snap(K,F,L);
var V=this.snap(S,A,U);
if(N!=K||V!=S){switch(G){case"northeast":I-=V-S;
break;
case"north":I-=V-S;
break;
case"southwest":J-=N-K;
break;
case"west":J-=N-K;
break;
case"northwest":J-=N-K;
I-=V-S;
break
}K=N;
S=V
}if(this.preserveRatio){switch(G){case"southeast":case"east":S=M*(K/D);
S=Math.min(Math.max(U,S),W);
K=D*(S/M);
break;
case"south":K=D*(S/M);
K=Math.min(Math.max(L,K),O);
S=M*(K/D);
break;
case"northeast":K=D*(S/M);
K=Math.min(Math.max(L,K),O);
S=M*(K/D);
break;
case"north":var X=K;
K=D*(S/M);
K=Math.min(Math.max(L,K),O);
S=M*(K/D);
J+=(X-K)/2;
break;
case"southwest":S=M*(K/D);
S=Math.min(Math.max(U,S),W);
var X=K;
K=D*(S/M);
J+=X-K;
break;
case"west":var E=S;
S=M*(K/D);
S=Math.min(Math.max(U,S),W);
I+=(E-S)/2;
var X=K;
K=D*(S/M);
J+=X-K;
break;
case"northwest":var X=K;
var E=S;
S=M*(K/D);
S=Math.min(Math.max(U,S),W);
K=D*(S/M);
I+=E-S;
J+=X-K;
break
}}this.proxy.setBounds(J,I,K,S);
if(this.dynamic){this.resizeElement()
}}catch(T){}}},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(C){this.proxy.remove();
this.overlay.removeAllListeners();
this.overlay.remove();
var D=Ext.Resizable.positions;
for(var A in D){if(typeof D[A]!="function"&&this[D[A]]){var B=this[D[A]];
B.el.removeAllListeners();
B.el.remove()
}}if(C){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(D,E,B,A){if(!this.tpl){var C=Ext.DomHelper.createTemplate({tag:"div",cls:"x-resizable-handle x-resizable-handle-{0}"});
C.compile();
Ext.Resizable.Handle.prototype.tpl=C
}this.position=E;
this.rz=D;
this.el=this.tpl.append(D.el.dom,[this.position],true);
this.el.unselectable();
if(A){this.el.setOpacity(0)
}this.el.on("mousedown",this.onMouseDown,this);
if(!B){this.el.on("mouseover",this.onMouseOver,this);
this.el.on("mouseout",this.onMouseOut,this)
}};
Ext.Resizable.Handle.prototype={afterResize:function(A){},onMouseDown:function(A){this.rz.onMouseDown(this,A)
},onMouseOver:function(A){this.rz.handleOver(this,A)
},onMouseOut:function(A){this.rz.handleOut(this,A)
}};
Ext.SplitBar=function(E,D,C,B,A){this.el=Ext.get(E,true);
this.el.dom.unselectable="on";
this.resizingEl=Ext.get(D,true);
this.orientation=C||Ext.SplitBar.HORIZONTAL;
this.minSize=0;
this.maxSize=2000;
this.animate=false;
this.useShim=false;
this.shim=null;
if(!A){this.proxy=Ext.SplitBar.createProxy(this.orientation)
}else{this.proxy=Ext.get(A).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=B||(this.el.getX()>this.resizingEl.getX()?Ext.SplitBar.LEFT:Ext.SplitBar.RIGHT);
this.el.addClass("x-splitbar-h")
}else{this.placement=B||(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(B,F){this.fireEvent("beforeresize",this);
if(!this.overlay){var E=Ext.DomHelper.insertFirst(document.body,{cls:"x-drag-overlay",html:"&#160;"},true);
E.unselectable();
E.enableDisplayMode("block");
Ext.SplitBar.prototype.overlay=E
}this.overlay.setSize(Ext.lib.Dom.getViewWidth(true),Ext.lib.Dom.getViewHeight(true));
this.overlay.show();
Ext.get(this.proxy).setDisplayed("block");
var A=this.adapter.getElementSize(this);
this.activeMinSize=this.getMinimumSize();
this.activeMaxSize=this.getMaximumSize();
var D=A-this.activeMinSize;
var C=Math.max(this.activeMaxSize-A,0);
if(this.orientation==Ext.SplitBar.HORIZONTAL){this.dd.resetConstraints();
this.dd.setXConstraint(this.placement==Ext.SplitBar.LEFT?D:C,this.placement==Ext.SplitBar.LEFT?C:D);
this.dd.setYConstraint(0,0)
}else{this.dd.resetConstraints();
this.dd.setXConstraint(0,0);
this.dd.setYConstraint(this.placement==Ext.SplitBar.TOP?D:C,this.placement==Ext.SplitBar.TOP?C:D)
}this.dragSpecs.startSize=A;
this.dragSpecs.startPoint=[B,F];
Ext.dd.DDProxy.prototype.b4StartDrag.call(this.dd,B,F)
},onEndProxyDrag:function(C){Ext.get(this.proxy).setDisplayed(false);
var B=Ext.lib.Event.getXY(C);
if(this.overlay){this.overlay.hide()
}var A;
if(this.orientation==Ext.SplitBar.HORIZONTAL){A=this.dragSpecs.startSize+(this.placement==Ext.SplitBar.LEFT?B[0]-this.dragSpecs.startPoint[0]:this.dragSpecs.startPoint[0]-B[0])
}else{A=this.dragSpecs.startSize+(this.placement==Ext.SplitBar.TOP?B[1]-this.dragSpecs.startPoint[1]:this.dragSpecs.startPoint[1]-B[1])
}A=Math.min(Math.max(A,this.activeMinSize),this.activeMaxSize);
if(A!=this.dragSpecs.startSize){if(this.fireEvent("beforeapply",this,A)!==false){this.adapter.setElementSize(this,A);
this.fireEvent("moved",this,A);
this.fireEvent("resize",this,A)
}}},getAdapter:function(){return this.adapter
},setAdapter:function(A){this.adapter=A;
this.adapter.init(this)
},getMinimumSize:function(){return this.minSize
},setMinimumSize:function(A){this.minSize=A
},getMaximumSize:function(){return this.maxSize
},setMaximumSize:function(A){this.maxSize=A
},setCurrentSize:function(B){var A=this.animate;
this.animate=false;
this.adapter.setElementSize(this,B);
this.animate=A
},destroy:function(A){if(this.shim){this.shim.remove()
}this.dd.unreg();
this.proxy.parentNode.removeChild(this.proxy);
if(A){this.el.remove()
}}});
Ext.SplitBar.createProxy=function(B){var C=new Ext.Element(document.createElement("div"));
C.unselectable();
var A="x-splitbar-proxy";
C.addClass(A+" "+(B==Ext.SplitBar.HORIZONTAL?A+"-h":A+"-v"));
document.body.appendChild(C.dom);
return C.dom
};
Ext.SplitBar.BasicLayoutAdapter=function(){};
Ext.SplitBar.BasicLayoutAdapter.prototype={init:function(A){},getElementSize:function(A){if(A.orientation==Ext.SplitBar.HORIZONTAL){return A.resizingEl.getWidth()
}else{return A.resizingEl.getHeight()
}},setElementSize:function(C,B,A){if(C.orientation==Ext.SplitBar.HORIZONTAL){if(!C.animate){C.resizingEl.setWidth(B);
if(A){A(C,B)
}}else{C.resizingEl.setWidth(B,true,0.1,A,"easeOut")
}}else{if(!C.animate){C.resizingEl.setHeight(B);
if(A){A(C,B)
}}else{C.resizingEl.setHeight(B,true,0.1,A,"easeOut")
}}}};
Ext.SplitBar.AbsoluteLayoutAdapter=function(A){this.basic=new Ext.SplitBar.BasicLayoutAdapter();
this.container=Ext.get(A)
};
Ext.SplitBar.AbsoluteLayoutAdapter.prototype={init:function(A){this.basic.init(A)
},getElementSize:function(A){return this.basic.getElementSize(A)
},setElementSize:function(B,A,C){this.basic.setElementSize(B,A,this.moveSplitter.createDelegate(this,[B]))
},moveSplitter:function(A){var B=Ext.SplitBar;
switch(A.placement){case B.LEFT:A.el.setX(A.resizingEl.getRight());
break;
case B.RIGHT:A.el.setStyle("right",(this.container.getWidth()-A.resizingEl.getLeft())+"px");
break;
case B.TOP:A.el.setY(A.resizingEl.getBottom());
break;
case B.BOTTOM:A.el.setY(A.resizingEl.getTop()-A.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.Editor=function(B,A){Ext.Editor.superclass.constructor.call(this,A);
this.field=B;
this.addEvents({beforestartedit:true,startedit:true,beforecomplete:true,complete:true,specialkey:true})
};
Ext.extend(Ext.Editor,Ext.Component,{value:"",alignment:"c-c?",shadow:"frame",updateEl:false,onRender:function(A,B){this.el=new Ext.Layer({shadow:this.shadow,cls:"x-editor",parentEl:A,shim:this.shim,shadowOffset:3,id:this.id});
this.el.setStyle("overflow",Ext.isGecko?"auto":"hidden");
this.field.render(this.el);
if(Ext.isGecko){this.field.el.dom.setAttribute("autocomplete","off")
}this.field.show();
this.field.on("blur",this.onBlur,this);
this.relayEvents(this.field,["specialkey"]);
if(this.field.grow){this.field.on("autosize",this.el.sync,this.el,{delay:1})
}},startEdit:function(C,B){if(this.editing){this.completeEdit()
}this.boundEl=Ext.get(C);
var A=B!==undefined?B:this.boundEl.dom.innerHTML;
if(!this.rendered){this.render(this.parentEl||document.body)
}if(this.fireEvent("beforestartedit",this,this.boundEl,A)===false){return 
}this.startValue=A;
this.field.setValue(A);
if(this.autoSize){var D=this.boundEl.getSize();
switch(this.autoSize){case"width":this.setSize(D.width,"");
break;
case"height":this.setSize("",D.height);
break;
default:this.setSize(D.width,D.height)
}}this.el.alignTo(this.boundEl,this.alignment);
this.editing=true;
if(Ext.QuickTips){Ext.QuickTips.disable()
}this.show()
},setSize:function(A,B){this.field.setSize(A,B);
if(this.el){this.el.sync()
}},realign:function(){this.el.alignTo(this.boundEl,this.alignment)
},completeEdit:function(B){if(!this.editing){return 
}var A=this.getValue();
if(this.revertInvalid!==false&&!this.field.isValid()){A=this.startValue;
this.cancelEdit(true)
}if(String(A)==String(this.startValue)&&this.ignoreNoChange){this.editing=false;
this.hide();
return 
}if(this.fireEvent("beforecomplete",this,A,this.startValue)!==false){this.editing=false;
if(this.updateEl&&this.boundEl){this.boundEl.update(A)
}if(B!==true){this.hide()
}this.fireEvent("complete",this,A,this.startValue)
}},onShow:function(){this.el.show();
if(this.hideEl!==false){this.boundEl.hide()
}this.field.show();
this.field.focus();
this.fireEvent("startedit",this.boundEl,this.startValue)
},cancelEdit:function(A){if(this.editing){this.setValue(this.startValue);
if(A!==true){this.hide()
}}},onBlur:function(){if(this.allowBlur!==true&&this.editing){this.completeEdit()
}},onHide:function(){if(this.editing){this.completeEdit();
return 
}this.field.blur();
if(this.field.collapse){this.field.collapse()
}this.el.hide();
if(this.hideEl!==false){this.boundEl.show()
}if(Ext.QuickTips){Ext.QuickTips.enable()
}},setValue:function(A){this.field.setValue(A)
},getValue:function(){return this.field.getValue()
}});
Ext.BasicDialog=function(B,D){this.el=Ext.get(B);
var C=Ext.DomHelper;
if(!this.el&&D&&D.autoCreate){if(typeof D.autoCreate=="object"){if(!D.autoCreate.id){D.autoCreate.id=B
}this.el=C.append(document.body,D.autoCreate,true)
}else{this.el=C.append(document.body,{tag:"div",id:B,style:"visibility:hidden;"},true)
}}B=this.el;
B.setDisplayed(true);
B.hide=this.hideAction;
this.id=B.id;
B.addClass("x-dlg");
Ext.apply(this,D);
this.proxy=B.createProxy("x-dlg-proxy");
this.proxy.hide=this.hideAction;
this.proxy.setOpacity(0.5);
this.proxy.hide();
if(D.width){B.setWidth(D.width)
}if(D.height){B.setHeight(D.height)
}this.size=B.getSize();
if(typeof D.x!="undefined"&&typeof D.y!="undefined"){this.xy=[D.x,D.y]
}else{this.xy=B.getCenterXY(true)
}this.header=B.child("/.x-dlg-hd");
this.body=B.child("/.x-dlg-bd");
this.footer=B.child("/.x-dlg-ft");
if(!this.header){this.header=B.createChild({tag:"div",cls:"x-dlg-hd",html:"&#160;"},this.body?this.body.dom:null)
}if(!this.body){this.body=B.createChild({tag:"div",cls:"x-dlg-bd"})
}this.header.unselectable();
if(this.title){this.header.update(this.title)
}this.focusEl=B.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(B,{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){B.addClass("x-dlg-draggable");
if(!this.proxyDrag){var A=new Ext.dd.DD(B.dom.id,"WindowDrag")
}else{var A=new Ext.dd.DDProxy(B.dom.id,"WindowDrag",{dragElId:this.proxy.id})
}A.setHandleElId(this.header.id);
A.endDrag=this.endMove.createDelegate(this);
A.startDrag=this.startMove.createDelegate(this);
A.onDrag=this.onDrag.createDelegate(this);
A.scroll=false;
this.dd=A
}if(this.modal){this.mask=C.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});
B.on("keydown",this.onKeyDown,this);
B.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:5,minHeight:80,minWidth:200,minButtonWidth:75,defaultButton:null,buttonAlign:"right",tabTag:"div",firstShow:true,setTitle:function(A){this.header.update(A);
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 A=this.getTabs();
while(A.getTab(0)){A.removeTab(0)
}this.el.select(this.tabTag+".x-dlg-tab").each(function(C){var B=C.dom;
A.addTab(Ext.id(B),B.title);
B.title=""
});
A.activate(0);
return A
},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(A){if(this.isVisible()){this.fireEvent("keydown",this,A)
}},resizeTo:function(B,A){this.el.setSize(B,A);
this.size={width:B,height:A};
this.syncBodyHeight();
if(this.fixedcenter){this.center()
}if(this.isVisible()){this.constrainXY();
this.adjustAssets()
}this.fireEvent("resize",this,B,A);
return this
},setContentSize:function(A,B){B+=this.getHeaderFooterHeight()+this.body.getMargins("tb");
A+=this.body.getMargins("lr")+this.bwrap.getMargins("lr")+this.centerBg.getPadding("lr");
B+=this.body.getPadding("tb")+this.bwrap.getBorderWidth("tb")+this.body.getBorderWidth("tb")+this.el.getBorderWidth("tb");
A+=this.body.getPadding("lr")+this.bwrap.getBorderWidth("lr")+this.body.getBorderWidth("lr")+this.bwrap.getPadding("lr")+this.el.getBorderWidth("lr");
if(this.tabs){B+=this.tabs.stripWrap.getHeight()+this.tabs.bodyEl.getMargins("tb")+this.tabs.bodyEl.getPadding("tb");
A+=this.tabs.bodyEl.getMargins("lr")+this.tabs.bodyEl.getPadding("lr")
}this.resizeTo(A,B);
return this
},addKeyListener:function(A,C,H){var G,F,D,E;
if(typeof A=="object"&&!(A instanceof Array)){G=A.key;
F=A.shift;
D=A.ctrl;
E=A.alt
}else{G=A
}var B=function(M,L){if((!F||L.shiftKey)&&(!D||L.ctrlKey)&&(!E||L.altKey)){var J=L.getKey();
if(G instanceof Array){for(var K=0,I=G.length;
K<I;
K++){if(G[K]==J){C.call(H||window,M,J,L);
return 
}}}else{if(J==G){C.call(H||window,M,J,L)
}}}};
this.on("keydown",B);
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(F,D,C){var G=Ext.DomHelper;
if(!this.footer){this.footer=G.append(this.bwrap,{tag:"div",cls:"x-dlg-ft"},true)
}if(!this.btnContainer){var B=this.footer.createChild({tag:"div",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=B.firstChild.firstChild.firstChild
}var A={handler:D,scope:C,minWidth:this.minButtonWidth,hideParent:true};
if(typeof F=="string"){A.text=F
}else{if(F.tag){A.dhconfig=F
}else{Ext.apply(A,F)
}}var E=new Ext.Button(this.btnContainer.appendChild(document.createElement("td")),A);
this.syncBodyHeight();
if(!this.buttons){this.buttons=[]
}this.buttons.push(E);
return E
},setDefaultButton:function(A){this.defaultButton=A;
return this
},getHeaderFooterHeight:function(C){var B=0;
if(this.header){B+=this.header.getHeight()
}if(this.footer){var A=this.footer.getMargins();
B+=(this.footer.getHeight()+A.top+A.bottom)
}B+=this.bwrap.getPadding("tb")+this.bwrap.getBorderWidth("tb");
B+=this.centerBg.getPadding("tb");
return B
},syncBodyHeight:function(){var E=this.body,A=this.centerBg,F=this.bwrap;
var B=this.size.height-this.getHeaderFooterHeight(false);
E.setHeight(B-E.getMargins("tb"));
var C=this.header.getHeight();
var D=this.size.height-C;
A.setHeight(D);
F.setLeftTop(A.getPadding("l"),C+A.getPadding("t"));
F.setHeight(D-A.getPadding("tb"));
F.setWidth(this.el.getWidth(true)-A.getPadding("lr"));
E.setWidth(F.getWidth(true));
if(this.tabs){this.tabs.syncHeight();
if(Ext.isIE){this.tabs.el.repaint()
}}},restoreState:function(){var A=Ext.state.Manager.get(this.stateId||(this.el.id+"-state"));
if(A&&A.width){this.xy=[A.x,A.y];
this.resizeTo(A.width,A.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 A=Ext.get(this.animateTarget,true).getBox();
this.proxy.setSize(A.width,A.height);
this.proxy.setLocation(A.x,A.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(A){if(this.fireEvent("beforeshow",this)===false){return 
}if(this.syncHeightBeforeShow){this.syncBodyHeight()
}else{if(this.firstShow){this.firstShow=false;
this.syncBodyHeight()
}}this.animateTarget=A||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 D=this.container.getSize();
this.viewSize=[D.width,D.height]
}else{this.viewSize=[Ext.lib.Dom.getViewWidth(),Ext.lib.Dom.getViewHeight()]
}}var D=Ext.get(this.container||document).getScroll();
var A=this.xy[0],H=this.xy[1];
var B=this.size.width,C=this.size.height;
var E=this.viewSize[0],G=this.viewSize[1];
var F=false;
if(A+B>E+D.left){A=E-B;
F=true
}if(H+C>G+D.top){H=G-C;
F=true
}if(A<D.left){A=D.left;
F=true
}if(H<D.top){H=D.top;
F=true
}if(F){this.xy=[A,H];
if(this.isVisible()){this.el.setLocation(A,H);
this.adjustAssets()
}}}},onDrag:function(){if(!this.proxyDrag){this.xy=this.el.getXY();
this.adjustAssets()
}},adjustAssets:function(D){var A=this.xy[0],E=this.xy[1];
var B=this.size.width,C=this.size.height;
if(D===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(A,E,B,C)
}},adjustViewport:function(A,B){if(!A||!B){A=Ext.lib.Dom.getViewWidth();
B=Ext.lib.Dom.getViewHeight()
}this.viewSize=[A,B];
if(this.modal&&this.mask.isVisible()){this.mask.setSize(A,B);
this.mask.setSize(Ext.lib.Dom.getViewWidth(true),Ext.lib.Dom.getViewHeight(true))
}if(this.isVisible()){this.constrainXY()
}},destroy:function(C){if(this.isVisible()){this.animateTarget=null;
this.hide()
}Ext.EventManager.removeResizeListener(this.adjustViewport,this);
if(this.tabs){this.tabs.destroy(C)
}Ext.destroy(this.shim,this.proxy,this.resizer,this.close,this.mask);
if(this.dd){this.dd.unreg()
}if(this.buttons){for(var B=0,A=this.buttons.length;
B<A;
B++){this.buttons[B].destroy()
}}this.el.removeAllListeners();
if(C===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 A=this.el.getCenterXY(true);
this.moveTo(A[0],A[1]);
return this
},moveTo:function(A,B){this.xy=[A,B];
if(this.isVisible()){this.el.setXY(this.xy);
this.adjustAssets()
}return this
},alignTo:function(B,A,C){this.xy=this.el.getAlignToXY(B,A,C);
if(this.isVisible()){this.el.setXY(this.xy);
this.adjustAssets()
}return this
},anchorTo:function(C,E,D,A){var F=function(){this.alignTo(C,E,D)
};
Ext.EventManager.onWindowResize(F,this);
var B=typeof A;
if(B!="undefined"){Ext.EventManager.on(window,"scroll",F,this,{buffer:B=="number"?A:50})
}F.call(this);
return this
},isVisible:function(){return this.el.isVisible()
},animHide:function(B){var A=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(A.x,A.y,A.width,A.height,true,0.35,this.hideEl.createDelegate(this,[B]))
},hide:function(A){if(this.fireEvent("beforehide",this)===false){return 
}if(this.shadow){this.shadow.hide()
}if(this.shim){this.shim.hide()
}if(this.animateTarget){this.animHide(A)
}else{this.el.hide();
this.hideEl(A)
}return this
},hideEl:function(A){this.proxy.hide();
if(this.modal){this.mask.hide();
Ext.get(document.body).removeClass("x-body-masked")
}this.fireEvent("hide",this);
if(typeof A=="function"){A()
}},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(A){if(this.modal){this.mask.setStyle("z-index",A)
}if(this.shim){this.shim.setStyle("z-index",++A)
}if(this.shadow){this.shadow.setZIndex(++A)
}this.el.setStyle("z-index",++A);
if(this.proxy){this.proxy.setStyle("z-index",++A)
}if(this.resizer){this.resizer.proxy.setStyle("z-index",++A)
}this.lastZIndex=A
},getEl:function(){return this.el
}});
Ext.DialogManager=function(){var D={};
var C=[];
var B=null;
var A=function(G,F){return(!G._lastAccess||G._lastAccess<F._lastAccess)?-1:1
};
var E=function(){C.sort(A);
var I=Ext.DialogManager.zseed;
for(var G=0,F=C.length;
G<F;
G++){var H=C[G];
if(H){H.setZIndex(I+(G*10))
}}};
return{zseed:9000,register:function(F){D[F.id]=F;
C.push(F)
},unregister:function(H){delete D[H.id];
if(!C.indexOf){for(var G=0,F=C.length;
G<F;
G++){if(C[G]==H){C.splice(G,1);
return 
}}}else{var G=C.indexOf(H);
if(G!=-1){C.splice(G,1)
}}},get:function(F){return typeof F=="object"?F:D[F]
},bringToFront:function(F){F=this.get(F);
if(F!=B){B=F;
F._lastAccess=new Date().getTime();
E()
}return F
},sendToBack:function(F){F=this.get(F);
F._lastAccess=-(new Date().getTime());
E();
return F
},hideAll:function(){for(var F in D){if(D[F]&&typeof D[F]!="function"&&D[F].isVisible()){D[F].hide()
}}}}
}();
Ext.LayoutDialog=function(B,A){A.autoTabs=false;
Ext.LayoutDialog.superclass.constructor.call(this,B,A);
this.body.setStyle({overflow:"hidden",position:"relative"});
this.layout=new Ext.BorderLayout(this.body.dom,A);
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 Q,P,O,N;
var L,J,H,F,D,A;
var M,K,I;
var G=function(R){Q.hide();
Ext.callback(P.fn,P.scope||window,[R,K.dom.value],1)
};
var E=function(){if(P&&P.cls){Q.el.removeClass(P.cls)
}if(N){Ext.TaskMgr.stop(N);
N=null
}};
var C=function(R){var T=0;
if(!R){M.ok.hide();
M.cancel.hide();
M.yes.hide();
M.no.hide();
Q.footer.dom.style.display="none";
return T
}Q.footer.dom.style.display="";
for(var S in M){if(typeof M[S]!="function"){if(R[S]){M[S].show();
M[S].setText(typeof R[S]=="string"?R[S]:Ext.MessageBox.buttonText[S]);
T+=M[S].el.getWidth()+15
}else{M[S].hide()
}}}return T
};
var B=function(T,R,S){if(P&&P.closable!==false){Q.hide()
}if(S){S.stopEvent()
}};
return{getDialog:function(){if(!Q){Q=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(P&&P.buttons&&P.buttons.no&&!P.buttons.cancel){G("no")
}else{G("cancel")
}}});
Q.on("hide",E);
O=Q.mask;
Q.addKeyListener(27,B);
M={};
var S=this.buttonText;
M.ok=Q.addButton(S.ok,G.createCallback("ok"));
M.yes=Q.addButton(S.yes,G.createCallback("yes"));
M.no=Q.addButton(S.no,G.createCallback("no"));
M.cancel=Q.addButton(S.cancel,G.createCallback("cancel"));
L=Q.body.createChild({tag:"div",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>'});
J=L.dom.firstChild;
H=Ext.get(L.dom.childNodes[2]);
H.enableDisplayMode();
H.addKeyListener([10,13],function(){if(Q.isVisible()&&P&&P.buttons){if(P.buttons.ok){G("ok")
}else{if(P.buttons.yes){G("yes")
}}}});
F=Ext.get(L.dom.childNodes[3]);
F.enableDisplayMode();
D=Ext.get(L.dom.childNodes[4]);
D.enableDisplayMode();
var R=D.dom.firstChild;
A=Ext.get(R.firstChild);
A.setHeight(R.offsetHeight)
}return Q
},updateText:function(S){if(!Q.isVisible()&&!P.width){Q.resizeTo(this.maxWidth,100)
}J.innerHTML=S||"&#160;";
var R=Math.max(Math.min(P.width||J.offsetWidth,this.maxWidth),Math.max(P.minWidth||this.minWidth,I));
if(P.prompt){K.setWidth(R)
}if(Q.isVisible()){Q.fixedcenter=false
}Q.setContentSize(R,L.getHeight());
if(Q.isVisible()){Q.fixedcenter=true
}return this
},updateProgress:function(S,R){if(R){this.updateText(R)
}A.setWidth(Math.floor(S*D.dom.firstChild.offsetWidth));
return this
},isVisible:function(){return Q&&Q.isVisible()
},hide:function(){if(this.isVisible()){Q.hide()
}},show:function(R){if(this.isVisible()){this.hide()
}var U=this.getDialog();
P=R;
U.setTitle(P.title||"&#160;");
U.close.setDisplayed(P.closable!==false);
K=H;
P.prompt=P.prompt||(P.multiline?true:false);
if(P.prompt){if(P.multiline){H.hide();
F.show();
F.setHeight(typeof P.multiline=="number"?P.multiline:this.defaultTextHeight);
K=F
}else{H.show();
F.hide()
}}else{H.hide();
F.hide()
}D.setDisplayed(P.progress===true);
this.updateProgress(0);
K.dom.value=P.value||"";
if(P.prompt){Q.setDefaultButton(K)
}else{var T=P.buttons;
var S=null;
if(T&&T.ok){S=M.ok
}else{if(T&&T.yes){S=M.yes
}}Q.setDefaultButton(S)
}I=C(P.buttons);
this.updateText(P.msg);
if(P.cls){U.el.addClass(P.cls)
}U.proxyDrag=P.proxyDrag===true;
U.modal=P.modal!==false;
U.mask=P.modal!==false?O:false;
if(!U.isVisible()){document.body.appendChild(Q.el.dom);
U.animateTarget=null;
U.show(R.animEl)
}return this
},progress:function(S,R){this.show({title:S,msg:R,buttons:false,progress:true,closable:false,minWidth:this.minProgressWidth});
return this
},alert:function(T,U,S,R){this.show({title:T,msg:U,buttons:this.OK,fn:S,scope:R});
return this
},wait:function(S,R){this.show({title:R,msg:S,buttons:false,closable:false,progress:true,modal:true,width:300,wait:true});
N=Ext.TaskMgr.start({run:function(T){Ext.MessageBox.updateProgress(((((T+20)%20)+1)*5)*0.01)
},interval:1000});
return this
},confirm:function(T,U,S,R){this.show({title:T,msg:U,buttons:this.YESNO,fn:S,scope:R});
return this
},prompt:function(S,U,T,R,V){this.show({title:S,msg:U,buttons:this.OKCANCEL,fn:T,minWidth:250,scope:R,prompt:true,multiline:V});
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 E,W,T,Q,M,O,N,K={},H,X=null,U,R;
var g,S,V,k;
var P=false,L=true,J=false;
var G=1,F=1,D=1,C=[];
var A=function(q){if(L){return 
}var l=q.getTarget();
if(!l||l.nodeType!==1||l==document||l==document.body){return 
}if(g&&l==g.el){clearTimeout(F);
return 
}if(l&&K[l.id]){K[l.id].el=l;
G=I.defer(M.showDelay,M,[K[l.id]]);
return 
}var o,p=Ext.fly(l);
var m=O.namespace;
if(M.interceptTitles&&l.title){o=l.title;
l.qtip=o;
l.removeAttribute("title");
q.preventDefault()
}else{o=l.qtip||p.getAttributeNS(m,O.attribute)
}if(o){G=I.defer(M.showDelay,M,[{el:l,text:o,width:p.getAttributeNS(m,O.width),autoHide:p.getAttributeNS(m,O.hide)!="user",title:p.getAttributeNS(m,O.title),cls:p.getAttributeNS(m,O.cls)}])
}};
var B=function(m){clearTimeout(G);
var l=m.getTarget();
if(l&&g&&g.el==l&&(M.autoHide&&g.autoHide!==false)){F=setTimeout(e,M.hideDelay)
}};
var c=function(l){if(L){return 
}V=l.getXY();
V[1]+=18;
if(M.trackMouse&&g){E.setXY(V)
}};
var b=function(l){clearTimeout(G);
clearTimeout(F);
if(!l.within(E)){if(M.hideOnClick){e();
M.disable()
}}};
var a=function(l){M.enable()
};
var Y=function(){return U.getPadding("l")+R.getPadding("r")
};
var I=function(r){if(L){return 
}clearTimeout(D);
g=r;
if(X){E.removeClass(X);
X=null
}if(g.cls){E.addClass(g.cls);
X=g.cls
}if(g.title){Q.update(g.title);
Q.show()
}else{Q.update("");
Q.hide()
}E.dom.style.width=M.maxWidth+"px";
T.update(r.text);
var q=Y(),l=g.width;
if(!l){var s=T.dom;
var m=Math.max(s.offsetWidth,s.clientWidth,s.scrollWidth);
if(m>M.maxWidth){l=M.maxWidth
}else{if(m<M.minWidth){l=M.minWidth
}else{l=m
}}}E.setWidth(parseInt(l,10)+q);
if(!g.autoHide){N.setDisplayed(true);
if(k){k.unlock()
}}else{N.setDisplayed(false);
if(k){k.lock()
}}if(V){E.avoidY=V[1]-18;
E.setXY(V)
}if(M.animate){E.setOpacity(0.1);
E.setStyle("visibility","visible");
E.fadeIn({callback:Z})
}else{Z()
}};
var Z=function(){if(g){E.show();
H.enable();
if(M.autoDismiss&&g.autoHide!==false){D=setTimeout(e,M.autoDismissDelay)
}}};
var e=function(l){clearTimeout(D);
clearTimeout(F);
g=null;
if(E.isVisible()){H.disable();
if(l!==true&&M.animate){E.fadeOut({callback:h})
}else{h()
}}};
var h=function(){E.hide();
if(X){E.removeClass(X);
X=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(){M=Ext.QuickTips;
O=M.tagConfig;
if(!J){E=new Ext.Layer({cls:"x-tip",shadow:"drop",shim:true,constrain:true,shadowOffset:3});
E.fxDefaults={stopFx:true};
E.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>');
Q=E.child("h3");
Q.enableDisplayMode("block");
W=E.child("div.x-tip-bd");
T=E.child("div.x-tip-bd-inner");
U=E.child("div.x-tip-bd-left");
R=E.child("div.x-tip-bd-right");
N=E.child("div.x-tip-close");
N.enableDisplayMode("block");
N.on("click",e);
d=Ext.get(document);
d.on("mousedown",b);
d.on("mouseup",a);
d.on("mouseover",A);
d.on("mouseout",B);
d.on("mousemove",c);
H=d.addKeyListener(27,e);
H.disable();
if(Ext.dd.DD){k=E.initDD("default",null,{onDrag:function(){E.sync()
}});
k.setHandleElId(Q.id);
k.lock()
}J=true
}this.enable()
},register:function(m){var r=m instanceof Array?m:arguments;
for(var p=0,l=r.length;
p<l;
p++){var t=r[p];
var s=t.target;
if(s){if(s instanceof Array){for(var o=0,q=s.length;
o<q;
o++){K[s[o]]=t
}}else{K[typeof s=="string"?s:Ext.id(s.id)]=t
}}}},unregister:function(l){delete K[Ext.id(l)]
},enable:function(){if(J){C.pop();
if(C.length<1){L=false
}}},disable:function(){L=true;
clearTimeout(G);
clearTimeout(F);
clearTimeout(D);
if(g){e(true)
}C.push(1)
},isEnabled:function(){return !L
},tagConfig:{namespace:"ext",attribute:"qtip",width:"width",target:"target",title:"qtitle",hide:"hide",cls:"qclass"}}
}();
Ext.QuickTips.tips=Ext.QuickTips.register;
Ext.tree.TreePanel=function(A,B){Ext.tree.TreePanel.superclass.constructor.call(this);
this.el=Ext.get(A);
this.el.addClass("x-tree");
this.id=this.el.id;
Ext.apply(this,B);
this.addEvents({beforeload:true,load:true,textchange:true,beforeexpand:true,beforecollapse:true,expand:true,disabledchange:true,collapse:true,beforeclick:true,click:true,dblclick:true,contextmenu:true,beforechildrenrendered:true,startdrag:true,enddrag:true,dragdrop:true,beforenodedrop:true,nodedrop:true,nodedragover:true});
if(this.singleExpand){this.on("beforeexpand",this.restrictExpand,this)
}};
Ext.extend(Ext.tree.TreePanel,Ext.data.Tree,{rootVisible:true,animate:Ext.enableFx,lines:true,enableDD:false,hlDrop:Ext.enableFx,restrictExpand:function(A){var B=A.parentNode;
if(B){if(B.expandedChild&&B.expandedChild.parentNode==B){B.expandedChild.collapse()
}B.expandedChild=A
}},setRootNode:function(A){Ext.tree.TreePanel.superclass.setRootNode.call(this,A);
if(!this.rootVisible){A.ui=new Ext.tree.RootTreeNodeUI(A)
}return A
},getEl:function(){return this.el
},getLoader:function(){return this.loader
},expandAll:function(){this.root.expand(true)
},collapseAll:function(){this.root.collapse(true)
},getSelectionModel:function(){if(!this.selModel){this.selModel=new Ext.tree.DefaultSelectionModel()
}return this.selModel
},expandPath:function(E,C,B){C=C||"id";
var A=E.split(this.pathSeparator);
var F=this.root;
if(F.attributes[C]!=A[1]){if(B){B(false,null)
}return 
}var D=1;
var G=function(){if(++D==A.length){if(B){B(true,F)
}return 
}var H=F.findChild(C,A[D]);
if(!H){if(B){B(false,F)
}return 
}F=H;
H.expand(false,false,G)
};
F.expand(false,false,G)
},selectPath:function(A,F,E){F=F||"id";
var D=A.split(this.pathSeparator);
var B=D.pop();
if(D.length>0){var C=function(H,G){if(H&&G){var I=G.findChild(F,B);
if(I){I.select();
if(E){E(true,I)
}}}else{if(E){E(false,I)
}}};
this.expandPath(D.join(this.pathSeparator),F,C)
}else{this.root.select();
if(E){E(true,this.root)
}}},render:function(){this.container=this.el.createChild({tag:"ul",cls:"x-tree-root-ct "+(this.lines?"x-tree-lines":"x-tree-no-lines")});
if(this.containerScroll){Ext.dd.ScrollManager.register(this.el)
}if((this.enableDD||this.enableDrop)&&!this.dropZone){this.dropZone=new Ext.tree.TreeDropZone(this,this.dropConfig||{ddGroup:this.ddGroup||"TreeDD",appendOnly:this.ddAppendOnly===true})
}if((this.enableDD||this.enableDrag)&&!this.dragZone){this.dragZone=new Ext.tree.TreeDragZone(this,this.dragConfig||{ddGroup:this.ddGroup||"TreeDD",scroll:this.ddScroll})
}this.getSelectionModel().init(this);
this.root.render();
if(!this.rootVisible){this.root.renderChildren()
}return this
}});
Ext.tree.DefaultSelectionModel=function(){this.selNode=null;
this.addEvents({selectionchange:true,beforeselect:true})
};
Ext.extend(Ext.tree.DefaultSelectionModel,Ext.util.Observable,{init:function(A){this.tree=A;
A.el.on("keydown",this.onKeyDown,this);
A.on("click",this.onNodeClick,this)
},onNodeClick:function(A,B){this.select(A)
},select:function(B){var A=this.selNode;
if(A!=B&&this.fireEvent("beforeselect",this,B,A)!==false){if(A){A.ui.onSelectedChange(false)
}this.selNode=B;
B.ui.onSelectedChange(true);
this.fireEvent("selectionchange",this,B,A)
}return B
},unselect:function(A){if(this.selNode==A){this.clearSelections()
}},clearSelections:function(){var A=this.selNode;
if(A){A.ui.onSelectedChange(false);
this.selNode=null;
this.fireEvent("selectionchange",this,null)
}return A
},getSelectedNode:function(){return this.selNode
},isSelected:function(A){return this.selNode==A
},selectPrevious:function(){var A=this.selNode||this.lastSelNode;
if(!A){return null
}var C=A.previousSibling;
if(C){if(!C.isExpanded()||C.childNodes.length<1){return this.select(C)
}else{var B=C.lastChild;
while(B&&B.isExpanded()&&B.childNodes.length>0){B=B.lastChild
}return this.select(B)
}}else{if(A.parentNode&&(this.tree.rootVisible||!A.parentNode.isRoot)){return this.select(A.parentNode)
}}return null
},selectNext:function(){var B=this.selNode||this.lastSelNode;
if(!B){return null
}if(B.firstChild&&B.isExpanded()){return this.select(B.firstChild)
}else{if(B.nextSibling){return this.select(B.nextSibling)
}else{if(B.parentNode){var A=null;
B.parentNode.bubble(function(){if(this.nextSibling){A=this.getOwnerTree().selModel.select(this.nextSibling);
return false
}});
return A
}}}return null
},onKeyDown:function(C){var B=this.selNode||this.lastSelNode;
var D=this;
if(!B){return 
}var A=C.getKey();
switch(A){case C.DOWN:C.stopEvent();
this.selectNext();
break;
case C.UP:C.stopEvent();
this.selectPrevious();
break;
case C.RIGHT:C.preventDefault();
if(B.hasChildNodes()){if(!B.isExpanded()){B.expand()
}else{if(B.firstChild){this.select(B.firstChild,C)
}}}break;
case C.LEFT:C.preventDefault();
if(B.hasChildNodes()&&B.isExpanded()){B.collapse()
}else{if(B.parentNode&&(this.tree.rootVisible||B.parentNode!=this.tree.getRootNode())){this.select(B.parentNode,C)
}}break
}}});
Ext.tree.MultiSelectionModel=function(){this.selNodes=[];
this.selMap={};
this.addEvents({selectionchange:true})
};
Ext.extend(Ext.tree.MultiSelectionModel,Ext.util.Observable,{init:function(A){this.tree=A;
A.el.on("keydown",this.onKeyDown,this);
A.on("click",this.onNodeClick,this)
},onNodeClick:function(A,B){this.select(A,B,B.ctrlKey)
},select:function(B,C,A){if(A!==true){this.clearSelections(true)
}if(this.isSelected(B)){this.lastSelNode=B;
return B
}this.selNodes.push(B);
this.selMap[B.id]=B;
this.lastSelNode=B;
B.ui.onSelectedChange(true);
this.fireEvent("selectionchange",this,this.selNodes);
return B
},unselect:function(B){if(this.selMap[B.id]){B.ui.onSelectedChange(false);
var E=this.selNodes;
var D=-1;
if(E.indexOf){D=E.indexOf(B)
}else{for(var C=0,A=E.length;
C<A;
C++){if(E[C]==B){D=C;
break
}}}if(D!=-1){this.selNodes.splice(D,1)
}delete this.selMap[B.id];
this.fireEvent("selectionchange",this,this.selNodes)
}},clearSelections:function(B){var D=this.selNodes;
if(D.length>0){for(var C=0,A=D.length;
C<A;
C++){D[C].ui.onSelectedChange(false)
}this.selNodes=[];
this.selMap={};
if(B!==true){this.fireEvent("selectionchange",this,this.selNodes)
}}},isSelected:function(A){return this.selMap[A.id]?true:false
},getSelectedNodes:function(){return this.selNodes
},onKeyDown:Ext.tree.DefaultSelectionModel.prototype.onKeyDown,selectNext:Ext.tree.DefaultSelectionModel.prototype.selectNext,selectPrevious:Ext.tree.DefaultSelectionModel.prototype.selectPrevious});
Ext.tree.TreeNode=function(B){B=B||{};
if(typeof B=="string"){B={text:B}
}this.childrenRendered=false;
this.rendered=false;
Ext.tree.TreeNode.superclass.constructor.call(this,B);
this.expanded=B.expanded===true;
this.isTarget=B.isTarget!==false;
this.draggable=B.draggable!==false&&B.allowDrag!==false;
this.allowChildren=B.allowChildren!==false&&B.allowDrop!==false;
this.text=B.text;
this.disabled=B.disabled===true;
this.addEvents({textchange:true,beforeexpand:true,beforecollapse:true,expand:true,disabledchange:true,collapse:true,beforeclick:true,click:true,dblclick:true,contextmenu:true,beforechildrenrendered:true});
var A=this.attributes.uiProvider||Ext.tree.TreeNodeUI;
this.ui=new A(this)
};
Ext.extend(Ext.tree.TreeNode,Ext.data.Node,{preventHScroll:true,isExpanded:function(){return this.expanded
},getUI:function(){return this.ui
},setFirstChild:function(A){var B=this.firstChild;
Ext.tree.TreeNode.superclass.setFirstChild.call(this,A);
if(this.childrenRendered&&B&&A!=B){B.renderIndent(true,true)
}if(this.rendered){this.renderIndent(true,true)
}},setLastChild:function(B){var A=this.lastChild;
Ext.tree.TreeNode.superclass.setLastChild.call(this,B);
if(this.childrenRendered&&A&&B!=A){A.renderIndent(true,true)
}if(this.rendered){this.renderIndent(true,true)
}},appendChild:function(){var A=Ext.tree.TreeNode.superclass.appendChild.apply(this,arguments);
if(A&&this.childrenRendered){A.render()
}this.ui.updateExpandIcon();
return A
},removeChild:function(A){this.ownerTree.getSelectionModel().unselect(A);
Ext.tree.TreeNode.superclass.removeChild.apply(this,arguments);
if(this.childrenRendered){A.ui.remove()
}if(this.childNodes.length<1){this.collapse(false,false)
}else{this.ui.updateExpandIcon()
}return A
},insertBefore:function(A,C){var B=Ext.tree.TreeNode.superclass.insertBefore.apply(this,arguments);
if(B&&C&&this.childrenRendered){A.render()
}this.ui.updateExpandIcon();
return B
},setText:function(B){var A=this.text;
this.text=B;
this.attributes.text=B;
if(this.rendered){this.ui.onTextChange(this,B,A)
}this.fireEvent("textchange",this,B,A)
},select:function(){this.getOwnerTree().getSelectionModel().select(this)
},unselect:function(){this.getOwnerTree().getSelectionModel().unselect(this)
},isSelected:function(){return this.getOwnerTree().getSelectionModel().isSelected(this)
},expand:function(A,C,B){if(!this.expanded){if(this.fireEvent("beforeexpand",this,A,C)===false){return 
}if(!this.childrenRendered){this.renderChildren()
}this.expanded=true;
if(!this.isHiddenRoot()&&(this.getOwnerTree().animate&&C!==false)||C){this.ui.animExpand(function(){this.fireEvent("expand",this);
if(typeof B=="function"){B(this)
}if(A===true){this.expandChildNodes(true)
}}.createDelegate(this));
return 
}else{this.ui.expand();
this.fireEvent("expand",this);
if(typeof B=="function"){B(this)
}}}else{if(typeof B=="function"){B(this)
}}if(A===true){this.expandChildNodes(true)
}},isHiddenRoot:function(){return this.isRoot&&!this.getOwnerTree().rootVisible
},collapse:function(E,D){if(this.expanded&&!this.isHiddenRoot()){if(this.fireEvent("beforecollapse",this,E,D)===false){return 
}this.expanded=false;
if((this.getOwnerTree().animate&&D!==false)||D){this.ui.animCollapse(function(){this.fireEvent("collapse",this);
if(E===true){this.collapseChildNodes(true)
}}.createDelegate(this));
return 
}else{this.ui.collapse();
this.fireEvent("collapse",this)
}}if(E===true){var C=this.childNodes;
for(var B=0,A=C.length;
B<A;
B++){C[B].collapse(true)
}}},delayedExpand:function(A){if(!this.expandProcId){this.expandProcId=this.expand.defer(A,this)
}},cancelExpand:function(){if(this.expandProcId){clearTimeout(this.expandProcId)
}this.expandProcId=false
},toggle:function(){if(this.expanded){this.collapse()
}else{this.expand()
}},ensureVisible:function(B){var A=this.getOwnerTree();
A.expandPath(this.getPath(),false,function(){A.getEl().scrollChildIntoView(this.ui.anchor);
Ext.callback(B)
}.createDelegate(this))
},expandChildNodes:function(B){var D=this.childNodes;
for(var C=0,A=D.length;
C<A;
C++){D[C].expand(B)
}},collapseChildNodes:function(B){var D=this.childNodes;
for(var C=0,A=D.length;
C<A;
C++){D[C].collapse(B)
}},disable:function(){this.disabled=true;
this.unselect();
if(this.rendered&&this.ui.onDisableChange){this.ui.onDisableChange(this,true)
}this.fireEvent("disabledchange",this,true)
},enable:function(){this.disabled=false;
if(this.rendered&&this.ui.onDisableChange){this.ui.onDisableChange(this,false)
}this.fireEvent("disabledchange",this,false)
},renderChildren:function(B){if(B!==false){this.fireEvent("beforechildrenrendered",this)
}var D=this.childNodes;
for(var C=0,A=D.length;
C<A;
C++){D[C].render(true)
}this.childrenRendered=true
},sort:function(D,E){Ext.tree.TreeNode.superclass.sort.apply(this,arguments);
if(this.childrenRendered){var C=this.childNodes;
for(var B=0,A=C.length;
B<A;
B++){C[B].render(true)
}}},render:function(A){this.ui.render(A);
if(!this.rendered){this.rendered=true;
if(this.expanded){this.expanded=false;
this.expand(false,false)
}}},renderIndent:function(E,D){if(D){this.ui.childIndent=null
}this.ui.renderIndent();
if(E===true&&this.childrenRendered){var C=this.childNodes;
for(var B=0,A=C.length;
B<A;
B++){C[B].renderIndent(true,D)
}}}});
Ext.tree.AsyncTreeNode=function(A){this.loaded=false;
this.loading=false;
Ext.tree.AsyncTreeNode.superclass.constructor.apply(this,arguments);
this.addEvents({beforeload:true,load:true})
};
Ext.extend(Ext.tree.AsyncTreeNode,Ext.tree.TreeNode,{expand:function(F,D,C){if(this.loading){var B;
var E=function(){if(!this.loading){clearInterval(B);
this.expand(F,D,C)
}}.createDelegate(this);
B=setInterval(E,200);
return 
}if(!this.loaded){if(this.fireEvent("beforeload",this)===false){return 
}this.loading=true;
this.ui.beforeLoad(this);
var A=this.loader||this.attributes.loader||this.getOwnerTree().getLoader();
if(A){A.load(this,this.loadComplete.createDelegate(this,[F,D,C]));
return 
}}Ext.tree.AsyncTreeNode.superclass.expand.call(this,F,D,C)
},isLoading:function(){return this.loading
},loadComplete:function(B,A,C){this.loading=false;
this.loaded=true;
this.ui.afterLoad(this);
this.fireEvent("load",this);
this.expand(B,A,C)
},isLoaded:function(){return this.loaded
},hasChildNodes:function(){if(!this.isLeaf()&&!this.loaded){return true
}else{return Ext.tree.AsyncTreeNode.superclass.hasChildNodes.call(this)
}},reload:function(A){this.collapse(false,false);
while(this.firstChild){this.removeChild(this.firstChild)
}this.childrenRendered=false;
this.loaded=false;
if(this.isHiddenRoot()){this.expanded=false
}this.expand(false,false,A)
}});
Ext.tree.TreeNodeUI=function(A){this.node=A;
this.rendered=false;
this.animating=false;
this.emptyIcon=Ext.BLANK_IMAGE_URL
};
Ext.tree.TreeNodeUI.prototype={removeChild:function(A){if(this.rendered){this.ctNode.removeChild(A.ui.getEl())
}},beforeLoad:function(){this.addClass("x-tree-node-loading")
},afterLoad:function(){this.removeClass("x-tree-node-loading")
},onTextChange:function(C,B,A){if(this.rendered){this.textNode.innerHTML=B
}},onDisableChange:function(B,A){this.disabled=A;
if(A){this.addClass("x-tree-node-disabled")
}else{this.removeClass("x-tree-node-disabled")
}},onSelectedChange:function(A){if(A){this.focus();
this.addClass("x-tree-selected")
}else{this.removeClass("x-tree-selected")
}},onMove:function(B,F,E,D,C,A){this.childIndent=null;
if(this.rendered){var H=D.ui.getContainer();
if(!H){this.holder=document.createElement("div");
this.holder.appendChild(this.wrap);
return 
}var G=A?A.ui.getEl():null;
if(G){H.insertBefore(this.wrap,G)
}else{H.appendChild(this.wrap)
}this.node.renderIndent(true)
}},addClass:function(A){if(this.elNode){Ext.fly(this.elNode).addClass(A)
}},removeClass:function(A){if(this.elNode){Ext.fly(this.elNode).removeClass(A)
}},remove:function(){if(this.rendered){this.holder=document.createElement("div");
this.holder.appendChild(this.wrap)
}},fireEvent:function(){return this.node.fireEvent.apply(this.node,arguments)
},initEvents:function(){this.node.on("move",this.onMove,this);
var G=Ext.EventManager;
var B=this.anchor;
var D=Ext.fly(B);
if(Ext.isOpera){D.setStyle("text-decoration","none")
}D.on("click",this.onClick,this);
D.on("dblclick",this.onDblClick,this);
D.on("contextmenu",this.onContextMenu,this);
var C=Ext.fly(this.iconNode);
C.on("click",this.onClick,this);
C.on("dblclick",this.onDblClick,this);
C.on("contextmenu",this.onContextMenu,this);
G.on(this.ecNode,"click",this.ecClick,this,true);
if(this.node.disabled){this.addClass("x-tree-node-disabled")
}if(this.node.hidden){this.addClass("x-tree-node-disabled")
}var F=this.node.getOwnerTree();
var A=F.enableDD||F.enableDrag||F.enableDrop;
if(A&&(!this.node.isRoot||F.rootVisible)){Ext.dd.Registry.register(this.elNode,{node:this.node,handles:[this.iconNode,this.textNode],isHandle:false})
}},hide:function(){if(this.rendered){this.wrap.style.display="none"
}},show:function(){if(this.rendered){this.wrap.style.display=""
}},onContextMenu:function(A){A.preventDefault();
this.focus();
this.fireEvent("contextmenu",this.node,A)
},onClick:function(A){if(this.dropping){return 
}if(this.fireEvent("beforeclick",this.node,A)!==false){if(!this.disabled&&this.node.attributes.href){this.fireEvent("click",this.node,A);
return 
}A.preventDefault();
if(this.disabled){return 
}if(this.node.attributes.singleClickExpand&&!this.animating&&this.node.hasChildNodes()){this.node.toggle()
}this.fireEvent("click",this.node,A)
}else{A.stopEvent()
}},onDblClick:function(A){A.preventDefault();
if(this.disabled){return 
}if(!this.animating&&this.node.hasChildNodes()){this.node.toggle()
}this.fireEvent("dblclick",this.node,A)
},ecClick:function(A){if(!this.animating&&this.node.hasChildNodes()){this.node.toggle()
}},startDrop:function(){this.dropping=true
},endDrop:function(){setTimeout(function(){this.dropping=false
}.createDelegate(this),50)
},expand:function(){this.updateExpandIcon();
this.ctNode.style.display=""
},focus:function(){if(!this.node.preventHScroll){try{this.anchor.focus()
}catch(C){}}else{if(!Ext.isIE){try{var B=this.node.getOwnerTree().el.dom;
var A=B.scrollLeft;
this.anchor.focus();
B.scrollLeft=A
}catch(C){}}}},blur:function(){try{this.anchor.blur()
}catch(A){}},animExpand:function(A){var B=Ext.get(this.ctNode);
B.stopFx();
if(!this.node.hasChildNodes()){this.updateExpandIcon();
this.ctNode.style.display="";
Ext.callback(A);
return 
}this.animating=true;
this.updateExpandIcon();
B.slideIn("t",{callback:function(){this.animating=false;
Ext.callback(A)
},scope:this,duration:this.node.ownerTree.duration||0.25})
},highlight:function(){var A=this.node.getOwnerTree();
Ext.fly(this.wrap).highlight(A.hlColor||"C3DAF9",{endColor:A.hlBaseColor})
},collapse:function(){this.updateExpandIcon();
this.ctNode.style.display="none"
},animCollapse:function(B){var A=Ext.get(this.ctNode);
A.enableDisplayMode("block");
A.stopFx();
this.animating=true;
this.updateExpandIcon();
A.slideOut("t",{callback:function(){this.animating=false;
Ext.callback(B)
},scope:this,duration:this.node.ownerTree.duration||0.25})
},getContainer:function(){return this.ctNode
},getEl:function(){return this.wrap
},appendDDGhost:function(A){A.appendChild(this.elNode.cloneNode(true))
},getDDRepairXY:function(){return Ext.lib.Dom.getXY(this.iconNode)
},onRender:function(){this.render()
},render:function(E){var F=this.node;
var D=F.parentNode?F.parentNode.ui.getContainer():F.ownerTree.container.dom;
if(!this.rendered){this.rendered=true;
var A=F.attributes;
this.indentMarkup="";
if(F.parentNode){this.indentMarkup=F.parentNode.ui.getChildIndent()
}var B=['<li class="x-tree-node"><div class="x-tree-node-el ',F.attributes.cls,'">','<span class="x-tree-node-indent">',this.indentMarkup,"</span>",'<img src="',this.emptyIcon,'" class="x-tree-ec-icon">','<img src="',A.icon||this.emptyIcon,'" class="x-tree-node-icon',(A.icon?" x-tree-node-inline-icon":""),(A.iconCls?" "+A.iconCls:""),'" unselectable="on">','<a hidefocus="on" href="',A.href?A.href:"#",'" tabIndex="1" ',A.hrefTarget?' target="'+A.hrefTarget+'"':"",'><span unselectable="on">',F.text,"</span></a></div>",'<ul class="x-tree-node-ct" style="display:none;"></ul>',"</li>"];
if(E!==true&&F.nextSibling&&F.nextSibling.ui.getEl()){this.wrap=Ext.DomHelper.insertHtml("beforeBegin",F.nextSibling.ui.getEl(),B.join(""))
}else{this.wrap=Ext.DomHelper.insertHtml("beforeEnd",D,B.join(""))
}this.elNode=this.wrap.childNodes[0];
this.ctNode=this.wrap.childNodes[1];
var C=this.elNode.childNodes;
this.indentNode=C[0];
this.ecNode=C[1];
this.iconNode=C[2];
this.anchor=C[3];
this.textNode=C[3].firstChild;
if(A.qtip){if(this.textNode.setAttributeNS){this.textNode.setAttributeNS("ext","qtip",A.qtip);
if(A.qtipTitle){this.textNode.setAttributeNS("ext","qtitle",A.qtipTitle)
}}else{this.textNode.setAttribute("ext:qtip",A.qtip);
if(A.qtipTitle){this.textNode.setAttribute("ext:qtitle",A.qtipTitle)
}}}this.initEvents();
if(!this.node.expanded){this.updateExpandIcon()
}}else{if(E===true){D.appendChild(this.wrap)
}}},getAnchor:function(){return this.anchor
},getTextEl:function(){return this.textNode
},getIconEl:function(){return this.iconNode
},updateExpandIcon:function(){if(this.rendered){var F=this.node,E,D;
var A=F.isLast()?"x-tree-elbow-end":"x-tree-elbow";
var C=F.hasChildNodes();
if(C){if(F.expanded){A+="-minus";
E="x-tree-node-collapsed";
D="x-tree-node-expanded"
}else{A+="-plus";
E="x-tree-node-expanded";
D="x-tree-node-collapsed"
}if(this.wasLeaf){this.removeClass("x-tree-node-leaf");
this.wasLeaf=false
}if(this.c1!=E||this.c2!=D){Ext.fly(this.elNode).replaceClass(E,D);
this.c1=E;
this.c2=D
}}else{if(!this.wasLeaf){Ext.fly(this.elNode).replaceClass("x-tree-node-expanded","x-tree-node-leaf");
this.wasLeaf=true
}}var B="x-tree-ec-icon "+A;
if(this.ecc!=B){this.ecNode.className=B;
this.ecc=B
}}},getChildIndent:function(){if(!this.childIndent){var A=[];
var B=this.node;
while(B){if(!B.isRoot||(B.isRoot&&B.ownerTree.rootVisible)){if(!B.isLast()){A.unshift('<img src="'+this.emptyIcon+'" class="x-tree-elbow-line">')
}else{A.unshift('<img src="'+this.emptyIcon+'" class="x-tree-icon">')
}}B=B.parentNode
}this.childIndent=A.join("")
}return this.childIndent
},renderIndent:function(){if(this.rendered){var A="";
var B=this.node.parentNode;
if(B){A=B.ui.getChildIndent()
}if(this.indentMarkup!=A){this.indentNode.innerHTML=A;
this.indentMarkup=A
}this.updateExpandIcon()
}}};
Ext.tree.RootTreeNodeUI=function(){Ext.tree.RootTreeNodeUI.superclass.constructor.apply(this,arguments)
};
Ext.extend(Ext.tree.RootTreeNodeUI,Ext.tree.TreeNodeUI,{render:function(){if(!this.rendered){var A=this.node.ownerTree.container.dom;
this.node.expanded=true;
A.innerHTML='<div class="x-tree-root-node"></div>';
this.wrap=this.ctNode=A.firstChild
}},collapse:function(){},expand:function(){}});
Ext.tree.TreeLoader=function(A){this.baseParams={};
this.requestMethod="POST";
Ext.apply(this,A);
this.addEvents({beforeload:true,load:true,loadexception:true})
};
Ext.extend(Ext.tree.TreeLoader,Ext.util.Observable,{uiProviders:{},clearOnLoad:true,load:function(E,D){if(this.clearOnLoad){while(E.firstChild){E.removeChild(E.firstChild)
}}if(E.attributes.children){var C=E.attributes.children;
for(var B=0,A=C.length;
B<A;
B++){E.appendChild(this.createNode(C[B]))
}if(typeof D=="function"){D()
}}else{if(this.dataUrl){this.requestData(E,D)
}}},getParams:function(B){var A=[],D=this.baseParams;
for(var C in D){if(typeof D[C]!="function"){A.push(encodeURIComponent(C),"=",encodeURIComponent(D[C]),"&")
}}A.push("node=",encodeURIComponent(B.id));
return A.join("")
},requestData:function(D,C){if(this.fireEvent("beforeload",this,D,C)!==false){var B=this.getParams(D);
var A={success:this.handleResponse,failure:this.handleFailure,scope:this,argument:{callback:C,node:D}};
this.transId=Ext.lib.Ajax.request(this.requestMethod,this.dataUrl,A,B)
}else{if(typeof C=="function"){C()
}}},isLoading:function(){return this.transId?true:false
},abort:function(){if(this.isLoading()){Ext.lib.Ajax.abort(this.transId)
}},createNode:function(_f){if(this.applyLoader!==false){_f.loader=this
}if(typeof _f.uiProvider=="string"){_f.uiProvider=this.uiProviders[_f.uiProvider]||eval(_f.uiProvider)
}return(_f.leaf?new Ext.tree.TreeNode(_f):new Ext.tree.AsyncTreeNode(_f))
},processResponse:function(_10,_11,_12){var _13=_10.responseText;
try{var o=eval("("+_13+")");
for(var i=0,len=o.length;
i<len;
i++){var n=this.createNode(o[i]);
if(n){_11.appendChild(n)
}}if(typeof _12=="function"){_12(this,_11)
}}catch(e){this.handleFailure(_10)
}},handleResponse:function(B){this.transId=false;
var A=B.argument;
this.processResponse(B,A.node,A.callback);
this.fireEvent("load",this,A.node,B)
},handleFailure:function(B){this.transId=false;
var A=B.argument;
this.fireEvent("loadexception",this,A.node,B);
if(typeof A.callback=="function"){A.callback(this,A.node)
}}});
Ext.tree.TreeFilter=function(B,A){this.tree=B;
this.filtered={};
Ext.apply(this,A,{clearBlank:false,reverse:false,autoClear:false,remove:false})
};
Ext.tree.TreeFilter.prototype={filter:function(D,C,B){C=C||"text";
var E;
if(typeof D=="string"){var A=D.length;
if(A==0&&this.clearBlank){this.clearFilter();
return 
}D=D.toLowerCase();
E=function(F){return F.attributes[C].substr(0,A).toLowerCase()==D
}
}else{if(D.exec){E=function(F){return D.test(F.attributes[C])
}
}else{throw"Illegal filter type, must be string or regex"
}}this.filterBy(E,null,B)
},filterBy:function(D,C,A){A=A||this.tree.root;
if(this.autoClear){this.clearFilter()
}var B=this.filtered,H=this.reverse;
var E=function(J){if(J==A){return true
}if(B[J.id]){return false
}var I=D.call(C||J,J);
if(!I||H){B[J.id]=J;
J.ui.hide();
return false
}return true
};
A.cascade(E);
if(this.remove){for(var G in B){if(typeof G!="function"){var F=B[G];
if(F&&F.parentNode){F.parentNode.removeChild(F)
}}}}},clear:function(){var B=this.tree;
var A=this.filtered;
for(var D in A){if(typeof D!="function"){var C=A[D];
if(C){C.ui.show()
}}}this.filtered={}
}};
Ext.tree.TreeSorter=function(H,F){Ext.apply(this,F);
H.on("beforechildrenrendered",this.doSort,this);
H.on("append",this.updateSort,this);
H.on("insert",this.updateSort,this);
var E=this.dir&&this.dir.toLowerCase()=="desc";
var G=this.property||"text";
var C=this.sortType;
var A=this.folderSort;
var D=this.caseSensitive===true;
var B=this.leafAttr||"leaf";
this.sortFn=function(J,I){if(A){if(J.attributes[B]&&!I.attributes[B]){return 1
}if(!J.attributes[B]&&I.attributes[B]){return -1
}}var L=C?C(J):(D?J[G]:J[G].toUpperCase());
var K=C?C(I):(D?I[G]:I[G].toUpperCase());
if(L<K){return E?+1:-1
}else{if(L>K){return E?-1:+1
}else{return 0
}}}
};
Ext.tree.TreeSorter.prototype={doSort:function(A){A.sort(this.sortFn)
},compareNodes:function(B,A){return(B.text.toUpperCase()>A.text.toUpperCase()?1:-1)
},updateSort:function(B,A){if(A.childrenRendered){this.doSort.defer(1,this,[A])
}}};
if(Ext.dd.DropZone){Ext.tree.TreeDropZone=function(B,A){this.allowParentInsert=false;
this.allowContainerDrop=false;
this.appendOnly=false;
Ext.tree.TreeDropZone.superclass.constructor.call(this,B.container,A);
this.tree=B;
this.lastInsertClass="x-tree-no-status";
this.dragOverData={}
};
Ext.extend(Ext.tree.TreeDropZone,Ext.dd.DropZone,{ddGroup:"TreeDD",expandDelay:1000,expandNode:function(A){if(A.hasChildNodes()&&!A.isExpanded()){A.expand(false,null,this.triggerCacheRefresh.createDelegate(this))
}},queueExpand:function(A){this.expandProcId=this.expandNode.defer(this.expandDelay,this,[A])
},cancelExpand:function(){if(this.expandProcId){clearTimeout(this.expandProcId);
this.expandProcId=false
}},isValidDropPoint:function(A,I,H,D,B){if(!A||!B){return false
}var G=A.node;
var F=B.node;
if(!(G&&G.isTarget&&I)){return false
}if(I=="append"&&G.allowChildren===false){return false
}if((I=="above"||I=="below")&&(G.parentNode&&G.parentNode.allowChildren===false)){return false
}if(F&&(G==F||F.contains(G))){return false
}var E=this.dragOverData;
E.tree=this.tree;
E.target=G;
E.data=B;
E.point=I;
E.source=H;
E.rawEvent=D;
E.dropNode=F;
E.cancel=false;
var C=this.tree.fireEvent("nodedragover",E);
return E.cancel===false&&C!==false
},getDropPoint:function(F,C,I){var J=C.node;
if(J.isRoot){return J.allowChildren!==false?"append":false
}var E=C.ddel;
var K=Ext.lib.Dom.getY(E),H=K+E.offsetHeight;
var G=Ext.lib.Event.getPageY(F);
var D=J.allowChildren===false||J.isLeaf();
if(this.appendOnly||J.parentNode.allowChildren===false){return D?false:"append"
}var B=false;
if(!this.allowParentInsert){B=J.hasChildNodes()&&J.isExpanded()
}var A=(H-K)/(D?2:3);
if(G>=K&&G<(K+A)){return"above"
}else{if(!B&&(D||G>=H-A&&G<=H)){return"below"
}else{return"append"
}}},onNodeEnter:function(D,A,C,B){this.cancelExpand()
},onNodeOver:function(E,G,F,D){var I=this.getDropPoint(F,E,G);
var B=E.node;
if(!this.expandProcId&&I=="append"&&B.hasChildNodes()&&!E.node.isExpanded()){this.queueExpand(B)
}else{if(I!="append"){this.cancelExpand()
}}var A=this.dropNotAllowed;
if(this.isValidDropPoint(E,I,G,F,D)){if(I){var C=E.ddel;
var H;
if(I=="above"){A=E.node.isFirst()?"x-tree-drop-ok-above":"x-tree-drop-ok-between";
H="x-tree-drag-insert-above"
}else{if(I=="below"){A=E.node.isLast()?"x-tree-drop-ok-below":"x-tree-drop-ok-between";
H="x-tree-drag-insert-below"
}else{A="x-tree-drop-ok-append";
H="x-tree-drag-append"
}}if(this.lastInsertClass!=H){Ext.fly(C).replaceClass(this.lastInsertClass,H);
this.lastInsertClass=H
}}}return A
},onNodeOut:function(D,A,C,B){this.cancelExpand();
this.removeDropIndicators(D)
},onNodeDrop:function(A,H,B,I){var G=this.getDropPoint(B,A,H);
var F=A.node;
F.ui.startDrop();
if(!this.isValidDropPoint(A,G,H,B,I)){F.ui.endDrop();
return false
}var E=I.node||(H.getTreeNode?H.getTreeNode(I,F,G,B):null);
var D={tree:this.tree,target:F,data:I,point:G,source:H,rawEvent:B,dropNode:E,cancel:!E};
var C=this.tree.fireEvent("beforenodedrop",D);
if(C===false||D.cancel===true||!D.dropNode){F.ui.endDrop();
return false
}F=D.target;
if(G=="append"&&!F.isExpanded()){F.expand(false,null,function(){this.completeDrop(D)
}.createDelegate(this))
}else{this.completeDrop(D)
}return true
},completeDrop:function(G){var D=G.dropNode,E=G.point,C=G.target;
if(!(D instanceof Array)){D=[D]
}var F;
for(var B=0,A=D.length;
B<A;
B++){F=D[B];
if(E=="above"){C.parentNode.insertBefore(F,C)
}else{if(E=="below"){C.parentNode.insertBefore(F,C.nextSibling)
}else{C.appendChild(F)
}}}F.ui.focus();
if(this.tree.hlDrop){F.ui.highlight()
}C.ui.endDrop();
this.tree.fireEvent("nodedrop",G)
},afterNodeMoved:function(A,E,D,C,B){if(this.tree.hlDrop){B.ui.focus();
B.ui.highlight()
}this.tree.fireEvent("nodedrop",this.tree,C,E,A,D)
},getTree:function(){return this.tree
},removeDropIndicators:function(B){if(B&&B.ddel){var A=B.ddel;
Ext.fly(A).removeClass(["x-tree-drag-insert-above","x-tree-drag-insert-below","x-tree-drag-append"]);
this.lastInsertClass="_noclass"
}},beforeDragDrop:function(A,B,C){this.cancelExpand();
return true
},afterRepair:function(A){if(A&&Ext.enableFx){A.node.ui.highlight()
}this.hideProxy()
}})
}if(Ext.dd.DragZone){Ext.tree.TreeDragZone=function(B,A){Ext.tree.TreeDragZone.superclass.constructor.call(this,B.getEl(),A);
this.tree=B
};
Ext.extend(Ext.tree.TreeDragZone,Ext.dd.DragZone,{ddGroup:"TreeDD",onBeforeDrag:function(A,B){var C=A.node;
return C&&C.draggable&&!C.disabled
},onInitDrag:function(B){var A=this.dragData;
this.tree.getSelectionModel().select(A.node);
this.proxy.update("");
A.node.ui.appendDDGhost(this.proxy.ghost.dom);
this.tree.fireEvent("startdrag",this.tree,A.node,B)
},getRepairXY:function(B,A){return A.node.ui.getDDRepairXY()
},onEndDrag:function(A,B){this.tree.fireEvent("enddrag",this.tree,A.node,B)
},onValidDrop:function(A,B,C){this.tree.fireEvent("dragdrop",this.tree,this.dragData.node,A,B);
this.hideProxy()
},beforeInvalidDrop:function(A,C){var B=this.tree.getSelectionModel();
B.clearSelections();
B.select(this.dragData.node)
}})
}Ext.tree.TreeEditor=function(C,B){B=B||{};
var A=B.events?B:new Ext.form.TextField(B);
Ext.tree.TreeEditor.superclass.constructor.call(this,A);
this.tree=C;
C.on("beforeclick",this.beforeNodeClick,this);
C.el.on("mousedown",this.hide,this);
this.on("complete",this.updateNode,this);
this.on("beforestartedit",this.fitToTree,this);
this.on("startedit",this.bindScroll,this,{delay:10});
this.on("specialkey",this.onSpecialKey,this)
};
Ext.extend(Ext.tree.TreeEditor,Ext.Editor,{alignment:"l-l",autoSize:false,hideEl:false,cls:"x-small-editor x-tree-editor",shim:false,shadow:"frame",maxWidth:250,fitToTree:function(B,C){var E=this.tree.el.dom,D=C.dom;
if(E.scrollLeft>D.offsetLeft){E.scrollLeft=D.offsetLeft
}var A=Math.min(this.maxWidth,(E.clientWidth>20?E.clientWidth:E.offsetWidth)-Math.max(0,D.offsetLeft-E.scrollLeft)-5);
this.setSize(A,"")
},triggerEdit:function(A){this.completeEdit();
this.editNode=A;
this.startEdit(A.ui.textNode,A.text)
},bindScroll:function(){this.tree.el.on("scroll",this.cancelEdit,this)
},beforeNodeClick:function(A){if(this.tree.getSelectionModel().isSelected(A)){this.triggerEdit(A);
return false
}},updateNode:function(B,A){this.tree.el.un("scroll",this.cancelEdit,this);
this.editNode.setText(A)
},onSpecialKey:function(A,C){var B=C.getKey();
if(B==C.ESC){this.cancelEdit();
C.stopEvent()
}else{if(B==C.ENTER&&!C.hasModifier()){this.completeEdit();
C.stopEvent()
}}}});
Ext.menu.Menu=function(B){Ext.apply(this,B);
this.id=this.id||Ext.id();
this.addEvents({beforeshow:true,beforehide:true,show:true,hide:true,click:true,mouseover:true,mouseout:true,itemclick:true});
Ext.menu.MenuMgr.register(this);
var A=this.items;
this.items=new Ext.util.MixedCollection();
if(A){this.add.apply(this,A)
}};
Ext.extend(Ext.menu.Menu,Ext.util.Observable,{minWidth:120,shadow:"sides",subMenuAlign:"tl-tr?",defaultAlign:"tl-bl?",allowOtherMenus:false,render:function(){if(this.el){return 
}var B=this.el=new Ext.Layer({cls:"x-menu",shadow:this.shadow,constrain:false,parentEl:this.parentEl||document.body,zindex:15000});
this.keyNav=new Ext.menu.MenuNav(this);
if(this.plain){B.addClass("x-menu-plain")
}if(this.cls){B.addClass(this.cls)
}this.focusEl=B.createChild({tag:"a",cls:"x-menu-focus",href:"#",onclick:"return false;",tabIndex:"-1"});
var A=B.createChild({tag:"ul",cls:"x-menu-list"});
A.on("click",this.onClick,this);
A.on("mouseover",this.onMouseOver,this);
A.on("mouseout",this.onMouseOut,this);
this.items.each(function(D){var C=document.createElement("li");
C.className="x-menu-list-item";
A.dom.appendChild(C);
D.render(C,this)
},this);
this.ul=A;
this.autoWidth()
},autoWidth:function(){var D=this.el,C=this.ul;
if(!D){return 
}var A=this.width;
if(A){D.setWidth(A)
}else{if(Ext.isIE){D.setWidth(this.minWidth);
var B=D.dom.offsetWidth;
D.setWidth(C.getWidth()+D.getFrameWidth("lr"))
}}},delayAutoWidth:function(){if(this.rendered){if(!this.awTask){this.awTask=new Ext.util.DelayedTask(this.autoWidth,this)
}this.awTask.delay(20)
}},findTargetItem:function(B){var A=B.getTarget(".x-menu-list-item",this.ul,true);
if(A&&A.menuItemId){return this.items.get(A.menuItemId)
}},onClick:function(B){var A;
if(A=this.findTargetItem(B)){A.onClick(B);
this.fireEvent("click",this,A,B)
}},setActiveItem:function(B,A){if(B!=this.activeItem){if(this.activeItem){this.activeItem.deactivate()
}this.activeItem=B;
B.activate(A)
}else{if(A){B.expandMenu()
}}},tryActivate:function(F,E){var D=this.items;
for(var C=F,A=D.length;
C>=0&&C<A;
C+=E){var B=D.get(C);
if(!B.disabled&&B.canActivate){this.setActiveItem(B,false);
return B
}}return false
},onMouseOver:function(B){var A;
if(A=this.findTargetItem(B)){if(A.canActivate&&!A.disabled){this.setActiveItem(A,true)
}}this.fireEvent("mouseover",this,B,A)
},onMouseOut:function(B){var A;
if(A=this.findTargetItem(B)){if(A==this.activeItem&&A.shouldDeactivate(B)){this.activeItem.deactivate();
delete this.activeItem
}}this.fireEvent("mouseout",this,B,A)
},isVisible:function(){return this.el&&this.el.isVisible()
},show:function(B,C,A){this.parentMenu=A;
if(!this.el){this.render()
}this.fireEvent("beforeshow",this);
this.showAt(this.el.getAlignToXY(B,C||this.defaultAlign),A,false)
},showAt:function(C,A,B){this.parentMenu=A;
if(!this.el){this.render()
}if(B!==false){this.fireEvent("beforeshow",this)
}this.el.setXY(C);
this.el.show();
this.focusEl.focus.defer(50,this.focusEl);
this.fireEvent("show",this)
},hide:function(A){if(this.el&&this.isVisible()){this.fireEvent("beforehide",this);
if(this.activeItem){this.activeItem.deactivate();
this.activeItem=null
}this.el.hide();
this.fireEvent("hide",this)
}if(A===true&&this.parentMenu){this.parentMenu.hide(true)
}},add:function(){var B=arguments,A=B.length,E;
for(var C=0;
C<A;
C++){var D=B[C];
if(D.render){E=this.addItem(D)
}else{if(typeof D=="string"){if(D=="separator"||D=="-"){E=this.addSeparator()
}else{E=this.addText(D)
}}else{if(D.tagName||D.el){E=this.addElement(D)
}else{if(typeof D=="object"){E=this.addMenuItem(D)
}}}}}return E
},getEl:function(){if(!this.el){this.render()
}return this.el
},addSeparator:function(){return this.addItem(new Ext.menu.Separator())
},addElement:function(A){return this.addItem(new Ext.menu.BaseItem(A))
},addItem:function(B){this.items.add(B);
if(this.ul){var A=document.createElement("li");
A.className="x-menu-list-item";
this.ul.dom.appendChild(A);
B.render(A,this);
this.delayAutoWidth()
}return B
},addMenuItem:function(A){if(!(A instanceof Ext.menu.Item)){A=new Ext.menu.Item(A)
}return this.addItem(A)
},addText:function(A){return this.addItem(new Ext.menu.TextItem(A))
},insert:function(C,B){this.items.insert(C,B);
if(this.ul){var A=document.createElement("li");
A.className="x-menu-list-item";
this.ul.dom.insertBefore(A,this.ul.dom.childNodes[C]);
B.render(A,this);
this.delayAutoWidth()
}return B
},remove:function(A){this.items.removeKey(A.id);
A.destroy()
},removeAll:function(){var A;
while(A=this.items.first()){this.remove(A)
}}});
Ext.menu.MenuNav=function(A){Ext.menu.MenuNav.superclass.constructor.call(this,A.el);
this.scope=this.menu=A
};
Ext.extend(Ext.menu.MenuNav,Ext.KeyNav,{doRelay:function(C,B){var A=C.getKey();
if(!this.menu.activeItem&&C.isNavKeyPress()&&A!=C.SPACE&&A!=C.RETURN){this.menu.tryActivate(0,1);
return false
}return B.call(this.scope||this,C,this.menu)
},up:function(B,A){if(!A.tryActivate(A.items.indexOf(A.activeItem)-1,-1)){A.tryActivate(A.items.length-1,-1)
}},down:function(B,A){if(!A.tryActivate(A.items.indexOf(A.activeItem)+1,1)){A.tryActivate(0,1)
}},right:function(B,A){if(A.activeItem){A.activeItem.expandMenu(true)
}},left:function(B,A){A.hide();
if(A.parentMenu&&A.parentMenu.activeItem){A.parentMenu.activeItem.activate()
}},enter:function(B,A){if(A.activeItem){B.stopPropagation();
A.activeItem.onClick(B);
A.fireEvent("click",this,A.activeItem);
return true
}}});
Ext.menu.MenuMgr=function(){var L,K,I={},H=false,G=new Date();
function M(){L={},K=new Ext.util.MixedCollection();
Ext.get(document).addKeyListener(27,function(){if(K.length>0){D()
}})
}function D(){if(K.length>0){var N=K.clone();
N.each(function(O){O.hide()
})
}}function B(N){K.remove(N);
if(K.length<1){Ext.get(document).un("mousedown",J);
H=false
}}function F(N){var O=K.last();
G=new Date();
K.add(N);
if(!H){Ext.get(document).on("mousedown",J);
H=true
}if(N.parentMenu){N.getEl().setZIndex(parseInt(N.parentMenu.getEl().getStyle("z-index"),10)+3);
N.parentMenu.activeChild=N
}else{if(O&&O.isVisible()){N.getEl().setZIndex(parseInt(O.getEl().getStyle("z-index"),10)+3)
}}}function A(N){if(N.activeChild){N.activeChild.hide()
}if(N.autoHideTimer){clearTimeout(N.autoHideTimer);
delete N.autoHideTimer
}}function C(N){var O=N.parentMenu;
if(!O&&!N.allowOtherMenus){D()
}else{if(O&&O.activeChild){O.activeChild.hide()
}}}function J(N){if(G.getElapsed()>50&&K.length>0&&!N.getTarget(".x-menu")){D()
}}function E(O,R){if(R){var Q=I[O.group];
for(var P=0,N=Q.length;
P<N;
P++){if(Q[P]!=O){Q[P].setChecked(false)
}}}}return{hideAll:function(){D()
},register:function(O){if(!L){M()
}L[O.id]=O;
O.on("beforehide",A);
O.on("hide",B);
O.on("beforeshow",C);
O.on("show",F);
var N=O.group;
if(N&&O.events.checkchange){if(!I[N]){I[N]=[]
}I[N].push(O);
O.on("checkchange",onCheck)
}},get:function(N){if(typeof N=="string"){return L[N]
}else{if(N.events){return N
}else{return new Ext.menu.Menu(N)
}}},unregister:function(N){delete L[N.id];
N.un("beforehide",A);
N.un("hide",B);
N.un("beforeshow",C);
N.un("show",F);
var O=N.group;
if(O&&N.events.checkchange){I[O].remove(N);
N.un("checkchange",onCheck)
}},registerCheckable:function(N){var O=N.group;
if(O){if(!I[O]){I[O]=[]
}I[O].push(N);
N.on("beforecheckchange",E)
}},unregisterCheckable:function(N){var O=N.group;
if(O){I[O].remove(N);
N.un("beforecheckchange",E)
}}}
}();
Ext.menu.BaseItem=function(A){Ext.menu.BaseItem.superclass.constructor.call(this,A);
this.addEvents({click:true,activate:true,deactivate:true});
if(this.handler){this.on("click",this.handler,this.scope,true)
}};
Ext.extend(Ext.menu.BaseItem,Ext.Component,{canActivate:false,activeClass:"x-menu-item-active",hideOnClick:true,hideDelay:100,ctype:"Ext.menu.BaseItem",actionMode:"container",render:function(B,A){this.parentMenu=A;
Ext.menu.BaseItem.superclass.render.call(this,B);
this.container.menuItemId=this.id
},onRender:function(B,A){this.el=Ext.get(this.el);
B.dom.appendChild(this.el.dom)
},onClick:function(A){if(!this.disabled&&this.fireEvent("click",this,A)!==false&&this.parentMenu.fireEvent("itemclick",this,A)!==false){this.handleClick(A)
}else{A.stopEvent()
}},activate:function(){if(this.disabled){return false
}var A=this.container;
A.addClass(this.activeClass);
this.region=A.getRegion().adjust(2,2,-2,-2);
this.fireEvent("activate",this);
return true
},deactivate:function(){this.container.removeClass(this.activeClass);
this.fireEvent("deactivate",this)
},shouldDeactivate:function(A){return !this.region||!this.region.contains(A.getPoint())
},handleClick:function(A){if(this.hideOnClick){this.parentMenu.hide.defer(this.hideDelay,this.parentMenu,[true])
}},expandMenu:function(A){},hideMenu:function(){}});
Ext.menu.TextItem=function(A){this.text=A;
Ext.menu.TextItem.superclass.constructor.call(this)
};
Ext.extend(Ext.menu.TextItem,Ext.menu.BaseItem,{hideOnClick:false,itemCls:"x-menu-text",onRender:function(){var A=document.createElement("span");
A.className=this.itemCls;
A.innerHTML=this.text;
this.el=A;
Ext.menu.TextItem.superclass.onRender.apply(this,arguments)
}});
Ext.menu.Separator=function(A){Ext.menu.Separator.superclass.constructor.call(this,A)
};
Ext.extend(Ext.menu.Separator,Ext.menu.BaseItem,{itemCls:"x-menu-sep",hideOnClick:false,onRender:function(A){var B=document.createElement("span");
B.className=this.itemCls;
B.innerHTML="&#160;";
this.el=B;
A.addClass("x-menu-sep-li");
Ext.menu.Separator.superclass.onRender.apply(this,arguments)
}});
Ext.menu.Item=function(A){Ext.menu.Item.superclass.constructor.call(this,A);
if(this.menu){this.menu=Ext.menu.MenuMgr.get(this.menu)
}};
Ext.extend(Ext.menu.Item,Ext.menu.BaseItem,{itemCls:"x-menu-item",canActivate:true,ctype:"Ext.menu.Item",onRender:function(C,B){var A=document.createElement("a");
A.hideFocus=true;
A.unselectable="on";
A.href=this.href||"#";
if(this.hrefTarget){A.target=this.hrefTarget
}A.className=this.itemCls+(this.menu?" x-menu-item-arrow":"")+(this.cls?" "+this.cls:"");
A.innerHTML=String.format('<img src="{0}" class="x-menu-item-icon">{1}',this.icon||Ext.BLANK_IMAGE_URL,this.text);
this.el=A;
Ext.menu.Item.superclass.onRender.call(this,C,B)
},setText:function(A){this.text=A;
if(this.rendered){this.el.update(String.format('<img src="{0}" class="x-menu-item-icon">{1}',this.icon||Ext.BLANK_IMAGE_URL,this.text));
this.parentMenu.autoWidth()
}},handleClick:function(A){if(!this.href){A.stopEvent()
}Ext.menu.Item.superclass.handleClick.apply(this,arguments)
},activate:function(A){if(Ext.menu.Item.superclass.activate.apply(this,arguments)){this.focus();
if(A){this.expandMenu()
}}return true
},shouldDeactivate:function(A){if(Ext.menu.Item.superclass.shouldDeactivate.call(this,A)){if(this.menu&&this.menu.isVisible()){return !this.menu.getEl().getRegion().contains(A.getPoint())
}return true
}return false
},deactivate:function(){Ext.menu.Item.superclass.deactivate.apply(this,arguments);
this.hideMenu()
},expandMenu:function(A){if(!this.disabled&&this.menu){if(!this.menu.isVisible()){this.menu.show(this.container,this.parentMenu.subMenuAlign||"tl-tr?",this.parentMenu)
}if(A){this.menu.tryActivate(0,1)
}}},hideMenu:function(){if(this.menu&&this.menu.isVisible()){this.menu.hide()
}}});
Ext.menu.CheckItem=function(A){Ext.menu.CheckItem.superclass.constructor.call(this,A);
this.addEvents({beforecheckchange:true,checkchange:true});
if(this.checkHandler){this.on("checkchange",this.checkHandler,this.scope)
}};
Ext.extend(Ext.menu.CheckItem,Ext.menu.Item,{itemCls:"x-menu-item x-menu-check-item",groupClass:"x-menu-group-item",checked:false,ctype:"Ext.menu.CheckItem",onRender:function(A){Ext.menu.CheckItem.superclass.onRender.apply(this,arguments);
if(this.group){this.el.addClass(this.groupClass)
}Ext.menu.MenuMgr.registerCheckable(this);
if(this.checked){this.checked=false;
this.setChecked(true,true)
}},destroy:function(){if(this.rendered){Ext.menu.MenuMgr.unregisterCheckable(this)
}Ext.menu.CheckItem.superclass.destroy.apply(this,arguments)
},setChecked:function(B,A){if(this.checked!=B&&this.fireEvent("beforecheckchange",this,B)!==false){if(this.container){this.container[B?"addClass":"removeClass"]("x-menu-item-checked")
}this.checked=B;
if(A!==true){this.fireEvent("checkchange",this,B)
}}},handleClick:function(A){if(!this.disabled&&!(this.checked&&this.group)){this.setChecked(!this.checked)
}Ext.menu.CheckItem.superclass.handleClick.apply(this,arguments)
}});
Ext.menu.Adapter=function(B,A){Ext.menu.Adapter.superclass.constructor.call(this,A);
this.component=B
};
Ext.extend(Ext.menu.Adapter,Ext.menu.BaseItem,{canActivate:true,onRender:function(B,A){this.component.render(B);
this.el=this.component.getEl()
},activate:function(){if(this.disabled){return false
}this.component.focus();
this.fireEvent("activate",this);
return true
},deactivate:function(){this.fireEvent("deactivate",this)
},disable:function(){this.component.disable();
Ext.menu.Adapter.superclass.disable.call(this)
},enable:function(){this.component.enable();
Ext.menu.Adapter.superclass.enable.call(this)
}});
Ext.menu.DateItem=function(A){Ext.menu.DateItem.superclass.constructor.call(this,new Ext.DatePicker(A),A);
this.picker=this.component;
this.addEvents({select:true});
this.picker.on("render",function(B){B.getEl().swallowEvent("click");
B.container.addClass("x-menu-date-item")
});
this.picker.on("select",this.onSelect,this)
};
Ext.extend(Ext.menu.DateItem,Ext.menu.Adapter,{onSelect:function(B,A){this.fireEvent("select",this,A,B);
Ext.menu.DateItem.superclass.handleClick.call(this)
}});
Ext.menu.ColorItem=function(A){Ext.menu.ColorItem.superclass.constructor.call(this,new Ext.ColorPalette(A),A);
this.palette=this.component;
this.relayEvents(this.palette,["select"]);
if(this.selectHandler){this.on("select",this.selectHandler,this.scope)
}};
Ext.extend(Ext.menu.ColorItem,Ext.menu.Adapter);
Ext.menu.DateMenu=function(B){Ext.menu.DateMenu.superclass.constructor.call(this,B);
this.plain=true;
var A=new Ext.menu.DateItem(B);
this.add(A);
this.picker=A.picker;
this.relayEvents(A,["select"])
};
Ext.extend(Ext.menu.DateMenu,Ext.menu.Menu);
Ext.menu.ColorMenu=function(B){Ext.menu.ColorMenu.superclass.constructor.call(this,B);
this.plain=true;
var A=new Ext.menu.ColorItem(B);
this.add(A);
this.palette=A.palette;
this.relayEvents(A,["select"])
};
Ext.extend(Ext.menu.ColorMenu,Ext.menu.Menu);
Ext.form.Field=function(A){Ext.form.Field.superclass.constructor.call(this,A);
this.addEvents({focus:true,blur:true,specialkey:true,change:true,invalid:true,valid:true})
};
Ext.extend(Ext.form.Field,Ext.Component,{invalidClass:"x-form-invalid",invalidText:"The value in this field is invalid",focusClass:"x-form-focus",validationEvent:"keyup",validateOnBlur:true,validationDelay:250,defaultAutoCreate:{tag:"input",type:"text",size:"20",autocomplete:"off"},fieldClass:"x-form-field",msgTarget:"qtip",msgFx:"normal",inputType:undefined,isFormField:true,hasFocus:false,value:undefined,getName:function(){return this.rendered&&this.el.dom.name?this.el.dom.name:(this.hiddenName||"")
},applyTo:function(A){this.target=A;
this.el=Ext.get(A);
this.render(this.el.dom.parentNode);
return this
},onRender:function(C,D){if(this.el){this.el=Ext.get(this.el);
if(!this.target){C.dom.appendChild(this.el.dom)
}}else{var B=this.getAutoCreate();
if(!B.name){B.name=this.name||this.id
}if(this.inputType){B.type=this.inputType
}if(this.tabIndex!==undefined){B.tabIndex=this.tabIndex
}this.el=C.createChild(B,D)
}var A=this.el.dom.type;
if(A){if(A=="password"){A="text"
}this.el.addClass("x-form-"+A)
}if(!this.customSize&&(this.width||this.height)){this.setSize(this.width||"",this.height||"")
}if(this.readOnly){this.el.dom.readOnly=true
}this.el.addClass([this.fieldClass,this.cls]);
this.initValue()
},initValue:function(){if(this.value!==undefined){this.setValue(this.value)
}else{if(this.el.dom.value.length>0){this.setValue(this.el.dom.value)
}}},afterRender:function(){Ext.form.Field.superclass.afterRender.call(this);
this.initEvents()
},fireKey:function(A){if(A.isNavKeyPress()){this.fireEvent("specialkey",this,A)
}},reset:function(){this.setValue(this.originalValue);
this.clearInvalid()
},initEvents:function(){this.el.on(Ext.isIE?"keydown":"keypress",this.fireKey,this);
this.el.on("focus",this.onFocus,this);
this.el.on("blur",this.onBlur,this);
this.originalValue=this.getValue()
},onFocus:function(){if(!Ext.isOpera){this.el.addClass(this.focusClass)
}this.hasFocus=true;
this.startValue=this.getValue();
this.fireEvent("focus",this)
},onBlur:function(){this.el.removeClass(this.focusClass);
this.hasFocus=false;
if(this.validationEvent!==false&&this.validateOnBlur&&this.validationEvent!="blur"){this.validate()
}var A=this.getValue();
if(A!=this.startValue){this.fireEvent("change",this,A,this.startValue)
}this.fireEvent("blur",this)
},setSize:function(A,B){if(!this.rendered||!this.el){this.width=A;
this.height=B;
return 
}if(A){A=this.adjustWidth(this.el.dom.tagName,A);
this.el.setWidth(A)
}if(B){this.el.setHeight(B)
}var B=this.el.dom.offsetHeight
},isValid:function(C){if(this.disabled){return true
}var B=this.preventMark;
this.preventMark=C===true;
var A=this.validateValue(this.getRawValue());
this.preventMark=B;
return A
},validate:function(){if(this.disabled||this.validateValue(this.getRawValue())){this.clearInvalid();
return true
}return false
},validateValue:function(A){return true
},markInvalid:function(C){if(!this.rendered||this.preventMark){return 
}this.el.addClass(this.invalidClass);
C=C||this.invalidText;
switch(this.msgTarget){case"qtip":this.el.dom.qtip=C;
this.el.dom.qclass="x-form-invalid-tip";
break;
case"title":this.el.dom.title=C;
break;
case"under":if(!this.errorEl){var B=this.el.findParent(".x-form-element",5,true);
this.errorEl=B.createChild({cls:"x-form-invalid-msg"});
this.errorEl.setWidth(B.getWidth(true)-20)
}this.errorEl.update(C);
Ext.form.Field.msgFx[this.msgFx].show(this.errorEl,this);
break;
case"side":if(!this.errorIcon){var B=this.el.findParent(".x-form-element",5,true);
this.errorIcon=B.createChild({cls:"x-form-invalid-icon"})
}this.alignErrorIcon();
this.errorIcon.dom.qtip=C;
this.errorIcon.dom.qclass="x-form-invalid-tip";
this.errorIcon.show();
break;
default:var A=Ext.getDom(this.msgTarget);
A.innerHTML=C;
A.style.display=this.msgDisplay;
break
}this.fireEvent("invalid",this,C)
},alignErrorIcon:function(){this.errorIcon.alignTo(this.el,"tl-tr",[2,0])
},clearInvalid:function(){if(!this.rendered||this.preventMark){return 
}this.el.removeClass(this.invalidClass);
switch(this.msgTarget){case"qtip":this.el.dom.qtip="";
break;
case"title":this.el.dom.title="";
break;
case"under":if(this.errorEl){Ext.form.Field.msgFx[this.msgFx].hide(this.errorEl,this)
}break;
case"side":if(this.errorIcon){this.errorIcon.dom.qtip="";
this.errorIcon.hide()
}break;
default:var A=Ext.getDom(this.msgTarget);
A.innerHTML="";
A.style.display="none";
break
}this.fireEvent("valid",this)
},getRawValue:function(){return this.el.getValue()
},getValue:function(){var A=this.el.getValue();
if(A==this.emptyText||A===undefined){A=""
}return A
},setRawValue:function(A){return this.el.dom.value=A
},setValue:function(A){this.value=A;
if(this.rendered){this.el.dom.value=A;
this.validate()
}},adjustWidth:function(A,B){A=A.toLowerCase();
if(typeof B=="number"&&Ext.isStrict&&!Ext.isSafari){if(Ext.isIE&&(A=="input"||A=="textarea")){if(A=="input"){return B+2
}if(A="textarea"){return B-2
}}else{if(Ext.isGecko&&A=="textarea"){return B-6
}else{if(Ext.isOpera){if(A=="input"){return B+2
}if(A="textarea"){return B-2
}}}}}return B
}});
Ext.form.Field.msgFx={normal:{show:function(A,B){A.setDisplayed("block")
},hide:function(A,B){A.setDisplayed(false).update("")
}},slide:{show:function(A,B){A.slideIn("t",{stopFx:true})
},hide:function(A,B){A.slideOut("t",{stopFx:true,useDisplay:true})
}},slideRight:{show:function(A,B){A.fixDisplay();
A.alignTo(B.el,"tl-tr");
A.slideIn("l",{stopFx:true})
},hide:function(B,A){B.slideOut("l",{stopFx:true,useDisplay:true})
}}};
Ext.form.TextField=function(A){Ext.form.TextField.superclass.constructor.call(this,A);
this.addEvents({autosize:true})
};
Ext.extend(Ext.form.TextField,Ext.form.Field,{grow:false,growMin:30,growMax:800,vtype:null,maskRe:null,disableKeyFilter:false,allowBlank:true,minLength:0,maxLength:Number.MAX_VALUE,minLengthText:"The minimum length for this field is {0}",maxLengthText:"The maximum length for this field is {0}",selectOnFocus:false,blankText:"This field is required",validator:null,regex:null,regexText:"",emptyText:null,emptyClass:"x-form-empty-field",initEvents:function(){Ext.form.TextField.superclass.initEvents.call(this);
if(this.validationEvent=="keyup"){this.validationTask=new Ext.util.DelayedTask(this.validate,this);
this.el.on("keyup",this.filterValidation,this)
}else{if(this.validationEvent!==false){this.el.on(this.validationEvent,this.validate,this,{buffer:this.validationDelay})
}}if(this.selectOnFocus||this.emptyText){this.on("focus",this.preFocus,this);
if(this.emptyText){this.on("blur",this.postBlur,this);
this.applyEmptyText()
}}if(this.maskRe||(this.vtype&&this.disableKeyFilter!==true&&(this.maskRe=Ext.form.VTypes[this.vtype+"Mask"]))){this.el.on("keypress",this.filterKeys,this)
}if(this.grow){this.el.on("keyup",this.onKeyUp,this,{buffer:50});
this.el.on("click",this.autoSize,this)
}},filterValidation:function(A){if(!A.isNavKeyPress()){this.validationTask.delay(this.validationDelay)
}},onKeyUp:function(A){if(!A.isNavKeyPress()){this.autoSize()
}},reset:function(){Ext.form.TextField.superclass.reset.call(this);
this.applyEmptyText()
},applyEmptyText:function(){if(this.rendered&&this.emptyText&&this.getRawValue().length<1){this.setRawValue(this.emptyText);
this.el.addClass(this.emptyClass)
}},preFocus:function(){if(this.emptyText){if(this.getRawValue()==this.emptyText){this.setRawValue("")
}this.el.removeClass(this.emptyClass)
}if(this.selectOnFocus){this.el.dom.select()
}},postBlur:function(){this.applyEmptyText()
},filterKeys:function(B){var A=B.getKey();
if(!Ext.isIE&&(B.isNavKeyPress()||A==B.BACKSPACE||(A==B.DELETE&&B.button==-1))){return 
}var C=B.getCharCode();
if(!this.maskRe.test(String.fromCharCode(C)||"")){B.stopEvent()
}},setValue:function(A){if(this.emptyText&&A!==undefined&&A!==null&&A!==""){this.el.removeClass(this.emptyClass)
}Ext.form.TextField.superclass.setValue.apply(this,arguments)
},validateValue:function(A){if(A.length<1||A===this.emptyText){if(this.allowBlank){this.clearInvalid();
return true
}else{this.markInvalid(this.blankText);
return false
}}if(A.length<this.minLength){this.markInvalid(String.format(this.minLengthText,this.minLength));
return false
}if(A.length>this.maxLength){this.markInvalid(String.format(this.maxLengthText,this.maxLength));
return false
}if(this.vtype){var C=Ext.form.VTypes;
if(!C[this.vtype](A)){this.markInvalid(this.vtypeText||C[this.vtype+"Text"]);
return false
}}if(typeof this.validator=="function"){var B=this.validator(A);
if(B!==true){this.markInvalid(B);
return false
}}if(this.regex&&!this.regex.test(A)){this.markInvalid(this.regexText);
return false
}return true
},selectText:function(C,B){var A=this.getRawValue();
if(A.length>0){C=C===undefined?0:C;
B=B===undefined?A.length:B;
var D=this.el.dom;
if(D.setSelectionRange){D.setSelectionRange(C,B)
}else{if(D.createTextRange){var E=D.createTextRange();
E.moveStart("character",C);
E.moveEnd("character",A.length-B);
E.select()
}}}},autoSize:function(){if(!this.grow||!this.rendered){return 
}if(!this.metrics){this.metrics=Ext.util.TextMetrics.createInstance(this.el)
}var C=this.el;
var B=C.dom.value+"&#160;";
var A=Math.min(this.growMax,Math.max(this.metrics.getWidth(B)+10,this.growMin));
this.el.setWidth(A);
this.fireEvent("autosize",this,A)
}});
Ext.form.TriggerField=function(A){Ext.form.TriggerField.superclass.constructor.call(this,A);
this.mimicing=false;
this.on("disable",this.disableWrapper,this);
this.on("enable",this.enableWrapper,this)
};
Ext.extend(Ext.form.TriggerField,Ext.form.TextField,{defaultAutoCreate:{tag:"input",type:"text",size:"16",autocomplete:"off"},hideTrigger:false,autoSize:Ext.emptyFn,monitorTab:true,customSize:true,setSize:function(A,C){if(!this.wrap){this.width=A;
this.height=C;
return 
}if(A){var B=A;
A=A-this.trigger.getWidth();
Ext.form.TriggerField.superclass.setSize.call(this,A,C);
this.wrap.setWidth(B);
if(this.onResize){this.onResize(B,C)
}}else{Ext.form.TriggerField.superclass.setSize.call(this,A,C);
this.wrap.setWidth(this.el.getWidth()+this.trigger.getWidth())
}},alignErrorIcon:function(){this.errorIcon.alignTo(this.wrap,"tl-tr",[2,0])
},onRender:function(B,A){Ext.form.TriggerField.superclass.onRender.call(this,B,A);
this.wrap=this.el.wrap({cls:"x-form-field-wrap"});
this.trigger=this.wrap.createChild({tag:"img",src:Ext.BLANK_IMAGE_URL,cls:"x-form-trigger "+this.triggerClass});
this.trigger.on("click",this.onTriggerClick,this,{preventDefault:true});
this.trigger.addClassOnOver("x-form-trigger-over");
this.trigger.addClassOnClick("x-form-trigger-click");
if(this.hideTrigger){this.trigger.setDisplayed(false)
}this.setSize(this.width||"",this.height||"")
},onDestroy:function(){if(this.trigger){this.trigger.removeAllListeners();
this.trigger.remove()
}if(this.wrap){this.wrap.remove()
}Ext.form.TriggerField.superclass.onDestroy.call(this)
},onFocus:function(){Ext.form.TriggerField.superclass.onFocus.call(this);
if(!this.mimicing){this.mimicing=true;
Ext.get(Ext.isIE?document.body:document).on("mousedown",this.mimicBlur,this);
if(this.monitorTab){this.el.on("keydown",this.checkTab,this)
}}},checkTab:function(A){if(A.getKey()==A.TAB){this.triggerBlur()
}},onBlur:function(){},mimicBlur:function(B,A){if(!this.wrap.contains(A)&&this.validateBlur()){this.triggerBlur()
}},triggerBlur:function(){this.mimicing=false;
Ext.get(Ext.isIE?document.body:document).un("mousedown",this.mimicBlur);
if(this.monitorTab){this.el.un("keydown",this.checkTab,this)
}Ext.form.TriggerField.superclass.onBlur.call(this)
},validateBlur:function(B,A){return true
},disableWrapper:function(){if(this.wrap){this.wrap.addClass("x-item-disabled")
}},enableWrapper:function(){if(this.wrap){this.wrap.removeClass("x-item-disabled")
}},onShow:function(){if(this.wrap){this.wrap.dom.style.display="";
this.wrap.dom.style.visibility="visible"
}},onHide:function(){this.wrap.dom.style.display="none"
},onTriggerClick:Ext.emptyFn});
Ext.form.TextArea=function(A){Ext.form.TextArea.superclass.constructor.call(this,A);
if(this.minHeight!==undefined){this.growMin=this.minHeight
}if(this.maxHeight!==undefined){this.growMax=this.maxHeight
}};
Ext.extend(Ext.form.TextArea,Ext.form.TextField,{growMin:60,growMax:1000,preventScrollbars:false,onRender:function(A,B){if(!this.el){this.defaultAutoCreate={tag:"textarea",style:"width:300px;height:60px;",autocomplete:"off"}
}Ext.form.TextArea.superclass.onRender.call(this,A,B);
if(this.grow){this.textSizeEl=Ext.DomHelper.append(document.body,{tag:"pre",cls:"x-form-grow-sizer"});
if(this.preventScrollbars){this.el.setStyle("overflow","hidden")
}this.el.setHeight(this.growMin)
}},onKeyUp:function(A){if(!A.isNavKeyPress()||A.getKey()==A.ENTER){this.autoSize()
}},autoSize:function(){if(!this.grow||!this.textSizeEl){return 
}var C=this.el;
var A=C.dom.value;
var D=this.textSizeEl;
Ext.fly(D).setWidth(this.el.getWidth());
if(A.length<1){A="&#160;&#160;"
}else{A+="&#160;\n&#160;"
}if(Ext.isIE){A=A.replace(/\n/g,"<br />")
}D.innerHTML=A;
var B=Math.min(this.growMax,Math.max(D.offsetHeight,this.growMin));
if(B!=this.lastHeight){this.lastHeight=B;
this.el.setHeight(B);
this.fireEvent("autosize",this,B)
}},setValue:function(A){Ext.form.TextArea.superclass.setValue.call(this,A);
this.autoSize()
}});
Ext.form.NumberField=function(A){Ext.form.NumberField.superclass.constructor.call(this,A)
};
Ext.extend(Ext.form.NumberField,Ext.form.TextField,{fieldClass:"x-form-field x-form-num-field",allowDecimals:true,decimalSeparator:".",decimalPrecision:2,allowNegative:true,minValue:Number.NEGATIVE_INFINITY,maxValue:Number.MAX_VALUE,minText:"The minimum value for this field is {0}",maxText:"The maximum value for this field is {0}",nanText:"{0} is not a valid number",initEvents:function(){Ext.form.NumberField.superclass.initEvents.call(this);
var B="0123456789";
if(this.allowDecimals){B+=this.decimalSeparator
}if(this.allowNegative){B+="-"
}var A=function(D){var C=D.getKey();
if(!Ext.isIE&&(D.isNavKeyPress()||C==D.BACKSPACE||(C==D.DELETE&&D.button==-1))){return 
}var E=D.getCharCode();
if(B.indexOf(String.fromCharCode(E))===-1){D.stopEvent()
}};
this.el.on("keypress",A,this)
},validateValue:function(B){if(!Ext.form.NumberField.superclass.validateValue.call(this,B)){return false
}if(B.length<1){return true
}B=String(B).replace(this.decimalSeparator,".");
if(isNaN(B)){this.markInvalid(String.format(this.nanText,B));
return false
}var A=this.parseValue(B);
if(A<this.minValue){this.markInvalid(String.format(this.minText,this.minValue));
return false
}if(A>this.maxValue){this.markInvalid(String.format(this.maxText,this.maxValue));
return false
}return true
},parseValue:function(A){return parseFloat(String(A).replace(this.decimalSeparator,"."))
},fixPrecision:function(C){if(!this.allowDecimals||this.decimalPrecision==-1||isNaN(C)||C==0||!C){return C
}var B=Math.pow(10,this.decimalPrecision+1);
var A=this.decimalPrecisionFcn(C*B);
A=this.decimalPrecisionFcn(A/10);
return A/(B/10)
},decimalPrecisionFcn:function(A){return Math.floor(A)
}});
Ext.form.DateField=function(D){Ext.form.DateField.superclass.constructor.call(this,D);
if(typeof this.minValue=="string"){this.minValue=this.parseDate(this.minValue)
}if(typeof this.maxValue=="string"){this.maxValue=this.parseDate(this.maxValue)
}this.ddMatch=null;
if(this.disabledDates){var A=this.disabledDates;
var C="(?:";
for(var B=0;
B<A.length;
B++){C+=A[B];
if(B!=A.length-1){C+="|"
}}this.ddMatch=new RegExp(C+")")
}};
Ext.extend(Ext.form.DateField,Ext.form.TriggerField,{format:"m/d/y",disabledDays:null,disabledDaysText:"Disabled",disabledDates:null,disabledDatesText:"Disabled",minValue:null,maxValue:null,minText:"The date in this field must be after {0}",maxText:"The date in this field must be before {0}",invalidText:"{0} is not a valid date - it must be in the format {1}",triggerClass:"x-form-date-trigger",defaultAutoCreate:{tag:"input",type:"text",size:"10",autocomplete:"off"},validateValue:function(F){F=this.formatDate(F);
if(!Ext.form.DateField.superclass.validateValue.call(this,F)){return false
}if(F.length<1){return true
}var C=F;
F=this.parseDate(F);
if(!F){this.markInvalid(String.format(this.invalidText,C,this.format));
return false
}var B=F.getTime();
if(this.minValue&&B<this.minValue.getTime()){this.markInvalid(String.format(this.minText,this.formatDate(this.minValue)));
return false
}if(this.maxValue&&B>this.maxValue.getTime()){this.markInvalid(String.format(this.maxText,this.formatDate(this.maxValue)));
return false
}if(this.disabledDays){var A=F.getDay();
for(var E=0;
E<this.disabledDays.length;
E++){if(A===this.disabledDays[E]){this.markInvalid(this.disabledDaysText);
return false
}}}var D=this.formatDate(F);
if(this.ddMatch&&this.ddMatch.test(D)){this.markInvalid(String.format(this.disabledDatesText,D));
return false
}return true
},validateBlur:function(){return !this.menu||!this.menu.isVisible()
},getValue:function(){return this.parseDate(Ext.form.DateField.superclass.getValue.call(this))||""
},setValue:function(A){Ext.form.DateField.superclass.setValue.call(this,this.formatDate(this.parseDate(A)))
},parseDate:function(A){return(!A||A instanceof Date)?A:Date.parseDate(A,this.format)
},formatDate:function(A){return(!A||!(A instanceof Date))?A:A.dateFormat(this.format)
},menuListeners:{select:function(A,B){this.setValue(B)
},show:function(){this.onFocus()
},hide:function(){this.focus();
var A=this.menuListeners;
this.menu.un("select",A.select,this);
this.menu.un("show",A.show,this);
this.menu.un("hide",A.hide,this)
}},onTriggerClick:function(){if(this.disabled){return 
}if(this.menu==null){this.menu=new Ext.menu.DateMenu()
}Ext.apply(this.menu.picker,{minDate:this.minValue,maxDate:this.maxValue,disabledDatesRE:this.ddMatch,disabledDatesText:this.disabledDatesText,disabledDays:this.disabledDays,disabledDaysText:this.disabledDaysText,format:this.format,minText:String.format(this.minText,this.formatDate(this.minValue)),maxText:String.format(this.maxText,this.formatDate(this.maxValue))});
this.menu.on(Ext.apply({},this.menuListeners,{scope:this}));
this.menu.picker.setValue(this.getValue()||new Date());
this.menu.show(this.el,"tl-bl?")
}});
Ext.form.ComboBox=function(F){Ext.form.ComboBox.superclass.constructor.call(this,F);
this.addEvents({expand:true,collapse:true,beforeselect:true,select:true,beforequery:true});
if(this.transform){var E=Ext.getDom(this.transform);
if(!this.hiddenName){this.hiddenName=E.name
}if(!this.store){this.mode="local";
var H=[],D=E.options;
for(var C=0,B=D.length;
C<B;
C++){var G=D[C];
var A=(Ext.isIE?G.getAttributeNode("value").specified:G.hasAttribute("value"))?G.value:G.text;
if(G.selected){this.value=A
}H.push([A,G.text])
}this.store=new Ext.data.SimpleStore({id:0,fields:["value","text"],data:H});
this.valueField="value";
this.displayField="text"
}E.name=Ext.id();
if(!this.lazyRender){this.target=true;
this.el=Ext.DomHelper.insertBefore(E,this.autoCreate||this.defaultAutoCreate);
E.parentNode.removeChild(E);
this.render(this.el.parentNode)
}else{E.parentNode.removeChild(E)
}}this.selectedIndex=-1;
if(this.mode=="local"){if(F.queryDelay===undefined){this.queryDelay=10
}if(F.minChars===undefined){this.minChars=0
}}};
Ext.extend(Ext.form.ComboBox,Ext.form.TriggerField,{defaultAutoCreate:{tag:"input",type:"text",size:"24",autocomplete:"off"},listWidth:undefined,displayField:undefined,valueField:undefined,hiddenName:undefined,listClass:"",selectedClass:"x-combo-selected",triggerClass:"x-form-arrow-trigger",shadow:"sides",listAlign:"tl-bl?",maxHeight:300,triggerAction:"query",minChars:4,typeAhead:false,queryDelay:500,pageSize:0,selectOnFocus:false,queryParam:"query",loadingText:"Loading...",resizable:false,handleHeight:8,editable:true,allQuery:"",mode:"remote",minListWidth:70,forceSelection:false,typeAheadDelay:250,valueNotFoundText:undefined,onRender:function(C,B){Ext.form.ComboBox.superclass.onRender.call(this,C,B);
if(this.hiddenName){this.hiddenField=this.el.insertSibling({tag:"input",type:"hidden",name:this.hiddenName,id:this.hiddenName},"before",true);
this.hiddenField.value=this.hiddenValue!==undefined?this.hiddenValue:this.value!==undefined?this.value:"";
this.el.dom.removeAttribute("name")
}if(Ext.isGecko){this.el.dom.setAttribute("autocomplete","off")
}var A="x-combo-list";
this.list=new Ext.Layer({shadow:this.shadow,cls:[A,this.listClass].join(" "),constrain:false});
this.list.setWidth(this.listWidth||Math.max(this.wrap.getWidth(),this.minListWidth));
this.list.swallowEvent("mousewheel");
this.assetHeight=0;
if(this.title){this.header=this.list.createChild({cls:A+"-hd",html:this.title});
this.assetHeight+=this.header.getHeight()
}this.innerList=this.list.createChild({cls:A+"-inner"});
this.innerList.on("mouseover",this.onViewOver,this);
this.innerList.on("mousemove",this.onViewMove,this);
if(this.pageSize){this.footer=this.list.createChild({cls:A+"-ft"});
this.pageTb=new Ext.PagingToolbar(this.footer,this.store,{pageSize:this.pageSize});
this.assetHeight+=this.footer.getHeight()
}if(!this.tpl){this.tpl='<div class="'+A+'-item">{'+this.displayField+"}</div>"
}this.view=new Ext.View(this.innerList,this.tpl,{singleSelect:true,store:this.store,selectedClass:this.selectedClass});
this.view.on("click",this.onViewClick,this);
this.store.on("beforeload",this.onBeforeLoad,this);
this.store.on("load",this.onLoad,this);
this.store.on("loadexception",this.collapse,this);
if(this.resizable){this.resizer=new Ext.Resizable(this.list,{pinned:true,handles:"se"});
this.resizer.on("resize",function(F,D,E){this.maxHeight=E-this.handleHeight-this.list.getFrameWidth("tb")-this.assetHeight;
this.listWidth=D;
this.restrictHeight()
},this);
this[this.pageSize?"footer":"innerList"].setStyle("margin-bottom",this.handleHeight+"px")
}if(!this.editable){this.editable=true;
this.setEditable(false)
}},initEvents:function(){Ext.form.ComboBox.superclass.initEvents.call(this);
this.keyNav=new Ext.KeyNav(this.el,{up:function(A){this.inKeyMode=true;
this.selectPrev()
},down:function(A){if(!this.isExpanded()){this.onTriggerClick()
}else{this.inKeyMode=true;
this.selectNext()
}},enter:function(A){this.onViewClick()
},esc:function(A){this.collapse()
},tab:function(A){this.onViewClick(false);
return true
},scope:this,doRelay:function(C,B,A){if(A=="down"||this.scope.isExpanded()){return Ext.KeyNav.prototype.doRelay.apply(this,arguments)
}return true
}});
this.queryDelay=Math.max(this.queryDelay||10,this.mode=="local"?10:250);
this.dqTask=new Ext.util.DelayedTask(this.initQuery,this);
if(this.typeAhead){this.taTask=new Ext.util.DelayedTask(this.onTypeAhead,this)
}if(this.editable!==false){this.el.on("keyup",this.onKeyUp,this)
}if(this.forceSelection){this.on("blur",this.doForce,this)
}},onDestroy:function(){if(this.view){this.view.setStore(null);
this.view.el.removeAllListeners();
this.view.el.remove();
this.view.purgeListeners()
}if(this.list){this.list.destroy()
}if(this.store){this.store.un("beforeload",this.onBeforeLoad,this);
this.store.un("load",this.onLoad,this);
this.store.un("loadexception",this.collapse,this)
}Ext.form.ComboBox.superclass.onDestroy.call(this)
},fireKey:function(A){if(A.isNavKeyPress()&&!this.list.isVisible()){this.fireEvent("specialkey",this,A)
}},onResize:function(A,B){if(this.list&&this.listWidth===undefined){this.list.setWidth(Math.max(A,this.minListWidth))
}},setEditable:function(A){if(A==this.editable){return 
}this.editable=A;
if(!A){this.el.dom.setAttribute("readOnly",true);
this.el.on("mousedown",this.onTriggerClick,this);
this.el.addClass("x-combo-noedit")
}else{this.el.dom.setAttribute("readOnly",false);
this.el.un("mousedown",this.onTriggerClick,this);
this.el.removeClass("x-combo-noedit")
}},onBeforeLoad:function(){if(!this.hasFocus){return 
}this.innerList.update(this.loadingText?'<div class="loading-indicator">'+this.loadingText+"</div>":"");
this.restrictHeight();
this.selectedIndex=-1
},onLoad:function(){if(!this.hasFocus){return 
}if(this.store.getCount()>0){this.expand();
this.restrictHeight();
if(this.lastQuery==this.allQuery){if(this.editable){this.el.dom.select()
}if(!this.selectByValue(this.value,true)){this.select(0,true)
}}else{this.selectNext();
if(this.typeAhead&&this.lastKey!=Ext.EventObject.BACKSPACE&&this.lastKey!=Ext.EventObject.DELETE){this.taTask.delay(this.typeAheadDelay)
}}}else{this.onEmptyResults()
}},onTypeAhead:function(){if(this.store.getCount()>0){var D=this.store.getAt(0);
var C=D.data[this.displayField];
var A=C.length;
var B=this.getRawValue().length;
if(B!=A){this.setRawValue(C);
this.selectText(B,C.length)
}}},onSelect:function(A,B){if(this.fireEvent("beforeselect",this,A,B)!==false){this.setValue(A.data[this.valueField||this.displayField]);
this.collapse();
this.fireEvent("select",this,A,B)
}},getValue:function(){if(this.valueField){return typeof this.value!="undefined"?this.value:""
}else{return Ext.form.ComboBox.superclass.getValue.call(this)
}},clearValue:function(){if(this.hiddenField){this.hiddenField.value=""
}this.setRawValue("");
this.lastSelectionText=""
},setValue:function(A){var C=A;
if(this.valueField){var B=this.findRecord(this.valueField,A);
if(B){C=B.data[this.displayField]
}else{if(this.valueNotFoundText){C=this.valueNotFoundText
}}}this.lastSelectionText=C;
if(this.hiddenField){this.hiddenField.value=A
}Ext.form.ComboBox.superclass.setValue.call(this,C);
this.value=A
},findRecord:function(C,B){var A;
if(this.store.getCount()>0){this.store.each(function(D){if(D.data[C]==B){A=D;
return false
}})
}return A
},onViewMove:function(B,A){this.inKeyMode=false
},onViewOver:function(D,B){if(this.inKeyMode){return 
}var C=this.view.findItemFromChild(B);
if(C){var A=this.view.indexOf(C);
this.select(A,false)
}},onViewClick:function(B){var A=this.view.getSelectedIndexes()[0];
var C=this.store.getAt(A);
if(C){this.onSelect(C,A)
}if(B!==false){this.el.focus()
}},restrictHeight:function(){this.innerList.dom.style.height="";
var A=this.innerList.dom;
var B=Math.max(A.clientHeight,A.offsetHeight,A.scrollHeight);
this.innerList.setHeight(B<this.maxHeight?"auto":this.maxHeight);
this.list.beginUpdate();
this.list.setHeight(this.innerList.getHeight()+this.list.getFrameWidth("tb")+(this.resizable?this.handleHeight:0)+this.assetHeight);
this.list.alignTo(this.el,this.listAlign);
this.list.endUpdate()
},onEmptyResults:function(){this.collapse()
},isExpanded:function(){return this.list.isVisible()
},selectByValue:function(A,C){if(A!==undefined&&A!==null){var B=this.findRecord(this.valueField||this.displayField,A);
if(B){this.select(this.store.indexOf(B),C);
return true
}}return false
},select:function(C,B){this.selectedIndex=C;
this.view.select(C);
if(B!==false){var A=this.view.getNode(C);
if(A){this.innerList.scrollChildIntoView(A)
}}},selectNext:function(){var A=this.store.getCount();
if(A>0){if(this.selectedIndex==-1){this.select(0)
}else{if(this.selectedIndex<A-1){this.select(this.selectedIndex+1)
}}}},selectPrev:function(){var A=this.store.getCount();
if(A>0){if(this.selectedIndex==-1){this.select(0)
}else{if(this.selectedIndex!=0){this.select(this.selectedIndex-1)
}}}},onKeyUp:function(A){if(this.editable!==false&&!A.isSpecialKey()){this.lastKey=A.getKey();
this.dqTask.delay(this.queryDelay)
}},validateBlur:function(){return !this.list||!this.list.isVisible()
},initQuery:function(){this.doQuery(this.getRawValue())
},doForce:function(){if(this.el.dom.value.length>0){this.el.dom.value=this.lastSelectionText===undefined?"":this.lastSelectionText;
this.applyEmptyText()
}},doQuery:function(C,B){if(C===undefined||C===null){C=""
}var A={query:C,forceAll:B,combo:this,cancel:false};
if(this.fireEvent("beforequery",A)===false||A.cancel){return false
}C=A.query;
B=A.forceAll;
if(B===true||(C.length>=this.minChars)){if(this.lastQuery!=C){this.lastQuery=C;
if(this.mode=="local"){this.selectedIndex=-1;
if(B){this.store.clearFilter()
}else{this.store.filter(this.displayField,C)
}this.onLoad()
}else{this.store.baseParams[this.queryParam]=C;
this.store.load({params:this.getParams(C)});
this.expand()
}}else{this.selectedIndex=-1;
this.onLoad()
}}},getParams:function(A){var B={};
if(this.pageSize){B.start=0;
B.limit=this.pageSize
}return B
},collapse:function(){if(!this.isExpanded()){return 
}this.list.hide();
Ext.get(document).un("mousedown",this.collapseIf,this);
this.fireEvent("collapse",this)
},collapseIf:function(A){if(!A.within(this.wrap)&&!A.within(this.list)){this.collapse()
}},expand:function(){if(this.isExpanded()||!this.hasFocus){return 
}this.list.alignTo(this.el,this.listAlign);
this.list.show();
Ext.get(document).on("mousedown",this.collapseIf,this);
this.fireEvent("expand",this)
},onTriggerClick:function(){if(this.disabled){return 
}if(this.isExpanded()){this.collapse();
this.el.focus()
}else{this.hasFocus=true;
this.doQuery(this.triggerAction=="all"?this.doQuery(this.allQuery,true):this.doQuery(this.getRawValue()));
this.el.focus()
}}});
Ext.form.Checkbox=function(A){Ext.form.Checkbox.superclass.constructor.call(this,A);
this.addEvents({check:true})
};
Ext.extend(Ext.form.Checkbox,Ext.form.Field,{focusClass:"x-form-check-focus",fieldClass:"x-form-field",checked:false,defaultAutoCreate:{tag:"input",type:"checkbox",autocomplete:"off"},boxLabel:undefined,setSize:function(A,B){if(!this.wrap){this.width=A;
this.height=B;
return 
}this.wrap.setSize(A,B);
if(!this.boxLabel){this.el.alignTo(this.wrap,"c-c")
}},initEvents:function(){Ext.form.Checkbox.superclass.initEvents.call(this);
this.el.on("click",this.onClick,this);
this.el.on("change",this.onClick,this)
},onRender:function(B,A){Ext.form.Checkbox.superclass.onRender.call(this,B,A);
if(this.inputValue!==undefined){this.el.dom.value=this.inputValue
}this.wrap=this.el.wrap({cls:"x-form-check-wrap"});
if(this.boxLabel){this.wrap.createChild({tag:"label",htmlFor:this.el.id,cls:"x-form-cb-label",html:this.boxLabel})
}if(this.checked){this.setValue(true)
}},initValue:Ext.emptyFn,getValue:function(){if(this.rendered){return this.el.dom.checked
}return false
},onClick:function(){if(this.el.dom.checked!=this.checked){this.setValue(this.el.dom.checked)
}},setValue:function(A){this.checked=(A===true||A==="true"||A=="1");
if(this.el&&this.el.dom){this.el.dom.checked=this.checked
}this.fireEvent("check",this,this.checked)
}});
Ext.form.Radio=function(){Ext.form.Radio.superclass.constructor.apply(this,arguments)
};
Ext.extend(Ext.form.Radio,Ext.form.Checkbox,{inputType:"radio"});
Ext.form.BasicForm=function(A,B){Ext.apply(this,B);
this.items=new Ext.util.MixedCollection(false,function(C){return C.id||(C.id=Ext.id())
});
this.addEvents({beforeaction:true,actionfailed:true,actioncomplete:true});
if(A){this.initEl(A)
}Ext.form.BasicForm.superclass.constructor.call(this)
};
Ext.extend(Ext.form.BasicForm,Ext.util.Observable,{timeout:30,activeAction:null,waitMsgTarget:undefined,initEl:function(A){this.el=Ext.get(A);
this.id=this.el.id||Ext.id();
this.el.on("submit",this.onSubmit,this);
this.el.addClass("x-form")
},onSubmit:function(A){A.stopEvent()
},isValid:function(){var A=true;
this.items.each(function(B){if(!B.validate()){A=false
}});
return A
},doAction:function(B,A){if(typeof B=="string"){B=new Ext.form.Action.ACTION_TYPES[B](this,A)
}if(this.fireEvent("beforeaction",this,B)!==false){this.beforeAction(B);
B.run.defer(100,B)
}},submit:function(A){this.doAction("submit",A)
},load:function(A){this.doAction("load",A)
},updateRecord:function(B){B.beginEdit();
var A=B.fields;
A.each(function(C){var D=this.findField(C.name);
if(D){B.set(C.name,D.getValue())
}},this);
B.endEdit()
},beforeAction:function(B){var A=B.options;
if(A.waitMsg){if(this.waitMsgTarget===true){this.el.mask(A.waitMsg,"x-mask-loading")
}else{if(this.waitMsgTarget){this.waitMsgTarget=Ext.get(this.waitMsgTarget);
this.waitMsgTarget.mask(A.waitMsg,"x-mask-loading")
}else{Ext.MessageBox.wait(A.waitMsg,A.waitTitle||this.waitTitle||"Please Wait...")
}}}},afterAction:function(B,A){this.activeAction=null;
var C=B.options;
if(C.waitMsg){if(this.waitMsgTarget===true){this.el.unmask()
}else{if(this.waitMsgTarget){this.waitMsgTarget.unmask()
}else{Ext.MessageBox.updateProgress(1);
Ext.MessageBox.hide()
}}}if(A){if(C.reset){this.reset()
}Ext.callback(C.success,C.scope,[this,B]);
this.fireEvent("actioncomplete",this,B)
}else{Ext.callback(C.failure,C.scope,[this,B]);
this.fireEvent("actionfailed",this,B)
}},findField:function(B){var A=this.items.get(B);
if(!A){this.items.each(function(C){if(C.isFormField&&(C.dataIndex==B||C.id==B||C.getName()==B)){A=C;
return false
}})
}return A||null
},markInvalid:function(C){if(C instanceof Array){for(var E=0,A=C.length;
E<A;
E++){var D=C[E];
var F=this.findField(D.id);
if(F){F.markInvalid(D.msg)
}}}else{var B,G;
for(G in C){if(typeof C[G]!="function"&&(B=this.findField(G))){B.markInvalid(C[G])
}}}},setValues:function(B){if(B instanceof Array){for(var D=0,A=B.length;
D<A;
D++){var C=B[D];
var E=this.findField(C.id);
if(E){E.setValue(C.value)
}}}else{var F,G;
for(G in B){if(typeof B[G]!="function"&&(F=this.findField(G))){F.setValue(B[G])
}}}},getValues:function(B){var A=Ext.lib.Ajax.serializeForm(this.el.dom);
if(B===true){return A
}return Ext.urlDecode(A)
},clearInvalid:function(){this.items.each(function(A){A.clearInvalid()
})
},reset:function(){this.items.each(function(A){A.reset()
})
},add:function(){this.items.addAll(Array.prototype.slice.call(arguments,0))
},remove:function(A){this.items.remove(A)
},render:function(){this.items.each(function(A){if(A.isFormField&&!A.rendered&&document.getElementById(A.id)){A.applyTo(A.id)
}})
},applyToFields:function(A){this.items.each(function(B){Ext.apply(B,A)
})
},applyIfToFields:function(A){this.items.each(function(B){Ext.applyIf(B,A)
})
}});
Ext.BasicForm=Ext.form.BasicForm;
Ext.form.Form=function(A){Ext.form.Form.superclass.constructor.call(this,null,A);
this.url=this.url||this.action;
if(!this.root){this.root=new Ext.form.Layout(Ext.applyIf({id:Ext.id()},A))
}this.active=this.root;
this.buttons=[];
this.addEvents({clientvalidation:true})
};
Ext.extend(Ext.form.Form,Ext.form.BasicForm,{buttonAlign:"center",minButtonWidth:75,labelAlign:"left",monitorValid:false,monitorPoll:200,column:function(B){var A=new Ext.form.Column(B);
this.start(A);
if(arguments.length>1){this.add.apply(this,Array.prototype.slice.call(arguments,1));
this.end()
}return A
},fieldset:function(B){var A=new Ext.form.FieldSet(B);
this.start(A);
if(arguments.length>1){this.add.apply(this,Array.prototype.slice.call(arguments,1));
this.end()
}return A
},container:function(B){var A=new Ext.form.Layout(B);
this.start(A);
if(arguments.length>1){this.add.apply(this,Array.prototype.slice.call(arguments,1));
this.end()
}return A
},start:function(A){Ext.applyIf(A,{labelAlign:this.active.labelAlign,labelWidth:this.active.labelWidth,itemCls:this.active.itemCls});
this.active.stack.push(A);
A.ownerCt=this.active;
this.active=A;
return this
},end:function(){if(this.active==this.root){return this
}this.active=this.active.ownerCt;
return this
},add:function(){this.active.stack.push.apply(this.active.stack,arguments);
var D=[];
for(var C=0,A=arguments,B=A.length;
C<B;
C++){if(A[C].isFormField){D.push(A[C])
}}if(D.length>0){Ext.form.Form.superclass.add.apply(this,D)
}return this
},render:function(E){E=Ext.get(E);
var G=this.autoCreate||{tag:"form",method:this.method||"POST",id:this.id||Ext.id()};
this.initEl(E.createChild(G));
this.root.render(this.el);
this.items.each(function(I){I.render("x-form-el-"+I.id)
});
if(this.buttons.length>0){var C=this.el.createChild({cls:"x-form-btns-ct",cn:{cls:"x-form-btns x-form-btns-"+this.buttonAlign,html:'<table cellspacing="0"><tbody><tr></tr></tbody></table><div class="x-clear"></div>'}},null,true);
var F=C.getElementsByTagName("tr")[0];
for(var D=0,B=this.buttons.length;
D<B;
D++){var A=this.buttons[D];
var H=document.createElement("td");
H.className="x-form-btn-td";
A.render(F.appendChild(H))
}}if(this.monitorValid){this.startMonitoring()
}return this
},addButton:function(D,B,A){var E={handler:B,scope:A,minWidth:this.minButtonWidth,hideParent:true};
if(typeof D=="string"){E.text=D
}else{Ext.apply(E,D)
}var C=new Ext.Button(null,E);
this.buttons.push(C);
return C
},startMonitoring:function(){if(!this.bound){this.bound=true;
Ext.TaskMgr.start({run:this.bindHandler,interval:this.monitorPoll||200,scope:this})
}},stopMonitoring:function(){this.bound=false
},bindHandler:function(){if(!this.bound){return false
}var D=true;
this.items.each(function(E){if(!E.isValid(true)){D=false;
return false
}});
for(var C=0,A=this.buttons.length;
C<A;
C++){var B=this.buttons[C];
if(B.formBind===true&&B.disabled===D){B.setDisabled(!D)
}}this.fireEvent("clientvalidation",this,D)
}});
Ext.Form=Ext.form.Form;
Ext.form.Action=function(B,A){this.form=B;
this.options=A||{}
};
Ext.form.Action.CLIENT_INVALID="client";
Ext.form.Action.SERVER_INVALID="server";
Ext.form.Action.CONNECT_FAILURE="connect";
Ext.form.Action.LOAD_FAILURE="load";
Ext.form.Action.prototype={type:"default",failureType:undefined,response:undefined,result:undefined,run:function(A){},success:function(A){},handleResponse:function(A){},failure:function(A){this.response=A;
this.failureType=Ext.form.Action.CONNECT_FAILURE;
this.form.afterAction(this,false)
},processResponse:function(A){this.response=A;
if(!A.responseText){return true
}this.result=this.handleResponse(A);
return this.result
},getUrl:function(B){var A=this.options.url||this.form.url||this.form.el.dom.action;
if(B){var C=this.getParams();
if(C){A+=(A.indexOf("?")!=-1?"&":"?")+C
}}return A
},getMethod:function(){return(this.options.method||this.form.method||this.form.el.dom.method||"POST").toUpperCase()
},getParams:function(){var A=this.form.baseParams;
var B=this.options.params;
if(B){if(typeof B=="object"){B=Ext.urlEncode(Ext.applyIf(B,A))
}else{if(typeof B=="string"&&A){B+="&"+Ext.urlEncode(A)
}}}else{if(A){B=Ext.urlEncode(A)
}}return B
},createCallback:function(){return{success:this.success,failure:this.failure,scope:this,timeout:(this.form.timeout*1000),upload:this.form.fileUpload?this.success:undefined}
}};
Ext.form.Action.Submit=function(B,A){Ext.form.Action.Submit.superclass.constructor.call(this,B,A)
};
Ext.extend(Ext.form.Action.Submit,Ext.form.Action,{type:"submit",run:function(){var A=this.options;
var B=this.getMethod()=="POST";
if(A.clientValidation===false||this.form.isValid()){Ext.lib.Ajax.formRequest(this.form.el.dom,this.getUrl(!B),this.createCallback(),B?this.getParams():null,this.form.fileUpload,Ext.SSL_SECURE_URL)
}else{if(A.clientValidation!==false){this.failureType=Ext.form.Action.CLIENT_INVALID;
this.form.afterAction(this,false)
}}},success:function(B){var A=this.processResponse(B);
if(A===true||A.success){this.form.afterAction(this,true);
return 
}if(A.errors){this.form.markInvalid(A.errors);
this.failureType=Ext.form.Action.SERVER_INVALID
}this.form.afterAction(this,false)
},handleResponse:function(F){if(this.form.errorReader){var B=this.form.errorReader.read(F);
var D=[];
if(B.records){for(var C=0,A=B.records.length;
C<A;
C++){var E=B.records[C];
D[C]=E.data
}}if(D.length<1){D=null
}return{success:B.success,errors:D}
}return Ext.decode(F.responseText)
}});
Ext.form.Action.Load=function(A,B){Ext.form.Action.Load.superclass.constructor.call(this,A,B);
this.reader=this.form.reader
};
Ext.extend(Ext.form.Action.Load,Ext.form.Action,{type:"load",run:function(){Ext.lib.Ajax.request(this.getMethod(),this.getUrl(false),this.createCallback(),this.getParams())
},success:function(B){var A=this.processResponse(B);
if(A===true||!A.success||!A.data){this.failureType=Ext.form.Action.LOAD_FAILURE;
this.form.afterAction(this,false);
return 
}this.form.clearInvalid();
this.form.setValues(A.data);
this.form.afterAction(this,true)
},handleResponse:function(C){if(this.form.reader){var B=this.form.reader.read(C);
var A=B.records&&B.records[0]?B.records[0].data:null;
return{success:B.success,data:A}
}return Ext.decode(C.responseText)
}});
Ext.form.Action.ACTION_TYPES={load:Ext.form.Action.Load,submit:Ext.form.Action.Submit};
Ext.form.Layout=function(A){Ext.form.Layout.superclass.constructor.call(this,A);
this.stack=[]
};
Ext.extend(Ext.form.Layout,Ext.Component,{clear:true,labelSeparator:":",hideLabels:false,defaultAutoCreate:{tag:"div",cls:"x-form-ct"},onRender:function(E,G){if(this.el){this.el=Ext.get(this.el)
}else{var F=this.getAutoCreate();
this.el=E.createChild(F,G)
}if(this.style){this.el.applyStyles(this.style)
}if(this.labelAlign){this.el.addClass("x-form-label-"+this.labelAlign)
}if(this.hideLabels){this.labelStyle="display:none";
this.elementStyle="padding-left:0;"
}else{if(typeof this.labelWidth=="number"){this.labelStyle="width:"+this.labelWidth+"px;";
this.elementStyle="padding-left:"+((this.labelWidth+(typeof this.labelPad=="number"?this.labelPad:5))+"px")+";"
}if(this.labelAlign=="top"){this.labelStyle="width:auto;";
this.elementStyle="padding-left:0;"
}}var D=this.stack;
var A=D.length;
if(A>0){if(!this.fieldTpl){var C=new Ext.Template('<div class="x-form-item {5}">','<label for="{0}" style="{2}">{1}{4}</label>','<div class="x-form-element" id="x-form-el-{0}" style="{3}">',"</div>",'</div><div class="x-form-clear-left"></div>');
C.disableFormats=true;
C.compile();
Ext.form.Layout.prototype.fieldTpl=C
}for(var B=0;
B<A;
B++){if(D[B].isFormField){this.renderField(D[B])
}else{this.renderComponent(D[B])
}}}if(this.clear){this.el.createChild({cls:"x-form-clear"})
}},renderField:function(A){this.fieldTpl.append(this.el,[A.id,A.fieldLabel,A.labelStyle||this.labelStyle||"",this.elementStyle||"",typeof A.labelSeparator=="undefined"?this.labelSeparator:A.labelSeparator,A.itemCls||this.itemCls||""])
},renderComponent:function(A){A.render(this.el)
}});
Ext.form.Column=function(A){Ext.form.Column.superclass.constructor.call(this,A)
};
Ext.extend(Ext.form.Column,Ext.form.Layout,{defaultAutoCreate:{tag:"div",cls:"x-form-ct x-form-column"},onRender:function(B,A){Ext.form.Column.superclass.onRender.call(this,B,A);
if(this.width){this.el.setWidth(this.width)
}}});
Ext.form.FieldSet=function(A){Ext.form.FieldSet.superclass.constructor.call(this,A)
};
Ext.extend(Ext.form.FieldSet,Ext.form.Layout,{defaultAutoCreate:{tag:"fieldset",cn:{tag:"legend"}},onRender:function(A,B){Ext.form.FieldSet.superclass.onRender.call(this,A,B);
if(this.legend){this.setLegend(this.legend)
}},setLegend:function(A){if(this.rendered){this.el.child("legend").update(A)
}}});
Ext.form.VTypes=function(){var D=/^[a-zA-Z_]+$/;
var C=/^[a-zA-Z0-9_]+$/;
var B=/^([\w]+)(.[\w]+)*@([\w-]+\.){1,5}([A-Za-z]){2,4}$/;
var A=/(((https?)|(ftp)):\/\/([\-\w]+\.)+\w{2,3}(\/[%\-\w]+(\.\w{2,})?)*(([\w\-\.\?\\\/+@&#;`~=%!]*)(\.\w{2,})?)*\/?)/i;
return{email:function(E){return B.test(E)
},emailText:'This field should be an e-mail address in the format "user@domain.com"',emailMask:/[a-z0-9_\.\-@]/i,url:function(E){return A.test(E)
},urlText:'This field should be a URL in the format "http://www.domain.com"',alpha:function(E){return D.test(E)
},alphaText:"This field should only contain letters and _",alphaMask:/[a-z_]/i,alphanum:function(E){return C.test(E)
},alphanumText:"This field should only contain letters, numbers and _",alphanumMask:/[a-z0-9_]/i}
}();
Ext.LayoutManager=function(B,A){Ext.LayoutManager.superclass.constructor.call(this);
this.el=Ext.get(B);
if(this.el.dom==document.body&&Ext.isIE&&!A.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(A){this.updating=false;
if(!A){this.layout()
}},layout:function(){},onRegionResized:function(B,A){this.fireEvent("regionresized",B,A);
this.layout()
},onRegionCollapsed:function(A){this.fireEvent("regioncollapsed",A)
},onRegionExpanded:function(A){this.fireEvent("regionexpanded",A)
},getViewSize:function(){var A;
if(this.el.dom!=document.body){A=this.el.getSize()
}else{A={width:Ext.lib.Dom.getViewWidth(),height:Ext.lib.Dom.getViewHeight()}
}A.width-=this.el.getBorderWidth("lr")-this.el.getPadding("lr");
A.height-=this.el.getBorderWidth("tb")-this.el.getPadding("tb");
return A
},getEl:function(){return this.el
},getRegion:function(A){return this.regions[A.toLowerCase()]
},onWindowResize:function(){if(this.monitorWindowResize){this.layout()
}}});
Ext.BorderLayout=function(E,D){D=D||{};
Ext.BorderLayout.superclass.constructor.call(this,E,D);
this.factory=D.factory||Ext.BorderLayout.RegionFactory;
for(var B=0,C=this.factory.validRegions.length;
B<C;
B++){var A=this.factory.validRegions[B];
if(D[A]){this.addRegion(A,D[A])
}}};
Ext.extend(Ext.BorderLayout,Ext.LayoutManager,{addRegion:function(B,A){if(!this.regions[B]){var C=this.factory.create(B,this,A);
this.bindRegion(B,C)
}return this.regions[B]
},bindRegion:function(A,B){this.regions[A]=B;
B.on("visibilitychange",this.layout,this);
B.on("paneladded",this.layout,this);
B.on("panelremoved",this.layout,this);
B.on("invalidated",this.layout,this);
B.on("resized",this.onRegionResized,this);
B.on("collapsed",this.onRegionCollapsed,this);
B.on("expanded",this.onRegionExpanded,this)
},layout:function(){if(this.updating){return 
}var I=this.getViewSize();
var K=I.width,O=I.height;
var F=K,D=O,H=0,G=0;
var J=this.regions;
var M=J.north,L=J.south,A=J.west,P=J.east,Q=J.center;
if(M&&M.isVisible()){var R=M.getBox();
var N=M.getMargins();
R.width=K-(N.left+N.right);
R.x=N.left;
R.y=N.top;
H=R.height+R.y+N.bottom;
D-=H;
M.updateBox(this.safeBox(R))
}if(L&&L.isVisible()){var R=L.getBox();
var N=L.getMargins();
R.width=K-(N.left+N.right);
R.x=N.left;
var E=(R.height+N.top+N.bottom);
R.y=O-E+N.top;
D-=E;
L.updateBox(this.safeBox(R))
}if(A&&A.isVisible()){var R=A.getBox();
var N=A.getMargins();
R.height=D-(N.top+N.bottom);
R.x=N.left;
R.y=H+N.top;
var C=(R.width+N.left+N.right);
G+=C;
F-=C;
A.updateBox(this.safeBox(R))
}if(P&&P.isVisible()){var R=P.getBox();
var N=P.getMargins();
R.height=D-(N.top+N.bottom);
var C=(R.width+N.left+N.right);
R.x=K-C+N.left;
R.y=H+N.top;
F-=C;
P.updateBox(this.safeBox(R))
}if(Q){var N=Q.getMargins();
var B={x:G+N.left,y:H+N.top,width:F-(N.left+N.right),height:D-(N.top+N.bottom)};
Q.updateBox(this.safeBox(B))
}this.el.repaint();
this.fireEvent("layout",this)
},safeBox:function(A){A.width=Math.max(0,A.width);
A.height=Math.max(0,A.height);
return A
},add:function(B,A){B=B.toLowerCase();
return this.regions[B].add(A)
},remove:function(B,A){B=B.toLowerCase();
return this.regions[B].remove(A)
},findPanel:function(D){var A=this.regions;
for(var C in A){if(typeof A[C]!="function"){var B=A[C].getPanel(D);
if(B){return B
}}}return null
},showPanel:function(D){var A=this.regions;
for(var B in A){var C=A[B];
if(typeof C!="function"){if(C.hasPanel(D)){return C.showPanel(D)
}}}return null
},restoreState:function(A){if(!A){A=Ext.state.Manager
}var B=new Ext.LayoutStateManager();
B.init(this,A)
},batchAdd:function(C){this.beginUpdate();
for(var B in C){var A=this.regions[B];
if(A){this.addTypedPanels(A,C[B])
}}this.endUpdate()
},addTypedPanels:function(B,E){if(typeof E=="string"){B.add(new Ext.ContentPanel(E))
}else{if(E instanceof Array){for(var C=0,A=E.length;
C<A;
C++){this.addTypedPanels(B,E[C])
}}else{if(!E.events){var D=E.el;
delete E.el;
B.add(new Ext.ContentPanel(D||Ext.id(),E))
}else{B.add(E)
}}}}});
Ext.BorderLayout.create=function(I,H){var G=new Ext.BorderLayout(H||document.body,I);
G.beginUpdate();
var F=Ext.BorderLayout.RegionFactory.validRegions;
for(var C=0,D=F.length;
C<D;
C++){var E=F[C];
if(G.regions[E]&&I[E].panels){var B=G.regions[E];
var A=I[E].panels;
G.addTypedPanels(B,A)
}}G.endUpdate();
return G
};
Ext.BorderLayout.RegionFactory={validRegions:["north","south","east","west","center"],create:function(B,C,A){B=B.toLowerCase();
if(A.lightweight||A.basic){return new Ext.BasicLayoutRegion(C,A,B)
}switch(B){case"north":return new Ext.NorthLayoutRegion(C,A);
case"south":return new Ext.SouthLayoutRegion(C,A);
case"east":return new Ext.EastLayoutRegion(C,A);
case"west":return new Ext.WestLayoutRegion(C,A);
case"center":return new Ext.CenterLayoutRegion(C,A)
}throw'Layout region "'+B+'" not supported.'
}};
Ext.BasicLayoutRegion=function(D,C,B,A){this.mgr=D;
this.position=B;
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(A!==true){this.applyConfig(C)
}};
Ext.extend(Ext.BasicLayoutRegion,Ext.util.Observable,{getPanelId:function(A){return A.getId()
},applyConfig:function(A){this.margins=A.margins||this.margins||{top:0,left:0,right:0,bottom:0};
this.config=A
},resizeTo:function(A){var B=this.el?this.el:(this.activePanel?this.activePanel.getEl():null);
if(B){switch(this.position){case"east":case"west":B.setWidth(A);
this.fireEvent("resized",this,A);
break;
case"north":case"south":B.setHeight(A);
this.fireEvent("resized",this,A);
break
}}},getBox:function(){return this.activePanel?this.activePanel.getEl().getBox(false,true):null
},getMargins:function(){return this.margins
},updateBox:function(A){this.box=A;
var B=this.activePanel.getEl();
B.dom.style.left=A.x+"px";
B.dom.style.top=A.y+"px";
this.activePanel.setSize(A.width,A.height)
},getEl:function(){return this.activePanel
},isVisible:function(){return this.activePanel?true:false
},setActivePanel:function(A){A=this.getPanel(A);
if(this.activePanel&&this.activePanel!=A){this.activePanel.setActiveState(false);
this.activePanel.getEl().setLeftTop(-10000,-10000)
}this.activePanel=A;
A.setActiveState(true);
if(this.box){A.setSize(this.box.width,this.box.height)
}this.fireEvent("panelactivated",this,A);
this.fireEvent("invalidated")
},showPanel:function(A){if(A=this.getPanel(A)){this.setActivePanel(A)
}return A
},getActivePanel:function(){return this.activePanel
},add:function(A){if(arguments.length>1){for(var B=0,D=arguments.length;
B<D;
B++){this.add(arguments[B])
}return null
}if(this.hasPanel(A)){this.showPanel(A);
return A
}var C=A.getEl();
if(C.dom.parentNode!=this.mgr.el.dom){this.mgr.el.dom.appendChild(C.dom)
}if(A.setRegion){A.setRegion(this)
}this.panels.add(A);
C.setStyle("position","absolute");
if(!A.background){this.setActivePanel(A);
if(this.config.initialSize&&this.panels.getCount()==1){this.resizeTo(this.config.initialSize)
}}this.fireEvent("paneladded",this,A);
return A
},hasPanel:function(A){if(typeof A=="object"){A=A.getId()
}return this.getPanel(A)?true:false
},remove:function(D,B){D=this.getPanel(D);
if(!D){return null
}var C={};
this.fireEvent("beforeremove",this,D,C);
if(C.cancel===true){return null
}var A=D.getId();
this.panels.removeKey(A);
return D
},getPanel:function(A){if(typeof A=="object"){return A
}return this.panels.get(A)
},getPosition:function(){return this.position
}});
Ext.LayoutRegion=function(D,C,A){Ext.LayoutRegion.superclass.constructor.call(this,D,C,A,true);
var B=Ext.DomHelper;
this.el=B.append(D.el.dom,{tag:"div",cls:"x-layout-panel x-layout-panel-"+this.position},true);
this.titleEl=B.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(C);
this.visible=true;
this.collapsed=false;
if(C.hideWhenEmpty){this.hide();
this.on("paneladded",this.validateVisibility,this);
this.on("panelremoved",this.validateVisibility,this)
}this.applyConfig(C)
};
Ext.extend(Ext.LayoutRegion,Ext.BasicLayoutRegion,{createBody:function(){this.bodyEl=this.el.createChild({tag:"div",cls:"x-layout-panel-body"})
},applyConfig:function(B){if(B.collapsible&&this.position!="center"&&!this.collapsedEl){var A=Ext.DomHelper;
if(B.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(B.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=A.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(B.floatable!==false){this.collapsedEl.addClassOnOver("x-layout-collapsed-over");
this.collapsedEl.on("click",this.collapseClick,this)
}if(B.collapsedTitle&&(this.position=="north"||this.position=="south")){this.collapsedTitleTextEl=A.append(this.collapsedEl.dom,{tag:"div",cls:"x-unselectable x-layout-panel-hd-text",id:"message",unselectable:"on",style:{"float":"left"}});
this.collapsedTitleTextEl.innerHTML=B.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(B.collapsible==true)
}this.cmargins=B.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=B.margins||this.margins||{top:0,left:0,right:0,bottom:0};
this.bottomTabs=B.tabPosition!="top";
this.autoScroll=B.autoScroll||false;
if(this.autoScroll){this.bodyEl.setStyle("overflow","auto")
}else{this.bodyEl.setStyle("overflow","hidden")
}if((!B.titlebar&&!B.title)||B.titlebar===false){this.titleEl.hide()
}else{this.titleEl.show();
if(B.title){this.titleTextEl.innerHTML=B.title
}}this.duration=B.duration||0.3;
this.slideDuration=B.slideDuration||0.45;
this.config=B;
if(B.collapsed){this.collapse(true)
}if(B.hidden){this.hide()
}},isVisible:function(){return this.visible
},setCollapsedTitle:function(A){A=A||"&#160;";
if(this.collapsedTitleTextEl){this.collapsedTitleTextEl.innerHTML=A
}},getBox:function(){var A;
if(!this.collapsed){A=this.el.getBox(false,true)
}else{A=this.collapsedEl.getBox(false,true)
}return A
},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(A){this.box=A;
if(!this.collapsed){this.el.dom.style.left=A.x+"px";
this.el.dom.style.top=A.y+"px";
this.updateBody(A.width,A.height)
}else{this.collapsedEl.dom.style.left=A.x+"px";
this.collapsedEl.dom.style.top=A.y+"px";
this.collapsedEl.setSize(A.width,A.height)
}if(this.tabs){this.tabs.autoSizeTabs()
}},updateBody:function(A,C){if(A!==null){this.el.setWidth(A);
A-=this.el.getBorderWidth("rl");
if(this.config.adjustments){A+=this.config.adjustments[0]
}}if(C!==null){this.el.setHeight(C);
C=this.titleEl&&this.titleEl.isDisplayed()?C-(this.titleEl.getHeight()||0):C;
C-=this.el.getBorderWidth("tb");
if(this.config.adjustments){C+=this.config.adjustments[1]
}this.bodyEl.setHeight(C);
if(this.tabs){C=this.tabs.syncHeight(C)
}}if(this.panelSize){A=A!==null?A:this.panelSize.width;
C=C!==null?C:this.panelSize.height
}if(this.activePanel){var B=this.activePanel.getEl();
A=A!==null?A:B.getWidth();
C=C!==null?C:B.getHeight();
this.panelSize={width:A,height:C};
this.activePanel.setSize(A,C)
}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(A){if(this.isSlid){A.stopPropagation();
this.slideIn()
}else{A.stopPropagation();
this.slideOut()
}},collapse:function(A){if(this.collapsed){return 
}this.collapsed=true;
if(this.split){this.split.el.hide()
}if(this.config.animate&&A!==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(A,B){if(A){A.stopPropagation()
}if(!this.collapsed||this.el.hasActiveFx()){return 
}if(this.isSlid){this.afterSlideIn();
B=true
}this.collapsed=false;
if(this.config.animate&&B!==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 A=new Ext.TabPanel(this.bodyEl.dom,{tabPosition:this.bottomTabs?"bottom":"top",disableTooltips:this.config.disableTabTips});
if(this.config.hideTabs){A.stripWrap.setDisplayed(false)
}this.tabs=A;
A.resizeTabs=this.config.resizeTabs===true;
A.minTabWidth=this.config.minTabWidth||40;
A.maxTabWidth=this.config.maxTabWidth||250;
A.preferredTabWidth=this.config.preferredTabWidth||150;
A.monitorResize=false;
A.bodyEl.setStyle("overflow",this.config.autoScroll?"auto":"hidden");
A.bodyEl.addClass("x-layout-tabs-body");
this.panels.each(this.initPanelAsTab,this)
},initPanelAsTab:function(B){var A=this.tabs.addTab(B.getEl().id,B.getTitle(),null,this.config.closeOnTab&&B.isClosable());
if(B.tabTip!==undefined){A.setTooltip(B.tabTip)
}A.on("activate",function(){this.setActivePanel(B)
},this);
if(this.config.closeOnTab){A.on("beforeclose",function(C,D){D.cancel=true;
this.remove(B)
},this)
}return A
},updatePanelTitle:function(B,A){if(this.activePanel==B){this.updateTitle(A)
}if(this.tabs){var C=this.tabs.getTab(B.getEl().id);
C.setText(A);
if(B.tabTip!==undefined){C.setTooltip(B.tabTip)
}}},updateTitle:function(A){if(this.titleTextEl&&!this.config.title){this.titleTextEl.innerHTML=(typeof A!="undefined"&&A.length>0?A:"&#160;")
}},setActivePanel:function(A){A=this.getPanel(A);
if(this.activePanel&&this.activePanel!=A){this.activePanel.setActiveState(false)
}this.activePanel=A;
A.setActiveState(true);
if(this.panelSize){A.setSize(this.panelSize.width,this.panelSize.height)
}if(this.closeBtn){this.closeBtn.setVisible(!this.config.closeOnTab&&!this.isSlid&&A.isClosable())
}this.updateTitle(A.getTitle());
if(this.tabs){this.fireEvent("invalidated",this)
}this.fireEvent("panelactivated",this,A)
},showPanel:function(A){if(A=this.getPanel(A)){if(this.tabs){var B=this.tabs.getTab(A.getEl().id);
if(B.isHidden()){this.tabs.unhideTab(B.id)
}B.activate()
}else{this.setActivePanel(A)
}}return A
},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(B){if(arguments.length>1){for(var C=0,A=arguments.length;
C<A;
C++){this.add(arguments[C])
}return null
}if(this.hasPanel(B)){this.showPanel(B);
return B
}B.setRegion(this);
this.panels.add(B);
if(this.panels.getCount()==1&&!this.config.alwaysShowTabs){this.bodyEl.dom.appendChild(B.getEl().dom);
if(B.background!==true){this.setActivePanel(B)
}this.fireEvent("paneladded",this,B);
return B
}if(!this.tabs){this.initTabs()
}else{this.initPanelAsTab(B)
}if(B.background!==true){this.tabs.activate(B.getEl().id)
}this.fireEvent("paneladded",this,B);
return B
},hidePanel:function(A){if(this.tabs&&(A=this.getPanel(A))){this.tabs.hideTab(A.getEl().id)
}},unhidePanel:function(A){if(this.tabs&&(A=this.getPanel(A))){this.tabs.unhideTab(A.getEl().id)
}},clearPanels:function(){while(this.panels.getCount()>0){this.remove(this.panels.first())
}},remove:function(F,E){F=this.getPanel(F);
if(!F){return null
}var D={};
this.fireEvent("beforeremove",this,F,D);
if(D.cancel===true){return null
}E=(typeof E!="undefined"?E:(this.config.preservePanels===true||F.preserve===true));
var B=F.getId();
this.panels.removeKey(B);
if(E){document.body.appendChild(F.getEl().dom)
}if(this.tabs){this.tabs.removeTab(F.getEl().id)
}else{if(!E){this.bodyEl.dom.removeChild(F.getEl().dom)
}}if(this.panels.getCount()==1&&this.tabs&&!this.config.alwaysShowTabs){var C=this.panels.first();
var A=document.createElement("div");
A.appendChild(C.getEl().dom);
this.bodyEl.update("");
this.bodyEl.dom.appendChild(C.getEl().dom);
A=null;
this.updateTitle(C.getTitle());
this.tabs=null;
this.bodyEl.setStyle("overflow",this.config.autoScroll?"auto":"hidden");
this.setActivePanel(C)
}F.setRegion(null);
if(this.activePanel==F){this.activePanel=null
}if(this.config.autoDestroy!==false&&E!==true){try{F.destroy()
}catch(D){}}this.fireEvent("panelremoved",this,F);
return F
},getTabs:function(){return this.tabs
},createTool:function(C,A){var B=Ext.DomHelper.append(C,{tag:"div",cls:"x-layout-tools-button",children:[{tag:"div",cls:"x-layout-tools-button-inner "+A,html:"&#160;"}]},true);
B.addClassOnOver("x-layout-tools-button-over");
return B
}});
Ext.SplitLayoutRegion=function(D,C,B,A){this.cursor=A;
Ext.SplitLayoutRegion.superclass.constructor.call(this,D,C,B)
};
Ext.extend(Ext.SplitLayoutRegion,Ext.LayoutRegion,{splitTip:"Drag to resize.",collapsibleSplitTip:"Drag to resize. Double click to hide.",useSplitTips:false,applyConfig:function(B){Ext.SplitLayoutRegion.superclass.applyConfig.call(this,B);
if(B.split){if(!this.split){var A=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(A,this.el,this.orientation);
this.split.on("moved",this.onSplitMove,this);
this.split.useShim=B.useShim===true;
this.split.getMaximumSize=this[this.position=="north"||this.position=="south"?"getVMaxSize":"getHMaxSize"].createDelegate(this);
if(this.useSplitTips){this.split.el.dom.title=B.collapsible?this.collapsibleSplitTip:this.splitTip
}if(B.collapsible){this.split.el.on("dblclick",this.collapse,this)
}}if(typeof B.minSize!="undefined"){this.split.minSize=B.minSize
}if(typeof B.maxSize!="undefined"){this.split.maxSize=B.maxSize
}if(B.hideWhenEmpty||B.hidden){this.hideSplitter()
}}},getHMaxSize:function(){var B=this.config.maxSize||10000;
var A=this.mgr.getRegion("center");
return Math.min(B,(this.el.getWidth()+A.getEl().getWidth())-A.getMinWidth())
},getVMaxSize:function(){var A=this.config.maxSize||10000;
var B=this.mgr.getRegion("center");
return Math.min(A,(this.el.getHeight()+B.getEl().getHeight())-B.getMinHeight())
},onSplitMove:function(B,A){this.fireEvent("resized",this,A)
},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 A=new Ext.util.DelayedTask(this.slideIn,this);
this.autoHideHd={mouseout:function(B){if(!B.within(this.el,true)){A.delay(500)
}},mouseover:function(B){A.cancel()
},scope:this}
}this.el.on(this.autoHideHd)
}},clearAutoHide:function(){if(this.autoHide!==false){this.el.un("mouseout",this.autoHideHd.mouseout);
this.el.un("mouseover",this.autoHideHd.mouseover)
}},clearMonitor:function(){Ext.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",20000);
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(A){if(!this.isSlid||this.el.hasActiveFx()){Ext.callback(A);
return 
}this.isSlid=false;
this.beforeSlide();
this.el.slideOut(this.getSlideAnchor(),{callback:function(){this.el.setLeftTop(-10000,-10000);
this.afterSlide();
this.afterSlideIn();
Ext.callback(A)
},scope:this,block:true})
},slideInIf:function(A){if(!A.within(this.el)){this.slideIn()
}},animateCollapse:function(){this.beforeSlide();
this.el.setStyle("z-index",20000);
var A=this.getSlideAnchor();
this.el.slideOut(A,{callback:function(){this.el.setStyle("z-index","");
this.collapsedEl.slideIn(A,{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 A=this.cmargins;
switch(this.position){case"west":return[0,0];
break;
case"east":return[0,0];
break;
case"north":return[0,0];
break;
case"south":return[0,0];
break
}},getExpandAdj:function(){var B=this.collapsedEl,A=this.cmargins;
switch(this.position){case"west":return[-(A.right+B.getWidth()+A.left),0];
break;
case"east":return[A.right+B.getWidth()+A.left,0];
break;
case"north":return[0,-(A.top+A.bottom+B.getHeight())];
break;
case"south":return[0,A.top+A.bottom+B.getHeight()];
break
}}});
Ext.CenterLayoutRegion=function(B,A){Ext.CenterLayoutRegion.superclass.constructor.call(this,B,A,"center");
this.visible=true;
this.minWidth=A.minWidth||20;
this.minHeight=A.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(C,B){Ext.NorthLayoutRegion.superclass.constructor.call(this,C,B,"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 A=B.initialSize||B.height;
if(typeof A!="undefined"){this.el.setHeight(A)
}};
Ext.extend(Ext.NorthLayoutRegion,Ext.SplitLayoutRegion,{orientation:Ext.SplitBar.VERTICAL,getBox:function(){if(this.collapsed){return this.collapsedEl.getBox()
}var A=this.el.getBox();
if(this.split){A.height+=this.split.el.getHeight()
}return A
},updateBox:function(A){if(this.split&&!this.collapsed){A.height-=this.split.el.getHeight();
this.split.el.setLeft(A.x);
this.split.el.setTop(A.y+A.height);
this.split.el.setWidth(A.width)
}if(this.collapsed){this.updateBody(A.width,null)
}Ext.NorthLayoutRegion.superclass.updateBox.call(this,A)
}});
Ext.SouthLayoutRegion=function(B,A){Ext.SouthLayoutRegion.superclass.constructor.call(this,B,A,"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 C=A.initialSize||A.height;
if(typeof C!="undefined"){this.el.setHeight(C)
}};
Ext.extend(Ext.SouthLayoutRegion,Ext.SplitLayoutRegion,{orientation:Ext.SplitBar.VERTICAL,getBox:function(){if(this.collapsed){return this.collapsedEl.getBox()
}var A=this.el.getBox();
if(this.split){var B=this.split.el.getHeight();
A.height+=B;
A.y-=B
}return A
},updateBox:function(A){if(this.split&&!this.collapsed){var B=this.split.el.getHeight();
A.height-=B;
A.y+=B;
this.split.el.setLeft(A.x);
this.split.el.setTop(A.y-B);
this.split.el.setWidth(A.width)
}if(this.collapsed){this.updateBody(A.width,null)
}Ext.SouthLayoutRegion.superclass.updateBox.call(this,A)
}});
Ext.EastLayoutRegion=function(C,B){Ext.EastLayoutRegion.superclass.constructor.call(this,C,B,"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 A=B.initialSize||B.width;
if(typeof A!="undefined"){this.el.setWidth(A)
}};
Ext.extend(Ext.EastLayoutRegion,Ext.SplitLayoutRegion,{orientation:Ext.SplitBar.HORIZONTAL,getBox:function(){if(this.collapsed){return this.collapsedEl.getBox()
}var B=this.el.getBox();
if(this.split){var A=this.split.el.getWidth();
B.width+=A;
B.x-=A
}return B
},updateBox:function(B){if(this.split&&!this.collapsed){var A=this.split.el.getWidth();
B.width-=A;
this.split.el.setLeft(B.x);
this.split.el.setTop(B.y);
this.split.el.setHeight(B.height);
B.x+=A
}if(this.collapsed){this.updateBody(null,B.height)
}Ext.EastLayoutRegion.superclass.updateBox.call(this,B)
}});
Ext.WestLayoutRegion=function(C,B){Ext.WestLayoutRegion.superclass.constructor.call(this,C,B,"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 A=B.initialSize||B.width;
if(typeof A!="undefined"){this.el.setWidth(A)
}};
Ext.extend(Ext.WestLayoutRegion,Ext.SplitLayoutRegion,{orientation:Ext.SplitBar.HORIZONTAL,getBox:function(){if(this.collapsed){return this.collapsedEl.getBox()
}var A=this.el.getBox();
if(this.split){A.width+=this.split.el.getWidth()
}return A
},updateBox:function(B){if(this.split&&!this.collapsed){var A=this.split.el.getWidth();
B.width-=A;
this.split.el.setLeft(B.x+B.width);
this.split.el.setTop(B.y);
this.split.el.setHeight(B.height)
}if(this.collapsed){this.updateBody(null,B.height)
}Ext.WestLayoutRegion.superclass.updateBox.call(this,B)
}});
Ext.LayoutStateManager=function(A){this.state={north:{},south:{},east:{},west:{}}
};
Ext.LayoutStateManager.prototype={init:function(G,F){this.provider=F;
var D=F.get(G.id+"-layout-state");
if(D){var C=G.isUpdating();
if(!C){G.beginUpdate()
}for(var B in D){if(typeof D[B]!="function"){var A=D[B];
var E=G.getRegion(B);
if(E&&A){if(A.size){E.resizeTo(A.size)
}if(A.collapsed==true){E.collapse(true)
}else{E.expand(null,true)
}}}}if(!C){G.endUpdate()
}this.state=D
}this.layout=G;
G.on("regionresized",this.onRegionResized,this);
G.on("regioncollapsed",this.onRegionCollapsed,this);
G.on("regionexpanded",this.onRegionExpanded,this)
},storeState:function(){this.provider.set(this.layout.id+"-layout-state",this.state)
},onRegionResized:function(A,B){this.state[A.getPosition()].size=B;
this.storeState()
},onRegionCollapsed:function(A){this.state[A.getPosition()].collapsed=true;
this.storeState()
},onRegionExpanded:function(A){this.state[A.getPosition()].collapsed=false;
this.storeState()
}};
Ext.ContentPanel=function(A,C,B){Ext.ContentPanel.superclass.constructor.call(this);
if(A.autoCreate){C=A;
A=Ext.id()
}this.el=Ext.get(A);
if(!this.el&&C&&C.autoCreate){if(typeof C.autoCreate=="object"){if(!C.autoCreate.id){C.autoCreate.id=C.id||A
}this.el=Ext.DomHelper.append(document.body,C.autoCreate,true)
}else{this.el=Ext.DomHelper.append(document.body,{tag:"div",cls:"x-layout-inactive-content",id:C.id||A},true)
}}this.closable=false;
this.loaded=false;
this.active=false;
if(typeof C=="string"){this.title=C
}else{Ext.apply(this,C)
}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")
}B=B||this.content;
if(B){this.setContent(B)
}if(C&&C.url){this.setUrl(this.url,this.params,this.loadOnce)
}};
Ext.extend(Ext.ContentPanel,Ext.util.Observable,{tabTip:"",setRegion:function(A){this.region=A;
if(A){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(A){this.active=A;
if(!A){this.fireEvent("deactivate",this)
}else{this.fireEvent("activate",this)
}},setContent:function(B,A){this.el.update(B,A)
},ignoreResize:function(A,B){if(this.lastSize&&this.lastSize.width==A&&this.lastSize.height==B){return true
}else{this.lastSize={width:A,height:B};
return false
}},getUpdateManager:function(){return this.el.getUpdateManager()
},load:function(){var A=this.el.getUpdateManager();
A.update.apply(A,arguments);
return this
},setUrl:function(C,B,A){if(this.refreshDelegate){this.removeListener("activate",this.refreshDelegate)
}this.refreshDelegate=this._handleRefresh.createDelegate(this,[C,B,A]);
this.on("activate",this._handleRefresh.createDelegate(this,[C,B,A]));
return this.el.getUpdateManager()
},_handleRefresh:function(A,D,C){if(!C||!this.loaded){var B=this.el.getUpdateManager();
B.update(A,D,this._setLoaded.createDelegate(this))
}},_setLoaded:function(){this.loaded=true
},getId:function(){return this.el.id
},getEl:function(){return this.el
},adjustForComponents:function(B,A){if(this.resizeEl!=this.el){B-=this.el.getFrameWidth("lr");
A-=this.el.getFrameWidth("tb")
}if(this.toolbar){var C=this.toolbar.getEl();
A-=C.getHeight();
C.setWidth(B)
}if(this.adjustments){B+=this.adjustments[0];
A+=this.adjustments[1]
}return{width:B,height:A}
},setSize:function(C,B){if(this.fitToFrame&&!this.ignoreResize(C,B)){if(this.fitContainer&&this.resizeEl!=this.el){this.el.setSize(C,B)
}var A=this.adjustForComponents(C,B);
this.resizeEl.setSize(this.autoWidth?"auto":A.width,this.autoHeight?"auto":A.height);
this.fireEvent("resize",this,A.width,A.height)
}},getTitle:function(){return this.title
},setTitle:function(A){this.title=A;
if(this.region){this.region.updatePanelTitle(this,A)
}},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 A=document.createElement("span");
A.appendChild(this.el.dom);
A.innerHTML="";
this.el.remove();
this.el=null
}});
Ext.GridPanel=function(B,A){this.wrapper=Ext.DomHelper.append(document.body,{tag:"div",cls:"x-layout-grid-wrapper x-layout-inactive-content"},true);
this.wrapper.dom.appendChild(B.container.dom);
Ext.GridPanel.superclass.constructor.call(this,this.wrapper,A);
if(this.toolbar){this.toolbar.el.insertBefore(this.wrapper.dom.firstChild)
}B.monitorWindowResize=false;
B.autoHeight=false;
B.autoWidth=false;
this.grid=B;
this.grid.container.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(D,C){if(!this.ignoreResize(D,C)){var B=this.grid;
var A=this.adjustForComponents(D,C);
B.container.setSize(A.width,A.height);
B.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(B,A){Ext.NestedLayoutPanel.superclass.constructor.call(this,B.getEl(),A);
B.monitorWindowResize=false;
this.layout=B;
this.layout.getEl().addClass("x-layout-nested-layout")
};
Ext.extend(Ext.NestedLayoutPanel,Ext.ContentPanel,{setSize:function(E,D){if(!this.ignoreResize(E,D)){var C=this.adjustForComponents(E,D);
var A=this.layout.getEl();
A.setSize(C.width,C.height);
var B=A.dom.offsetWidth;
this.layout.layout();
if(Ext.isIE&&!this.initialized){this.initialized=true;
this.layout.layout()
}}},getLayout:function(){return this.layout
}});
Ext.ScrollPanel=function(E,C,B){C=C||{};
C.fitToFrame=true;
Ext.ScrollPanel.superclass.constructor.call(this,E,C,B);
this.el.dom.style.overflow="hidden";
var F=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 A=F.createChild({cls:"x-scroller-up",html:"&#160;"},this.el.dom);
var D=F.createChild({cls:"x-scroller-down",html:"&#160;"});
A.unselectable();
D.unselectable();
A.on("click",this.scrollUp,this);
D.on("click",this.scrollDown,this);
A.addClassOnOver("x-scroller-btn-over");
D.addClassOnOver("x-scroller-btn-over");
A.addClassOnClick("x-scroller-btn-click");
D.addClassOnClick("x-scroller-btn-click");
this.adjustments=[0,-(A.getHeight()+D.getHeight())];
this.resizeEl=this.el;
this.el=F;
this.up=A;
this.down=D
};
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 D=this.resizeEl;
var A=D.dom.scrollTop,C=D.dom.scrollHeight,B=D.dom.clientHeight;
this.up[A==0?"addClass":"removeClass"]("x-scroller-btn-disabled");
this.down[C-A<=B?"addClass":"removeClass"]("x-scroller-btn-disabled")
},setSize:function(){Ext.ScrollPanel.superclass.setSize.apply(this,arguments);
this.afterScroll()
},onWheel:function(A){var B=A.getWheelDelta();
this.resizeEl.dom.scrollTop-=(B*this.wheelIncrement);
this.afterScroll();
A.stopEvent()
},setContent:function(A,B){this.resizeEl.update(A,B)
}});
Ext.ReaderLayout=function(C,B){var D=C||{size:{}};
Ext.ReaderLayout.superclass.constructor.call(this,B||document.body,{north:D.north!==false?Ext.apply({split:false,initialSize:32,titlebar:false},D.north):false,west:D.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}},D.west):false,east:D.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}},D.east):false,center:Ext.apply({tabPosition:"top",autoScroll:false,closeOnTab:true,titlebar:false,margins:{left:D.west!==false?0:5,right:D.east!==false?0:5,bottom:5,top:2}},D.center)});
this.el.addClass("x-reader");
this.beginUpdate();
var A=new Ext.BorderLayout(Ext.get(document.body).createChild(),{south:D.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}},D.preview):false,center:Ext.apply({autoScroll:false,titlebar:false,minHeight:200},D.listView)});
this.add("center",new Ext.NestedLayoutPanel(A,Ext.apply({title:D.mainTitle||"",tabTip:""},D.innerPanelCfg)));
this.endUpdate();
this.regions.preview=A.getRegion("south");
this.regions.listView=A.getRegion("center")
};
Ext.extend(Ext.ReaderLayout,Ext.BorderLayout);
Ext.grid.Grid=function(B,A){this.container=Ext.get(B);
this.container.update("");
this.container.setStyle("overflow","hidden");
this.container.addClass("x-grid-container");
this.id=this.container.id;
Ext.apply(this,A);
if(this.ds){this.dataSource=this.ds;
delete this.ds
}if(this.cm){this.colModel=this.cm;
delete this.cm
}if(this.sm){this.selModel=this.sm;
delete this.sm
}if(this.width){this.container.setWidth(this.width)
}if(this.height){this.container.setHeight(this.height)
}this.addEvents({click:true,dblclick:true,contextmenu:true,mousedown:true,mouseup:true,mouseover:true,mouseout:true,keypress:true,keydown:true,cellclick:true,celldblclick:true,rowclick:true,rowdblclick:true,headerclick:true,headerdblclick:true,rowcontextmenu:true,cellcontextmenu:true,headercontextmenu:true,bodyscroll:true,columnresize:true,columnmove:true,startdrag:true,enddrag:true,dragdrop:true,dragover:true,dragenter:true,dragout:true});
Ext.grid.Grid.superclass.constructor.call(this)
};
Ext.extend(Ext.grid.Grid,Ext.util.Observable,{minColumnWidth:25,autoSizeColumns:false,autoSizeHeaders:true,monitorWindowResize:true,maxRowsToMeasure:0,trackMouseOver:true,enableDragDrop:false,enableColumnMove:true,enableColumnHide:true,enableRowHeightSync:false,stripeRows:true,autoHeight:false,autoExpandColumn:false,autoExpandMin:50,autoExpandMax:1000,view:null,allowTextSelectionPattern:/INPUT|TEXTAREA|SELECT/i,loadMask:false,rendered:false,render:function(){var B=this.container;
if((!B.dom.offsetHeight||B.dom.offsetHeight<20)||B.getStyle("height")=="auto"){this.autoHeight=true
}var A=this.getView();
A.init(this);
B.on("click",this.onClick,this);
B.on("dblclick",this.onDblClick,this);
B.on("contextmenu",this.onContextMenu,this);
B.on("keydown",this.onKeyDown,this);
this.relayEvents(B,["mousedown","mouseup","mouseover","mouseout","keypress"]);
this.getSelectionModel().init(this);
A.render();
if(this.loadMask){this.loadMask=new Ext.LoadMask(this.container,Ext.apply({store:this.dataSource},this.loadMask))
}this.rendered=true;
return this
},reconfigure:function(B,A){if(this.loadMask){this.loadMask.destroy();
this.loadMask=new Ext.LoadMask(this.container,Ext.apply({store:B},this.loadMask))
}this.view.bind(B,A);
this.dataSource=B;
this.colModel=A;
this.view.refresh(true)
},onKeyDown:function(A){this.fireEvent("keydown",A)
},destroy:function(B,A){if(this.loadMask){this.loadMask.destroy()
}var C=this.container;
C.removeAllListeners();
this.view.destroy();
this.colModel.purgeListeners();
if(!A){this.purgeListeners()
}C.update("");
if(B===true){C.remove()
}},processEvent:function(B,D){this.fireEvent(B,D);
var C=D.getTarget();
var A=this.view;
var G=A.findHeaderIndex(C);
if(G!==false){this.fireEvent("header"+B,this,G,D)
}else{var F=A.findRowIndex(C);
var E=A.findCellIndex(C);
if(F!==false){this.fireEvent("row"+B,this,F,D);
if(E!==false){this.fireEvent("cell"+B,this,F,E,D)
}}}},onClick:function(A){this.processEvent("click",A)
},onContextMenu:function(B,A){this.processEvent("contextmenu",B)
},onDblClick:function(A){this.processEvent("dblclick",A)
},walkCells:function(J,E,B,H,G){var I=this.colModel,F=I.getColumnCount();
var D=this.dataSource,C=D.getCount(),A=true;
if(B<0){if(E<0){J--;
A=false
}while(J>=0){if(!A){E=F-1
}A=false;
while(E>=0){if(H.call(G||this,J,E,I)===true){return[J,E]
}E--
}J--
}}else{if(E>=F){J++;
A=false
}while(J<C){if(!A){E=0
}A=false;
while(E<F){if(H.call(G||this,J,E,I)===true){return[J,E]
}E++
}J++
}}return null
},getSelections:function(){return this.selModel.getSelections()
},autoSize:function(){if(this.rendered){this.view.layout();
if(this.view.adjustForScroll){this.view.adjustForScroll()
}}},stopEditing:function(){},getSelectionModel:function(){if(!this.selModel){this.selModel=new Ext.grid.RowSelectionModel()
}return this.selModel
},getDataSource:function(){return this.dataSource
},getColumnModel:function(){return this.colModel
},getView:function(){if(!this.view){this.view=new Ext.grid.GridView()
}return this.view
},getDragDropText:function(){var A=this.selModel.getCount();
return String.format(this.ddText,A,A==1?"":"s")
}});
Ext.grid.Grid.prototype.ddText="{0} selected row{1}";
Ext.grid.AbstractGridView=function(){this.grid=null;
this.events={beforerowremoved:true,beforerowsinserted:true,beforerefresh:true,rowremoved:true,rowsinserted:true,rowupdated:true,refresh:true};
Ext.grid.AbstractGridView.superclass.constructor.call(this)
};
Ext.extend(Ext.grid.AbstractGridView,Ext.util.Observable,{rowClass:"x-grid-row",cellClass:"x-grid-cell",tdClass:"x-grid-td",hdClass:"x-grid-hd",splitClass:"x-grid-hd-split",init:function(B){this.grid=B;
var A=this.grid.container.id;
this.colSelector="#"+A+" ."+this.cellClass+"-";
this.tdSelector="#"+A+" ."+this.tdClass+"-";
this.hdSelector="#"+A+" ."+this.hdClass+"-";
this.splitSelector="#"+A+" ."+this.splitClass+"-"
},getColumnRenderers:function(){var D=[];
var A=this.grid.colModel;
var C=A.getColumnCount();
for(var B=0;
B<C;
B++){D[B]=A.getRenderer(B)
}return D
},getColumnIds:function(){var C=[];
var B=this.grid.colModel;
var A=B.getColumnCount();
for(var D=0;
D<A;
D++){C[D]=B.getColumnId(D)
}return C
},getDataIndexes:function(){if(!this.indexMap){this.indexMap=this.buildIndexMap()
}return this.indexMap.colToData
},getColumnIndexByDataIndex:function(A){if(!this.indexMap){this.indexMap=this.buildIndexMap()
}return this.indexMap.dataToCol[A]
},setCSSStyle:function(C,B,A){var D="#"+this.grid.id+" .x-grid-col-"+C;
Ext.util.CSS.updateRule(D,B,A)
},generateRules:function(B){var D=[];
for(var C=0,A=B.getColumnCount();
C<A;
C++){var E=B.getColumnId(C);
D.push(this.colSelector,E," {\n",B.config[C].css,"}\n",this.tdSelector,E," {\n}\n",this.hdSelector,E," {\n}\n",this.splitSelector,E," {\n}\n")
}return Ext.util.CSS.createStyleSheet(D.join(""))
}});
Ext.grid.GridView=function(A){Ext.grid.GridView.superclass.constructor.call(this);
this.el=null;
Ext.apply(this,A)
};
Ext.extend(Ext.grid.GridView,Ext.grid.AbstractGridView,{rowClass:"x-grid-row",cellClass:"x-grid-col",tdClass:"x-grid-td",hdClass:"x-grid-hd",splitClass:"x-grid-split",sortClasses:["sort-asc","sort-desc"],enableMoveAnim:false,hlColor:"C3DAF9",dh:Ext.DomHelper,fly:Ext.Element.fly,css:Ext.util.CSS,borderWidth:1,splitOffset:3,scrollIncrement:22,cellRE:/(?:.*?)x-grid-(?:hd|cell|csplit)-(?:[\d]+)-([\d]+)(?:.*?)/,findRE:/\s?(?:x-grid-hd|x-grid-col|x-grid-csplit)\s/,bind:function(B,A){if(this.ds){this.ds.un("load",this.onLoad,this);
this.ds.un("datachanged",this.onDataChange);
this.ds.un("add",this.onAdd);
this.ds.un("remove",this.onRemove);
this.ds.un("update",this.onUpdate);
this.ds.un("clear",this.onClear)
}if(B){B.on("load",this.onLoad,this);
B.on("datachanged",this.onDataChange,this);
B.on("add",this.onAdd,this);
B.on("remove",this.onRemove,this);
B.on("update",this.onUpdate,this);
B.on("clear",this.onClear,this)
}this.ds=B;
if(this.cm){this.cm.un("widthchange",this.onColWidthChange,this);
this.cm.un("headerchange",this.onHeaderChange,this);
this.cm.un("hiddenchange",this.onHiddenChange,this);
this.cm.un("columnmoved",this.onColumnMove,this);
this.cm.un("columnlockchange",this.onColumnLock,this)
}if(A){this.generateRules(A);
A.on("widthchange",this.onColWidthChange,this);
A.on("headerchange",this.onHeaderChange,this);
A.on("hiddenchange",this.onHiddenChange,this);
A.on("columnmoved",this.onColumnMove,this);
A.on("columnlockchange",this.onColumnLock,this)
}this.cm=A
},init:function(B){Ext.grid.GridView.superclass.init.call(this,B);
this.bind(B.dataSource,B.colModel);
B.on("headerclick",this.handleHeaderClick,this);
if(B.trackMouseOver){B.on("mouseover",this.onRowOver,this);
B.on("mouseout",this.onRowOut,this)
}B.cancelTextSelection=function(){};
this.gridId=B.id;
var A=this.templates||{};
if(!A.master){A.master=new Ext.Template('<div class="x-grid" hidefocus="true">','<div class="x-grid-topbar"></div>','<div class="x-grid-scroller"><div></div></div>','<div class="x-grid-locked">','<div class="x-grid-header">{lockedHeader}</div>','<div class="x-grid-body">{lockedBody}</div>',"</div>",'<div class="x-grid-viewport">','<div class="x-grid-header">{header}</div>','<div class="x-grid-body">{body}</div>',"</div>",'<div class="x-grid-bottombar"></div>','<a href="#" class="x-grid-focus" tabIndex="-1"></a>','<div class="x-grid-resize-proxy">&#160;</div>',"</div>");
A.master.disableformats=true
}if(!A.header){A.header=new Ext.Template('<table border="0" cellspacing="0" cellpadding="0">','<tbody><tr class="x-grid-hd-row">{cells}</tr></tbody>',"</table>{splits}");
A.header.disableformats=true
}A.header.compile();
if(!A.hcell){A.hcell=new Ext.Template('<td class="x-grid-hd x-grid-td-{id} {cellId}"><div title="{title}" class="x-grid-hd-inner x-grid-hd-{id}">','<div class="x-grid-hd-text" unselectable="on">{value}<img class="x-grid-sort-icon" src="',Ext.BLANK_IMAGE_URL,'" /></div>',"</div></td>");
A.hcell.disableFormats=true
}A.hcell.compile();
if(!A.hsplit){A.hsplit=new Ext.Template('<div class="x-grid-split {splitId} x-grid-split-{id}" style="{style}" unselectable="on">&#160;</div>');
A.hsplit.disableFormats=true
}A.hsplit.compile();
if(!A.body){A.body=new Ext.Template('<table border="0" cellspacing="0" cellpadding="0">',"<tbody>{rows}</tbody>","</table>");
A.body.disableFormats=true
}A.body.compile();
if(!A.row){A.row=new Ext.Template('<tr class="x-grid-row {alt}">{cells}</tr>');
A.row.disableFormats=true
}A.row.compile();
if(!A.cell){A.cell=new Ext.Template('<td class="x-grid-col x-grid-td-{id} {cellId} {css}" tabIndex="0">','<div class="x-grid-col-{id} x-grid-cell-inner"><div class="x-grid-cell-text" unselectable="on" {attr}>{value}</div></div>',"</td>");
A.cell.disableFormats=true
}A.cell.compile();
this.templates=A
},onColWidthChange:function(){this.updateColumns.apply(this,arguments)
},onHeaderChange:function(){this.updateHeaders.apply(this,arguments)
},onHiddenChange:function(){this.handleHiddenChange.apply(this,arguments)
},onColumnMove:function(){this.handleColumnMove.apply(this,arguments)
},onColumnLock:function(){this.handleLockChange.apply(this,arguments)
},onDataChange:function(){this.refresh();
this.updateHeaderSortState()
},onClear:function(){this.refresh()
},onUpdate:function(B,A){this.refreshRow(A)
},refreshRow:function(A){var E=this.ds,D;
if(typeof A=="number"){D=A;
A=E.getAt(D)
}else{D=E.indexOf(A)
}var C=this.getRowComposite(D);
var B=[];
this.insertRows(E,D,D,true);
this.onRemove(E,A,D+1,true);
this.syncRowHeights(D,D);
this.layout();
this.fireEvent("rowupdated",this,D,A)
},onAdd:function(B,A,C){this.insertRows(B,C,C+(A.length-1))
},onRemove:function(D,F,E,C){if(C!==true){this.fireEvent("beforerowremoved",this,E,F)
}var B=this.getBodyTable(),A=this.getLockedTable();
if(B.rows[E]){B.firstChild.removeChild(B.rows[E])
}if(A.rows[E]){A.firstChild.removeChild(A.rows[E])
}if(C!==true){this.stripeRows(E);
this.syncRowHeights(E,E);
this.layout();
this.fireEvent("rowremoved",this,E,F)
}},onLoad:function(){this.scrollToTop()
},scrollToTop:function(){if(this.scroller){this.scroller.dom.scrollTop=0;
this.syncScroll()
}},getHeaderPanel:function(A){if(A){this.headerPanel.show()
}return this.headerPanel
},getFooterPanel:function(A){if(A){this.footerPanel.show()
}return this.footerPanel
},initElements:function(){var C=Ext.Element;
var B=this.grid.container.dom.firstChild;
var A=B.childNodes;
this.el=new C(B);
this.headerPanel=new C(B.firstChild);
this.headerPanel.enableDisplayMode("block");
this.scroller=new C(A[1]);
this.scrollSizer=new C(this.scroller.dom.firstChild);
this.lockedWrap=new C(A[2]);
this.lockedHd=new C(this.lockedWrap.dom.firstChild);
this.lockedBody=new C(this.lockedWrap.dom.childNodes[1]);
this.mainWrap=new C(A[3]);
this.mainHd=new C(this.mainWrap.dom.firstChild);
this.mainBody=new C(this.mainWrap.dom.childNodes[1]);
this.footerPanel=new C(A[4]);
this.footerPanel.enableDisplayMode("block");
this.focusEl=new C(A[5]);
this.focusEl.swallowEvent("click",true);
this.resizeProxy=new C(A[6]);
this.headerSelector=String.format("#{0} td.x-grid-hd, #{1} td.x-grid-hd",this.lockedHd.id,this.mainHd.id);
this.splitterSelector=String.format("#{0} div.x-grid-split, #{1} div.x-grid-split",this.lockedHd.id,this.mainHd.id)
},getHeaderCell:function(A){return Ext.DomQuery.select(this.headerSelector)[A]
},getHeaderCellMeasure:function(A){return this.getHeaderCell(A).firstChild
},getHeaderCellText:function(A){return this.getHeaderCell(A).firstChild.firstChild
},getLockedTable:function(){return this.lockedBody.dom.firstChild
},getBodyTable:function(){return this.mainBody.dom.firstChild
},getLockedRow:function(A){return this.getLockedTable().rows[A]
},getRow:function(A){return this.getBodyTable().rows[A]
},getRowComposite:function(A){if(!this.rowEl){this.rowEl=new Ext.CompositeElementLite()
}var B=[],D,C;
if(D=this.getLockedRow(A)){B.push(D)
}if(C=this.getRow(A)){B.push(C)
}this.rowEl.elements=B;
return this.rowEl
},getCell:function(D,C){var B=this.cm.getLockedCount();
var A;
if(C<B){A=this.lockedBody.dom.firstChild
}else{A=this.mainBody.dom.firstChild;
C-=B
}return A.rows[D].childNodes[C]
},getCellText:function(B,A){return this.getCell(B,A).firstChild.firstChild
},getCellBox:function(B){var A=this.fly(B).getBox();
if(Ext.isOpera){A.y=B.offsetTop+this.mainBody.getY()
}return A
},getCellIndex:function(A){var B=String(A.className).match(this.cellRE);
if(B){return parseInt(B[1],10)
}return 0
},findHeaderIndex:function(B){var A=Ext.fly(B).findParent("td."+this.hdClass,6);
return A?this.getCellIndex(A):false
},findHeaderCell:function(B){var A=Ext.fly(B).findParent("td."+this.hdClass,6);
return A?A:false
},findRowIndex:function(B){if(!B){return false
}var A=Ext.fly(B).findParent("tr."+this.rowClass,6);
return A?A.rowIndex:false
},findCellIndex:function(B){var A=this.el.dom;
while(B&&B!=A){if(this.findRE.test(B.className)){return this.getCellIndex(B)
}B=B.parentNode
}return false
},getColumnId:function(A){return this.cm.getColumnId(A)
},getSplitters:function(){if(this.splitterSelector){return Ext.DomQuery.select(this.splitterSelector)
}else{return null
}},getSplitter:function(A){return this.getSplitters()[A]
},onRowOver:function(B,A){var C;
if((C=this.findRowIndex(A))!==false){this.getRowComposite(C).addClass("x-grid-row-over")
}},onRowOut:function(B,A){var C;
if((C=this.findRowIndex(A))!==false&&C!==this.findRowIndex(B.getRelatedTarget())){this.getRowComposite(C).removeClass("x-grid-row-over")
}},renderHeaders:function(){var J=this.cm;
var F=this.templates.hcell,I=this.templates.header,K=this.templates.hsplit;
var D=[],B=[],H=[],C=[],A={};
for(var E=0,G=J.getColumnCount();
E<G;
E++){A.cellId="x-grid-hd-0-"+E;
A.splitId="x-grid-csplit-0-"+E;
A.id=J.getColumnId(E);
A.title=J.getColumnTooltip(E)||"";
A.value=J.getColumnHeader(E)||"";
A.style=(this.grid.enableColumnResize===false||!J.isResizable(E)||J.isFixed(E))?"cursor:default":"";
if(!J.isLocked(E)){D[D.length]=F.apply(A);
H[H.length]=K.apply(A)
}else{B[B.length]=F.apply(A);
C[C.length]=K.apply(A)
}}return[I.apply({cells:B.join(""),splits:C.join("")}),I.apply({cells:D.join(""),splits:H.join("")})]
},updateHeaders:function(){var A=this.renderHeaders();
this.lockedHd.update(A[0]);
this.mainHd.update(A[1])
},focusRow:function(B){var A=this.scroller.dom.scrollLeft;
this.focusCell(B,0,false);
this.scroller.dom.scrollLeft=A
},focusCell:function(D,A,C){var B=this.ensureVisible(D,A,C);
this.focusEl.alignTo(B,"tl-tl");
if(Ext.isGecko){this.focusEl.focus()
}else{this.focusEl.focus.defer(1,this.focusEl)
}},ensureVisible:function(O,D,B){if(typeof O!="number"){O=O.rowIndex
}if(O<0&&O>=this.ds.getCount()){return 
}D=(D!==undefined?D:0);
var I=this.grid.colModel;
while(I.isHidden(D)){D++
}var C=this.getCell(O,D);
if(!C){return 
}var E=this.scroller.dom;
var L=parseInt(C.offsetTop,10);
var J=parseInt(C.offsetLeft,10);
var G=L+C.offsetHeight;
var F=J+C.offsetWidth;
var A=E.clientHeight-this.mainHd.dom.offsetHeight;
var N=parseInt(E.scrollTop,10);
var M=parseInt(E.scrollLeft,10);
var K=N+A;
var H=M+E.clientWidth;
if(L<N){E.scrollTop=L
}else{if(G>K){E.scrollTop=G-A
}}if(B!==false){if(J<M){E.scrollLeft=J
}else{if(F>H){E.scrollLeft=F-E.clientWidth
}}}return C
},updateColumns:function(){this.grid.stopEditing();
var B=this.grid.colModel,E=this.getColumnIds();
var F=0;
for(var D=0,A=B.getColumnCount();
D<A;
D++){var C=B.getColumnWidth(D);
this.css.updateRule(this.colSelector+E[D],"width",(C-this.borderWidth)+"px");
this.css.updateRule(this.hdSelector+E[D],"width",(C-this.borderWidth)+"px")
}this.updateSplitters()
},updateSplitters:function(){var B=this.cm,F=this.getSplitters();
if(F){var G=0,D=true;
for(var E=0,A=B.getColumnCount();
E<A;
E++){if(B.isHidden(E)){continue
}var C=B.getColumnWidth(E);
if(!B.isLocked(E)&&D){G=0;
D=false
}G+=C;
F[E].style.left=(G-this.splitOffset)+"px"
}}},handleHiddenChange:function(C,B,A){if(A){this.hideColumn(B)
}else{this.unhideColumn(B)
}},hideColumn:function(B){var A=this.getColumnId(B);
this.css.updateRule(this.tdSelector+A,"display","none");
this.css.updateRule(this.splitSelector+A,"display","none");
if(Ext.isSafari){this.updateHeaders()
}this.updateSplitters();
this.layout()
},unhideColumn:function(B){var A=this.getColumnId(B);
this.css.updateRule(this.tdSelector+A,"display","");
this.css.updateRule(this.splitSelector+A,"display","");
if(Ext.isSafari){this.updateHeaders()
}this.updateSplitters();
this.layout()
},insertRows:function(A,F,E,D){if(F==0&&E==A.getCount()-1){this.refresh()
}else{if(!D){this.fireEvent("beforerowsinserted",this,F,E)
}var C=this.getScrollState();
var B=this.renderRows(F,E);
this.bufferRows(B[0],this.getLockedTable(),F);
this.bufferRows(B[1],this.getBodyTable(),F);
this.restoreScroll(C);
if(!D){this.fireEvent("rowsinserted",this,F,E);
this.syncRowHeights(F,E);
this.stripeRows(F);
this.layout()
}}},bufferRows:function(A,G,F){var E=null,D=G.rows,C=G.tBodies[0];
if(F<D.length){E=D[F]
}var J=document.createElement("div");
J.innerHTML="<table><tbody>"+A+"</tbody></table>";
var B=J.firstChild.rows;
for(var H=0,I=B.length;
H<I;
H++){if(E){C.insertBefore(B[0],E)
}else{C.appendChild(B[0])
}}J.innerHTML="";
J=null
},deleteRows:function(B,G,F){if(B.getRowCount()<1){this.fireEvent("beforerefresh",this);
this.mainBody.update("");
this.lockedBody.update("");
this.fireEvent("refresh",this)
}else{this.fireEvent("beforerowsdeleted",this,G,F);
var A=this.getBodyTable();
var E=A.firstChild;
var D=A.rows;
for(var C=G;
C<=F;
C++){E.removeChild(D[G])
}this.stripeRows(G);
this.fireEvent("rowsdeleted",this,G,F)
}},updateRows:function(D,C,B){var A=this.getScrollState();
this.refresh();
this.restoreScroll(A)
},handleSort:function(D,B,C,A){if(!A){this.refresh()
}this.updateHeaderSortState()
},getScrollState:function(){var A=this.scroller.dom;
return{left:A.scrollLeft,top:A.scrollTop}
},stripeRows:function(H){if(!this.grid.stripeRows||this.ds.getCount()<1){return 
}H=H||0;
var E=this.getBodyTable().rows;
var C=this.getLockedTable().rows;
var I=" x-grid-row-alt ";
for(var A=H,F=E.length;
A<F;
A++){var J=E[A],G=C[A];
var D=((A+1)%2==0);
var B=(" "+J.className+" ").indexOf(I)!=-1;
if(D==B){continue
}if(D){J.className+=" x-grid-row-alt"
}else{J.className=J.className.replace("x-grid-row-alt","")
}if(G){G.className=J.className
}}},restoreScroll:function(A){var B=this.scroller.dom;
B.scrollLeft=A.left;
B.scrollTop=A.top;
this.syncScroll()
},syncScroll:function(){var D=this.scroller.dom;
var B=this.mainHd.dom;
var A=this.mainBody.dom;
var C=this.lockedBody.dom;
B.scrollLeft=A.scrollLeft=D.scrollLeft;
C.scrollTop=A.scrollTop=D.scrollTop
},handleScroll:function(A){this.syncScroll();
var B=this.scroller.dom;
this.grid.fireEvent("bodyscroll",B.scrollLeft,B.scrollTop);
A.stopEvent()
},handleWheel:function(A){var B=A.getWheelDelta();
this.scroller.dom.scrollTop-=B*22;
this.lockedBody.dom.scrollTop=this.mainBody.dom.scrollTop=this.scroller.dom.scrollTop;
A.stopEvent()
},renderRows:function(G,E){var F=this.grid,K=F.colModel,A=F.dataSource,J=F.stripeRows;
var H=K.getColumnCount();
if(A.getCount()<1){return["",""]
}var I=[];
for(var C=0;
C<H;
C++){var D=K.getDataIndex(C);
I[C]={name:typeof D=="undefined"?A.fields.get(C).name:D,renderer:K.getRenderer(C),id:K.getColumnId(C),locked:K.isLocked(C)}
}G=G||0;
E=typeof E=="undefined"?A.getCount()-1:E;
var B=A.getRange(G,E);
return this.doRender(I,B,A,G,H,J)
},doRender:Ext.isGecko?function(D,G,J,R,P,N){var A=this.templates,C=A.cell,E=A.row;
var T="",S="",K,F,U,L={},H={},I;
for(var M=0,Q=G.length;
M<Q;
M++){I=G[M],K="",F="",rowIndex=(M+R);
for(var O=0;
O<P;
O++){U=D[O];
L.cellId="x-grid-cell-"+rowIndex+"-"+O;
L.id=U.id;
L.css=L.attr="";
L.value=U.renderer(I.data[U.name],L,I,rowIndex,O,J);
if(L.value==undefined||L.value===""){L.value="&#160;"
}if(I.dirty&&typeof I.modified[U.name]!=="undefined"){L.css+=L.css?" x-grid-dirty-cell":"x-grid-dirty-cell"
}var B=C.apply(L);
if(!U.locked){K+=B
}else{F+=B
}}var V=[];
if(N&&((rowIndex+1)%2==0)){V[0]="x-grid-row-alt"
}if(I.dirty){V[1]=" x-grid-dirty-row"
}H.cells=F;
if(this.getRowClass){V[2]=this.getRowClass(I,rowIndex)
}H.alt=V.join(" ");
S+=E.apply(H);
H.cells=K;
T+=E.apply(H)
}return[S,T]
}:function(F,I,N,D,C,B){var A=this.templates,E=A.cell,G=A.row;
var T=[],L=[],O,H,U,P={},J={},M;
for(var Q=0,S=I.length;
Q<S;
Q++){M=I[Q],O=[],H=[],rowIndex=(Q+D);
for(var R=0;
R<C;
R++){U=F[R];
P.cellId="x-grid-cell-"+rowIndex+"-"+R;
P.id=U.id;
P.css=P.attr="";
P.value=U.renderer(M.data[U.name],P,M,rowIndex,R,N);
if(P.value==undefined||P.value===""){P.value="&#160;"
}if(M.dirty&&typeof M.modified[U.name]!=="undefined"){P.css+=P.css?" x-grid-dirty-cell":"x-grid-dirty-cell"
}var K=E.apply(P);
if(!U.locked){O[O.length]=K
}else{H[H.length]=K
}}var V=[];
if(B&&((rowIndex+1)%2==0)){V[0]="x-grid-row-alt"
}if(M.dirty){V[1]=" x-grid-dirty-row"
}J.cells=H;
if(this.getRowClass){V[2]=this.getRowClass(M,rowIndex)
}J.alt=V.join(" ");
J.cells=H.join("");
L[L.length]=G.apply(J);
J.cells=O.join("");
T[T.length]=G.apply(J)
}return[L.join(""),T.join("")]
},renderBody:function(){var B=this.renderRows();
var A=this.templates.body;
return[A.apply({rows:B[0]}),A.apply({rows:B[1]})]
},refresh:function(B){this.fireEvent("beforerefresh",this);
this.grid.stopEditing();
var A=this.renderBody();
this.lockedBody.update(A[0]);
this.mainBody.update(A[1]);
if(B===true){this.updateHeaders();
this.updateColumns();
this.updateSplitters();
this.updateHeaderSortState()
}this.syncRowHeights();
this.layout();
this.fireEvent("refresh",this)
},handleColumnMove:function(B,C,A){this.indexMap=null;
var D=this.getScrollState();
this.refresh(true);
this.restoreScroll(D);
this.afterMove(A)
},afterMove:function(A){if(this.enableMoveAnim&&Ext.enableFx){this.fly(this.getHeaderCell(A).firstChild).highlight(this.hlColor)
}},updateCell:function(I,C,A){var H=this.getColumnIndexByDataIndex(A);
if(typeof H=="undefined"){return 
}var J=this.grid.colModel;
var G=this.getCell(C,H);
var E=this.getCellText(C,H);
var D={cellId:"x-grid-cell-"+C+"-"+H,id:J.getColumnId(H),css:H==J.getColumnCount()-1?"x-grid-col-last":""};
var B=J.getRenderer(H);
var F=B(I.getValueAt(C,A),D,C,H,I);
if(typeof F=="undefined"||F===""){F="&#160;"
}E.innerHTML=F;
G.className=this.cellClass+" "+D.cellId+" "+D.css;
this.syncRowHeights(C,C)
},calcColumnWidth:function(A,J){var I=0;
if(this.grid.autoSizeHeaders){var D=this.getHeaderCellMeasure(A);
I=Math.max(I,D.scrollWidth)
}var B,G;
if(this.cm.isLocked(A)){B=this.getLockedTable();
G=A
}else{B=this.getBodyTable();
G=A-this.cm.getLockedCount()
}if(B&&B.rows){var F=B.rows;
var E=Math.min(J||F.length,F.length);
for(var C=0;
C<E;
C++){var H=F[C].childNodes[G].firstChild;
I=Math.max(I,H.scrollWidth)
}}return I+5
},autoSizeColumn:function(A,E,C){if(this.cm.isHidden(A)){return 
}if(E){var D=this.cm.getColumnId(A);
this.css.updateRule(this.colSelector+D,"width",this.grid.minColumnWidth+"px");
if(this.grid.autoSizeHeaders){this.css.updateRule(this.hdSelector+D,"width",this.grid.minColumnWidth+"px")
}}var B=this.calcColumnWidth(A);
this.cm.setColumnWidth(A,Math.max(this.grid.minColumnWidth,B),C);
if(!C){this.grid.fireEvent("columnresize",A,B)
}},autoSizeColumns:function(){var A=this.grid.colModel;
var C=A.getColumnCount();
for(var B=0;
B<C;
B++){this.autoSizeColumn(B,true,true)
}if(A.getTotalWidth()<this.scroller.dom.clientWidth){this.fitColumns()
}else{this.updateColumns();
this.layout()
}},fitColumns:function(H){var F=this.grid.colModel;
var G=F.getColumnCount();
var C=[];
var D=0;
var B,E;
for(B=0;
B<G;
B++){if(!F.isHidden(B)&&!F.isFixed(B)){E=F.getColumnWidth(B);
C.push(B);
C.push(E);
D+=E
}}var I=Math.min(this.scroller.dom.clientWidth,this.el.getWidth());
if(H){I-=17
}var A=(I-F.getTotalWidth())/D;
while(C.length){E=C.pop();
B=C.pop();
F.setColumnWidth(B,Math.floor(E+E*A),true)
}this.updateColumns();
this.layout()
},onRowSelect:function(B){var A=this.getRowComposite(B);
A.addClass("x-grid-row-selected")
},onRowDeselect:function(A){var B=this.getRowComposite(A);
B.removeClass("x-grid-row-selected")
},onCellSelect:function(C,B){var A=this.getCell(C,B);
if(A){Ext.fly(A).addClass("x-grid-cell-selected")
}},onCellDeselect:function(C,B){var A=this.getCell(C,B);
if(A){Ext.fly(A).removeClass("x-grid-cell-selected")
}},updateHeaderSortState:function(){var C=this.ds.getSortState();
if(!C){return 
}this.sortState=C;
var B=this.cm.findColumnIndex(C.field);
if(B!=-1){var A=C.direction;
var E=this.sortClasses;
var D=this.el.select(this.headerSelector).removeClass(E);
D.item(B).addClass(E[A=="DESC"?1:0])
}},handleHeaderClick:function(D,B){if(this.headersDisabled){return 
}var C=D.dataSource,A=D.colModel;
if(!A.isSortable(B)){return 
}D.stopEditing();
C.sort(A.getDataIndex(B))
},destroy:function(){if(this.colMenu){this.colMenu.removeAll();
Ext.menu.MenuMgr.unregister(this.colMenu);
this.colMenu.getEl().remove();
delete this.colMenu
}if(this.hmenu){this.hmenu.removeAll();
Ext.menu.MenuMgr.unregister(this.hmenu);
this.hmenu.getEl().remove();
delete this.hmenu
}if(this.grid.enableColumnMove){var C=Ext.dd.DDM.ids["gridHeader"+this.grid.container.id];
if(C){for(var A in C){if(!C[A].config.isTarget&&C[A].dragElId){var B=C[A].dragElId;
C[A].unreg();
Ext.get(B).remove()
}else{if(C[A].config.isTarget){C[A].proxyTop.remove();
C[A].proxyBottom.remove();
C[A].unreg()
}}if(Ext.dd.DDM.locationCache[A]){delete Ext.dd.DDM.locationCache[A]
}}delete Ext.dd.DDM.ids["gridHeader"+this.grid.container.id]
}}this.bind(null,null);
Ext.EventManager.removeResizeListener(this.onWindowResize,this)
},handleLockChange:function(){this.refresh(true)
},onDenyColumnLock:function(){},onDenyColumnHide:function(){},handleHdMenuClick:function(C){var E=this.hdCtxIndex;
var A=this.cm,D=this.ds;
switch(C.id){case"asc":D.sort(A.getDataIndex(E),"ASC");
break;
case"desc":D.sort(A.getDataIndex(E),"DESC");
break;
case"lock":var B=A.getLockedCount();
if(A.getColumnCount(true)<=B+1){this.onDenyColumnLock();
return 
}if(B!=E){A.setLocked(E,true,true);
A.moveColumn(E,B);
this.grid.fireEvent("columnmove",E,B)
}else{A.setLocked(E,true)
}break;
case"unlock":var B=A.getLockedCount();
if((B-1)!=E){A.setLocked(E,false,true);
A.moveColumn(E,B-1);
this.grid.fireEvent("columnmove",E,B-1)
}else{A.setLocked(E,false)
}break;
default:E=A.getIndexById(C.id.substr(4));
if(E!=-1){if(C.checked&&A.getColumnCount(true)<=1){this.onDenyColumnHide();
return false
}A.setHidden(E,C.checked)
}}return true
},beforeColMenuShow:function(){var A=this.cm,B=A.getColumnCount();
this.colMenu.removeAll();
for(var C=0;
C<B;
C++){this.colMenu.add(new Ext.menu.CheckItem({id:"col-"+A.getColumnId(C),text:A.getColumnHeader(C),checked:!A.isHidden(C),hideOnClick:false}))
}},handleHdCtx:function(D,C,F){F.stopEvent();
var E=this.getHeaderCell(C);
this.hdCtxIndex=C;
var B=this.hmenu.items,A=this.cm;
B.get("asc").setDisabled(!A.isSortable(C));
B.get("desc").setDisabled(!A.isSortable(C));
if(this.grid.enableColLock!==false){B.get("lock").setDisabled(A.isLocked(C));
B.get("unlock").setDisabled(!A.isLocked(C))
}this.hmenu.show(E,"tl-bl")
},handleHdOver:function(B){var A=this.findHeaderCell(B.getTarget());
if(A&&!this.headersDisabled){if(this.grid.colModel.isSortable(this.getCellIndex(A))){this.fly(A).addClass("x-grid-hd-over")
}}},handleHdOut:function(B){var A=this.findHeaderCell(B.getTarget());
if(A){this.fly(A).removeClass("x-grid-hd-over")
}},handleSplitDblClick:function(C,B){var A=this.getCellIndex(B);
if(this.grid.enableColumnResize!==false&&this.cm.isResizable(A)&&!this.cm.isFixed(A)){this.autoSizeColumn(A,true);
this.layout()
}},render:function(){var B=this.cm;
var F=B.getColumnCount();
if(this.grid.monitorWindowResize===true){Ext.EventManager.onWindowResize(this.onWindowResize,this,true)
}var C=this.renderHeaders();
var A=this.templates.body.apply({rows:""});
var E=this.templates.master.apply({lockedBody:A,body:A,lockedHeader:C[0],header:C[1]});
this.updateColumns();
this.grid.container.dom.innerHTML=E;
this.initElements();
this.scroller.on("scroll",this.handleScroll,this);
this.lockedBody.on("mousewheel",this.handleWheel,this);
this.mainBody.on("mousewheel",this.handleWheel,this);
this.mainHd.on("mouseover",this.handleHdOver,this);
this.mainHd.on("mouseout",this.handleHdOut,this);
this.mainHd.on("dblclick",this.handleSplitDblClick,this,{delegate:"."+this.splitClass});
this.lockedHd.on("mouseover",this.handleHdOver,this);
this.lockedHd.on("mouseout",this.handleHdOut,this);
this.lockedHd.on("dblclick",this.handleSplitDblClick,this,{delegate:"."+this.splitClass});
if(this.grid.enableColumnResize!==false&&Ext.grid.SplitDragZone){new Ext.grid.SplitDragZone(this.grid,this.lockedHd.dom,this.mainHd.dom)
}this.updateSplitters();
if(this.grid.enableColumnMove&&Ext.grid.HeaderDragZone){new Ext.grid.HeaderDragZone(this.grid,this.lockedHd.dom,this.mainHd.dom);
new Ext.grid.HeaderDropZone(this.grid,this.lockedHd.dom,this.mainHd.dom)
}if(this.grid.enableCtxMenu!==false&&Ext.menu.Menu){this.hmenu=new Ext.menu.Menu({id:this.grid.id+"-hctx"});
this.hmenu.add({id:"asc",text:this.sortAscText,cls:"xg-hmenu-sort-asc"},{id:"desc",text:this.sortDescText,cls:"xg-hmenu-sort-desc"});
if(this.grid.enableColLock!==false){this.hmenu.add("-",{id:"lock",text:this.lockText,cls:"xg-hmenu-lock"},{id:"unlock",text:this.unlockText,cls:"xg-hmenu-unlock"})
}if(this.grid.enableColumnHide!==false){this.colMenu=new Ext.menu.Menu({id:this.grid.id+"-hcols-menu"});
this.colMenu.on("beforeshow",this.beforeColMenuShow,this);
this.colMenu.on("itemclick",this.handleHdMenuClick,this);
this.hmenu.add("-",{id:"columns",text:this.columnsText,menu:this.colMenu})
}this.hmenu.on("itemclick",this.handleHdMenuClick,this);
this.grid.on("headercontextmenu",this.handleHdCtx,this)
}if((this.grid.enableDragDrop||this.grid.enableDrag)&&Ext.grid.GridDragZone){this.dd=new Ext.grid.GridDragZone(this.grid,{ddGroup:this.grid.ddGroup||"GridDD"})
}for(var D=0;
D<F;
D++){if(B.isHidden(D)){this.hideColumn(D)
}if(B.config[D].align){this.css.updateRule(this.colSelector+D,"textAlign",B.config[D].align);
this.css.updateRule(this.hdSelector+D,"textAlign",B.config[D].align)
}}this.updateHeaderSortState();
this.beforeInitialResize();
this.layout(true);
this.renderPhase2.defer(1,this)
},renderPhase2:function(){this.refresh();
if(this.grid.autoSizeColumns){this.autoSizeColumns()
}},beforeInitialResize:function(){},onColumnSplitterMoved:function(C,B){this.userResized=true;
var A=this.grid.colModel;
A.setColumnWidth(C,B,true);
var D=A.getColumnId(C);
this.css.updateRule(this.colSelector+D,"width",(B-this.borderWidth)+"px");
this.css.updateRule(this.hdSelector+D,"width",(B-this.borderWidth)+"px");
this.updateSplitters();
this.layout();
this.grid.fireEvent("columnresize",C,B)
},syncRowHeights:function(I,H){if(this.grid.enableRowHeightSync===true&&this.cm.getLockedCount()>0){I=I||0;
var F=this.getBodyTable().rows;
var E=this.getLockedTable().rows;
var G=F.length-1;
H=Math.min(H||G,G);
for(var C=I;
C<=H;
C++){var A=F[C],B=E[C];
var D=Math.max(A.offsetHeight,B.offsetHeight);
A.style.height=B.style.height=D+"px"
}}},layout:function(b,Y){var W=this.grid;
var J=W.autoHeight;
var X=16;
var a=W.container,M=this.cm,I=W.autoExpandColumn,P=this;
if(!a.dom.offsetWidth){if(b){this.lockedWrap.show();
this.mainWrap.show()
}return 
}var F=this.cm.isLocked(0);
var K=this.headerPanel.getHeight();
var L=this.footerPanel.getHeight();
if(J){var N=this.getBodyTable().offsetHeight+K+L+this.mainHd.getHeight();
var D=N+a.getBorderWidth("tb");
if(W.maxHeight){D=Math.min(W.maxHeight,D)
}a.setHeight(D)
}if(W.autoWidth){a.setWidth(M.getTotalWidth()+a.getBorderWidth("lr"))
}var O=this.scroller;
var B=a.getSize(true);
this.el.setSize(B.width,B.height);
this.headerPanel.setWidth(B.width);
this.footerPanel.setWidth(B.width);
var H=this.mainHd.getHeight();
var U=B.width;
var e=B.height-(K+L);
O.setSize(U,e);
var Z=this.getBodyTable();
var E=F?Math.max(this.getLockedTable().offsetWidth,this.lockedHd.dom.firstChild.offsetWidth):0;
var C=Z.offsetHeight;
var T=E+Z.offsetWidth;
var S=false,R=false;
this.scrollSizer.setSize(T,C+H);
var G=this.lockedWrap,Q=this.mainWrap;
var V=this.lockedBody,A=this.mainBody;
setTimeout(function(){var o=O.dom.offsetTop;
var k=O.dom.clientWidth,p=O.dom.clientHeight;
G.setTop(o);
G.setSize(E,p);
Q.setLeftTop(E,o);
Q.setSize(k-E,p);
V.setHeight(p-H);
A.setHeight(p-H);
if(Y!==true&&!P.userResized&&I){var m=M.getIndexById(I);
var l=M.getTotalWidth(false);
var c=M.getColumnWidth(m);
var g=Math.min(Math.max(((k-l)+c-2)-(k<=O.dom.offsetWidth?0:18),W.autoExpandMin),W.autoExpandMax);
if(c!=g){M.setColumnWidth(m,g,true);
P.css.updateRule(P.colSelector+I,"width",(g-P.borderWidth)+"px");
P.css.updateRule(P.hdSelector+I,"width",(g-P.borderWidth)+"px");
P.updateSplitters();
P.layout(false,true)
}}if(b){G.show();
Q.show()
}},10)
},onWindowResize:function(){if(!this.grid.monitorWindowResize||this.grid.autoHeight){return 
}this.layout()
},appendFooter:function(A){return null
},sortAscText:"Sort Ascending",sortDescText:"Sort Descending",lockText:"Lock Column",unlockText:"Unlock Column",columnsText:"Columns"});
Ext.grid.HeaderDragZone=function(C,B,A){this.grid=C;
this.view=C.getView();
this.ddGroup="gridHeader"+this.grid.container.id;
Ext.grid.HeaderDragZone.superclass.constructor.call(this,B);
if(A){this.setHandleElId(Ext.id(B));
this.setOuterHandleElId(Ext.id(A))
}this.scroll=false
};
Ext.extend(Ext.grid.HeaderDragZone,Ext.dd.DragZone,{maxDragWidth:120,getDragData:function(C){var A=Ext.lib.Event.getTarget(C);
var B=this.view.findHeaderCell(A);
if(B){return{ddel:B.firstChild,header:B}
}return false
},onInitDrag:function(B){this.view.headersDisabled=true;
var A=this.dragData.ddel.cloneNode(true);
A.style.width=Math.min(this.dragData.header.offsetWidth,this.maxDragWidth)+"px";
this.proxy.update(A);
return true
},afterValidDrop:function(){var A=this.view;
setTimeout(function(){A.headersDisabled=false
},50)
},afterInvalidDrop:function(){var A=this.view;
setTimeout(function(){A.headersDisabled=false
},50)
}});
Ext.grid.HeaderDropZone=function(B,C,A){this.grid=B;
this.view=B.getView();
this.proxyTop=Ext.DomHelper.append(document.body,{tag:"div",cls:"col-move-top",html:"&#160;"},true);
this.proxyBottom=Ext.DomHelper.append(document.body,{tag:"div",cls:"col-move-bottom",html:"&#160;"},true);
this.proxyTop.hide=this.proxyBottom.hide=function(){this.setLeftTop(-100,-100);
this.setStyle("visibility","hidden")
};
this.ddGroup="gridHeader"+this.grid.container.id;
Ext.grid.HeaderDropZone.superclass.constructor.call(this,B.container.dom)
};
Ext.extend(Ext.grid.HeaderDropZone,Ext.dd.DropZone,{proxyOffsets:[-4,-9],fly:Ext.Element.fly,getTargetFromEvent:function(B){var A=Ext.lib.Event.getTarget(B);
var C=this.view.findCellIndex(A);
if(C!==false){return this.view.getHeaderCell(C)
}},nextVisible:function(C){var B=this.view,A=this.grid.colModel;
C=C.nextSibling;
while(C){if(!A.isHidden(B.getCellIndex(C))){return C
}C=C.nextSibling
}return null
},prevVisible:function(C){var B=this.view,A=this.grid.colModel;
C=C.prevSibling;
while(C){if(!A.isHidden(B.getCellIndex(C))){return C
}C=C.prevSibling
}return null
},positionIndicator:function(F,E,G){var I=Ext.lib.Event.getPageX(G);
var A=Ext.lib.Dom.getRegion(E.firstChild);
var J,K,H=A.top+this.proxyOffsets[1];
if((A.right-I)<=(A.right-A.left)/2){J=A.right+this.view.borderWidth;
K="after"
}else{J=A.left;
K="before"
}var D=this.view.getCellIndex(F);
var C=this.view.getCellIndex(E);
var B=this.grid.colModel.isLocked(C);
if(K=="after"){C++
}if(D<C){C--
}if(D==C&&(B==this.grid.colModel.isLocked(D))){return false
}J+=this.proxyOffsets[0];
this.proxyTop.setLeftTop(J,H);
this.proxyTop.show();
if(!this.bottomOffset){this.bottomOffset=this.view.mainHd.getHeight()
}this.proxyBottom.setLeftTop(J,H+this.proxyTop.dom.offsetHeight+this.bottomOffset);
this.proxyBottom.show();
return K
},onNodeEnter:function(D,A,C,B){if(B.header!=D){this.positionIndicator(B.header,D,C)
}},onNodeOver:function(E,A,D,B){var C=false;
if(B.header!=E){C=this.positionIndicator(B.header,E,D)
}if(!C){this.proxyTop.hide();
this.proxyBottom.hide()
}return C?this.dropAllowed:this.dropNotAllowed
},onNodeOut:function(D,A,C,B){this.proxyTop.hide();
this.proxyBottom.hide()
},onNodeDrop:function(B,K,F,H){var E=H.header;
if(E!=B){var J=this.grid.colModel;
var I=Ext.lib.Event.getPageX(F);
var A=Ext.lib.Dom.getRegion(B.firstChild);
var L=(A.right-I)<=((A.right-A.left)/2)?"after":"before";
var D=this.view.getCellIndex(E);
var C=this.view.getCellIndex(B);
var G=J.isLocked(C);
if(L=="after"){C++
}if(D<C){C--
}if(D==C&&(G==J.isLocked(D))){return false
}J.setLocked(D,G,true);
J.moveColumn(D,C);
this.grid.fireEvent("columnmove",D,C);
return true
}return false
}});
Ext.grid.SplitDragZone=function(C,B,A){this.grid=C;
this.view=C.getView();
this.proxy=this.view.resizeProxy;
Ext.grid.SplitDragZone.superclass.constructor.call(this,B,"gridSplitters"+this.grid.container.id,{dragElId:Ext.id(this.proxy.dom),resizeFrame:false});
this.setHandleElId(Ext.id(B));
this.setOuterHandleElId(Ext.id(A));
this.scroll=false
};
Ext.extend(Ext.grid.SplitDragZone,Ext.dd.DDProxy,{fly:Ext.Element.fly,b4StartDrag:function(A,D){this.view.headersDisabled=true;
this.proxy.setHeight(this.view.mainWrap.getHeight());
var B=this.cm.getColumnWidth(this.cellIndex);
var C=Math.max(B-this.grid.minColumnWidth,0);
this.resetConstraints();
this.setXConstraint(C,1000);
this.setYConstraint(0,0);
this.minX=A-C;
this.maxX=A+1000;
this.startPos=A;
Ext.dd.DDProxy.prototype.b4StartDrag.call(this,A,D)
},handleMouseDown:function(B){ev=Ext.EventObject.setEvent(B);
var A=this.fly(ev.getTarget());
if(A.hasClass("x-grid-split")){this.cellIndex=this.view.getCellIndex(A.dom);
this.split=A.dom;
this.cm=this.grid.colModel;
if(this.cm.isResizable(this.cellIndex)&&!this.cm.isFixed(this.cellIndex)){Ext.grid.SplitDragZone.superclass.handleMouseDown.apply(this,arguments)
}}},endDrag:function(C){this.view.headersDisabled=false;
var B=Math.max(this.minX,Ext.lib.Event.getPageX(C));
var A=B-this.startPos;
this.view.onColumnSplitterMoved(this.cellIndex,this.cm.getColumnWidth(this.cellIndex)+A)
},autoOffset:function(){this.setDelta(0,0)
}});
Ext.grid.GridDragZone=function(B,A){this.view=B.getView();
Ext.grid.GridDragZone.superclass.constructor.call(this,this.view.lockedBody.dom,A);
this.setHandleElId(Ext.id(this.view.lockedBody.dom));
this.setOuterHandleElId(Ext.id(this.view.mainBody.dom));
this.scroll=false;
this.grid=B;
this.ddel=document.createElement("div");
this.ddel.className="x-grid-dd-wrap"
};
Ext.extend(Ext.grid.GridDragZone,Ext.dd.DragZone,{ddGroup:"GridDD",getDragData:function(C){var B=Ext.lib.Event.getTarget(C);
var A=this.view.findRowIndex(B);
if(A!==false){var D=this.grid.selModel;
if(!D.isSelected(A)||C.hasModifier()){D.handleMouseDown(C,B)
}return{grid:this.grid,ddel:this.ddel,rowIndex:A,selections:D.getSelections()}
}return false
},onInitDrag:function(B){var A=this.dragData;
this.ddel.innerHTML=this.grid.getDragDropText();
this.proxy.update(this.ddel)
},afterRepair:function(){this.dragging=false
},getRepairXY:function(B,A){return false
},onEndDrag:function(A,B){},onValidDrop:function(A,B,C){this.hideProxy()
},beforeInvalidDrop:function(A,B){}});
Ext.grid.ColumnModel=function(C){Ext.grid.ColumnModel.superclass.constructor.call(this);
this.config=C;
this.lookup={};
for(var A=0,B=C.length;
A<B;
A++){if(typeof C[A].dataIndex=="undefined"){C[A].dataIndex=A
}if(typeof C[A].renderer=="string"){C[A].renderer=Ext.util.Format[C[A].renderer]
}if(typeof C[A].id=="undefined"){C[A].id=A
}this.lookup[C[A].id]=C[A]
}this.defaultWidth=100;
this.defaultSortable=false;
this.addEvents({widthchange:true,headerchange:true,hiddenchange:true,columnmoved:true,columnlockchange:true});
Ext.grid.ColumnModel.superclass.constructor.call(this)
};
Ext.extend(Ext.grid.ColumnModel,Ext.util.Observable,{getColumnId:function(A){return this.config[A].id
},getColumnById:function(A){return this.lookup[A]
},getIndexById:function(C){for(var B=0,A=this.config.length;
B<A;
B++){if(this.config[B].id==C){return B
}}return -1
},moveColumn:function(A,B){var C=this.config[A];
this.config.splice(A,1);
this.config.splice(B,0,C);
this.dataMap=null;
this.fireEvent("columnmoved",this,A,B)
},isLocked:function(A){return this.config[A].locked===true
},setLocked:function(B,A,C){if(this.isLocked(B)==A){return 
}this.config[B].locked=A;
if(!C){this.fireEvent("columnlockchange",this,B,A)
}},getTotalLockedWidth:function(){var B=0;
for(var A=0;
A<this.config.length;
A++){if(this.isLocked(A)&&!this.isHidden(A)){this.totalWidth+=this.getColumnWidth(A)
}}return B
},getLockedCount:function(){for(var B=0,A=this.config.length;
B<A;
B++){if(!this.isLocked(B)){return B
}}},getColumnCount:function(C){if(C==true){var D=0;
for(var B=0,A=this.config.length;
B<A;
B++){if(!this.isHidden(B)){D++
}}return D
}return this.config.length
},isSortable:function(A){if(typeof this.config[A].sortable=="undefined"){return this.defaultSortable
}return this.config[A].sortable
},getRenderer:function(A){if(!this.config[A].renderer){return Ext.grid.ColumnModel.defaultRenderer
}return this.config[A].renderer
},setRenderer:function(A,B){this.config[A].renderer=B
},getColumnWidth:function(A){return this.config[A].width||this.defaultWidth
},setColumnWidth:function(C,B,A){this.config[C].width=B;
this.totalWidth=null;
if(!A){this.fireEvent("widthchange",this,C,B)
}},getTotalWidth:function(B){if(!this.totalWidth){this.totalWidth=0;
for(var C=0,A=this.config.length;
C<A;
C++){if(B||!this.isHidden(C)){this.totalWidth+=this.getColumnWidth(C)
}}}return this.totalWidth
},getColumnHeader:function(A){return this.config[A].header
},setColumnHeader:function(A,B){this.config[A].header=B;
this.fireEvent("headerchange",this,A,B)
},getColumnTooltip:function(A){return this.config[A].tooltip
},setColumnTooltip:function(A,B){this.config[A].tooltip=B
},getDataIndex:function(A){return this.config[A].dataIndex
},setDataIndex:function(A,B){this.config[A].dataIndex=B
},findColumnIndex:function(C){var D=this.config;
for(var B=0,A=D.length;
B<A;
B++){if(D[B].dataIndex==C){return B
}}return -1
},isCellEditable:function(B,A){return(this.config[B].editable||(typeof this.config[B].editable=="undefined"&&this.config[B].editor))?true:false
},getCellEditor:function(B,A){return this.config[B].editor
},setEditable:function(A,B){this.config[A].editable=B
},isHidden:function(A){return this.config[A].hidden
},isFixed:function(A){return this.config[A].fixed
},isResizable:function(A){return this.config[A].resizable!==false
},setHidden:function(A,B){this.config[A].hidden=B;
this.totalWidth=null;
this.fireEvent("hiddenchange",this,A,B)
},setEditor:function(A,B){this.config[A].editor=B
}});
Ext.grid.ColumnModel.defaultRenderer=function(A){if(typeof A=="string"&&A.length<1){return"&#160;"
}return A
};
Ext.grid.DefaultColumnModel=Ext.grid.ColumnModel;
Ext.grid.AbstractSelectionModel=function(){this.locked=false;
Ext.grid.AbstractSelectionModel.superclass.constructor.call(this)
};
Ext.extend(Ext.grid.AbstractSelectionModel,Ext.util.Observable,{init:function(A){this.grid=A;
this.initEvents()
},lock:function(){this.locked=true
},unlock:function(){this.locked=false
},isLocked:function(){return this.locked
}});
Ext.grid.RowSelectionModel=function(A){Ext.apply(this,A);
this.selections=new Ext.util.MixedCollection(false,function(B){return B.id
});
this.last=false;
this.lastActive=false;
this.addEvents({selectionchange:true,beforerowselect:true,rowselect:true,rowdeselect:true});
this.locked=false
};
Ext.extend(Ext.grid.RowSelectionModel,Ext.grid.AbstractSelectionModel,{singleSelect:false,initEvents:function(){if(!this.grid.enableDragDrop&&!this.grid.enableDrag){this.grid.on("mousedown",this.handleMouseDown,this)
}this.rowNav=new Ext.KeyNav(this.grid.container,{up:function(C){if(!C.shiftKey){this.selectPrevious(C.shiftKey)
}else{if(this.last!==false&&this.lastActive!==false){var B=this.last;
this.selectRange(this.last,this.lastActive-1);
this.grid.getView().focusRow(this.lastActive);
if(B!==false){this.last=B
}}else{this.selectFirstRow()
}}},down:function(C){if(!C.shiftKey){this.selectNext(C.shiftKey)
}else{if(this.last!==false&&this.lastActive!==false){var B=this.last;
this.selectRange(this.last,this.lastActive+1);
this.grid.getView().focusRow(this.lastActive);
if(B!==false){this.last=B
}}else{this.selectFirstRow()
}}},scope:this});
var A=this.grid.view;
A.on("refresh",this.onRefresh,this);
A.on("rowupdated",this.onRowUpdated,this);
A.on("rowremoved",this.onRemove,this)
},onRefresh:function(){var D=this.grid.dataSource,B,A=this.grid.view;
var C=this.selections;
C.each(function(E){if((B=D.indexOfId(E.id))!=-1){A.onRowSelect(B)
}else{C.remove(E)
}})
},onRemove:function(B,A,C){this.selections.remove(C)
},onRowUpdated:function(A,C,B){if(this.isSelected(B)){A.onRowSelect(C)
}},selectRecords:function(E,C){if(!C){this.clearSelections()
}var D=this.grid.dataSource;
for(var B=0,A=E.length;
B<A;
B++){this.selectRow(D.indexOf(E[B]),true)
}},getCount:function(){return this.selections.length
},selectFirstRow:function(){this.selectRow(0)
},selectLastRow:function(A){this.selectRow(this.grid.dataSource.getCount()-1,A)
},selectNext:function(A){if(this.last!==false&&(this.last+1)<this.grid.dataSource.getCount()){this.selectRow(this.last+1,A);
this.grid.getView().focusRow(this.last)
}},selectPrevious:function(A){if(this.last){this.selectRow(this.last-1,A);
this.grid.getView().focusRow(this.last)
}},getSelections:function(){return[].concat(this.selections.items)
},getSelected:function(){return this.selections.itemAt(0)
},clearSelections:function(A){if(this.locked){return 
}if(A!==true){var C=this.grid.dataSource;
var B=this.selections;
B.each(function(D){this.deselectRow(C.indexOfId(D.id))
},this);
B.clear()
}else{this.selections.clear()
}this.last=false
},selectAll:function(){if(this.locked){return 
}this.selections.clear();
for(var B=0,A=this.grid.dataSource.getCount();
B<A;
B++){this.selectRow(B,true)
}},hasSelection:function(){return this.selections.length>0
},isSelected:function(A){var B=typeof A=="number"?this.grid.dataSource.getAt(A):A;
return(B&&this.selections.key(B.id)?true:false)
},isIdSelected:function(A){return(this.selections.key(A)?true:false)
},handleMouseDown:function(F,C){var E=this.grid.getView(),D;
if(this.isLocked()||(D=E.findRowIndex(C))===false){return 
}if(F.shiftKey&&this.last!==false){var B=this.last;
this.selectRange(B,D,F.ctrlKey);
this.last=B;
E.focusRow(D)
}else{var A=this.isSelected(D);
if(F.button!=0&&A){E.focusRow(D)
}else{if(F.ctrlKey&&A){this.deselectRow(D)
}else{this.selectRow(D,F.button==0&&(F.ctrlKey||F.shiftKey));
E.focusRow(D)
}}}},selectRows:function(D,C){if(!C){this.clearSelections()
}for(var B=0,A=D.length;
B<A;
B++){this.selectRow(D[B],true)
}},selectRange:function(C,A,B){if(this.locked){return 
}if(!B){this.clearSelections()
}if(C<=A){for(var D=C;
D<=A;
D++){this.selectRow(D,true)
}}else{for(var D=C;
D>=A;
D--){this.selectRow(D,true)
}}},deselectRange:function(B,A,D){if(this.locked){return 
}for(var C=B;
C<=A;
C++){this.deselectRow(C,D)
}},selectRow:function(D,C,B){if(this.locked||(D<0||D>=this.grid.dataSource.getCount())){return 
}if(this.fireEvent("beforerowselect",this,D,C)!==false){if(!C||this.singleSelect){this.clearSelections()
}var A=this.grid.dataSource.getAt(D);
this.selections.add(A);
this.last=this.lastActive=D;
if(!B){this.grid.getView().onRowSelect(D)
}this.fireEvent("rowselect",this,D,A);
this.fireEvent("selectionchange",this)
}},deselectRow:function(C,B){if(this.locked){return 
}if(this.last==C){this.last=false
}if(this.lastActive==C){this.lastActive=false
}var A=this.grid.dataSource.getAt(C);
this.selections.remove(A);
if(!B){this.grid.getView().onRowDeselect(C)
}this.fireEvent("rowdeselect",this,C);
this.fireEvent("selectionchange",this)
},restoreLast:function(){if(this._last){this.last=this._last
}},acceptsNav:function(C,B,A){return !A.isHidden(B)&&A.isCellEditable(B,C)
},onEditorKey:function(D,F){var C=F.getKey(),B,E=this.grid,A=E.activeEditor;
if(C==F.TAB){A.completeEdit();
if(F.shiftKey){B=E.walkCells(A.row,A.col-1,-1,this.acceptsNav,this)
}else{B=E.walkCells(A.row,A.col+1,1,this.acceptsNav,this)
}F.stopEvent()
}else{if(C==F.ENTER&&!F.ctrlKey){A.completeEdit();
if(F.shiftKey){B=E.walkCells(A.row-1,A.col,-1,this.acceptsNav,this)
}else{B=E.walkCells(A.row+1,A.col,1,this.acceptsNav,this)
}F.stopEvent()
}else{if(C==F.ESC){A.cancelEdit()
}}}if(B){E.startEditing(B[0],B[1])
}}});
Ext.grid.CellSelectionModel=function(A){Ext.apply(this,A);
this.selection=null;
this.addEvents({beforecellselect:true,cellselect:true,selectionchange:true})
};
Ext.extend(Ext.grid.CellSelectionModel,Ext.grid.AbstractSelectionModel,{initEvents:function(){this.grid.on("mousedown",this.handleMouseDown,this);
this.grid.container.on(Ext.isIE?"keydown":"keypress",this.handleKeyDown,this);
var A=this.grid.view;
A.on("refresh",this.onViewChange,this);
A.on("rowupdated",this.onRowUpdated,this);
A.on("beforerowremoved",this.clearSelections,this);
A.on("beforerowsinserted",this.clearSelections,this);
if(this.grid.isEditor){this.grid.on("beforeedit",this.beforeEdit,this)
}},beforeEdit:function(A){this.select(A.row,A.column,false,true,A.record)
},onRowUpdated:function(A,B,C){if(this.selection&&this.selection.record==C){A.onCellSelect(B,this.selection.cell[1])
}},onViewChange:function(){this.clearSelections(true)
},getSelectedCell:function(){return this.selection?this.selection.cell:null
},clearSelections:function(A){var B=this.selection;
if(B){if(A!==true){this.grid.view.onCellDeselect(B.cell[0],B.cell[1])
}this.selection=null;
this.fireEvent("selectionchange",this,null)
}},hasSelection:function(){return this.selection?true:false
},handleMouseDown:function(E,D){var C=this.grid.getView();
if(this.isLocked()){return 
}var B=C.findRowIndex(D);
var A=C.findCellIndex(D);
if(B!==false&&A!==false){this.select(B,A)
}},select:function(A,F,E,D,C){if(this.fireEvent("beforecellselect",this,A,F)!==false){this.clearSelections();
C=C||this.grid.dataSource.getAt(A);
this.selection={record:C,cell:[A,F]};
if(!E){var B=this.grid.getView();
B.onCellSelect(A,F);
if(D!==true){B.focusCell(A,F)
}}this.fireEvent("cellselect",this,A,F);
this.fireEvent("selectionchange",this,this.selection)
}},isSelectable:function(C,B,A){return !A.isHidden(B)
},handleKeyDown:function(H){if(!H.isNavKeyPress()){return 
}var G=this.grid,J=this.selection;
if(!J){H.stopEvent();
var F=G.walkCells(0,0,1,this.isSelectable,this);
if(F){this.select(F[0],F[1])
}return 
}var C=this;
var D=function(M,L,K){return G.walkCells(M,L,K,C.isSelectable,C)
};
var E=H.getKey(),B=J.cell[0],I=J.cell[1];
var A;
switch(E){case H.TAB:if(H.shiftKey){A=D(B,I-1,-1)
}else{A=D(B,I+1,1)
}break;
case H.DOWN:A=D(B+1,I,1);
break;
case H.UP:A=D(B-1,I,-1);
break;
case H.RIGHT:A=D(B,I+1,1);
break;
case H.LEFT:A=D(B,I-1,-1);
break;
case H.ENTER:if(G.isEditor&&!G.editing){G.startEditing(B,I);
H.stopEvent();
return 
}break
}if(A){this.select(A[0],A[1]);
H.stopEvent()
}},acceptsNav:function(C,B,A){return !A.isHidden(B)&&A.isCellEditable(B,C)
},onEditorKey:function(C,F){var B=F.getKey(),E,D=this.grid,A=D.activeEditor;
if(B==F.TAB){if(F.shiftKey){E=D.walkCells(A.row,A.col-1,-1,this.acceptsNav,this)
}else{E=D.walkCells(A.row,A.col+1,1,this.acceptsNav,this)
}F.stopEvent()
}else{if(B==F.ENTER&&!F.ctrlKey){A.completeEdit();
F.stopEvent()
}else{if(B==F.ESC){A.cancelEdit()
}}}if(E){D.startEditing(E[0],E[1])
}}});
Ext.grid.EditorGrid=function(B,A){Ext.grid.EditorGrid.superclass.constructor.call(this,B,A);
this.container.addClass("xedit-grid");
if(!this.selModel){this.selModel=new Ext.grid.CellSelectionModel()
}this.activeEditor=null;
this.addEvents({beforeedit:true,afteredit:true,validateedit:true});
this.on("bodyscroll",this.stopEditing,this);
this.on(this.clicksToEdit==1?"cellclick":"celldblclick",this.onCellDblClick,this)
};
Ext.extend(Ext.grid.EditorGrid,Ext.grid.Grid,{isEditor:true,clicksToEdit:2,trackMouseOver:false,onCellDblClick:function(C,B,A){this.startEditing(B,A)
},onEditComplete:function(C,B,A){this.editing=false;
this.activeEditor=null;
C.un("specialkey",this.selModel.onEditorKey,this.selModel);
if(String(B)!=String(A)){var E=C.record;
var D=this.colModel.getDataIndex(C.col);
var F={grid:this,record:E,field:D,originalValue:A,value:B,row:C.row,column:C.col,cancel:false};
if(this.fireEvent("validateedit",F)!==false&&!F.cancel){E.set(D,F.value);
delete F.cancel;
this.fireEvent("afteredit",F)
}}this.view.focusCell(C.row,C.col)
},startEditing:function(B,A){this.stopEditing();
if(this.colModel.isCellEditable(A,B)){this.view.focusCell(B,A);
var C=this.dataSource.getAt(B);
var E=this.colModel.getDataIndex(A);
var D={grid:this,record:C,field:E,value:C.data[E],row:B,column:A,cancel:false};
if(this.fireEvent("beforeedit",D)!==false&&!D.cancel){this.editing=true;
(function(){var G=this.colModel.getCellEditor(A,B);
G.row=B;
G.col=A;
G.record=C;
G.on("complete",this.onEditComplete,this,{single:true});
G.on("specialkey",this.selModel.onEditorKey,this.selModel);
this.activeEditor=G;
var F=C.data[E];
G.startEdit(this.view.getCell(B,A),F)
}).defer(50,this)
}}},stopEditing:function(){if(this.activeEditor){this.activeEditor.completeEdit()
}this.activeEditor=null
}});
Ext.grid.GridEditor=function(B,A){Ext.grid.GridEditor.superclass.constructor.call(this,B,A);
B.monitorTab=false
};
Ext.extend(Ext.grid.GridEditor,Ext.Editor,{alignment:"tl-tl",autoSize:"width",hideEl:false,cls:"x-small-editor x-grid-editor",shim:false,shadow:"frame"});
Ext.grid.PropertyRecord=Ext.data.Record.create([{name:"name",type:"string"},"value"]);
Ext.grid.PropertyStore=function(B,A){this.grid=B;
this.store=new Ext.data.Store({recordType:Ext.grid.PropertyRecord});
this.store.on("update",this.onUpdate,this);
if(A){this.setSource(A)
}Ext.grid.PropertyStore.superclass.constructor.call(this)
};
Ext.extend(Ext.grid.PropertyStore,Ext.util.Observable,{setSource:function(C){this.source=C;
this.store.removeAll();
var B=[];
for(var A in C){if(this.isEditableValue(C[A])){B.push(new Ext.grid.PropertyRecord({name:A,value:C[A]},A))
}}this.store.loadRecords({records:B},{},true)
},onUpdate:function(E,C,A){if(A==Ext.data.Record.EDIT){var B=C.data.value;
var D=C.modified.value;
if(this.grid.fireEvent("beforepropertychange",this.source,C.id,B,D)!==false){this.source[C.id]=B;
C.commit();
this.grid.fireEvent("propertychange",this.source,C.id,B,D)
}else{C.reject()
}}},getProperty:function(A){return this.store.getAt(A)
},isEditableValue:function(A){if(A&&A instanceof Date){return true
}else{if(typeof A=="object"||typeof A=="function"){return false
}}return true
},setValue:function(B,A){this.source[B]=A;
this.store.getById(B).set("value",A)
},getSource:function(){return this.source
}});
Ext.grid.PropertyColumnModel=function(D,C){this.grid=D;
var A=Ext.grid;
A.PropertyColumnModel.superclass.constructor.call(this,[{header:this.nameText,sortable:true,dataIndex:"name",id:"name"},{header:this.valueText,resizable:false,dataIndex:"value",id:"value"}]);
this.store=C;
this.bselect=Ext.DomHelper.append(document.body,{tag:"select",style:"display:none",cls:"x-grid-editor",children:[{tag:"option",value:"true",html:"true"},{tag:"option",value:"false",html:"false"}]});
Ext.id(this.bselect);
var B=Ext.form;
this.editors={date:new A.GridEditor(new B.DateField({selectOnFocus:true})),string:new A.GridEditor(new B.TextField({selectOnFocus:true})),number:new A.GridEditor(new B.NumberField({selectOnFocus:true,style:"text-align:left;"})),"boolean":new A.GridEditor(new B.Field({el:this.beselect,selectOnFocus:true}))};
this.renderCellDelegate=this.renderCell.createDelegate(this);
this.renderPropDelegate=this.renderProp.createDelegate(this)
};
Ext.extend(Ext.grid.PropertyColumnModel,Ext.grid.ColumnModel,{nameText:"Name",valueText:"Value",dateFormat:"m/j/Y",renderDate:function(A){return A.dateFormat(this.dateFormat)
},renderBool:function(A){return A?"true":"false"
},isCellEditable:function(B,A){return B==1
},getRenderer:function(A){return A==1?this.renderCellDelegate:this.renderPropDelegate
},renderProp:function(A){return this.getPropertyName(A)
},renderCell:function(A){var B=A;
if(A instanceof Date){B=this.renderDate(A)
}else{if(typeof A=="boolean"){B=this.renderBool(A)
}}return Ext.util.Format.htmlEncode(B)
},getPropertyName:function(B){var A=this.grid.propertyNames;
return A&&A[B]?A[B]:B
},getCellEditor:function(B,A){var C=this.store.getProperty(A);
var E=C.data.name,D=C.data.value;
if(this.grid.customEditors[E]){return this.grid.customEditors[E]
}if(D instanceof Date){return this.editors.date
}else{if(typeof D=="number"){return this.editors.number
}else{if(typeof D=="boolean"){return this.editors["boolean"]
}else{return this.editors.string
}}}}});
Ext.grid.PropertyGrid=function(D,C){C=C||{};
var B=new Ext.grid.PropertyStore(this);
this.store=B;
var A=new Ext.grid.PropertyColumnModel(this,B);
B.store.sort("name","ASC");
Ext.grid.PropertyGrid.superclass.constructor.call(this,D,Ext.apply({ds:B.store,cm:A,enableColLock:false,enableColumnMove:false,stripeRows:false,trackMouseOver:false,clicksToEdit:1},C));
this.container.addClass("x-props-grid");
this.lastEditRow=null;
this.on("columnresize",this.onColumnResize,this);
this.addEvents({beforepropertychange:true,propertychange:true});
this.customEditors=this.customEditors||{}
};
Ext.extend(Ext.grid.PropertyGrid,Ext.grid.EditorGrid,{render:function(){Ext.grid.PropertyGrid.superclass.render.call(this);
this.autoSize.defer(100,this)
},autoSize:function(){Ext.grid.PropertyGrid.superclass.autoSize.call(this);
if(this.view){this.view.fitColumns()
}},onColumnResize:function(){this.colModel.setColumnWidth(1,this.container.getWidth(true)-this.colModel.getColumnWidth(0));
this.autoSize()
},setSource:function(A){this.store.setSource(A)
},getSource:function(){return this.store.getSource()
}});
Ext.LoadMask=function(B,C){this.el=Ext.get(B);
Ext.apply(this,C);
if(this.store){this.store.on("beforeload",this.onBeforeLoad,this);
this.store.on("load",this.onLoad,this);
this.store.on("loadexception",this.onLoad,this);
this.removeMask=false
}else{var A=this.el.getUpdateManager();
A.showLoadIndicator=false;
A.on("beforeupdate",this.onBeforeLoad,this);
A.on("update",this.onLoad,this);
A.on("failure",this.onLoad,this);
this.removeMask=true
}};
Ext.LoadMask.prototype={msg:"Loading...",msgCls:"x-mask-loading",disabled:false,disable:function(){this.disabled=true
},enable:function(){this.disabled=false
},onLoad:function(){this.el.unmask(this.removeMask)
},onBeforeLoad:function(){if(!this.disabled){this.el.mask(this.msg,this.msgCls)
}},destroy:function(){if(this.store){this.store.un("beforeload",this.onBeforeLoad,this);
this.store.un("load",this.onLoad,this);
this.store.un("loadexception",this.onLoad,this)
}else{var A=this.el.getUpdateManager();
A.un("beforeupdate",this.onBeforeLoad,this);
A.un("update",this.onLoad,this);
A.un("failure",this.onLoad,this)
}}};
Ext.debug={init:function(){var CP=Ext.ContentPanel;
var bd=Ext.get(document.body);
var _3=new Ext.LayoutDialog("x-debug-browser",{autoCreate:true,width:800,height:450,title:"Ext Debug Console &amp; Inspector",proxyDrag:true,shadow:true,center:{alwaysShowTabs:true},constraintoviewport:false});
_3.el.swallowEvent("click");
var _4=_3.getLayout();
_4.beginUpdate();
var _5=_4.add("center",new Ext.debug.InnerLayout("x-debug-console",400,{title:"Debug Console"}));
var _6=_4.add("center",new Ext.debug.InnerLayout("x-debug-inspector",250,{title:"DOM Inspector"}));
var _7=_5.add("east",new CP({autoCreate:{tag:"div",children:[{tag:"div"},{tag:"textarea"}]},fitContainer:true,fitToFrame:true,title:"Script Console",autoScroll:Ext.isGecko,setSize:function(w,h){Ext.ContentPanel.prototype.setSize.call(this,w,h);
if(Ext.isGecko&&Ext.isStrict){var s=this.adjustForComponents(w,h);
this.resizeEl.setSize(s.width-2,s.height-2)
}}}));
var _b=_7.el;
var _c=_b.child("textarea");
_7.resizeEl=_c;
var _d=_7.toolbar=new Ext.Toolbar(_b.child("div"));
_d.add({text:"Run",handler:function(){var s=_c.dom.value;
if(_f.checked){try{var rt=eval(s);
Ext.debug.dump(rt===undefined?"(no return)":rt)
}catch(e){Ext.debug.log(e.message||e.descript)
}}else{var rt=eval(s);
Ext.debug.dump(rt===undefined?"(no return)":rt)
}}},{text:"Clear",handler:function(){_c.dom.value="";
_c.dom.focus()
}});
var _f=Ext.DomHelper.append(_d.el,{tag:"input",type:"checkbox",checked:"checked"});
_f.checked=true;
_d.add("-",_f,"Trap Errors");
var _11=new Ext.grid.PropertyGrid(bd.createChild(),{nameText:"Style",enableCtxMenu:false,enableColumnResize:false});
var _12=_6.add("east",new Ext.GridPanel(_11,{title:"(No element selected)"}));
_11.render();
_11.getView().mainHd.setDisplayed(false);
_5.tbar.add({text:"Clear",handler:function(){Ext.debug.console.jsonData=[];
Ext.debug.console.refresh()
}});
var _13=_6.main.getEl();
var tb=_6.tbar;
var _15,_16;
function inspectListener(e,t){if(!_15.contains(e.getPoint())){findNode(t)
}}function stopInspecting(e,t){if(!_15.contains(e.getPoint())){_1b.toggle(false);
if(findNode(t)!==false){e.stopEvent()
}}}function stopInspectingEsc(e,t){if(e.getKey()==e.ESC){_1b.toggle(false)
}}var _1b=tb.addButton({text:"Inspect",enableToggle:true,pressed:false,toggleHandler:function(n,_1f){var d=Ext.get(document);
if(_1f){d.on("mouseover",inspectListener,window,{buffer:50});
d.on("mousedown",stopInspecting);
d.on("keydown",stopInspectingEsc);
_15=_3.el.getRegion();
_16=true
}else{d.un("mouseover",inspectListener);
d.un("mousedown",stopInspecting);
d.on("keydown",stopInspectingEsc);
_16=false;
var n=_21.getSelectionModel().getSelectedNode();
if(n&&n.htmlNode){onNodeSelect(_21,n,false)
}}}});
tb.addSeparator();
var _22=tb.addButton({text:"Highlight Selection",enableToggle:true,pressed:false,toggleHandler:function(n,_24){var n=_21.getSelectionModel().getSelectedNode();
if(n&&n.htmlNode){n[_24?"frame":"unframe"]()
}}});
tb.addSeparator();
var _25=tb.addButton({text:"Refresh Children",disabled:true,handler:function(){var n=_21.getSelectionModel().getSelectedNode();
if(n&&n.reload){n.reload()
}}});
tb.add("-",{text:"Collapse All",handler:function(){_21.root.collapse(true)
}});
_4.endUpdate();
_4.getRegion("center").showPanel(0);
_11.on("propertychange",function(s,_28,_29){var _2a=_11.treeNode;
if(_2b){_2a.htmlNode.style[_28]=_29
}else{_2a.htmlNode[_28]=_29
}_2a.refresh(true)
});
var stb=new Ext.Toolbar(_11.view.getHeaderPanel(true));
var _2d=stb.addButton({text:"DOM Attributes",menu:{items:[new Ext.menu.CheckItem({id:"dom",text:"DOM Attributes",checked:true,group:"xdb-styles"}),new Ext.menu.CheckItem({id:"styles",text:"CSS Properties",group:"xdb-styles"})]}});
_2d.menu.on("click",function(){_2b=_2d.menu.items.get("styles").checked;
_2e[_2b?"show":"hide"]();
_2d.setText(_2b?"CSS Properties":"DOM Attributes");
var n=_21.getSelectionModel().getSelectedNode();
if(n){onNodeSelect(_21,n)
}});
var _30=stb.addButton({text:"Add",disabled:true,handler:function(){Ext.MessageBox.prompt("Add Property","Property Name:",function(btn,v){var _33=_11.store.store;
if(btn=="ok"&&v&&!_33.getById(v)){var r=new Ext.grid.PropertyRecord({name:v,value:""},v);
_33.add(r);
_11.startEditing(_33.getCount()-1,1)
}})
}});
var _2e=stb.addButton({text:"Computed Styles",hidden:true,pressed:false,enableToggle:true,toggleHandler:function(){var n=_21.getSelectionModel().getSelectedNode();
if(n){onNodeSelect(_21,n)
}}});
var _2b=false,_36;
var _37=/^\s*$/;
var _38=Ext.util.Format.htmlEncode;
var _39=Ext.util.Format.ellipsis;
var _3a=/\s?([a-z\-]*)\:([^;]*)(?:[;\s\n\r]*)/gi;
function findNode(n){if(!n||n.nodeType!=1||n==document.body||n==document){return false
}var pn=[n],p=n;
while((p=p.parentNode)&&p.nodeType==1&&p.tagName.toUpperCase()!="HTML"){pn.unshift(p)
}var cn=_36;
for(var i=0,len=pn.length;
i<len;
i++){cn.expand();
cn=cn.findChild("htmlNode",pn[i]);
if(!cn){return false
}}cn.select();
var a=cn.ui.anchor;
_13.dom.scrollTop=Math.max(0,a.offsetTop-10);
cn.highlight();
return true
}function nodeTitle(n){var s=n.tagName;
if(n.id){s+="#"+n.id
}else{if(n.className){s+="."+n.className
}}return s
}function onNodeSelect(t,n,_46){if(_46&&_46.unframe){_46.unframe()
}var _47={};
if(n&&n.htmlNode){if(_22.pressed){n.frame()
}if(_16){return 
}_30.enable();
_25.setDisabled(n.leaf);
var dom=n.htmlNode;
_12.setTitle(nodeTitle(dom));
if(_2b&&!_2e.pressed){var s=dom.style?dom.style.cssText:"";
if(s){var m;
while((m=_3a.exec(s))!=null){_47[m[1].toLowerCase()]=m[2]
}}}else{if(_2b){var cl=Ext.debug.cssList;
var s=dom.style,fly=Ext.fly(dom);
if(s){for(var i=0,len=cl.length;
i<len;
i++){var st=cl[i];
var v=s[st]||fly.getStyle(st);
if(v!=undefined&&v!==null&&v!==""){_47[st]=v
}}}}else{for(var a in dom){var v=dom[a];
if((isNaN(a+10))&&v!=undefined&&v!==null&&v!==""&&!(Ext.isGecko&&a[0]==a[0].toUpperCase())){_47[a]=v
}}}}}else{if(_16){return 
}_30.disable();
_25.disabled()
}_11.setSource(_47);
_11.treeNode=n;
_11.view.fitColumns()
}var _52="^(?:";
var eds=_11.colModel.editors;
for(var _54 in eds){_52+=eds[_54].id+"|"
}Ext.each([_3.shim?_3.shim.id:"noshim",_3.proxyDrag.id],function(id){_52+=id+"|"
});
_52+=_3.el.id;
_52+=")$";
var _56=new RegExp(_52);
var _57=new Ext.tree.TreeLoader();
_57.load=function(n,cb){var _5a=n.htmlNode==bd.dom;
var cn=n.htmlNode.childNodes;
for(var i=0,c;
c=cn[i];
i++){if(_5a&&_56.test(c.id)){continue
}if(c.nodeType==1){n.appendChild(new Ext.debug.HtmlNode(c))
}else{if(c.nodeType==3&&!_37.test(c.nodeValue)){n.appendChild(new Ext.tree.TreeNode({text:"<em>"+_39(_38(String(c.nodeValue)),35)+"</em>",cls:"x-tree-noicon"}))
}}}cb()
};
var _21=new Ext.tree.TreePanel(_13,{enableDD:false,loader:_57,lines:false,rootVisible:false,animate:false,hlColor:"ffff9c"});
_21.getSelectionModel().on("selectionchange",onNodeSelect,null,{buffer:250});
var _5e=_21.setRootNode(new Ext.tree.TreeNode("Ext"));
_36=_5e.appendChild(new Ext.debug.HtmlNode(document.getElementsByTagName("html")[0]));
_21.render();
Ext.debug.console=new Ext.JsonView(_5.main.getEl(),"<pre><xmp>> {msg}</xmp></pre>");
Ext.debug.console.jsonData=[];
Ext.debug.dialog=_3
},show:function(){var A=Ext.debug;
if(!A.dialog){A.init()
}if(!A.dialog.isVisible()){A.dialog.show()
}},hide:function(){if(Ext.debug.dialog){Ext.debug.dialog.hide()
}},log:function(F,E,C){Ext.debug.show();
var B="";
for(var D=0,A=arguments.length;
D<A;
D++){B+=(D==0?"":", ")+arguments[D]
}var G=Ext.debug.console;
G.jsonData.unshift({msg:B});
G.refresh()
},logf:function(C,B,A,D){Ext.debug.log(String.format.apply(String,arguments))
},dump:function(D){if(typeof D=="string"||typeof D=="number"||typeof D=="undefined"||D instanceof Date){Ext.debug.log(D)
}else{if(!D){Ext.debug.log("null")
}else{if(typeof D!="object"){Ext.debug.log("Unknown return type")
}else{if(D instanceof Array){Ext.debug.log("["+D.join(",")+"]")
}else{var A=["{\n"];
for(var B in D){var E=typeof D[B];
if(E!="function"&&E!="object"){A.push(String.format("  {0}: {1},\n",B,D[B]))
}}var C=A.join("");
if(C.length>3){C=C.substr(0,C.length-2)
}Ext.debug.log(C+"\n}")
}}}}},_timers:{},time:function(A){A=A||"def";
Ext._timers[A]=new Date().getTime()
},timeEnd:function(D,C){var B=new Date().getTime();
D=D||"def";
var A=String.format("{0} ms",B-Ext._timers[D]);
Ext._timers[D]=new Date().getTime();
if(C!==false){Ext.debug.log("Timer "+(D=="def"?A:D+": "+A))
}return A
}};
Ext.debug.HtmlNode=function(){var E=Ext.util.Format.htmlEncode;
var C=Ext.util.Format.ellipsis;
var B=/^\s*$/;
var A=[{n:"id",v:"id"},{n:"className",v:"class"},{n:"name",v:"name"},{n:"type",v:"type"},{n:"src",v:"src"},{n:"href",v:"href"}];
function F(J){for(var H=0,I;
I=J.childNodes[H];
H++){if(I.nodeType==1){return true
}}return false
}function D(I,H){var P=I.tagName.toLowerCase();
var O="&lt;"+P;
for(var J=0,K=A.length;
J<K;
J++){var L=A[J];
var M=I[L.n];
if(M&&!B.test(M)){O+=" "+L.v+"=&quot;<i>"+E(M)+"</i>&quot;"
}}var N=I.style?I.style.cssText:"";
if(N){O+=" style=&quot;<i>"+E(N.toLowerCase())+"</i>&quot;"
}if(H&&I.childNodes.length>0){O+="&gt;<em>"+C(E(String(I.innerHTML)),35)+"</em>&lt;/"+P+"&gt;"
}else{if(H){O+=" /&gt;"
}else{O+="&gt;"
}}return O
}var G=function(J){var I=!F(J);
this.htmlNode=J;
this.tagName=J.tagName.toLowerCase();
var H={text:D(J,I),leaf:I,cls:"x-tree-noicon"};
G.superclass.constructor.call(this,H);
this.attributes.htmlNode=J;
if(!I){this.on("expand",this.onExpand,this);
this.on("collapse",this.onCollapse,this)
}};
Ext.extend(G,Ext.tree.AsyncTreeNode,{cls:"x-tree-noicon",preventHScroll:true,refresh:function(H){var I=!F(this.htmlNode);
this.setText(D(this.htmlNode,I));
if(H){Ext.fly(this.ui.textNode).highlight()
}},onExpand:function(){if(!this.closeNode&&this.parentNode){this.closeNode=this.parentNode.insertBefore(new Ext.tree.TreeNode({text:"&lt;/"+this.tagName+"&gt;",cls:"x-tree-noicon"}),this.nextSibling)
}else{if(this.closeNode){this.closeNode.ui.show()
}}},onCollapse:function(){if(this.closeNode){this.closeNode.ui.hide()
}},render:function(H){G.superclass.render.call(this,H)
},highlightNode:function(){},highlight:function(){},frame:function(){this.htmlNode.style.border="1px solid #0000ff"
},unframe:function(){this.htmlNode.style.border=""
}});
return G
}();
Ext.debug.InnerLayout=function(G,B,A){var F=Ext.DomHelper.append(document.body,{id:G});
var E=new Ext.BorderLayout(F,{north:{initialSize:28},center:{titlebar:false},east:{split:true,initialSize:B,titlebar:true}});
Ext.debug.InnerLayout.superclass.constructor.call(this,E,A);
E.beginUpdate();
var D=E.add("north",new Ext.ContentPanel({autoCreate:true,fitToFrame:true}));
this.main=E.add("center",new Ext.ContentPanel({autoCreate:true,fitToFrame:true,autoScroll:true}));
this.tbar=new Ext.Toolbar(D.el);
var C=D.resizeEl=D.el.child("div.x-toolbar");
C.setStyle("border-bottom","0 none");
E.endUpdate(true)
};
Ext.extend(Ext.debug.InnerLayout,Ext.NestedLayoutPanel,{add:function(){return this.layout.add.apply(this.layout,arguments)
}});
Ext.debug.cssList=["background-color","border","border-color","border-spacing","border-style","border-top","border-right","border-bottom","border-left","border-top-color","border-right-color","border-bottom-color","border-left-color","border-top-width","border-right-width","border-bottom-width","border-left-width","border-width","bottom","color","font-size","font-size-adjust","font-stretch","font-style","height","left","letter-spacing","line-height","margin","margin-top","margin-right","margin-bottom","margin-left","marker-offset","max-height","max-width","min-height","min-width","orphans","outline","outline-color","outline-style","outline-width","overflow","padding","padding-top","padding-right","padding-bottom","padding-left","quotes","right","size","text-indent","top","width","word-spacing","z-index","opacity","outline-offset"];
if(typeof console=="undefined"){console=Ext.debug
}Ext.EventManager.on(window,"load",function(){Ext.get(document).on("keydown",function(A){if(A.ctrlKey&&A.shiftKey&&A.getKey()==A.HOME){Ext.debug.show()
}})
});
Ext.print=Ext.log=Ext.debug.log;
Ext.printf=Ext.logf=Ext.debug.logf;
Ext.dump=Ext.debug.dump;
Ext.timer=Ext.debug.time;
Ext.timerEnd=Ext.debug.timeEnd;
