﻿Ext.DomHelper=function(){var D=null,G=/^(?:br|frame|hr|img|input|link|meta|range|spacer|wbr|area|param|col)$/i,I=/^table|tbody|tr|td$/i,A,J="afterbegin",K="afterend",O="beforebegin",L="beforeend",M="<table>",E="</table>",N=M+"<tbody>",F="</tbody>"+E,H=N+"<tr>",C="</tr>"+F;
function R(Y,T,S,U,X,V){var W=A.insertHtml(U,Ext.getDom(Y),B(T));return S?Ext.get(W,true):W;
}function B(T){var X="",W,S,Y,V,U;if(typeof T=="string"){X=T;}else{if(Ext.isArray(T)){Ext.each(T,function(Z){X+=B(Z);
});}else{X+="<"+(T.tag=T.tag||"div");Ext.iterate(T,function(Z,a){if(!/tag|children|cn|html$/i.test(Z)){if(Ext.isObject(a)){X+=" "+Z+"='";
Ext.iterate(a,function(c,b){X+=c+":"+b+";";});X+="'";}else{X+=" "+({cls:"class",htmlFor:"for"}[Z]||Z)+"='"+a+"'";
}}});if(G.test(T.tag)){X+="/>";}else{X+=">";if((U=T.children||T.cn)){X+=B(U);}else{if(T.html){X+=T.html;
}}X+="</"+T.tag+">";}}}return X;}function Q(T,X,W,S){D.innerHTML=[X,W,S].join("");
var U=-1,V=D;while(++U<T){V=V.firstChild;}return V;}function P(U,V,X,W){var S,T;D=D||document.createElement("div");
if(U=="td"&&(V==J||V==L)||!/td|tr|tbody/i.test(U)&&(V==O||V==K)){return;}T=V==O?X:V==K?X.nextSibling:V==J?X.firstChild:null;
if(V==O||V==K){X=X.parentNode;}if(U=="td"||(U=="tr"&&(V==L||V==J))){S=Q(4,H,W,C);
}else{if((U=="tbody"&&(V==L||V==J))||(U=="tr"&&(V==O||V==K))){S=Q(3,N,W,F);}else{S=Q(2,M,W,E);
}}X.insertBefore(S,T);return S;}A={markup:function(S){return B(S);},insertHtml:function(U,Y,V){var T={},a,X,W,Z,b,S;
U=U.toLowerCase();T[O]=["BeforeBegin","previousSibling"];T[K]=["AfterEnd","nextSibling"];
if(Y.insertAdjacentHTML){if(I.test(Y.tagName)&&(S=P(Y.tagName.toLowerCase(),U,Y,V))){return S;
}T[J]=["AfterBegin","firstChild"];T[L]=["BeforeEnd","lastChild"];if((a=T[U])){Y.insertAdjacentHTML(a[0],V);
return Y[a[1]];}}else{W=Y.ownerDocument.createRange();X="setStart"+(/end/i.test(U)?"After":"Before");
if(T[U]){W[X](Y);Z=W.createContextualFragment(V);Y.parentNode.insertBefore(Z,U==O?Y:Y.nextSibling);
return Y[(U==O?"previous":"next")+"Sibling"];}else{b=(U==J?"first":"last")+"Child";
if(Y.firstChild){W[X](Y[b]);Z=W.createContextualFragment(V);if(U==J){Y.insertBefore(Z,Y.firstChild);
}else{Y.appendChild(Z);}}else{Y.innerHTML=V;}return Y[b];}}throw'Illegal insertion point -> "'+U+'"';
},insertBefore:function(S,U,T){return R(S,U,T,O);},insertAfter:function(S,U,T){return R(S,U,T,K,"nextSibling");
},insertFirst:function(S,U,T){return R(S,U,T,J,"firstChild");},append:function(S,U,T){return R(S,U,T,L,"",true);
},overwrite:function(S,U,T){S=Ext.getDom(S);S.innerHTML=B(U);return T?Ext.get(S.firstChild):S.firstChild;
},createHtml:B};return A;}();Ext.apply(Ext.DomHelper,function(){var E,B="afterbegin",G="afterend",A="beforebegin",D="beforeend";
function F(K,M,L,N,J,H){K=Ext.getDom(K);var I;if(E.useDom){I=C(M,null);if(H){K.appendChild(I);
}else{(J=="firstChild"?K:K.parentNode).insertBefore(I,K[J]||K);}}else{I=Ext.DomHelper.insertHtml(N,K,Ext.DomHelper.createHtml(M));
}return L?Ext.get(I,true):I;}function C(N,I){var K,L=document,J,H,M,O;if(Ext.isArray(N)){K=L.createDocumentFragment();
Ext.each(N,function(P){C(P,K);});}else{if(Ext.isString(N)){K=L.createTextNode(N);
}else{K=L.createElement(N.tag||"div");J=!!K.setAttribute;Ext.iterate(N,function(Q,P){if(!/tag|children|cn|html|style/.test(Q)){if(Q=="cls"){K.className=P;
}else{if(J){K.setAttribute(Q,P);}else{K[Q]=P;}}}});E.applyStyles(K,N.style);if((O=N.children||N.cn)){C(O,K);
}else{if(N.html){K.innerHTML=N.html;}}}}if(I){I.appendChild(K);}return K;}E={createTemplate:function(I){var H=Ext.DomHelper.createHtml(I);
return new Ext.Template(H);},useDom:false,applyStyles:function(K,L){if(L){var I=0,H,J;
K=Ext.fly(K);if(Ext.isFunction(L)){L=L.call();}if(Ext.isString(L)){L=L.trim().split(/\s*(?::|;)\s*/);
for(H=L.length;I<H;){K.setStyle(L[I++],L[I++]);}}else{if(Ext.isObject(L)){K.setStyle(L);
}}}},insertBefore:function(H,J,I){return F(H,J,I,A);},insertAfter:function(H,J,I){return F(H,J,I,G,"nextSibling");
},insertFirst:function(H,J,I){return F(H,J,I,B,"firstChild");},append:function(H,J,I){return F(H,J,I,D,"",true);
},createDom:C};return E;}());Ext.Template=function(C){var D=this,A=arguments,B=[];
if(Ext.isArray(C)){C=C.join("");}else{if(A.length>1){Ext.each(A,function(E){if(Ext.isObject(E)){Ext.apply(D,E);
}else{B.push(E);}});C=B.join("");}}D.html=C;if(D.compiled){D.compile();}};Ext.Template.prototype={applyTemplate:function(A){var B=this;
return B.compiled?B.compiled(A):B.html.replace(B.re,function(D,C){return A[C]!==undefined?A[C]:"";
});},set:function(A,C){var B=this;B.html=A;B.compiled=null;return C?B.compile():B;
},re:/\{([\w-]+)\}/g,compile:function(){var me=this,sep=Ext.isGecko?"+":",";function fn(m,name){name="values['"+name+"']";
return"'"+sep+"("+name+" == undefined ? '' : "+name+")"+sep+"'";}eval("this.compiled = function(values){ return "+(Ext.isGecko?"'":"['")+me.html.replace(/\\/g,"\\\\").replace(/(\r\n|\n)/g,"\\n").replace(/'/g,"\\'").replace(this.re,fn)+(Ext.isGecko?"';};":"'].join('');};"));
return me;},insertFirst:function(B,A,C){return this.doInsert("afterBegin",B,A,C);
},insertBefore:function(B,A,C){return this.doInsert("beforeBegin",B,A,C);},insertAfter:function(B,A,C){return this.doInsert("afterEnd",B,A,C);
},append:function(B,A,C){return this.doInsert("beforeEnd",B,A,C);},doInsert:function(C,E,B,A){E=Ext.getDom(E);
var D=Ext.DomHelper.insertHtml(C,E,this.applyTemplate(B));return A?Ext.get(D,true):D;
},overwrite:function(B,A,C){B=Ext.getDom(B);B.innerHTML=this.applyTemplate(A);return C?Ext.get(B.firstChild,true):B.firstChild;
}};Ext.Template.prototype.apply=Ext.Template.prototype.applyTemplate;Ext.Template.from=function(B,A){B=Ext.getDom(B);
return new Ext.Template(B.value||B.innerHTML,A||"");};Ext.apply(Ext.Template.prototype,{applyTemplate:function(B){var F=this,A=F.disableFormats!==true,E=Ext.util.Format,C=F;
if(F.compiled){return F.compiled(B);}function D(H,J,M,I){if(M&&A){if(M.substr(0,5)=="this."){return C.call(M.substr(5),B[J],B);
}else{if(I){var L=/^\s*['"](.*)["']\s*$/;I=I.split(",");for(var K=0,G=I.length;K<G;
K++){I[K]=I[K].replace(L,"$1");}I=[B[J]].concat(I);}else{I=[B[J]];}return E[M].apply(E,I);
}}else{return B[J]!==undefined?B[J]:"";}}return F.html.replace(F.re,D);},disableFormats:false,re:/\{([\w-]+)(?:\:([\w\.]*)(?:\((.*?)?\))?)?\}/g,compile:function(){var me=this,fm=Ext.util.Format,useF=me.disableFormats!==true,sep=Ext.isGecko?"+":",",body;
function fn(m,name,format,args){if(format&&useF){args=args?","+args:"";if(format.substr(0,5)!="this."){format="fm."+format+"(";
}else{format='this.call("'+format.substr(5)+'", ';args=", values";}}else{args="";
format="(values['"+name+"'] == undefined ? '' : ";}return"'"+sep+format+"values['"+name+"']"+args+")"+sep+"'";
}if(Ext.isGecko){body="this.compiled = function(values){ return '"+me.html.replace(/\\/g,"\\\\").replace(/(\r\n|\n)/g,"\\n").replace(/'/g,"\\'").replace(this.re,fn)+"';};";
}else{body=["this.compiled = function(values){ return ['"];body.push(me.html.replace(/\\/g,"\\\\").replace(/(\r\n|\n)/g,"\\n").replace(/'/g,"\\'").replace(this.re,fn));
body.push("'].join('');};");body=body.join("");}eval(body);return me;},call:function(C,B,A){return this[C](B,A);
}});Ext.Template.prototype.apply=Ext.Template.prototype.applyTemplate;Ext.DomQuery=function(){var cache={},simpleCache={},valueCache={},nonSpace=/\S/,trimRe=/^\s+|\s+$/g,tplRe=/\{(\d+)\}/g,modeRe=/^(\s?[\/>+~]\s?|\s|$)/,tagTokenRe=/^(#)?([\w-\*]+)/,nthRe=/(\d*)n\+?(\d*)/,nthRe2=/\D/,isIE=window.ActiveXObject?true:false,isOpera=Ext.isOpera,key=30803;
eval("var batch = 30803;");function child(p,index){var i=0,n=p.firstChild;while(n){if(n.nodeType==1){if(++i==index){return n;
}}n=n.nextSibling;}return null;}function next(n){while((n=n.nextSibling)&&n.nodeType!=1){}return n;
}function prev(n){while((n=n.previousSibling)&&n.nodeType!=1){}return n;}function children(d){var n=d.firstChild,ni=-1,nx;
while(n){nx=n.nextSibling;if(n.nodeType==3&&!nonSpace.test(n.nodeValue)){d.removeChild(n);
}else{n.nodeIndex=++ni;}n=nx;}return this;}function byClassName(c,a,v){if(!v){return c;
}var r=[],ri=-1,cn;for(var i=0,ci;ci=c[i];i++){if((" "+ci.className+" ").indexOf(v)!=-1){r[++ri]=ci;
}}return r;}function attrValue(n,attr){if(!n.tagName&&typeof n.length!="undefined"){n=n[0];
}if(!n){return null;}if(attr=="for"){return n.htmlFor;}if(attr=="class"||attr=="className"){return n.className;
}return n.getAttribute(attr)||n[attr];}function getNodes(ns,mode,tagName){var result=[],ri=-1,cs;
if(!ns){return result;}tagName=tagName||"*";if(typeof ns.getElementsByTagName!="undefined"){ns=[ns];
}if(!mode){for(var i=0,ni;ni=ns[i];i++){cs=ni.getElementsByTagName(tagName);for(var j=0,ci;
ci=cs[j];j++){result[++ri]=ci;}}}else{if(mode=="/"||mode==">"){var utag=tagName.toUpperCase();
for(var i=0,ni,cn;ni=ns[i];i++){cn=isOpera?ni.childNodes:(ni.children||ni.childNodes);
for(var j=0,cj;cj=cn[j];j++){if(cj.nodeName==utag||cj.nodeName==tagName||tagName=="*"){result[++ri]=cj;
}}}}else{if(mode=="+"){var utag=tagName.toUpperCase();for(var i=0,n;n=ns[i];i++){while((n=n.nextSibling)&&n.nodeType!=1){}if(n&&(n.nodeName==utag||n.nodeName==tagName||tagName=="*")){result[++ri]=n;
}}}else{if(mode=="~"){var utag=tagName.toUpperCase();for(var i=0,n;n=ns[i];i++){while((n=n.nextSibling)){if(n.nodeName==utag||n.nodeName==tagName||tagName=="*"){result[++ri]=n;
}}}}}}}return result;}function concat(a,b){if(b.slice){return a.concat(b);}for(var i=0,l=b.length;
i<l;i++){a[a.length]=b[i];}return a;}function byTag(cs,tagName){if(cs.tagName||cs==document){cs=[cs];
}if(!tagName){return cs;}var r=[],ri=-1;tagName=tagName.toLowerCase();for(var i=0,ci;
ci=cs[i];i++){if(ci.nodeType==1&&ci.tagName.toLowerCase()==tagName){r[++ri]=ci;}}return r;
}function byId(cs,attr,id){if(cs.tagName||cs==document){cs=[cs];}if(!id){return cs;
}var r=[],ri=-1;for(var i=0,ci;ci=cs[i];i++){if(ci&&ci.id==id){r[++ri]=ci;return r;
}}return r;}function byAttribute(cs,attr,value,op,custom){var r=[],ri=-1,st=custom=="{",f=Ext.DomQuery.operators[op];
for(var i=0,ci;ci=cs[i];i++){if(ci.nodeType!=1){continue;}var a;if(st){a=Ext.DomQuery.getStyle(ci,attr);
}else{if(attr=="class"||attr=="className"){a=ci.className;}else{if(attr=="for"){a=ci.htmlFor;
}else{if(attr=="href"){a=ci.getAttribute("href",2);}else{a=ci.getAttribute(attr);
}}}}if((f&&f(a,value))||(!f&&a)){r[++ri]=ci;}}return r;}function byPseudo(cs,name,value){return Ext.DomQuery.pseudos[name](cs,value);
}function nodupIEXml(cs){var d=++key,r;cs[0].setAttribute("_nodup",d);r=[cs[0]];for(var i=1,len=cs.length;
i<len;i++){var c=cs[i];if(!c.getAttribute("_nodup")!=d){c.setAttribute("_nodup",d);
r[r.length]=c;}}for(var i=0,len=cs.length;i<len;i++){cs[i].removeAttribute("_nodup");
}return r;}function nodup(cs){if(!cs){return[];}var len=cs.length,c,i,r=cs,cj,ri=-1;
if(!len||typeof cs.nodeType!="undefined"||len==1){return cs;}if(isIE&&typeof cs[0].selectSingleNode!="undefined"){return nodupIEXml(cs);
}var d=++key;cs[0]._nodup=d;for(i=1;c=cs[i];i++){if(c._nodup!=d){c._nodup=d;}else{r=[];
for(var j=0;j<i;j++){r[++ri]=cs[j];}for(j=i+1;cj=cs[j];j++){if(cj._nodup!=d){cj._nodup=d;
r[++ri]=cj;}}return r;}}return r;}function quickDiffIEXml(c1,c2){var d=++key,r=[];
for(var i=0,len=c1.length;i<len;i++){c1[i].setAttribute("_qdiff",d);}for(var i=0,len=c2.length;
i<len;i++){if(c2[i].getAttribute("_qdiff")!=d){r[r.length]=c2[i];}}for(var i=0,len=c1.length;
i<len;i++){c1[i].removeAttribute("_qdiff");}return r;}function quickDiff(c1,c2){var len1=c1.length,d=++key,r=[];
if(!len1){return c2;}if(isIE&&c1[0].selectSingleNode){return quickDiffIEXml(c1,c2);
}for(var i=0;i<len1;i++){c1[i]._qdiff=d;}for(var i=0,len=c2.length;i<len;i++){if(c2[i]._qdiff!=d){r[r.length]=c2[i];
}}return r;}function quickId(ns,mode,root,id){if(ns==root){var d=root.ownerDocument||root;
return d.getElementById(id);}ns=getNodes(ns,mode,"*");return byId(ns,null,id);}return{getStyle:function(el,name){return Ext.fly(el).getStyle(name);
},compile:function(path,type){type=type||"select";var fn=["var f = function(root){\n var mode; ++batch; var n = root || document;\n"],q=path,mode,lq,tk=Ext.DomQuery.matchers,tklen=tk.length,mm,lmode=q.match(modeRe);
if(lmode&&lmode[1]){fn[fn.length]='mode="'+lmode[1].replace(trimRe,"")+'";';q=q.replace(lmode[1],"");
}while(path.substr(0,1)=="/"){path=path.substr(1);}while(q&&lq!=q){lq=q;var tm=q.match(tagTokenRe);
if(type=="select"){if(tm){if(tm[1]=="#"){fn[fn.length]='n = quickId(n, mode, root, "'+tm[2]+'");';
}else{fn[fn.length]='n = getNodes(n, mode, "'+tm[2]+'");';}q=q.replace(tm[0],"");
}else{if(q.substr(0,1)!="@"){fn[fn.length]='n = getNodes(n, mode, "*");';}}}else{if(tm){if(tm[1]=="#"){fn[fn.length]='n = byId(n, null, "'+tm[2]+'");';
}else{fn[fn.length]='n = byTag(n, "'+tm[2]+'");';}q=q.replace(tm[0],"");}}while(!(mm=q.match(modeRe))){var matched=false;
for(var j=0;j<tklen;j++){var t=tk[j];var m=q.match(t.re);if(m){fn[fn.length]=t.select.replace(tplRe,function(x,i){return m[i];
});q=q.replace(m[0],"");matched=true;break;}}if(!matched){throw'Error parsing selector, parsing failed at "'+q+'"';
}}if(mm[1]){fn[fn.length]='mode="'+mm[1].replace(trimRe,"")+'";';q=q.replace(mm[1],"");
}}fn[fn.length]="return nodup(n);\n}";eval(fn.join(""));return f;},select:function(path,root,type){if(!root||root==document){root=document;
}if(typeof root=="string"){root=document.getElementById(root);}var paths=path.split(","),results=[];
for(var i=0,len=paths.length;i<len;i++){var p=paths[i].replace(trimRe,"");if(!cache[p]){cache[p]=Ext.DomQuery.compile(p);
if(!cache[p]){throw p+" is not a valid selector";}}var result=cache[p](root);if(result&&result!=document){results=results.concat(result);
}}if(paths.length>1){return nodup(results);}return results;},selectNode:function(path,root){return Ext.DomQuery.select(path,root)[0];
},selectValue:function(path,root,defaultValue){path=path.replace(trimRe,"");if(!valueCache[path]){valueCache[path]=Ext.DomQuery.compile(path,"select");
}var n=valueCache[path](root),v;n=n[0]?n[0]:n;v=(n&&n.firstChild?n.firstChild.nodeValue:null);
return((v===null||v===undefined||v==="")?defaultValue:v);},selectNumber:function(path,root,defaultValue){var v=Ext.DomQuery.selectValue(path,root,defaultValue||0);
return parseFloat(v);},is:function(el,ss){if(typeof el=="string"){el=document.getElementById(el);
}var isArray=Ext.isArray(el),result=Ext.DomQuery.filter(isArray?el:[el],ss);return isArray?(result.length==el.length):(result.length>0);
},filter:function(els,ss,nonMatches){ss=ss.replace(trimRe,"");if(!simpleCache[ss]){simpleCache[ss]=Ext.DomQuery.compile(ss,"simple");
}var result=simpleCache[ss](els);return nonMatches?quickDiff(result,els):result;},matchers:[{re:/^\.([\w-]+)/,select:'n = byClassName(n, null, " {1} ");'},{re:/^\:([\w-]+)(?:\(((?:[^\s>\/]*|.*?))\))?/,select:'n = byPseudo(n, "{1}", "{2}");'},{re:/^(?:([\[\{])(?:@)?([\w-]+)\s?(?:(=|.=)\s?['"]?(.*?)["']?)?[\]\}])/,select:'n = byAttribute(n, "{2}", "{4}", "{3}", "{1}");'},{re:/^#([\w-]+)/,select:'n = byId(n, null, "{1}");'},{re:/^@([\w-]+)/,select:'return {firstChild:{nodeValue:attrValue(n, "{1}")}};'}],operators:{"=":function(a,v){return a==v;
},"!=":function(a,v){return a!=v;},"^=":function(a,v){return a&&a.substr(0,v.length)==v;
},"$=":function(a,v){return a&&a.substr(a.length-v.length)==v;},"*=":function(a,v){return a&&a.indexOf(v)!==-1;
},"%=":function(a,v){return(a%v)==0;},"|=":function(a,v){return a&&(a==v||a.substr(0,v.length+1)==v+"-");
},"~=":function(a,v){return a&&(" "+a+" ").indexOf(" "+v+" ")!=-1;}},pseudos:{"first-child":function(c){var r=[],ri=-1,n;
for(var i=0,ci;ci=n=c[i];i++){while((n=n.previousSibling)&&n.nodeType!=1){}if(!n){r[++ri]=ci;
}}return r;},"last-child":function(c){var r=[],ri=-1,n;for(var i=0,ci;ci=n=c[i];i++){while((n=n.nextSibling)&&n.nodeType!=1){}if(!n){r[++ri]=ci;
}}return r;},"nth-child":function(c,a){var r=[],ri=-1,m=nthRe.exec(a=="even"&&"2n"||a=="odd"&&"2n+1"||!nthRe2.test(a)&&"n+"+a||a),f=(m[1]||1)-0,l=m[2]-0;
for(var i=0,n;n=c[i];i++){var pn=n.parentNode;if(batch!=pn._batch){var j=0;for(var cn=pn.firstChild;
cn;cn=cn.nextSibling){if(cn.nodeType==1){cn.nodeIndex=++j;}}pn._batch=batch;}if(f==1){if(l==0||n.nodeIndex==l){r[++ri]=n;
}}else{if((n.nodeIndex+l)%f==0){r[++ri]=n;}}}return r;},"only-child":function(c){var r=[],ri=-1;
for(var i=0,ci;ci=c[i];i++){if(!prev(ci)&&!next(ci)){r[++ri]=ci;}}return r;},empty:function(c){var r=[],ri=-1;
for(var i=0,ci;ci=c[i];i++){var cns=ci.childNodes,j=0,cn,empty=true;while(cn=cns[j]){++j;
if(cn.nodeType==1||cn.nodeType==3){empty=false;break;}}if(empty){r[++ri]=ci;}}return r;
},contains:function(c,v){var r=[],ri=-1;for(var i=0,ci;ci=c[i];i++){if((ci.textContent||ci.innerText||"").indexOf(v)!=-1){r[++ri]=ci;
}}return r;},nodeValue:function(c,v){var r=[],ri=-1;for(var i=0,ci;ci=c[i];i++){if(ci.firstChild&&ci.firstChild.nodeValue==v){r[++ri]=ci;
}}return r;},checked:function(c){var r=[],ri=-1;for(var i=0,ci;ci=c[i];i++){if(ci.checked==true){r[++ri]=ci;
}}return r;},not:function(c,ss){return Ext.DomQuery.filter(c,ss,true);},any:function(c,selectors){var ss=selectors.split("|"),r=[],ri=-1,s;
for(var i=0,ci;ci=c[i];i++){for(var j=0;s=ss[j];j++){if(Ext.DomQuery.is(ci,s)){r[++ri]=ci;
break;}}}return r;},odd:function(c){return this["nth-child"](c,"odd");},even:function(c){return this["nth-child"](c,"even");
},nth:function(c,a){return c[a-1]||[];},first:function(c){return c[0]||[];},last:function(c){return c[c.length-1]||[];
},has:function(c,ss){var s=Ext.DomQuery.select,r=[],ri=-1;for(var i=0,ci;ci=c[i];
i++){if(s(ss,ci).length>0){r[++ri]=ci;}}return r;},next:function(c,ss){var is=Ext.DomQuery.is,r=[],ri=-1;
for(var i=0,ci;ci=c[i];i++){var n=next(ci);if(n&&is(n,ss)){r[++ri]=ci;}}return r;
},prev:function(c,ss){var is=Ext.DomQuery.is,r=[],ri=-1;for(var i=0,ci;ci=c[i];i++){var n=prev(ci);
if(n&&is(n,ss)){r[++ri]=ci;}}return r;}}};}();Ext.query=Ext.DomQuery.select;(function(){var B=Ext.util,E=Ext.toArray,D=Ext.each,F=Ext.isObject,A=true,C=false;
B.Observable=function(){var M=this,L=M.events;if(M.listeners){M.on(M.listeners);delete M.listeners;
}M.events=L||{};};B.Observable.prototype=function(){var L=/^(?:scope|delay|buffer|single)$/,M=function(N){return N.toLowerCase();
};return{fireEvent:function(){var N=E(arguments),P=M(N[0]),Q=this,O=A,S=Q.events[P],R,T;
if(Q.eventsSuspended===A){if(R=Q.suspendedEventsQueue){R.push(N);}}else{if(F(S)&&S.bubble){if(S.fire.apply(S,N.slice(1))===C){return C;
}T=Q.getBubbleTarget&&Q.getBubbleTarget();if(T&&T.enableBubble){T.enableBubble(P);
return T.fireEvent.apply(T,N);}}else{if(F(S)){N.shift();O=S.fire.apply(S,N);}}}return O;
},addListener:function(Q,T,V,P){var S=this,R,N,U,O;if(F(Q)){P=Q;for(R in P){N=P[R];
if(!L.test(R)){S.addListener(R,N.fn||N,N.scope||P.scope,N.fn?N:P);}}}else{Q=M(Q);
O=S.events[Q]||A;if(typeof O=="boolean"){S.events[Q]=O=new B.Event(S,Q);}O.addListener(T,V,F(P)?P:{});
}},removeListener:function(P,N,Q){var O=this.events[M(P)];if(F(O)){O.removeListener(N,Q);
}},purgeListeners:function(){var N=this.events,O,P;for(P in N){O=N[P];if(F(O)){O.clearListeners();
}}},addEvents:function(O){var N=this;N.events=N.events||{};if(typeof O=="string"){D(arguments,function(P){N.events[P]=N.events[P]||A;
});}else{Ext.applyIf(N.events,O);}},hasListener:function(N){var O=this.events[N];
return F(O)&&O.listeners.length>0;},suspendEvents:function(N){this.eventsSuspended=A;
if(N){this.suspendedEventsQueue=[];}},resumeEvents:function(){var N=this;N.eventsSuspended=!delete N.suspendedEventQueue;
D(N.suspendedEventsQueue,function(O){N.fireEvent.apply(N,O);});}};}();var J=B.Observable.prototype;
J.on=J.addListener;J.un=J.removeListener;B.Observable.releaseCapture=function(L){L.fireEvent=J.fireEvent;
};function K(L,N,M){return function(){if(N.target==arguments[0]){L.apply(M,E(arguments));
}};}function H(O,L,M){var N=new B.DelayedTask();return function(){N.delay(L.buffer,O,M,E(arguments));
};}function I(L,O,M,N){return function(){O.removeListener(M,N);return L.apply(N,arguments);
};}function G(L,N,M){return function(){var O=E(arguments);(function(){L.apply(M,O);
}).defer(N.delay||10);};}B.Event=function(L,M){this.name=M;this.obj=L;this.listeners=[];
};B.Event.prototype={addListener:function(P,L,N){var O=this,M;L=L||O.obj;if(!O.isListening(P,L)){M=O.createListener(P,L,N);
if(O.firing){O.listeners=O.listeners.slice(0);}O.listeners.push(M);}},createListener:function(L,P,M){M=M||{},P=P||this.obj;
var O={fn:L,scope:P,options:M},N=L;if(M.target){N=K(N,M,P);}if(M.delay){N=G(N,M,P);
}if(M.single){N=I(N,this,L,P);}if(M.buffer){N=H(N,M,P);}O.fireFn=N;return O;},findListener:function(O,L){var M,N=-1;
D(this.listeners,function(Q,P){M=Q.scope;if(Q.fn==O&&(M==L||M==this.obj)){N=P;return C;
}},this);return N;},isListening:function(L,M){return this.findListener(L,M)!=-1;},removeListener:function(P,L){var N,O=this,M=C;
if((N=O.findListener(P,L))!=-1){if(O.firing){O.listeners=O.listeners.slice(0);}O.listeners.splice(N,1);
M=A;}return M;},clearListeners:function(){this.listeners=[];},fire:function(){var L=this,N=E(arguments),M=A;
D(L.listeners,function(O){L.firing=A;if(O.fireFn.apply(O.scope||L.obj||window,N)===C){return M=L.firing=C;
}});L.firing=C;return M;}};})();Ext.apply(Ext.util.Observable.prototype,function(){function A(D){var C=(this.methodEvents=this.methodEvents||{})[D],G,F,H,B=this;
if(!C){this.methodEvents[D]=C={};C.originalFn=this[D];C.methodName=D;C.before=[];
C.after=[];var E=function(J,I,K){if(!Ext.isEmpty(F=J.apply(I||B,K))){if(Ext.isObject(F)){G=!Ext.isEmpty(F.returnValue)?F.returnValue:F;
H=!!F.cancel;}else{if(F===false){H=true;}else{G=F;}}}};this[D]=function(){var I=Ext.toArray(arguments);
G=F=undefined;H=false;Ext.each(C.before,function(J){E(J.fn,J.scope,I);if(H){return G;
}});if(!Ext.isEmpty(F=C.originalFn.apply(B,I))){G=F;}Ext.each(C.after,function(J){E(J.fn,J.scope,I);
if(H){return G;}});return G;};}return C;}return{beforeMethod:function(D,C,B){A.call(this,D).before.push({fn:C,scope:B});
},afterMethod:function(D,C,B){A.call(this,D).after.push({fn:C,scope:B});},removeMethodListener:function(B,E,D){var C=A.call(this,B),F=false;
Ext.each(C.before,function(G,H,I){if(G.fn==E&&G.scope==D){I.splice(H,1);F=true;return false;
}});if(!F){Ext.each(C.after,function(G,H,I){if(G.fn==E&&G.scope==D){I.splice(H,1);
return false;}});}},relayEvents:function(E,B){var D=this;function C(F){return function(){return D.fireEvent.apply(D,[F].concat(Ext.toArray(arguments)));
};}Ext.each(B,function(F){D.events[F]=D.events[F]||true;E.on(F,C(F),D);});},enableBubble:function(B){var C=this;
B=Ext.isArray(B)?B:Ext.toArray(arguments);Ext.each(B,function(D){D=D.toLowerCase();
var E=C.events[D]||true;if(typeof E=="boolean"){E=new Ext.util.Event(C,D);C.events[D]=E;
}E.bubble=true;});}};}());Ext.util.Observable.capture=function(C,B,A){C.fireEvent=C.fireEvent.createInterceptor(B,A);
};Ext.util.Observable.observeClass=function(A){Ext.apply(A,new Ext.util.Observable());
A.prototype.fireEvent=function(){return(A.fireEvent.apply(A,arguments)!==false)&&(Ext.util.Observable.prototype.fireEvent.apply(this,arguments)!==false);
};};Ext.EventManager=function(){var E,L,I=false,K=Ext.lib.Event,M=Ext.lib.Dom,P=document,F=window,T="ie-deferred-loader",N="DOMContentLoaded",S={},G=/^(?:scope|delay|buffer|single|stopEvent|preventDefault|stopPropagation|normalized|args|delegate)$/;
function J(X,b,W,V,U){var Z=Ext.id(X),Y=S[Z]=S[Z]||{};(Y[b]=Y[b]||[]).push([W,V,U]);
K.on(X,b,V);if(b=="mousewheel"&&X.addEventListener){var a=["DOMMouseScroll",V,false];
X.addEventListener.apply(X,a);K.on(window,"unload",function(){X.removeEventListener.apply(X,a);
});}if(b=="mousedown"&&X==document){Ext.EventManager.stoppedMouseDownEvent.addListener(V);
}}function Q(){if(!I){Ext.isReady=I=true;if(L){clearInterval(L);}if(Ext.isGecko||Ext.isOpera){P.removeEventListener(N,Q,false);
}if(Ext.isIE){var U=P.getElementById(T);if(U){U.onreadystatechange=null;U.parentNode.removeChild(U);
}}if(E){E.fire();E.clearListeners();}}}function O(){var U="complete";E=new Ext.util.Event();
if(Ext.isGecko||Ext.isOpera){P.addEventListener(N,Q,false);}else{if(Ext.isIE){P.write("<script id="+T+' defer="defer" src="//:"></script>');
P.getElementById(T).onreadystatechange=function(){if(this.readyState==U){Q();}};}else{if(Ext.isWebKit){L=setInterval(function(){if(P.readyState==U){Q();
}},10);}}}K.on(F,"load",Q);}function C(U,V){return function(){var W=Ext.toArray(arguments);
if(V.target==Ext.EventObject.setEvent(W[0]).target){U.apply(this,W);}};}function D(W,V){var U=new Ext.util.DelayedTask(W);
return function(X){U.delay(V.buffer,W,null,[new Ext.EventObjectImpl(X)]);};}function A(U,Y,X,V,W){return function(Z){Ext.EventManager.removeListener(Y,X,V,W);
U(Z);};}function R(U,V){return function(W){W=new Ext.EventObjectImpl(W);setTimeout(function(){U(W);
},V.delay||10);};}function H(U,b,a,Y,X){var Z=!Ext.isObject(a)?{}:a,W=Ext.getDom(U);
Y=Y||Z.fn;X=X||Z.scope;if(!W){throw'Error listening for "'+b+'". Element "'+U+"\" doesn't exist.";
}function V(d){if(!Ext){return;}d=Ext.EventObject.setEvent(d);var c;if(Z.delegate){if(!(c=d.getTarget(Z.delegate,W))){return;
}}else{c=d.target;}if(Z.stopEvent){d.stopEvent();}if(Z.preventDefault){d.preventDefault();
}if(Z.stopPropagation){d.stopPropagation();}if(Z.normalized){d=d.browserEvent;}Y.call(X||W,d,c,Z);
}if(Z.target){V=C(V,Z);}if(Z.delay){V=R(V,Z);}if(Z.single){V=A(V,W,b,Y,X);}if(Z.buffer){V=D(V,Z);
}J(W,b,Y,V,X);return V;}var B={addListener:function(U,a,W,V,b){if(Ext.isObject(a)){var Z=a,X,Y;
for(X in Z){Y=Z[X];if(!G.test(X)){if(Ext.isFunction(Y)){H(U,X,Z,Y,Z.scope);}else{H(U,X,Y);
}}}}else{H(U,a,b,W,V);}},removeListener:function(a,Z,X,W){var V=Ext.getDom(a),Y=Ext.id(V),U;
Ext.each((S[Y]||{})[Z],function(c,d,b){if(Ext.isArray(c)&&c[0]==X&&(!W||c[2]==W)){K.un(V,Z,U=c[1]);
b.splice(d,1);return false;}});if(Z=="mousewheel"&&V.addEventListener&&U){V.removeEventListener("DOMMouseScroll",U,false);
}if(Z=="mousedown"&&V==P&&U){Ext.EventManager.stoppedMouseDownEvent.removeListener(U);
}},removeAll:function(X){var V=Ext.id(X=Ext.getDom(X)),W=S[V],U;for(U in W){if(W.hasOwnProperty(U)){Ext.each(W[U],function(Y){K.un(X,U,Y.wrap);
});}}S[V]=null;},onDocumentReady:function(V,W,U){if(I){E.addListener(V,W,U);E.fire();
E.clearListeners();}else{if(!E){O();}U=U||{};U.delay=U.delay||1;E.addListener(V,W,U);
}},elHash:S};B.on=B.addListener;B.un=B.removeListener;B.stoppedMouseDownEvent=new Ext.util.Event();
return B;}();Ext.onReady=Ext.EventManager.onDocumentReady;(function(){var A=function(){var C=document.body||document.getElementsByTagName("body")[0];
if(!C){return false;}var B=[" ",Ext.isIE?"ext-ie "+(Ext.isIE6?"ext-ie6":(Ext.isIE7?"ext-ie7":"ext-ie8")):Ext.isGecko?"ext-gecko "+(Ext.isGecko2?"ext-gecko2":"ext-gecko3"):Ext.isOpera?"ext-opera":Ext.isWebKit?"ext-webkit":""];
if(Ext.isSafari){B.push("ext-safari "+(Ext.isSafari2?"ext-safari2":(Ext.isSafari3?"ext-safari3":"ext-safari4")));
}else{if(Ext.isChrome){B.push("ext-chrome");}}if(Ext.isMac){B.push("ext-mac");}if(Ext.isLinux){B.push("ext-linux");
}if(Ext.isStrict||Ext.isBorderBox){var D=C.parentNode;if(D){D.className+=Ext.isStrict?" ext-strict":" ext-border-box";
}}C.className+=B.join(" ");return true;};if(!A()){Ext.onReady(A);}})();Ext.EventObject=function(){var B=Ext.lib.Event,A={3:13,63234:37,63235:39,63232:38,63233:40,63276:33,63277:34,63272:46,63273:36,63275:35},C=Ext.isIE?{1:0,4:1,2:2}:(Ext.isWebKit?{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={setEvent:function(D){var E=this;
if(D==E||(D&&D.browserEvent)){return D;}E.browserEvent=D;if(D){E.button=D.button?C[D.button]:(D.which?D.which-1:-1);
if(D.type=="click"&&E.button==-1){E.button=0;}E.type=D.type;E.shiftKey=D.shiftKey;
E.ctrlKey=D.ctrlKey||D.metaKey||false;E.altKey=D.altKey;E.keyCode=D.keyCode;E.charCode=D.charCode;
E.target=B.getTarget(D);E.xy=B.getXY(D);}else{E.button=-1;E.shiftKey=false;E.ctrlKey=false;
E.altKey=false;E.keyCode=0;E.charCode=0;E.target=null;E.xy=[0,0];}return E;},stopEvent:function(){var D=this;
if(D.browserEvent){if(D.browserEvent.type=="mousedown"){Ext.EventManager.stoppedMouseDownEvent.fire(D);
}B.stopEvent(D.browserEvent);}},preventDefault:function(){if(this.browserEvent){B.preventDefault(this.browserEvent);
}},stopPropagation:function(){var D=this;if(D.browserEvent){if(D.browserEvent.type=="mousedown"){Ext.EventManager.stoppedMouseDownEvent.fire(D);
}B.stopPropagation(D.browserEvent);}},getCharCode:function(){return this.charCode||this.keyCode;
},getKey:function(){return this.normalizeKey(this.keyCode||this.charCode);},normalizeKey:function(D){return Ext.isSafari?(A[D]||D):D;
},getPageX:function(){return this.xy[0];},getPageY:function(){return this.xy[1];},getXY:function(){return this.xy;
},getTarget:function(F,D,E){return F?Ext.fly(this.target).findParent(F,D,E):(E?Ext.get(this.target):this.target);
},getRelatedTarget:function(){return this.browserEvent?B.getRelatedTarget(this.browserEvent):null;
},getWheelDelta:function(){var D=this.browserEvent;var E=0;if(D.wheelDelta){E=D.wheelDelta/120;
}else{if(D.detail){E=-D.detail/3;}}return E;},within:function(E,D,F){if(E){var G=this[D?"getRelatedTarget":"getTarget"]();
return G&&((F?(G==Ext.getDom(E)):false)||Ext.fly(E).contains(G));}return false;}};
return new Ext.EventObjectImpl();}();Ext.apply(Ext.EventManager,function(){var G,C,I,F,E=Ext.lib.Dom,D=Ext.lib.Event,B=/^(?:scope|delay|buffer|single|stopEvent|preventDefault|stopPropagation|normalized|args|delegate)$/,A=0,J=0,H=Ext.isSafari?Ext.num(navigator.userAgent.toLowerCase().match(/version\/(\d+\.\d)/)[1]||2)>=3.1:!((Ext.isGecko&&!Ext.isWindows)||Ext.isOpera);
return{doResizeEvent:function(){var L=E.getViewHeight(),K=E.getViewWidth();if(J!=L||A!=K){G.fire(A=K,J=L);
}},onWindowResize:function(M,L,K){if(!G){G=new Ext.util.Event();C=new Ext.util.DelayedTask(this.doResizeEvent);
D.on(window,"resize",this.fireWindowResize,this);}G.addListener(M,L,K);},fireWindowResize:function(){if(G){if((Ext.isIE||Ext.isAir)&&C){C.delay(50);
}else{G.fire(E.getViewWidth(),E.getViewHeight());}}},onTextResize:function(K,N,L){if(!I){I=new Ext.util.Event();
var M=new Ext.Element(document.createElement("div"));M.dom.className="x-text-resize";
M.dom.innerHTML="X";M.appendTo(document.body);F=M.dom.offsetHeight;setInterval(function(){if(M.dom.offsetHeight!=F){I.fire(F,F=M.dom.offsetHeight);
}},this.textResizeInterval);}I.addListener(K,N,L);},removeResizeListener:function(L,K){if(G){G.removeListener(L,K);
}},fireResize:function(){if(G){G.fire(E.getViewWidth(),E.getViewHeight());}},textResizeInterval:50,ieDeferSrc:false,useKeydown:H};
}());Ext.EventManager.on=Ext.EventManager.addListener;Ext.apply(Ext.EventObjectImpl.prototype,{BACKSPACE:8,TAB:9,NUM_CENTER:12,ENTER:13,RETURN:13,SHIFT:16,CTRL:17,CONTROL:17,ALT:18,PAUSE:19,CAPS_LOCK:20,ESC:27,SPACE:32,PAGE_UP:33,PAGEUP:33,PAGE_DOWN:34,PAGEDOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,PRINT_SCREEN:44,INSERT:45,DELETE:46,ZERO:48,ONE:49,TWO:50,THREE:51,FOUR:52,FIVE:53,SIX:54,SEVEN:55,EIGHT:56,NINE:57,A:65,B:66,C:67,D:68,E:69,F:70,G:71,H:72,I:73,J:74,K:75,L:76,M:77,N:78,O:79,P:80,Q:81,R:82,S:83,T:84,U:85,V:86,W:87,X:88,Y:89,Z:90,CONTEXT_MENU:93,NUM_ZERO:96,NUM_ONE:97,NUM_TWO:98,NUM_THREE:99,NUM_FOUR:100,NUM_FIVE:101,NUM_SIX:102,NUM_SEVEN:103,NUM_EIGHT:104,NUM_NINE:105,NUM_MULTIPLY:106,NUM_PLUS:107,NUM_MINUS:109,NUM_PERIOD:110,NUM_DIVISION:111,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,isNavKeyPress:function(){var B=this,A=this.normalizeKey(B.keyCode);
return(A>=33&&A<=40)||A==B.RETURN||A==B.TAB||A==B.ESC;},isSpecialKey:function(){var A=this.normalizeKey(this.keyCode);
return(this.type=="keypress"&&this.ctrlKey)||this.isNavKeyPress()||(A==this.BACKSPACE)||(A>=16&&A<=20)||(A>=44&&A<=45);
},getPoint:function(){return new Ext.lib.Point(this.xy[0],this.xy[1]);},hasModifier:function(){return((this.ctrlKey||this.altKey)||this.shiftKey);
}});(function(){var B=document;Ext.Element=function(P,M){var N=typeof P=="string"?B.getElementById(P):P,O;
if(!N){return null;}O=N.id;if(!M&&O&&Ext.Element.cache[O]){return Ext.Element.cache[O];
}this.dom=N;this.id=O||Ext.id(N);};var G=Ext.lib.Dom,K=Ext.DomHelper,E=Ext.lib.Event,J=Ext.lib.Anim,L=Ext.Element;
L.prototype={set:function(O,Q){var M=this.dom,P,N;for(P in O){N=O[P];if(P!="style"&&!Ext.isFunction(N)){if(P=="cls"){M.className=N;
}else{if(O.hasOwnProperty(P)){if(Q||!!M.setAttribute){M.setAttribute(P,N);}else{M[P]=N;
}}}}}if(O.style){Ext.DomHelper.applyStyles(M,O.style);}return this;},defaultUnit:"px",is:function(M){return Ext.DomQuery.is(this.dom,M);
},focus:function(M,P){var N=this,P=P||N.dom;try{if(Number(M)){N.focus.defer(M,null,[null,P]);
}else{P.focus();}}catch(O){}return N;},blur:function(){try{this.dom.blur();}catch(M){}return this;
},getValue:function(M){var N=this.dom.value;return M?parseInt(N,10):N;},addListener:function(P,M,N,O){Ext.EventManager.on(this.dom,P,M,N||this,O);
return this;},removeListener:function(N,O,M){Ext.EventManager.removeListener(this.dom,N,O,M||this);
return this;},removeAllListeners:function(){Ext.EventManager.removeAll(this.dom);
return this;},addUnits:function(M){if(M===""||M=="auto"||M===undefined){M=M||"";}else{if(!isNaN(M)||!C.test(M)){M=M+(this.defaultUnit||"px");
}}return M;},load:function(M,O,N){Ext.Ajax.request(Ext.apply({params:O,url:M.url||M,callback:N,el:this.dom,indicatorText:M.indicatorText||""},Ext.isObject(M)?M:{}));
return this;},isBorderBox:function(){return A[(this.dom.tagName||"").toLowerCase()]||Ext.isBorderBox;
},remove:function(){var M=this,N=M.dom;M.removeAllListeners();delete L.cache[N.id];
delete L.dataCache[N.id];Ext.removeNode(N);},hover:function(M,Q,P,O){var N=this;N.on("mouseenter",M,P||N.dom,O);
N.on("mouseleave",Q,P||N.dom,O);return N;},contains:function(M){return !M?false:Ext.lib.Dom.isAncestor(this.dom,M.dom?M.dom:M);
},getAttributeNS:function(N,M){return this.getAttribute(M,N);},getAttribute:Ext.isIE?function(N,P){var M=this.dom,O=typeof M[P+":"+N];
if(["undefined","unknown"].indexOf(O)==-1){return M[P+":"+N];}return M[N];}:function(O,M){var N=this.dom;
return N.getAttributeNS(M,O)||N.getAttribute(M+":"+O)||N.getAttribute(O)||N[O];},update:function(M){this.dom.innerHTML=M;
return this;}};var F=L.prototype;L.addMethods=function(M){Ext.apply(F,M);};F.on=F.addListener;
F.un=F.removeListener;F.autoBoxAdjust=true;var C=/\d+(px|em|%|en|ex|pt|in|cm|mm|pc)$/i,I;
L.cache={};L.dataCache={};L.get=function(M){var Q,N,P;if(!M){return null;}if(typeof M=="string"){if(!(N=B.getElementById(M))){return null;
}if(Q=L.cache[M]){Q.dom=N;}else{Q=L.cache[M]=new L(N);}return Q;}else{if(M.tagName){if(!(P=M.id)){P=Ext.id(M);
}if(Q=L.cache[P]){Q.dom=M;}else{Q=L.cache[P]=new L(M);}return Q;}else{if(M instanceof L){if(M!=I){M.dom=B.getElementById(M.id)||M.dom;
L.cache[M.id]=M;}return M;}else{if(M.isComposite){return M;}else{if(Ext.isArray(M)){return L.select(M);
}else{if(M==B){if(!I){var O=function(){};O.prototype=L.prototype;I=new O();I.dom=B;
}return I;}}}}}}return null;};L.data=function(M,P,N){var O=L.dataCache[M.id];if(!O){O=L.dataCache[M.id]={};
}if(arguments.length==2){return O[P];}else{O[P]=N;}};function D(){if(!Ext.enableGarbageCollector){clearInterval(L.collectorThread);
}else{var O,M,N;for(O in L.cache){M=L.cache[O];N=M.dom;if(!N||!N.parentNode||(!N.offsetParent&&!B.getElementById(O))){delete L.cache[O];
if(N&&Ext.enableListenerCollection){Ext.EventManager.removeAll(N);}}}}}L.collectorThreadId=setInterval(D,30000);
var H=function(){};H.prototype=L.prototype;L.Flyweight=function(M){this.dom=M;};L.Flyweight.prototype=new H();
L.Flyweight.prototype.isFlyweight=true;L._flyweights={};L.fly=function(O,N){var M=null;
N=N||"_global";if(O=Ext.getDom(O)){(L._flyweights[N]=L._flyweights[N]||new L.Flyweight()).dom=O;
M=L._flyweights[N];}return M;};Ext.get=L.get;Ext.fly=L.fly;var A=Ext.isStrict?{select:1}:{input:1,select:1,textarea:1};
if(Ext.isIE||Ext.isGecko){A.button=1;}Ext.EventManager.on(window,"unload",function(){delete L.cache;
delete L.dataCache;delete L._flyweights;});})();Ext.Element.addMethods({swallowEvent:function(A,B){var D=this;
function C(E){E.stopPropagation();if(B){E.preventDefault();}}if(Ext.isArray(A)){Ext.each(A,function(E){D.on(E,C);
});return D;}D.on(A,C);return D;},relayEvent:function(A,B){this.on(A,function(C){B.fireEvent(A,C);
});},clean:function(B){var D=this,E=D.dom,F=E.firstChild,C=-1;if(Ext.Element.data(E,"isCleaned")&&B!==true){return D;
}while(F){var A=F.nextSibling;if(F.nodeType==3&&!/\S/.test(F.nodeValue)){E.removeChild(F);
}else{F.nodeIndex=++C;}F=A;}Ext.Element.data(E,"isCleaned",true);return D;},load:function(){var A=this.getUpdater();
A.update.apply(A,arguments);return this;},getUpdater:function(){return this.updateManager||(this.updateManager=new Ext.Updater(this));
},update:function(html,loadScripts,callback){html=html||"";if(loadScripts!==true){this.dom.innerHTML=html;
if(Ext.isFunction(callback)){callback();}return this;}var id=Ext.id(),dom=this.dom;
html+='<span id="'+id+'"></span>';Ext.lib.Event.onAvailable(id,function(){var DOC=document,hd=DOC.getElementsByTagName("head")[0],re=/(?:<script([^>]*)?>)((\n|\r|.)*?)(?:<\/script>)/ig,srcRe=/\ssrc=([\'\"])(.*?)\1/i,typeRe=/\stype=([\'\"])(.*?)\1/i,match,attrs,srcMatch,typeMatch,el,s;
while((match=re.exec(html))){attrs=match[1];srcMatch=attrs?attrs.match(srcRe):false;
if(srcMatch&&srcMatch[2]){s=DOC.createElement("script");s.src=srcMatch[2];typeMatch=attrs.match(typeRe);
if(typeMatch&&typeMatch[2]){s.type=typeMatch[2];}hd.appendChild(s);}else{if(match[2]&&match[2].length>0){if(window.execScript){window.execScript(match[2]);
}else{window.eval(match[2]);}}}}el=DOC.getElementById(id);if(el){Ext.removeNode(el);
}if(Ext.isFunction(callback)){callback();}});dom.innerHTML=html.replace(/(?:<script.*?>)((\n|\r|.)*?)(?:<\/script>)/ig,"");
return this;},createProxy:function(A,E,D){A=Ext.isObject(A)?A:{tag:"div",cls:A};var C=this,B=E?Ext.DomHelper.append(E,A,true):Ext.DomHelper.insertBefore(C.dom,A,true);
if(D&&C.setBox&&C.getBox){B.setBox(C.getBox());}return B;}});Ext.Element.prototype.getUpdateManager=Ext.Element.prototype.getUpdater;
Ext.Element.uncache=function(D){for(var C=0,B=arguments,A=B.length;C<A;C++){if(B[C]){delete Ext.Element.cache[B[C].id||B[C]];
}}};Ext.Element.addMethods({getAnchorXY:function(M,F,B){M=(M||"tl").toLowerCase();
B=B||{};var E=this,J=E.dom==document.body||E.dom==document,H=B.width||J?Ext.lib.Dom.getViewWidth():E.getWidth(),C=B.height||J?Ext.lib.Dom.getViewHeight():E.getHeight(),A,I=Math.round,K=E.getXY(),G=E.getScroll(),D=J?G.left:!F?K[0]:0,N=J?G.top:!F?K[1]:0,L={c:[I(H*0.5),I(C*0.5)],t:[I(H*0.5),0],l:[0,I(C*0.5)],r:[H,I(C*0.5)],b:[I(H*0.5),C],tl:[0,0],bl:[0,C],br:[H,C],tr:[H,0]};
A=L[M];return[A[0]+D,A[1]+N];},anchorTo:function(E,I,F,D,B,C){var A=this,H=A.dom;
function G(){Ext.fly(H).alignTo(E,I,F,D);Ext.callback(C,Ext.fly(H));}Ext.EventManager.onWindowResize(G,A);
if(!Ext.isEmpty(B)){Ext.EventManager.on(window,"scroll",G,A,{buffer:!isNaN(B)?B:50});
}G.call(A);return A;},getAlignToXY:function(y,O,P){y=Ext.get(y);if(!y||!y.dom){throw"Element.alignToXY with an element that doesn't exist";
}P=P||[0,0];O=(O=="?"?"tl-bl?":(!/-/.test(O)&&O!==""?"tl-"+O:O||"tl-bl")).toLowerCase();
var Ad=this,Aa=Ad.dom,Af,Ae,p,o,X,T,c,Y=Ext.lib.Dom.getViewWidth()-10,U=Ext.lib.Dom.getViewHeight()-10,w,d,h,m,Z,V,Ag=document,Ac=Ag.documentElement,W=Ag.body,S=(Ac.scrollLeft||W.scrollLeft||0)+5,R=(Ac.scrollTop||W.scrollTop||0)+5,Ab=false,x="",r="",Q=O.match(/^([a-z]+)-([a-z]+)(\?)?$/);
if(!Q){throw"Element.alignTo with an invalid alignment "+O;}x=Q[1];r=Q[2];Ab=!!Q[3];
Af=Ad.getAnchorXY(x,true);Ae=y.getAnchorXY(r,false);p=Ae[0]-Af[0]+P[0];o=Ae[1]-Af[1]+P[1];
if(Ab){X=Ad.getWidth();T=Ad.getHeight();c=y.getRegion();w=x.charAt(0);d=x.charAt(x.length-1);
h=r.charAt(0);m=r.charAt(r.length-1);Z=((w=="t"&&h=="b")||(w=="b"&&h=="t"));V=((d=="r"&&m=="l")||(d=="l"&&m=="r"));
if(p+X>Y+S){p=V?c.left-X:Y+S-X;}if(p<S){p=V?c.right:S;}if(o+T>U+R){o=Z?c.top-T:U+R-T;
}if(o<R){o=Z?c.bottom:R;}}return[p,o];},alignTo:function(C,A,E,B){var D=this;return D.setXY(D.getAlignToXY(C,A,E),D.preanim&&!!B?D.preanim(arguments,3):false);
},adjustForConstraints:function(C,A,B){return this.getConstrainToXY(A||document,false,B,C)||C;
},getConstrainToXY:function(B,A,C,E){var D={top:0,left:0,bottom:0,right:0};return function(N,F,P,R){N=Ext.get(N);
P=P?Ext.applyIf(P,D):D;var L,W,K=0,J=0;if(N.dom==document.body||N.dom==document){L=Ext.lib.Dom.getViewWidth();
W=Ext.lib.Dom.getViewHeight();}else{L=N.dom.clientWidth;W=N.dom.clientHeight;if(!F){var I=N.getXY();
K=I[0];J=I[1];}}var H=N.getScroll();K+=P.left+H.left;J+=P.top+H.top;L-=P.right;W-=P.bottom;
var U=K+L;var V=J+W;var O=R||(!F?this.getXY():[this.getLeft(true),this.getTop(true)]);
var T=O[0],S=O[1];var G=this.dom.offsetWidth,M=this.dom.offsetHeight;var Q=false;
if((T+G)>U){T=U-G;Q=true;}if((S+M)>V){S=V-M;Q=true;}if(T<K){T=K;Q=true;}if(S<J){S=J;
Q=true;}return Q?[T,S]:false;};}(),getCenterXY:function(){return this.getAlignToXY(document,"c-c");
},center:function(A){return this.alignTo(A||document,"c-c");}});Ext.Element.addMethods(function(){var D="parentNode",B="nextSibling",C="previousSibling",E=Ext.DomQuery,A=Ext.get;
return{findParent:function(K,J,F){var H=this.dom,L=document.body,I=0,G;if(Ext.isGecko&&Object.prototype.toString.call(H)=="[object XULElement]"){return null;
}J=J||50;if(isNaN(J)){G=Ext.getDom(J);J=Number.MAX_VALUE;}while(H&&H.nodeType==1&&I<J&&H!=L&&H!=G){if(E.is(H,K)){return F?A(H):H;
}I++;H=H.parentNode;}return null;},findParentNode:function(H,G,F){var I=Ext.fly(this.dom.parentNode,"_internal");
return I?I.findParent(H,G,F):null;},up:function(F,G){return this.findParentNode(F,G,true);
},select:function(F,G){return Ext.Element.select(F,G,this.dom);},query:function(F,G){return E.select(F,this.dom);
},child:function(G,F){var H=E.selectNode(G,this.dom);return F?H:A(H);},down:function(G,F){var H=E.selectNode(" > "+G,this.dom);
return F?H:A(H);},parent:function(F,G){return this.matchNode(D,D,F,G);},next:function(F,G){return this.matchNode(B,B,F,G);
},prev:function(F,G){return this.matchNode(C,C,F,G);},first:function(F,G){return this.matchNode(B,"firstChild",F,G);
},last:function(F,G){return this.matchNode(C,"lastChild",F,G);},matchNode:function(F,I,G,J){var H=this.dom[I];
while(H){if(H.nodeType==1&&(!G||E.is(H,G))){return !J?A(H):H;}H=H[F];}return null;
}};}());Ext.Element.addMethods(function(){var D=Ext.getDom,A=Ext.get,C=Ext.DomHelper,B=function(E){return(E.nodeType||E.dom||typeof E=="string");
};return{appendChild:function(E){return A(E).appendTo(this);},appendTo:function(E){D(E).appendChild(this.dom);
return this;},insertBefore:function(E){(E=D(E)).parentNode.insertBefore(this.dom,E);
return this;},insertAfter:function(E){(E=D(E)).parentNode.insertBefore(this.dom,E.nextSibling);
return this;},insertFirst:function(E,F){E=E||{};if(B(E)){E=D(E);this.dom.insertBefore(E,this.dom.firstChild);
return !F?A(E):E;}else{return this.createChild(E,this.dom.firstChild,F);}},replace:function(E){E=A(E);
this.insertBefore(E);E.remove();return this;},replaceWith:function(F){var E=this,G=Ext.Element;
if(B(F)){F=D(F);E.dom.parentNode.insertBefore(F,E.dom);}else{F=C.insertBefore(E.dom,F);
}delete G.cache[E.id];Ext.removeNode(E.dom);E.id=Ext.id(E.dom=F);return G.cache[E.id]=E;
},createChild:function(F,G,E){F=F||{tag:"div"};return G?C.insertBefore(G,F,E!==true):C[!this.dom.firstChild?"overwrite":"append"](this.dom,F,E!==true);
},wrap:function(G,F){var E=C.insertBefore(this.dom,G||{tag:"div"},!F);E.dom?E.dom.appendChild(this.dom):E.appendChild(this.dom);
return E;},insertHtml:function(F,E,H){var G=C.insertHtml(F,this.dom,E);return H?Ext.get(G):G;
}};}());Ext.apply(Ext.Element.prototype,function(){var C=Ext.getDom,A=Ext.get,B=Ext.DomHelper;
return{insertSibling:function(D,H,E){var F=this,G;if(Ext.isArray(D)){Ext.each(D,function(I){G=F.insertSibling(I,H,E);
});return G;}H=(H||"before").toLowerCase();D=D||{};if(D.nodeType||D.dom){G=F.dom.parentNode.insertBefore(C(D),H=="before"?F.dom:F.dom.nextSibling);
if(!E){G=A(G);}}else{if(H=="after"&&!F.dom.nextSibling){G=B.append(F.dom.parentNode,D,!E);
}else{G=B[H=="after"?"insertAfter":"insertBefore"](F.dom,D,!E);}}return G;}};}());
Ext.Element.addMethods(function(){var V={},L=/(-[a-z])/gi,Ae={},R=document.defaultView,T=Ext.isIE?"styleFloat":"cssFloat",I=/alpha\(opacity=(.*)\)/i,Z=/^\s+|\s+$/g,G=Ext.Element,Ag="padding",Af="margin",M="border",S="-left",P="-right",K="-top",Ac="-bottom",X="-width",Q=Math,F="hidden",Ah="isClipped",Y="overflow",Ab="overflow-x",Aa="overflow-y",H="originalClip",W={l:M+S+X,r:M+P+X,t:M+K+X,b:M+Ac+X},Ai={l:Ag+S,r:Ag+P,t:Ag+K,b:Ag+Ac},Ad={l:Af+S,r:Af+P,t:Af+K,b:Af+Ac},J=Ext.Element.data;
function O(A,B){return B.charAt(1).toUpperCase();}function N(C,B){var A=0;Ext.each(C.match(/\w/g),function(D){if(D=parseInt(this.getStyle(B[D]),10)){A+=Q.abs(D);
}},this);return A;}function U(A){return V[A]||(V[A]=A=="float"?T:A.replace(L,O));
}return{adjustWidth:function(B){var C=this;var A=(typeof B=="number");if(A&&C.autoBoxAdjust&&!C.isBorderBox()){B-=(C.getBorderWidth("lr")+C.getPadding("lr"));
}return(A&&B<0)?0:B;},adjustHeight:function(B){var C=this;var A=(typeof B=="number");
if(A&&C.autoBoxAdjust&&!C.isBorderBox()){B-=(C.getBorderWidth("tb")+C.getPadding("tb"));
}return(A&&B<0)?0:B;},addClass:function(A){var B=this;Ext.each(A,function(C){B.dom.className+=(!B.hasClass(C)&&C?" "+C:"");
});return B;},radioClass:function(A){Ext.each(this.dom.parentNode.childNodes,function(B){if(B.nodeType==1){Ext.fly(B,"_internal").removeClass(A);
}});return this.addClass(A);},removeClass:function(A){var B=this;if(B.dom.className){Ext.each(A,function(C){B.dom.className=B.dom.className.replace(Ae[C]=Ae[C]||new RegExp("(?:^|\\s+)"+C+"(?:\\s+|$)","g")," ");
});}return B;},toggleClass:function(A){return this.hasClass(A)?this.removeClass(A):this.addClass(A);
},hasClass:function(A){return A&&(" "+this.dom.className+" ").indexOf(" "+A+" ")!=-1;
},replaceClass:function(B,A){return this.removeClass(B).addClass(A);},isStyle:function(A,B){return this.getStyle(A)==B;
},getStyle:function(){return R&&R.getComputedStyle?function(D){var C=this.dom,A,B;
if(C==document){return null;}D=U(D);return(A=C.style[D])?A:(B=R.getComputedStyle(C,""))?B[D]:null;
}:function(E){var C=this.dom,A,D;if(C==document){return null;}if(E=="opacity"){if(C.style.filter.match){if(A=C.style.filter.match(I)){var B=parseFloat(A[1]);
if(!isNaN(B)){return B?B/100:0;}}}return 1;}E=U(E);return C.style[E]||((D=C.currentStyle)?D[E]:null);
};}(),getColor:function(a,A,E){var C=this.getStyle(a),B=E||"#",D;if(!C||/transparent|inherit/.test(C)){return A;
}if(/^r/.test(C)){Ext.each(C.slice(4,C.length-1).split(","),function(b){D=parseInt(b,10);
B+=(D<16?"0":"")+D.toString(16);});}else{C=C.replace("#","");B+=C.length==3?C.replace(/^(\w)(\w)(\w)$/,"$1$1$2$2$3$3"):C;
}return(B.length>5?B.toLowerCase():A);},setStyle:function(E,D){var B,C,A;if(!Ext.isObject(E)){B={};
B[E]=D;E=B;}for(C in E){D=E[C];C=="opacity"?this.setOpacity(D):this.dom.style[U(C)]=D;
}return this;},setOpacity:function(A,a){var D=this,B=D.dom.style;if(!a||!D.anim){if(Ext.isIE){var C=A<1?"alpha(opacity="+A*100+")":"",E=B.filter.replace(I,"").replace(Z,"");
B.zoom=1;B.filter=E+(E.length>0?" ":"")+C;}else{B.opacity=A;}}else{D.anim({opacity:{to:A}},D.preanim(arguments,1),null,0.35,"easeIn");
}return D;},clearOpacity:function(){var A=this.dom.style;if(Ext.isIE){if(!Ext.isEmpty(A.filter)){A.filter=A.filter.replace(I,"").replace(Z,"");
}}else{A.opacity=A["-moz-opacity"]=A["-khtml-opacity"]="";}return this;},getHeight:function(B){var C=this,A=C.dom,D=Q.max(A.offsetHeight,A.clientHeight)||0;
D=!B?D:D-C.getBorderWidth("tb")-C.getPadding("tb");return D<0?0:D;},getWidth:function(C){var B=this,A=B.dom,D=Q.max(A.offsetWidth,A.clientWidth)||0;
D=!C?D:D-B.getBorderWidth("lr")-B.getPadding("lr");return D<0?0:D;},setWidth:function(C,B){var A=this;
C=A.adjustWidth(C);!B||!A.anim?A.dom.style.width=A.addUnits(C):A.anim({width:{to:C}},A.preanim(arguments,1));
return A;},setHeight:function(B,C){var A=this;B=A.adjustHeight(B);!C||!A.anim?A.dom.style.height=A.addUnits(B):A.anim({height:{to:B}},A.preanim(arguments,1));
return A;},getBorderWidth:function(A){return N.call(this,A,W);},getPadding:function(A){return N.call(this,A,Ai);
},clip:function(){var A=this,B=A.dom;if(!J(B,Ah)){J(B,Ah,true);J(B,H,{o:A.getStyle(Y),x:A.getStyle(Ab),y:A.getStyle(Aa)});
A.setStyle(Y,F);A.setStyle(Ab,F);A.setStyle(Aa,F);}return A;},unclip:function(){var A=this,B=A.dom;
if(J(B,Ah)){J(B,Ah,false);var C=J(B,H);if(C.o){A.setStyle(Y,C.o);}if(C.x){A.setStyle(Ab,C.x);
}if(C.y){A.setStyle(Aa,C.y);}}return A;},addStyles:N,margins:Ad};}());Ext.Element.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>';
Ext.Element.addMethods(function(){var A="_internal";return{applyStyles:function(B){Ext.DomHelper.applyStyles(this.dom,B);
return this;},getStyles:function(){var B={};Ext.each(arguments,function(C){B[C]=this.getStyle(C);
},this);return B;},getStyleSize:function(){var B=this,D,F,E=this.dom,C=E.style;if(C.width&&C.width!="auto"){D=parseInt(C.width,10);
if(B.isBorderBox()){D-=B.getFrameWidth("lr");}}if(C.height&&C.height!="auto"){F=parseInt(C.height,10);
if(B.isBorderBox()){F-=B.getFrameWidth("tb");}}return{width:D||B.getWidth(true),height:F||B.getHeight(true)};
},setOverflow:function(B){var C=this.dom;if(B=="auto"&&Ext.isMac&&Ext.isGecko2){C.style.overflow="hidden";
(function(){C.style.overflow="auto";}).defer(1);}else{C.style.overflow=B;}},boxWrap:function(B){B=B||"x-box";
var C=Ext.get(this.insertHtml("beforeBegin","<div class='"+B+"'>"+String.format(Ext.Element.boxMarkup,B)+"</div>"));
Ext.DomQuery.selectNode("."+B+"-mc",C.dom).appendChild(this.dom);return C;},setSize:function(D,B,C){var E=this;
if(Ext.isObject(D)){B=D.height;D=D.width;}D=E.adjustWidth(D);B=E.adjustHeight(B);
if(!C||!E.anim){E.dom.style.width=E.addUnits(D);E.dom.style.height=E.addUnits(B);
}else{E.anim({width:{to:D},height:{to:B}},E.preanim(arguments,2));}return E;},getComputedHeight:function(){var C=this,B=Math.max(C.dom.offsetHeight,C.dom.clientHeight);
if(!B){B=parseInt(C.getStyle("height"),10)||0;if(!C.isBorderBox()){B+=C.getFrameWidth("tb");
}}return B;},getComputedWidth:function(){var B=Math.max(this.dom.offsetWidth,this.dom.clientWidth);
if(!B){B=parseInt(this.getStyle("width"),10)||0;if(!this.isBorderBox()){B+=this.getFrameWidth("lr");
}}return B;},getFrameWidth:function(C,B){return B&&this.isBorderBox()?0:(this.getPadding(C)+this.getBorderWidth(C));
},addClassOnOver:function(B){this.hover(function(){Ext.fly(this,A).addClass(B);},function(){Ext.fly(this,A).removeClass(B);
});return this;},addClassOnFocus:function(B){this.on("focus",function(){Ext.fly(this,A).addClass(B);
},this.dom);this.on("blur",function(){Ext.fly(this,A).removeClass(B);},this.dom);
return this;},addClassOnClick:function(B){var C=this.dom;this.on("mousedown",function(){Ext.fly(C,A).addClass(B);
var D=Ext.getDoc(),E=function(){Ext.fly(C,A).removeClass(B);D.removeListener("mouseup",E);
};D.on("mouseup",E);});return this;},getViewSize:function(){var E=document,B=this.dom,D=Ext.lib.Dom,C=(B==E||B==E.body);
return{width:(C?D.getViewWidth():B.clientWidth),height:(C?D.getViewHeight():B.clientHeight)};
},getSize:function(B){return{width:this.getWidth(B),height:this.getHeight(B)};},repaint:function(){var B=this.dom;
this.addClass("x-repaint");setTimeout(function(){Ext.fly(B).removeClass("x-repaint");
},1);return this;},unselectable:function(){this.dom.unselectable="on";return this.swallowEvent("selectstart",true).applyStyles("-moz-user-select:none;-khtml-user-select:none;").addClass("x-unselectable");
},getMargins:function(D){var E=this,C,F={t:"top",l:"left",r:"right",b:"bottom"},B={};
if(!D){for(C in E.margins){B[F[C]]=parseInt(E.getStyle(E.margins[C]),10)||0;}return B;
}else{return E.addStyles.call(E,D,E.margins);}}};}());(function(){var F=Ext.lib.Dom,G="left",K="right",I="top",B="bottom",A="position",H="static",J="relative",C="auto",D="z-index";
function E(N,M,L){return this.preanim&&!!M?this.preanim(N,L):false;}Ext.Element.addMethods({getX:function(){return F.getX(this.dom);
},getY:function(){return F.getY(this.dom);},getXY:function(){return F.getXY(this.dom);
},getOffsetsTo:function(M){var N=this.getXY(),L=Ext.fly(M,"_internal").getXY();return[N[0]-L[0],N[1]-L[1]];
},setX:function(M,L){return this.setXY([M,this.getY()],E.call(this,arguments,L,1));
},setY:function(L,M){return this.setXY([this.getX(),L],E.call(this,arguments,M,1));
},setLeft:function(L){this.setStyle(G,this.addUnits(L));return this;},setTop:function(L){this.setStyle(I,this.addUnits(L));
return this;},setRight:function(L){this.setStyle(K,this.addUnits(L));return this;
},setBottom:function(L){this.setStyle(B,this.addUnits(L));return this;},setXY:function(L,M){var N=this;
if(!M||!N.anim){F.setXY(N.dom,L);}else{N.anim({points:{to:L}},N.preanim(arguments,1),"motion");
}return N;},setLocation:function(M,L,N){return this.setXY([M,L],E.call(this,arguments,N,2));
},moveTo:function(M,L,N){return this.setXY([M,L],E.call(this,arguments,N,2));},getLeft:function(L){return !L?this.getX():parseInt(this.getStyle(G),10)||0;
},getRight:function(M){var L=this;return !M?L.getX()+L.getWidth():(L.getLeft(true)+L.getWidth())||0;
},getTop:function(L){return !L?this.getY():parseInt(this.getStyle(I),10)||0;},getBottom:function(M){var L=this;
return !M?L.getY()+L.getHeight():(L.getTop(true)+L.getHeight())||0;},position:function(L,P,O,M){var N=this;
if(!L&&N.isStyle(A,H)){N.setStyle(A,J);}else{if(L){N.setStyle(A,L);}}if(P){N.setStyle(D,P);
}if(O||M){N.setXY([O||false,M||false]);}},clearPositioning:function(L){L=L||"";this.setStyle({left:L,right:L,top:L,bottom:L,"z-index":"",position:H});
return this;},getPositioning:function(){var M=this.getStyle(G);var L=this.getStyle(I);
return{position:this.getStyle(A),left:M,right:M?"":this.getStyle(K),top:L,bottom:L?"":this.getStyle(B),"z-index":this.getStyle(D)};
},setPositioning:function(M){var L=this,N=L.dom.style;L.setStyle(M);if(M.right==C){N.right="";
}if(M.bottom==C){N.bottom="";}return L;},translatePoints:function(L,R){R=isNaN(L[1])?R:L[1];
L=isNaN(L[0])?L:L[0];var O=this,P=O.isStyle(A,J),Q=O.getXY(),M=parseInt(O.getStyle(G),10),N=parseInt(O.getStyle(I),10);
M=!isNaN(M)?M:(P?0:O.dom.offsetLeft);N=!isNaN(N)?N:(P?0:O.dom.offsetTop);return{left:(L-Q[0]+M),top:(R-Q[1]+N)};
},animTest:E});})();Ext.Element.addMethods({setBox:function(E,F,B){var D=this,A=E.width,C=E.height;
if((F&&!D.autoBoxAdjust)&&!D.isBorderBox()){A-=(D.getBorderWidth("lr")+D.getPadding("lr"));
C-=(D.getBorderWidth("tb")+D.getPadding("tb"));}D.setBounds(E.x,E.y,A,C,D.animTest.call(D,arguments,B,2));
return D;},getBox:function(G,A){var I=this,E,O,K,N=I.getBorderWidth,B=I.getPadding,P,L,D,J;
if(!A){E=I.getXY();}else{O=parseInt(I.getStyle("left"),10)||0;K=parseInt(I.getStyle("top"),10)||0;
E=[O,K];}var M=I.dom,C=M.offsetWidth,F=M.offsetHeight,H;if(!G){H={x:E[0],y:E[1],0:E[0],1:E[1],width:C,height:F};
}else{P=N.call(I,"l")+B.call(I,"l");L=N.call(I,"r")+B.call(I,"r");D=N.call(I,"t")+B.call(I,"t");
J=N.call(I,"b")+B.call(I,"b");H={x:E[0]+P,y:E[1]+D,0:E[0]+P,1:E[1]+D,width:C-(P+L),height:F-(D+J)};
}H.right=H.x+H.width;H.bottom=H.y+H.height;return H;},move:function(C,H,I){var L=this,F=L.getXY(),D=F[0],B=F[1],J=[D-H,B],E=[D+H,B],A=[D,B-H],G=[D,B+H],K={l:J,left:J,r:E,right:E,t:A,top:A,up:A,b:G,bottom:G,down:G};
C=C.toLowerCase();L.moveTo(K[C][0],K[C][1],L.animTest.call(L,arguments,I,2));},setLeftTop:function(D,C){var B=this,A=B.dom.style;
A.left=B.addUnits(D);A.top=B.addUnits(C);return B;},getRegion:function(){return Ext.lib.Dom.getRegion(this.dom);
},setBounds:function(B,F,D,A,C){var E=this;if(!C||!E.anim){E.setSize(D,A);E.setLocation(B,F);
}else{E.anim({points:{to:[B,F]},width:{to:E.adjustWidth(D)},height:{to:E.adjustHeight(A)}},E.preanim(arguments,4),"motion");
}return E;},setRegion:function(B,A){return this.setBounds(B.left,B.top,B.right-B.left,B.bottom-B.top,this.animTest.call(this,arguments,A,1));
}});Ext.Element.addMethods({isScrollable:function(){var A=this.dom;return A.scrollHeight>A.clientHeight||A.scrollWidth>A.clientWidth;
},scrollTo:function(A,B){this.dom["scroll"+(/top/i.test(A)?"Top":"Left")]=B;return this;
},getScroll:function(){var B=this.dom,A=document,C=A.body,E=A.documentElement,D,G,F;
if(B==A||B==C){if(Ext.isIE&&Ext.isStrict){D=E.scrollLeft;G=E.scrollTop;}else{D=window.pageXOffset;
G=window.pageYOffset;}F={left:D||(C?C.scrollLeft:0),top:G||(C?C.scrollTop:0)};}else{F={left:B.scrollLeft,top:B.scrollTop};
}return F;}});Ext.Element.addMethods({scrollTo:function(D,F,C){var B=/top/i,A="scroll"+(B.test(D)?"Top":"Left"),E=this,G=E.dom;
if(!C||!E.anim){G[A]=F;}else{E.anim({scroll:{to:B.test(A)?[G[A],F]:[F,G[A]]}},E.preanim(arguments,2),"scroll");
}return E;},scrollIntoView:function(M,F){var A=Ext.getDom(M)||Ext.getBody().dom,E=this.dom,N=this.getOffsetsTo(A),H=N[0]+A.scrollLeft,D=N[1]+A.scrollTop,B=D+E.offsetHeight,L=H+E.offsetWidth,K=A.clientHeight,I=parseInt(A.scrollTop,10),C=parseInt(A.scrollLeft,10),G=I+K,J=C+A.clientWidth;
if(E.offsetHeight>K||D<I){A.scrollTop=D;}else{if(B>G){A.scrollTop=B-K;}}A.scrollTop=A.scrollTop;
if(F!==false){if(E.offsetWidth>A.clientWidth||H<C){A.scrollLeft=H;}else{if(L>J){A.scrollLeft=L-A.clientWidth;
}}A.scrollLeft=A.scrollLeft;}return this;},scrollChildIntoView:function(B,A){Ext.fly(B,"_scrollChildIntoView").scrollIntoView(this,A);
},scroll:function(E,I,K){if(!this.isScrollable()){return;}var L=this.dom,M=L.scrollLeft,A=L.scrollTop,F=L.scrollWidth,D=L.scrollHeight,B=L.clientWidth,H=L.clientHeight,J=false,G,C={l:Math.min(M+I,F-B),r:G=Math.max(M-I,0),t:Math.max(A-I,0),b:Math.min(A+I,D-H)};
C.d=C.b;C.u=C.t;E=E.substr(0,1);if((G=C[E])>-1){J=true;this.scrollTo(E=="l"||E=="r"?"left":"top",G,this.preanim(arguments,2));
}return J;}});Ext.Element.VISIBILITY=1;Ext.Element.DISPLAY=2;Ext.Element.addMethods(function(){var A="visibility",H="display",F="hidden",C="none",E="originalDisplay",G="visibilityMode",I=Ext.Element.DISPLAY,J=Ext.Element.data,B=function(L){var K=J(L,E);
if(K===undefined){J(L,E,K="");}return K;},D=function(K){var L=J(K,G);if(L===undefined){J(K,G,L=1);
}return L;};return{originalDisplay:"",visibilityMode:1,setVisibilityMode:function(K){J(this.dom,G,K);
return this;},animate:function(N,K,O,M,L){this.anim(N,{duration:K,callback:O,easing:M},L);
return this;},anim:function(N,O,L,Q,M,K){L=L||"run";O=O||{};var P=this,R=Ext.lib.Anim[L](P.dom,N,(O.duration||Q)||0.35,(O.easing||M)||"easeOut",function(){if(K){K.call(P);
}if(O.callback){O.callback.call(O.scope||P,P,O);}},P);O.anim=R;return R;},preanim:function(K,L){return !K[L]?false:(Ext.isObject(K[L])?K[L]:{duration:K[L+1],callback:K[L+2],easing:K[L+3]});
},isVisible:function(){return !this.isStyle(A,F)&&!this.isStyle(H,C);},setVisible:function(O,N){var M=this,K=M.dom,L=D(this.dom)==I;
if(!N||!M.anim){if(L){M.setDisplayed(O);}else{M.fixDisplay();K.style.visibility=O?"visible":F;
}}else{if(O){M.setOpacity(0.01);M.setVisible(true);}M.anim({opacity:{to:(O?1:0)}},M.preanim(arguments,1),null,0.35,"easeIn",function(){if(!O){K.style[L?H:A]=(L)?C:F;
Ext.fly(K).setOpacity(1);}});}return M;},toggle:function(K){var L=this;L.setVisible(!L.isVisible(),L.preanim(arguments,0));
return L;},setDisplayed:function(K){if(typeof K=="boolean"){K=K?B(this.dom):C;}this.setStyle(H,K);
return this;},fixDisplay:function(){var K=this;if(K.isStyle(H,C)){K.setStyle(A,F);
K.setStyle(H,B(this.dom));if(K.isStyle(H,C)){K.setStyle(H,"block");}}},hide:function(K){this.setVisible(false,this.preanim(arguments,0));
return this;},show:function(K){this.setVisible(true,this.preanim(arguments,0));return this;
}};}());Ext.Element.addMethods(function(){var E="visibility",C="display",B="hidden",A="none",D="x-masked",G="x-masked-relative",F=Ext.Element.data;
return{isVisible:function(H){var I=!this.isStyle(E,B)&&!this.isStyle(C,A),J=this.dom.parentNode;
if(H!==true||!I){return I;}while(J&&!/body/i.test(J.tagName)){if(!Ext.fly(J,"_isVisible").isVisible()){return false;
}J=J.parentNode;}return true;},isDisplayed:function(){return !this.isStyle(C,A);},enableDisplayMode:function(H){this.setVisibilityMode(Ext.Element.DISPLAY);
if(!Ext.isEmpty(H)){F(this.dom,"originalDisplay",H);}return this;},mask:function(I,M){var O=this,K=O.dom,N=Ext.DomHelper,L="ext-el-mask-msg",H,P;
if(O.getStyle("position")=="static"){O.addClass(G);}if((H=F(K,"maskMsg"))){H.remove();
}if((H=F(K,"mask"))){H.remove();}P=N.append(K,{cls:"ext-el-mask"},true);F(K,"mask",P);
O.addClass(D);P.setDisplayed(true);if(typeof I=="string"){var J=N.append(K,{cls:L,cn:{tag:"div"}},true);
F(K,"maskMsg",J);J.dom.className=M?L+" "+M:L;J.dom.firstChild.innerHTML=I;J.setDisplayed(true);
J.center(O);}if(Ext.isIE&&!(Ext.isIE7&&Ext.isStrict)&&O.getStyle("height")=="auto"){P.setSize(undefined,O.getHeight());
}return P;},unmask:function(){var J=this,K=J.dom,H=F(K,"mask"),I=F(K,"maskMsg");if(H){if(I){I.remove();
F(K,"maskMsg",undefined);}H.remove();F(K,"mask",undefined);}J.removeClass([D,G]);
},isMasked:function(){var H=F(this.dom,"mask");return H&&H.isVisible();},createShim:function(){var H=document.createElement("iframe"),I;
H.frameBorder="0";H.className="ext-shim";if(Ext.isIE&&Ext.isSecure){H.src=Ext.SSL_SECURE_URL;
}I=Ext.get(this.dom.parentNode.insertBefore(H,this.dom));I.autoBoxAdjust=false;return I;
}};}());Ext.Element.addMethods({addKeyListener:function(B,D,C){var A;if(!Ext.isObject(B)||Ext.isArray(B)){A={key:B,fn:D,scope:C};
}else{A={key:B.key,shift:B.shift,ctrl:B.ctrl,alt:B.alt,fn:D,scope:C};}return new Ext.KeyMap(this,A);
},addKeyMap:function(A){return new Ext.KeyMap(this,A);}});(function(){var C=null,Z=undefined,P=true,I=false,O="setX",M="setY",U="setXY",S="left",Q="bottom",H="top",R="right",F="height",Aa="width",N="points",L="hidden",D="absolute",J="visible",Y="motion",T="position",G="easeOut",X=new Ext.Element.Flyweight(),K={},B=function(A){return A||{};
},E=function(A){X.dom=A;X.id=Ext.id(A);return X;},W=function(A){if(!K[A]){K[A]=[];
}return K[A];},V=function(A,a){K[A]=a;};Ext.enableFx=P;Ext.Fx={switchStatements:function(A,a,b){return a.apply(this,b[A]);
},slideIn:function(a,m){m=B(m);var c=this,A=c.dom,g=A.style,i,j,e,l,k,g,b,h,d,n;a=a||"t";
c.queueFx(m,function(){i=E(A).getXY();E(A).fixDisplay();j=E(A).getFxRestore();e={x:i[0],y:i[1],0:i[0],1:i[1],width:A.offsetWidth,height:A.offsetHeight};
e.right=e.x+e.width;e.bottom=e.y+e.height;E(A).setWidth(e.width).setHeight(e.height);
l=E(A).fxWrap(j.pos,m,L);g.visibility=J;g.position=D;function p(){E(A).fxUnwrap(l,j.pos,m);
g.width=j.width;g.height=j.height;E(A).afterFx(m);}h={to:[e.x,e.y]};d={to:e.width};
n={to:e.height};function o(Ac,y,q,z,s,u,r,Ab,x,w,v){var t={};E(Ac).setWidth(q).setHeight(z);
if(E(Ac)[s]){E(Ac)[s](u);}y[r]=y[Ab]="0";if(x){t.width=x;}if(w){t.height=w;}if(v){t.points=v;
}return t;}b=E(A).switchStatements(a.toLowerCase(),o,{t:[l,g,e.width,0,C,C,S,Q,C,n,C],l:[l,g,0,e.height,C,C,R,H,d,C,C],r:[l,g,e.width,e.height,O,e.right,S,H,C,C,h],b:[l,g,e.width,e.height,M,e.bottom,S,H,C,n,h],tl:[l,g,0,0,C,C,R,Q,d,n,h],bl:[l,g,0,0,M,e.y+e.height,R,H,d,n,h],br:[l,g,0,0,U,[e.right,e.bottom],S,H,d,n,h],tr:[l,g,0,0,O,e.x+e.width,S,Q,d,n,h]});
g.visibility=J;E(l).show();arguments.callee.anim=E(l).fxanim(b,m,Y,0.5,G,p);});return c;
},slideOut:function(k,i){i=B(i);var a=this,j=a.dom,d=j.style,e=a.getXY(),h,g,b,c,A={to:0};
k=k||"t";a.queueFx(i,function(){g=E(j).getFxRestore();b={x:e[0],y:e[1],0:e[0],1:e[1],width:j.offsetWidth,height:j.offsetHeight};
b.right=b.x+b.width;b.bottom=b.y+b.height;E(j).setWidth(b.width).setHeight(b.height);
h=E(j).fxWrap(g.pos,i,J);d.visibility=J;d.position=D;E(h).setWidth(b.width).setHeight(b.height);
function l(){i.useDisplay?E(j).setDisplayed(I):E(j).hide();E(j).fxUnwrap(h,g.pos,i);
d.width=g.width;d.height=g.height;E(j).afterFx(i);}function m(q,o,w,p,u,n,t,v,s){var r={};
q[o]=q[w]="0";r[p]=u;if(n){r[n]=t;}if(v){r[v]=s;}return r;}c=E(j).switchStatements(k.toLowerCase(),m,{t:[d,S,Q,F,A],l:[d,R,H,Aa,A],r:[d,S,H,Aa,A,N,{to:[b.right,b.y]}],b:[d,S,H,F,A,N,{to:[b.x,b.bottom]}],tl:[d,R,Q,Aa,A,F,A],bl:[d,R,H,Aa,A,F,A,N,{to:[b.x,b.bottom]}],br:[d,S,H,Aa,A,F,A,N,{to:[b.x+b.width,b.bottom]}],tr:[d,S,Q,Aa,A,F,A,N,{to:[b.right,b.y]}]});
arguments.callee.anim=E(h).fxanim(c,i,Y,0.5,G,l);});return a;},puff:function(a){a=B(a);
var g=this,A=g.dom,c=A.style,d,b,e;g.queueFx(a,function(){d=E(A).getWidth();b=E(A).getHeight();
E(A).clearOpacity();E(A).show();e=E(A).getFxRestore();function h(){a.useDisplay?E(A).setDisplayed(I):E(A).hide();
E(A).clearOpacity();E(A).setPositioning(e.pos);c.width=e.width;c.height=e.height;
c.fontSize="";E(A).afterFx(a);}arguments.callee.anim=E(A).fxanim({width:{to:E(A).adjustWidth(d*2)},height:{to:E(A).adjustHeight(b*2)},points:{by:[-d*0.5,-b*0.5]},opacity:{to:0},fontSize:{to:200,unit:"%"}},a,Y,0.5,G,h);
});return g;},switchOff:function(c){c=B(c);var a=this,b=a.dom,d=b.style,A;a.queueFx(c,function(){E(b).clearOpacity();
E(b).clip();A=E(b).getFxRestore();function e(){c.useDisplay?E(b).setDisplayed(I):E(b).hide();
E(b).clearOpacity();E(b).setPositioning(A.pos);d.width=A.width;d.height=A.height;
E(b).afterFx(c);}E(b).fxanim({opacity:{to:0.3}},C,C,0.1,C,function(){E(b).clearOpacity();
(function(){E(b).fxanim({height:{to:1},points:{by:[0,E(b).getHeight()*0.5]}},c,Y,0.3,"easeIn",e);
}).defer(100);});});return a;},highlight:function(d,a){a=B(a);var g=this,A=g.dom,b=a.attr||"backgroundColor",c={},e;
g.queueFx(a,function(){E(A).clearOpacity();E(A).show();function h(){A.style[b]=e;
E(A).afterFx(a);}e=A.style[b];c[b]={from:d||"ffff9c",to:a.endColor||E(A).getColor(b)||"ffffff"};
arguments.callee.anim=E(A).fxanim(c,a,"color",1,"easeIn",h);});return g;},frame:function(b,e,a){a=B(a);
var d=this,A=d.dom,c,g;d.queueFx(a,function(){b=b||"#C3DAF9";if(b.length==6){b="#"+b;
}e=e||1;E(A).show();var h=E(A).getXY(),j={x:h[0],y:h[1],0:h[0],1:h[1],width:A.offsetWidth,height:A.offsetHeight},i=function(){c=E(document.body||document.documentElement).createChild({style:{visbility:L,position:D,"z-index":35000,border:"0px solid "+b}});
return c.queueFx({},k);};arguments.callee.anim={isAnimated:true,stop:function(){e=0;
c.stopFx();}};function k(){var l=Ext.isBorderBox?2:1;g=c.anim({top:{from:j.y,to:j.y-20},left:{from:j.x,to:j.x-20},borderWidth:{from:0,to:10},opacity:{from:1,to:0},height:{from:j.height,to:j.height+20*l},width:{from:j.width,to:j.width+20*l}},{duration:a.duration||1,callback:function(){c.remove();
--e>0?i():E(A).afterFx(a);}});arguments.callee.anim={isAnimated:true,stop:function(){g.stop();
}};}i();});return d;},pause:function(a){var A=this.dom,b;this.queueFx({},function(){b=setTimeout(function(){E(A).afterFx({});
},a*1000);arguments.callee.anim={isAnimated:true,stop:function(){clearTimeout(b);
E(A).afterFx({});}};});return this;},fadeIn:function(a){a=B(a);var c=this,A=c.dom,b=a.endOpacity||1;
c.queueFx(a,function(){E(A).setOpacity(0);E(A).fixDisplay();A.style.visibility=J;
arguments.callee.anim=E(A).fxanim({opacity:{to:b}},a,C,0.5,G,function(){if(b==1){E(A).clearOpacity();
}E(A).afterFx(a);});});return c;},fadeOut:function(b){b=B(b);var A=this,a=A.dom,d=a.style,c=b.endOpacity||0;
A.queueFx(b,function(){arguments.callee.anim=E(a).fxanim({opacity:{to:c}},b,C,0.5,G,function(){if(c==0){Ext.Element.data(a,"visibilityMode")==Ext.Element.DISPLAY||b.useDisplay?d.display="none":d.visibility=L;
E(a).clearOpacity();}E(a).afterFx(b);});});return A;},scale:function(b,A,a){this.shift(Ext.apply({},a,{width:b,height:A}));
return this;},shift:function(a){a=B(a);var A=this.dom,b={};this.queueFx(a,function(){for(var c in a){if(a[c]!=Z){b[c]={to:a[c]};
}}b.width?b.width.to=E(A).adjustWidth(a.width):b;b.height?b.height.to=E(A).adjustWidth(a.height):b;
if(b.x||b.y||b.xy){b.points=b.xy||{to:[b.x?b.x.to:E(A).getX(),b.y?b.y.to:E(A).getY()]};
}arguments.callee.anim=E(A).fxanim(b,a,Y,0.35,G,function(){E(A).afterFx(a);});});
return this;},ghost:function(i,g){g=B(g);var A=this,h=A.dom,c=h.style,a={opacity:{to:0},points:{}},d=a.points,e,b,j;
i=i||"b";A.queueFx(g,function(){e=E(h).getFxRestore();b=E(h).getWidth();j=E(h).getHeight();
function k(){g.useDisplay?E(h).setDisplayed(I):E(h).hide();E(h).clearOpacity();E(h).setPositioning(e.pos);
c.width=e.width;c.height=e.height;E(h).afterFx(g);}d.by=E(h).switchStatements(i.toLowerCase(),function(m,l){return[m,l];
},{t:[0,-j],l:[-b,0],r:[b,0],b:[0,j],tl:[-b,-j],bl:[-b,j],br:[b,j],tr:[b,-j]});arguments.callee.anim=E(h).fxanim(a,g,Y,0.5,G,k);
});return A;},syncFx:function(){var A=this;A.fxDefaults=Ext.apply(A.fxDefaults||{},{block:I,concurrent:P,stopFx:I});
return A;},sequenceFx:function(){var A=this;A.fxDefaults=Ext.apply(A.fxDefaults||{},{block:I,concurrent:I,stopFx:I});
return A;},nextFx:function(){var A=W(this.dom.id)[0];if(A){A.call(this);}},hasActiveFx:function(){return W(this.dom.id)[0];
},stopFx:function(c){var A=this,b=A.dom.id;if(A.hasActiveFx()){var a=W(b)[0];if(a&&a.anim){if(a.anim.isAnimated){V(b,[a]);
a.anim.stop(c!==undefined?c:P);}else{V(b,[]);}}}return A;},beforeFx:function(A){if(this.hasActiveFx()&&!A.concurrent){if(A.stopFx){this.stopFx();
return P;}return I;}return P;},hasFxBlock:function(){var A=W(this.dom.id);return A&&A[0]&&A[0].block;
},queueFx:function(b,c){var A=this;if(!A.hasFxBlock()){Ext.applyIf(b,A.fxDefaults);
if(!b.concurrent){var a=A.beforeFx(b);c.block=b.block;W(A.dom.id).push(c);if(a){A.nextFx();
}}else{c.call(A);}}return A;},fxWrap:function(a,g,d){var e=this.dom,c,b;if(!g.wrap||!(c=Ext.getDom(g.wrap))){if(g.fixPosition){b=E(e).getXY();
}var A=document.createElement("div");A.style.visibility=d;c=e.parentNode.insertBefore(A,e);
E(c).setPositioning(a);if(E(c).isStyle(T,"static")){E(c).position("relative");}E(e).clearPositioning("auto");
E(c).clip();c.appendChild(e);if(b){E(c).setXY(b);}}return c;},fxUnwrap:function(c,b,a){var A=this.dom;
E(A).clearPositioning();E(A).setPositioning(b);if(!a.wrap){c.parentNode.insertBefore(A,c);
E(c).remove();}},getFxRestore:function(){var A=this.dom.style;return{pos:this.getPositioning(),width:A.width,height:A.height};
},afterFx:function(A){var c=this.dom,b=c.id,a=!A.concurrent;if(A.afterStyle){E(c).setStyle(A.afterStyle);
}if(A.afterCls){E(c).addClass(A.afterCls);}if(A.remove==P){E(c).remove();}if(a){W(b).shift();
}if(A.callback){A.callback.call(A.scope,E(c));}if(a){E(c).nextFx();}},fxanim:function(e,g,c,A,d,b){c=c||"run";
g=g||{};var a=Ext.lib.Anim[c](this.dom,e,(g.duration||A)||0.35,(g.easing||d)||G,b,this);
g.anim=a;return a;}};Ext.Fx.resize=Ext.Fx.scale;Ext.Element.addMethods(Ext.Fx);})();
Ext.CompositeElementLite=function(B,A){this.elements=[];this.add(B,A);this.el=new Ext.Element.Flyweight();
};Ext.CompositeElementLite.prototype={isComposite:true,getCount:function(){return this.elements.length;
},add:function(B){if(B){if(Ext.isArray(B)){this.elements=this.elements.concat(B);
}else{var A=this.elements;Ext.each(B,function(C){A.push(C);});}}return this;},invoke:function(D,A){var B=this.elements,C=this.el;
Ext.each(B,function(E){C.dom=E;Ext.Element.prototype[D].apply(C,A);});return this;
},item:function(A){var B=this;if(!B.elements[A]){return null;}B.el.dom=B.elements[A];
return B.el;},addListener:function(A,D,C,B){Ext.each(this.elements,function(E){Ext.EventManager.on(E,A,D,C||E,B);
});return this;},each:function(C,B){var D=this,A=D.el;Ext.each(D.elements,function(E,F){A.dom=E;
return C.call(B||A,A,D,F);});return D;},indexOf:function(A){return this.elements.indexOf(Ext.getDom(A));
},replaceElement:function(E,D,B){var C=!isNaN(E)?E:this.indexOf(E),A;if(C>-1){D=Ext.getDom(D);
if(B){A=this.elements[C];A.parentNode.insertBefore(D,A);Ext.removeNode(A);}this.elements.splice(C,1,D);
}return this;},clear:function(){this.elements=[];}};Ext.CompositeElementLite.prototype.on=Ext.CompositeElementLite.prototype.addListener;
(function(){var C,B=Ext.Element.prototype,A=Ext.CompositeElementLite.prototype;for(C in B){if(Ext.isFunction(B[C])){(function(D){A[D]=A[D]||function(){return this.invoke(D,arguments);
};}).call(A,C);}}})();if(Ext.DomQuery){Ext.Element.selectorFunction=Ext.DomQuery.select;
}Ext.Element.select=function(A,D,B){var C;if(typeof A=="string"){C=Ext.Element.selectorFunction(A,B);
}else{if(A.length!==undefined){C=A;}else{throw"Invalid selector";}}return new Ext.CompositeElementLite(C);
};Ext.select=Ext.Element.select;Ext.apply(Ext.CompositeElementLite.prototype,{addElements:function(C,A){if(!C){return this;
}if(typeof C=="string"){C=Ext.Element.selectorFunction(C,A);}var B=this.elements;
Ext.each(C,function(D){B.push(Ext.get(D));});return this;},fill:function(A){this.elements=[];
this.add(A);return this;},first:function(){return this.item(0);},last:function(){return this.item(this.getCount()-1);
},contains:function(A){return this.indexOf(A)!=-1;},filter:function(A){var B=[];this.each(function(C){if(C.is(A)){B[B.length]=C.dom;
}});this.fill(B);return this;},removeElement:function(D,E){var C=this,A=this.elements,B;
Ext.each(D,function(F){if((B=(A[F]||A[F=C.indexOf(F)]))){if(E){if(B.dom){B.remove();
}else{Ext.removeNode(B);}}A.splice(F,1);}});return this;}});Ext.CompositeElement=function(B,A){this.elements=[];
this.add(B,A);};Ext.extend(Ext.CompositeElement,Ext.CompositeElementLite,{invoke:function(B,A){Ext.each(this.elements,function(C){Ext.Element.prototype[B].apply(C,A);
});return this;},add:function(C,A){if(!C){return this;}if(typeof C=="string"){C=Ext.Element.selectorFunction(C,A);
}var B=this.elements;Ext.each(C,function(D){B.push(Ext.get(D));});return this;},item:function(A){return this.elements[A]||null;
},indexOf:function(A){return this.elements.indexOf(Ext.get(A));},filter:function(A){var C=this,B=[];
Ext.each(C.elements,function(D){if(D.is(A)){B.push(Ext.get(D));}});C.elements=B;return C;
},each:function(B,A){Ext.each(this.elements,function(C,D){return B.call(A||C,C,this,D);
},this);return this;}});Ext.Element.select=function(A,D,B){var C;if(typeof A=="string"){C=Ext.Element.selectorFunction(A,B);
}else{if(A.length!==undefined){C=A;}else{throw"Invalid selector";}}return(D===true)?new Ext.CompositeElement(C):new Ext.CompositeElementLite(C);
};Ext.select=Ext.Element.select;(function(){var H="beforerequest",E="requestcomplete",D="requestexception",J=undefined,B="load",A="POST",C="GET",K=window;
Ext.data.Connection=function(L){Ext.apply(this,L);this.addEvents(H,E,D);Ext.data.Connection.superclass.constructor.call(this);
};function G(M){this.transId=false;var L=M.argument.options;M.argument=L?L.argument:null;
this.fireEvent(E,this,M,L);if(L.success){L.success.call(L.scope,M,L);}if(L.callback){L.callback.call(L.scope,L,true,M);
}}function I(M,L){this.transId=false;var N=M.argument.options;M.argument=N?N.argument:null;
this.fireEvent(D,this,M,N,L);if(N.failure){N.failure.call(N.scope,M,N);}if(N.callback){N.callback.call(N.scope,N,false,M);
}}function F(S,W,X){var O=Ext.id(),N=document,T=N.createElement("iframe"),P=Ext.getDom(S.form),M=[],L,R="multipart/form-data",Q={target:P.target,method:P.method,encoding:P.encoding,enctype:P.enctype,action:P.action};
Ext.apply(T,{id:O,name:O,className:"x-hidden",src:Ext.SSL_SECURE_URL});N.body.appendChild(T);
if(Ext.isIE){document.frames[O].name=O;}Ext.apply(P,{target:O,method:A,enctype:R,encoding:R,action:X||Q.action});
W=Ext.urlDecode(W,false);for(var V in W){if(W.hasOwnProperty(V)){L=N.createElement("input");
L.type="hidden";L.value=W[L.name=V];P.appendChild(L);M.push(L);}}function U(){var a=this,Z={responseText:"",responseXML:null,argument:S.argument},d,c;
try{d=T.contentWindow.document||T.contentDocument||K.frames[O].document;if(d){if(d.body){if(/textarea/i.test((c=d.body.firstChild||{}).tagName)){Z.responseText=c.value;
}else{Z.responseText=d.body.innerHTML;}}Z.responseXML=d.XMLDocument||d;}}catch(b){}Ext.EventManager.removeListener(T,B,U,a);
a.fireEvent(E,a,Z,S);function Y(g,h,e){if(Ext.isFunction(g)){g.apply(h,e);}}Y(S.success,S.scope,[Z,S]);
Y(S.callback,S.scope,[S,true,Z]);if(!a.debugUploads){setTimeout(function(){Ext.removeNode(T);
},100);}}Ext.EventManager.on(T,B,U,this);P.submit();Ext.apply(P,Q);Ext.each(M,function(Y){Ext.removeNode(Y);
});}Ext.extend(Ext.data.Connection,Ext.util.Observable,{timeout:30000,autoAbort:false,disableCaching:true,disableCachingParam:"_dc",request:function(P){var S=this;
if(S.fireEvent(H,S,P)){if(P.el){if(!Ext.isEmpty(P.indicatorText)){S.indicatorText='<div class="loading-indicator">'+P.indicatorText+"</div>";
}if(S.indicatorText){Ext.getDom(P.el).innerHTML=S.indicatorText;}P.success=(Ext.isFunction(P.success)?P.success:function(){}).createInterceptor(function(U){Ext.getDom(P.el).innerHTML=U.responseText;
});}var N=P.params,M=P.url||S.url,L,Q={success:G,failure:I,scope:S,argument:{options:P},timeout:P.timeout||S.timeout},O,T;
if(Ext.isFunction(N)){N=N.call(P.scope||K,P);}N=Ext.urlEncode(S.extraParams,Ext.isObject(N)?Ext.urlEncode(N):N);
if(Ext.isFunction(M)){M=M.call(P.scope||K,P);}if((O=Ext.getDom(P.form))){M=M||O.action;
if(P.isUpload||/multipart\/form-data/i.test(O.getAttribute("enctype"))){return F.call(S,P,N,M);
}T=Ext.lib.Ajax.serializeForm(O);N=N?(N+"&"+T):T;}L=P.method||S.method||((N||P.xmlData||P.jsonData)?A:C);
if(L===C&&(S.disableCaching&&P.disableCaching!==false)||P.disableCaching===true){var R=P.disableCachingParam||S.disableCachingParam;
M=Ext.urlAppend(M,R+"="+(new Date().getTime()));}P.headers=Ext.apply(P.headers||{},S.defaultHeaders||{});
if(P.autoAbort===true||S.autoAbort){S.abort();}if((L==C||P.xmlData||P.jsonData)&&N){M=Ext.urlAppend(M,N);
N="";}return(S.transId=Ext.lib.Ajax.request(L,M,Q,N,P));}else{return P.callback?P.callback.apply(P.scope,[P,J,J]):null;
}},isLoading:function(L){return L?Ext.lib.Ajax.isCallInProgress(L):!!this.transId;
},abort:function(L){if(L||this.isLoading()){Ext.lib.Ajax.abort(L||this.transId);}}});
})();Ext.Ajax=new Ext.data.Connection({autoAbort:false,serializeForm:function(A){return Ext.lib.Ajax.serializeForm(A);
}});Ext.UpdateManager=Ext.Updater=Ext.extend(Ext.util.Observable,function(){var B="beforeupdate",D="update",C="failure";
function A(G){var H=this;H.transaction=null;if(G.argument.form&&G.argument.reset){try{G.argument.form.reset();
}catch(I){}}if(H.loadScripts){H.renderer.render(H.el,G,H,F.createDelegate(H,[G]));
}else{H.renderer.render(H.el,G,H);F.call(H,G);}}function F(G,H,I){this.fireEvent(H||D,this.el,G);
if(Ext.isFunction(G.argument.callback)){G.argument.callback.call(G.argument.scope,this.el,Ext.isEmpty(I)?true:false,G,G.argument.options);
}}function E(G){F.call(this,G,C,!!(this.transaction=null));}return{constructor:function(H,G){var I=this;
H=Ext.get(H);if(!G&&H.updateManager){return H.updateManager;}I.el=H;I.defaultUrl=null;
I.addEvents(B,D,C);Ext.apply(I,Ext.Updater.defaults);I.transaction=null;I.refreshDelegate=I.refresh.createDelegate(I);
I.updateDelegate=I.update.createDelegate(I);I.formUpdateDelegate=(I.formUpdate||function(){}).createDelegate(I);
I.renderer=I.renderer||I.getDefaultRenderer();Ext.Updater.superclass.constructor.call(I);
},setRenderer:function(G){this.renderer=G;},getRenderer:function(){return this.renderer;
},getDefaultRenderer:function(){return new Ext.Updater.BasicRenderer();},setDefaultUrl:function(G){this.defaultUrl=G;
},getEl:function(){return this.el;},update:function(H,M,N,K){var J=this,G,I;if(J.fireEvent(B,J.el,H,M)!==false){if(Ext.isObject(H)){G=H;
H=G.url;M=M||G.params;N=N||G.callback;K=K||G.discardUrl;I=G.scope;if(!Ext.isEmpty(G.nocache)){J.disableCaching=G.nocache;
}if(!Ext.isEmpty(G.text)){J.indicatorText='<div class="loading-indicator">'+G.text+"</div>";
}if(!Ext.isEmpty(G.scripts)){J.loadScripts=G.scripts;}if(!Ext.isEmpty(G.timeout)){J.timeout=G.timeout;
}}J.showLoading();if(!K){J.defaultUrl=H;}if(Ext.isFunction(H)){H=H.call(J);}var L=Ext.apply({},{url:H,params:(Ext.isFunction(M)&&I)?M.createDelegate(I):M,success:A,failure:E,scope:J,callback:undefined,timeout:(J.timeout*1000),disableCaching:J.disableCaching,argument:{options:G,url:H,form:null,callback:N,scope:I||window,params:M}},G);
J.transaction=Ext.Ajax.request(L);}},formUpdate:function(J,G,I,K){var H=this;if(H.fireEvent(B,H.el,J,G)!==false){if(Ext.isFunction(G)){G=G.call(H);
}J=Ext.getDom(J);H.transaction=Ext.Ajax.request({form:J,url:G,success:A,failure:E,scope:H,timeout:(H.timeout*1000),argument:{url:G,form:J,callback:K,reset:I}});
H.showLoading.defer(1,H);}},startAutoRefresh:function(H,I,K,L,G){var J=this;if(G){J.update(I||J.defaultUrl,K,L,true);
}if(J.autoRefreshProcId){clearInterval(J.autoRefreshProcId);}J.autoRefreshProcId=setInterval(J.update.createDelegate(J,[I||J.defaultUrl,K,L,true]),H*1000);
},stopAutoRefresh:function(){if(this.autoRefreshProcId){clearInterval(this.autoRefreshProcId);
delete this.autoRefreshProcId;}},isAutoRefreshing:function(){return !!this.autoRefreshProcId;
},showLoading:function(){if(this.showLoadIndicator){this.el.dom.innerHTML=this.indicatorText;
}},abort:function(){if(this.transaction){Ext.Ajax.abort(this.transaction);}},isUpdating:function(){return this.transaction?Ext.Ajax.isLoading(this.transaction):false;
},refresh:function(G){if(this.defaultUrl){this.update(this.defaultUrl,null,G,true);
}}};}());Ext.Updater.defaults={timeout:30,disableCaching:false,showLoadIndicator:true,indicatorText:'<div class="loading-indicator">Loading...</div>',loadScripts:false,sslBlankUrl:(Ext.SSL_SECURE_URL||"javascript:false")};
Ext.Updater.updateElement=function(D,C,E,B){var A=Ext.get(D).getUpdater();Ext.apply(A,B);
A.update(C,E,B?B.callback:null);};Ext.Updater.BasicRenderer=function(){};Ext.Updater.BasicRenderer.prototype={render:function(C,A,B,D){C.update(A.responseText,B.loadScripts,D);
}};(function(){Date.useStrict=false;function B(C){var D=Array.prototype.slice.call(arguments,1);
return C.replace(/\{(\d+)\}/g,function(F,E){return D[E];});}Date.formatCodeToRegex=function(D,C){var E=Date.parseCodes[D];
if(E){E=typeof E=="function"?E():E;Date.parseCodes[D]=E;}return E?Ext.applyIf({c:E.c?B(E.c,C||"{0}"):E.c},E):{g:0,c:null,s:Ext.escapeRe(D)};
};var A=Date.formatCodeToRegex;Ext.apply(Date,{parseFunctions:{"M$":function(E,D){var F=new RegExp("\\/Date\\(([-+])?(\\d+)(?:[+-]\\d{4})?\\)\\/");
var C=(E||"").match(F);return C?new Date(((C[1]||"")+C[2])*1):null;}},parseRegexes:[],formatFunctions:{"M$":function(){return"\\/Date("+this.getTime()+")\\/";
}},y2kYear:50,MILLI:"ms",SECOND:"s",MINUTE:"mi",HOUR:"h",DAY:"d",MONTH:"mo",YEAR:"y",defaults:{},dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNumbers:{Jan:0,Feb:1,Mar:2,Apr:3,May:4,Jun:5,Jul:6,Aug:7,Sep:8,Oct:9,Nov:10,Dec:11},getShortMonthName:function(C){return Date.monthNames[C].substring(0,3);
},getShortDayName:function(C){return Date.dayNames[C].substring(0,3);},getMonthNumber:function(C){return Date.monthNumbers[C.substring(0,1).toUpperCase()+C.substring(1,3).toLowerCase()];
},formatCodes:{d:"String.leftPad(this.getDate(), 2, '0')",D:"Date.getShortDayName(this.getDay())",j:"this.getDate()",l:"Date.dayNames[this.getDay()]",N:"(this.getDay() ? this.getDay() : 7)",S:"this.getSuffix()",w:"this.getDay()",z:"this.getDayOfYear()",W:"String.leftPad(this.getWeekOfYear(), 2, '0')",F:"Date.monthNames[this.getMonth()]",m:"String.leftPad(this.getMonth() + 1, 2, '0')",M:"Date.getShortMonthName(this.getMonth())",n:"(this.getMonth() + 1)",t:"this.getDaysInMonth()",L:"(this.isLeapYear() ? 1 : 0)",o:"(this.getFullYear() + (this.getWeekOfYear() == 1 && this.getMonth() > 0 ? +1 : (this.getWeekOfYear() >= 52 && this.getMonth() < 11 ? -1 : 0)))",Y:"this.getFullYear()",y:"('' + this.getFullYear()).substring(2, 4)",a:"(this.getHours() < 12 ? 'am' : 'pm')",A:"(this.getHours() < 12 ? 'AM' : 'PM')",g:"((this.getHours() % 12) ? this.getHours() % 12 : 12)",G:"this.getHours()",h:"String.leftPad((this.getHours() % 12) ? this.getHours() % 12 : 12, 2, '0')",H:"String.leftPad(this.getHours(), 2, '0')",i:"String.leftPad(this.getMinutes(), 2, '0')",s:"String.leftPad(this.getSeconds(), 2, '0')",u:"String.leftPad(this.getMilliseconds(), 3, '0')",O:"this.getGMTOffset()",P:"this.getGMTOffset(true)",T:"this.getTimezone()",Z:"(this.getTimezoneOffset() * -60)",c:function(){for(var F="Y-m-dTH:i:sP",C=[],D=0,G=F.length;
D<G;++D){var E=F.charAt(D);C.push(E=="T"?"'T'":Date.getFormatCode(E));}return C.join(" + ");
},U:"Math.round(this.getTime() / 1000)"},isValid:function(G,H,F,D,J,C,I){D=D||0;J=J||0;
C=C||0;I=I||0;var E=new Date(G,H-1,F,D,J,C,I);return G==E.getFullYear()&&H==E.getMonth()+1&&F==E.getDate()&&D==E.getHours()&&J==E.getMinutes()&&C==E.getSeconds()&&I==E.getMilliseconds();
},parseDate:function(E,C,D){var F=Date.parseFunctions;if(F[C]==null){Date.createParser(C);
}return F[C](E,Ext.isDefined(D)?D:Date.useStrict);},getFormatCode:function(C){var D=Date.formatCodes[C];
if(D){D=typeof D=="function"?D():D;Date.formatCodes[C]=D;}return D||("'"+String.escape(C)+"'");
},createFormat:function(C){var D=[],E=false,G="";for(var F=0;F<C.length;++F){G=C.charAt(F);
if(!E&&G=="\\"){E=true;}else{if(E){E=false;D.push("'"+String.escape(G)+"'");}else{D.push(Date.getFormatCode(G));
}}}Date.formatFunctions[C]=new Function("return "+D.join("+"));},createParser:function(){var C=["var dt, y, m, d, h, i, s, ms, o, z, zz, u, v,","def = Date.defaults,","results = String(input).match(Date.parseRegexes[{0}]);","if(results){","{1}","if(u != null){","v = new Date(u * 1000);","}else{","dt = (new Date()).clearTime();","y = y >= 0? y : Ext.num(def.y, dt.getFullYear());","m = m >= 0? m : Ext.num(def.m - 1, dt.getMonth());","d = d >= 0? d : Ext.num(def.d, dt.getDate());","h  = h || Ext.num(def.h, dt.getHours());","i  = i || Ext.num(def.i, dt.getMinutes());","s  = s || Ext.num(def.s, dt.getSeconds());","ms = ms || Ext.num(def.ms, dt.getMilliseconds());","if(z >= 0 && y >= 0){","v = new Date(y, 0, 1, h, i, s, ms);","v = !strict? v : (strict === true && (z <= 364 || (v.isLeapYear() && z <= 365))? v.add(Date.DAY, z) : null);","}else if(strict === true && !Date.isValid(y, m + 1, d, h, i, s, ms)){","v = null;","}else{","v = new Date(y, m, d, h, i, s, ms);","}","}","}","if(v){","if(zz != null){","v = v.add(Date.SECOND, -v.getTimezoneOffset() * 60 - zz);","}else if(o){","v = v.add(Date.MINUTE, -v.getTimezoneOffset() + (sn == '+'? -1 : 1) * (hr * 60 + mn));","}","}","return v;"].join("\n");
return function(H){var K=Date.parseRegexes.length,I=1,L=[],G=[],F=false,J="";for(var E=0;
E<H.length;++E){J=H.charAt(E);if(!F&&J=="\\"){F=true;}else{if(F){F=false;G.push(String.escape(J));
}else{var D=A(J,I);I+=D.g;G.push(D.s);if(D.g&&D.c){L.push(D.c);}}}}Date.parseRegexes[K]=new RegExp("^"+G.join("")+"$","i");
Date.parseFunctions[H]=new Function("input","strict",B(C,K,L.join("")));};}(),parseCodes:{d:{g:1,c:"d = parseInt(results[{0}], 10);\n",s:"(\\d{2})"},j:{g:1,c:"d = parseInt(results[{0}], 10);\n",s:"(\\d{1,2})"},D:function(){for(var D=[],C=0;
C<7;D.push(Date.getShortDayName(C)),++C){}return{g:0,c:null,s:"(?:"+D.join("|")+")"};
},l:function(){return{g:0,c:null,s:"(?:"+Date.dayNames.join("|")+")"};},N:{g:0,c:null,s:"[1-7]"},S:{g:0,c:null,s:"(?:st|nd|rd|th)"},w:{g:0,c:null,s:"[0-6]"},z:{g:1,c:"z = parseInt(results[{0}], 10);\n",s:"(\\d{1,3})"},W:{g:0,c:null,s:"(?:\\d{2})"},F:function(){return{g:1,c:"m = parseInt(Date.getMonthNumber(results[{0}]), 10);\n",s:"("+Date.monthNames.join("|")+")"};
},M:function(){for(var D=[],C=0;C<12;D.push(Date.getShortMonthName(C)),++C){}return Ext.applyIf({s:"("+D.join("|")+")"},A("F"));
},m:{g:1,c:"m = parseInt(results[{0}], 10) - 1;\n",s:"(\\d{2})"},n:{g:1,c:"m = parseInt(results[{0}], 10) - 1;\n",s:"(\\d{1,2})"},t:{g:0,c:null,s:"(?:\\d{2})"},L:{g:0,c:null,s:"(?:1|0)"},o:function(){return A("Y");
},Y:{g:1,c:"y = parseInt(results[{0}], 10);\n",s:"(\\d{4})"},y:{g:1,c:"var ty = parseInt(results[{0}], 10);\ny = ty > Date.y2kYear ? 1900 + ty : 2000 + ty;\n",s:"(\\d{1,2})"},a:{g:1,c:"if (results[{0}] == 'am') {\nif (h == 12) { h = 0; }\n} else { if (h < 12) { h += 12; }}",s:"(am|pm)"},A:{g:1,c:"if (results[{0}] == 'AM') {\nif (h == 12) { h = 0; }\n} else { if (h < 12) { h += 12; }}",s:"(AM|PM)"},g:function(){return A("G");
},G:{g:1,c:"h = parseInt(results[{0}], 10);\n",s:"(\\d{1,2})"},h:function(){return A("H");
},H:{g:1,c:"h = parseInt(results[{0}], 10);\n",s:"(\\d{2})"},i:{g:1,c:"i = parseInt(results[{0}], 10);\n",s:"(\\d{2})"},s:{g:1,c:"s = parseInt(results[{0}], 10);\n",s:"(\\d{2})"},u:{g:1,c:"ms = results[{0}]; ms = parseInt(ms, 10)/Math.pow(10, ms.length - 3);\n",s:"(\\d+)"},O:{g:1,c:["o = results[{0}];","var sn = o.substring(0,1),","hr = o.substring(1,3)*1 + Math.floor(o.substring(3,5) / 60),","mn = o.substring(3,5) % 60;","o = ((-12 <= (hr*60 + mn)/60) && ((hr*60 + mn)/60 <= 14))? (sn + String.leftPad(hr, 2, '0') + String.leftPad(mn, 2, '0')) : null;\n"].join("\n"),s:"([+-]\\d{4})"},P:{g:1,c:["o = results[{0}];","var sn = o.substring(0,1),","hr = o.substring(1,3)*1 + Math.floor(o.substring(4,6) / 60),","mn = o.substring(4,6) % 60;","o = ((-12 <= (hr*60 + mn)/60) && ((hr*60 + mn)/60 <= 14))? (sn + String.leftPad(hr, 2, '0') + String.leftPad(mn, 2, '0')) : null;\n"].join("\n"),s:"([+-]\\d{2}:\\d{2})"},T:{g:0,c:null,s:"[A-Z]{1,4}"},Z:{g:1,c:"zz = results[{0}] * 1;\nzz = (-43200 <= zz && zz <= 50400)? zz : null;\n",s:"([+-]?\\d{1,5})"},c:function(){var F=[],D=[A("Y",1),A("m",2),A("d",3),A("h",4),A("i",5),A("s",6),{c:"ms = results[7] || '0'; ms = parseInt(ms, 10)/Math.pow(10, ms.length - 3);\n"},{c:["if(results[8]) {","if(results[8] == 'Z'){","zz = 0;","}else if (results[8].indexOf(':') > -1){",A("P",8).c,"}else{",A("O",8).c,"}","}"].join("\n")}];
for(var C=0,E=D.length;C<E;++C){F.push(D[C].c);}return{g:1,c:F.join(""),s:[D[0].s,"(?:","-",D[1].s,"(?:","-",D[2].s,"(?:","(?:T| )?",D[3].s,":",D[4].s,"(?::",D[5].s,")?","(?:(?:\\.|,)(\\d+))?","(Z|(?:[-+]\\d{2}(?::)?\\d{2}))?",")?",")?",")?"].join("")};
},U:{g:1,c:"u = parseInt(results[{0}], 10);\n",s:"(-?\\d+)"}}});}());Ext.apply(Date.prototype,{dateFormat:function(A){if(Date.formatFunctions[A]==null){Date.createFormat(A);
}return Date.formatFunctions[A].call(this);},getTimezone:function(){return this.toString().replace(/^.* (?:\((.*)\)|([A-Z]{1,4})(?:[\-+][0-9]{4})?(?: -?\d+)?)$/,"$1$2").replace(/[^A-Z]/g,"");
},getGMTOffset:function(A){return(this.getTimezoneOffset()>0?"-":"+")+String.leftPad(Math.floor(Math.abs(this.getTimezoneOffset())/60),2,"0")+(A?":":"")+String.leftPad(Math.abs(this.getTimezoneOffset()%60),2,"0");
},getDayOfYear:function(){var C=0,B=0,D=this.clone(),A=this.getMonth();for(C=0,D.setMonth(0);
C<A;D.setMonth(++C)){B+=D.getDaysInMonth();}return B+this.getDate()-1;},getWeekOfYear:function(){var A=86400000,B=7*A;
return function(){var D=Date.UTC(this.getFullYear(),this.getMonth(),this.getDate()+3)/A,C=Math.floor(D/7),E=new Date(C*B).getUTCFullYear();
return C-Math.floor(Date.UTC(E,0,7)/B)+1;};}(),isLeapYear:function(){var A=this.getFullYear();
return !!((A&3)==0&&(A%100||(A%400==0&&A)));},getFirstDayOfMonth:function(){var A=(this.getDay()-(this.getDate()-1))%7;
return(A<0)?(A+7):A;},getLastDayOfMonth:function(){return this.getLastDateOfMonth().getDay();
},getFirstDateOfMonth:function(){return new Date(this.getFullYear(),this.getMonth(),1);
},getLastDateOfMonth:function(){return new Date(this.getFullYear(),this.getMonth(),this.getDaysInMonth());
},getDaysInMonth:function(){var A=[31,28,31,30,31,30,31,31,30,31,30,31];return function(){var B=this.getMonth();
return B==1&&this.isLeapYear()?29:A[B];};}(),getSuffix:function(){switch(this.getDate()){case 1:case 21:case 31:return"st";
case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th";}},clone:function(){return new Date(this.getTime());
},isDST:function(){return new Date(this.getFullYear(),0,1).getTimezoneOffset()!=this.getTimezoneOffset();
},clearTime:function(A){if(A){return this.clone().clearTime();}var C=this.getDate();
this.setHours(0);this.setMinutes(0);this.setSeconds(0);this.setMilliseconds(0);if(this.getDate()!=C){for(var B=1,D=this.add(Date.HOUR,B);
D.getDate()!=C;B++,D=this.add(Date.HOUR,B)){}this.setDate(C);this.setHours(D.getHours());
}return this;},add:function(B,C){var D=this.clone();if(!B||C===0){return D;}switch(B.toLowerCase()){case Date.MILLI:D.setMilliseconds(this.getMilliseconds()+C);
break;case Date.SECOND:D.setSeconds(this.getSeconds()+C);break;case Date.MINUTE:D.setMinutes(this.getMinutes()+C);
break;case Date.HOUR:D.setHours(this.getHours()+C);break;case Date.DAY:D.setDate(this.getDate()+C);
break;case Date.MONTH:var A=this.getDate();if(A>28){A=Math.min(A,this.getFirstDateOfMonth().add("mo",C).getLastDateOfMonth().getDate());
}D.setDate(A);D.setMonth(this.getMonth()+C);break;case Date.YEAR:D.setFullYear(this.getFullYear()+C);
break;}return D;},between:function(C,A){var B=this.getTime();return C.getTime()<=B&&B<=A.getTime();
}});Date.prototype.format=Date.prototype.dateFormat;if(Ext.isSafari&&(navigator.userAgent.match(/WebKit\/(\d+)/)[1]||NaN)<420){Ext.apply(Date.prototype,{_xMonth:Date.prototype.setMonth,_xDate:Date.prototype.setDate,setMonth:function(A){if(A<=-1){var D=Math.ceil(-A),C=Math.ceil(D/12),B=(D%12)?12-D%12:0;
this.setFullYear(this.getFullYear()-C);return this._xMonth(B);}else{return this._xMonth(A);
}},setDate:function(A){return this.setTime(this.getTime()-(this.getDate()-A)*86400000);
}});}Ext.util.DelayedTask=function(D,C,A){var E=this,F,B=function(){clearInterval(F);
F=null;D.apply(C,A||[]);};E.delay=function(H,J,I,G){E.cancel();D=J||D;C=I||C;A=G||A;
F=setInterval(B,H);};E.cancel=function(){if(F){clearInterval(F);F=null;}};};Ext.util.MixedCollection=function(B,A){this.items=[];
this.map={};this.keys=[];this.length=0;this.addEvents("clear","add","replace","remove","sort");
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){var A=this.map[B];if(typeof A!="undefined"){return this.replace(B,C);
}this.map[B]=C;}this.length++;this.items.push(C);this.keys.push(B);this.fireEvent("add",this.length-1,C,B);
return C;},getKey:function(A){return A.id;},replace:function(C,D){if(arguments.length==1){D=arguments[0];
C=this.getKey(D);}var A=this.map[C];if(typeof C=="undefined"||C===null||typeof A=="undefined"){return this.add(C,D);
}var B=this.indexOfKey(C);this.items[B]=D;this.map[C]=D;this.fireEvent("replace",C,A,D);
return D;},addAll:function(E){if(arguments.length>1||Ext.isArray(E)){var B=arguments.length>1?arguments:E;
for(var D=0,A=B.length;D<A;D++){this.add(B[D]);}}else{for(var C in E){if(this.allowFunctions||typeof E[C]!="function"){this.add(C,E[C]);
}}}},each:function(E,D){var B=[].concat(this.items);for(var C=0,A=B.length;C<A;C++){if(E.call(D||B[C],B[C],C,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(this.containsKey(B)){this.suspendEvents();this.removeKey(B);this.resumeEvents();
}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);return C;}return false;},removeKey:function(A){return this.removeAt(this.indexOfKey(A));
},getCount:function(){return this.length;},indexOf:function(A){return this.items.indexOf(A);
},indexOfKey:function(A){return this.keys.indexOf(A);},item:function(B){var A=this.map[B],C=A!==undefined?A:(typeof B=="number")?this.items[B]:undefined;
return !Ext.isFunction(C)||this.allowFunctions?C: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(D,E,C){var H,I,G=String(E).toUpperCase()=="DESC"?-1:1,B=[],F=this.keys,A=this.items;
C=C||function(J,K){return J-K;};for(H=0,I=A.length;H<I;H++){B[B.length]={key:F[H],value:A[H],index:H};
}B.sort(function(J,L){var K=C(J[D],L[D])*G;if(K===0){K=(J.index<L.index?-1:1);}return K;
});for(H=0,I=B.length;H<I;H++){A[H]=B[H].value;F[H]=B[H].key;}this.fireEvent("sort",this);
},sort:function(A,B){this._sort("value",A,B);},keySort:function(A,B){this._sort("key",A,B||function(E,D){var C=String(E).toUpperCase(),F=String(D).toUpperCase();
return C>F?1:(C<F?-1:0);});},getRange:function(E,A){var B=this.items;if(B.length<1){return[];
}E=E||0;A=Math.min(typeof A=="undefined"?this.length-1:A,this.length-1);var C,D=[];
if(E<=A){for(C=E;C<=A;C++){D[D.length]=B[C];}}else{for(C=E;C>=A;C--){D[D.length]=B[C];
}}return D;},filter:function(C,B,D,A){if(Ext.isEmpty(B,false)){return this.clone();
}B=this.createValueMatcher(B,D,A);return this.filterBy(function(E){return E&&B.test(E[C]);
});},filterBy:function(G,F){var A=new Ext.util.MixedCollection();A.getKey=this.getKey;
var C=this.keys,E=this.items;for(var D=0,B=E.length;D<B;D++){if(G.call(F||this,E[D],C[D])){A.add(C[D],E[D]);
}}return A;},findIndex:function(C,B,E,D,A){if(Ext.isEmpty(B,false)){return -1;}B=this.createValueMatcher(B,D,A);
return this.findIndexBy(function(F){return F&&B.test(F[C]);},null,E);},findIndexBy:function(G,F,A){var C=this.keys,E=this.items;
for(var D=(A||0),B=E.length;D<B;D++){if(G.call(F||this,E[D],C[D])){return D;}}return -1;
},createValueMatcher:function(B,C,A){if(!B.exec){B=String(B);B=new RegExp((C===true?"":"^")+Ext.escapeRe(B),A?"":"i");
}return B;},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 useHasOwn=!!{}.hasOwnProperty,isNative=function(){var useNative=null;
return function(){if(useNative===null){useNative=Ext.USE_NATIVE_JSON&&window.JSON&&JSON.toString()=="[object JSON]";
}return useNative;};}(),pad=function(n){return n<10?"0"+n:n;},doDecode=function(json){return eval("("+json+")");
},doEncode=function(o){if(typeof o=="undefined"||o===null){return"null";}else{if(Ext.isArray(o)){return encodeArray(o);
}else{if(Object.prototype.toString.apply(o)==="[object Date]"){return Ext.util.JSON.encodeDate(o);
}else{if(typeof o=="string"){return encodeString(o);}else{if(typeof o=="number"){return isFinite(o)?String(o):"null";
}else{if(typeof o=="boolean"){return String(o);}else{var a=["{"],b,i,v;for(i in o){if(!useHasOwn||o.hasOwnProperty(i)){v=o[i];
switch(typeof v){case"undefined":case"function":case"unknown":break;default:if(b){a.push(",");
}a.push(doEncode(i),":",v===null?"null":doEncode(v));b=true;}}}a.push("}");return a.join("");
}}}}}}},m={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\n":"\\r",'"':'\\"',"\\":"\\\\"},encodeString=function(s){if(/["\\\x00-\x1f]/.test(s)){return'"'+s.replace(/([\x00-\x1f\\"])/g,function(a,b){var c=m[b];
if(c){return c;}c=b.charCodeAt();return"\\u00"+Math.floor(c/16).toString(16)+(c%16).toString(16);
})+'"';}return'"'+s+'"';},encodeArray=function(o){var a=["["],b,i,l=o.length,v;for(i=0;
i<l;i+=1){v=o[i];switch(typeof v){case"undefined":case"function":case"unknown":break;
default:if(b){a.push(",");}a.push(v===null?"null":Ext.util.JSON.encode(v));b=true;
}}a.push("]");return a.join("");};this.encodeDate=function(o){return'"'+o.getFullYear()+"-"+pad(o.getMonth()+1)+"-"+pad(o.getDate())+"T"+pad(o.getHours())+":"+pad(o.getMinutes())+":"+pad(o.getSeconds())+'"';
};this.encode=function(){var ec;return function(o){if(!ec){ec=isNative()?JSON.stringify:doEncode;
}return ec(o);};}();this.decode=function(){var dc;return function(json){if(!dc){dc=isNative()?JSON.parse:doDecode;
}return dc(json);};}();})();Ext.encode=Ext.util.JSON.encode;Ext.decode=Ext.util.JSON.decode;
Ext.util.Format=function(){var trimRe=/^\s+|\s+$/g;return{ellipsis:function(value,len,word){if(value&&value.length>len){if(word){var vs=value.substr(0,len-2);
var index=Math.max(vs.lastIndexOf(" "),vs.lastIndexOf("."),vs.lastIndexOf("!"),vs.lastIndexOf("?"));
if(index==-1||index<(len-15)){return value.substr(0,len-3)+"...";}else{return vs.substr(0,index)+"...";
}}else{return value.substr(0,len-3)+"...";}}return value;},undef:function(value){return value!==undefined?value:"";
},defaultValue:function(value,defaultValue){return value!==undefined&&value!==""?value:defaultValue;
},htmlEncode:function(value){return !value?value:String(value).replace(/&/g,"&amp;").replace(/>/g,"&gt;").replace(/</g,"&lt;").replace(/"/g,"&quot;");
},htmlDecode:function(value){return !value?value:String(value).replace(/&gt;/g,">").replace(/&lt;/g,"<").replace(/&quot;/g,'"').replace(/&amp;/g,"&");
},trim:function(value){return String(value).replace(trimRe,"");},substr:function(value,start,length){return String(value).substr(start,length);
},lowercase:function(value){return String(value).toLowerCase();},uppercase:function(value){return String(value).toUpperCase();
},capitalize:function(value){return !value?value:value.charAt(0).toUpperCase()+value.substr(1).toLowerCase();
},call:function(value,fn){if(arguments.length>2){var args=Array.prototype.slice.call(arguments,2);
args.unshift(value);return eval(fn).apply(window,args);}else{return eval(fn).call(window,value);
}},usMoney:function(v){v=(Math.round((v-0)*100))/100;v=(v==Math.floor(v))?v+".00":((v*10==Math.floor(v*10))?v+"0":v);
v=String(v);var ps=v.split(".");var whole=ps[0];var sub=ps[1]?"."+ps[1]:".00";var r=/(\d+)(\d{3})/;
while(r.test(whole)){whole=whole.replace(r,"$1,$2");}v=whole+sub;if(v.charAt(0)=="-"){return"-$"+v.substr(1);
}return"$"+v;},date:function(v,format){if(!v){return"";}if(!Ext.isDate(v)){v=new Date(Date.parse(v));
}return v.dateFormat(format||"m/d/Y");},dateRenderer:function(format){return function(v){return Ext.util.Format.date(v,format);
};},stripTagsRE:/<\/?[^>]+>/gi,stripTags:function(v){return !v?v:String(v).replace(this.stripTagsRE,"");
},stripScriptsRe:/(?:<script.*?>)((\n|\r|.)*?)(?:<\/script>)/ig,stripScripts:function(v){return !v?v:String(v).replace(this.stripScriptsRe,"");
},fileSize:function(size){if(size<1024){return size+" bytes";}else{if(size<1048576){return(Math.round(((size*10)/1024))/10)+" KB";
}else{return(Math.round(((size*10)/1048576))/10)+" MB";}}},math:function(){var fns={};
return function(v,a){if(!fns[a]){fns[a]=new Function("v","return v "+a+";");}return fns[a](v);
};}(),round:function(value,precision){var result=Number(value);if(typeof precision=="number"){precision=Math.pow(10,precision);
result=Math.round(value*precision)/precision;}return result;},number:function(v,format){if(!format){return v;
}v=Ext.num(v,NaN);if(isNaN(v)){return"";}var comma=",",dec=".",i18n=false,neg=v<0;
v=Math.abs(v);if(format.substr(format.length-2)=="/i"){format=format.substr(0,format.length-2);
i18n=true;comma=".";dec=",";}var hasComma=format.indexOf(comma)!=-1,psplit=(i18n?format.replace(/[^\d\,]/g,""):format.replace(/[^\d\.]/g,"")).split(dec);
if(1<psplit.length){v=v.toFixed(psplit[1].length);}else{if(2<psplit.length){throw ("NumberFormatException: invalid format, formats should have no more than 1 period: "+format);
}else{v=v.toFixed(0);}}var fnum=v.toString();if(hasComma){psplit=fnum.split(".");
var cnum=psplit[0],parr=[],j=cnum.length,m=Math.floor(j/3),n=cnum.length%3||3;for(var i=0;
i<j;i+=n){if(i!=0){n=3;}parr[parr.length]=cnum.substr(i,n);m-=1;}fnum=parr.join(comma);
if(psplit[1]){fnum+=dec+psplit[1];}}return(neg?"-":"")+format.replace(/[\d,?\.?]+/,fnum);
},numberRenderer:function(format){return function(v){return Ext.util.Format.number(v,format);
};},plural:function(v,s,p){return v+" "+(v==1?s:(p?p:s+"s"));},nl2br:function(v){return v===undefined||v===null?"":v.replace(/\n/g,"<br/>");
}};}();Ext.XTemplate=function(){Ext.XTemplate.superclass.constructor.apply(this,arguments);
var I=this,K=I.html,C=/<tpl\b[^>]*>((?:(?=([^<]+))\2|<(?!tpl\b[^>]*>))*?)<\/tpl>/,T=/^<tpl\b[^>]*?for="(.*?)"/,F=/^<tpl\b[^>]*?if="(.*?)"/,H=/^<tpl\b[^>]*?exec="(.*?)"/,D,P=0,L=[],O="values",G="parent",M="xindex",N="xcount",U="return ",S="with(values){ ";
K=["<tpl>",K,"</tpl>"].join("");while((D=K.match(C))){var R=D[0].match(T),Q=D[0].match(F),B=D[0].match(H),V=null,J=null,E=null,A=R&&R[1]?R[1]:"";
if(Q){V=Q&&Q[1]?Q[1]:null;if(V){J=new Function(O,G,M,N,S+U+(Ext.util.Format.htmlDecode(V))+"; }");
}}if(B){V=B&&B[1]?B[1]:null;if(V){E=new Function(O,G,M,N,S+(Ext.util.Format.htmlDecode(V))+"; }");
}}if(A){switch(A){case".":A=new Function(O,G,S+U+O+"; }");break;case"..":A=new Function(O,G,S+U+G+"; }");
break;default:A=new Function(O,G,S+U+A+"; }");}}L.push({id:P,target:A,exec:E,test:J,body:D[1]||""});
K=K.replace(D[0],"{xtpl"+P+"}");++P;}Ext.each(L,function(W){I.compileTpl(W);});I.master=L[L.length-1];
I.tpls=L;};Ext.extend(Ext.XTemplate,Ext.Template,{re:/\{([\w-\.\#]+)(?:\:([\w\.]*)(?:\((.*?)?\))?)?(\s?[\+\-\*\\]\s?[\d\.\+\-\*\\\(\)]+)?\}/g,codeRe:/\{\[((?:\\\]|.|\n)*?)\]\}/g,applySubTemplate:function(E,B,A,H,G){var J=this,I,D=J.tpls[E],C,F=[];
if((D.test&&!D.test.call(J,B,A,H,G))||(D.exec&&D.exec.call(J,B,A,H,G))){return"";
}C=D.target?D.target.call(J,B,A):B;I=C.length;A=D.target?B:A;if(D.target&&Ext.isArray(C)){Ext.each(C,function(K,L){F[F.length]=D.compiled.call(J,K,A,L+1,I);
});return F.join("");}return D.compiled.call(J,C,A,H,G);},compileTpl:function(tpl){var fm=Ext.util.Format,useF=this.disableFormats!==true,sep=Ext.isGecko?"+":",",body;
function fn(m,name,format,args,math){if(name.substr(0,4)=="xtpl"){return"'"+sep+"this.applySubTemplate("+name.substr(4)+", values, parent, xindex, xcount)"+sep+"'";
}var v;if(name==="."){v="values";}else{if(name==="#"){v="xindex";}else{if(name.indexOf(".")!=-1){v=name;
}else{v="values['"+name+"']";}}}if(math){v="("+v+math+")";}if(format&&useF){args=args?","+args:"";
if(format.substr(0,5)!="this."){format="fm."+format+"(";}else{format='this.call("'+format.substr(5)+'", ';
args=", values";}}else{args="";format="("+v+" === undefined ? '' : ";}return"'"+sep+format+v+args+")"+sep+"'";
}function codeFn(m,code){return"'"+sep+"("+code+")"+sep+"'";}if(Ext.isGecko){body="tpl.compiled = function(values, parent, xindex, xcount){ return '"+tpl.body.replace(/(\r\n|\n)/g,"\\n").replace(/'/g,"\\'").replace(this.re,fn).replace(this.codeRe,codeFn)+"';};";
}else{body=["tpl.compiled = function(values, parent, xindex, xcount){ return ['"];
body.push(tpl.body.replace(/(\r\n|\n)/g,"\\n").replace(/'/g,"\\'").replace(this.re,fn).replace(this.codeRe,codeFn));
body.push("'].join('');};");body=body.join("");}eval(body);return this;},applyTemplate:function(A){return this.master.compiled.call(this,A,{},1,1);
},compile:function(){return this;}});Ext.XTemplate.prototype.apply=Ext.XTemplate.prototype.applyTemplate;
Ext.XTemplate.from=function(A){A=Ext.getDom(A);return new Ext.XTemplate(A.value||A.innerHTML);
};Ext.util.CSS=function(){var D=null;var C=document;var B=/(-[a-z])/gi;var A=function(F,E){return E.charAt(1).toUpperCase();
};return{createStyleSheet:function(F,I){var E;var J=C.getElementsByTagName("head")[0];
var H=C.createElement("style");H.setAttribute("type","text/css");if(I){H.setAttribute("id",I);
}if(Ext.isIE){J.appendChild(H);E=H.styleSheet;E.cssText=F;}else{try{H.appendChild(C.createTextNode(F));
}catch(G){H.cssText=F;}J.appendChild(H);E=H.styleSheet?H.styleSheet:(H.sheet||C.styleSheets[C.styleSheets.length-1]);
}this.cacheStyleSheet(E);return E;},removeStyleSheet:function(E){var F=C.getElementById(E);
if(F){F.parentNode.removeChild(F);}},swapStyleSheet:function(E,G){this.removeStyleSheet(E);
var F=C.createElement("link");F.setAttribute("rel","stylesheet");F.setAttribute("type","text/css");
F.setAttribute("id",E);F.setAttribute("href",G);C.getElementsByTagName("head")[0].appendChild(F);
},refreshCache:function(){return this.getRules(true);},cacheStyleSheet:function(E){if(!D){D={};
}try{var G=E.cssRules||E.rules;for(var F=G.length-1;F>=0;--F){D[G[F].selectorText]=G[F];
}}catch(H){}},getRules:function(E){if(D===null||E){D={};var H=C.styleSheets;for(var G=0,F=H.length;
G<F;G++){try{this.cacheStyleSheet(H[G]);}catch(I){}}}return D;},getRule:function(H,E){var F=this.getRules(E);
if(!Ext.isArray(H)){return F[H];}for(var G=0;G<H.length;G++){if(F[H[G]]){return F[H[G]];
}}return null;},updateRule:function(I,G,E){if(!Ext.isArray(I)){var H=this.getRule(I);
if(H){H.style[G.replace(B,A)]=E;return true;}}else{for(var F=0;F<I.length;F++){if(this.updateRule(I[F],G,E)){return true;
}}}return false;}};}();Ext.util.ClickRepeater=function(B,A){this.el=Ext.get(B);this.el.unselectable();
Ext.apply(this,A);this.addEvents("mousedown","click","mouseup");if(!this.disabled){this.disabled=true;
this.enable();}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,enable:function(){if(this.disabled){this.el.on("mousedown",this.handleMouseDown,this);
if(this.preventDefault||this.stopDefault){this.el.on("click",this.eventOptions,this);
}}this.disabled=false;},disable:function(A){if(A||!this.disabled){clearTimeout(this.timer);
if(this.pressClass){this.el.removeClass(this.pressClass);}Ext.getDoc().un("mouseup",this.handleMouseUp,this);
this.el.removeAllListeners();}this.disabled=true;},setDisabled:function(A){this[A?"disable":"enable"]();
},eventOptions:function(A){if(this.preventDefault){A.preventDefault();}if(this.stopDefault){A.stopEvent();
}},destroy:function(){this.disable(true);Ext.destroy(this.el);this.purgeListeners();
},handleMouseDown:function(){clearTimeout(this.timer);this.el.blur();if(this.pressClass){this.el.addClass(this.pressClass);
}this.mousedownTime=new Date();Ext.getDoc().on("mouseup",this.handleMouseUp,this);
this.el.on("mouseout",this.handleMouseOut,this);this.fireEvent("mousedown",this);
this.fireEvent("click",this);if(this.accelerate){this.delay=400;}this.timer=this.click.defer(this.delay||this.interval,this);
},click:function(){this.fireEvent("click",this);this.timer=this.click.defer(this.accelerate?this.easeOutExpo(this.mousedownTime.getElapsed(),400,-390,12000):this.interval,this);
},easeOutExpo:function(D,C,A,B){return(D==B)?C+A:A*(-Math.pow(2,-10*D/B)+1)+C;},handleMouseOut:function(){clearTimeout(this.timer);
if(this.pressClass){this.el.removeClass(this.pressClass);}this.el.on("mouseover",this.handleMouseReturn,this);
},handleMouseReturn:function(){this.el.un("mouseover",this.handleMouseReturn,this);
if(this.pressClass){this.el.addClass(this.pressClass);}this.click();},handleMouseUp:function(){clearTimeout(this.timer);
this.el.un("mouseover",this.handleMouseReturn,this);this.el.un("mouseout",this.handleMouseOut,this);
Ext.getDoc().un("mouseup",this.handleMouseUp,this);this.el.removeClass(this.pressClass);
this.fireEvent("mouseup",this);}});Ext.KeyNav=function(B,A){this.el=Ext.get(B);Ext.apply(this,A);
if(!this.disabled){this.disabled=true;this.enable();}};Ext.KeyNav.prototype={disabled:false,defaultEventAction:"stopEvent",forceKeyDown:false,prepareEvent:function(C){var A=C.getKey();
var B=this.keyToHandler[A];if(Ext.isSafari2&&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(this.isKeydown()){this.el.on("keydown",this.relay,this);
}else{this.el.on("keydown",this.prepareEvent,this);this.el.on("keypress",this.relay,this);
}this.disabled=false;}},disable:function(){if(!this.disabled){if(this.isKeydown()){this.el.un("keydown",this.relay,this);
}else{this.el.un("keydown",this.prepareEvent,this);this.el.un("keypress",this.relay,this);
}this.disabled=true;}},setDisabled:function(A){this[A?"disable":"enable"]();},isKeydown:function(){return this.forceKeyDown||Ext.EventManager.useKeydown;
}};Ext.KeyMap=function(C,B,A){this.el=Ext.get(C);this.eventName=A||"keydown";this.bindings=[];
if(B){this.addBinding(B);}this.enable();};Ext.KeyMap.prototype={stopEvent:false,addBinding:function(F){if(Ext.isArray(F)){Ext.each(F,function(K){this.addBinding(K);
},this);return;}var C=F.key,J=F.fn||F.handler,D=F.scope;if(F.stopEvent){this.stopEvent=F.stopEvent;
}if(typeof C=="string"){var A=[];var I=C.toUpperCase();for(var G=0,H=I.length;G<H;
G++){A.push(I.charCodeAt(G));}C=A;}var E=Ext.isArray(C);var B=function(K){if(this.checkModifiers(F,K)){var M=K.getKey();
if(E){for(var N=0,L=C.length;N<L;N++){if(C[N]==M){if(this.stopEvent){K.stopEvent();
}J.call(D||window,M,K);return;}}}else{if(M==C){if(this.stopEvent){K.stopEvent();}J.call(D||window,M,K);
}}}};this.bindings.push(B);},checkModifiers:function(D,A){var B,F,G=["shift","ctrl","alt"];
for(var E=0,C=G.length;E<C;++E){F=G[E];B=D[F];if(!(B===undefined||(B===A[F+"Key"]))){return false;
}}return true;},on:function(C,E,D){var A,B,F,G;if(typeof C=="object"&&!Ext.isArray(C)){A=C.key;
B=C.shift;F=C.ctrl;G=C.alt;}else{A=C;}this.addBinding({key:A,shift:B,ctrl:F,alt:G,fn:E,scope:D});
},handleKeyDown:function(A){if(this.enabled){var C=this.bindings;for(var D=0,B=C.length;
D<B;D++){C[D].call(this,A);}}},isEnabled:function(){return this.enabled;},enable:function(){if(!this.enabled){this.el.on(this.eventName,this.handleKeyDown,this);
this.enabled=true;}},disable:function(){if(this.enabled){this.el.removeListener(this.eventName,this.handleKeyDown,this);
this.enabled=false;}},setDisabled:function(A){this[A?"disable":"enable"]();}};Ext.util.TextMetrics=function(){var A;
return{measure:function(B,C,D){if(!A){A=Ext.util.TextMetrics.Instance(B,D);}A.bind(B);
A.setFixedWidth(D||"auto");return A.getSize(C);},createInstance:function(B,C){return Ext.util.TextMetrics.Instance(B,C);
}};}();Ext.util.TextMetrics.Instance=function(B,D){var C=new Ext.Element(document.createElement("div"));
document.body.appendChild(C.dom);C.position("absolute");C.setLeftTop(-1000,-1000);
C.hide();if(D){C.setWidth(D);}var A={getSize:function(E){C.update(E);var F=C.getSize();
C.update("");return F;},bind:function(E){C.setStyle(Ext.fly(E).getStyles("font-size","font-style","font-weight","font-family","line-height","text-transform","letter-spacing"));
},setFixedWidth:function(E){C.setWidth(E);},getWidth:function(E){C.dom.style.width="auto";
return this.getSize(E).width;},getHeight:function(E){return this.getSize(E).height;
}};A.bind(B);return A;};Ext.Element.addMethods({getTextWidth:function(C,B,A){return(Ext.util.TextMetrics.measure(this.dom,Ext.value(C,this.dom.innerHTML,true)).width).constrain(B||0,A||1000000);
}});Ext.util.Cookies={set:function(E,G){var C=arguments;var B=arguments.length;var D=(B>2)?C[2]:null;
var A=(B>3)?C[3]:"/";var F=(B>4)?C[4]:null;var H=(B>5)?C[5]:false;document.cookie=E+"="+escape(G)+((D===null)?"":("; expires="+D.toGMTString()))+((A===null)?"":("; path="+A))+((F===null)?"":("; domain="+F))+((H===true)?"; secure":"");
},get:function(D){var B=D+"=";var F=B.length;var A=document.cookie.length;var E=0;
var C=0;while(E<A){C=E+F;if(document.cookie.substring(E,C)==B){return Ext.util.Cookies.getCookieVal(C);
}E=document.cookie.indexOf(" ",E)+1;if(E===0){break;}}return null;},clear:function(A){if(Ext.util.Cookies.get(A)){document.cookie=A+"=; expires=Thu, 01-Jan-70 00:00:01 GMT";
}},getCookieVal:function(B){var A=document.cookie.indexOf(";",B);if(A==-1){A=document.cookie.length;
}return unescape(document.cookie.substring(B,A));}};Ext.handleError=function(A){throw A;
};Ext.Error=function(A){this.message=(this.lang[A])?this.lang[A]:A;};Ext.Error.prototype=new Error();
Ext.apply(Ext.Error.prototype,{lang:{},name:"Ext.Error",getName:function(){return this.name;
},getMessage:function(){return this.message;},toJson:function(){return Ext.encode(this);
}});Ext.ComponentMgr=function(){var C=new Ext.util.MixedCollection();var B={};var A={};
return{register:function(D){C.add(D);},unregister:function(D){C.remove(D);},get:function(D){return C.get(D);
},onAvailable:function(D,F,E){C.on("add",function(G,H){if(H.id==D){F.call(E||H,H);
C.un("add",F,E);}});},all:C,isRegistered:function(D){return B[D]!==undefined;},registerType:function(E,D){B[E]=D;
D.xtype=E;},create:function(D,E){return D.render?D:new B[D.xtype||E](D);},registerPlugin:function(E,D){A[E]=D;
D.ptype=E;},createPlugin:function(D,E){return new A[D.ptype||E](D);}};}();Ext.reg=Ext.ComponentMgr.registerType;
Ext.preg=Ext.ComponentMgr.registerPlugin;Ext.create=Ext.ComponentMgr.create;Ext.Component=function(B){B=B||{};
if(B.initialConfig){if(B.isAction){this.baseAction=B;}B=B.initialConfig;}else{if(B.tagName||B.dom||Ext.isString(B)){B={applyTo:B,id:B.id||B};
}}this.initialConfig=B;Ext.apply(this,B);this.addEvents("disable","enable","beforeshow","show","beforehide","hide","beforerender","render","afterrender","beforedestroy","destroy","beforestaterestore","staterestore","beforestatesave","statesave");
this.getId();Ext.ComponentMgr.register(this);Ext.Component.superclass.constructor.call(this);
if(this.baseAction){this.baseAction.addComponent(this);}this.initComponent();if(this.plugins){if(Ext.isArray(this.plugins)){for(var C=0,A=this.plugins.length;
C<A;C++){this.plugins[C]=this.initPlugin(this.plugins[C]);}}else{this.plugins=this.initPlugin(this.plugins);
}}if(this.stateful!==false){this.initState(B);}if(this.applyTo){this.applyToMarkup(this.applyTo);
delete this.applyTo;}else{if(this.renderTo){this.render(this.renderTo);delete this.renderTo;
}}};Ext.Component.AUTO_ID=1000;Ext.extend(Ext.Component,Ext.util.Observable,{disabled:false,hidden:false,autoEl:"div",disabledClass:"x-item-disabled",allowDomMove:true,autoShow:false,hideMode:"display",hideParent:false,rendered:false,ctype:"Ext.Component",actionMode:"el",getActionEl:function(){return this[this.actionMode];
},initPlugin:function(A){if(A.ptype&&!Ext.isFunction(A.init)){A=Ext.ComponentMgr.createPlugin(A);
}else{if(Ext.isString(A)){A=Ext.ComponentMgr.createPlugin({ptype:A});}}A.init(this);
return A;},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);if(this.ctCls){this.container.addClass(this.ctCls);
}this.rendered=true;if(A!==undefined){if(Ext.isNumber(A)){A=this.container.dom.childNodes[A];
}else{A=Ext.getDom(A);}}this.onRender(this.container,A||null);if(this.autoShow){this.el.removeClass(["x-hidden","x-hide-"+this.hideMode]);
}if(this.cls){this.el.addClass(this.cls);delete this.cls;}if(this.style){this.el.applyStyles(this.style);
delete this.style;}if(this.overCls){this.el.addClassOnOver(this.overCls);}this.fireEvent("render",this);
this.afterRender(this.container);if(this.hidden){this.doHide();}if(this.disabled){this.disable(true);
}if(this.stateful!==false){this.initStateEvents();}this.initRef();this.fireEvent("afterrender",this);
}return this;},initRef:function(){if(this.ref){var D=this.ref.split("/");var C=D.length,B=0;
var A=this;while(B<C){if(A.ownerCt){A=A.ownerCt;}B++;}A[D[--B]]=this;}},initState:function(A){if(Ext.state.Manager){var C=this.getStateId();
if(C){var B=Ext.state.Manager.get(C);if(B){if(this.fireEvent("beforestaterestore",this,B)!==false){this.applyState(B);
this.fireEvent("staterestore",this,B);}}}}},getStateId:function(){return this.stateId||((this.id.indexOf("ext-comp-")==0||this.id.indexOf("ext-gen")==0)?null:this.id);
},initStateEvents:function(){if(this.stateEvents){for(var A=0,B;B=this.stateEvents[A];
A++){this.on(B,this.saveState,this,{delay:100});}}},applyState:function(B,A){if(B){Ext.apply(this,B);
}},getState:function(){return null;},saveState:function(){if(Ext.state.Manager&&this.stateful!==false){var B=this.getStateId();
if(B){var A=this.getState();if(this.fireEvent("beforestatesave",this,A)!==false){Ext.state.Manager.set(B,A);
this.fireEvent("statesave",this,A);}}}},applyToMarkup:function(A){this.allowDomMove=false;
this.el=Ext.get(A);this.render(this.el.dom.parentNode);},addClass:function(A){if(this.el){this.el.addClass(A);
}else{this.cls=this.cls?this.cls+" "+A:A;}return this;},removeClass:function(A){if(this.el){this.el.removeClass(A);
}else{if(this.cls){this.cls=this.cls.split(" ").remove(A).join(" ");}}return this;
},onRender:function(B,A){if(!this.el&&this.autoEl){if(Ext.isString(this.autoEl)){this.el=document.createElement(this.autoEl);
}else{var C=document.createElement("div");Ext.DomHelper.overwrite(C,this.autoEl);
this.el=C.firstChild;}if(!this.el.id){this.el.id=this.getId();}}if(this.el){this.el=Ext.get(this.el);
if(this.allowDomMove!==false){B.dom.insertBefore(this.el.dom,A);}}},getAutoCreate:function(){var A=Ext.isObject(this.autoCreate)?this.autoCreate:Ext.apply({},this.defaultAutoCreate);
if(this.id&&!A.id){A.id=this.id;}return A;},afterRender:Ext.emptyFn,destroy:function(){if(this.fireEvent("beforedestroy",this)!==false){this.beforeDestroy();
if(this.rendered){this.el.removeAllListeners();this.el.remove();if(this.actionMode=="container"||this.removeMode=="container"){this.container.remove();
}}this.onDestroy();Ext.ComponentMgr.unregister(this);this.fireEvent("destroy",this);
this.purgeListeners();}},beforeDestroy:Ext.emptyFn,onDestroy:Ext.emptyFn,getEl:function(){return this.el;
},getId:function(){return this.id||(this.id="ext-comp-"+(++Ext.Component.AUTO_ID));
},getItemId:function(){return this.itemId||this.getId();},focus:function(B,A){if(A){this.focus.defer(Ext.isNumber(A)?A:10,this,[B,false]);
return;}if(this.rendered){this.el.focus();if(B===true){this.el.dom.select();}}return this;
},blur:function(){if(this.rendered){this.el.blur();}return this;},disable:function(A){if(this.rendered){this.onDisable();
}this.disabled=true;if(A!==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){return this[A?"disable":"enable"]();
},show:function(){if(this.fireEvent("beforeshow",this)!==false){this.hidden=false;
if(this.autoRender){this.render(Ext.isBoolean(this.autoRender)?Ext.getBody():this.autoRender);
}if(this.rendered){this.onShow();}this.fireEvent("show",this);}return this;},onShow:function(){this.getVisibiltyEl().removeClass("x-hide-"+this.hideMode);
},hide:function(){if(this.fireEvent("beforehide",this)!==false){this.doHide();this.fireEvent("hide",this);
}return this;},doHide:function(){this.hidden=true;if(this.rendered){this.onHide();
}},onHide:function(){this.getVisibiltyEl().addClass("x-hide-"+this.hideMode);},getVisibiltyEl:function(){return this.hideParent?this.container:this.getActionEl();
},setVisible:function(A){return this[A?"show":"hide"]();},isVisible:function(){return this.rendered&&this.getVisibiltyEl().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.constructor(A);},getXType:function(){return this.constructor.xtype;
},isXType:function(B,A){if(Ext.isFunction(B)){B=B.xtype;}else{if(Ext.isObject(B)){B=B.constructor.xtype;
}}return !A?("/"+this.getXTypes()+"/").indexOf("/"+B+"/")!=-1:this.constructor.xtype==B;
},getXTypes:function(){var A=this.constructor;if(!A.xtypes){var C=[],B=this;while(B&&B.constructor.xtype){C.unshift(B.constructor.xtype);
B=B.constructor.superclass;}A.xtypeChain=C;A.xtypes=C.join("/");}return A.xtypes;
},findParentBy:function(A){for(var B=this.ownerCt;(B!=null)&&!A(B,this);B=B.ownerCt){}return B||null;
},findParentByType:function(A){return Ext.isFunction(A)?this.findParentBy(function(B){return B.constructor===A;
}):this.findParentBy(function(B){return B.constructor.xtype===A;});},getDomPositionEl:function(){return this.getPositionEl?this.getPositionEl():this.getEl();
},purgeListeners:function(){Ext.Component.superclass.purgeListeners.call(this);if(this.mons){this.on("beforedestroy",this.clearMons,this,{single:true});
}},clearMons:function(){Ext.each(this.mons,function(A){A.item.un(A.ename,A.fn,A.scope);
},this);this.mons=[];},mon:function(H,E,G,F,D){if(!this.mons){this.mons=[];this.on("beforedestroy",this.clearMons,this,{single:true});
}if(Ext.isObject(E)){var C=/^(?:scope|delay|buffer|single|stopEvent|preventDefault|stopPropagation|normalized|args|delegate)$/;
var B=E;for(var A in B){if(C.test(A)){continue;}if(Ext.isFunction(B[A])){this.mons.push({item:H,ename:A,fn:B[A],scope:B.scope});
H.on(A,B[A],B.scope,B);}else{this.mons.push({item:H,ename:A,fn:B[A],scope:B.scope});
H.on(A,B[A]);}}return;}this.mons.push({item:H,ename:E,fn:G,scope:F});H.on(E,G,F,D);
},mun:function(A,E,H,G){var B,F;for(var D=0,C=this.mons.length;D<C;++D){F=this.mons[D];
if(A===F.item&&E==F.ename&&H===F.fn&&G===F.scope){this.mons.splice(D,1);A.un(E,H,G);
B=true;break;}}return B;},nextSibling:function(){if(this.ownerCt){var A=this.ownerCt.items.indexOf(this);
if(A!=-1&&A+1<this.ownerCt.items.getCount()){return this.ownerCt.items.itemAt(A+1);
}}return null;},previousSibling:function(){if(this.ownerCt){var A=this.ownerCt.items.indexOf(this);
if(A>0){return this.ownerCt.items.itemAt(A-1);}}return null;},getBubbleTarget:function(){return this.ownerCt;
}});Ext.reg("component",Ext.Component);Ext.Action=function(A){this.initialConfig=A;
this.itemId=A.itemId=(A.itemId||A.id||Ext.id());this.items=[];};Ext.Action.prototype={isAction:true,setText:function(A){this.initialConfig.text=A;
this.callEach("setText",[A]);},getText:function(){return this.initialConfig.text;
},setIconClass:function(A){this.initialConfig.iconCls=A;this.callEach("setIconClass",[A]);
},getIconClass:function(){return this.initialConfig.iconCls;},setDisabled:function(A){this.initialConfig.disabled=A;
this.callEach("setDisabled",[A]);},enable:function(){this.setDisabled(false);},disable:function(){this.setDisabled(true);
},isDisabled:function(){return this.initialConfig.disabled;},setHidden:function(A){this.initialConfig.hidden=A;
this.callEach("setVisible",[!A]);},show:function(){this.setHidden(false);},hide:function(){this.setHidden(true);
},isHidden:function(){return this.initialConfig.hidden;},setHandler:function(B,A){this.initialConfig.handler=B;
this.initialConfig.scope=A;this.callEach("setHandler",[B,A]);},each:function(B,A){Ext.each(this.items,B,A);
},callEach:function(E,B){var D=this.items;for(var C=0,A=D.length;C<A;C++){D[C][E].apply(D[C],B);
}},addComponent:function(A){this.items.push(A);A.on("destroy",this.removeComponent,this);
},removeComponent:function(A){this.items.remove(A);},execute:function(){this.initialConfig.handler.apply(this.initialConfig.scope||window,arguments);
}};(function(){Ext.Layer=function(F,E){F=F||{};var G=Ext.DomHelper;var C=F.parentEl,H=C?Ext.getDom(C):document.body;
if(E){this.dom=Ext.getDom(E);}if(!this.dom){var D=F.dh||{tag:"div",cls:"x-layer"};
this.dom=G.append(H,D);}if(F.cls){this.addClass(F.cls);}this.constrain=F.constrain!==false;
this.setVisibilityMode(Ext.Element.VISIBILITY);if(F.id){this.id=this.dom.id=F.id;
}else{this.id=Ext.id(this.dom);}this.zindex=F.zindex||this.getZIndex();this.position("absolute",this.zindex);
if(F.shadow){this.shadowOffset=F.shadowOffset||4;this.shadow=new Ext.Shadow({offset:this.shadowOffset,mode:F.shadow});
}else{this.shadowOffset=0;}this.useShim=F.shim!==false&&Ext.useShims;this.useDisplay=F.useDisplay;
this.hide();};var A=Ext.Element.prototype;var B=[];Ext.extend(Ext.Layer,Ext.Element,{getZIndex:function(){return this.zindex||parseInt((this.getShim()||this).getStyle("z-index"),10)||11000;
},getShim:function(){if(!this.useShim){return null;}if(this.shim){return this.shim;
}var C=B.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);
B.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(H){var E=this.shadow;if(!this.updating&&this.isVisible()&&(E||this.useShim)){var K=this.getShim();
var D=this.getWidth(),J=this.getHeight();var I=this.getLeft(true),F=this.getTop(true);
if(E&&!this.shadowDisabled){if(H&&!E.isVisible()){E.show(this);}else{E.realign(I,F,D,J);
}if(K){if(H){K.show();}var C=E.adjusts,G=K.dom.style;G.left=(Math.min(I,I+C.l))+"px";
G.top=(Math.min(F,F+C.t))+"px";G.width=(D+C.w)+"px";G.height=(J+C.h)+"px";}}else{if(K){if(H){K.show();
}K.setSize(D,J);K.setLeftTop(I,F);}}}},destroy:function(){this.hideShim();if(this.shadow){this.shadow.hide();
}this.removeAllListeners();Ext.removeNode(this.dom);Ext.Element.uncache(this.id);
},remove:function(){this.destroy();},beginUpdate:function(){this.updating=true;},endUpdate:function(){this.updating=false;
this.sync(true);},hideUnders:function(C){if(this.shadow){this.shadow.hide();}this.hideShim();
},constrainXY:function(){if(this.constrain){var D=Ext.lib.Dom.getViewWidth(),K=Ext.lib.Dom.getViewHeight();
var I=Ext.getDoc().getScroll();var H=this.getXY();var E=H[0],C=H[1];var J=this.shadowOffset;
var F=this.dom.offsetWidth+J,L=this.dom.offsetHeight+J;var M=false;if((E+F)>D+I.left){E=D-F-J;
M=true;}if((C+L)>K+I.top){C=K-L-J;M=true;}if(E<I.left){E=I.left;M=true;}if(C<I.top){C=I.top;
M=true;}if(M){if(this.avoidY){var G=this.avoidY;if(C<=G&&(C+L)>=G){C=G-L-5;}}H=[E,C];
this.storeXY(H);A.setXY.call(this,H);this.sync();}}return this;},isVisible:function(){return this.visible;
},showAction:function(){this.visible=true;if(this.useDisplay===true){this.setDisplayed("");
}else{if(this.lastXY){A.setXY.call(this,this.lastXY);}else{if(this.lastLT){A.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(D,C,F,G,E){if(D){this.showAction();
}if(C&&D){var H=function(){this.sync(true);if(G){G();}}.createDelegate(this);A.setVisible.call(this,true,true,F,H,E);
}else{if(!D){this.hideUnders(true);}var H=G;if(C){H=function(){this.hideAction();
if(G){G();}}.createDelegate(this);}A.setVisible.call(this,D,C,F,H,E);if(D){this.sync(true);
}else{if(!C){this.hideAction();}}}return this;},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));A.setLeft.apply(this,arguments);
this.sync();return this;},setTop:function(C){this.storeLeftTop(this.getLeft(true),C);
A.setTop.apply(this,arguments);this.sync();return this;},setLeftTop:function(C,D){this.storeLeftTop(C,D);
A.setLeftTop.apply(this,arguments);this.sync();return this;},setXY:function(E,C,F,G,D){this.fixDisplay();
this.beforeAction();this.storeXY(E);var H=this.createCB(G);A.setXY.call(this,E,C,F,H,D);
if(!C){H();}return this;},createCB:function(D){var C=this;return function(){C.constrainXY();
C.sync(true);if(D){D();}};},setX:function(D,C,E,F,G){this.setXY([D,this.getY()],C,E,F,G);
return this;},setY:function(F,D,G,E,C){this.setXY([this.getX(),F],D,G,E,C);return this;
},setSize:function(D,E,C,G,H,F){this.beforeAction();var I=this.createCB(H);A.setSize.call(this,D,E,C,G,I,F);
if(!C){I();}return this;},setWidth:function(D,C,F,G,E){this.beforeAction();var H=this.createCB(G);
A.setWidth.call(this,D,C,F,H,E);if(!C){H();}return this;},setHeight:function(D,C,F,G,E){this.beforeAction();
var H=this.createCB(G);A.setHeight.call(this,D,C,F,H,E);if(!C){H();}return this;},setBounds:function(I,G,J,C,H,E,F,D){this.beforeAction();
var K=this.createCB(F);if(!H){this.storeXY([I,G]);A.setXY.call(this,[I,G]);A.setSize.call(this,J,C,H,E,K,D);
K();}else{A.setBounds.call(this,I,G,J,C,H,E,K,D);}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);
}return this;}});})();Ext.Shadow=function(C){Ext.apply(this,C);if(typeof this.mode!="string"){this.mode=this.defaultMode;
}var D=this.offset,B={h:0};var A=Math.floor(this.offset/2);switch(this.mode.toLowerCase()){case"drop":B.w=0;
B.l=B.t=D;B.t-=1;if(Ext.isIE){B.l-=this.offset+A;B.t-=this.offset+A;B.w-=A;B.h-=A;
B.t+=1;}break;case"sides":B.w=(D*2);B.l=-D;B.t=D-1;if(Ext.isIE){B.l-=(this.offset-A);
B.t-=this.offset+A;B.l+=1;B.w-=(this.offset-A)*2;B.w-=A+1;B.h-=1;}break;case"frame":B.w=B.h=(D*2);
B.l=B.t=-D;B.t+=1;B.h-=2;if(Ext.isIE){B.l-=(this.offset-A);B.t-=(this.offset-A);B.l+=1;
B.w-=(this.offset+A+1);B.h-=(this.offset+A);B.h+=1;}break;}this.adjusts=B;};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(K,C,B,N){if(!this.el){return;
}var I=this.adjusts,G=this.el.dom,D=G.style;var E=0;D.left=(K+I.l)+"px";D.top=(C+I.t)+"px";
var A=(B+I.w),M=(N+I.h),F=A+"px",J=M+"px";if(D.width!=F||D.height!=J){D.width=F;D.height=J;
if(!Ext.isIE){var H=G.childNodes;var L=Math.max(0,(A-12))+"px";H[0].childNodes[1].style.width=L;
H[1].childNodes[1].style.width=L;H[2].childNodes[1].style.width=L;H[1].style.height=Math.max(0,(M-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=Ext.extend(Ext.Component,{initComponent:function(){Ext.BoxComponent.superclass.initComponent.call(this);
this.addEvents("resize","move");},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 this;}if(this.cacheSizes!==false&&this.lastSize&&this.lastSize.width==B&&this.lastSize.height==D){return this;
}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;},setWidth:function(A){return this.setSize(A);
},setHeight:function(A){return this.setSize(undefined,A);},getSize:function(){return this.getResizeEl().getSize();
},getWidth:function(){return this.getResizeEl().getWidth();},getHeight:function(){return this.getResizeEl().getHeight();
},getOuterSize:function(){var A=this.getResizeEl();return{width:A.getWidth()+A.getMargins("lr"),height:A.getHeight()+A.getMargins("tb")};
},getPosition:function(A){var B=this.getPositionEl();if(A===true){return[B.getLeft(true),B.getTop(true)];
}return this.xy||B.getXY();},getBox:function(A){var C=this.getPosition(A);var B=this.getSize();
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);return this;},getResizeEl:function(){return this.resizeEl||this.el;
},getPositionEl:function(){return this.positionEl||this.el;},setPosition:function(A,F){if(A&&typeof A[1]=="number"){F=A[1];
A=A[0];}this.x=A;this.y=F;if(!this.boxReady){return this;}var B=this.adjustPosition(A,F);
var E=B.x,D=B.y;var C=this.getPositionEl();if(E!==undefined||D!==undefined){if(E!==undefined&&D!==undefined){C.setLeftTop(E,D);
}else{if(E!==undefined){C.setLeft(E);}else{if(D!==undefined){C.setTop(D);}}}this.onPosition(E,D);
this.fireEvent("move",this,E,D);}return this;},setPagePosition:function(A,C){if(A&&typeof A[1]=="number"){C=A[1];
A=A[0];}this.pageX=A;this.pageY=C;if(!this.boxReady){return;}if(A===undefined||C===undefined){return;
}var B=this.getPositionEl().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);
}if(this.positionEl){this.positionEl=Ext.get(this.positionEl);}},afterRender:function(){Ext.BoxComponent.superclass.afterRender.call(this);
this.boxReady=true;this.setSize(this.width,this.height);if(this.x||this.y){this.setPosition(this.x,this.y);
}else{if(this.pageX||this.pageY){this.setPagePosition(this.pageX,this.pageY);}}},syncSize:function(){delete this.lastSize;
this.setSize(this.autoWidth?undefined:this.getResizeEl().getWidth(),this.autoHeight?undefined:this.getResizeEl().getHeight());
return this;},onResize:function(D,B,A,C){},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.reg("box",Ext.BoxComponent);Ext.Spacer=Ext.extend(Ext.BoxComponent,{autoEl:"div"});
Ext.reg("spacer",Ext.Spacer);Ext.SplitBar=function(C,E,B,D,A){this.el=Ext.get(C,true);
this.el.dom.unselectable="on";this.resizingEl=Ext.get(E,true);this.orientation=B||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=D||(this.el.getX()>this.resizingEl.getX()?Ext.SplitBar.LEFT:Ext.SplitBar.RIGHT);
this.el.addClass("x-splitbar-h");}else{this.placement=D||(this.el.getY()>this.resizingEl.getY()?Ext.SplitBar.TOP:Ext.SplitBar.BOTTOM);
this.el.addClass("x-splitbar-v");}this.addEvents("resize","moved","beforeresize","beforeapply");
Ext.SplitBar.superclass.constructor.call(this);};Ext.extend(Ext.SplitBar,Ext.util.Observable,{onStartProxyDrag:function(A,E){this.fireEvent("beforeresize",this);
this.overlay=Ext.DomHelper.append(document.body,{cls:"x-drag-overlay",html:"&#160;"},true);
this.overlay.unselectable();this.overlay.setSize(Ext.lib.Dom.getViewWidth(true),Ext.lib.Dom.getViewHeight(true));
this.overlay.show();Ext.get(this.proxy).setDisplayed("block");var C=this.adapter.getElementSize(this);
this.activeMinSize=this.getMinimumSize();this.activeMaxSize=this.getMaximumSize();
var D=C-this.activeMinSize;var B=Math.max(this.activeMaxSize-C,0);if(this.orientation==Ext.SplitBar.HORIZONTAL){this.dd.resetConstraints();
this.dd.setXConstraint(this.placement==Ext.SplitBar.LEFT?D:B,this.placement==Ext.SplitBar.LEFT?B:D,this.tickSize);
this.dd.setYConstraint(0,0);}else{this.dd.resetConstraints();this.dd.setXConstraint(0,0);
this.dd.setYConstraint(this.placement==Ext.SplitBar.TOP?D:B,this.placement==Ext.SplitBar.TOP?B:D,this.tickSize);
}this.dragSpecs.startSize=C;this.dragSpecs.startPoint=[A,E];Ext.dd.DDProxy.prototype.b4StartDrag.call(this.dd,A,E);
},onEndProxyDrag:function(C){Ext.get(this.proxy).setDisplayed(false);var B=Ext.lib.Event.getXY(C);
if(this.overlay){Ext.destroy(this.overlay);delete this.overlay;}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){Ext.destroy(this.shim,Ext.get(this.proxy));
this.dd.unreg();if(A){this.el.remove();}this.purgeListeners();}});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(B,A,C){if(B.orientation==Ext.SplitBar.HORIZONTAL){if(!B.animate){B.resizingEl.setWidth(A);
if(C){C(B,A);}}else{B.resizingEl.setWidth(A,true,0.1,C,"easeOut");}}else{if(!B.animate){B.resizingEl.setHeight(A);
if(C){C(B,A);}}else{B.resizingEl.setHeight(A,true,0.1,C,"easeOut");}}}};Ext.SplitBar.AbsoluteLayoutAdapter=function(A){this.basic=new Ext.SplitBar.BasicLayoutAdapter();
this.container=Ext.get(A);};Ext.SplitBar.AbsoluteLayoutAdapter.prototype={init:function(A){this.basic.init(A);
},getElementSize:function(A){return this.basic.getElementSize(A);},setElementSize:function(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.Container=Ext.extend(Ext.BoxComponent,{bufferResize:100,autoDestroy:true,forceLayout:false,defaultType:"panel",initComponent:function(){Ext.Container.superclass.initComponent.call(this);
this.addEvents("afterlayout","beforeadd","beforeremove","add","remove");this.enableBubble("add","remove");
var A=this.items;if(A){delete this.items;if(Ext.isArray(A)&&A.length>0){this.add.apply(this,A);
}else{this.add(A);}}},initItems:function(){if(!this.items){this.items=new Ext.util.MixedCollection(false,this.getComponentId);
this.getLayout();}},setLayout:function(A){if(this.layout&&this.layout!=A){this.layout.setContainer(null);
}this.initItems();this.layout=A;A.setContainer(this);},render:function(){Ext.Container.superclass.render.apply(this,arguments);
if(this.layout){if(Ext.isObject(this.layout)&&!this.layout.layout){this.layoutConfig=this.layout;
this.layout=this.layoutConfig.type;}if(typeof this.layout=="string"){this.layout=new Ext.Container.LAYOUTS[this.layout.toLowerCase()](this.layoutConfig);
}this.setLayout(this.layout);if(this.activeItem!==undefined){var A=this.activeItem;
delete this.activeItem;this.layout.setActiveItem(A);}}if(!this.ownerCt){this.doLayout(false,true);
}if(this.monitorResize===true){Ext.EventManager.onWindowResize(this.doLayout,this,[false]);
}},getLayoutTarget:function(){return this.el;},getComponentId:function(A){return A.getItemId();
},add:function(A){this.initItems();var B=arguments.length>1;if(B||Ext.isArray(A)){Ext.each(B?arguments:A,function(E){this.add(E);
},this);return;}var D=this.lookupComponent(this.applyDefaults(A));var C=this.items.length;
if(this.fireEvent("beforeadd",this,D,C)!==false&&this.onBeforeAdd(D)!==false){this.items.add(D);
D.ownerCt=this;this.fireEvent("add",this,D,C);}return D;},insert:function(F,E){this.initItems();
var D=arguments,C=D.length;if(C>2){for(var A=C-1;A>=1;--A){this.insert(F,D[A]);}return;
}var B=this.lookupComponent(this.applyDefaults(E));if(B.ownerCt==this&&this.items.indexOf(B)<F){--F;
}if(this.fireEvent("beforeadd",this,B,F)!==false&&this.onBeforeAdd(B)!==false){this.items.insert(F,B);
B.ownerCt=this;this.fireEvent("add",this,B,F);}return B;},applyDefaults:function(A){if(this.defaults){if(typeof A=="string"){A=Ext.ComponentMgr.get(A);
Ext.apply(A,this.defaults);}else{if(!A.events){Ext.applyIf(A,this.defaults);}else{Ext.apply(A,this.defaults);
}}}return A;},onBeforeAdd:function(A){if(A.ownerCt){A.ownerCt.remove(A,false);}if(this.hideBorders===true){A.border=(A.border===true);
}},remove:function(A,B){this.initItems();var C=this.getComponent(A);if(C&&this.fireEvent("beforeremove",this,C)!==false){this.items.remove(C);
delete C.ownerCt;if(B===true||(B!==false&&this.autoDestroy)){C.destroy();}if(this.layout&&this.layout.activeItem==C){delete this.layout.activeItem;
}this.fireEvent("remove",this,C);}return C;},removeAll:function(C){this.initItems();
var E,F=[],B=[];this.items.each(function(G){F.push(G);});for(var D=0,A=F.length;D<A;
++D){E=F[D];this.remove(E,C);if(E.ownerCt!==this){B.push(E);}}return B;},getComponent:function(A){if(Ext.isObject(A)){return A;
}return this.items.get(A);},lookupComponent:function(A){if(typeof A=="string"){return Ext.ComponentMgr.get(A);
}else{if(!A.events){return this.createComponent(A);}}return A;},createComponent:function(A){return Ext.create(A,this.defaultType);
},doLayout:function(H,G){var C=this.rendered,B=this.forceLayout;if(!this.isVisible()||this.collapsed){this.deferLayout=this.deferLayout||!H;
if(!(G||B)){return;}H=H&&!this.deferLayout;}else{delete this.deferLayout;}if(C&&this.layout){this.layout.layout();
}if(H!==true&&this.items){var F=this.items.items;for(var E=0,D=F.length;E<D;E++){var A=F[E];
if(A.doLayout){A.forceLayout=B;A.doLayout();}}}if(C){this.onLayout(H,G);}delete this.forceLayout;
},onLayout:Ext.emptyFn,onShow:function(){Ext.Container.superclass.onShow.call(this);
if(this.deferLayout!==undefined){this.doLayout(true);}},getLayout:function(){if(!this.layout){var A=new Ext.layout.ContainerLayout(this.layoutConfig);
this.setLayout(A);}return this.layout;},beforeDestroy:function(){if(this.items){Ext.destroy.apply(Ext,this.items.items);
}if(this.monitorResize){Ext.EventManager.removeResizeListener(this.doLayout,this);
}Ext.destroy(this.layout);Ext.Container.superclass.beforeDestroy.call(this);},bubble:function(C,B,A){var D=this;
while(D){if(C.apply(B||D,A||[D])===false){break;}D=D.ownerCt;}return this;},cascade:function(F,E,B){if(F.apply(E||this,B||[this])!==false){if(this.items){var D=this.items.items;
for(var C=0,A=D.length;C<A;C++){if(D[C].cascade){D[C].cascade(F,E,B);}else{F.apply(E||D[C],B||[D[C]]);
}}}}return this;},findById:function(C){var A,B=this;this.cascade(function(D){if(B!=D&&D.id===C){A=D;
return false;}});return A||null;},findByType:function(B,A){return this.findBy(function(C){return C.isXType(B,A);
});},find:function(B,A){return this.findBy(function(C){return C[B]===A;});},findBy:function(D,C){var A=[],B=this;
this.cascade(function(E){if(B!=E&&D.call(C||E,E,B)===true){A.push(E);}});return A;
},get:function(A){return this.items.get(A);}});Ext.Container.LAYOUTS={};Ext.reg("container",Ext.Container);
Ext.layout.ContainerLayout=function(A){Ext.apply(this,A);};Ext.layout.ContainerLayout.prototype={monitorResize:false,activeItem:null,layout:function(){var A=this.container.getLayoutTarget();
this.onLayout(this.container,A);this.container.fireEvent("afterlayout",this.container,this);
},onLayout:function(A,B){this.renderAll(A,B);},isValidParent:function(B,A){return A&&B.getDomPositionEl().dom.parentNode==(A.dom||A);
},renderAll:function(E,F){var C=E.items.items;for(var D=0,B=C.length;D<B;D++){var A=C[D];
if(A&&(!A.rendered||!this.isValidParent(A,F))){this.renderItem(A,D,F);}}},renderItem:function(C,A,B){if(C&&!C.rendered){C.render(B,A);
this.configureItem(C,A);}else{if(C&&!this.isValidParent(C,B)){if(typeof A=="number"){A=B.dom.childNodes[A];
}B.dom.insertBefore(C.getDomPositionEl().dom,A||null);C.container=B;this.configureItem(C,A);
}}},configureItem:function(C,A){if(this.extraCls){var B=C.getPositionEl?C.getPositionEl():C;
B.addClass(this.extraCls);}if(this.renderHidden&&C!=this.activeItem){C.hide();}if(C.doLayout){C.doLayout(false,this.forceLayout);
}},onResize:function(){if(this.container.collapsed){return;}var A=this.container.bufferResize;
if(A){if(!this.resizeTask){this.resizeTask=new Ext.util.DelayedTask(this.runLayout,this);
this.resizeBuffer=typeof A=="number"?A:100;}this.resizeTask.delay(this.resizeBuffer);
}else{this.runLayout();}},runLayout:function(){this.layout();this.container.onLayout();
},setContainer:function(A){if(this.monitorResize&&A!=this.container){if(this.container){this.container.un("resize",this.onResize,this);
this.container.un("bodyresize",this.onResize,this);}if(A){A.on({scope:this,resize:this.onResize,bodyresize:this.onResize});
}}this.container=A;},parseMargins:function(B){if(typeof B=="number"){B=B.toString();
}var C=B.split(" ");var A=C.length;if(A==1){C[1]=C[0];C[2]=C[0];C[3]=C[0];}if(A==2){C[2]=C[0];
C[3]=C[1];}if(A==3){C[3]=C[1];}return{top:parseInt(C[0],10)||0,right:parseInt(C[1],10)||0,bottom:parseInt(C[2],10)||0,left:parseInt(C[3],10)||0};
},fieldTpl:(function(){var A=new Ext.Template('<div class="x-form-item {itemCls}" tabIndex="-1">','<label for="{id}" style="{labelStyle}" class="x-form-item-label">{label}{labelSeparator}</label>','<div class="x-form-element" id="x-form-el-{id}" style="{elementStyle}">','</div><div class="{clearCls}"></div>',"</div>");
A.disableFormats=true;return A.compile();})(),destroy:Ext.emptyFn};Ext.Container.LAYOUTS.auto=Ext.layout.ContainerLayout;
Ext.layout.FitLayout=Ext.extend(Ext.layout.ContainerLayout,{monitorResize:true,onLayout:function(A,C){Ext.layout.FitLayout.superclass.onLayout.call(this,A,C);
if(!this.container.collapsed){var B=(Ext.isIE6&&Ext.isStrict&&C.dom==document.body)?C.getViewSize():C.getStyleSize();
this.setItemSize(this.activeItem||A.items.itemAt(0),B);}},setItemSize:function(B,A){if(B&&A.height>0){B.setSize(A);
}}});Ext.Container.LAYOUTS.fit=Ext.layout.FitLayout;Ext.layout.CardLayout=Ext.extend(Ext.layout.FitLayout,{deferredRender:false,layoutOnCardChange:false,renderHidden:true,constructor:function(A){Ext.layout.CardLayout.superclass.constructor.call(this,A);
this.forceLayout=(this.deferredRender===false);},setActiveItem:function(A){A=this.container.getComponent(A);
if(this.activeItem!=A){if(this.activeItem){this.activeItem.hide();}this.activeItem=A;
A.show();this.container.doLayout();if(this.layoutOnCardChange&&A.doLayout){A.doLayout();
}}},renderAll:function(A,B){if(this.deferredRender){this.renderItem(this.activeItem,undefined,B);
}else{Ext.layout.CardLayout.superclass.renderAll.call(this,A,B);}}});Ext.Container.LAYOUTS.card=Ext.layout.CardLayout;
Ext.layout.AnchorLayout=Ext.extend(Ext.layout.ContainerLayout,{monitorResize:true,getAnchorViewSize:function(A,B){return B.dom==document.body?B.getViewSize():B.getStyleSize();
},onLayout:function(G,J){Ext.layout.AnchorLayout.superclass.onLayout.call(this,G,J);
var E=this.getAnchorViewSize(G,J);var C=E.width,F=E.height;if(C<20&&F<20){return;
}var M,A;if(G.anchorSize){if(typeof G.anchorSize=="number"){M=G.anchorSize;}else{M=G.anchorSize.width;
A=G.anchorSize.height;}}else{M=G.initialConfig.width;A=G.initialConfig.height;}var I=G.items.items,H=I.length,O,K,B,N,L;
for(O=0;O<H;O++){K=I[O];if(K.anchor){B=K.anchorSpec;if(!B){var D=K.anchor.split(" ");
K.anchorSpec=B={right:this.parseAnchor(D[0],K.initialConfig.width,M),bottom:this.parseAnchor(D[1],K.initialConfig.height,A)};
}N=B.right?this.adjustWidthAnchor(B.right(C),K):undefined;L=B.bottom?this.adjustHeightAnchor(B.bottom(F),K):undefined;
if(N||L){K.setSize(N||undefined,L||undefined);}}}},parseAnchor:function(C,A,B){if(C&&C!="none"){var E;
if(/^(r|right|b|bottom)$/i.test(C)){var F=B-A;return function(G){if(G!==E){E=G;return G-F;
}};}else{if(C.indexOf("%")!=-1){var D=parseFloat(C.replace("%",""))*0.01;return function(G){if(G!==E){E=G;
return Math.floor(G*D);}};}else{C=parseInt(C,10);if(!isNaN(C)){return function(G){if(G!==E){E=G;
return G+C;}};}}}}return false;},adjustWidthAnchor:function(B,A){return B;},adjustHeightAnchor:function(B,A){return B;
}});Ext.Container.LAYOUTS.anchor=Ext.layout.AnchorLayout;Ext.layout.ColumnLayout=Ext.extend(Ext.layout.ContainerLayout,{monitorResize:true,extraCls:"x-column",scrollOffset:0,isValidParent:function(B,A){return(B.getPositionEl?B.getPositionEl():B.getEl()).dom.parentNode==this.innerCt.dom;
},onLayout:function(H,A){var I=H.items.items,J=I.length,B,F;if(!this.innerCt){A.addClass("x-column-layout-ct");
this.innerCt=A.createChild({cls:"x-column-inner"});this.innerCt.createChild({cls:"x-clear"});
}this.renderAll(H,this.innerCt);var E=Ext.isIE&&A.dom!=Ext.getBody().dom?A.getStyleSize():A.getViewSize();
if(E.width<1&&E.height<1){return;}var C=E.width-A.getPadding("lr")-this.scrollOffset,G=E.height-A.getPadding("tb"),D=C;
this.innerCt.setWidth(C);for(F=0;F<J;F++){B=I[F];if(!B.columnWidth){D-=(B.getSize().width+B.getEl().getMargins("lr"));
}}D=D<0?0:D;for(F=0;F<J;F++){B=I[F];if(B.columnWidth){B.setSize(Math.floor(B.columnWidth*D)-B.getEl().getMargins("lr"));
}}}});Ext.Container.LAYOUTS.column=Ext.layout.ColumnLayout;Ext.layout.BorderLayout=Ext.extend(Ext.layout.ContainerLayout,{monitorResize:true,rendered:false,onLayout:function(Z,V){var X;
if(!this.rendered){V.addClass("x-border-layout-ct");var R=Z.items.items;X=[];for(var b=0,c=R.length;
b<c;b++){var i=R[b];var U=i.region;if(i.collapsed){X.push(i);}i.collapsed=false;if(!i.rendered){i.cls=i.cls?i.cls+" x-border-panel":"x-border-panel";
i.render(V,b);}this[U]=U!="center"&&i.split?new Ext.layout.BorderLayout.SplitRegion(this,i.initialConfig,U):new Ext.layout.BorderLayout.Region(this,i.initialConfig,U);
this[U].render(V,i);}this.rendered=true;}var Q=V.getViewSize();if(Q.width<20||Q.height<20){if(X){this.restoreCollapsed=X;
}return;}else{if(this.restoreCollapsed){X=this.restoreCollapsed;delete this.restoreCollapsed;
}}var O=Q.width,e=Q.height;var N=O,L=e,W=0,M=0;var J=this.north,P=this.south,T=this.west,h=this.east,i=this.center;
if(!i&&Ext.layout.BorderLayout.WARN!==false){throw"No center region defined in BorderLayout "+Z.id;
}if(J&&J.isVisible()){var I=J.getSize();var K=J.getMargins();I.width=O-(K.left+K.right);
I.x=K.left;I.y=K.top;W=I.height+I.y+K.bottom;L-=W;J.applyLayout(I);}if(P&&P.isVisible()){var I=P.getSize();
var K=P.getMargins();I.width=O-(K.left+K.right);I.x=K.left;var m=(I.height+K.top+K.bottom);
I.y=e-m+K.top;L-=m;P.applyLayout(I);}if(T&&T.isVisible()){var I=T.getSize();var K=T.getMargins();
I.height=L-(K.top+K.bottom);I.x=K.left;I.y=W+K.top;var Y=(I.width+K.left+K.right);
M+=Y;N-=Y;T.applyLayout(I);}if(h&&h.isVisible()){var I=h.getSize();var K=h.getMargins();
I.height=L-(K.top+K.bottom);var Y=(I.width+K.left+K.right);I.x=O-Y+K.left;I.y=W+K.top;
N-=Y;h.applyLayout(I);}if(i){var K=i.getMargins();var S={x:M+K.left,y:W+K.top,width:N-(K.left+K.right),height:L-(K.top+K.bottom)};
i.applyLayout(S);}if(X){for(var b=0,c=X.length;b<c;b++){X[b].collapse(false);}}if(Ext.isIE&&Ext.isStrict){V.repaint();
}},destroy:function(){var B=["north","south","east","west"];for(var A=0;A<B.length;
A++){var C=this[B[A]];if(C){if(C.destroy){C.destroy();}else{if(C.split){C.split.destroy(true);
}}}}Ext.layout.BorderLayout.superclass.destroy.call(this);}});Ext.layout.BorderLayout.Region=function(B,A,C){Ext.apply(this,A);
this.layout=B;this.position=C;this.state={};if(typeof this.margins=="string"){this.margins=this.layout.parseMargins(this.margins);
}this.margins=Ext.applyIf(this.margins||{},this.defaultMargins);if(this.collapsible){if(typeof this.cmargins=="string"){this.cmargins=this.layout.parseMargins(this.cmargins);
}if(this.collapseMode=="mini"&&!this.cmargins){this.cmargins={left:0,top:0,right:0,bottom:0};
}else{this.cmargins=Ext.applyIf(this.cmargins||{},C=="north"||C=="south"?this.defaultNSCMargins:this.defaultEWCMargins);
}}};Ext.layout.BorderLayout.Region.prototype={collapsible:false,split:false,floatable:true,minWidth:50,minHeight:50,defaultMargins:{left:0,top:0,right:0,bottom:0},defaultNSCMargins:{left:5,top:5,right:5,bottom:5},defaultEWCMargins:{left:5,top:0,right:5,bottom:0},floatingZIndex:100,isCollapsed:false,render:function(B,C){this.panel=C;
C.el.enableDisplayMode();this.targetEl=B;this.el=C.el;var A=C.getState,D=this.position;
C.getState=function(){return Ext.apply(A.call(C)||{},this.state);}.createDelegate(this);
if(D!="center"){C.allowQueuedExpand=false;C.on({beforecollapse:this.beforeCollapse,collapse:this.onCollapse,beforeexpand:this.beforeExpand,expand:this.onExpand,hide:this.onHide,show:this.onShow,scope:this});
if(this.collapsible||this.floatable){C.collapseEl="el";C.slideAnchor=this.getSlideAnchor();
}if(C.tools&&C.tools.toggle){C.tools.toggle.addClass("x-tool-collapse-"+D);C.tools.toggle.addClassOnOver("x-tool-collapse-"+D+"-over");
}}},getCollapsedEl:function(){if(!this.collapsedEl){if(!this.toolTemplate){var B=new Ext.Template('<div class="x-tool x-tool-{id}">&#160;</div>');
B.disableFormats=true;B.compile();Ext.layout.BorderLayout.Region.prototype.toolTemplate=B;
}this.collapsedEl=this.targetEl.createChild({cls:"x-layout-collapsed x-layout-collapsed-"+this.position,id:this.panel.id+"-xcollapsed"});
this.collapsedEl.enableDisplayMode("block");if(this.collapseMode=="mini"){this.collapsedEl.addClass("x-layout-cmini-"+this.position);
this.miniCollapsedEl=this.collapsedEl.createChild({cls:"x-layout-mini x-layout-mini-"+this.position,html:"&#160;"});
this.miniCollapsedEl.addClassOnOver("x-layout-mini-over");this.collapsedEl.addClassOnOver("x-layout-collapsed-over");
this.collapsedEl.on("click",this.onExpandClick,this,{stopEvent:true});}else{if(this.collapsible!==false&&!this.hideCollapseTool){var A=this.toolTemplate.append(this.collapsedEl.dom,{id:"expand-"+this.position},true);
A.addClassOnOver("x-tool-expand-"+this.position+"-over");A.on("click",this.onExpandClick,this,{stopEvent:true});
}if(this.floatable!==false||this.titleCollapse){this.collapsedEl.addClassOnOver("x-layout-collapsed-over");
this.collapsedEl.on("click",this[this.floatable?"collapseClick":"onExpandClick"],this);
}}}return this.collapsedEl;},onExpandClick:function(A){if(this.isSlid){this.afterSlideIn();
this.panel.expand(false);}else{this.panel.expand();}},onCollapseClick:function(A){this.panel.collapse();
},beforeCollapse:function(B,A){this.lastAnim=A;if(this.splitEl){this.splitEl.hide();
}this.getCollapsedEl().show();this.panel.el.setStyle("z-index",100);this.isCollapsed=true;
this.layout.layout();},onCollapse:function(A){this.panel.el.setStyle("z-index",1);
if(this.lastAnim===false||this.panel.animCollapse===false){this.getCollapsedEl().dom.style.visibility="visible";
}else{this.getCollapsedEl().slideIn(this.panel.slideAnchor,{duration:0.2});}this.state.collapsed=true;
this.panel.saveState();},beforeExpand:function(A){var B=this.getCollapsedEl();this.el.show();
if(this.position=="east"||this.position=="west"){this.panel.setSize(undefined,B.getHeight());
}else{this.panel.setSize(B.getWidth(),undefined);}B.hide();B.dom.style.visibility="hidden";
this.panel.el.setStyle("z-index",this.floatingZIndex);},onExpand:function(){this.isCollapsed=false;
if(this.splitEl){this.splitEl.show();}this.layout.layout();this.panel.el.setStyle("z-index",1);
this.state.collapsed=false;this.panel.saveState();},collapseClick:function(A){if(this.isSlid){A.stopPropagation();
this.slideIn();}else{A.stopPropagation();this.slideOut();}},onHide:function(){if(this.isCollapsed){this.getCollapsedEl().hide();
}else{if(this.splitEl){this.splitEl.hide();}}},onShow:function(){if(this.isCollapsed){this.getCollapsedEl().show();
}else{if(this.splitEl){this.splitEl.show();}}},isVisible:function(){return !this.panel.hidden;
},getMargins:function(){return this.isCollapsed&&this.cmargins?this.cmargins:this.margins;
},getSize:function(){return this.isCollapsed?this.getCollapsedEl().getSize():this.panel.getSize();
},setPanel:function(A){this.panel=A;},getMinWidth:function(){return this.minWidth;
},getMinHeight:function(){return this.minHeight;},applyLayoutCollapsed:function(A){var B=this.getCollapsedEl();
B.setLeftTop(A.x,A.y);B.setSize(A.width,A.height);},applyLayout:function(A){if(this.isCollapsed){this.applyLayoutCollapsed(A);
}else{this.panel.setPosition(A.x,A.y);this.panel.setSize(A.width,A.height);}},beforeSlide:function(){this.panel.beforeEffect();
},afterSlide:function(){this.panel.afterEffect();},initAutoHide:function(){if(this.autoHide!==false){if(!this.autoHideHd){var A=new Ext.util.DelayedTask(this.slideIn,this);
this.autoHideHd={mouseout:function(B){if(!B.within(this.el,true)){A.delay(500);}},mouseover:function(B){A.cancel();
},scope:this};}this.el.on(this.autoHideHd);}},clearAutoHide:function(){if(this.autoHide!==false){this.el.un("mouseout",this.autoHideHd.mouseout);
this.el.un("mouseover",this.autoHideHd.mouseover);}},clearMonitor:function(){Ext.getDoc().un("click",this.slideInIf,this);
},slideOut:function(){if(this.isSlid||this.el.hasActiveFx()){return;}this.isSlid=true;
var A=this.panel.tools;if(A&&A.toggle){A.toggle.hide();}this.el.show();if(this.position=="east"||this.position=="west"){this.panel.setSize(undefined,this.collapsedEl.getHeight());
}else{this.panel.setSize(this.collapsedEl.getWidth(),undefined);}this.restoreLT=[this.el.dom.style.left,this.el.dom.style.top];
this.el.alignTo(this.collapsedEl,this.getCollapseAnchor());this.el.setStyle("z-index",this.floatingZIndex+2);
this.panel.el.replaceClass("x-panel-collapsed","x-panel-floating");if(this.animFloat!==false){this.beforeSlide();
this.el.slideIn(this.getSlideAnchor(),{callback:function(){this.afterSlide();this.initAutoHide();
Ext.getDoc().on("click",this.slideInIf,this);},scope:this,block:true});}else{this.initAutoHide();
Ext.getDoc().on("click",this.slideInIf,this);}},afterSlideIn:function(){this.clearAutoHide();
this.isSlid=false;this.clearMonitor();this.el.setStyle("z-index","");this.panel.el.replaceClass("x-panel-floating","x-panel-collapsed");
this.el.dom.style.left=this.restoreLT[0];this.el.dom.style.top=this.restoreLT[1];
var A=this.panel.tools;if(A&&A.toggle){A.toggle.show();}},slideIn:function(A){if(!this.isSlid||this.el.hasActiveFx()){Ext.callback(A);
return;}this.isSlid=false;if(this.animFloat!==false){this.beforeSlide();this.el.slideOut(this.getSlideAnchor(),{callback:function(){this.el.hide();
this.afterSlide();this.afterSlideIn();Ext.callback(A);},scope:this,block:true});}else{this.el.hide();
this.afterSlideIn();}},slideInIf:function(A){if(!A.within(this.el)){this.slideIn();
}},anchors:{west:"left",east:"right",north:"top",south:"bottom"},sanchors:{west:"l",east:"r",north:"t",south:"b"},canchors:{west:"tl-tr",east:"tr-tl",north:"tl-bl",south:"bl-tl"},getAnchor:function(){return this.anchors[this.position];
},getCollapseAnchor:function(){return this.canchors[this.position];},getSlideAnchor:function(){return this.sanchors[this.position];
},getAlignAdj:function(){var A=this.cmargins;switch(this.position){case"west":return[0,0];
break;case"east":return[0,0];break;case"north":return[0,0];break;case"south":return[0,0];
break;}},getExpandAdj:function(){var 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.layout.BorderLayout.SplitRegion=function(B,A,C){Ext.layout.BorderLayout.SplitRegion.superclass.constructor.call(this,B,A,C);
this.applyLayout=this.applyFns[C];};Ext.extend(Ext.layout.BorderLayout.SplitRegion,Ext.layout.BorderLayout.Region,{splitTip:"Drag to resize.",collapsibleSplitTip:"Drag to resize. Double click to hide.",useSplitTips:false,splitSettings:{north:{orientation:Ext.SplitBar.VERTICAL,placement:Ext.SplitBar.TOP,maxFn:"getVMaxSize",minProp:"minHeight",maxProp:"maxHeight"},south:{orientation:Ext.SplitBar.VERTICAL,placement:Ext.SplitBar.BOTTOM,maxFn:"getVMaxSize",minProp:"minHeight",maxProp:"maxHeight"},east:{orientation:Ext.SplitBar.HORIZONTAL,placement:Ext.SplitBar.RIGHT,maxFn:"getHMaxSize",minProp:"minWidth",maxProp:"maxWidth"},west:{orientation:Ext.SplitBar.HORIZONTAL,placement:Ext.SplitBar.LEFT,maxFn:"getHMaxSize",minProp:"minWidth",maxProp:"maxWidth"}},applyFns:{west:function(C){if(this.isCollapsed){return this.applyLayoutCollapsed(C);
}var D=this.splitEl.dom,B=D.style;this.panel.setPosition(C.x,C.y);var A=D.offsetWidth;
B.left=(C.x+C.width-A)+"px";B.top=(C.y)+"px";B.height=Math.max(0,C.height)+"px";this.panel.setSize(C.width-A,C.height);
},east:function(C){if(this.isCollapsed){return this.applyLayoutCollapsed(C);}var D=this.splitEl.dom,B=D.style;
var A=D.offsetWidth;this.panel.setPosition(C.x+A,C.y);B.left=(C.x)+"px";B.top=(C.y)+"px";
B.height=Math.max(0,C.height)+"px";this.panel.setSize(C.width-A,C.height);},north:function(C){if(this.isCollapsed){return this.applyLayoutCollapsed(C);
}var D=this.splitEl.dom,B=D.style;var A=D.offsetHeight;this.panel.setPosition(C.x,C.y);
B.left=(C.x)+"px";B.top=(C.y+C.height-A)+"px";B.width=Math.max(0,C.width)+"px";this.panel.setSize(C.width,C.height-A);
},south:function(C){if(this.isCollapsed){return this.applyLayoutCollapsed(C);}var D=this.splitEl.dom,B=D.style;
var A=D.offsetHeight;this.panel.setPosition(C.x,C.y+A);B.left=(C.x)+"px";B.top=(C.y)+"px";
B.width=Math.max(0,C.width)+"px";this.panel.setSize(C.width,C.height-A);}},render:function(A,C){Ext.layout.BorderLayout.SplitRegion.superclass.render.call(this,A,C);
var D=this.position;this.splitEl=A.createChild({cls:"x-layout-split x-layout-split-"+D,html:"&#160;",id:this.panel.id+"-xsplit"});
if(this.collapseMode=="mini"){this.miniSplitEl=this.splitEl.createChild({cls:"x-layout-mini x-layout-mini-"+D,html:"&#160;"});
this.miniSplitEl.addClassOnOver("x-layout-mini-over");this.miniSplitEl.on("click",this.onCollapseClick,this,{stopEvent:true});
}var B=this.splitSettings[D];this.split=new Ext.SplitBar(this.splitEl.dom,C.el,B.orientation);
this.split.tickSize=this.tickSize;this.split.placement=B.placement;this.split.getMaximumSize=this[B.maxFn].createDelegate(this);
this.split.minSize=this.minSize||this[B.minProp];this.split.on("beforeapply",this.onSplitMove,this);
this.split.useShim=this.useShim===true;this.maxSize=this.maxSize||this[B.maxProp];
if(C.hidden){this.splitEl.hide();}if(this.useSplitTips){this.splitEl.dom.title=this.collapsible?this.collapsibleSplitTip:this.splitTip;
}if(this.collapsible){this.splitEl.on("dblclick",this.onCollapseClick,this);}},getSize:function(){if(this.isCollapsed){return this.collapsedEl.getSize();
}var A=this.panel.getSize();if(this.position=="north"||this.position=="south"){A.height+=this.splitEl.dom.offsetHeight;
}else{A.width+=this.splitEl.dom.offsetWidth;}return A;},getHMaxSize:function(){var B=this.maxSize||10000;
var A=this.layout.center;return Math.min(B,(this.el.getWidth()+A.el.getWidth())-A.getMinWidth());
},getVMaxSize:function(){var B=this.maxSize||10000;var A=this.layout.center;return Math.min(B,(this.el.getHeight()+A.el.getHeight())-A.getMinHeight());
},onSplitMove:function(B,A){var C=this.panel.getSize();this.lastSplitSize=A;if(this.position=="north"||this.position=="south"){this.panel.setSize(C.width,A);
this.state.height=A;}else{this.panel.setSize(A,C.height);this.state.width=A;}this.layout.layout();
this.panel.saveState();return false;},getSplitBar:function(){return this.split;},destroy:function(){Ext.destroy(this.miniSplitEl,this.split,this.splitEl);
}});Ext.Container.LAYOUTS.border=Ext.layout.BorderLayout;Ext.layout.FormLayout=Ext.extend(Ext.layout.AnchorLayout,{labelSeparator:":",setContainer:function(A){Ext.layout.FormLayout.superclass.setContainer.call(this,A);
if(A.labelAlign){A.addClass("x-form-label-"+A.labelAlign);}if(A.hideLabels){this.labelStyle="display:none";
this.elementStyle="padding-left:0;";this.labelAdjust=0;}else{this.labelSeparator=A.labelSeparator||this.labelSeparator;
A.labelWidth=A.labelWidth||100;if(typeof A.labelWidth=="number"){var B=(typeof A.labelPad=="number"?A.labelPad:5);
this.labelAdjust=A.labelWidth+B;this.labelStyle="width:"+A.labelWidth+"px;";this.elementStyle="padding-left:"+(A.labelWidth+B)+"px";
}if(A.labelAlign=="top"){this.labelStyle="width:auto;";this.labelAdjust=0;this.elementStyle="padding-left:0;";
}}},getLabelStyle:function(E){var B="",C=[this.labelStyle,E];for(var D=0,A=C.length;
D<A;++D){if(C[D]){B+=C[D];if(B.substr(-1,1)!=";"){B+=";";}}}return B;},renderItem:function(D,A,C){if(D&&!D.rendered&&(D.isFormField||D.fieldLabel)&&D.inputType!="hidden"){var B=this.getTemplateArgs(D);
if(typeof A=="number"){A=C.dom.childNodes[A]||null;}if(A){this.fieldTpl.insertBefore(A,B);
}else{this.fieldTpl.append(C,B);}D.render("x-form-el-"+D.id);}else{Ext.layout.FormLayout.superclass.renderItem.apply(this,arguments);
}},getTemplateArgs:function(B){var A=!B.fieldLabel||B.hideLabel;return{id:B.id,label:B.fieldLabel,labelStyle:B.labelStyle||this.labelStyle||"",elementStyle:this.elementStyle||"",labelSeparator:A?"":(typeof B.labelSeparator=="undefined"?this.labelSeparator:B.labelSeparator),itemCls:(B.itemCls||this.container.itemCls||"")+(B.hideLabel?" x-hide-label":""),clearCls:B.clearCls||"x-form-clear-left"};
},adjustWidthAnchor:function(B,A){return B-(A.isFormField||A.fieldLabel?(A.hideLabel?0:this.labelAdjust):0);
},isValidParent:function(B,A){return true;}});Ext.Container.LAYOUTS.form=Ext.layout.FormLayout;
Ext.layout.AccordionLayout=Ext.extend(Ext.layout.FitLayout,{fill:true,autoWidth:true,titleCollapse:true,hideCollapseTool:false,collapseFirst:false,animate:false,sequence:false,activeOnTop:false,renderItem:function(A){if(this.animate===false){A.animCollapse=false;
}A.collapsible=true;if(this.autoWidth){A.autoWidth=true;}if(this.titleCollapse){A.titleCollapse=true;
}if(this.hideCollapseTool){A.hideCollapseTool=true;}if(this.collapseFirst!==undefined){A.collapseFirst=this.collapseFirst;
}if(!this.activeItem&&!A.collapsed){this.activeItem=A;}else{if(this.activeItem&&this.activeItem!=A){A.collapsed=true;
}}Ext.layout.AccordionLayout.superclass.renderItem.apply(this,arguments);A.header.addClass("x-accordion-hd");
A.on("beforeexpand",this.beforeExpand,this);},beforeExpand:function(C,B){var A=this.activeItem;
if(A){if(this.sequence){delete this.activeItem;if(!A.collapsed){A.collapse({callback:function(){C.expand(B||true);
},scope:this});return false;}}else{A.collapse(this.animate);}}this.activeItem=C;if(this.activeOnTop){C.el.dom.parentNode.insertBefore(C.el.dom,C.el.dom.parentNode.firstChild);
}this.layout();},setItemSize:function(C,B){if(this.fill&&C){var A=0;this.container.items.each(function(D){if(D!=C){A+=D.header.getHeight();
}});B.height-=A;C.setSize(B);}},setActiveItem:function(A){A=this.container.getComponent(A);
if(this.activeItem!=A){if(A.rendered&&A.collapsed){A.expand();}else{this.activeItem=A;
}}}});Ext.Container.LAYOUTS.accordion=Ext.layout.AccordionLayout;Ext.layout.Accordion=Ext.layout.AccordionLayout;
Ext.layout.TableLayout=Ext.extend(Ext.layout.ContainerLayout,{monitorResize:false,tableAttrs:null,setContainer:function(A){Ext.layout.TableLayout.superclass.setContainer.call(this,A);
this.currentRow=0;this.currentColumn=0;this.cells=[];},onLayout:function(D,F){var E=D.items.items,B=E.length,A,C;
if(!this.table){F.addClass("x-table-layout-ct");this.table=F.createChild(Ext.apply({tag:"table",cls:"x-table-layout",cellspacing:0,cn:{tag:"tbody"}},this.tableAttrs),null,true);
}this.renderAll(D,F);},getRow:function(A){var B=this.table.tBodies[0].childNodes[A];
if(!B){B=document.createElement("tr");this.table.tBodies[0].appendChild(B);}return B;
},getNextCell:function(C){var D=this.getNextNonSpan(this.currentColumn,this.currentRow);
var H=this.currentColumn=D[0],G=this.currentRow=D[1];for(var B=G;B<G+(C.rowspan||1);
B++){if(!this.cells[B]){this.cells[B]=[];}for(var F=H;F<H+(C.colspan||1);F++){this.cells[B][F]=true;
}}var A=document.createElement("td");if(C.cellId){A.id=C.cellId;}var E="x-table-layout-cell";
if(C.cellCls){E+=" "+C.cellCls;}A.className=E;if(C.colspan){A.colSpan=C.colspan;}if(C.rowspan){A.rowSpan=C.rowspan;
}this.getRow(G).appendChild(A);return A;},getNextNonSpan:function(A,C){var B=this.columns;
while((B&&A>=B)||(this.cells[C]&&this.cells[C][A])){if(B&&A>=B){C++;A=0;}else{A++;
}}return[A,C];},renderItem:function(D,A,C){if(D&&!D.rendered){D.render(this.getNextCell(D));
if(this.extraCls){var B=D.getPositionEl?D.getPositionEl():D;B.addClass(this.extraCls);
}}},isValidParent:function(B,A){return true;}});Ext.Container.LAYOUTS.table=Ext.layout.TableLayout;
Ext.layout.AbsoluteLayout=Ext.extend(Ext.layout.AnchorLayout,{extraCls:"x-abs-layout-item",onLayout:function(A,B){B.position();
this.paddingLeft=B.getPadding("l");this.paddingTop=B.getPadding("t");Ext.layout.AbsoluteLayout.superclass.onLayout.call(this,A,B);
},adjustWidthAnchor:function(B,A){return B?B-A.getPosition(true)[0]+this.paddingLeft:B;
},adjustHeightAnchor:function(B,A){return B?B-A.getPosition(true)[1]+this.paddingTop:B;
}});Ext.Container.LAYOUTS.absolute=Ext.layout.AbsoluteLayout;Ext.layout.BoxLayout=Ext.extend(Ext.layout.ContainerLayout,{defaultMargins:{left:0,top:0,right:0,bottom:0},padding:"0",pack:"start",monitorResize:true,scrollOffset:0,extraCls:"x-box-item",ctCls:"x-box-layout-ct",innerCls:"x-box-inner",isValidParent:function(B,A){return B.getEl().dom.parentNode==this.innerCt.dom;
},onLayout:function(G,B){var H=G.items.items,E=H.length,C,F,A=E-1,D;if(!this.innerCt){B.addClass(this.ctCls);
this.innerCt=B.createChild({cls:this.innerCls});this.padding=this.parseMargins(this.padding);
}this.renderAll(G,this.innerCt);},renderItem:function(A){if(typeof A.margins=="string"){A.margins=this.parseMargins(A.margins);
}else{if(!A.margins){A.margins=this.defaultMargins;}}Ext.layout.BoxLayout.superclass.renderItem.apply(this,arguments);
},getTargetSize:function(A){return(Ext.isIE6&&Ext.isStrict&&A.dom==document.body)?A.getStyleSize():A.getViewSize();
},getItems:function(B){var A=[];B.items.each(function(C){if(C.isVisible()){A.push(C);
}});return A;}});Ext.layout.VBoxLayout=Ext.extend(Ext.layout.BoxLayout,{align:"left",onLayout:function(Z,Aa){Ext.layout.VBoxLayout.superclass.onLayout.call(this,Z,Aa);
var l=this.getItems(Z),Q,S,J,K=this.getTargetSize(Aa),R=K.width-Aa.getPadding("lr")-this.scrollOffset,G=K.height-Aa.getPadding("tb"),L=this.padding.left,T=this.padding.top,P=this.pack=="start",N=["stretch","stretchmax"].indexOf(this.align)==-1,U=R-(this.padding.left+this.padding.right),O=0,h=0,M=0,t=0,Y=0;
Ext.each(l,function(A){Q=A.margins;M+=A.flex||0;S=A.getHeight();J=Q.top+Q.bottom;
O+=S+J;t+=J+(A.flex?0:S);h=Math.max(h,A.getWidth()+Q.left+Q.right);});O=G-O-this.padding.top-this.padding.bottom;
var V=h+this.padding.left+this.padding.right;switch(this.align){case"stretch":this.innerCt.setSize(R,G);
break;case"stretchmax":case"left":this.innerCt.setSize(V,G);break;case"center":this.innerCt.setSize(R=Math.max(R,V),G);
break;}var X=Math.max(0,G-this.padding.top-this.padding.bottom-t),w=X,H=[],F=[],I=0,W=Math.max(0,R-this.padding.left-this.padding.right);
Ext.each(l,function(A){if(P&&A.flex){S=Math.floor(X*(A.flex/M));w-=S;H.push(S);}});
if(this.pack=="center"){T+=O?O/2:0;}else{if(this.pack=="end"){T+=O;}}Ext.each(l,function(A){Q=A.margins;
T+=Q.top;A.setPosition(L+Q.left,T);if(P&&A.flex){S=Math.max(0,H[I++]+(w-->0?1:0));
if(N){F.push(A.getWidth());}A.setSize(W,S);}else{S=A.getHeight();}T+=S+Q.bottom;});
I=0;Ext.each(l,function(B){Q=B.margins;if(this.align=="stretch"){B.setWidth((U-(Q.left+Q.right)).constrain(B.minWidth||0,B.maxWidth||1000000));
}else{if(this.align=="stretchmax"){B.setWidth((h-(Q.left+Q.right)).constrain(B.minWidth||0,B.maxWidth||1000000));
}else{if(this.align=="center"){var A=W-(B.getWidth()+Q.left+Q.right);if(A>0){B.setPosition(L+Q.left+(A/2),B.y);
}}if(P&&B.flex){B.setWidth(F[I++]);}}}},this);}});Ext.Container.LAYOUTS.vbox=Ext.layout.VBoxLayout;
Ext.layout.HBoxLayout=Ext.extend(Ext.layout.BoxLayout,{align:"top",onLayout:function(Y,Aa){Ext.layout.HBoxLayout.superclass.onLayout.call(this,Y,Aa);
var Z=this.getItems(Y),P,X,J,K=this.getTargetSize(Aa),R=K.width-Aa.getPadding("lr")-this.scrollOffset,l=K.height-Aa.getPadding("tb"),M=this.padding.left,T=this.padding.top,O=this.pack=="start",H=["stretch","stretchmax"].indexOf(this.align)==-1,S=l-(this.padding.top+this.padding.bottom),t=0,L=0,N=0,W=0,U=0;
Ext.each(Z,function(A){P=A.margins;N+=A.flex||0;X=A.getWidth();J=P.left+P.right;t+=X+J;
W+=J+(A.flex?0:X);L=Math.max(L,A.getHeight()+P.top+P.bottom);});t=R-t-this.padding.left-this.padding.right;
var G=L+this.padding.top+this.padding.bottom;switch(this.align){case"stretch":this.innerCt.setSize(R,l);
break;case"stretchmax":case"top":this.innerCt.setSize(R,G);break;case"middle":this.innerCt.setSize(R,l=Math.max(l,G));
break;}var F=Math.max(0,R-this.padding.left-this.padding.right-W),w=F,Q=[],h=[],I=0,V=Math.max(0,l-this.padding.top-this.padding.bottom);
Ext.each(Z,function(A){if(O&&A.flex){X=Math.floor(F*(A.flex/N));w-=X;Q.push(X);}});
if(this.pack=="center"){M+=t?t/2:0;}else{if(this.pack=="end"){M+=t;}}Ext.each(Z,function(A){P=A.margins;
M+=P.left;A.setPosition(M,T+P.top);if(O&&A.flex){X=Math.max(0,Q[I++]+(w-->0?1:0));
if(H){h.push(A.getHeight());}A.setSize(X,V);}else{X=A.getWidth();}M+=X+P.right;});
I=0;Ext.each(Z,function(B){var A=B.margins;if(this.align=="stretch"){B.setHeight((S-(A.top+A.bottom)).constrain(B.minHeight||0,B.maxHeight||1000000));
}else{if(this.align=="stretchmax"){B.setHeight((L-(A.top+A.bottom)).constrain(B.minHeight||0,B.maxHeight||1000000));
}else{if(this.align=="middle"){var C=V-(B.getHeight()+A.top+A.bottom);if(C>0){B.setPosition(B.x,T+A.top+(C/2));
}}if(O&&B.flex){B.setHeight(h[I++]);}}}},this);}});Ext.Container.LAYOUTS.hbox=Ext.layout.HBoxLayout;
Ext.Viewport=Ext.extend(Ext.Container,{initComponent:function(){Ext.Viewport.superclass.initComponent.call(this);
document.getElementsByTagName("html")[0].className+=" x-viewport";this.el=Ext.getBody();
this.el.setHeight=Ext.emptyFn;this.el.setWidth=Ext.emptyFn;this.el.setSize=Ext.emptyFn;
this.el.dom.scroll="no";this.allowDomMove=false;this.autoWidth=true;this.autoHeight=true;
Ext.EventManager.onWindowResize(this.fireResize,this);this.renderTo=this.el;},fireResize:function(A,B){this.fireEvent("resize",this,A,B,A,B);
}});Ext.reg("viewport",Ext.Viewport);Ext.Panel=Ext.extend(Ext.Container,{baseCls:"x-panel",collapsedCls:"x-panel-collapsed",maskDisabled:true,animCollapse:Ext.enableFx,headerAsText:true,buttonAlign:"right",collapsed:false,collapseFirst:true,minButtonWidth:75,elements:"body",preventBodyReset:false,toolTarget:"header",collapseEl:"bwrap",slideAnchor:"t",disabledClass:"",deferHeight:true,expandDefaults:{duration:0.25},collapseDefaults:{duration:0.25},initComponent:function(){Ext.Panel.superclass.initComponent.call(this);
this.addEvents("bodyresize","titlechange","iconchange","collapse","expand","beforecollapse","beforeexpand","beforeclose","close","activate","deactivate");
if(this.unstyled){this.baseCls="x-plain";}if(this.tbar){this.elements+=",tbar";if(Ext.isObject(this.tbar)){this.topToolbar=this.tbar;
}delete this.tbar;}if(this.bbar){this.elements+=",bbar";if(Ext.isObject(this.bbar)){this.bottomToolbar=this.bbar;
}delete this.bbar;}if(this.header===true){this.elements+=",header";delete this.header;
}else{if(this.headerCfg||(this.title&&this.header!==false)){this.elements+=",header";
}}if(this.footerCfg||this.footer===true){this.elements+=",footer";delete this.footer;
}if(this.buttons){this.elements+=",footer";var C=this.buttons;this.buttons=[];for(var B=0,A=C.length;
B<A;B++){if(C[B].render){this.buttons.push(C[B]);}else{if(C[B].xtype){this.buttons.push(Ext.create(C[B],"button"));
}else{this.addButton(C[B]);}}}}if(this.fbar){this.elements+=",footer";}if(this.autoLoad){this.on("render",this.doAutoLoad,this,{delay:10});
}},createElement:function(A,C){if(this[A]){C.appendChild(this[A].dom);return;}if(A==="bwrap"||this.elements.indexOf(A)!=-1){if(this[A+"Cfg"]){this[A]=Ext.fly(C).createChild(this[A+"Cfg"]);
}else{var B=document.createElement("div");B.className=this[A+"Cls"];this[A]=Ext.get(C.appendChild(B));
}if(this[A+"CssClass"]){this[A].addClass(this[A+"CssClass"]);}if(this[A+"Style"]){this[A].applyStyles(this[A+"Style"]);
}}},onRender:function(K,J){Ext.Panel.superclass.onRender.call(this,K,J);this.createClasses();
var G=this.el,B=G.dom,D;G.addClass(this.baseCls);if(B.firstChild){this.header=G.down("."+this.headerCls);
this.bwrap=G.down("."+this.bwrapCls);var C=this.bwrap?this.bwrap:G;this.tbar=C.down("."+this.tbarCls);
this.body=C.down("."+this.bodyCls);this.bbar=C.down("."+this.bbarCls);this.footer=C.down("."+this.footerCls);
this.fromMarkup=true;}if(this.preventBodyReset===true){G.addClass("x-panel-reset");
}if(this.cls){G.addClass(this.cls);}if(this.buttons){this.elements+=",footer";}if(this.frame){G.insertHtml("afterBegin",String.format(Ext.Element.boxMarkup,this.baseCls));
this.createElement("header",B.firstChild.firstChild.firstChild);this.createElement("bwrap",B);
D=this.bwrap.dom;var I=B.childNodes[1],H=B.childNodes[2];D.appendChild(I);D.appendChild(H);
var E=D.firstChild.firstChild.firstChild;this.createElement("tbar",E);this.createElement("body",E);
this.createElement("bbar",E);this.createElement("footer",D.lastChild.firstChild.firstChild);
if(!this.footer){this.bwrap.dom.lastChild.className+=" x-panel-nofooter";}}else{this.createElement("header",B);
this.createElement("bwrap",B);D=this.bwrap.dom;this.createElement("tbar",D);this.createElement("body",D);
this.createElement("bbar",D);this.createElement("footer",D);if(!this.header){this.body.addClass(this.bodyCls+"-noheader");
if(this.tbar){this.tbar.addClass(this.tbarCls+"-noheader");}}}if(this.padding!==undefined){this.body.setStyle("padding",this.body.addUnits(this.padding));
}if(this.border===false){this.el.addClass(this.baseCls+"-noborder");this.body.addClass(this.bodyCls+"-noborder");
if(this.header){this.header.addClass(this.headerCls+"-noborder");}if(this.footer){this.footer.addClass(this.footerCls+"-noborder");
}if(this.tbar){this.tbar.addClass(this.tbarCls+"-noborder");}if(this.bbar){this.bbar.addClass(this.bbarCls+"-noborder");
}}if(this.bodyBorder===false){this.body.addClass(this.bodyCls+"-noborder");}this.bwrap.enableDisplayMode("block");
if(this.header){this.header.unselectable();if(this.headerAsText){this.header.dom.innerHTML='<span class="'+this.headerTextCls+'">'+this.header.dom.innerHTML+"</span>";
if(this.iconCls){this.setIconClass(this.iconCls);}}}if(this.floating){this.makeFloating(this.floating);
}if(this.collapsible){this.tools=this.tools?this.tools.slice(0):[];if(!this.hideCollapseTool){this.tools[this.collapseFirst?"unshift":"push"]({id:"toggle",handler:this.toggleCollapse,scope:this});
}if(this.titleCollapse&&this.header){this.mon(this.header,"click",this.toggleCollapse,this);
this.header.setStyle("cursor","pointer");}}if(this.tools){var A=this.tools;this.tools={};
this.addTool.apply(this,A);}else{this.tools={};}if(this.buttons&&this.buttons.length>0){this.fbar=new Ext.Toolbar({items:this.buttons,toolbarCls:"x-panel-fbar"});
}this.toolbars=[];if(this.fbar){this.fbar=Ext.create(this.fbar,"toolbar");this.fbar.enableOverflow=false;
if(this.fbar.items){this.fbar.items.each(function(L){L.minWidth=L.minWidth||this.minButtonWidth;
},this);}this.fbar.toolbarCls="x-panel-fbar";var F=this.footer.createChild({cls:"x-panel-btns x-panel-btns-"+this.buttonAlign});
this.fbar.ownerCt=this;this.fbar.render(F);F.createChild({cls:"x-clear"});this.toolbars.push(this.fbar);
}if(this.tbar&&this.topToolbar){if(Ext.isArray(this.topToolbar)){this.topToolbar=new Ext.Toolbar(this.topToolbar);
}else{if(!this.topToolbar.events){this.topToolbar=Ext.create(this.topToolbar,"toolbar");
}}this.topToolbar.ownerCt=this;this.topToolbar.render(this.tbar);this.toolbars.push(this.topToolbar);
}if(this.bbar&&this.bottomToolbar){if(Ext.isArray(this.bottomToolbar)){this.bottomToolbar=new Ext.Toolbar(this.bottomToolbar);
}else{if(!this.bottomToolbar.events){this.bottomToolbar=Ext.create(this.bottomToolbar,"toolbar");
}}this.bottomToolbar.ownerCt=this;this.bottomToolbar.render(this.bbar);this.toolbars.push(this.bottomToolbar);
}Ext.each(this.toolbars,function(L){L.on({scope:this,afterlayout:this.syncHeight,remove:this.syncHeight});
},this);},setIconClass:function(B){var A=this.iconCls;this.iconCls=B;if(this.rendered&&this.header){if(this.frame){this.header.addClass("x-panel-icon");
this.header.replaceClass(A,this.iconCls);}else{var D=this.header.dom;var C=D.firstChild&&String(D.firstChild.tagName).toLowerCase()=="img"?D.firstChild:null;
if(C){Ext.fly(C).replaceClass(A,this.iconCls);}else{Ext.DomHelper.insertBefore(D.firstChild,{tag:"img",src:Ext.BLANK_IMAGE_URL,cls:"x-panel-inline-icon "+this.iconCls});
}}}this.fireEvent("iconchange",this,B,A);},makeFloating:function(A){this.floating=true;
this.el=new Ext.Layer(Ext.isObject(A)?A:{shadow:this.shadow!==undefined?this.shadow:"sides",shadowOffset:this.shadowOffset,constrain:false,shim:this.shim===false?false:undefined},this.el);
},getTopToolbar:function(){return this.topToolbar;},getBottomToolbar:function(){return this.bottomToolbar;
},addButton:function(A,D,C){var E={handler:D,scope:C,minWidth:this.minButtonWidth,hideParent:true};
if(typeof A=="string"){E.text=A;}else{Ext.apply(E,A);}var B=new Ext.Button(E);if(!this.buttons){this.buttons=[];
}this.buttons.push(B);return B;},addTool:function(){if(!this[this.toolTarget]){return;
}if(!this.toolTemplate){var A=new Ext.Template('<div class="x-tool x-tool-{id}">&#160;</div>');
A.disableFormats=true;A.compile();Ext.Panel.prototype.toolTemplate=A;}for(var G=0,E=arguments,D=E.length;
G<D;G++){var C=E[G];if(!this.tools[C.id]){var B="x-tool-"+C.id+"-over";var F=this.toolTemplate.insertFirst((C.align!=="left")?this[this.toolTarget]:this[this.toolTarget].child("span"),C,true);
this.tools[C.id]=F;F.enableDisplayMode("block");this.mon(F,"click",this.createToolHandler(F,C,B,this));
if(C.on){this.mon(F,C.on);}if(C.hidden){F.hide();}if(C.qtip){if(Ext.isObject(C.qtip)){Ext.QuickTips.register(Ext.apply({target:F.id},C.qtip));
}else{F.dom.qtip=C.qtip;}}F.addClassOnOver(B);}}},onLayout:function(){if(this.toolbars.length>0){this.duringLayout=true;
Ext.each(this.toolbars,function(A){A.doLayout();});delete this.duringLayout;this.syncHeight();
}},syncHeight:function(){if(!(this.autoHeight||this.duringLayout)){var D=this.lastSize;
if(D&&!Ext.isEmpty(D.height)){var B=D.height,C=this.el.getHeight();if(B!="auto"&&B!=C){var E=this.body,A=E.getHeight();
C=Math.max(A+B-C,0);if(A>0&&A!=C){E.setHeight(C);if(Ext.isIE&&C<=0){return;}var F=E.getSize();
this.fireEvent("bodyresize",F.width,F.height);}}}}},onShow:function(){if(this.floating){return this.el.show();
}Ext.Panel.superclass.onShow.call(this);},onHide:function(){if(this.floating){return this.el.hide();
}Ext.Panel.superclass.onHide.call(this);},createToolHandler:function(C,A,D,B){return function(E){C.removeClass(D);
if(A.stopEvent!==false){E.stopEvent();}if(A.handler){A.handler.call(A.scope||C,E,C,B,A);
}};},afterRender:function(){if(this.floating&&!this.hidden){this.el.show();}if(this.title){this.setTitle(this.title);
}this.setAutoScroll();if(this.html){this.body.update(Ext.isObject(this.html)?Ext.DomHelper.markup(this.html):this.html);
delete this.html;}if(this.contentEl){var A=Ext.getDom(this.contentEl);Ext.fly(A).removeClass(["x-hidden","x-hide-display"]);
this.body.dom.appendChild(A);}if(this.collapsed){this.collapsed=false;this.collapse(false);
}Ext.Panel.superclass.afterRender.call(this);this.initEvents();},setAutoScroll:function(){if(this.rendered&&this.autoScroll){var A=this.body||this.el;
if(A){A.setOverflow("auto");}}},getKeyMap:function(){if(!this.keyMap){this.keyMap=new Ext.KeyMap(this.el,this.keys);
}return this.keyMap;},initEvents:function(){if(this.keys){this.getKeyMap();}if(this.draggable){this.initDraggable();
}},initDraggable:function(){this.dd=new Ext.Panel.DD(this,typeof this.draggable=="boolean"?null:this.draggable);
},beforeEffect:function(){if(this.floating){this.el.beforeAction();}this.el.addClass("x-panel-animated");
},afterEffect:function(){this.syncShadow();this.el.removeClass("x-panel-animated");
},createEffect:function(B,A,C){var D={scope:C,block:true};if(B===true){D.callback=A;
return D;}else{if(!B.callback){D.callback=A;}else{D.callback=function(){A.call(C);
Ext.callback(B.callback,B.scope);};}}return Ext.applyIf(D,B);},collapse:function(B){if(this.collapsed||this.el.hasFxBlock()||this.fireEvent("beforecollapse",this,B)===false){return;
}var A=B===true||(B!==false&&this.animCollapse);this.beforeEffect();this.onCollapse(A,B);
return this;},onCollapse:function(A,B){if(A){this[this.collapseEl].slideOut(this.slideAnchor,Ext.apply(this.createEffect(B||true,this.afterCollapse,this),this.collapseDefaults));
}else{this[this.collapseEl].hide();this.afterCollapse();}},afterCollapse:function(){this.collapsed=true;
this.el.addClass(this.collapsedCls);this.afterEffect();this.fireEvent("collapse",this);
},expand:function(B){if(!this.collapsed||this.el.hasFxBlock()||this.fireEvent("beforeexpand",this,B)===false){return;
}var A=B===true||(B!==false&&this.animCollapse);this.el.removeClass(this.collapsedCls);
this.beforeEffect();this.onExpand(A,B);return this;},onExpand:function(A,B){if(A){this[this.collapseEl].slideIn(this.slideAnchor,Ext.apply(this.createEffect(B||true,this.afterExpand,this),this.expandDefaults));
}else{this[this.collapseEl].show();this.afterExpand();}},afterExpand:function(){this.collapsed=false;
this.afterEffect();if(this.deferLayout!==undefined){this.doLayout(true);}this.fireEvent("expand",this);
},toggleCollapse:function(A){this[this.collapsed?"expand":"collapse"](A);return this;
},onDisable:function(){if(this.rendered&&this.maskDisabled){this.el.mask();}Ext.Panel.superclass.onDisable.call(this);
},onEnable:function(){if(this.rendered&&this.maskDisabled){this.el.unmask();}Ext.Panel.superclass.onEnable.call(this);
},onResize:function(B,C){if(B!==undefined||C!==undefined){if(!this.collapsed){if(typeof B=="number"){B=this.adjustBodyWidth(B-this.getFrameWidth());
if(this.tbar){this.tbar.setWidth(B);if(this.topToolbar){this.topToolbar.setSize(B);
}}if(this.bbar){this.bbar.setWidth(B);if(this.bottomToolbar){this.bottomToolbar.setSize(B);
}}if(this.fbar){var D=this.fbar,E=1,A=Ext.isStrict;if(this.buttonAlign=="left"){E=B-D.container.getFrameWidth("lr");
}else{if(Ext.isIE||Ext.isWebKit){if(!(this.buttonAlign=="center"&&Ext.isWebKit)&&(!A||(!Ext.isIE8&&A))){(function(){D.setWidth(D.getEl().child(".x-toolbar-ct").getWidth());
}).defer(1);}else{E="auto";}}else{E="auto";}}D.setWidth(E);}this.body.setWidth(B);
}else{if(B=="auto"){this.body.setWidth(B);}}if(typeof C=="number"){C=Math.max(0,this.adjustBodyHeight(C-this.getFrameHeight()));
this.body.setHeight(C);}else{if(C=="auto"){this.body.setHeight(C);}}if(this.disabled&&this.el._mask){this.el._mask.setSize(this.el.dom.clientWidth,this.el.getHeight());
}}else{this.queuedBodySize={width:B,height:C};if(!this.queuedExpand&&this.allowQueuedExpand!==false){this.queuedExpand=true;
this.on("expand",function(){delete this.queuedExpand;this.onResize(this.queuedBodySize.width,this.queuedBodySize.height);
this.doLayout();},this,{single:true});}}this.fireEvent("bodyresize",this,B,C);}this.syncShadow();
},adjustBodyHeight:function(A){return A;},adjustBodyWidth:function(A){return A;},onPosition:function(){this.syncShadow();
},getFrameWidth:function(){var B=this.el.getFrameWidth("lr")+this.bwrap.getFrameWidth("lr");
if(this.frame){var A=this.bwrap.dom.firstChild;B+=(Ext.fly(A).getFrameWidth("l")+Ext.fly(A.firstChild).getFrameWidth("r"));
var C=this.bwrap.dom.firstChild.firstChild.firstChild;B+=Ext.fly(C).getFrameWidth("lr");
}return B;},getFrameHeight:function(){var A=this.el.getFrameWidth("tb")+this.bwrap.getFrameWidth("tb");
A+=(this.tbar?this.tbar.getHeight():0)+(this.bbar?this.bbar.getHeight():0);if(this.frame){var C=this.el.dom.firstChild;
var D=this.bwrap.dom.lastChild;A+=(C.offsetHeight+D.offsetHeight);var B=this.bwrap.dom.firstChild.firstChild.firstChild;
A+=Ext.fly(B).getFrameWidth("tb");}else{A+=(this.header?this.header.getHeight():0)+(this.footer?this.footer.getHeight():0);
}return A;},getInnerWidth:function(){return this.getSize().width-this.getFrameWidth();
},getInnerHeight:function(){return this.getSize().height-this.getFrameHeight();},syncShadow:function(){if(this.floating){this.el.sync(true);
}},getLayoutTarget:function(){return this.body;},setTitle:function(B,A){this.title=B;
if(this.header&&this.headerAsText){this.header.child("span").update(B);}if(A){this.setIconClass(A);
}this.fireEvent("titlechange",this,B);return this;},getUpdater:function(){return this.body.getUpdater();
},load:function(){var A=this.body.getUpdater();A.update.apply(A,arguments);return this;
},beforeDestroy:function(){if(this.header){this.header.removeAllListeners();if(this.headerAsText){Ext.Element.uncache(this.header.child("span"));
}}Ext.Element.uncache(this.header,this.tbar,this.bbar,this.footer,this.body,this.bwrap);
if(this.tools){for(var B in this.tools){Ext.destroy(this.tools[B]);}}if(this.buttons){for(var A in this.buttons){Ext.destroy(this.buttons[A]);
}}Ext.destroy(this.toolbars);Ext.Panel.superclass.beforeDestroy.call(this);},createClasses:function(){this.headerCls=this.baseCls+"-header";
this.headerTextCls=this.baseCls+"-header-text";this.bwrapCls=this.baseCls+"-bwrap";
this.tbarCls=this.baseCls+"-tbar";this.bodyCls=this.baseCls+"-body";this.bbarCls=this.baseCls+"-bbar";
this.footerCls=this.baseCls+"-footer";},createGhost:function(A,E,B){var D=document.createElement("div");
D.className="x-panel-ghost "+(A?A:"");if(this.header){D.appendChild(this.el.dom.firstChild.cloneNode(true));
}Ext.fly(D.appendChild(document.createElement("ul"))).setHeight(this.bwrap.getHeight());
D.style.width=this.el.dom.offsetWidth+"px";if(!B){this.container.dom.appendChild(D);
}else{Ext.getDom(B).appendChild(D);}if(E!==false&&this.el.useShim!==false){var C=new Ext.Layer({shadow:false,useDisplay:true,constrain:false},D);
C.show();return C;}else{return new Ext.Element(D);}},doAutoLoad:function(){var A=this.body.getUpdater();
if(this.renderer){A.setRenderer(this.renderer);}A.update(Ext.isObject(this.autoLoad)?this.autoLoad:{url:this.autoLoad});
},getTool:function(A){return this.tools[A];}});Ext.reg("panel",Ext.Panel);Ext.Editor=function(B,A){if(B.field){this.field=Ext.create(B.field,"textfield");
A=Ext.apply({},B);delete A.field;}else{this.field=B;}Ext.Editor.superclass.constructor.call(this,A);
};Ext.extend(Ext.Editor,Ext.Component,{value:"",alignment:"c-c?",shadow:"frame",constrain:false,swallowKeys:true,completeOnEnter:false,cancelOnEsc:false,updateEl:false,initComponent:function(){Ext.Editor.superclass.initComponent.call(this);
this.addEvents("beforestartedit","startedit","beforecomplete","complete","canceledit","specialkey");
},onRender:function(B,A){this.el=new Ext.Layer({shadow:this.shadow,cls:"x-editor",parentEl:B,shim:this.shim,shadowOffset:this.shadowOffset||4,id:this.id,constrain:this.constrain});
if(this.zIndex){this.el.setZIndex(this.zIndex);}this.el.setStyle("overflow",Ext.isGecko?"auto":"hidden");
if(this.field.msgTarget!="title"){this.field.msgTarget="qtip";}this.field.inEditor=true;
this.field.render(this.el);if(Ext.isGecko){this.field.el.dom.setAttribute("autocomplete","off");
}this.mon(this.field,"specialkey",this.onSpecialKey,this);if(this.swallowKeys){this.field.el.swallowEvent(["keydown","keypress"]);
}this.field.show();this.mon(this.field,"blur",this.onBlur,this);if(this.field.grow){this.mon(this.field,"autosize",this.el.sync,this.el,{delay:1});
}},onSpecialKey:function(C,B){var A=B.getKey();if(this.completeOnEnter&&A==B.ENTER){B.stopEvent();
this.completeEdit();}else{if(this.cancelOnEsc&&A==B.ESC){this.cancelEdit();}else{this.fireEvent("specialkey",C,B);
}}if(this.field.triggerBlur&&(A==B.ENTER||A==B.ESC||A==B.TAB)){this.field.triggerBlur();
}},startEdit:function(B,C){if(this.editing){this.completeEdit();}this.boundEl=Ext.get(B);
var A=C!==undefined?C: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);this.doAutoSize();this.el.alignTo(this.boundEl,this.alignment);
this.editing=true;this.show();},doAutoSize:function(){if(this.autoSize){var A=this.boundEl.getSize();
switch(this.autoSize){case"width":this.setSize(A.width,"");break;case"height":this.setSize("",A.height);
break;default:this.setSize(A.width,A.height);}}},setSize:function(A,B){delete this.field.lastSize;
this.field.setSize(A,B);if(this.el){if(Ext.isGecko2||Ext.isOpera){this.el.setSize(A,B);
}this.el.sync();}},realign:function(){this.el.alignTo(this.boundEl,this.alignment);
},completeEdit:function(A){if(!this.editing){return;}var B=this.getValue();if(!this.field.isValid()){if(this.revertInvalid!==false){this.cancelEdit(A);
}return;}if(String(B)===String(this.startValue)&&this.ignoreNoChange){this.hideEdit(A);
return;}if(this.fireEvent("beforecomplete",this,B,this.startValue)!==false){B=this.getValue();
if(this.updateEl&&this.boundEl){this.boundEl.update(B);}this.hideEdit(A);this.fireEvent("complete",this,B,this.startValue);
}},onShow:function(){this.el.show();if(this.hideEl!==false){this.boundEl.hide();}this.field.show();
if(Ext.isIE&&!this.fixIEFocus){this.fixIEFocus=true;this.deferredFocus.defer(50,this);
}else{this.field.focus();}this.fireEvent("startedit",this.boundEl,this.startValue);
},deferredFocus:function(){if(this.editing){this.field.focus();}},cancelEdit:function(A){if(this.editing){var B=this.getValue();
this.setValue(this.startValue);this.hideEdit(A);this.fireEvent("canceledit",this,B,this.startValue);
}},hideEdit:function(A){if(A!==true){this.editing=false;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();
}},setValue:function(A){this.field.setValue(A);},getValue:function(){return this.field.getValue();
},beforeDestroy:function(){Ext.destroy(this.field);this.field=null;}});Ext.reg("editor",Ext.Editor);
Ext.ColorPalette=function(A){Ext.ColorPalette.superclass.constructor.call(this,A);
this.addEvents("select");if(this.handler){this.on("select",this.handler,this.scope,true);
}};Ext.extend(Ext.ColorPalette,Ext.Component,{itemCls:"x-color-palette",value:null,clickEvent:"click",ctype:"Ext.ColorPalette",allowReselect:false,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(B,A){var C=this.tpl||new Ext.XTemplate('<tpl for="."><a href="#" class="color-{.}" hidefocus="on"><em><span style="background:#{.}" unselectable="on">&#160;</span></em></a></tpl>');
var D=document.createElement("div");D.id=this.getId();D.className=this.itemCls;C.overwrite(D,this.colors);
B.dom.insertBefore(D,A);this.el=Ext.get(D);this.mon(this.el,this.clickEvent,this.handleClick,this,{delegate:"a"});
if(this.clickEvent!="click"){this.mon(this.el,"click",Ext.emptyFn,this,{delegate:"a",preventDefault:true});
}},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||this.allowReselect){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.reg("colorpalette",Ext.ColorPalette);Ext.DatePicker=Ext.extend(Ext.BoxComponent,{todayText:"Today",okText:"&#160;OK&#160;",cancelText:"Cancel",todayTip:"{0} (Spacebar)",minText:"This date is before the minimum date",maxText:"This date is after the maximum date",format:"m/d/y",disabledDaysText:"Disabled",disabledDatesText:"Disabled",monthNames:Date.monthNames,dayNames:Date.dayNames,nextText:"Next Month (Control+Right)",prevText:"Previous Month (Control+Left)",monthYearText:"Choose a month (Control+Up/Down to move years)",startDay:0,showToday:true,initComponent:function(){Ext.DatePicker.superclass.initComponent.call(this);
this.value=this.value?this.value.clearTime():new Date().clearTime();this.addEvents("select");
if(this.handler){this.on("select",this.handler,this.scope||this);}this.initDisabledDays();
},initDisabledDays:function(){if(!this.disabledDatesRE&&this.disabledDates){var B=this.disabledDates,A=B.length-1,C="(?:";
Ext.each(B,function(D,E){C+=Ext.isDate(D)?"^"+Ext.escapeRe(D.dateFormat(this.format))+"$":B[E];
if(E!=A){C+="|";}},this);this.disabledDatesRE=new RegExp(C+")");}},setDisabledDates:function(A){if(Ext.isArray(A)){this.disabledDates=A;
this.disabledDatesRE=null;}else{this.disabledDatesRE=A;}this.initDisabledDays();this.update(this.value,true);
},setDisabledDays:function(A){this.disabledDays=A;this.update(this.value,true);},setMinDate:function(A){this.minDate=A;
this.update(this.value,true);},setMaxDate:function(A){this.maxDate=A;this.update(this.value,true);
},setValue:function(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);
}},onEnable:function(A){Ext.DatePicker.superclass.onEnable.call(this);this.doDisabled(false);
this.update(A?this.value:this.activeDate);if(Ext.isIE){this.el.repaint();}},onDisable:function(){Ext.DatePicker.superclass.onDisable.call(this);
this.doDisabled(true);if(Ext.isIE&&!Ext.isIE8){Ext.each([].concat(this.textNodes,this.el.query("th span")),function(A){Ext.fly(A).repaint();
});}},doDisabled:function(A){this.keyNav.setDisabled(A);this.prevRepeater.setDisabled(A);
this.nextRepeater.setDisabled(A);if(this.showToday){this.todayKeyListener.setDisabled(A);
this.todayBtn.setDisabled(A);}},onRender:function(G,E){var D=['<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>'],F=this.dayNames,A;
for(A=0;A<7;A++){var C=this.startDay+A;if(C>6){C=C-7;}D.push("<th><span>",F[C].substr(0,1),"</span></th>");
}D[D.length]="</tr></thead><tbody><tr>";for(A=0;A<42;A++){if(A%7===0&&A!==0){D[D.length]="</tr><tr>";
}D[D.length]='<td><a href="#" hidefocus="on" class="x-date-date" tabIndex="1"><em><span></span></em></a></td>';
}D.push("</tr></tbody></table></td></tr>",this.showToday?'<tr><td colspan="3" class="x-date-bottom" align="center"></td></tr>':"",'</table><div class="x-date-mp"></div>');
var B=document.createElement("div");B.className="x-date-picker";B.innerHTML=D.join("");
G.dom.insertBefore(B,E);this.el=Ext.get(B);this.eventEl=Ext.get(B.firstChild);this.prevRepeater=new Ext.util.ClickRepeater(this.el.child("td.x-date-left a"),{handler:this.showPrevMonth,scope:this,preventDefault:true,stopDefault:true});
this.nextRepeater=new Ext.util.ClickRepeater(this.el.child("td.x-date-right a"),{handler:this.showNextMonth,scope:this,preventDefault:true,stopDefault:true});
this.monthPicker=this.el.down("div.x-date-mp");this.monthPicker.enableDisplayMode("block");
this.keyNav=new Ext.KeyNav(this.eventEl,{left:function(I){if(I.ctrlKey){this.showPrevMonth();
}else{this.update(this.activeDate.add("d",-1));}},right:function(I){if(I.ctrlKey){this.showNextMonth();
}else{this.update(this.activeDate.add("d",1));}},up:function(I){if(I.ctrlKey){this.showNextYear();
}else{this.update(this.activeDate.add("d",-7));}},down:function(I){if(I.ctrlKey){this.showPrevYear();
}else{this.update(this.activeDate.add("d",7));}},pageUp:function(I){this.showNextMonth();
},pageDown:function(I){this.showPrevMonth();},enter:function(I){I.stopPropagation();
return true;},scope: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");this.mbtn=new Ext.Button({text:"&#160;",tooltip:this.monthYearText,renderTo:this.el.child("td.x-date-middle",true)});
this.mbtn.el.child("em").addClass("x-btn-arrow");if(this.showToday){this.todayKeyListener=this.eventEl.addKeyListener(Ext.EventObject.SPACE,this.selectToday,this);
var H=(new Date()).dateFormat(this.format);this.todayBtn=new Ext.Button({renderTo:this.el.child("td.x-date-bottom",true),text:String.format(this.todayText,H),tooltip:String.format(this.todayTip,H),handler:this.selectToday,scope:this});
}this.mon(this.eventEl,"mousewheel",this.handleMouseWheel,this);this.mon(this.eventEl,"click",this.handleDateClick,this,{delegate:"a.x-date-date"});
this.mon(this.mbtn,"click",this.showMonthPicker,this);this.onEnable(true);},createMonthPicker:function(){if(!this.monthPicker.dom.firstChild){var A=['<table border="0" cellspacing="0">'];
for(var B=0;B<6;B++){A.push('<tr><td class="x-date-mp-month"><a href="#">',Date.getShortMonthName(B),"</a></td>",'<td class="x-date-mp-month x-date-mp-sep"><a href="#">',Date.getShortMonthName(B+6),"</a></td>",B===0?'<td class="x-date-mp-ybtn" align="center"><a class="x-date-mp-prev"></a></td><td class="x-date-mp-ybtn" align="center"><a class="x-date-mp-next"></a></td></tr>':'<td class="x-date-mp-year"><a href="#"></a></td><td class="x-date-mp-year"><a href="#"></a></td></tr>');
}A.push('<tr class="x-date-mp-btns"><td colspan="4"><button type="button" class="x-date-mp-ok">',this.okText,'</button><button type="button" class="x-date-mp-cancel">',this.cancelText,"</button></td></tr>","</table>");
this.monthPicker.update(A.join(""));this.mon(this.monthPicker,"click",this.onMonthClick,this);
this.mon(this.monthPicker,"dblclick",this.onMonthDblClick,this);this.mpMonths=this.monthPicker.select("td.x-date-mp-month");
this.mpYears=this.monthPicker.select("td.x-date-mp-year");this.mpMonths.each(function(C,D,E){E+=1;
if((E%2)===0){C.dom.xmonth=5+Math.round(E*0.5);}else{C.dom.xmonth=Math.round((E-1)*0.5);
}});}},showMonthPicker:function(){if(!this.disabled){this.createMonthPicker();var A=this.el.getSize();
this.monthPicker.setSize(A);this.monthPicker.child("table").setSize(A);this.mpSelMonth=(this.activeDate||this.value).getMonth();
this.updateMPMonth(this.mpSelMonth);this.mpSelYear=(this.activeDate||this.value).getFullYear();
this.updateMPYear(this.mpSelYear);this.monthPicker.slideIn("t",{duration:0.2});}},updateMPYear:function(E){this.mpyear=E;
var C=this.mpYears.elements;for(var B=1;B<=10;B++){var D=C[B-1],A;if((B%2)===0){A=E+Math.round(B*0.5);
D.firstChild.innerHTML=A;D.xyear=A;}else{A=E-(5-Math.round(B*0.5));D.firstChild.innerHTML=A;
D.xyear=A;}this.mpYears.item(B-1)[A==this.mpSelYear?"addClass":"removeClass"]("x-date-mp-sel");
}},updateMPMonth:function(A){this.mpMonths.each(function(B,C,D){B[B.dom.xmonth==A?"addClass":"removeClass"]("x-date-mp-sel");
});},selectMPMonth:function(A){},onMonthClick:function(B,D){B.stopEvent();var E=new Ext.Element(D),C;
if(E.is("button.x-date-mp-cancel")){this.hideMonthPicker();}else{if(E.is("button.x-date-mp-ok")){var A=new Date(this.mpSelYear,this.mpSelMonth,(this.activeDate||this.value).getDate());
if(A.getMonth()!=this.mpSelMonth){A=new Date(this.mpSelYear,this.mpSelMonth,1).getLastDateOfMonth();
}this.update(A);this.hideMonthPicker();}else{if((C=E.up("td.x-date-mp-month",2))){this.mpMonths.removeClass("x-date-mp-sel");
C.addClass("x-date-mp-sel");this.mpSelMonth=C.dom.xmonth;}else{if((C=E.up("td.x-date-mp-year",2))){this.mpYears.removeClass("x-date-mp-sel");
C.addClass("x-date-mp-sel");this.mpSelYear=C.dom.xyear;}else{if(E.is("a.x-date-mp-prev")){this.updateMPYear(this.mpyear-10);
}else{if(E.is("a.x-date-mp-next")){this.updateMPYear(this.mpyear+10);}}}}}}},onMonthDblClick:function(D,B){D.stopEvent();
var C=new Ext.Element(B),A;if((A=C.up("td.x-date-mp-month",2))){this.update(new Date(this.mpSelYear,A.dom.xmonth,(this.activeDate||this.value).getDate()));
this.hideMonthPicker();}else{if((A=C.up("td.x-date-mp-year",2))){this.update(new Date(A.dom.xyear,this.mpSelMonth,(this.activeDate||this.value).getDate()));
this.hideMonthPicker();}}},hideMonthPicker:function(A){if(this.monthPicker){if(A===true){this.monthPicker.hide();
}else{this.monthPicker.slideOut("t",{duration:0.2});}}},showPrevMonth:function(A){this.update(this.activeDate.add("mo",-1));
},showNextMonth:function(A){this.update(this.activeDate.add("mo",1));},showPrevYear:function(){this.update(this.activeDate.add("y",-1));
},showNextYear:function(){this.update(this.activeDate.add("y",1));},handleMouseWheel:function(A){A.stopEvent();
if(!this.disabled){var B=A.getWheelDelta();if(B>0){this.showPrevMonth();}else{if(B<0){this.showNextMonth();
}}}},handleDateClick:function(B,A){B.stopEvent();if(!this.disabled&&A.dateValue&&!Ext.fly(A.parentNode).hasClass("x-date-disabled")){this.setValue(new Date(A.dateValue));
this.fireEvent("select",this,this.value);}},selectToday:function(){if(this.todayBtn&&!this.todayBtn.disabled){this.setValue(new Date().clearTime());
this.fireEvent("select",this,this.value);}},update:function(Ai,L){var Ad=this.activeDate,U=this.isVisible();
this.activeDate=Ai;if(!L&&Ad&&this.el){var Ac=Ai.getTime();if(Ad.getMonth()==Ai.getMonth()&&Ad.getFullYear()==Ai.getFullYear()){this.cells.removeClass("x-date-selected");
this.cells.each(function(A){if(A.dom.firstChild.dateValue==Ac){A.addClass("x-date-selected");
if(U){Ext.fly(A.dom.firstChild).focus(50);}return false;}});return;}}var t=Ai.getDaysInMonth();
var V=Ai.getFirstDateOfMonth();var Ah=V.getDay()-this.startDay;if(Ah<=this.startDay){Ah+=7;
}var M=Ai.add("mo",-1);var d=M.getDaysInMonth()-Ah;var Ag=this.cells.elements;var W=this.textNodes;
t+=Ah;var T=86400000;var O=(new Date(M.getFullYear(),M.getMonth(),d)).clearTime();
var N=new Date().clearTime().getTime();var Z=Ai.clearTime().getTime();var Y=this.minDate?this.minDate.clearTime():Number.NEGATIVE_INFINITY;
var S=this.maxDate?this.maxDate.clearTime():Number.POSITIVE_INFINITY;var Q=this.disabledDatesRE;
var X=this.disabledDatesText;var Ak=this.disabledDays?this.disabledDays.join(""):false;
var P=this.disabledDaysText;var K=this.format;if(this.showToday){var Aa=new Date().clearTime();
var Af=(Aa<Y||Aa>S||(Q&&K&&Q.test(Aa.dateFormat(K)))||(Ak&&Ak.indexOf(Aa.getDay())!=-1));
if(!this.disabled){this.todayBtn.setDisabled(Af);this.todayKeyListener[Af?"disable":"enable"]();
}}var w=function(D,C){C.title="";var A=O.getTime();C.firstChild.dateValue=A;if(A==N){C.className+=" x-date-today";
C.title=D.todayText;}if(A==Z){C.className+=" x-date-selected";if(U){Ext.fly(C.firstChild).focus(50);
}}if(A<Y){C.className=" x-date-disabled";C.title=D.minText;return;}if(A>S){C.className=" x-date-disabled";
C.title=D.maxText;return;}if(Ak){if(Ak.indexOf(O.getDay())!=-1){C.title=P;C.className=" x-date-disabled";
}}if(Q&&K){var B=O.dateFormat(K);if(Q.test(B)){C.title=X.replace("%0",B);C.className=" x-date-disabled";
}}};var R=0;for(;R<Ah;R++){W[R].innerHTML=(++d);O.setDate(O.getDate()+1);Ag[R].className="x-date-prevday";
w(this,Ag[R]);}for(;R<t;R++){var Ae=R-Ah+1;W[R].innerHTML=(Ae);O.setDate(O.getDate()+1);
Ag[R].className="x-date-active";w(this,Ag[R]);}var Aj=0;for(;R<42;R++){W[R].innerHTML=(++Aj);
O.setDate(O.getDate()+1);Ag[R].className="x-date-nextday";w(this,Ag[R]);}this.mbtn.setText(this.monthNames[Ai.getMonth()]+" "+Ai.getFullYear());
if(!this.internalRender){var i=this.el.dom.firstChild;var Ab=i.offsetWidth;this.el.setWidth(Ab+this.el.getBorderWidth("lr"));
Ext.fly(i).setWidth(Ab);this.internalRender=true;if(Ext.isOpera&&!this.secondPass){i.rows[0].cells[1].style.width=(Ab-(i.rows[0].cells[0].offsetWidth+i.rows[0].cells[2].offsetWidth))+"px";
this.secondPass=true;this.update.defer(10,this,[Ai]);}}},beforeDestroy:function(){if(this.rendered){this.keyNav.disable();
this.keyNav=null;Ext.destroy(this.leftClickRpt,this.rightClickRpt,this.monthPicker,this.eventEl,this.mbtn,this.todayBtn);
}}});Ext.reg("datepicker",Ext.DatePicker);Ext.LoadMask=function(C,B){this.el=Ext.get(C);
Ext.apply(this,B);if(this.store){this.store.on("beforeload",this.onBeforeLoad,this);
this.store.on("load",this.onLoad,this);this.store.on("exception",this.onLoad,this);
this.removeMask=Ext.value(this.removeMask,false);}else{var A=this.el.getUpdater();
A.showLoadIndicator=false;A.on("beforeupdate",this.onBeforeLoad,this);A.on("update",this.onLoad,this);
A.on("failure",this.onLoad,this);this.removeMask=Ext.value(this.removeMask,true);
}};Ext.LoadMask.prototype={msg:"Loading...",msgCls:"x-mask-loading",disabled:false,disable:function(){this.disabled=true;
},enable:function(){this.disabled=false;},onLoad:function(){this.el.unmask(this.removeMask);
},onBeforeLoad:function(){if(!this.disabled){this.el.mask(this.msg,this.msgCls);}},show:function(){this.onBeforeLoad();
},hide:function(){this.onLoad();},destroy:function(){if(this.store){this.store.un("beforeload",this.onBeforeLoad,this);
this.store.un("load",this.onLoad,this);this.store.un("exception",this.onLoad,this);
}else{var A=this.el.getUpdater();A.un("beforeupdate",this.onBeforeLoad,this);A.un("update",this.onLoad,this);
A.un("failure",this.onLoad,this);}}};Ext.Slider=Ext.extend(Ext.BoxComponent,{vertical:false,minValue:0,maxValue:100,decimalPrecision:0,keyIncrement:1,increment:0,clickRange:[5,15],clickToChange:true,animate:true,dragging:false,initComponent:function(){if(!Ext.isDefined(this.value)){this.value=this.minValue;
}Ext.Slider.superclass.initComponent.call(this);this.keyIncrement=Math.max(this.increment,this.keyIncrement);
this.addEvents("beforechange","change","changecomplete","dragstart","drag","dragend");
if(this.vertical){Ext.apply(this,Ext.Slider.Vertical);}},onRender:function(){this.autoEl={cls:"x-slider "+(this.vertical?"x-slider-vert":"x-slider-horz"),cn:{cls:"x-slider-end",cn:{cls:"x-slider-inner",cn:[{cls:"x-slider-thumb"},{tag:"a",cls:"x-slider-focus",href:"#",tabIndex:"-1",hidefocus:"on"}]}}};
Ext.Slider.superclass.onRender.apply(this,arguments);this.endEl=this.el.first();this.innerEl=this.endEl.first();
this.thumb=this.innerEl.first();this.halfThumb=(this.vertical?this.thumb.getHeight():this.thumb.getWidth())/2;
this.focusEl=this.thumb.next();this.initEvents();},initEvents:function(){this.thumb.addClassOnOver("x-slider-thumb-over");
this.mon(this.el,{scope:this,mousedown:this.onMouseDown,keydown:this.onKeyDown});
this.focusEl.swallowEvent("click",true);this.tracker=new Ext.dd.DragTracker({onBeforeStart:this.onBeforeDragStart.createDelegate(this),onStart:this.onDragStart.createDelegate(this),onDrag:this.onDrag.createDelegate(this),onEnd:this.onDragEnd.createDelegate(this),tolerance:3,autoStart:300});
this.tracker.initEl(this.thumb);this.on("beforedestroy",this.tracker.destroy,this.tracker);
},onMouseDown:function(B){if(this.disabled){return;}if(this.clickToChange&&B.target!=this.thumb.dom){var A=this.innerEl.translatePoints(B.getXY());
this.onClickChange(A);}this.focus();},onClickChange:function(A){if(A.top>this.clickRange[0]&&A.top<this.clickRange[1]){this.setValue(Ext.util.Format.round(this.reverseValue(A.left),this.decimalPrecision),undefined,true);
}},onKeyDown:function(B){if(this.disabled){B.preventDefault();return;}var A=B.getKey();
switch(A){case B.UP:case B.RIGHT:B.stopEvent();if(B.ctrlKey){this.setValue(this.maxValue,undefined,true);
}else{this.setValue(this.value+this.keyIncrement,undefined,true);}break;case B.DOWN:case B.LEFT:B.stopEvent();
if(B.ctrlKey){this.setValue(this.minValue,undefined,true);}else{this.setValue(this.value-this.keyIncrement,undefined,true);
}break;default:B.preventDefault();}},doSnap:function(B){if(!this.increment||this.increment==1||!B){return B;
}var D=B,C=this.increment;var A=B%C;if(A!=0){D-=A;if(A*2>C){D+=C;}else{if(A*2<-C){D-=C;
}}}return D.constrain(this.minValue,this.maxValue);},afterRender:function(){Ext.Slider.superclass.afterRender.apply(this,arguments);
if(this.value!==undefined){var A=this.normalizeValue(this.value);if(A!==this.value){delete this.value;
this.setValue(A,false);}else{this.moveThumb(this.translateValue(A),false);}}},getRatio:function(){var A=this.innerEl.getWidth();
var B=this.maxValue-this.minValue;return B==0?A:(A/B);},normalizeValue:function(A){A=this.doSnap(A);
A=Ext.util.Format.round(A,this.decimalPrecision);A=A.constrain(this.minValue,this.maxValue);
return A;},setValue:function(B,A,C){B=this.normalizeValue(B);if(B!==this.value&&this.fireEvent("beforechange",this,B,this.value)!==false){this.value=B;
this.moveThumb(this.translateValue(B),A!==false);this.fireEvent("change",this,B);
if(C){this.fireEvent("changecomplete",this,B);}}},translateValue:function(A){var B=this.getRatio();
return(A*B)-(this.minValue*B)-this.halfThumb;},reverseValue:function(B){var A=this.getRatio();
return(B+this.halfThumb+(this.minValue*A))/A;},moveThumb:function(B,A){if(!A||this.animate===false){this.thumb.setLeft(B);
}else{this.thumb.shift({left:B,stopFx:true,duration:0.35});}},focus:function(){this.focusEl.focus(10);
},onBeforeDragStart:function(A){return !this.disabled;},onDragStart:function(A){this.thumb.addClass("x-slider-thumb-drag");
this.dragging=true;this.dragStartValue=this.value;this.fireEvent("dragstart",this,A);
},onDrag:function(A){var B=this.innerEl.translatePoints(this.tracker.getXY());this.setValue(Ext.util.Format.round(this.reverseValue(B.left),this.decimalPrecision),false);
this.fireEvent("drag",this,A);},onDragEnd:function(A){this.thumb.removeClass("x-slider-thumb-drag");
this.dragging=false;this.fireEvent("dragend",this,A);if(this.dragStartValue!=this.value){this.fireEvent("changecomplete",this,this.value);
}},onResize:function(A,B){this.innerEl.setWidth(A-(this.el.getPadding("l")+this.endEl.getPadding("r")));
this.syncThumb();},onDisable:function(){Ext.Slider.superclass.onDisable.call(this);
this.thumb.addClass(this.disabledClass);if(Ext.isIE){var A=this.thumb.getXY();this.thumb.hide();
this.innerEl.addClass(this.disabledClass).dom.disabled=true;if(!this.thumbHolder){this.thumbHolder=this.endEl.createChild({cls:"x-slider-thumb "+this.disabledClass});
}this.thumbHolder.show().setXY(A);}},onEnable:function(){Ext.Slider.superclass.onEnable.call(this);
this.thumb.removeClass(this.disabledClass);if(Ext.isIE){this.innerEl.removeClass(this.disabledClass).dom.disabled=false;
if(this.thumbHolder){this.thumbHolder.hide();}this.thumb.show();this.syncThumb();
}},syncThumb:function(){if(this.rendered){this.moveThumb(this.translateValue(this.value));
}},getValue:function(){return this.value;}});Ext.reg("slider",Ext.Slider);Ext.Slider.Vertical={onResize:function(A,B){this.innerEl.setHeight(B-(this.el.getPadding("t")+this.endEl.getPadding("b")));
this.syncThumb();},getRatio:function(){var B=this.innerEl.getHeight();var A=this.maxValue-this.minValue;
return B/A;},moveThumb:function(B,A){if(!A||this.animate===false){this.thumb.setBottom(B);
}else{this.thumb.shift({bottom:B,stopFx:true,duration:0.35});}},onDrag:function(B){var C=this.innerEl.translatePoints(this.tracker.getXY());
var A=this.innerEl.getHeight()-C.top;this.setValue(this.minValue+Ext.util.Format.round(A/this.getRatio(),this.decimalPrecision),false);
this.fireEvent("drag",this,B);},onClickChange:function(B){if(B.left>this.clickRange[0]&&B.left<this.clickRange[1]){var A=this.innerEl.getHeight()-B.top;
this.setValue(this.minValue+Ext.util.Format.round(A/this.getRatio(),this.decimalPrecision),undefined,true);
}}};Ext.ProgressBar=Ext.extend(Ext.BoxComponent,{baseCls:"x-progress",animate:false,waitTimer:null,initComponent:function(){Ext.ProgressBar.superclass.initComponent.call(this);
this.addEvents("update");},onRender:function(D,A){var C=new Ext.Template('<div class="{cls}-wrap">','<div class="{cls}-inner">','<div class="{cls}-bar">','<div class="{cls}-text">',"<div>&#160;</div>","</div>","</div>",'<div class="{cls}-text {cls}-text-back">',"<div>&#160;</div>","</div>","</div>","</div>");
this.el=A?C.insertBefore(A,{cls:this.baseCls},true):C.append(D,{cls:this.baseCls},true);
if(this.id){this.el.dom.id=this.id;}var B=this.el.dom.firstChild;this.progressBar=Ext.get(B.firstChild);
if(this.textEl){this.textEl=Ext.get(this.textEl);delete this.textTopEl;}else{this.textTopEl=Ext.get(this.progressBar.dom.firstChild);
var E=Ext.get(B.childNodes[1]);this.textTopEl.setStyle("z-index",99).addClass("x-hidden");
this.textEl=new Ext.CompositeElement([this.textTopEl.dom.firstChild,E.dom.firstChild]);
this.textEl.setWidth(B.offsetWidth);}this.progressBar.setHeight(B.offsetHeight);},afterRender:function(){Ext.ProgressBar.superclass.afterRender.call(this);
if(this.value){this.updateProgress(this.value,this.text);}else{this.updateText(this.text);
}},updateProgress:function(C,D,B){this.value=C||0;if(D){this.updateText(D);}if(this.rendered){var A=Math.floor(C*this.el.dom.firstChild.offsetWidth);
this.progressBar.setWidth(A,B===true||(B!==false&&this.animate));if(this.textTopEl){this.textTopEl.removeClass("x-hidden").setWidth(A);
}}this.fireEvent("update",this,C,D);return this;},wait:function(B){if(!this.waitTimer){var A=this;
B=B||{};this.updateText(B.text);this.waitTimer=Ext.TaskMgr.start({run:function(D){var C=B.increment||10;
this.updateProgress(((((D+C)%C)+1)*(100/C))*0.01,null,B.animate);},interval:B.interval||1000,duration:B.duration,onStop:function(){if(B.fn){B.fn.apply(B.scope||this);
}this.reset();},scope:A});}return this;},isWaiting:function(){return this.waitTimer!==null;
},updateText:function(A){this.text=A||"&#160;";if(this.rendered){this.textEl.update(this.text);
}return this;},syncProgressBar:function(){if(this.value){this.updateProgress(this.value,this.text);
}return this;},setSize:function(A,C){Ext.ProgressBar.superclass.setSize.call(this,A,C);
if(this.textTopEl){var B=this.el.dom.firstChild;this.textEl.setSize(B.offsetWidth,B.offsetHeight);
}this.syncProgressBar();return this;},reset:function(A){this.updateProgress(0);if(this.textTopEl){this.textTopEl.addClass("x-hidden");
}if(this.waitTimer){this.waitTimer.onStop=null;Ext.TaskMgr.stop(this.waitTimer);this.waitTimer=null;
}if(A===true){this.hide();}return this;}});Ext.reg("progress",Ext.ProgressBar);(function(){var A=Ext.EventManager;
var B=Ext.lib.Dom;Ext.dd.DragDrop=function(E,C,D){if(E){this.init(E,C,D);}};Ext.dd.DragDrop.prototype={id:null,config:null,dragElId:null,handleElId:null,invalidHandleTypes:null,invalidHandleIds:null,invalidHandleClasses:null,startPageX:0,startPageY:0,groups:null,locked:false,lock:function(){this.locked=true;
},moveOnly:false,unlock:function(){this.locked=false;},isTarget:true,padding:null,_domRef:null,__ygDragDrop:true,constrainX:false,constrainY:false,minX:0,maxX:0,minY:0,maxY:0,maintainOffset:false,xTicks:null,yTicks:null,primaryButtonOnly:true,available:false,hasOuterHandles:false,b4StartDrag:function(D,C){},startDrag:function(D,C){},b4Drag:function(C){},onDrag:function(C){},onDragEnter:function(D,C){},b4DragOver:function(C){},onDragOver:function(D,C){},b4DragOut:function(C){},onDragOut:function(D,C){},b4DragDrop:function(C){},onDragDrop:function(D,C){},onInvalidDrop:function(C){},b4EndDrag:function(C){},endDrag:function(C){},b4MouseDown:function(C){},onMouseDown:function(C){},onMouseUp:function(C){},onAvailable:function(){},defaultPadding:{left:0,right:0,top:0,bottom:0},constrainTo:function(E,C,J){if(typeof C=="number"){C={left:C,right:C,top:C,bottom:C};
}C=C||this.defaultPadding;var G=Ext.get(this.getEl()).getBox();var K=Ext.get(E);var I=K.getScroll();
var F,L=K.dom;if(L==document.body){F={x:I.left,y:I.top,width:Ext.lib.Dom.getViewWidth(),height:Ext.lib.Dom.getViewHeight()};
}else{var H=K.getXY();F={x:H[0]+I.left,y:H[1]+I.top,width:L.clientWidth,height:L.clientHeight};
}var D=G.y-F.y;var M=G.x-F.x;this.resetConstraints();this.setXConstraint(M-(C.left||0),F.width-M-G.width-(C.right||0),this.xTickSize);
this.setYConstraint(D-(C.top||0),F.height-D-G.height-(C.bottom||0),this.yTickSize);
},getEl:function(){if(!this._domRef){this._domRef=Ext.getDom(this.id);}return this._domRef;
},getDragEl:function(){return Ext.getDom(this.dragElId);},init:function(E,C,D){this.initTarget(E,C,D);
A.on(this.id,"mousedown",this.handleMouseDown,this);},initTarget:function(E,C,D){this.config=D||{};
this.DDM=Ext.dd.DDM;this.groups={};if(typeof E!=="string"){E=Ext.id(E);}this.id=E;
this.addToGroup((C)?C:"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,D,C,E){if(!D&&0!==D){this.padding=[F,F,F,F];}else{if(!C&&0!==C){this.padding=[F,D,F,D];
}else{this.padding=[F,D,C,E];}}},setInitPosition:function(H,G){var C=this.getEl();
if(!this.DDM.verifyEl(C)){return;}var F=H||0;var E=G||0;var D=B.getXY(C);this.initPageX=D[0]-F;
this.initPageY=D[1]-E;this.lastPageX=D[0];this.lastPageY=D[1];this.setStartPosition(D);
},setStartPosition:function(C){var D=C||B.getXY(this.getEl());this.deltaSetXY=null;
this.startPageX=D[0];this.startPageY=D[1];},addToGroup:function(C){this.groups[C]=true;
this.DDM.regDragDrop(this,C);},removeFromGroup:function(C){if(this.groups[C]){delete this.groups[C];
}this.DDM.removeDDFromGroup(this,C);},setDragElId:function(C){this.dragElId=C;},setHandleElId:function(C){if(typeof C!=="string"){C=Ext.id(C);
}this.handleElId=C;this.DDM.regHandle(this.id,C);},setOuterHandleElId:function(C){if(typeof C!=="string"){C=Ext.id(C);
}A.on(C,"mousedown",this.handleMouseDown,this);this.setHandleElId(C);this.hasOuterHandles=true;
},unreg:function(){A.un(this.id,"mousedown",this.handleMouseDown);this._domRef=null;
this.DDM._remove(this);},destroy:function(){this.unreg();},isLocked:function(){return(this.DDM.isLocked()||this.locked);
},handleMouseDown:function(C,E){if(this.primaryButtonOnly&&C.button!=0){return;}if(this.isLocked()){return;
}this.DDM.refreshCache(this.groups);var D=new Ext.lib.Point(Ext.lib.Event.getPageX(C),Ext.lib.Event.getPageY(C));
if(!this.hasOuterHandles&&!this.DDM.isOverTarget(D,this)){}else{if(this.clickValidator(C)){this.setStartPosition();
this.b4MouseDown(C);this.onMouseDown(C);this.DDM.handleMouseDown(C,this);this.DDM.stopEvent(C);
}else{}}},clickValidator:function(C){var D=C.getTarget();return(this.isValidHandleChild(D)&&(this.id==this.handleElId||this.DDM.handleWasClicked(D,this.id)));
},addInvalidHandleType:function(D){var C=D.toUpperCase();this.invalidHandleTypes[C]=C;
},addInvalidHandleId:function(C){if(typeof C!=="string"){C=Ext.id(C);}this.invalidHandleIds[C]=C;
},addInvalidHandleClass:function(C){this.invalidHandleClasses.push(C);},removeInvalidHandleType:function(D){var C=D.toUpperCase();
delete this.invalidHandleTypes[C];},removeInvalidHandleId:function(C){if(typeof C!=="string"){C=Ext.id(C);
}delete this.invalidHandleIds[C];},removeInvalidHandleClass:function(D){for(var E=0,C=this.invalidHandleClasses.length;
E<C;++E){if(this.invalidHandleClasses[E]==D){delete this.invalidHandleClasses[E];
}}},isValidHandleChild:function(C){var H=true;var E;try{E=C.nodeName.toUpperCase();
}catch(D){E=C.nodeName;}H=H&&!this.invalidHandleTypes[E];H=H&&!this.invalidHandleIds[C.id];
for(var G=0,F=this.invalidHandleClasses.length;H&&G<F;++G){H=!Ext.fly(C).hasClass(this.invalidHandleClasses[G]);
}return H;},setXTicks:function(C,D){this.xTicks=[];this.xTickSize=D;var F={};for(var E=this.initPageX;
E>=this.minX;E=E-D){if(!F[E]){this.xTicks[this.xTicks.length]=E;F[E]=true;}}for(E=this.initPageX;
E<=this.maxX;E=E+D){if(!F[E]){this.xTicks[this.xTicks.length]=E;F[E]=true;}}this.xTicks.sort(this.DDM.numericSort);
},setYTicks:function(C,D){this.yTicks=[];this.yTickSize=D;var F={};for(var E=this.initPageY;
E>=this.minY;E=E-D){if(!F[E]){this.yTicks[this.yTicks.length]=E;F[E]=true;}}for(E=this.initPageY;
E<=this.maxY;E=E+D){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 C=(this.maintainOffset)?this.lastPageX-this.initPageX:0;
var D=(this.maintainOffset)?this.lastPageY-this.initPageY:0;this.setInitPosition(C,D);
}else{this.setInitPosition();}if(this.constrainX){this.setXConstraint(this.leftConstraint,this.rightConstraint,this.xTickSize);
}if(this.constrainY){this.setYConstraint(this.topConstraint,this.bottomConstraint,this.yTickSize);
}},getTick:function(E,I){if(!I){return E;}else{if(I[0]>=E){return I[0];}else{for(var G=0,F=I.length;
G<F;++G){var H=G+1;if(I[H]&&I[H]>=E){var D=E-I[G];var C=I[H]-E;return(C>D)?I[G]:I[H];
}}return I[I.length-1];}}},toString:function(){return("DragDrop "+this.id);}};})();
if(!Ext.dd.DragDropMgr){Ext.dd.DragDropMgr=function(){var A=Ext.EventManager;return{ids:{},handleIds:{},dragCurrent:null,dragOvers:{},deltaX:0,deltaY:0,preventDefault:true,stopPropagation:true,initialized:false,locked:false,init:function(){this.initialized=true;
},POINT:0,INTERSECT:1,mode:0,_execOnAll:function(E,D){for(var F in this.ids){for(var C in this.ids[F]){var B=this.ids[F][C];
if(!this.isTypeOfDD(B)){continue;}B[E].apply(B,D);}}},_onLoad:function(){this.init();
A.on(document,"mouseup",this.handleMouseUp,this,true);A.on(document,"mousemove",this.handleMouseMove,this,true);
A.on(window,"unload",this._onUnload,this,true);A.on(window,"resize",this._onResize,this,true);
},_onResize:function(B){this._execOnAll("resetConstraints",[]);},lock:function(){this.locked=true;
},unlock:function(){this.locked=false;},isLocked:function(){return this.locked;},locationCache:{},useCache:true,clickPixelThresh:3,clickTimeThresh:350,dragThreshMet:false,clickTimeout:null,startX:0,startY:0,regDragDrop:function(C,B){if(!this.initialized){this.init();
}if(!this.ids[B]){this.ids[B]={};}this.ids[B][C.id]=C;},removeDDFromGroup:function(D,B){if(!this.ids[B]){this.ids[B]={};
}var C=this.ids[B];if(C&&C[D.id]){delete C[D.id];}},_remove:function(C){for(var B in C.groups){if(B&&this.ids[B]&&this.ids[B][C.id]){delete this.ids[B][C.id];
}}delete this.handleIds[C.id];},regHandle:function(C,B){if(!this.handleIds[C]){this.handleIds[C]={};
}this.handleIds[C][B]=B;},isDragDrop:function(B){return(this.getDDById(B))?true:false;
},getRelated:function(B,D){var G=[];for(var F in B.groups){for(var E in this.ids[F]){var C=this.ids[F][E];
if(!this.isTypeOfDD(C)){continue;}if(!D||C.isTarget){G[G.length]=C;}}}return G;},isLegalTarget:function(B,F){var D=this.getRelated(B,true);
for(var E=0,C=D.length;E<C;++E){if(D[E].id==F.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){if(Ext.QuickTips){Ext.QuickTips.disable();
}if(this.dragCurrent){this.handleMouseUp(D);}this.currentTarget=D.getTarget();this.dragCurrent=C;
var B=C.getEl();this.startX=D.getPageX();this.startY=D.getPageY();this.deltaX=this.startX-B.offsetLeft;
this.deltaY=this.startY-B.offsetTop;this.dragThreshMet=false;this.clickTimeout=setTimeout(function(){var E=Ext.dd.DDM;
E.startDrag(E.startX,E.startY);},this.clickTimeThresh);},startDrag:function(B,C){clearTimeout(this.clickTimeout);
if(this.dragCurrent){this.dragCurrent.b4StartDrag(B,C);this.dragCurrent.startDrag(B,C);
}this.dragThreshMet=true;},handleMouseUp:function(B){if(Ext.QuickTips){Ext.QuickTips.enable();
}if(!this.dragCurrent){return;}clearTimeout(this.clickTimeout);if(this.dragThreshMet){this.fireEvents(B,true);
}else{}this.stopDrag(B);this.stopEvent(B);},stopEvent:function(B){if(this.stopPropagation){B.stopPropagation();
}if(this.preventDefault){B.preventDefault();}},stopDrag:function(B){if(this.dragCurrent){if(this.dragThreshMet){this.dragCurrent.b4EndDrag(B);
this.dragCurrent.endDrag(B);}this.dragCurrent.onMouseUp(B);}this.dragCurrent=null;
this.dragOvers={};},handleMouseMove:function(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-D.getPageX());var B=Math.abs(this.startY-D.getPageY());
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(J,K){var C=this.dragCurrent;
if(!C||C.isLocked()){return;}var D=J.getPoint();var L=[];var O=[];var H=[];var F=[];
var N=[];for(var E in this.dragOvers){var M=this.dragOvers[E];if(!this.isTypeOfDD(M)){continue;
}if(!this.isOverTarget(D,M,this.mode)){O.push(M);}L[E]=true;delete this.dragOvers[E];
}for(var B in C.groups){if("string"!=typeof B){continue;}for(E in this.ids[B]){var G=this.ids[B][E];
if(!this.isTypeOfDD(G)){continue;}if(G.isTarget&&!G.isLocked()&&((G!=C)||(C.ignoreSelf===false))){if(this.isOverTarget(D,G,this.mode)){if(K){F.push(G);
}else{if(!L[G.id]){N.push(G);}else{H.push(G);}this.dragOvers[G.id]=G;}}}}}if(this.mode){if(O.length){C.b4DragOut(J,O);
C.onDragOut(J,O);}if(N.length){C.onDragEnter(J,N);}if(H.length){C.b4DragOver(J,H);
C.onDragOver(J,H);}if(F.length){C.b4DragDrop(J,F);C.onDragDrop(J,F);}}else{var I=0;
for(E=0,I=O.length;E<I;++E){C.b4DragOut(J,O[E].id);C.onDragOut(J,O[E].id);}for(E=0,I=N.length;
E<I;++E){C.onDragEnter(J,N[E].id);}for(E=0,I=H.length;E<I;++E){C.b4DragOver(J,H[E].id);
C.onDragOver(J,H[E].id);}for(E=0,I=F.length;E<I;++E){C.b4DragDrop(J,F[E].id);C.onDragDrop(J,F[E].id);
}}if(K&&!F.length){C.onInvalidDrop(J);}},getBestMatch:function(E){var B=null;var D=E.length;
if(D==1){B=E[0];}else{for(var F=0;F<D;++F){var C=E[F];if(C.cursorIsOver){B=C;break;
}else{if(!B||B.overlap.getArea()<C.overlap.getArea()){B=C;}}}}return B;},refreshCache:function(D){for(var C in D){if("string"!=typeof C){continue;
}for(var E in this.ids[C]){var F=this.ids[C][E];if(this.isTypeOfDD(F)){var B=this.getLocation(F);
if(B){this.locationCache[F.id]=B;}else{delete this.locationCache[F.id];}}}}},verifyEl:function(C){if(C){var B;
if(Ext.isIE){try{B=C.offsetParent;}catch(D){}}else{B=C.offsetParent;}if(B){return true;
}}return false;},getLocation:function(D){if(!this.isTypeOfDD(D)){return null;}var B=D.getEl(),G,M,L,I,H,J,K,F,C;
try{G=Ext.lib.Dom.getXY(B);}catch(E){}if(!G){return null;}M=G[0];L=M+B.offsetWidth;
I=G[1];H=I+B.offsetHeight;J=I-D.padding[0];K=L+D.padding[1];F=H+D.padding[2];C=M-D.padding[3];
return new Ext.lib.Region(J,K,F,C);},isOverTarget:function(E,F,H){var J=this.locationCache[F.id];
if(!J||!this.useCache){J=this.getLocation(F);this.locationCache[F.id]=J;}if(!J){return false;
}F.cursorIsOver=J.contains(E);var D=this.dragCurrent;if(!D||!D.getTargetCoord||(!H&&!D.constrainX&&!D.constrainY)){return F.cursorIsOver;
}F.overlap=null;var B=D.getTargetCoord(E.x,E.y);var G=D.getDragEl();var I=new Ext.lib.Region(B.y,B.x+G.offsetWidth,B.y+G.offsetHeight,B.x);
var C=I.intersect(J);if(C){F.overlap=C;return(H)?true:F.cursorIsOver;}else{return false;
}},_onUnload:function(C,B){Ext.dd.DragDropMgr.unregAll();},unregAll:function(){if(this.dragCurrent){this.stopDrag();
this.dragCurrent=null;}this._execOnAll("unreg",[]);for(var B in this.elementCache){delete this.elementCache[B];
}this.elementCache={};this.ids={};},elementCache:{},getElWrapper:function(C){var B=this.elementCache[C];
if(!B||!B.el){B=this.elementCache[C]=new this.ElementWrapper(Ext.getDom(C));}return B;
},getElement:function(B){return Ext.getDom(B);},getCss:function(C){var B=Ext.getDom(C);
return(B)?B.style:null;},ElementWrapper:function(B){this.el=B||null;this.id=this.el&&B.id;
this.css=this.el&&B.style;},getPosX:function(B){return Ext.lib.Dom.getX(B);},getPosY:function(B){return Ext.lib.Dom.getY(B);
},swapNode:function(D,B){if(D.swapNode){D.swapNode(B);}else{var 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(B,C){return(B-C);
},_timeoutCount:0,_addListeners:function(){var B=Ext.dd.DDM;if(Ext.lib.Event&&document){B._onLoad();
}else{if(B._timeoutCount>2000){}else{setTimeout(B._addListeners,10);if(document&&document.body){B._timeoutCount+=1;
}}}},handleWasClicked:function(B,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,A,B){if(C){this.init(C,A,B);
}};Ext.extend(Ext.dd.DD,Ext.dd.DragDrop,{scroll:true,autoOffset:function(C,B){var A=C-this.startPageX;
var D=B-this.startPageY;this.setDelta(A,D);},setDelta:function(B,A){this.deltaX=B;
this.deltaY=A;},setDragElPos:function(C,B){var A=this.getDragEl();this.alignElWithMouse(A,C,B);
},alignElWithMouse:function(E,A,H){var G=this.getTargetCoord(A,H);var D=E.dom?E:Ext.fly(E,"_dd");
if(!this.deltaSetXY){var B=[G.x,G.y];D.setXY(B);var F=D.getLeft(true);var C=D.getTop(true);
this.deltaSetXY=[F-G.x,C-G.y];}else{D.setLeftTop(G.x+this.deltaSetXY[0],G.y+this.deltaSetXY[1]);
}this.cachePosition(G.x,G.y);this.autoScroll(G.x,G.y,E.offsetHeight,E.offsetWidth);
return G;},cachePosition:function(B,A){if(B){this.lastPageX=B;this.lastPageY=A;}else{var C=Ext.lib.Dom.getXY(this.getEl());
this.lastPageX=C[0];this.lastPageY=C[1];}},autoScroll:function(E,D,M,F){if(this.scroll){var G=Ext.lib.Dom.getViewHeight();
var J=Ext.lib.Dom.getViewWidth();var A=this.DDM.getScrollTop();var L=this.DDM.getScrollLeft();
var C=M+D;var H=F+E;var B=(G+A-D-this.deltaY);var N=(J+L-E-this.deltaX);var K=40;
var I=(document.all)?80:30;if(C>G&&B<K){window.scrollTo(L,A+I);}if(D<A&&A>0&&D-A<K){window.scrollTo(L,A-I);
}if(H>J&&N<K){window.scrollTo(L+I,A);}if(E<L&&L>0&&E-L<K){window.scrollTo(L-I,A);
}}},getTargetCoord:function(C,B){var A=C-this.deltaX;var D=B-this.deltaY;if(this.constrainX){if(A<this.minX){A=this.minX;
}if(A>this.maxX){A=this.maxX;}}if(this.constrainY){if(D<this.minY){D=this.minY;}if(D>this.maxY){D=this.maxY;
}}A=this.getTick(A,this.xTicks);D=this.getTick(D,this.yTicks);return{x:A,y:D};},applyConfig:function(){Ext.dd.DD.superclass.applyConfig.call(this);
this.scroll=(this.config.scroll!==false);},b4MouseDown:function(A){this.autoOffset(A.getPageX(),A.getPageY());
},b4Drag:function(A){this.setDragElPos(A.getPageX(),A.getPageY());},toString:function(){return("DD "+this.id);
}});Ext.dd.DDProxy=function(C,A,B){if(C){this.init(C,A,B);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(E,D){var C=this.getEl();var A=this.getDragEl();var B=A.style;
this._resizeProxy();if(this.centerFrame){this.setDelta(Math.round(parseInt(B.width,10)/2),Math.round(parseInt(B.height,10)/2));
}this.setDragElPos(E,D);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=B.getPageX();
var C=B.getPageY();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,A,B){if(C){this.initTarget(C,A,B);}};Ext.extend(Ext.dd.DDTarget,Ext.dd.DragDrop,{toString:function(){return("DDTarget "+this.id);
}});Ext.dd.DragTracker=function(A){Ext.apply(this,A);this.addEvents("mousedown","mouseup","mousemove","dragstart","dragend","drag");
this.dragRegion=new Ext.lib.Region(0,0,0,0);if(this.el){this.initEl(this.el);}};Ext.extend(Ext.dd.DragTracker,Ext.util.Observable,{active:false,tolerance:5,autoStart:false,initEl:function(A){this.el=Ext.get(A);
A.on("mousedown",this.onMouseDown,this,this.delegate?{delegate:this.delegate}:undefined);
},destroy:function(){this.el.un("mousedown",this.onMouseDown,this);},onMouseDown:function(C,B){if(this.fireEvent("mousedown",this,C)!==false&&this.onBeforeStart(C)!==false){this.startXY=this.lastXY=C.getXY();
this.dragTarget=this.delegate?B:this.el.dom;if(this.preventDefault!==false){C.preventDefault();
}var A=Ext.getDoc();A.on("mouseup",this.onMouseUp,this);A.on("mousemove",this.onMouseMove,this);
A.on("selectstart",this.stopSelect,this);if(this.autoStart){this.timer=this.triggerStart.defer(this.autoStart===true?1000:this.autoStart,this);
}}},onMouseMove:function(D,C){if(this.active&&Ext.isIE&&!D.browserEvent.button){D.preventDefault();
this.onMouseUp(D);return;}D.preventDefault();var B=D.getXY(),A=this.startXY;this.lastXY=B;
if(!this.active){if(Math.abs(A[0]-B[0])>this.tolerance||Math.abs(A[1]-B[1])>this.tolerance){this.triggerStart();
}else{return;}}this.fireEvent("mousemove",this,D);this.onDrag(D);this.fireEvent("drag",this,D);
},onMouseUp:function(C){var B=Ext.getDoc();B.un("mousemove",this.onMouseMove,this);
B.un("mouseup",this.onMouseUp,this);B.un("selectstart",this.stopSelect,this);C.preventDefault();
this.clearStart();var A=this.active;this.active=false;delete this.elRegion;this.fireEvent("mouseup",this,C);
if(A){this.onEnd(C);this.fireEvent("dragend",this,C);}},triggerStart:function(A){this.clearStart();
this.active=true;this.onStart(this.startXY);this.fireEvent("dragstart",this,this.startXY);
},clearStart:function(){if(this.timer){clearTimeout(this.timer);delete this.timer;
}},stopSelect:function(A){A.stopEvent();return false;},onBeforeStart:function(A){},onStart:function(A){},onDrag:function(A){},onEnd:function(A){},getDragTarget:function(){return this.dragTarget;
},getDragCt:function(){return this.el;},getXY:function(A){return A?this.constrainModes[A].call(this,this.lastXY):this.lastXY;
},getOffset:function(C){var B=this.getXY(C);var A=this.startXY;return[A[0]-B[0],A[1]-B[1]];
},constrainModes:{point:function(B){if(!this.elRegion){this.elRegion=this.getDragCt().getRegion();
}var A=this.dragRegion;A.left=B[0];A.top=B[1];A.right=B[0];A.bottom=B[1];A.constrainTo(this.elRegion);
return[A.left,A.top];}}});Ext.dd.ScrollManager=function(){var G=Ext.dd.DragDropMgr;
var I={};var F=null;var B={};var A=function(K){F=null;E();};var C=function(){if(G.dragCurrent){G.refreshCache(G.dragCurrent.groups);
}};var H=function(){if(G.dragCurrent){var K=Ext.dd.ScrollManager;var L=B.el.ddScrollConfig?B.el.ddScrollConfig.increment:K.increment;
if(!K.animate){if(B.el.scroll(B.dir,L)){C();}}else{B.el.scroll(B.dir,L,true,K.animDuration,C);
}}};var E=function(){if(B.id){clearInterval(B.id);}B.id=0;B.el=null;B.dir="";};var J=function(L,K){E();
B.el=L;B.dir=K;var M=(L.ddScrollConfig&&L.ddScrollConfig.frequency)?L.ddScrollConfig.frequency:Ext.dd.ScrollManager.frequency;
B.id=setInterval(H,M);};var D=function(N,P){if(P||!G.dragCurrent){return;}var Q=Ext.dd.ScrollManager;
if(!F||F!=G.dragCurrent){F=G.dragCurrent;Q.refreshCache();}var R=Ext.lib.Event.getXY(N);
var S=new Ext.lib.Point(R[0],R[1]);for(var L in I){var M=I[L],K=M._region;var O=M.ddScrollConfig?M.ddScrollConfig:Q;
if(K&&K.contains(S)&&M.isScrollable()){if(K.bottom-S.y<=O.vthresh){if(B.el!=M){J(M,"down");
}return;}else{if(K.right-S.x<=O.hthresh){if(B.el!=M){J(M,"left");}return;}else{if(S.y-K.top<=O.vthresh){if(B.el!=M){J(M,"up");
}return;}else{if(S.x-K.left<=O.hthresh){if(B.el!=M){J(M,"right");}return;}}}}}}E();
};G.fireEvents=G.fireEvents.createSequence(D,G);G.stopDrag=G.stopDrag.createSequence(A,G);
return{register:function(M){if(Ext.isArray(M)){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(Ext.isArray(M)){for(var L=0,K=M.length;
L<K;L++){this.unregister(M[L]);}}else{M=Ext.get(M);delete I[M.id];}},vthresh:25,hthresh: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 B={};var A=0;var C=function(F,G){if(typeof F=="string"){return F;
}var E=F.id;if(!E&&G!==false){E="extdd-"+(++A);F.id=E;}return E;};return{register:function(G,H){H=H||{};
if(typeof G=="string"){G=document.getElementById(G);}H.ddel=G;D[C(G)]=H;if(H.isHandle!==false){B[H.ddel.id]=H;
}if(H.handles){var E=H.handles;for(var F=0,I=E.length;F<I;F++){B[C(E[F])]=H;}}},unregister:function(F){var H=C(F,false);
var G=D[H];if(G){delete D[H];if(G.handles){var E=G.handles;for(var J=0,I=E.length;
J<I;J++){delete B[C(E[J],false)];}}}},getHandle:function(E){if(typeof E!="string"){E=E.id;
}return B[E];},getHandleFromEvent:function(E){var F=Ext.lib.Event.getTarget(E);return F?B[F.id]:null;
},getTarget:function(E){if(typeof E!="string"){E=E.id;}return D[E];},getTargetFromEvent:function(E){var F=Ext.lib.Event.getTarget(E);
return F?D[F.id]||B[F.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);}var B=this.ghost.dom.firstChild;
if(B){Ext.fly(B).setStyle("float","none");}},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(B,C,A){this.callback=C;
this.scope=A;if(B&&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:B,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(B,A){this.el=Ext.get(B);
if(!this.dragData){this.dragData={};}Ext.apply(this,A);if(!this.proxy){this.proxy=new Ext.dd.StatusProxy();
}Ext.dd.DragSource.superclass.constructor.call(this,this.el.dom,this.ddGroup||this.group,{dragElId:this.proxy.id,resizeFrame:false,isTarget:false,scroll:this.scroll===true});
this.dragging=false;};Ext.extend(Ext.dd.DragSource,Ext.dd.DDProxy,{dropAllowed:"x-dd-drop-ok",dropNotAllowed:"x-dd-drop-nodrop",getDragData:function(A){return this.dragData;
},onDragEnter:function(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(B,A,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(B,A,C){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(B,A,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);
}}delete this.cachedTarget;},beforeDragDrop:function(B,A,C){return true;},onValidDrop:function(B,A,C){this.hideProxy();
if(this.afterValidDrop){this.afterValidDrop(B,A,C);}},getRepairXY:function(B,A){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(B,A,C){return true;},handleMouseDown:function(B){if(this.dragging){return;
}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);
}},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(A,B){},autoOffset:function(A,B){this.setDelta(-12,-20);}});Ext.dd.DropTarget=function(B,A){this.el=Ext.get(B);
Ext.apply(this,A);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(A,C,B){return false;}});Ext.dd.DragZone=function(B,A){Ext.dd.DragZone.superclass.constructor.call(this,B,A);
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(B,A){Ext.dd.DropZone.superclass.constructor.call(this,B,A);
};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,C,B){},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(A,C,B){var D=this.getTargetFromEvent(C);if(!D){if(this.lastOverNode){this.onNodeOut(this.lastOverNode,A,C,B);
this.lastOverNode=null;}return this.onContainerOver(A,C,B);}if(this.lastOverNode!=D){if(this.lastOverNode){this.onNodeOut(this.lastOverNode,A,C,B);
}this.onNodeEnter(D,A,C,B);this.lastOverNode=D;}return this.onNodeOver(D,A,C,B);},notifyOut:function(A,C,B){if(this.lastOverNode){this.onNodeOut(this.lastOverNode,A,C,B);
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.Element.addMethods({initDD:function(C,B,D){var A=new Ext.dd.DD(Ext.id(this.dom),C,B);
return Ext.apply(A,D);},initDDProxy:function(C,B,D){var A=new Ext.dd.DDProxy(Ext.id(this.dom),C,B);
return Ext.apply(A,D);},initDDTarget:function(C,B,D){var A=new Ext.dd.DDTarget(Ext.id(this.dom),C,B);
return Ext.apply(A,D);}});Ext.data.Api=(function(){var A={};return{actions:{create:"create",read:"read",update:"update",destroy:"destroy"},restActions:{create:"POST",read:"GET",update:"PUT",destroy:"DELETE"},isAction:function(B){return(Ext.data.Api.actions[B])?true:false;
},getVerb:function(B){if(A[B]){return A[B];}for(var C in this.actions){if(this.actions[C]===B){A[B]=C;
break;}}return(A[B]!==undefined)?A[B]:null;},isValid:function(B){var E=[];var D=this.actions;
for(var C in B){if(!(C in D)){E.push(C);}}return(!E.length)?true:E;},hasUniqueUrl:function(D,B){var C=(D.api[B])?D.api[B].url:null;
var F=true;for(var E in D.api){if((F=(E===B)?true:(D.api[E].url!=C)?true:false)===false){break;
}}return F;},prepare:function(B){if(!B.api){B.api={};}for(var D in this.actions){var C=this.actions[D];
B.api[C]=B.api[C]||B.url||B.directFn;if(typeof(B.api[C])=="string"){B.api[C]={url:B.api[C]};
}}},restify:function(B){B.restful=true;for(var C in this.restActions){B.api[this.actions[C]].method=this.restActions[C];
}}};})();Ext.data.Api.Error=Ext.extend(Ext.Error,{constructor:function(B,A){this.arg=A;
Ext.Error.call(this,B);},name:"Ext.data.Api"});Ext.apply(Ext.data.Api.Error.prototype,{lang:{"action-url-undefined":"No fallback url defined for this action.  When defining a DataProxy api, please be sure to define an url for each CRUD action in Ext.data.Api.actions or define a default url in addition to your api-configuration.",invalid:"received an invalid API-configuration.  Please ensure your proxy API-configuration contains only the actions defined in Ext.data.Api.actions","invalid-url":"Invalid url.  Please review your proxy configuration.",execute:'Attempted to execute an unknown action.  Valid API actions are defined in Ext.data.Api.actions"'}});
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(Ext.isDate(A)){return A.getTime();}return Date.parse(String(A));},asFloat:function(A){var B=parseFloat(String(A).replace(/,/g,""));
return isNaN(B)?0:B;},asInt:function(A){var B=parseInt(String(A).replace(/,/g,""),10);
return isNaN(B)?0:B;}};Ext.data.Record=function(A,B){this.id=(B||B===0)?B:Ext.data.Record.id(this);
this.data=A||{};};Ext.data.Record.create=function(E){var C=Ext.extend(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.PREFIX="ext-record";Ext.data.Record.AUTO_ID=1;Ext.data.Record.EDIT="edit";
Ext.data.Record.REJECT="reject";Ext.data.Record.COMMIT="commit";Ext.data.Record.id=function(A){A.phantom=true;
return[Ext.data.Record.PREFIX,"-",Ext.data.Record.AUTO_ID++].join("");};Ext.data.Record.prototype={dirty:false,editing:false,error:null,modified:null,phantom:false,join:function(A){this.store=A;
},set:function(B,C){var A=(typeof C==="object");if(!A&&String(this.data[B])===String(C)){return;
}else{if(A&&Ext.encode(this.data[B])===Ext.encode(C)){return;}}this.dirty=true;if(!this.modified){this.modified={};
}if(typeof this.modified[B]=="undefined"){this.modified[B]=this.data[B];}this.data[B]=C;
if(!this.editing){this.afterEdit();}},afterEdit:function(){if(this.store){this.store.afterEdit(this);
}},afterReject:function(){if(this.store){this.store.afterReject(this);}},afterCommit:function(){if(this.store){this.store.afterCommit(this);
}},get:function(A){return this.data[A];},beginEdit:function(){this.editing=true;this.modified=this.modified||{};
},cancelEdit:function(){this.editing=false;delete this.modified;},endEdit:function(){this.editing=false;
if(this.dirty){this.afterEdit();}},reject:function(B){var A=this.modified;for(var C in A){if(typeof A[C]!="function"){this.data[C]=A[C];
}}this.dirty=false;delete this.modified;this.editing=false;if(B!==true){this.afterReject();
}},commit:function(A){this.dirty=false;delete this.modified;this.editing=false;if(A!==true){this.afterCommit();
}},getChanges:function(){var A=this.modified,B={};for(var C in A){if(A.hasOwnProperty(C)){B[C]=this.data[C];
}}return B;},hasError:function(){return this.error!==null;},clearError:function(){this.error=null;
},copy:function(A){return new this.constructor(Ext.apply({},this.data),A||this.id);
},isModified:function(A){return !!(this.modified&&this.modified.hasOwnProperty(A));
},isValid:function(){return this.fields.find(function(A){return(A.allowBlank===false&&Ext.isEmpty(this.data[A.name]))?true:false;
},this)?false:true;},markDirty:function(){this.dirty=true;if(!this.modified){this.modified={};
}this.fields.each(function(A){this.modified[A.name]=this.data[A.name];},this);}};
Ext.StoreMgr=Ext.apply(new Ext.util.MixedCollection(),{register:function(){for(var A=0,B;
(B=arguments[A]);A++){this.add(B);}},unregister:function(){for(var A=0,B;(B=arguments[A]);
A++){this.remove(this.lookup(B));}},lookup:function(E){if(Ext.isArray(E)){var B=["field1"],D=!Ext.isArray(E[0]);
if(!D){for(var C=2,A=E[0].length;C<=A;++C){B.push("field"+C);}}return new Ext.data.ArrayStore({fields:B,data:E,expandData:D,autoDestroy:true,autoCreated:true});
}return Ext.isObject(E)?(E.events?E:Ext.create(E,"store")):this.get(E);},getKey:function(A){return A.storeId;
}});Ext.data.Store=function(A){this.data=new Ext.util.MixedCollection(false);this.data.getKey=function(B){return B.id;
};this.baseParams={};this.removed=[];if(A&&A.data){this.inlineData=A.data;delete A.data;
}Ext.apply(this,A);this.paramNames=Ext.applyIf(this.paramNames||{},this.defaultParamNames);
if(this.url&&!this.proxy){this.proxy=new Ext.data.HttpProxy({url:this.url});}if(this.restful===true&&this.proxy){this.batch=false;
Ext.data.Api.restify(this.proxy);}if(this.reader){if(!this.recordType){this.recordType=this.reader.recordType;
}if(this.reader.onMetaChange){this.reader.onMetaChange=this.onMetaChange.createDelegate(this);
}if(this.writer){this.writer.meta=this.reader.meta;this.pruneModifiedRecords=true;
}}if(this.recordType){this.fields=this.recordType.prototype.fields;}this.modified=[];
this.addEvents("datachanged","metachange","add","remove","update","clear","exception","beforeload","load","loadexception","beforewrite","write");
if(this.proxy){this.relayEvents(this.proxy,["loadexception","exception"]);}if(this.writer){this.on({scope:this,add:this.createRecords,remove:this.destroyRecord,update:this.updateRecord});
}this.sortToggle={};if(this.sortField){this.setDefaultSort(this.sortField,this.sortDir);
}else{if(this.sortInfo){this.setDefaultSort(this.sortInfo.field,this.sortInfo.direction);
}}Ext.data.Store.superclass.constructor.call(this);if(this.id){this.storeId=this.id;
delete this.id;}if(this.storeId){Ext.StoreMgr.register(this);}if(this.inlineData){this.loadData(this.inlineData);
delete this.inlineData;}else{if(this.autoLoad){this.load.defer(10,this,[typeof this.autoLoad=="object"?this.autoLoad:undefined]);
}}};Ext.extend(Ext.data.Store,Ext.util.Observable,{writer:undefined,remoteSort:false,autoDestroy:false,pruneModifiedRecords:false,lastOptions:null,autoSave:true,batch:true,restful:false,paramNames:undefined,defaultParamNames:{start:"start",limit:"limit",sort:"sort",dir:"dir"},destroy:function(){if(this.storeId){Ext.StoreMgr.unregister(this);
}this.data=null;Ext.destroy(this.proxy);this.reader=this.writer=null;this.purgeListeners();
},add:function(B){B=[].concat(B);if(B.length<1){return;}for(var D=0,A=B.length;D<A;
D++){B[D].join(this);}var C=this.data.length;this.data.addAll(B);if(this.snapshot){this.snapshot.addAll(B);
}this.fireEvent("add",this,B,C);},addSorted:function(A){var B=this.findInsertIndex(A);
this.insert(B,A);},remove:function(A){var B=this.data.indexOf(A);if(B>-1){this.data.removeAt(B);
if(this.pruneModifiedRecords){this.modified.remove(A);}if(this.snapshot){this.snapshot.remove(A);
}this.fireEvent("remove",this,A,B);}},removeAt:function(A){this.remove(this.getAt(A));
},removeAll:function(){this.data.clear();if(this.snapshot){this.snapshot.clear();
}if(this.pruneModifiedRecords){this.modified=[];}this.fireEvent("clear",this);},insert:function(C,B){B=[].concat(B);
for(var D=0,A=B.length;D<A;D++){this.data.insert(C,B[D]);B[D].join(this);}this.fireEvent("add",this,B,C);
},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||{};this.storeOptions(B);
if(this.sortInfo&&this.remoteSort){var A=this.paramNames;B.params=B.params||{};B.params[A.sort]=this.sortInfo.field;
B.params[A.dir]=this.sortInfo.direction;}try{return this.execute("read",null,B);}catch(C){this.handleException(C);
return false;}},updateRecord:function(B,A,C){if(C==Ext.data.Record.EDIT&&this.autoSave===true&&(!A.phantom||(A.phantom&&A.isValid))){this.save();
}},createRecords:function(C,B,D){for(var E=0,A=B.length;E<A;E++){if(B[E].phantom&&B[E].isValid()){B[E].markDirty();
this.modified.push(B[E]);}}if(this.autoSave===true){this.save();}},destroyRecord:function(B,A,C){if(this.modified.indexOf(A)!=-1){this.modified.remove(A);
}if(!A.phantom){this.removed.push(A);A.lastIndex=C;if(this.autoSave===true){this.save();
}}},execute:function(D,A,B){if(!Ext.data.Api.isAction(D)){throw new Ext.data.Api.Error("execute",D);
}B=Ext.applyIf(B||{},{params:{}});var C=true;if(D==="read"){C=this.fireEvent("beforeload",this,B);
}else{if(this.writer.listful===true&&this.restful!==true){A=(Ext.isArray(A))?A:[A];
}else{if(Ext.isArray(A)&&A.length==1){A=A.shift();}}if((C=this.fireEvent("beforewrite",this,D,A,B))!==false){this.writer.write(D,B.params,A);
}}if(C!==false){var E=Ext.apply({},B.params,this.baseParams);if(this.writer&&this.proxy.url&&!this.proxy.restful&&!Ext.data.Api.hasUniqueUrl(this.proxy,D)){E.xaction=D;
}this.proxy.request(Ext.data.Api.actions[D],A,E,this.reader,this.createCallback(D,A),this,B);
}return C;},save:function(){if(!this.writer){throw new Ext.data.Store.Error("writer-undefined");
}if(this.removed.length){this.doTransaction("destroy",this.removed);}var A=[].concat(this.getModifiedRecords());
if(!A.length){return true;}var C=[];for(var B=A.length-1;B>=0;B--){if(A[B].phantom===true){var D=A.splice(B,1).shift();
if(D.isValid()){C.push(D);}}else{if(!A[B].isValid()){A.splice(B,1);}}}if(C.length){this.doTransaction("create",C);
}if(A.length){this.doTransaction("update",A);}return true;},doTransaction:function(D,B){function E(F){try{this.execute(D,F);
}catch(G){this.handleException(G);}}if(this.batch===false){for(var C=0,A=B.length;
C<A;C++){E.call(this,B[C]);}}else{E.call(this,B);}},createCallback:function(B,A){var C=Ext.data.Api.actions;
return(B=="read")?this.loadRecords:function(F,E,D){this["on"+Ext.util.Format.capitalize(B)+"Records"](D,A,F);
if(D===true){this.fireEvent("write",this,B,F,E,A);}};},clearModified:function(A){if(Ext.isArray(A)){for(var B=A.length-1;
B>=0;B--){this.modified.splice(this.modified.indexOf(A[B]),1);}}else{this.modified.splice(this.modified.indexOf(A),1);
}},reMap:function(B){if(Ext.isArray(B)){for(var D=0,A=B.length;D<A;D++){this.reMap(B[D]);
}}else{delete this.data.map[B._phid];this.data.map[B.id]=B;var C=this.data.keys.indexOf(B._phid);
this.data.keys.splice(C,1,B.id);delete B._phid;}},onCreateRecords:function(D,A,B){if(D===true){try{this.reader.realize(A,B);
this.reMap(A);}catch(C){this.handleException(C);if(Ext.isArray(A)){this.onCreateRecords(D,A,B);
}}}},onUpdateRecords:function(D,A,B){if(D===true){try{this.reader.update(A,B);}catch(C){this.handleException(C);
if(Ext.isArray(A)){this.onUpdateRecords(D,A,B);}}}},onDestroyRecords:function(E,B,D){B=(B instanceof Ext.data.Record)?[B]:B;
for(var C=0,A=B.length;C<A;C++){this.removed.splice(this.removed.indexOf(B[C]),1);
}if(E===false){for(C=B.length-1;C>=0;C--){this.insert(B[C].lastIndex,B[C]);}}},handleException:function(A){Ext.handleError(A);
},reload:function(A){this.load(Ext.applyIf(A||{},this.lastOptions));},loadRecords:function(A,C,G){if(!A||G===false){if(G!==false){this.fireEvent("load",this,[],C);
}if(C.callback){C.callback.call(C.scope||this,[],C,false,A);}return;}var F=A.records,E=A.totalRecords||F.length;
if(!C||C.add!==true){if(this.pruneModifiedRecords){this.modified=[];}for(var D=0,B=F.length;
D<B;D++){F[D].join(this);}if(this.snapshot){this.data=this.snapshot;delete this.snapshot;
}this.data.clear();this.data.addAll(F);this.totalLength=E;this.applySort();this.fireEvent("datachanged",this);
}else{this.totalLength=Math.max(E,this.data.length+F.length);this.add(F);}this.fireEvent("load",this,F,C);
if(C.callback){C.callback.call(C.scope||this,F,C,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 A=this.sortInfo,B=A.field;
this.sortData(B,A.direction);}},sortData:function(C,D){D=D||"ASC";var A=this.fields.get(C).sortType;
var B=function(F,H){var G=A(F.data[C]),E=A(H.data[C]);return G>E?1:(G<E?-1:0);};this.data.sort(D,B);
if(this.snapshot&&this.snapshot!=this.data){this.snapshot.sort(D,B);}},setDefaultSort:function(B,A){A=A?A.toUpperCase():"ASC";
this.sortInfo={field:B,direction:A};this.sortToggle[B]=A;},sort:function(E,C){var D=this.fields.get(E);
if(!D){return false;}if(!C){if(this.sortInfo&&this.sortInfo.field==D.name){C=(this.sortToggle[D.name]||"ASC").toggle("ASC","DESC");
}else{C=D.sortDir;}}var B=(this.sortToggle)?this.sortToggle[D.name]:null;var A=(this.sortInfo)?this.sortInfo:null;
this.sortToggle[D.name]=C;this.sortInfo={field:D.name,direction:C};if(!this.remoteSort){this.applySort();
this.fireEvent("datachanged",this);}else{if(!this.load(this.lastOptions)){if(B){this.sortToggle[D.name]=B;
}if(A){this.sortInfo=A;}}}},each:function(B,A){this.data.each(B,A);},getModifiedRecords:function(){return this.modified;
},createFilterFn:function(C,B,D,A){if(Ext.isEmpty(B,false)){return false;}B=this.data.createValueMatcher(B,D,A);
return function(E){return B.test(E.data[C]);};},sum:function(E,F,A){var C=this.data.items,B=0;
F=F||0;A=(A||A===0)?A:C.length-1;for(var D=F;D<=A;D++){B+=(C[D].data[E]||0);}return B;
},filter:function(D,C,E,A){var B=this.createFilterFn(D,C,E,A);return B?this.filterBy(B):this.clearFilter();
},filterBy:function(B,A){this.snapshot=this.snapshot||this.data;this.data=this.queryBy(B,A||this);
this.fireEvent("datachanged",this);},query:function(D,C,E,A){var B=this.createFilterFn(D,C,E,A);
return B?this.queryBy(B):this.data.clone();},queryBy:function(B,A){var C=this.snapshot||this.data;
return C.filterBy(B,A||this);},find:function(D,C,F,E,A){var B=this.createFilterFn(D,C,E,A);
return B?this.data.findIndexBy(B,null,F):-1;},findExact:function(B,A,C){return this.data.findIndexBy(function(D){return D.get(B)===A;
},this,C);},findBy:function(B,A,C){return this.data.findIndexBy(B,A,C);},collect:function(B,C,G){var A=(G===true&&this.snapshot)?this.snapshot.items:this.data.items;
var D,E,F=[],H={};for(var I=0,J=A.length;I<J;I++){D=A[I].data[B];E=String(D);if((C||!Ext.isEmpty(D))&&!H[E]){H[E]=true;
F[F.length]=D;}}return F;},clearFilter:function(A){if(this.isFiltered()){this.data=this.snapshot;
delete this.snapshot;if(A!==true){this.fireEvent("datachanged",this);}}},isFiltered:function(){return this.snapshot&&this.snapshot!=this.data;
},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();}},onMetaChange:function(B,A,C){this.recordType=A;
this.fields=A.prototype.fields;delete this.snapshot;if(B.sortInfo){this.sortInfo=B.sortInfo;
}else{if(this.sortInfo&&!this.fields.get(this.sortInfo.field)){delete this.sortInfo;
}}this.modified=[];this.fireEvent("metachange",this,this.reader.meta);},findInsertIndex:function(A){this.suspendEvents();
var C=this.data.clone();this.data.add(A);this.applySort();var B=this.data.indexOf(A);
this.data=C;this.resumeEvents();return B;},setBaseParam:function(A,B){this.baseParams=this.baseParams||{};
this.baseParams[A]=B;}});Ext.reg("store",Ext.data.Store);Ext.data.Store.Error=Ext.extend(Ext.Error,{name:"Ext.data.Store"});
Ext.apply(Ext.data.Store.Error.prototype,{lang:{"writer-undefined":"Attempted to execute a write-action without a DataWriter installed."}});
Ext.data.Field=function(D){if(typeof D=="string"){D={name:D};}Ext.apply(this,D);if(!this.type){this.type="auto";
}var C=Ext.data.SortTypes;if(typeof this.sortType=="string"){this.sortType=C[this.sortType];
}if(!this.sortType){switch(this.type){case"string":this.sortType=C.asUCString;break;
case"date":this.sortType=C.asDate;break;default:this.sortType=C.none;}}var E=/[\$,%]/g;
if(!this.convert){var B,A=this.dateFormat;switch(this.type){case"":case"auto":case undefined:B=function(F){return F;
};break;case"string":B=function(F){return(F===undefined||F===null)?"":String(F);};
break;case"int":B=function(F){return F!==undefined&&F!==null&&F!==""?parseInt(String(F).replace(E,""),10):"";
};break;case"float":B=function(F){return F!==undefined&&F!==null&&F!==""?parseFloat(String(F).replace(E,""),10):"";
};break;case"bool":case"boolean":B=function(F){return F===true||F==="true"||F==1;
};break;case"date":B=function(F){if(!F){return"";}if(Ext.isDate(F)){return F;}if(A){if(A=="timestamp"){return new Date(F*1000);
}if(A=="time"){return new Date(parseInt(F,10));}return Date.parseDate(F,A);}var G=Date.parse(F);
return G?new Date(G):null;};break;}this.convert=B;}};Ext.data.Field.prototype={dateFormat:null,defaultValue:"",mapping:null,sortType:null,sortDir:"ASC",allowBlank:true};
Ext.data.DataReader=function(A,B){this.meta=A;this.recordType=Ext.isArray(B)?Ext.data.Record.create(B):B;
};Ext.data.DataReader.prototype={buildExtractors:Ext.emptyFn,realize:function(B,D){if(Ext.isArray(B)){for(var C=B.length-1;
C>=0;C--){if(Ext.isArray(D)){this.realize(B.splice(C,1).shift(),D.splice(C,1).shift());
}else{this.realize(B.splice(C,1).shift(),D);}}}else{if(Ext.isArray(D)&&D.length==1){D=D.shift();
}if(!this.isData(D)){throw new Ext.data.DataReader.Error("realize",B);}this.buildExtractors();
var A=this.extractValues(D,B.fields.items,B.fields.items.length);B.phantom=false;
B._phid=B.id;B.id=D[this.meta.idProperty];B.data=A;B.commit();}},update:function(A,C){if(Ext.isArray(A)){for(var B=A.length-1;
B>=0;B--){if(Ext.isArray(C)){this.update(A.splice(B,1).shift(),C.splice(B,1).shift());
}else{this.update(A.splice(B,1).shift(),C);}}}else{if(Ext.isArray(C)&&C.length==1){C=C.shift();
}if(!this.isData(C)){A.commit();throw new Ext.data.DataReader.Error("update",A);}this.buildExtractors();
A.data=this.extractValues(Ext.apply(A.data,C),A.fields.items,A.fields.items.length);
A.commit();}},isData:function(A){return(A&&Ext.isObject(A)&&!Ext.isEmpty(A[this.meta.idProperty]))?true:false;
}};Ext.data.DataReader.Error=Ext.extend(Ext.Error,{constructor:function(B,A){this.arg=A;
Ext.Error.call(this,B);},name:"Ext.data.DataReader"});Ext.apply(Ext.data.DataReader.Error.prototype,{lang:{update:"#update received invalid data from server.  Please see docs for DataReader#update and review your DataReader configuration.",realize:"#realize was called with invalid remote-data.  Please see the docs for DataReader#realize and review your DataReader configuration.","invalid-response":"#readResponse received an invalid response from the server."}});
Ext.data.DataWriter=function(A){Ext.apply(this,A);};Ext.data.DataWriter.prototype={writeAllFields:false,listful:false,write:function(B,C,A){this.render(B,A,C,this[B](A));
},render:Ext.emptyFn,update:function(A){var D={};if(Ext.isArray(A)){var C=[],B=[];
Ext.each(A,function(E){B.push(E.id);C.push(this.updateRecord(E));},this);D[this.meta.idProperty]=B;
D[this.meta.root]=C;}else{if(A instanceof Ext.data.Record){D[this.meta.idProperty]=A.id;
D[this.meta.root]=this.updateRecord(A);}}return D;},updateRecord:Ext.emptyFn,create:function(A){var C={};
if(Ext.isArray(A)){var B=[];Ext.each(A,function(D){B.push(this.createRecord(D));},this);
C[this.meta.root]=B;}else{if(A instanceof Ext.data.Record){C[this.meta.root]=this.createRecord(A);
}}return C;},createRecord:Ext.emptyFn,destroy:function(A){var D={};if(Ext.isArray(A)){var C=[],B=[];
Ext.each(A,function(E){C.push(this.destroyRecord(E));},this);D[this.meta.root]=C;
}else{if(A instanceof Ext.data.Record){D[this.meta.root]=this.destroyRecord(A);}}return D;
},destroyRecord:Ext.emptyFn,toHash:function(E){var D=E.fields.map,C={},B=(this.writeAllFields===false&&E.phantom===false)?E.getChanges():E.data,A;
Ext.iterate(B,function(F,G){if((A=D[F])){C[A.mapping?A.mapping:A.name]=G;}});C[this.meta.idProperty]=E.id;
return C;}};Ext.data.DataProxy=function(A){A=A||{};this.api=A.api;this.url=A.url;
this.restful=A.restful;this.listeners=A.listeners;this.prettyUrls=A.prettyUrls;try{Ext.data.Api.prepare(this);
}catch(B){if(B instanceof Ext.data.Api.Error){B.toConsole();}}this.addEvents("exception","beforeload","load","loadexception","beforewrite","write");
Ext.data.DataProxy.superclass.constructor.call(this);};Ext.extend(Ext.data.DataProxy,Ext.util.Observable,{restful:false,setApi:function(){if(arguments.length==1){var A=Ext.data.Api.isValid(arguments[0]);
if(A===true){this.api=arguments[0];}else{throw new Ext.data.Api.Error("invalid",A);
}}else{if(arguments.length==2){if(!Ext.data.Api.isAction(arguments[0])){throw new Ext.data.Api.Error("invalid",arguments[0]);
}this.api[arguments[0]]=arguments[1];}}Ext.data.Api.prepare(this);},isApiAction:function(A){return(this.api[A])?true:false;
},request:function(F,C,G,B,A,E,D){if(!this.api[F]&&!this.load){throw new Ext.data.DataProxy.Error("action-undefined",F);
}G=G||{};if((F===Ext.data.Api.actions.read)?this.fireEvent("beforeload",this,G):this.fireEvent("beforewrite",this,F,C,G)!==false){this.doRequest.apply(this,arguments);
}else{A.call(E||this,null,D,false);}},load:null,doRequest:function(F,C,G,B,A,E,D){this.load(G,B,A,E,D);
},buildUrl:function(D,B){B=B||null;var C=(this.api[D])?this.api[D].url:this.url;if(!C){throw new Ext.data.Api.Error("invalid-url",D);
}var E=null;var A=C.match(/(.*)(\.\w+)$/);if(A){E=A[2];C=A[1];}if((this.prettyUrls===true||this.restful===true)&&B instanceof Ext.data.Record&&!B.phantom){C+="/"+B.id;
}if(E){C+=E;}return C;},destroy:function(){this.purgeListeners();}});Ext.data.DataProxy.Error=Ext.extend(Ext.Error,{constructor:function(B,A){this.arg=A;
Ext.Error.call(this,B);},name:"Ext.data.DataProxy"});Ext.apply(Ext.data.DataProxy.Error.prototype,{lang:{"action-undefined":"DataProxy attempted to execute an API-action but found an undefined url / function.  Please review your Proxy url/api-configuration.","api-invalid":"Recieved an invalid API-configuration.  Please ensure your proxy API-configuration contains only the actions from Ext.data.Api.actions."}});
Ext.data.ScriptTagProxy=function(A){Ext.apply(this,A);Ext.data.ScriptTagProxy.superclass.constructor.call(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,doRequest:function(K,L,J,A,C,D,E){var I=Ext.urlEncode(Ext.apply(J,this.extraParams));
var H=this.buildUrl(K,L);if(!H){throw new Ext.data.Api.Error("invalid-url",H);}H=Ext.urlAppend(H,I);
if(this.nocache){H=Ext.urlAppend(H,"_dc="+(new Date().getTime()));}var G=++Ext.data.ScriptTagProxy.TRANS_ID;
var F={id:G,action:K,cb:"stcCallback"+G,scriptId:"stcScript"+G,params:J,arg:E,url:H,callback:C,scope:D,reader:A};
window[F.cb]=this.createCallback(K,L,F);H+=String.format("&{0}={1}",this.callbackParam,F.cb);
if(this.autoAbort!==false){this.abort();}F.timeoutId=this.handleFailure.defer(this.timeout,this,[F]);
var B=document.createElement("script");B.setAttribute("src",H);B.setAttribute("type","text/javascript");
B.setAttribute("id",F.scriptId);this.head.appendChild(B);this.trans=F;},createCallback:function(D,B,C){var A=this;
return function(E){A.trans=false;A.destroyTrans(C,true);if(D===Ext.data.Api.actions.read){A.onRead.call(A,D,C,E);
}else{A.onWrite.call(A,D,C,E,B);}};},onRead:function(E,D,C){var B;try{B=D.reader.readRecords(C);
}catch(A){this.fireEvent("loadexception",this,D,C,A);this.fireEvent("exception",this,"response",E,D,C,A);
D.callback.call(D.scope||window,null,D.arg,false);return;}if(B.success===false){this.fireEvent("loadexception",this,D,C);
this.fireEvent("exception",this,"remote",E,D,C,null);}else{this.fireEvent("load",this,C,D.arg);
}D.callback.call(D.scope||window,B,D.arg,B.success);},onWrite:function(F,E,D,C){var B=E.reader;
try{B.readResponse(F,D);}catch(A){this.fireEvent("exception",this,"response",F,E,D,A);
E.callback.call(E.scope||window,null,D,false);return;}if(!D[B.meta.successProperty]===true){this.fireEvent("exception",this,"remote",F,E,D,C);
E.callback.call(E.scope||window,null,D,false);return;}this.fireEvent("write",this,F,D[B.meta.root],D,C,E.arg);
E.callback.call(E.scope||window,D[B.meta.root],D,true);},isLoading:function(){return this.trans?true:false;
},abort:function(){if(this.isLoading()){this.destroyTrans(this.trans);}},destroyTrans:function(B,A){this.head.removeChild(document.getElementById(B.scriptId));
clearTimeout(B.timeoutId);if(A){window[B.cb]=undefined;try{delete window[B.cb];}catch(C){}}else{window[B.cb]=function(){window[B.cb]=undefined;
try{delete window[B.cb];}catch(D){}};}},handleFailure:function(A){this.trans=false;
this.destroyTrans(A,false);if(A.action===Ext.data.Api.actions.read){this.fireEvent("loadexception",this,null,A.arg);
}this.fireEvent("exception",this,"response",A.action,{response:null,options:A.arg});
A.callback.call(A.scope||window,null,A.arg,false);},destroy:function(){this.abort();
Ext.data.ScriptTagProxy.superclass.destroy.call(this);}});Ext.data.HttpProxy=function(A){Ext.data.HttpProxy.superclass.constructor.call(this,A);
this.conn=A;this.conn.url=null;this.useAjax=!A||!A.events;var C=Ext.data.Api.actions;
this.activeRequest={};for(var B in C){this.activeRequest[C[B]]=undefined;}};Ext.extend(Ext.data.HttpProxy,Ext.data.DataProxy,{getConnection:function(){return this.useAjax?Ext.Ajax:this.conn;
},setUrl:function(A,B){this.conn.url=A;if(B===true){this.url=A;Ext.data.Api.prepare(this);
}},doRequest:function(H,F,B,E,D,G,C){var A={method:(this.api[H])?this.api[H]["method"]:undefined,request:{callback:D,scope:G,arg:C},reader:E,callback:this.createCallback(H,F),scope:this};
if(typeof(B[E.meta.root])==="object"){A.jsonData=B;}else{A.params=B||{};}if(this.conn.url===null){this.conn.url=this.buildUrl(H,F);
}else{if(this.restful===true&&F instanceof Ext.data.Record&&!F.phantom){this.conn.url+="/"+F.id;
}}if(this.useAjax){Ext.applyIf(A,this.conn);if(this.activeRequest[H]){}this.activeRequest[H]=Ext.Ajax.request(A);
}else{this.conn.request(A);}this.conn.url=null;},createCallback:function(B,A){return function(E,D,C){this.activeRequest[B]=undefined;
if(!D){if(B===Ext.data.Api.actions.read){this.fireEvent("loadexception",this,E,C);
}this.fireEvent("exception",this,"response",B,E,C);E.request.callback.call(E.request.scope,null,E.request.arg,false);
return;}if(B===Ext.data.Api.actions.read){this.onRead(B,E,C);}else{this.onWrite(B,E,C,A);
}};},onRead:function(E,A,C){var B;try{B=A.reader.read(C);}catch(F){this.fireEvent("loadexception",this,A,C,F);
this.fireEvent("exception",this,"response",E,A,C,F);A.request.callback.call(A.request.scope,null,A.request.arg,false);
return;}if(B.success===false){this.fireEvent("loadexception",this,A,C);var D=A.reader.readResponse(E,C);
this.fireEvent("exception",this,"remote",E,A,D,null);}else{this.fireEvent("load",this,A,A.request.arg);
}A.request.callback.call(A.request.scope,B,A.request.arg,B.success);},onWrite:function(G,B,E,D){var C=B.reader;
var F;try{F=C.readResponse(G,E);}catch(A){this.fireEvent("exception",this,"response",G,B,E,A);
B.request.callback.call(B.request.scope,null,B.request.arg,false);return;}if(F[C.meta.successProperty]===false){this.fireEvent("exception",this,"remote",G,B,F,D);
}else{this.fireEvent("write",this,G,F[C.meta.root],F,D,B.request.arg);}B.request.callback.call(B.request.scope,F[C.meta.root],F,F[C.meta.successProperty]);
},destroy:function(){if(!this.useAjax){this.conn.abort();}else{if(this.activeRequest){var B=Ext.data.Api.actions;
for(var A in B){if(this.activeRequest[B[A]]){Ext.Ajax.abort(this.activeRequest[B[A]]);
}}}}Ext.data.HttpProxy.superclass.destroy.call(this);}});Ext.data.MemoryProxy=function(B){var A={};
A[Ext.data.Api.actions.read]=true;Ext.data.MemoryProxy.superclass.constructor.call(this,{api:A});
this.data=B;};Ext.extend(Ext.data.MemoryProxy,Ext.data.DataProxy,{doRequest:function(F,G,E,H,A,B,C){E=E||{};
var D;try{D=H.readRecords(this.data);}catch(I){this.fireEvent("loadexception",this,null,C,I);
this.fireEvent("exception",this,"response",F,C,null,I);A.call(B,null,C,false);return;
}A.call(B,D,C,true);}});Ext.data.JsonWriter=function(A){Ext.data.JsonWriter.superclass.constructor.call(this,A);
if(this.returnJson!=undefined){this.encode=this.returnJson;}};Ext.extend(Ext.data.JsonWriter,Ext.data.DataWriter,{returnJson:undefined,encode:true,render:function(C,A,D,B){Ext.apply(D,B);
if(this.encode===true){if(Ext.isArray(A)&&B[this.meta.idProperty]){D[this.meta.idProperty]=Ext.encode(D[this.meta.idProperty]);
}D[this.meta.root]=Ext.encode(D[this.meta.root]);}},createRecord:function(A){return this.toHash(A);
},updateRecord:function(A){return this.toHash(A);},destroyRecord:function(A){return A.id;
}});Ext.data.JsonReader=function(A,B){A=A||{};Ext.applyIf(A,{idProperty:"id",successProperty:"success",totalProperty:"total"});
Ext.data.JsonReader.superclass.constructor.call(this,A,B||A.fields);};Ext.extend(Ext.data.JsonReader,Ext.data.DataReader,{read:function(A){var B=A.responseText;
var C=Ext.decode(B);if(!C){throw {message:"JsonReader.read: Json object not found"};
}return this.readRecords(C);},onMetaChange:function(A,C,B){},simpleAccess:function(B,A){return B[A];
},getJsonAccessor:function(){var A=/[\[\.]/;return function(C){try{return(A.test(C))?new Function("obj","return obj."+C):function(D){return D[C];
};}catch(B){}return Ext.emptyFn;};}(),readRecords:function(K){this.jsonData=K;if(K.metaData){delete this.ef;
this.meta=K.metaData;this.recordType=Ext.data.Record.create(K.metaData.fields);this.onMetaChange(this.meta,this.recordType,K);
}var E=this.meta,J=this.recordType,F=J.prototype.fields,D=F.items,A=F.length,B;this.buildExtractors();
var I=this.getRoot(K),H=I.length,G=H,C=true;if(E.totalProperty){B=parseInt(this.getTotal(K),10);
if(!isNaN(B)){G=B;}}if(E.successProperty){B=this.getSuccess(K);if(B===false||B==="false"){C=false;
}}var M=[];for(var N=0;N<H;N++){var L=I[N];var O=new J(this.extractValues(L,D,A),this.getId(L));
O.json=L;M[N]=O;}return{success:C,records:M,totalRecords:G};},buildExtractors:function(){if(this.ef){return;
}var D=this.meta,A=this.recordType,I=A.prototype.fields,C=I.items,B=I.length;if(D.totalProperty){this.getTotal=this.getJsonAccessor(D.totalProperty);
}if(D.successProperty){this.getSuccess=this.getJsonAccessor(D.successProperty);}this.getRoot=D.root?this.getJsonAccessor(D.root):function(J){return J;
};if(D.id||D.idProperty){var H=this.getJsonAccessor(D.id||D.idProperty);this.getId=function(K){var J=H(K);
return(J===undefined||J==="")?null:J;};}else{this.getId=function(){return null;};
}var G=[];for(var F=0;F<B;F++){I=C[F];var E=(I.mapping!==undefined&&I.mapping!==null)?I.mapping:I.name;
G.push(this.getJsonAccessor(E));}this.ef=G;},extractValues:function(A,E,B){var G,D={};
for(var F=0;F<B;F++){G=E[F];var C=this.ef[F](A);D[G.name]=G.convert((C!==undefined)?C:G.defaultValue,A);
}return D;},readResponse:function(B,A){var C=(A.responseText!==undefined)?Ext.decode(A.responseText):A;
if(!C){throw new Ext.data.JsonReader.Error("response");}if(Ext.isEmpty(C[this.meta.successProperty])){throw new Ext.data.JsonReader.Error("successProperty-response",this.meta.successProperty);
}if((B===Ext.data.Api.actions.create||B===Ext.data.Api.actions.update)){if(Ext.isEmpty(C[this.meta.root])){throw new Ext.data.JsonReader.Error("root-emtpy",this.meta.root);
}else{if(C[this.meta.root]===undefined){throw new Ext.data.JsonReader.Error("root-undefined-response",this.meta.root);
}}}this.ef=this.buildExtractors();return C;}});Ext.data.JsonReader.Error=Ext.extend(Ext.Error,{constructor:function(B,A){this.arg=A;
Ext.Error.call(this,B);},name:"Ext.data.JsonReader"});Ext.apply(Ext.data.JsonReader.Error.prototype,{lang:{response:"An error occurred while json-decoding your server response","successProperty-response":'Could not locate your "successProperty" in your server response.  Please review your JsonReader config to ensure the config-property "successProperty" matches the property in your server-response.  See the JsonReader docs.',"root-undefined-response":'Could not locate your "root" property in your server response.  Please review your JsonReader config to ensure the config-property "root" matches the property your server-response.  See the JsonReader docs.',"root-undefined-config":'Your JsonReader was configured without a "root" property.  Please review your JsonReader config and make sure to define the root property.  See the JsonReader docs.',"idProperty-undefined":'Your JsonReader was configured without an "idProperty"  Please review your JsonReader configuration and ensure the "idProperty" is set (e.g.: "id").  See the JsonReader docs.',"root-emtpy":'Data was expected to be returned by the server in the "root" property of the response.  Please review your JsonReader configuration to ensure the "root" property matches that returned in the server-response.  See JsonReader docs.'}});
Ext.data.ArrayReader=Ext.extend(Ext.data.JsonReader,{readRecords:function(E){this.arrayData=E;
var J=this.meta,P=J?Ext.num(J.idIndex,J.id):null,N=this.recordType,D=N.prototype.fields,B=[],Q;
if(!this.getRoot){this.getRoot=J.root?this.getJsonAccessor(J.root):function(S){return S;
};if(J.totalProperty){this.getTotal=this.getJsonAccessor(J.totalProperty);}}var G=this.getRoot(E);
for(var A=0;A<G.length;A++){var F=G[A];var M={};var L=((P||P===0)&&F[P]!==undefined&&F[P]!==""?F[P]:null);
for(var I=0,K=D.length;I<K;I++){var C=D.items[I];var H=C.mapping!==undefined&&C.mapping!==null?C.mapping:I;
Q=F[H]!==undefined?F[H]:C.defaultValue;Q=C.convert(Q,F);M[C.name]=Q;}var O=new N(M,L);
O.json=F;B[B.length]=O;}var R=B.length;if(J.totalProperty){Q=parseInt(this.getTotal(E),10);
if(!isNaN(Q)){R=Q;}}return{records:B,totalRecords:R};}});Ext.data.ArrayStore=Ext.extend(Ext.data.Store,{constructor:function(A){Ext.data.ArrayStore.superclass.constructor.call(this,Ext.apply(A,{reader:new Ext.data.ArrayReader(A)}));
},loadData:function(E,B){if(this.expandData===true){var D=[];for(var C=0,A=E.length;
C<A;C++){D[D.length]=[E[C]];}E=D;}Ext.data.ArrayStore.superclass.loadData.call(this,E,B);
}});Ext.reg("arraystore",Ext.data.ArrayStore);Ext.data.SimpleStore=Ext.data.ArrayStore;
Ext.reg("simplestore",Ext.data.SimpleStore);Ext.data.JsonStore=Ext.extend(Ext.data.Store,{constructor:function(A){Ext.data.JsonStore.superclass.constructor.call(this,Ext.apply(A,{reader:new Ext.data.JsonReader(A)}));
}});Ext.reg("jsonstore",Ext.data.JsonStore);Ext.data.DirectProxy=function(A){Ext.apply(this,A);
if(typeof this.paramOrder=="string"){this.paramOrder=this.paramOrder.split(/[\s,|]/);
}Ext.data.DirectProxy.superclass.constructor.call(this,A);};Ext.extend(Ext.data.DirectProxy,Ext.data.DataProxy,{paramOrder:undefined,paramsAsHash:true,directFn:undefined,doRequest:function(H,I,G,K,C,D,F){var B=[];
var A=this.api[H]||this.directFn;switch(H){case Ext.data.Api.actions.create:B.push(G[K.meta.root]);
break;case Ext.data.Api.actions.read:if(this.paramOrder){for(var J=0,L=this.paramOrder.length;
J<L;J++){B.push(G[this.paramOrder[J]]);}}else{if(this.paramsAsHash){B.push(G);}}break;
case Ext.data.Api.actions.update:B.push(G[K.meta.idProperty]);B.push(G[K.meta.root]);
break;case Ext.data.Api.actions.destroy:B.push(G[K.meta.root]);break;}var E={params:G||{},callback:C,scope:D,arg:F,reader:K};
B.push(this.createCallback(H,I,E),this);A.apply(window,B);},createCallback:function(C,A,B){return function(D,E){if(!E.status){if(C===Ext.data.Api.actions.read){this.fireEvent("loadexception",this,B,E,null);
}this.fireEvent("exception",this,"remote",C,B,E,null);B.callback.call(B.scope,null,B.arg,false);
return;}if(C===Ext.data.Api.actions.read){this.onRead(C,B,D,E);}else{this.onWrite(C,B,D,E,A);
}};},onRead:function(F,E,A,D){var B;try{B=E.reader.readRecords(A);}catch(C){this.fireEvent("loadexception",this,E,D,C);
this.fireEvent("exception",this,"response",F,E,D,C);E.callback.call(E.scope,null,E.arg,false);
return;}this.fireEvent("load",this,D,E.arg);E.callback.call(E.scope,B,E.arg,true);
},onWrite:function(E,D,A,C,B){this.fireEvent("write",this,E,A,C,B,D.arg);D.callback.call(D.scope,A,C,true);
}});Ext.data.DirectStore=function(A){A.batchTransactions=false;Ext.data.DirectStore.superclass.constructor.call(this,Ext.apply(A,{proxy:(typeof(A.proxy)=="undefined")?new Ext.data.DirectProxy(Ext.copyTo({},A,"paramOrder,paramsAsHash,directFn,api")):A.proxy,reader:(typeof(A.reader)=="undefined"&&typeof(A.fields)=="object")?new Ext.data.JsonReader(Ext.copyTo({},A,"totalProperty,root,idProperty"),A.fields):A.reader}));
};Ext.extend(Ext.data.DirectStore,Ext.data.Store,{});Ext.reg("directstore",Ext.data.DirectStore);
Ext.Direct=Ext.extend(Ext.util.Observable,{exceptions:{TRANSPORT:"xhr",PARSE:"parse",LOGIN:"login",SERVER:"exception"},constructor:function(){this.addEvents("event","exception");
this.transactions={};this.providers={};},addProvider:function(D){var B=arguments;
if(B.length>1){for(var C=0,A=B.length;C<A;C++){this.addProvider(B[C]);}return;}if(!D.events){D=new Ext.Direct.PROVIDERS[D.type](D);
}D.id=D.id||Ext.id();this.providers[D.id]=D;D.on("data",this.onProviderData,this);
D.on("exception",this.onProviderException,this);if(!D.isConnected()){D.connect();
}return D;},getProvider:function(A){return this.providers[A];},removeProvider:function(B){var A=B.id?B:this.providers[B.id];
A.un("data",this.onProviderData,this);A.un("exception",this.onProviderException,this);
delete this.providers[A.id];return A;},addTransaction:function(A){this.transactions[A.tid]=A;
return A;},removeTransaction:function(A){delete this.transactions[A.tid||A];return A;
},getTransaction:function(A){return this.transactions[A.tid||A];},onProviderData:function(D,C){if(Ext.isArray(C)){for(var B=0,A=C.length;
B<A;B++){this.onProviderData(D,C[B]);}return;}if(C.name&&C.name!="event"&&C.name!="exception"){this.fireEvent(C.name,C);
}else{if(C.type=="exception"){this.fireEvent("exception",C);}}this.fireEvent("event",C,D);
},createEvent:function(A,B){return new Ext.Direct.eventTypes[A.type](Ext.apply(A,B));
}});Ext.Direct=new Ext.Direct();Ext.Direct.TID=1;Ext.Direct.PROVIDERS={};Ext.Direct.Transaction=function(A){Ext.apply(this,A);
this.tid=++Ext.Direct.TID;this.retryCount=0;};Ext.Direct.Transaction.prototype={send:function(){this.provider.queueTransaction(this);
},retry:function(){this.retryCount++;this.send();},getProvider:function(){return this.provider;
}};Ext.Direct.Event=function(A){Ext.apply(this,A);};Ext.Direct.Event.prototype={status:true,getData:function(){return this.data;
}};Ext.Direct.RemotingEvent=Ext.extend(Ext.Direct.Event,{type:"rpc",getTransaction:function(){return this.transaction||Ext.Direct.getTransaction(this.tid);
}});Ext.Direct.ExceptionEvent=Ext.extend(Ext.Direct.RemotingEvent,{status:false,type:"exception"});
Ext.Direct.eventTypes={rpc:Ext.Direct.RemotingEvent,event:Ext.Direct.Event,exception:Ext.Direct.ExceptionEvent};
Ext.direct.Provider=Ext.extend(Ext.util.Observable,{priority:1,constructor:function(A){Ext.apply(this,A);
this.addEvents("connect","disconnect","data","exception");Ext.direct.Provider.superclass.constructor.call(this,A);
},isConnected:function(){return false;},connect:Ext.emptyFn,disconnect:Ext.emptyFn});
Ext.direct.JsonProvider=Ext.extend(Ext.direct.Provider,{parseResponse:function(A){if(!Ext.isEmpty(A.responseText)){if(typeof A.responseText=="object"){return A.responseText;
}return Ext.decode(A.responseText);}return null;},getEvents:function(B){var G=null;
try{G=this.parseResponse(B);}catch(A){var F=new Ext.Direct.ExceptionEvent({data:A,xhr:B,code:Ext.Direct.exceptions.PARSE,message:"Error parsing json response: \n\n "+G});
return[F];}var E=[];if(Ext.isArray(G)){for(var D=0,C=G.length;D<C;D++){E.push(Ext.Direct.createEvent(G[D]));
}}else{E.push(Ext.Direct.createEvent(G));}return E;}});Ext.direct.PollingProvider=Ext.extend(Ext.direct.JsonProvider,{priority:3,interval:3000,constructor:function(A){Ext.direct.PollingProvider.superclass.constructor.call(this,A);
this.addEvents("beforepoll","poll");},isConnected:function(){return !!this.pollTask;
},connect:function(){if(this.url&&!this.pollTask){this.pollTask=Ext.TaskMgr.start({run:function(){if(this.fireEvent("beforepoll",this)!==false){if(typeof this.url=="function"){this.url(this.baseParams);
}else{Ext.Ajax.request({url:this.url,callback:this.onData,scope:this,params:this.baseParams});
}}},interval:this.interval,scope:this});this.fireEvent("connect",this);}else{if(!this.url){throw"Error initializing PollingProvider, no url configured.";
}}},disconnect:function(){if(this.pollTask){Ext.TaskMgr.stop(this.pollTask);delete this.pollTask;
this.fireEvent("disconnect",this);}},onData:function(F,B,A){if(B){var E=this.getEvents(A);
for(var D=0,C=E.length;D<C;D++){var G=E[D];this.fireEvent("data",this,G);}}else{var G=new Ext.Direct.ExceptionEvent({data:G,code:Ext.Direct.exceptions.TRANSPORT,message:"Unable to connect to the server.",xhr:A});
this.fireEvent("data",this,G);}}});Ext.Direct.PROVIDERS.polling=Ext.direct.PollingProvider;
Ext.direct.RemotingProvider=Ext.extend(Ext.direct.JsonProvider,{enableBuffer:10,maxRetries:1,constructor:function(A){Ext.direct.RemotingProvider.superclass.constructor.call(this,A);
this.addEvents("beforecall","call");this.namespace=(typeof this.namespace==="string")?Ext.ns(this.namespace):this.namespace||window;
this.transactions={};this.callBuffer=[];},initAPI:function(){var A=this.actions;for(var B in A){var E=this.namespace[B]||(this.namespace[B]={});
var F=A[B];for(var G=0,D=F.length;G<D;G++){var C=F[G];E[C.name]=this.createMethod(B,C);
}}},isConnected:function(){return !!this.connected;},connect:function(){if(this.url){this.initAPI();
this.connected=true;this.fireEvent("connect",this);}else{if(!this.url){throw"Error initializing RemotingProvider, no url configured.";
}}},disconnect:function(){if(this.connected){this.connected=false;this.fireEvent("disconnect",this);
}},onData:function(E,A,B){if(A){var C=this.getEvents(B);for(var F=0,G=C.length;F<G;
F++){var H=C[F];var D=this.getTransaction(H);this.fireEvent("data",this,H);if(D){this.doCallback(D,H,true);
Ext.Direct.removeTransaction(D);}}}else{var I=[].concat(E.ts);for(var F=0,G=I.length;
F<G;F++){var D=this.getTransaction(I[F]);if(D&&D.retryCount<this.maxRetries){D.retry();
}else{var H=new Ext.Direct.ExceptionEvent({data:H,transaction:D,code:Ext.Direct.exceptions.TRANSPORT,message:"Unable to connect to the server.",xhr:B});
this.fireEvent("data",this,H);if(D){this.doCallback(D,H,false);Ext.Direct.removeTransaction(D);
}}}}},getCallData:function(A){return{action:A.action,method:A.method,data:A.data,type:"rpc",tid:A.tid};
},doSend:function(D){var F={url:this.url,callback:this.onData,scope:this,ts:D};var B;
if(Ext.isArray(D)){B=[];for(var C=0,A=D.length;C<A;C++){B.push(this.getCallData(D[C]));
}}else{B=this.getCallData(D);}if(this.enableUrlEncode){var E={};E[typeof this.enableUrlEncode=="string"?this.enableUrlEncode:"data"]=Ext.encode(B);
F.params=E;}else{F.jsonData=B;}Ext.Ajax.request(F);},combineAndSend:function(){var A=this.callBuffer.length;
if(A>0){this.doSend(A==1?this.callBuffer[0]:this.callBuffer);this.callBuffer=[];}},queueTransaction:function(A){if(A.form){this.processForm(A);
return;}this.callBuffer.push(A);if(this.enableBuffer){if(!this.callTask){this.callTask=new Ext.util.DelayedTask(this.combineAndSend,this);
}this.callTask.delay(typeof this.enableBuffer=="number"?this.enableBuffer:10);}else{this.combineAndSend();
}},doCall:function(B,C,D){var A=null,F=D[C.len],G=D[C.len+1];if(C.len!==0){A=D.slice(0,C.len);
}var E=new Ext.Direct.Transaction({provider:this,args:D,action:B,method:C.name,data:A,cb:G&&Ext.isFunction(F)?F.createDelegate(G):F});
if(this.fireEvent("beforecall",this,E)!==false){Ext.Direct.addTransaction(E);this.queueTransaction(E);
this.fireEvent("call",this,E);}},doForm:function(C,E,H,B,G){var F=new Ext.Direct.Transaction({provider:this,action:C,method:E.name,args:[H,B,G],cb:G&&Ext.isFunction(B)?B.createDelegate(G):B,isForm:true});
if(this.fireEvent("beforecall",this,F)!==false){Ext.Direct.addTransaction(F);var D=String(H.getAttribute("enctype")).toLowerCase()=="multipart/form-data",A={extTID:F.tid,extAction:C,extMethod:E.name,extType:"rpc",extUpload:String(D)};
Ext.apply(F,{form:Ext.getDom(H),isUpload:D,params:B&&Ext.isObject(B.params)?Ext.apply(A,B.params):A});
this.fireEvent("call",this,F);this.processForm(F);}},processForm:function(A){Ext.Ajax.request({url:this.url,params:A.params,callback:this.onData,scope:this,form:A.form,isUpload:A.isUpload,ts:A});
},createMethod:function(C,A){var B;if(!A.formHandler){B=function(){this.doCall(C,A,Array.prototype.slice.call(arguments,0));
}.createDelegate(this);}else{B=function(F,D,E){this.doForm(C,A,F,D,E);}.createDelegate(this);
}B.directCfg={action:C,method:A};return B;},getTransaction:function(A){return A&&A.tid?Ext.Direct.getTransaction(A.tid):null;
},doCallback:function(D,A){var E=A.status?"success":"failure";if(D&&D.cb){var C=D.cb;
var B=A.result||A.data;if(Ext.isFunction(C)){C(B,A);}else{Ext.callback(C[E],C.scope,[B,A]);
Ext.callback(C.callback,C.scope,[B,A]);}}}});Ext.Direct.PROVIDERS.remoting=Ext.direct.RemotingProvider;
Ext.Window=Ext.extend(Ext.Panel,{baseCls:"x-window",resizable:true,draggable:true,closable:true,closeAction:"close",constrain:false,constrainHeader:false,plain:false,minimizable:false,maximizable:false,minHeight:100,minWidth:200,expandOnShow:true,collapsible:false,initHidden:true,monitorResize:true,elements:"header,body",frame:true,floating:true,initComponent:function(){Ext.Window.superclass.initComponent.call(this);
this.addEvents("resize","maximize","minimize","restore");if(this.initHidden===false){this.show();
}else{this.hidden=true;}},getState:function(){return Ext.apply(Ext.Window.superclass.getState.call(this)||{},this.getBox(true));
},onRender:function(B,A){Ext.Window.superclass.onRender.call(this,B,A);if(this.plain){this.el.addClass("x-window-plain");
}this.focusEl=this.el.createChild({tag:"a",href:"#",cls:"x-dlg-focus",tabIndex:"-1",html:"&#160;"});
this.focusEl.swallowEvent("click",true);this.proxy=this.el.createProxy("x-window-proxy");
this.proxy.enableDisplayMode("block");if(this.modal){this.mask=this.container.createChild({cls:"ext-el-mask"},this.el.dom);
this.mask.enableDisplayMode("block");this.mask.hide();this.mon(this.mask,"click",this.focus,this);
}this.initTools();},initEvents:function(){Ext.Window.superclass.initEvents.call(this);
if(this.animateTarget){this.setAnimateTarget(this.animateTarget);}if(this.resizable){this.resizer=new Ext.Resizable(this.el,{minWidth:this.minWidth,minHeight:this.minHeight,handles:this.resizeHandles||"all",pinned:true,resizeElement:this.resizerAction});
this.resizer.window=this;this.mon(this.resizer,"beforeresize",this.beforeResize,this);
}if(this.draggable){this.header.addClass("x-window-draggable");}this.mon(this.el,"mousedown",this.toFront,this);
this.manager=this.manager||Ext.WindowMgr;this.manager.register(this);if(this.maximized){this.maximized=false;
this.maximize();}if(this.closable){var A=this.getKeyMap();A.on(27,this.onEsc,this);
A.disable();}},initDraggable:function(){this.dd=new Ext.Window.DD(this);},onEsc:function(){this[this.closeAction]();
},beforeDestroy:function(){if(this.rendered){this.hide();if(this.doAnchor){Ext.EventManager.removeResizeListener(this.doAnchor,this);
Ext.EventManager.un(window,"scroll",this.doAnchor,this);}Ext.destroy(this.focusEl,this.resizer,this.dd,this.proxy,this.mask);
}Ext.Window.superclass.beforeDestroy.call(this);},onDestroy:function(){if(this.manager){this.manager.unregister(this);
}Ext.Window.superclass.onDestroy.call(this);},initTools:function(){if(this.minimizable){this.addTool({id:"minimize",handler:this.minimize.createDelegate(this,[])});
}if(this.maximizable){this.addTool({id:"maximize",handler:this.maximize.createDelegate(this,[])});
this.addTool({id:"restore",handler:this.restore.createDelegate(this,[]),hidden:true});
this.mon(this.header,"dblclick",this.toggleMaximize,this);}if(this.closable){this.addTool({id:"close",handler:this[this.closeAction].createDelegate(this,[])});
}},resizerAction:function(){var A=this.proxy.getBox();this.proxy.hide();this.window.handleResize(A);
return A;},beforeResize:function(){this.resizer.minHeight=Math.max(this.minHeight,this.getFrameHeight()+40);
this.resizer.minWidth=Math.max(this.minWidth,this.getFrameWidth()+40);this.resizeBox=this.el.getBox();
},updateHandles:function(){if(Ext.isIE&&this.resizer){this.resizer.syncHandleHeight();
this.el.repaint();}},handleResize:function(B){var A=this.resizeBox;if(A.x!=B.x||A.y!=B.y){this.updateBox(B);
}else{this.setSize(B);}this.focus();this.updateHandles();this.saveState();this.doLayout();
this.fireEvent("resize",this,B.width,B.height);},focus:function(){var C=this.focusEl,A=this.defaultButton,B=typeof A;
if(B!="undefined"){if(B=="number"&&this.fbar){C=this.fbar.items.get(A);}else{if(B=="string"){C=Ext.getCmp(A);
}else{C=A;}}}C=C||this.focusEl;C.focus.defer(10,C);},setAnimateTarget:function(A){A=Ext.get(A);
this.animateTarget=A;},beforeShow:function(){delete this.el.lastXY;delete this.el.lastLT;
if(this.x===undefined||this.y===undefined){var A=this.el.getAlignToXY(this.container,"c-c");
var B=this.el.translatePoints(A[0],A[1]);this.x=this.x===undefined?B.left:this.x;
this.y=this.y===undefined?B.top:this.y;}this.el.setLeftTop(this.x,this.y);if(this.expandOnShow){this.expand(false);
}if(this.modal){Ext.getBody().addClass("x-body-masked");this.mask.setSize(Ext.lib.Dom.getViewWidth(true),Ext.lib.Dom.getViewHeight(true));
this.mask.show();}},show:function(C,A,B){if(!this.rendered){this.render(Ext.getBody());
}if(this.hidden===false){this.toFront();return this;}if(this.fireEvent("beforeshow",this)===false){return this;
}if(A){this.on("show",A,B,{single:true});}this.hidden=false;if(C!==undefined){this.setAnimateTarget(C);
}this.beforeShow();if(this.animateTarget){this.animShow();}else{this.afterShow();
}return this;},afterShow:function(B){this.proxy.hide();this.el.setStyle("display","block");
this.el.show();if(this.maximized){this.fitContainer();}if(Ext.isMac&&Ext.isGecko){this.cascade(this.setAutoScroll);
}if(this.monitorResize||this.modal||this.constrain||this.constrainHeader){Ext.EventManager.onWindowResize(this.onWindowResize,this);
}this.doConstrain();this.doLayout();if(this.keyMap){this.keyMap.enable();}this.toFront();
this.updateHandles();if(B&&(Ext.isIE||Ext.isWebKit)){var A=this.getSize();this.onResize(A.width,A.height);
}this.fireEvent("show",this);},animShow:function(){this.proxy.show();this.proxy.setBox(this.animateTarget.getBox());
this.proxy.setOpacity(0);var A=this.getBox(false);A.callback=this.afterShow.createDelegate(this,[true],false);
A.scope=this;A.duration=0.25;A.easing="easeNone";A.opacity=0.5;A.block=true;this.el.setStyle("display","none");
this.proxy.shift(A);},hide:function(C,A,B){if(this.hidden||this.fireEvent("beforehide",this)===false){return this;
}if(A){this.on("hide",A,B,{single:true});}this.hidden=true;if(C!==undefined){this.setAnimateTarget(C);
}if(this.modal){this.mask.hide();Ext.getBody().removeClass("x-body-masked");}if(this.animateTarget){this.animHide();
}else{this.el.hide();this.afterHide();}return this;},afterHide:function(){this.proxy.hide();
if(this.monitorResize||this.modal||this.constrain||this.constrainHeader){Ext.EventManager.removeResizeListener(this.onWindowResize,this);
}if(this.keyMap){this.keyMap.disable();}this.fireEvent("hide",this);},animHide:function(){this.proxy.setOpacity(0.5);
this.proxy.show();var B=this.getBox(false);this.proxy.setBox(B);this.el.hide();var A=this.animateTarget.getBox();
A.callback=this.afterHide;A.scope=this;A.duration=0.25;A.easing="easeNone";A.block=true;
A.opacity=0;this.proxy.shift(A);},onWindowResize:function(){if(this.maximized){this.fitContainer();
}if(this.modal){this.mask.setSize("100%","100%");var A=this.mask.dom.offsetHeight;
this.mask.setSize(Ext.lib.Dom.getViewWidth(true),Ext.lib.Dom.getViewHeight(true));
}this.doConstrain();},doConstrain:function(){if(this.constrain||this.constrainHeader){var B;
if(this.constrain){B={right:this.el.shadowOffset,left:this.el.shadowOffset,bottom:this.el.shadowOffset};
}else{var A=this.getSize();B={right:-(A.width-100),bottom:-(A.height-25)};}var C=this.el.getConstrainToXY(this.container,true,B);
if(C){this.setPosition(C[0],C[1]);}}},ghost:function(A){var C=this.createGhost(A);
var B=this.getBox(true);C.setLeftTop(B.x,B.y);C.setWidth(B.width);this.el.hide();
this.activeGhost=C;return C;},unghost:function(B,A){if(!this.activeGhost){return;
}if(B!==false){this.el.show();this.focus();if(Ext.isMac&&Ext.isGecko){this.cascade(this.setAutoScroll);
}}if(A!==false){this.setPosition(this.activeGhost.getLeft(true),this.activeGhost.getTop(true));
}this.activeGhost.hide();this.activeGhost.remove();delete this.activeGhost;},minimize:function(){this.fireEvent("minimize",this);
return this;},close:function(){if(this.fireEvent("beforeclose",this)!==false){this.hide(null,function(){this.fireEvent("close",this);
this.destroy();},this);}},maximize:function(){if(!this.maximized){this.expand(false);
this.restoreSize=this.getSize();this.restorePos=this.getPosition(true);if(this.maximizable){this.tools.maximize.hide();
this.tools.restore.show();}this.maximized=true;this.el.disableShadow();if(this.dd){this.dd.lock();
}if(this.collapsible){this.tools.toggle.hide();}this.el.addClass("x-window-maximized");
this.container.addClass("x-window-maximized-ct");this.setPosition(0,0);this.fitContainer();
this.fireEvent("maximize",this);}return this;},restore:function(){if(this.maximized){this.el.removeClass("x-window-maximized");
this.tools.restore.hide();this.tools.maximize.show();this.setPosition(this.restorePos[0],this.restorePos[1]);
this.setSize(this.restoreSize.width,this.restoreSize.height);delete this.restorePos;
delete this.restoreSize;this.maximized=false;this.el.enableShadow(true);if(this.dd){this.dd.unlock();
}if(this.collapsible){this.tools.toggle.show();}this.container.removeClass("x-window-maximized-ct");
this.doConstrain();this.fireEvent("restore",this);}return this;},toggleMaximize:function(){return this[this.maximized?"restore":"maximize"]();
},fitContainer:function(){var A=this.container.getViewSize();this.setSize(A.width,A.height);
},setZIndex:function(A){if(this.modal){this.mask.setStyle("z-index",A);}this.el.setZIndex(++A);
A+=5;if(this.resizer){this.resizer.proxy.setStyle("z-index",++A);}this.lastZIndex=A;
},alignTo:function(B,A,C){var D=this.el.getAlignToXY(B,A,C);this.setPagePosition(D[0],D[1]);
return this;},anchorTo:function(C,E,D,B){if(this.doAnchor){Ext.EventManager.removeResizeListener(this.doAnchor,this);
Ext.EventManager.un(window,"scroll",this.doAnchor,this);}this.doAnchor=function(){this.alignTo(C,E,D);
};Ext.EventManager.onWindowResize(this.doAnchor,this);var A=typeof B;if(A!="undefined"){Ext.EventManager.on(window,"scroll",this.doAnchor,this,{buffer:A=="number"?B:50});
}this.doAnchor();return this;},toFront:function(A){if(this.manager.bringToFront(this)){if(!A||!A.getTarget().focus){this.focus();
}}return this;},setActive:function(A){if(A){if(!this.maximized){this.el.enableShadow(true);
}this.fireEvent("activate",this);}else{this.el.disableShadow();this.fireEvent("deactivate",this);
}},toBack:function(){this.manager.sendToBack(this);return this;},center:function(){var A=this.el.getAlignToXY(this.container,"c-c");
this.setPagePosition(A[0],A[1]);return this;}});Ext.reg("window",Ext.Window);Ext.Window.DD=function(A){this.win=A;
Ext.Window.DD.superclass.constructor.call(this,A.el.id,"WindowDD-"+A.id);this.setHandleElId(A.header.id);
this.scroll=false;};Ext.extend(Ext.Window.DD,Ext.dd.DD,{moveOnly:true,headerOffsets:[100,25],startDrag:function(){var A=this.win;
this.proxy=A.ghost();if(A.constrain!==false){var C=A.el.shadowOffset;this.constrainTo(A.container,{right:C,left:C,bottom:C});
}else{if(A.constrainHeader!==false){var B=this.proxy.getSize();this.constrainTo(A.container,{right:-(B.width-this.headerOffsets[0]),bottom:-(B.height-this.headerOffsets[1])});
}}},b4Drag:Ext.emptyFn,onDrag:function(A){this.alignElWithMouse(this.proxy,A.getPageX(),A.getPageY());
},endDrag:function(A){this.win.unghost();this.win.saveState();}});Ext.WindowGroup=function(){var G={};
var E=[];var F=null;var D=function(I,H){return(!I._lastAccess||I._lastAccess<H._lastAccess)?-1:1;
};var A=function(){var J=E,H=J.length;if(H>0){J.sort(D);var I=J[0].manager.zseed;
for(var K=0;K<H;K++){var L=J[K];if(L&&!L.hidden){L.setZIndex(I+(K*10));}}}B();};var C=function(H){if(H!=F){if(F){F.setActive(false);
}F=H;if(H){H.setActive(true);}}};var B=function(){for(var H=E.length-1;H>=0;--H){if(!E[H].hidden){C(E[H]);
return;}}C(null);};return{zseed:9000,register:function(H){G[H.id]=H;E.push(H);H.on("hide",B);
},unregister:function(H){delete G[H.id];H.un("hide",B);E.remove(H);},get:function(H){return typeof H=="object"?H:G[H];
},bringToFront:function(H){H=this.get(H);if(H!=F){H._lastAccess=new Date().getTime();
A();return true;}return false;},sendToBack:function(H){H=this.get(H);H._lastAccess=-(new Date().getTime());
A();return H;},hideAll:function(){for(var H in G){if(G[H]&&typeof G[H]!="function"&&G[H].isVisible()){G[H].hide();
}}},getActive:function(){return F;},getBy:function(J,I){var K=[];for(var H=E.length-1;
H>=0;--H){var L=E[H];if(J.call(I||L,L)!==false){K.push(L);}}return K;},each:function(I,H){for(var J in G){if(G[J]&&typeof G[J]!="function"){if(I.call(H||G[J],G[J])===false){return;
}}}}};};Ext.WindowMgr=new Ext.WindowGroup();Ext.MessageBox=function(){var D,P,N,C;
var G,J,B,O,K,M,H,T;var A,E,L,Q="";var R=function(U){if(D.isVisible()){D.hide();F();
Ext.callback(P.fn,P.scope||window,[U,E.dom.value,P],1);}};var F=function(){if(P&&P.cls){D.el.removeClass(P.cls);
}K.reset();};var S=function(V,U,W){if(P&&P.closable!==false){D.hide();F();}if(W){W.stopEvent();
}};var I=function(U){var V=0;if(!U){A.ok.hide();A.cancel.hide();A.yes.hide();A.no.hide();
return V;}D.footer.dom.style.display="";for(var W in A){if(typeof A[W]!="function"){if(U[W]){A[W].show();
A[W].setText(typeof U[W]=="string"?U[W]:Ext.MessageBox.buttonText[W]);V+=A[W].el.getWidth()+15;
}else{A[W].hide();}}}return V;};return{getDialog:function(V){if(!D){D=new Ext.Window({autoCreate:true,title:V,resizable:false,constrain:true,constrainHeader:true,minimizable:false,maximizable:false,stateful:false,modal:true,shim:true,buttonAlign:"center",width:400,height:100,minHeight:80,plain:true,footer:true,closable:true,close:function(){if(P&&P.buttons&&P.buttons.no&&!P.buttons.cancel){R("no");
}else{R("cancel");}}});A={};var W=this.buttonText;A.ok=D.addButton(W.ok,R.createCallback("ok"));
A.yes=D.addButton(W.yes,R.createCallback("yes"));A.no=D.addButton(W.no,R.createCallback("no"));
A.cancel=D.addButton(W.cancel,R.createCallback("cancel"));A.ok.hideMode=A.yes.hideMode=A.no.hideMode=A.cancel.hideMode="offsets";
D.render(document.body);D.getEl().addClass("x-window-dlg");N=D.mask;G=D.body.createChild({html:'<div class="ext-mb-icon"></div><div class="ext-mb-content"><span class="ext-mb-text"></span><br /><div class="ext-mb-fix-cursor"><input type="text" class="ext-mb-input" /><textarea class="ext-mb-textarea"></textarea></div></div>'});
H=Ext.get(G.dom.firstChild);var U=G.dom.childNodes[1];J=Ext.get(U.firstChild);B=Ext.get(U.childNodes[2].firstChild);
B.enableDisplayMode();B.addKeyListener([10,13],function(){if(D.isVisible()&&P&&P.buttons){if(P.buttons.ok){R("ok");
}else{if(P.buttons.yes){R("yes");}}}});O=Ext.get(U.childNodes[2].childNodes[1]);O.enableDisplayMode();
K=new Ext.ProgressBar({renderTo:G});G.createChild({cls:"x-clear"});}return D;},updateText:function(W){if(!D.isVisible()&&!P.width){D.setSize(this.maxWidth,100);
}J.update(W||"&#160;");var U=Q!=""?(H.getWidth()+H.getMargins("lr")):0;var Y=J.getWidth()+J.getMargins("lr");
var V=D.getFrameWidth("lr");var X=D.body.getFrameWidth("lr");if(Ext.isIE&&U>0){U+=3;
}var Z=Math.max(Math.min(P.width||U+Y+V+X,this.maxWidth),Math.max(P.minWidth||this.minWidth,L||0));
if(P.prompt===true){E.setWidth(Z-U-V-X);}if(P.progress===true||P.wait===true){K.setSize(Z-U-V-X);
}if(Ext.isIE&&Z==L){Z+=4;}D.setSize(Z,"auto").center();return this;},updateProgress:function(W,V,U){K.updateProgress(W,V);
if(U){this.updateText(U);}return this;},isVisible:function(){return D&&D.isVisible();
},hide:function(){var U=D?D.activeGhost:null;if(this.isVisible()||U){D.hide();F();
if(U){D.unghost(false,false);}}return this;},show:function(Y){if(this.isVisible()){this.hide();
}P=Y;var U=this.getDialog(P.title||"&#160;");U.setTitle(P.title||"&#160;");var X=(P.closable!==false&&P.progress!==true&&P.wait!==true);
U.tools.close.setDisplayed(X);E=B;P.prompt=P.prompt||(P.multiline?true:false);if(P.prompt){if(P.multiline){B.hide();
O.show();O.setHeight(typeof P.multiline=="number"?P.multiline:this.defaultTextHeight);
E=O;}else{B.show();O.hide();}}else{B.hide();O.hide();}E.dom.value=P.value||"";if(P.prompt){U.focusEl=E;
}else{var V=P.buttons;var W=null;if(V&&V.ok){W=A.ok;}else{if(V&&V.yes){W=A.yes;}}if(W){U.focusEl=W;
}}if(P.iconCls){U.setIconClass(P.iconCls);}this.setIcon(P.icon);if(P.cls){U.el.addClass(P.cls);
}U.proxyDrag=P.proxyDrag===true;U.modal=P.modal!==false;U.mask=P.modal!==false?N:false;
U.on("show",function(){U.keyMap.setDisabled(X!==true);U.doLayout();this.setIcon(P.icon);
L=I(P.buttons);K.setVisible(P.progress===true||P.wait===true);this.updateProgress(0,P.progressText);
this.updateText(P.msg);if(P.wait===true){K.wait(P.waitConfig);}},this,{single:true});
if(!U.isVisible()){document.body.appendChild(D.el.dom);U.setAnimateTarget(P.animEl);
U.show(P.animEl);}return this;},setIcon:function(U){if(U&&U!=""){H.removeClass("x-hidden");
H.replaceClass(Q,U);G.addClass("x-dlg-icon");Q=U;}else{H.replaceClass(Q,"x-hidden");
G.removeClass("x-dlg-icon");Q="";}return this;},progress:function(V,W,U){this.show({title:V,msg:W,buttons:false,progress:true,closable:false,minWidth:this.minProgressWidth,progressText:U});
return this;},wait:function(V,W,U){this.show({title:W,msg:V,buttons:false,closable:false,wait:true,modal:true,minWidth:this.minProgressWidth,waitConfig:U});
return this;},alert:function(X,W,V,U){this.show({title:X,msg:W,buttons:this.OK,fn:V,scope:U});
return this;},confirm:function(X,W,V,U){this.show({title:X,msg:W,buttons:this.YESNO,fn:V,scope:U,icon:this.QUESTION});
return this;},prompt:function(X,W,U,Z,Y,V){this.show({title:X,msg:W,buttons:this.OKCANCEL,fn:U,minWidth:250,scope:Z,prompt:true,multiline:Y,value:V});
return this;},OK:{ok:true},CANCEL:{cancel:true},OKCANCEL:{ok:true,cancel:true},YESNO:{yes:true,no:true},YESNOCANCEL:{yes:true,no:true,cancel:true},INFO:"ext-mb-info",WARNING:"ext-mb-warning",QUESTION:"ext-mb-question",ERROR:"ext-mb-error",defaultTextHeight:75,maxWidth:600,minWidth:110,minProgressWidth:250,buttonText:{ok:"OK",cancel:"Cancel",yes:"Yes",no:"No"}};
}();Ext.Msg=Ext.MessageBox;Ext.dd.PanelProxy=function(A,B){this.panel=A;this.id=this.panel.id+"-ddproxy";
Ext.apply(this,B);};Ext.dd.PanelProxy.prototype={insertProxy:true,setStatus:Ext.emptyFn,reset:Ext.emptyFn,update:Ext.emptyFn,stop:Ext.emptyFn,sync:Ext.emptyFn,getEl:function(){return this.ghost;
},getGhost:function(){return this.ghost;},getProxy:function(){return this.proxy;},hide:function(){if(this.ghost){if(this.proxy){this.proxy.remove();
delete this.proxy;}this.panel.el.dom.style.display="";this.ghost.remove();delete this.ghost;
}},show:function(){if(!this.ghost){this.ghost=this.panel.createGhost(undefined,undefined,Ext.getBody());
this.ghost.setXY(this.panel.el.getXY());if(this.insertProxy){this.proxy=this.panel.el.insertSibling({cls:"x-panel-dd-spacer"});
this.proxy.setSize(this.panel.getSize());}this.panel.el.dom.style.display="none";
}},repair:function(B,C,A){this.hide();if(typeof C=="function"){C.call(A||this);}},moveProxy:function(A,B){if(this.proxy){A.insertBefore(this.proxy.dom,B);
}}};Ext.Panel.DD=function(B,A){this.panel=B;this.dragData={panel:B};this.proxy=new Ext.dd.PanelProxy(B,A);
Ext.Panel.DD.superclass.constructor.call(this,B.el,A);var C=B.header;if(C){this.setHandleElId(C.id);
}(C?C:this.panel.body).setStyle("cursor","move");this.scroll=false;};Ext.extend(Ext.Panel.DD,Ext.dd.DragSource,{showFrame:Ext.emptyFn,startDrag:Ext.emptyFn,b4StartDrag:function(A,B){this.proxy.show();
},b4MouseDown:function(B){var A=B.getPageX();var C=B.getPageY();this.autoOffset(A,C);
},onInitDrag:function(A,B){this.onStartDrag(A,B);return true;},createFrame:Ext.emptyFn,getDragEl:function(A){return this.proxy.ghost.dom;
},endDrag:function(A){this.proxy.hide();this.panel.saveState();},autoOffset:function(A,B){A-=this.startPageX;
B-=this.startPageY;this.setDelta(A,B);}});Ext.DataView=Ext.extend(Ext.BoxComponent,{selectedClass:"x-view-selected",emptyText:"",deferEmptyText:true,trackOver:false,last:false,initComponent:function(){Ext.DataView.superclass.initComponent.call(this);
if(Ext.isString(this.tpl)||Ext.isArray(this.tpl)){this.tpl=new Ext.XTemplate(this.tpl);
}this.addEvents("beforeclick","click","mouseenter","mouseleave","containerclick","dblclick","contextmenu","containercontextmenu","selectionchange","beforeselect");
this.store=Ext.StoreMgr.lookup(this.store);this.all=new Ext.CompositeElementLite();
this.selected=new Ext.CompositeElementLite();},afterRender:function(){Ext.DataView.superclass.afterRender.call(this);
this.mon(this.getTemplateTarget(),{click:this.onClick,dblclick:this.onDblClick,contextmenu:this.onContextMenu,scope:this});
if(this.overClass||this.trackOver){this.mon(this.getTemplateTarget(),{mouseover:this.onMouseOver,mouseout:this.onMouseOut,scope:this});
}if(this.store){this.bindStore(this.store,true);}},refresh:function(){this.clearSelections(false,true);
var B=this.getTemplateTarget();B.update("");var A=this.store.getRange();if(A.length<1){if(!this.deferEmptyText||this.hasSkippedEmptyText){B.update(this.emptyText);
}this.all.clear();}else{this.tpl.overwrite(B,this.collectData(A,0));this.all.fill(Ext.query(this.itemSelector,B.dom));
this.updateIndexes(0);}this.hasSkippedEmptyText=true;},getTemplateTarget:function(){return this.el;
},prepareData:function(A){return A;},collectData:function(B,E){var D=[];for(var C=0,A=B.length;
C<A;C++){D[D.length]=this.prepareData(B[C].data,E+C,B[C]);}return D;},bufferRender:function(A){var B=document.createElement("div");
this.tpl.overwrite(B,this.collectData(A));return Ext.query(this.itemSelector,B);},onUpdate:function(F,A){var B=this.store.indexOf(A);
var E=this.isSelected(B);var C=this.all.elements[B];var D=this.bufferRender([A],B)[0];
this.all.replaceElement(B,D,true);if(E){this.selected.replaceElement(C,D);this.all.item(B).addClass(this.selectedClass);
}this.updateIndexes(B,B);},onAdd:function(F,D,E){if(this.all.getCount()===0){this.refresh();
return;}var C=this.bufferRender(D,E),A,B=this.all.elements;if(E<this.all.getCount()){A=this.all.item(E).insertSibling(C,"before",true);
B.splice.apply(B,[E,0].concat(C));}else{A=this.all.last().insertSibling(C,"after",true);
B.push.apply(B,C);}this.updateIndexes(E);},onRemove:function(C,A,B){this.deselect(B);
this.all.removeElement(B,true);this.updateIndexes(B);if(this.store.getCount()===0){this.refresh();
}},refreshNode:function(A){this.onUpdate(this.store,this.store.getAt(A));},updateIndexes:function(D,C){var B=this.all.elements;
D=D||0;C=C||((C===0)?0:(B.length-1));for(var A=D;A<=C;A++){B[A].viewIndex=A;}},getStore:function(){return this.store;
},bindStore:function(A,B){if(!B&&this.store){this.store.un("beforeload",this.onBeforeLoad,this);
this.store.un("datachanged",this.refresh,this);this.store.un("add",this.onAdd,this);
this.store.un("remove",this.onRemove,this);this.store.un("update",this.onUpdate,this);
this.store.un("clear",this.refresh,this);if(A!==this.store&&this.store.autoDestroy){this.store.destroy();
}}if(A){A=Ext.StoreMgr.lookup(A);A.on({scope:this,beforeload:this.onBeforeLoad,datachanged:this.refresh,add:this.onAdd,remove:this.onRemove,update:this.onUpdate,clear:this.refresh});
}this.store=A;if(A){this.refresh();}},findItemFromChild:function(A){return Ext.fly(A).findParent(this.itemSelector,this.getTemplateTarget());
},onClick:function(C){var B=C.getTarget(this.itemSelector,this.getTemplateTarget());
if(B){var A=this.indexOf(B);if(this.onItemClick(B,A,C)!==false){this.fireEvent("click",this,A,B,C);
}}else{if(this.fireEvent("containerclick",this,C)!==false){this.onContainerClick(C);
}}},onContainerClick:function(A){this.clearSelections();},onContextMenu:function(B){var A=B.getTarget(this.itemSelector,this.getTemplateTarget());
if(A){this.fireEvent("contextmenu",this,this.indexOf(A),A,B);}else{this.fireEvent("containercontextmenu",this,B);
}},onDblClick:function(B){var A=B.getTarget(this.itemSelector,this.getTemplateTarget());
if(A){this.fireEvent("dblclick",this,this.indexOf(A),A,B);}},onMouseOver:function(B){var A=B.getTarget(this.itemSelector,this.getTemplateTarget());
if(A&&A!==this.lastItem){this.lastItem=A;Ext.fly(A).addClass(this.overClass);this.fireEvent("mouseenter",this,this.indexOf(A),A,B);
}},onMouseOut:function(A){if(this.lastItem){if(!A.within(this.lastItem,true,true)){Ext.fly(this.lastItem).removeClass(this.overClass);
this.fireEvent("mouseleave",this,this.indexOf(this.lastItem),this.lastItem,A);delete this.lastItem;
}}},onItemClick:function(B,A,C){if(this.fireEvent("beforeclick",this,A,B,C)===false){return false;
}if(this.multiSelect){this.doMultiSelection(B,A,C);C.preventDefault();}else{if(this.singleSelect){this.doSingleSelection(B,A,C);
C.preventDefault();}}return true;},doSingleSelection:function(B,A,C){if(C.ctrlKey&&this.isSelected(A)){this.deselect(A);
}else{this.select(A,false);}},doMultiSelection:function(C,A,D){if(D.shiftKey&&this.last!==false){var B=this.last;
this.selectRange(B,A,D.ctrlKey);this.last=B;}else{if((D.ctrlKey||this.simpleSelect)&&this.isSelected(A)){this.deselect(A);
}else{this.select(A,D.ctrlKey||D.shiftKey||this.simpleSelect);}}},getSelectionCount:function(){return this.selected.getCount();
},getSelectedNodes:function(){return this.selected.elements;},getSelectedIndexes:function(){var B=[],D=this.selected.elements;
for(var C=0,A=D.length;C<A;C++){B.push(D[C].viewIndex);}return B;},getSelectedRecords:function(){var D=[],C=this.selected.elements;
for(var B=0,A=C.length;B<A;B++){D[D.length]=this.store.getAt(C[B].viewIndex);}return D;
},getRecords:function(B){var E=[],D=B;for(var C=0,A=D.length;C<A;C++){E[E.length]=this.store.getAt(D[C].viewIndex);
}return E;},getRecord:function(A){return this.store.getAt(A.viewIndex);},clearSelections:function(A,B){if((this.multiSelect||this.singleSelect)&&this.selected.getCount()>0){if(!B){this.selected.removeClass(this.selectedClass);
}this.selected.clear();this.last=false;if(!A){this.fireEvent("selectionchange",this,this.selected.elements);
}}},isSelected:function(A){return this.selected.contains(this.getNode(A));},deselect:function(A){if(this.isSelected(A)){A=this.getNode(A);
this.selected.removeElement(A);if(this.last==A.viewIndex){this.last=false;}Ext.fly(A).removeClass(this.selectedClass);
this.fireEvent("selectionchange",this,this.selected.elements);}},select:function(D,F,B){if(Ext.isArray(D)){if(!F){this.clearSelections(true);
}for(var C=0,A=D.length;C<A;C++){this.select(D[C],true,true);}if(!B){this.fireEvent("selectionchange",this,this.selected.elements);
}}else{var E=this.getNode(D);if(!F){this.clearSelections(true);}if(E&&!this.isSelected(E)){if(this.fireEvent("beforeselect",this,E,this.selected.elements)!==false){Ext.fly(E).addClass(this.selectedClass);
this.selected.add(E);this.last=E.viewIndex;if(!B){this.fireEvent("selectionchange",this,this.selected.elements);
}}}}},selectRange:function(C,A,B){if(!B){this.clearSelections(true);}this.select(this.getNodes(C,A),true);
},getNode:function(A){if(Ext.isString(A)){return document.getElementById(A);}else{if(Ext.isNumber(A)){return this.all.elements[A];
}}return A;},getNodes:function(E,A){var D=this.all.elements;E=E||0;A=!Ext.isDefined(A)?Math.max(D.length-1,0):A;
var B=[],C;if(E<=A){for(C=E;C<=A&&D[C];C++){B.push(D[C]);}}else{for(C=E;C>=A&&D[C];
C--){B.push(D[C]);}}return B;},indexOf:function(A){A=this.getNode(A);if(Ext.isNumber(A.viewIndex)){return A.viewIndex;
}return this.all.indexOf(A);},onBeforeLoad:function(){if(this.loadingText){this.clearSelections(false,true);
this.getTemplateTarget().update('<div class="loading-indicator">'+this.loadingText+"</div>");
this.all.clear();}},onDestroy:function(){Ext.DataView.superclass.onDestroy.call(this);
this.bindStore(null);}});Ext.DataView.prototype.setStore=Ext.DataView.prototype.bindStore;
Ext.reg("dataview",Ext.DataView);Ext.ListView=Ext.extend(Ext.DataView,{itemSelector:"dl",selectedClass:"x-list-selected",overClass:"x-list-over",scrollOffset:19,columnResize:true,columnSort:true,initComponent:function(){if(this.columnResize){this.colResizer=new Ext.ListView.ColumnResizer(this.colResizer);
this.colResizer.init(this);}if(this.columnSort){this.colSorter=new Ext.ListView.Sorter(this.columnSort);
this.colSorter.init(this);}if(!this.internalTpl){this.internalTpl=new Ext.XTemplate('<div class="x-list-header"><div class="x-list-header-inner">','<tpl for="columns">','<div style="width:{width}%;text-align:{align};"><em unselectable="on" id="',this.id,'-xlhd-{#}">',"{header}","</em></div>","</tpl>",'<div class="x-clear"></div>',"</div></div>",'<div class="x-list-body"><div class="x-list-body-inner">',"</div></div>");
}if(!this.tpl){this.tpl=new Ext.XTemplate('<tpl for="rows">',"<dl>",'<tpl for="parent.columns">','<dt style="width:{width}%;text-align:{align};"><em unselectable="on">',"{[values.tpl.apply(parent)]}","</em></dt>","</tpl>",'<div class="x-clear"></div>',"</dl>","</tpl>");
}var B=this.columns,I=0,A=0,C=B.length;for(var H=0;H<C;H++){var D=B[H];if(!D.tpl){D.tpl=new Ext.XTemplate("{"+D.dataIndex+"}");
}else{if(Ext.isString(D.tpl)){D.tpl=new Ext.XTemplate(D.tpl);}}D.align=D.align||"left";
if(Ext.isNumber(D.width)){D.width*=100;I+=D.width;A++;}}if(A<C){var F=C-A;if(I<100){var E=((100-I)/F);
for(var G=0;G<C;G++){var D=B[G];if(!Ext.isNumber(D.width)){D.width=E;}}}}Ext.ListView.superclass.initComponent.call(this);
},onRender:function(){Ext.ListView.superclass.onRender.apply(this,arguments);this.internalTpl.overwrite(this.el,{columns:this.columns});
this.innerBody=Ext.get(this.el.dom.childNodes[1].firstChild);this.innerHd=Ext.get(this.el.dom.firstChild.firstChild);
if(this.hideHeaders){this.el.dom.firstChild.style.display="none";}},getTemplateTarget:function(){return this.innerBody;
},collectData:function(){var A=Ext.ListView.superclass.collectData.apply(this,arguments);
return{columns:this.columns,rows:A};},verifyInternalSize:function(){if(this.lastSize){this.onResize(this.lastSize.width,this.lastSize.height);
}},onResize:function(B,D){var E=this.innerBody.dom;var F=this.innerHd.dom;if(!E){return;
}var C=E.parentNode;if(Ext.isNumber(B)){var A=B-this.scrollOffset;if(this.reserveScrollOffset||((C.offsetWidth-C.clientWidth)>10)){E.style.width=A+"px";
F.style.width=A+"px";}else{E.style.width=B+"px";F.style.width=B+"px";setTimeout(function(){if((C.offsetWidth-C.clientWidth)>10){E.style.width=A+"px";
F.style.width=A+"px";}},10);}}if(Ext.isNumber(D=="number")){C.style.height=(D-F.parentNode.offsetHeight)+"px";
}},updateIndexes:function(){Ext.ListView.superclass.updateIndexes.apply(this,arguments);
this.verifyInternalSize();},findHeaderIndex:function(E){E=E.dom||E;var B=E.parentNode,D=B.parentNode.childNodes;
for(var C=0,A;A=D[C];C++){if(A==B){return C;}}return -1;},setHdWidths:function(){var C=this.innerHd.dom.getElementsByTagName("div");
for(var B=0,D=this.columns,A=D.length;B<A;B++){C[B].style.width=D[B].width+"%";}}});
Ext.reg("listview",Ext.ListView);Ext.ListView.ColumnResizer=Ext.extend(Ext.util.Observable,{minPct:0.05,constructor:function(A){Ext.apply(this,A);
Ext.ListView.ColumnResizer.superclass.constructor.call(this);},init:function(A){this.view=A;
A.on("render",this.initEvents,this);},initEvents:function(A){A.mon(A.innerHd,"mousemove",this.handleHdMove,this);
this.tracker=new Ext.dd.DragTracker({onBeforeStart:this.onBeforeStart.createDelegate(this),onStart:this.onStart.createDelegate(this),onDrag:this.onDrag.createDelegate(this),onEnd:this.onEnd.createDelegate(this),tolerance:3,autoStart:300});
this.tracker.initEl(A.innerHd);A.on("beforedestroy",this.tracker.destroy,this.tracker);
},handleHdMove:function(C,H){var E=5;var D=C.getPageX();var B=C.getTarget("em",3,true);
if(B){var A=B.getRegion();var G=B.dom.style;var F=B.dom.parentNode;if(D-A.left<=E&&F!=F.parentNode.firstChild){this.activeHd=Ext.get(F.previousSibling.firstChild);
G.cursor=Ext.isWebKit?"e-resize":"col-resize";}else{if(A.right-D<=E&&F!=F.parentNode.lastChild.previousSibling){this.activeHd=B;
G.cursor=Ext.isWebKit?"w-resize":"col-resize";}else{delete this.activeHd;G.cursor="";
}}}},onBeforeStart:function(A){this.dragHd=this.activeHd;return !!this.dragHd;},onStart:function(C){this.view.disableHeaders=true;
this.proxy=this.view.el.createChild({cls:"x-list-resizer"});this.proxy.setHeight(this.view.el.getHeight());
var A=this.tracker.getXY()[0];var B=this.view.innerHd.getWidth();this.hdX=this.dragHd.getX();
this.hdIndex=this.view.findHeaderIndex(this.dragHd);this.proxy.setX(this.hdX);this.proxy.setWidth(A-this.hdX);
this.minWidth=B*this.minPct;this.maxWidth=B-(this.minWidth*(this.view.columns.length-1-this.hdIndex));
},onDrag:function(B){var A=this.tracker.getXY()[0];this.proxy.setWidth((A-this.hdX).constrain(this.minWidth,this.maxWidth));
},onEnd:function(G){var E=this.proxy.getWidth();this.proxy.remove();var D=this.hdIndex;
var J=this.view,O=J.columns,F=O.length;var B=this.view.innerHd.getWidth(),N=this.minPct*100;
var C=Math.ceil((E*100)/B);var A=O[D].width-C;var I=Math.floor(A/(F-1-D));var H=A-(I*(F-1-D));
for(var M=D+1;M<F;M++){var L=O[M].width+I;var K=Math.max(N,L);if(L!=K){H+=L-K;}O[M].width=K;
}O[D].width=C;O[D+1].width+=H;delete this.dragHd;this.view.setHdWidths();this.view.refresh();
setTimeout(function(){J.disableHeaders=false;},100);}});Ext.ListView.Sorter=Ext.extend(Ext.util.Observable,{sortClasses:["sort-asc","sort-desc"],constructor:function(A){Ext.apply(this,A);
Ext.ListView.Sorter.superclass.constructor.call(this);},init:function(A){this.view=A;
A.on("render",this.initEvents,this);},initEvents:function(A){A.mon(A.innerHd,"click",this.onHdClick,this);
A.innerHd.setStyle("cursor","pointer");A.mon(A.store,"datachanged",this.updateSortState,this);
this.updateSortState.defer(10,this,[A.store]);},updateSortState:function(D){var G=D.getSortState();
if(!G){return;}this.sortState=G;var F=this.view.columns,A=-1;for(var E=0,B=F.length;
E<B;E++){if(F[E].dataIndex==G.field){A=E;break;}}if(A!=-1){var C=G.direction;this.updateSortIcon(A,C);
}},updateSortIcon:function(B,A){var D=this.sortClasses;var C=this.view.innerHd.select("em").removeClass(D);
C.item(B).addClass(D[A=="DESC"?1:0]);},onHdClick:function(C){var B=C.getTarget("em",3);
if(B&&!this.view.disableHeaders){var A=this.view.findHeaderIndex(B);this.view.store.sort(this.view.columns[A].dataIndex);
}}});Ext.TabPanel=Ext.extend(Ext.Panel,{monitorResize:true,deferredRender:true,tabWidth:120,minTabWidth:30,resizeTabs:false,enableTabScroll:false,scrollIncrement:0,scrollRepeatInterval:400,scrollDuration:0.35,animScroll:true,tabPosition:"top",baseCls:"x-tab-panel",autoTabs:false,autoTabSelector:"div.x-tab",activeTab:null,tabMargin:2,plain:false,wheelIncrement:20,idDelimiter:"__",itemCls:"x-tab-item",elements:"body",headerAsText:false,frame:false,hideBorders:true,initComponent:function(){this.frame=false;
Ext.TabPanel.superclass.initComponent.call(this);this.addEvents("beforetabchange","tabchange","contextmenu");
this.setLayout(new Ext.layout.CardLayout(Ext.apply({layoutOnCardChange:this.layoutOnTabChange,deferredRender:this.deferredRender},this.layoutConfig)));
if(this.tabPosition=="top"){this.elements+=",header";this.stripTarget="header";}else{this.elements+=",footer";
this.stripTarget="footer";}if(!this.stack){this.stack=Ext.TabPanel.AccessStack();
}this.initItems();},onRender:function(C,A){Ext.TabPanel.superclass.onRender.call(this,C,A);
if(this.plain){var F=this.tabPosition=="top"?"header":"footer";this[F].addClass("x-tab-panel-"+F+"-plain");
}var B=this[this.stripTarget];this.stripWrap=B.createChild({cls:"x-tab-strip-wrap",cn:{tag:"ul",cls:"x-tab-strip x-tab-strip-"+this.tabPosition}});
var E=(this.tabPosition=="bottom"?this.stripWrap:null);this.stripSpacer=B.createChild({cls:"x-tab-strip-spacer"},E);
this.strip=new Ext.Element(this.stripWrap.dom.firstChild);this.edge=this.strip.createChild({tag:"li",cls:"x-tab-edge"});
this.strip.createChild({cls:"x-clear"});this.body.addClass("x-tab-panel-body-"+this.tabPosition);
if(!this.itemTpl){var D=new Ext.Template('<li class="{cls}" id="{id}"><a class="x-tab-strip-close" onclick="return false;"></a>','<a class="x-tab-right" href="#" onclick="return false;"><em class="x-tab-left">','<span class="x-tab-strip-inner"><span class="x-tab-strip-text {iconCls}">{text}</span></span>',"</em></a></li>");
D.disableFormats=true;D.compile();Ext.TabPanel.prototype.itemTpl=D;}this.items.each(this.initTab,this);
},afterRender:function(){Ext.TabPanel.superclass.afterRender.call(this);if(this.autoTabs){this.readTabs(false);
}if(this.activeTab!==undefined){var A=Ext.isObject(this.activeTab)?this.activeTab:this.items.get(this.activeTab);
delete this.activeTab;this.setActiveTab(A);}},initEvents:function(){Ext.TabPanel.superclass.initEvents.call(this);
this.on("add",this.onAdd,this,{target:this});this.on("remove",this.onRemove,this,{target:this});
this.mon(this.strip,"mousedown",this.onStripMouseDown,this);this.mon(this.strip,"contextmenu",this.onStripContextMenu,this);
if(this.enableTabScroll){this.mon(this.strip,"mousewheel",this.onWheel,this);}},findTargets:function(C){var B=null;
var A=C.getTarget("li",this.strip);if(A){B=this.getComponent(A.id.split(this.idDelimiter)[1]);
if(B.disabled){return{close:null,item:null,el:null};}}return{close:C.getTarget(".x-tab-strip-close",this.strip),item:B,el:A};
},onStripMouseDown:function(B){if(B.button!==0){return;}B.preventDefault();var A=this.findTargets(B);
if(A.close){if(A.item.fireEvent("beforeclose",A.item)!==false){A.item.fireEvent("close",A.item);
this.remove(A.item);}return;}if(A.item&&A.item!=this.activeTab){this.setActiveTab(A.item);
}},onStripContextMenu:function(B){B.preventDefault();var A=this.findTargets(B);if(A.item){this.fireEvent("contextmenu",this,A.item,B);
}},readTabs:function(D){if(D===true){this.items.each(function(G){this.remove(G);},this);
}var C=this.el.query(this.autoTabSelector);for(var B=0,A=C.length;B<A;B++){var E=C[B];
var F=E.getAttribute("title");E.removeAttribute("title");this.add({title:F,contentEl:E});
}},initTab:function(C,A){var D=this.strip.dom.childNodes[A];var E=this.getTemplateArgs(C);
var B=D?this.itemTpl.insertBefore(D,E):this.itemTpl.append(this.strip,E);Ext.fly(B).addClassOnOver("x-tab-strip-over");
if(C.tabTip){Ext.fly(B).child("span.x-tab-strip-text",true).qtip=C.tabTip;}C.tabEl=B;
C.on("disable",this.onItemDisabled,this);C.on("enable",this.onItemEnabled,this);C.on("titlechange",this.onItemTitleChanged,this);
C.on("iconchange",this.onItemIconChanged,this);C.on("beforeshow",this.onBeforeShowItem,this);
},getTemplateArgs:function(B){var A=B.closable?"x-tab-strip-closable":"";if(B.disabled){A+=" x-item-disabled";
}if(B.iconCls){A+=" x-tab-with-icon";}if(B.tabCls){A+=" "+B.tabCls;}return{id:this.id+this.idDelimiter+B.getItemId(),text:B.title,cls:A,iconCls:B.iconCls||""};
},onAdd:function(C,B,A){this.initTab(B,A);if(this.items.getCount()==1){this.syncSize();
}this.delegateUpdates();},onBeforeAdd:function(B){var A=B.events?(this.items.containsKey(B.getItemId())?B:null):this.items.get(B);
if(A){this.setActiveTab(B);return false;}Ext.TabPanel.superclass.onBeforeAdd.apply(this,arguments);
var C=B.elements;B.elements=C?C.replace(",header",""):C;B.border=(B.border===true);
},onRemove:function(C,B){Ext.destroy(Ext.get(this.getTabEl(B)));this.stack.remove(B);
B.un("disable",this.onItemDisabled,this);B.un("enable",this.onItemEnabled,this);B.un("titlechange",this.onItemTitleChanged,this);
B.un("iconchange",this.onItemIconChanged,this);B.un("beforeshow",this.onBeforeShowItem,this);
if(B==this.activeTab){var A=this.stack.next();if(A){this.setActiveTab(A);}else{if(this.items.getCount()>0){this.setActiveTab(0);
}else{this.activeTab=null;}}}this.delegateUpdates();},onBeforeShowItem:function(A){if(A!=this.activeTab){this.setActiveTab(A);
return false;}},onItemDisabled:function(B){var A=this.getTabEl(B);if(A){Ext.fly(A).addClass("x-item-disabled");
}this.stack.remove(B);},onItemEnabled:function(B){var A=this.getTabEl(B);if(A){Ext.fly(A).removeClass("x-item-disabled");
}},onItemTitleChanged:function(B){var A=this.getTabEl(B);if(A){Ext.fly(A).child("span.x-tab-strip-text",true).innerHTML=B.title;
}},onItemIconChanged:function(D,A,C){var B=this.getTabEl(D);if(B){Ext.fly(B).child("span.x-tab-strip-text").replaceClass(C,A);
}},getTabEl:function(A){return document.getElementById(this.id+this.idDelimiter+this.getComponent(A).getItemId());
},onResize:function(){Ext.TabPanel.superclass.onResize.apply(this,arguments);this.delegateUpdates();
},beginUpdate:function(){this.suspendUpdates=true;},endUpdate:function(){this.suspendUpdates=false;
this.delegateUpdates();},hideTabStripItem:function(B){B=this.getComponent(B);var A=this.getTabEl(B);
if(A){A.style.display="none";this.delegateUpdates();}this.stack.remove(B);},unhideTabStripItem:function(B){B=this.getComponent(B);
var A=this.getTabEl(B);if(A){A.style.display="";this.delegateUpdates();}},delegateUpdates:function(){if(this.suspendUpdates){return;
}if(this.resizeTabs&&this.rendered){this.autoSizeTabs();}if(this.enableTabScroll&&this.rendered){this.autoScrollTabs();
}},autoSizeTabs:function(){var A=this.items.length;var H=this.tabPosition!="bottom"?"header":"footer";
var I=this[H].dom.offsetWidth;var G=this[H].dom.clientWidth;if(!this.resizeTabs||A<1||!G){return;
}var C=Math.max(Math.min(Math.floor((G-4)/A)-this.tabMargin,this.tabWidth),this.minTabWidth);
this.lastTabWidth=C;var E=this.strip.query("li:not([className^=x-tab-edge])");for(var K=0,B=E.length;
K<B;K++){var D=E[K];var F=Ext.fly(D).child(".x-tab-strip-inner",true);var L=D.offsetWidth;
var J=F.offsetWidth;F.style.width=(C-(L-J))+"px";}},adjustBodyWidth:function(A){if(this.header){this.header.setWidth(A);
}if(this.footer){this.footer.setWidth(A);}return A;},setActiveTab:function(C){C=this.getComponent(C);
if(!C||this.fireEvent("beforetabchange",this,C,this.activeTab)===false){return;}if(!this.rendered){this.activeTab=C;
return;}if(this.activeTab!=C){if(this.activeTab){var A=this.getTabEl(this.activeTab);
if(A){Ext.fly(A).removeClass("x-tab-strip-active");}this.activeTab.fireEvent("deactivate",this.activeTab);
}var B=this.getTabEl(C);Ext.fly(B).addClass("x-tab-strip-active");this.activeTab=C;
this.stack.add(C);this.layout.setActiveItem(C);if(this.scrolling){this.scrollToTab(C,this.animScroll);
}C.fireEvent("activate",C);this.fireEvent("tabchange",this,C);}},getActiveTab:function(){return this.activeTab||null;
},getItem:function(A){return this.getComponent(A);},autoScrollTabs:function(){this.pos=this.tabPosition=="bottom"?this.footer:this.header;
var A=this.items.length;var F=this.pos.dom.offsetWidth;var E=this.pos.dom.clientWidth;
var H=this.stripWrap;var G=H.dom;var D=G.offsetWidth;var B=this.getScrollPos();var C=this.edge.getOffsetsTo(this.stripWrap)[0]+B;
if(!this.enableTabScroll||A<1||D<20){return;}if(C<=E){G.scrollLeft=0;H.setWidth(E);
if(this.scrolling){this.scrolling=false;this.pos.removeClass("x-tab-scrolling");this.scrollLeft.hide();
this.scrollRight.hide();if(Ext.isAir||Ext.isWebKit){G.style.marginLeft="";G.style.marginRight="";
}}}else{if(!this.scrolling){this.pos.addClass("x-tab-scrolling");if(Ext.isAir||Ext.isWebKit){G.style.marginLeft="18px";
G.style.marginRight="18px";}}E-=H.getMargins("lr");H.setWidth(E>20?E:20);if(!this.scrolling){if(!this.scrollLeft){this.createScrollers();
}else{this.scrollLeft.show();this.scrollRight.show();}}this.scrolling=true;if(B>(C-E)){G.scrollLeft=C-E;
}else{this.scrollToTab(this.activeTab,false);}this.updateScrollButtons();}},createScrollers:function(){this.pos.addClass("x-tab-scrolling-"+this.tabPosition);
var C=this.stripWrap.dom.offsetHeight;var A=this.pos.insertFirst({cls:"x-tab-scroller-left"});
A.setHeight(C);A.addClassOnOver("x-tab-scroller-left-over");this.leftRepeater=new Ext.util.ClickRepeater(A,{interval:this.scrollRepeatInterval,handler:this.onScrollLeft,scope:this});
this.scrollLeft=A;var B=this.pos.insertFirst({cls:"x-tab-scroller-right"});B.setHeight(C);
B.addClassOnOver("x-tab-scroller-right-over");this.rightRepeater=new Ext.util.ClickRepeater(B,{interval:this.scrollRepeatInterval,handler:this.onScrollRight,scope:this});
this.scrollRight=B;},getScrollWidth:function(){return this.edge.getOffsetsTo(this.stripWrap)[0]+this.getScrollPos();
},getScrollPos:function(){return parseInt(this.stripWrap.dom.scrollLeft,10)||0;},getScrollArea:function(){return parseInt(this.stripWrap.dom.clientWidth,10)||0;
},getScrollAnim:function(){return{duration:this.scrollDuration,callback:this.updateScrollButtons,scope:this};
},getScrollIncrement:function(){return this.scrollIncrement||(this.resizeTabs?this.lastTabWidth+2:100);
},scrollToTab:function(F,B){if(!F){return;}var D=this.getTabEl(F);var A=this.getScrollPos(),E=this.getScrollArea();
var G=Ext.fly(D).getOffsetsTo(this.stripWrap)[0]+A;var C=G+D.offsetWidth;if(G<A){this.scrollTo(G,B);
}else{if(C>(A+E)){this.scrollTo(C-E,B);}}},scrollTo:function(B,A){this.stripWrap.scrollTo("left",B,A?this.getScrollAnim():false);
if(!A){this.updateScrollButtons();}},onWheel:function(F){var A=F.getWheelDelta()*this.wheelIncrement*-1;
F.stopEvent();var B=this.getScrollPos();var E=B+A;var C=this.getScrollWidth()-this.getScrollArea();
var D=Math.max(0,Math.min(C,E));if(D!=B){this.scrollTo(D,false);}},onScrollRight:function(){var A=this.getScrollWidth()-this.getScrollArea();
var C=this.getScrollPos();var B=Math.min(A,C+this.getScrollIncrement());if(B!=C){this.scrollTo(B,this.animScroll);
}},onScrollLeft:function(){var B=this.getScrollPos();var A=Math.max(0,B-this.getScrollIncrement());
if(A!=B){this.scrollTo(A,this.animScroll);}},updateScrollButtons:function(){var A=this.getScrollPos();
this.scrollLeft[A===0?"addClass":"removeClass"]("x-tab-scroller-left-disabled");this.scrollRight[A>=(this.getScrollWidth()-this.getScrollArea())?"addClass":"removeClass"]("x-tab-scroller-right-disabled");
},beforeDestroy:function(){if(this.items){this.items.each(function(A){if(A&&A.tabEl){Ext.get(A.tabEl).removeAllListeners();
A.tabEl=null;}},this);}if(this.strip){this.strip.removeAllListeners();}Ext.TabPanel.superclass.beforeDestroy.apply(this);
}});Ext.reg("tabpanel",Ext.TabPanel);Ext.TabPanel.prototype.activate=Ext.TabPanel.prototype.setActiveTab;
Ext.TabPanel.AccessStack=function(){var A=[];return{add:function(B){A.push(B);if(A.length>10){A.shift();
}},remove:function(E){var D=[];for(var C=0,B=A.length;C<B;C++){if(A[C]!=E){D.push(A[C]);
}}A=D;},next:function(){return A.pop();}};};Ext.Button=Ext.extend(Ext.BoxComponent,{hidden:false,disabled:false,pressed:false,enableToggle:false,menuAlign:"tl-bl?",type:"button",menuClassTarget:"tr:nth(2)",clickEvent:"click",handleMouseEvents:true,tooltipType:"qtip",buttonSelector:"button:first-child",scale:"small",iconAlign:"left",arrowAlign:"right",initComponent:function(){Ext.Button.superclass.initComponent.call(this);
this.addEvents("click","toggle","mouseover","mouseout","menushow","menuhide","menutriggerover","menutriggerout");
if(this.menu){this.menu=Ext.menu.MenuMgr.get(this.menu);}if(Ext.isString(this.toggleGroup)){this.enableToggle=true;
}},getTemplateArgs:function(){var A=(this.cls||"");A+=(this.iconCls||this.icon)?(this.text?" x-btn-text-icon":" x-btn-icon"):" x-btn-noicon";
if(this.pressed){A+=" x-btn-pressed";}return[this.text||"&#160;",this.type,this.iconCls||"",A,"x-btn-"+this.scale+" x-btn-icon-"+this.scale+"-"+this.iconAlign,this.getMenuClass()];
},getMenuClass:function(){return this.menu?(this.arrowAlign!="bottom"?"x-btn-arrow":"x-btn-arrow-bottom"):"";
},onRender:function(C,A){if(!this.template){if(!Ext.Button.buttonTemplate){Ext.Button.buttonTemplate=new Ext.Template('<table cellspacing="0" class="x-btn {3}"><tbody class="{4}">','<tr><td class="x-btn-tl"><i>&#160;</i></td><td class="x-btn-tc"></td><td class="x-btn-tr"><i>&#160;</i></td></tr>','<tr><td class="x-btn-ml"><i>&#160;</i></td><td class="x-btn-mc"><em class="{5}" unselectable="on"><button class="x-btn-text {2}" type="{1}">{0}</button></em></td><td class="x-btn-mr"><i>&#160;</i></td></tr>','<tr><td class="x-btn-bl"><i>&#160;</i></td><td class="x-btn-bc"></td><td class="x-btn-br"><i>&#160;</i></td></tr>',"</tbody></table>");
Ext.Button.buttonTemplate.compile();}this.template=Ext.Button.buttonTemplate;}var B,D=this.getTemplateArgs();
if(A){B=this.template.insertBefore(A,D,true);}else{B=this.template.append(C,D,true);
}this.btnEl=B.child(this.buttonSelector);this.mon(this.btnEl,{scope:this,focus:this.onFocus,blur:this.onBlur});
this.initButtonEl(B,this.btnEl);Ext.ButtonToggleMgr.register(this);},initButtonEl:function(B,C){this.el=B;
if(this.id){this.el.dom.id=this.el.id=this.id;}if(this.icon){C.setStyle("background-image","url("+this.icon+")");
}if(this.tabIndex!==undefined){C.dom.tabIndex=this.tabIndex;}if(this.tooltip){this.setTooltip(this.tooltip,true);
}if(this.handleMouseEvents){this.mon(B,{scope:this,mouseover:this.onMouseOver,mousedown:this.onMouseDown});
}if(this.menu){this.mon(this.menu,{scope:this,show:this.onMenuShow,hide:this.onMenuHide});
}if(this.repeat){var A=new Ext.util.ClickRepeater(B,Ext.isObject(this.repeat)?this.repeat:{});
this.mon(A,"click",this.onClick,this);}this.mon(B,this.clickEvent,this.onClick,this);
},afterRender:function(){Ext.Button.superclass.afterRender.call(this);this.doAutoWidth();
},setIconClass:function(A){if(this.el){this.btnEl.replaceClass(this.iconCls,A);}this.iconCls=A;
return this;},setTooltip:function(B,A){if(this.rendered){if(!A){this.clearTip();}if(Ext.isObject(B)){Ext.QuickTips.register(Ext.apply({target:this.btnEl.id},B));
this.tooltip=B;}else{this.btnEl.dom[this.tooltipType]=B;}}else{this.tooltip=B;}return this;
},clearTip:function(){if(Ext.isObject(this.tooltip)){Ext.QuickTips.unregister(this.btnEl);
}},beforeDestroy:function(){if(this.rendered){this.clearTip();}Ext.destroy(this.menu,this.repeater);
},onDestroy:function(){var A=Ext.getDoc();A.un("mouseover",this.monitorMouseOver,this);
A.un("mouseup",this.onMouseUp,this);if(this.rendered){Ext.ButtonToggleMgr.unregister(this);
}},doAutoWidth:function(){if(this.el&&this.text&&this.width===undefined){this.el.setWidth("auto");
if(Ext.isIE7&&Ext.isStrict){var A=this.btnEl;if(A&&A.getWidth()>20){A.clip();A.setWidth(Ext.util.TextMetrics.measure(A,this.text).width+A.getFrameWidth("lr"));
}}if(this.minWidth){if(this.el.getWidth()<this.minWidth){this.el.setWidth(this.minWidth);
}}}},setHandler:function(B,A){this.handler=B;this.scope=A;return this;},setText:function(A){this.text=A;
if(this.el){this.el.child("td.x-btn-mc "+this.buttonSelector).update(A);}this.doAutoWidth();
return this;},getText:function(){return this.text;},toggle:function(B,A){B=B===undefined?!this.pressed:!!B;
if(B!=this.pressed){this.el[B?"addClass":"removeClass"]("x-btn-pressed");this.pressed=B;
if(!A){this.fireEvent("toggle",this,B);if(this.toggleHandler){this.toggleHandler.call(this.scope||this,this,B);
}}}return this;},focus:function(){this.btnEl.focus();},onDisable:function(){this.onDisableChange(true);
},onEnable:function(){this.onDisableChange(false);},onDisableChange:function(A){if(this.el){if(!Ext.isIE6||!this.text){this.el[A?"addClass":"removeClass"](this.disabledClass);
}this.el.dom.disabled=A;}this.disabled=A;},showMenu:function(){if(this.rendered&&this.menu){if(this.tooltip){Ext.QuickTips.getQuickTip().cancelShow(this.btnEl);
}this.menu.show(this.el,this.menuAlign);}return this;},hideMenu:function(){if(this.menu){this.menu.hide();
}return this;},hasVisibleMenu:function(){return this.menu&&this.menu.isVisible();
},onClick:function(A){if(A){A.preventDefault();}if(A.button!==0){return;}if(!this.disabled){if(this.enableToggle&&(this.allowDepress!==false||!this.pressed)){this.toggle();
}if(this.menu&&!this.menu.isVisible()&&!this.ignoreNextClick){this.showMenu();}this.fireEvent("click",this,A);
if(this.handler){this.handler.call(this.scope||this,this,A);}}},isMenuTriggerOver:function(B,A){return this.menu&&!A;
},isMenuTriggerOut:function(B,A){return this.menu&&!A;},onMouseOver:function(B){if(!this.disabled){var A=B.within(this.el,true);
if(!A){this.el.addClass("x-btn-over");if(!this.monitoringMouseOver){Ext.getDoc().on("mouseover",this.monitorMouseOver,this);
this.monitoringMouseOver=true;}this.fireEvent("mouseover",this,B);}if(this.isMenuTriggerOver(B,A)){this.fireEvent("menutriggerover",this,this.menu,B);
}}},monitorMouseOver:function(A){if(A.target!=this.el.dom&&!A.within(this.el)){if(this.monitoringMouseOver){Ext.getDoc().un("mouseover",this.monitorMouseOver,this);
this.monitoringMouseOver=false;}this.onMouseOut(A);}},onMouseOut:function(B){var A=B.within(this.el)&&B.target!=this.el.dom;
this.el.removeClass("x-btn-over");this.fireEvent("mouseout",this,B);if(this.isMenuTriggerOut(B,A)){this.fireEvent("menutriggerout",this,this.menu,B);
}},onFocus:function(A){if(!this.disabled){this.el.addClass("x-btn-focus");}},onBlur:function(A){this.el.removeClass("x-btn-focus");
},getClickEl:function(B,A){return this.el;},onMouseDown:function(A){if(!this.disabled&&A.button===0){this.getClickEl(A).addClass("x-btn-click");
Ext.getDoc().on("mouseup",this.onMouseUp,this);}},onMouseUp:function(A){if(A.button===0){this.getClickEl(A,true).removeClass("x-btn-click");
Ext.getDoc().un("mouseup",this.onMouseUp,this);}},onMenuShow:function(A){this.ignoreNextClick=0;
this.el.addClass("x-btn-menu-active");this.fireEvent("menushow",this,this.menu);},onMenuHide:function(A){this.el.removeClass("x-btn-menu-active");
this.ignoreNextClick=this.restoreClick.defer(250,this);this.fireEvent("menuhide",this,this.menu);
},restoreClick:function(){this.ignoreNextClick=0;}});Ext.reg("button",Ext.Button);
Ext.ButtonToggleMgr=function(){var A={};function B(G,D){if(D){var C=A[G.toggleGroup];
for(var F=0,E=C.length;F<E;F++){if(C[F]!=G){C[F].toggle(false);}}}}return{register:function(D){if(!D.toggleGroup){return;
}var C=A[D.toggleGroup];if(!C){C=A[D.toggleGroup]=[];}C.push(D);D.on("toggle",B);
},unregister:function(D){if(!D.toggleGroup){return;}var C=A[D.toggleGroup];if(C){C.remove(D);
D.un("toggle",B);}},getPressed:function(C){var F=A[C];if(F){for(var E=0,D=F.length;
E<D;E++){if(F[E].pressed===true){return F[E];}}}return null;}};}();Ext.SplitButton=Ext.extend(Ext.Button,{arrowSelector:"em",split:true,initComponent:function(){Ext.SplitButton.superclass.initComponent.call(this);
this.addEvents("arrowclick");},onRender:function(){Ext.SplitButton.superclass.onRender.apply(this,arguments);
if(this.arrowTooltip){this.el.child(this.arrowSelector).dom[this.tooltipType]=this.arrowTooltip;
}},setArrowHandler:function(B,A){this.arrowHandler=B;this.scope=A;},getMenuClass:function(){return"x-btn-split"+(this.arrowAlign=="bottom"?"-bottom":"");
},isClickOnArrow:function(A){return this.arrowAlign!="bottom"?A.getPageX()>this.el.child(this.buttonSelector).getRegion().right:A.getPageY()>this.el.child(this.buttonSelector).getRegion().bottom;
},onClick:function(B,A){B.preventDefault();if(!this.disabled){if(this.isClickOnArrow(B)){if(this.menu&&!this.menu.isVisible()&&!this.ignoreNextClick){this.showMenu();
}this.fireEvent("arrowclick",this,B);if(this.arrowHandler){this.arrowHandler.call(this.scope||this,this,B);
}}else{if(this.enableToggle){this.toggle();}this.fireEvent("click",this,B);if(this.handler){this.handler.call(this.scope||this,this,B);
}}}},isMenuTriggerOver:function(A){return this.menu&&A.target.tagName=="em";},isMenuTriggerOut:function(B,A){return this.menu&&B.target.tagName!="em";
}});Ext.reg("splitbutton",Ext.SplitButton);Ext.CycleButton=Ext.extend(Ext.SplitButton,{getItemText:function(A){if(A&&this.showText===true){var B="";
if(this.prependText){B+=this.prependText;}B+=A.text;return B;}return undefined;},setActiveItem:function(C,A){if(typeof C!="object"){C=this.menu.items.get(C);
}if(C){if(!this.rendered){this.text=this.getItemText(C);this.iconCls=C.iconCls;}else{var B=this.getItemText(C);
if(B){this.setText(B);}this.setIconClass(C.iconCls);}this.activeItem=C;if(!C.checked){C.setChecked(true,true);
}if(this.forceIcon){this.setIconClass(this.forceIcon);}if(!A){this.fireEvent("change",this,C);
}}},getActiveItem:function(){return this.activeItem;},initComponent:function(){this.addEvents("change");
if(this.changeHandler){this.on("change",this.changeHandler,this.scope||this);delete this.changeHandler;
}this.itemCount=this.items.length;this.menu={cls:"x-cycle-menu",items:[]};var D;for(var B=0,A=this.itemCount;
B<A;B++){var C=this.items[B];C.group=C.group||this.id;C.itemIndex=B;C.checkHandler=this.checkHandler;
C.scope=this;C.checked=C.checked||false;this.menu.items.push(C);if(C.checked){D=C;
}}this.setActiveItem(D,true);Ext.CycleButton.superclass.initComponent.call(this);
this.on("click",this.toggleSelected,this);},checkHandler:function(A,B){if(B){this.setActiveItem(A);
}},toggleSelected:function(){this.menu.render();var C,A;for(var B=1;B<this.itemCount;
B++){C=(this.activeItem.itemIndex+B)%this.itemCount;A=this.menu.items.itemAt(C);if(!A.disabled){A.setChecked(true);
break;}}}});Ext.reg("cycle",Ext.CycleButton);Ext.layout.ToolbarLayout=Ext.extend(Ext.layout.ContainerLayout,{monitorResize:true,triggerWidth:18,lastOverflow:false,noItemsMenuText:'<div class="x-toolbar-no-items">(None)</div>',onLayout:function(G,I){if(!this.leftTr){I.addClass("x-toolbar-layout-ct");
I.insertHtml("beforeEnd",'<table cellspacing="0" class="x-toolbar-ct"><tbody><tr><td class="x-toolbar-left" align="left"><table cellspacing="0"><tbody><tr class="x-toolbar-left-row"></tr></tbody></table></td><td class="x-toolbar-right" align="right"><table cellspacing="0" class="x-toolbar-right-ct"><tbody><tr><td><table cellspacing="0"><tbody><tr class="x-toolbar-right-row"></tr></tbody></table></td><td><table cellspacing="0"><tbody><tr class="x-toolbar-extras-row"></tr></tbody></table></td></tr></tbody></table></td></tr></tbody></table>');
this.leftTr=I.child("tr.x-toolbar-left-row",true);this.rightTr=I.child("tr.x-toolbar-right-row",true);
this.extrasTr=I.child("tr.x-toolbar-extras-row",true);}var A=this.leftTr;var D=0;
var B=G.items.items;for(var F=0,H=B.length,C;F<H;F++,D++){C=B[F];if(C.isFill){A=this.rightTr;
D=-1;}else{if(!C.rendered){C.render(this.insertCell(C,A,D));}else{if(!C.xtbHidden&&!this.isValidParent(C,A.childNodes[D])){var E=this.insertCell(C,A,D);
E.appendChild(C.getDomPositionEl().dom);C.container=Ext.get(E);}}}}this.cleanup(this.leftTr);
this.cleanup(this.rightTr);this.cleanup(this.extrasTr);this.fitToSize(I);},cleanup:function(B){var D=B.childNodes;
for(var A=D.length-1,C;A>=0&&(C=D[A]);A--){if(!C.firstChild){B.removeChild(C);}}},insertCell:function(D,A,C){var B=document.createElement("td");
B.className="x-toolbar-cell";A.insertBefore(B,A.childNodes[C]||null);return B;},hideItem:function(B){var A=(this.hiddens=this.hiddens||[]);
A.push(B);B.xtbHidden=true;B.xtbWidth=B.getDomPositionEl().dom.parentNode.offsetWidth;
B.hide();},unhideItem:function(A){A.show();A.xtbHidden=false;this.hiddens.remove(A);
if(this.hiddens.length<1){delete this.hiddens;}},getItemWidth:function(A){return A.hidden?(A.xtbWidth||0):A.getDomPositionEl().dom.parentNode.offsetWidth;
},fitToSize:function(F){if(this.container.enableOverflow===false){return;}var E=F.dom.clientWidth;
var H=this.lastWidth||0;this.lastWidth=E;var I=F.dom.firstChild.offsetWidth;var D=E-this.triggerWidth;
var C=-1;if(I>E||(this.hiddens&&E>=H)){var J,A=this.container.items.items,K=A.length,B;
var G=0;for(J=0;J<K;J++){B=A[J];if(!B.isFill){G+=this.getItemWidth(B);if(G>D){if(!B.xtbHidden){this.hideItem(B);
}}else{if(B.xtbHidden){this.unhideItem(B);}}}}}if(this.hiddens){this.initMore();if(!this.lastOverflow){this.container.fireEvent("overflowchange",this.container,true);
this.lastOverflow=true;}}else{if(this.more){this.clearMenu();this.more.destroy();
delete this.more;if(this.lastOverflow){this.container.fireEvent("overflowchange",this.container,false);
this.lastOverflow=false;}}}},createMenuConfig:function(D,B){var A=Ext.apply({},D.initialConfig),C=D.toggleGroup;
Ext.apply(A,{text:D.overflowText||D.text,iconCls:D.iconCls,icon:D.icon,itemId:D.itemId,disabled:D.disabled,handler:D.handler,scope:D.scope,menu:D.menu,hideOnClick:B});
if(C||D.enableToggle){Ext.apply(A,{group:C,checked:D.pressed,listeners:{checkchange:function(E,F){D.toggle(F);
}}});}delete A.xtype;delete A.id;return A;},addComponentToMenu:function(A,B){if(B instanceof Ext.Toolbar.Separator){A.add("-");
}else{if(Ext.isFunction(B.isXType)){if(B.isXType("splitbutton")){A.add(this.createMenuConfig(B,true));
}else{if(B.isXType("button")){A.add(this.createMenuConfig(B,!B.menu));}else{if(B.isXType("buttongroup")){B.items.each(function(C){this.addComponentToMenu(A,C);
},this);}}}}}},clearMenu:function(){var A=this.moreMenu;if(A&&A.items){this.moreMenu.items.each(function(B){delete B.menu;
});}},beforeMoreShow:function(D){var G=this.container.items.items,C=G.length,B,A,E=function(H,I){return H.isXType("buttongroup")&&!(I instanceof Ext.Toolbar.Separator);
};this.clearMenu();D.removeAll();for(var F=0;F<C;F++){B=G[F];if(B.xtbHidden){if(A&&(E(B,A)||E(A,B))){D.add("-");
}this.addComponentToMenu(D,B);A=B;}}if(D.items.length<1){D.add(this.noItemsMenuText);
}},initMore:function(){if(!this.more){this.moreMenu=new Ext.menu.Menu({listeners:{beforeshow:this.beforeMoreShow,scope:this}});
this.more=new Ext.Button({iconCls:"x-toolbar-more-icon",cls:"x-toolbar-more",menu:this.moreMenu});
var A=this.insertCell(this.more,this.extrasTr,100);this.more.render(A);}},destroy:function(){Ext.destroy(this.more,this.moreMenu);
Ext.layout.ToolbarLayout.superclass.destroy.call(this);}});Ext.Container.LAYOUTS.toolbar=Ext.layout.ToolbarLayout;
Ext.Toolbar=function(A){if(Ext.isArray(A)){A={items:A,layout:"toolbar"};}else{A=Ext.apply({layout:"toolbar"},A);
if(A.buttons){A.items=A.buttons;}}Ext.Toolbar.superclass.constructor.call(this,A);
};(function(){var A=Ext.Toolbar;Ext.extend(A,Ext.Container,{defaultType:"button",trackMenus:true,internalDefaults:{removeMode:"container",hideParent:true},toolbarCls:"x-toolbar",initComponent:function(){A.superclass.initComponent.call(this);
this.addEvents("overflowchange");},onRender:function(C,B){if(!this.el){if(!this.autoCreate){this.autoCreate={cls:this.toolbarCls+" x-small-editor"};
}this.el=C.createChild(Ext.apply({id:this.id},this.autoCreate),B);}},lookupComponent:function(B){if(Ext.isString(B)){if(B=="-"){B=new A.Separator();
}else{if(B==" "){B=new A.Spacer();}else{if(B=="->"){B=new A.Fill();}else{B=new A.TextItem(B);
}}}this.applyDefaults(B);}else{if(B.isFormField||B.render){B=this.constructItem(B);
}else{if(B.tag){B=new A.Item({autoEl:B});}else{if(B.tagName){B=new A.Item({el:B});
}else{if(Ext.isObject(B)){B=B.xtype?this.constructItem(B):this.constructButton(B);
}}}}}return B;},applyDefaults:function(C){if(!Ext.isString(C)){C=Ext.Toolbar.superclass.applyDefaults.call(this,C);
var B=this.internalDefaults;if(C.events){Ext.applyIf(C.initialConfig,B);Ext.apply(C,B);
}else{Ext.applyIf(C,B);}}return C;},constructItem:function(C,B){return Ext.create(C,B||this.defaultType);
},addSeparator:function(){return this.add(new A.Separator());},addSpacer:function(){return this.add(new A.Spacer());
},addFill:function(){this.add(new A.Fill());},addElement:function(B){return this.addItem(new A.Item({el:B}));
},addItem:function(B){return Ext.Toolbar.superclass.add.apply(this,arguments);},addButton:function(C){if(Ext.isArray(C)){var E=[];
for(var D=0,B=C.length;D<B;D++){E.push(this.addButton(C[D]));}return E;}return this.add(this.constructButton(C));
},addText:function(B){return this.addItem(new A.TextItem(B));},addDom:function(B){return this.add(new A.Item({autoEl:B}));
},addField:function(B){return this.add(B);},insertButton:function(D,B){if(Ext.isArray(B)){var F=[];
for(var E=0,C=B.length;E<C;E++){F.push(this.insertButton(D+E,B[E]));}return F;}return Ext.Toolbar.superclass.insert.call(this,D,B);
},initMenuTracking:function(B){if(this.trackMenus&&B.menu){this.mon(B,{menutriggerover:this.onButtonTriggerOver,menushow:this.onButtonMenuShow,menuhide:this.onButtonMenuHide,scope:this});
}},constructButton:function(B){var C=B.events?B:this.constructItem(B,B.split?"splitbutton":this.defaultType);
this.initMenuTracking(C);return C;},onDisable:function(){this.items.each(function(B){if(B.disable){B.disable();
}});},onEnable:function(){this.items.each(function(B){if(B.enable){B.enable();}});
},onButtonTriggerOver:function(B){if(this.activeMenuBtn&&this.activeMenuBtn!=B){this.activeMenuBtn.hideMenu();
B.showMenu();this.activeMenuBtn=B;}},onButtonMenuShow:function(B){this.activeMenuBtn=B;
},onButtonMenuHide:function(B){delete this.activeMenuBtn;}});Ext.reg("toolbar",Ext.Toolbar);
A.Item=Ext.extend(Ext.BoxComponent,{hideParent:true,enable:Ext.emptyFn,disable:Ext.emptyFn,focus:Ext.emptyFn});
Ext.reg("tbitem",A.Item);A.Separator=Ext.extend(A.Item,{onRender:function(C,B){this.el=C.createChild({tag:"span",cls:"xtb-sep"},B);
}});Ext.reg("tbseparator",A.Separator);A.Spacer=Ext.extend(A.Item,{onRender:function(C,B){this.el=C.createChild({tag:"div",cls:"xtb-spacer",style:this.width?"width:"+this.width+"px":""},B);
}});Ext.reg("tbspacer",A.Spacer);A.Fill=Ext.extend(A.Item,{render:Ext.emptyFn,isFill:true});
Ext.reg("tbfill",A.Fill);A.TextItem=Ext.extend(A.Item,{constructor:function(B){if(Ext.isString(B)){B={autoEl:{cls:"xtb-text",html:B}};
}else{B.autoEl={cls:"xtb-text",html:B.text||""};}A.TextItem.superclass.constructor.call(this,B);
},setText:function(B){if(this.rendered){this.el.dom.innerHTML=B;}else{this.autoEl.html=B;
}}});Ext.reg("tbtext",A.TextItem);A.Button=Ext.extend(Ext.Button,{});A.SplitButton=Ext.extend(Ext.SplitButton,{});
Ext.reg("tbbutton",A.Button);Ext.reg("tbsplit",A.SplitButton);})();Ext.ButtonGroup=Ext.extend(Ext.Panel,{baseCls:"x-btn-group",layout:"table",defaultType:"button",frame:true,internalDefaults:{removeMode:"container",hideParent:true},initComponent:function(){this.layoutConfig=this.layoutConfig||{};
Ext.applyIf(this.layoutConfig,{columns:this.columns});if(!this.title){this.addClass("x-btn-group-notitle");
}this.on("afterlayout",this.onAfterLayout,this);Ext.ButtonGroup.superclass.initComponent.call(this);
},applyDefaults:function(B){B=Ext.ButtonGroup.superclass.applyDefaults.call(this,B);
var A=this.internalDefaults;if(B.events){Ext.applyIf(B.initialConfig,A);Ext.apply(B,A);
}else{Ext.applyIf(B,A);}return B;},onAfterLayout:function(){var A=this.body.getFrameWidth("lr")+this.body.dom.firstChild.offsetWidth;
this.body.setWidth(A);this.el.setWidth(A+this.getFrameWidth());}});Ext.reg("buttongroup",Ext.ButtonGroup);
(function(){var A=Ext.Toolbar;Ext.PagingToolbar=Ext.extend(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",initComponent:function(){var C=[this.first=new A.Button({tooltip:this.firstText,overflowText:this.firstText,iconCls:"x-tbar-page-first",disabled:true,handler:this.moveFirst,scope:this}),this.prev=new A.Button({tooltip:this.prevText,overflowText:this.prevText,iconCls:"x-tbar-page-prev",disabled:true,handler:this.movePrevious,scope:this}),"-",this.beforePageText,this.inputItem=new Ext.form.NumberField({cls:"x-tbar-page-number",allowDecimals:false,allowNegative:false,enableKeyEvents:true,selectOnFocus:true,listeners:{scope:this,keydown:this.onPagingKeyDown,blur:this.onPagingBlur}}),this.afterTextItem=new A.TextItem({text:String.format(this.afterPageText,1)}),"-",this.next=new A.Button({tooltip:this.nextText,overflowText:this.nextText,iconCls:"x-tbar-page-next",disabled:true,handler:this.moveNext,scope:this}),this.last=new A.Button({tooltip:this.lastText,overflowText:this.lastText,iconCls:"x-tbar-page-last",disabled:true,handler:this.moveLast,scope:this}),"-",this.refresh=new A.Button({tooltip:this.refreshText,overflowText:this.refreshText,iconCls:"x-tbar-loading",handler:this.refresh,scope:this})];
var B=this.items||this.buttons||[];if(this.prependButtons){this.items=B.concat(C);
}else{this.items=C.concat(B);}delete this.buttons;if(this.displayInfo){this.items.push("->");
this.items.push(this.displayItem=new A.TextItem({}));}Ext.PagingToolbar.superclass.initComponent.call(this);
this.addEvents("change","beforechange");this.on("afterlayout",this.onFirstLayout,this,{single:true});
this.cursor=0;this.bindStore(this.store);},onFirstLayout:function(){if(this.dsLoaded){this.onLoad.apply(this,this.dsLoaded);
}},updateInfo:function(){if(this.displayItem){var B=this.store.getCount();var C=B==0?this.emptyMsg:String.format(this.displayMsg,this.cursor+1,this.cursor+B,this.store.getTotalCount());
this.displayItem.setText(C);}},onLoad:function(E,G,D){if(!this.rendered){this.dsLoaded=[E,G,D];
return;}var H=this.getParams();this.cursor=(D.params&&D.params[H.start])?D.params[H.start]:0;
var C=this.getPageData(),F=C.activePage,B=C.pages;this.afterTextItem.setText(String.format(this.afterPageText,C.pages));
this.inputItem.setValue(F);this.first.setDisabled(F==1);this.prev.setDisabled(F==1);
this.next.setDisabled(F==B);this.last.setDisabled(F==B);this.refresh.enable();this.updateInfo();
this.fireEvent("change",this,C);},getPageData:function(){var B=this.store.getTotalCount();
return{total:B,activePage:Math.ceil((this.cursor+this.pageSize)/this.pageSize),pages:B<this.pageSize?1:Math.ceil(B/this.pageSize)};
},changePage:function(B){this.doLoad(((B-1)*this.pageSize).constrain(0,this.store.getTotalCount()));
},onLoadError:function(){if(!this.rendered){return;}this.refresh.enable();},readPage:function(D){var B=this.inputItem.getValue(),C;
if(!B||isNaN(C=parseInt(B,10))){this.inputItem.setValue(D.activePage);return false;
}return C;},onPagingFocus:function(){this.inputItem.select();},onPagingBlur:function(B){this.inputItem.setValue(this.getPageData().activePage);
},onPagingKeyDown:function(C,B){var F=B.getKey(),D=this.getPageData(),G;if(F==B.RETURN){B.stopEvent();
G=this.readPage(D);if(G!==false){G=Math.min(Math.max(1,G),D.pages)-1;this.doLoad(G*this.pageSize);
}}else{if(F==B.HOME||F==B.END){B.stopEvent();G=F==B.HOME?1:D.pages;C.setValue(G);
}else{if(F==B.UP||F==B.PAGEUP||F==B.DOWN||F==B.PAGEDOWN){B.stopEvent();if((G=this.readPage(D))){var E=B.shiftKey?10:1;
if(F==B.DOWN||F==B.PAGEDOWN){E*=-1;}G+=E;if(G>=1&G<=D.pages){C.setValue(G);}}}}}},getParams:function(){return this.paramNames||this.store.paramNames;
},beforeLoad:function(){if(this.rendered&&this.refresh){this.refresh.disable();}},doLoad:function(D){var C={},B=this.getParams();
C[B.start]=D;C[B.limit]=this.pageSize;if(this.fireEvent("beforechange",this,C)!==false){this.store.load({params:C});
}},moveFirst:function(){this.doLoad(0);},movePrevious:function(){this.doLoad(Math.max(0,this.cursor-this.pageSize));
},moveNext:function(){this.doLoad(this.cursor+this.pageSize);},moveLast:function(){var C=this.store.getTotalCount(),B=C%this.pageSize;
this.doLoad(B?(C-B):C-this.pageSize);},refresh:function(){this.doLoad(this.cursor);
},bindStore:function(C,D){var B;if(!D&&this.store){this.store.un("beforeload",this.beforeLoad,this);
this.store.un("load",this.onLoad,this);this.store.un("exception",this.onLoadError,this);
if(C!==this.store&&this.store.autoDestroy){this.store.destroy();}}if(C){C=Ext.StoreMgr.lookup(C);
C.on({scope:this,beforeload:this.beforeLoad,load:this.onLoad,exception:this.onLoadError});
B=C.getCount()>0;}this.store=C;if(B){this.onLoad(C,null,{});}},unbind:function(B){this.bindStore(null);
},bind:function(B){this.bindStore(B);},onDestroy:function(){this.bindStore(null);
Ext.PagingToolbar.superclass.onDestroy.call(this);}});})();Ext.reg("paging",Ext.PagingToolbar);
Ext.form.Field=Ext.extend(Ext.BoxComponent,{invalidClass:"x-form-invalid",invalidText:"The value in this field is invalid",focusClass:"x-form-focus",validationEvent:"keyup",validateOnBlur:true,validationDelay:250,defaultAutoCreate:{tag:"input",type:"text",size:"20",autocomplete:"off"},fieldClass:"x-form-field",msgTarget:"qtip",msgFx:"normal",readOnly:false,disabled:false,isFormField:true,hasFocus:false,initComponent:function(){Ext.form.Field.superclass.initComponent.call(this);
this.addEvents("focus","blur","specialkey","change","invalid","valid");},getName:function(){return this.rendered&&this.el.dom.name?this.el.dom.name:this.name||this.id||"";
},onRender:function(C,A){if(!this.el){var B=this.getAutoCreate();if(!B.name){B.name=this.name||this.id;
}if(this.inputType){B.type=this.inputType;}this.autoEl=B;}Ext.form.Field.superclass.onRender.call(this,C,A);
var D=this.el.dom.type;if(D){if(D=="password"){D="text";}this.el.addClass("x-form-"+D);
}if(this.readOnly){this.el.dom.readOnly=true;}if(this.tabIndex!==undefined){this.el.dom.setAttribute("tabIndex",this.tabIndex);
}this.el.addClass([this.fieldClass,this.cls]);},getItemCt:function(){return this.el.up(".x-form-item",4);
},initValue:function(){if(this.value!==undefined){this.setValue(this.value);}else{if(!Ext.isEmpty(this.el.dom.value)&&this.el.dom.value!=this.emptyText){this.setValue(this.el.dom.value);
}}this.originalValue=this.getValue();},isDirty:function(){if(this.disabled||!this.rendered){return false;
}return String(this.getValue())!==String(this.originalValue);},afterRender:function(){Ext.form.Field.superclass.afterRender.call(this);
this.initEvents();this.initValue();},fireKey:function(A){if(A.isSpecialKey()){this.fireEvent("specialkey",this,A);
}},reset:function(){this.setValue(this.originalValue);this.clearInvalid();},initEvents:function(){this.mon(this.el,Ext.EventManager.useKeydown?"keydown":"keypress",this.fireKey,this);
this.mon(this.el,"focus",this.onFocus,this);var A=this.inEditor&&Ext.isWindows&&Ext.isGecko?{buffer:10}:null;
this.mon(this.el,"blur",this.onBlur,this,A);},onFocus:function(){if(this.focusClass){this.el.addClass(this.focusClass);
}if(!this.hasFocus){this.hasFocus=true;this.startValue=this.getValue();this.fireEvent("focus",this);
}},beforeBlur:Ext.emptyFn,onBlur:function(){this.beforeBlur();if(this.focusClass){this.el.removeClass(this.focusClass);
}this.hasFocus=false;if(this.validationEvent!==false&&this.validateOnBlur&&this.validationEvent!="blur"){this.validate();
}var A=this.getValue();if(String(A)!==String(this.startValue)){this.fireEvent("change",this,A,this.startValue);
}this.fireEvent("blur",this);},isValid:function(A){if(this.disabled){return true;
}var C=this.preventMark;this.preventMark=A===true;var B=this.validateValue(this.processValue(this.getRawValue()));
this.preventMark=C;return B;},validate:function(){if(this.disabled||this.validateValue(this.processValue(this.getRawValue()))){this.clearInvalid();
return true;}return false;},processValue:function(A){return A;},validateValue:function(A){return true;
},markInvalid:function(C){if(!this.rendered||this.preventMark){return;}C=C||this.invalidText;
var A=this.getMessageHandler();if(A){A.mark(this,C);}else{if(this.msgTarget){this.el.addClass(this.invalidClass);
var B=Ext.getDom(this.msgTarget);if(B){B.innerHTML=C;B.style.display=this.msgDisplay;
}}}this.fireEvent("invalid",this,C);},clearInvalid:function(){if(!this.rendered||this.preventMark){return;
}this.el.removeClass(this.invalidClass);var A=this.getMessageHandler();if(A){A.clear(this);
}else{if(this.msgTarget){this.el.removeClass(this.invalidClass);var B=Ext.getDom(this.msgTarget);
if(B){B.innerHTML="";B.style.display="none";}}}this.fireEvent("valid",this);},getMessageHandler:function(){return Ext.form.MessageTargets[this.msgTarget];
},getErrorCt:function(){return this.el.findParent(".x-form-element",5,true)||this.el.findParent(".x-form-field-wrap",5,true);
},alignErrorIcon:function(){this.errorIcon.alignTo(this.el,"tl-tr",[2,0]);},getRawValue:function(){var A=this.rendered?this.el.getValue():Ext.value(this.value,"");
if(A===this.emptyText){A="";}return A;},getValue:function(){if(!this.rendered){return this.value;
}var A=this.el.getValue();if(A===this.emptyText||A===undefined){A="";}return A;},setRawValue:function(A){return(this.el.dom.value=(Ext.isEmpty(A)?"":A));
},setValue:function(A){this.value=A;if(this.rendered){this.el.dom.value=(Ext.isEmpty(A)?"":A);
this.validate();}return this;},append:function(A){this.setValue([this.getValue(),A].join(""));
},adjustSize:function(A,D){var C=Ext.form.Field.superclass.adjustSize.call(this,A,D);
C.width=this.adjustWidth(this.el.dom.tagName,C.width);if(this.offsetCt){var B=this.getItemCt();
C.width-=B.getFrameWidth("lr");C.height-=B.getFrameWidth("tb");}return C;},adjustWidth:function(A,B){if(typeof B=="number"&&(Ext.isIE&&(Ext.isIE6||!Ext.isStrict))&&/input|textarea/i.test(A)&&!this.inEditor){return B-3;
}return B;}});Ext.form.MessageTargets={qtip:{mark:function(A,B){A.el.addClass(A.invalidClass);
A.el.dom.qtip=B;A.el.dom.qclass="x-form-invalid-tip";if(Ext.QuickTips){Ext.QuickTips.enable();
}},clear:function(A){A.el.removeClass(A.invalidClass);A.el.dom.qtip="";}},title:{mark:function(A,B){A.el.addClass(A.invalidClass);
A.el.dom.title=B;},clear:function(A){A.el.dom.title="";}},under:{mark:function(B,C){B.el.addClass(B.invalidClass);
if(!B.errorEl){var A=B.getErrorCt();if(!A){B.el.dom.title=C;return;}B.errorEl=A.createChild({cls:"x-form-invalid-msg"});
B.errorEl.setWidth(A.getWidth(true)-20);}B.errorEl.update(C);Ext.form.Field.msgFx[B.msgFx].show(B.errorEl,B);
},clear:function(A){A.el.removeClass(A.invalidClass);if(A.errorEl){Ext.form.Field.msgFx[A.msgFx].hide(A.errorEl,A);
}else{A.el.dom.title="";}}},side:{mark:function(B,C){B.el.addClass(B.invalidClass);
if(!B.errorIcon){var A=B.getErrorCt();if(!A){B.el.dom.title=C;return;}B.errorIcon=A.createChild({cls:"x-form-invalid-icon"});
}B.alignErrorIcon();B.errorIcon.dom.qtip=C;B.errorIcon.dom.qclass="x-form-invalid-tip";
B.errorIcon.show();B.on("resize",B.alignErrorIcon,B);},clear:function(A){A.el.removeClass(A.invalidClass);
if(A.errorIcon){A.errorIcon.dom.qtip="";A.errorIcon.hide();A.un("resize",A.alignErrorIcon,A);
}else{A.el.dom.title="";}}}};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(A,B){A.slideOut("l",{stopFx:true,useDisplay:true});
}}};Ext.reg("field",Ext.form.Field);Ext.form.TextField=Ext.extend(Ext.form.Field,{grow:false,growMin:30,growMax:800,vtype:null,maskRe:null,disableKeyFilter:false,allowBlank:true,minLength:0,maxLength:Number.MAX_VALUE,minLengthText:"The minimum length for this field is {0}",maxLengthText:"The maximum length for this field is {0}",selectOnFocus:false,blankText:"This field is required",validator:null,regex:null,regexText:"",emptyText:null,emptyClass:"x-form-empty-field",initComponent:function(){Ext.form.TextField.superclass.initComponent.call(this);
this.addEvents("autosize","keydown","keyup","keypress");},initEvents:function(){Ext.form.TextField.superclass.initEvents.call(this);
if(this.validationEvent=="keyup"){this.validationTask=new Ext.util.DelayedTask(this.validate,this);
this.mon(this.el,"keyup",this.filterValidation,this);}else{if(this.validationEvent!==false){this.mon(this.el,this.validationEvent,this.validate,this,{buffer:this.validationDelay});
}}if(this.selectOnFocus||this.emptyText){this.on("focus",this.preFocus,this);this.mon(this.el,"mousedown",function(){if(!this.hasFocus){this.el.on("mouseup",function(A){A.preventDefault();
},this,{single:true});}},this);if(this.emptyText){this.on("blur",this.postBlur,this);
this.applyEmptyText();}}if(this.maskRe||(this.vtype&&this.disableKeyFilter!==true&&(this.maskRe=Ext.form.VTypes[this.vtype+"Mask"]))){this.mon(this.el,"keypress",this.filterKeys,this);
}if(this.grow){this.mon(this.el,"keyup",this.onKeyUpBuffered,this,{buffer:50});this.mon(this.el,"click",this.autoSize,this);
}if(this.enableKeyEvents){this.mon(this.el,"keyup",this.onKeyUp,this);this.mon(this.el,"keydown",this.onKeyDown,this);
this.mon(this.el,"keypress",this.onKeyPress,this);}},processValue:function(A){if(this.stripCharsRe){var B=A.replace(this.stripCharsRe,"");
if(B!==A){this.setRawValue(B);return B;}}return A;},filterValidation:function(A){if(!A.isNavKeyPress()){this.validationTask.delay(this.validationDelay);
}},onDisable:function(){Ext.form.TextField.superclass.onDisable.call(this);if(Ext.isIE){this.el.dom.unselectable="on";
}},onEnable:function(){Ext.form.TextField.superclass.onEnable.call(this);if(Ext.isIE){this.el.dom.unselectable="";
}},onKeyUpBuffered:function(A){if(!A.isNavKeyPress()){this.autoSize();}},onKeyUp:function(A){this.fireEvent("keyup",this,A);
},onKeyDown:function(A){this.fireEvent("keydown",this,A);},onKeyPress:function(A){this.fireEvent("keypress",this,A);
},reset:function(){Ext.form.TextField.superclass.reset.call(this);this.applyEmptyText();
},applyEmptyText:function(){if(this.rendered&&this.emptyText&&this.getRawValue().length<1&&!this.hasFocus){this.setRawValue(this.emptyText);
this.el.addClass(this.emptyClass);}},preFocus:function(){var A=this.el;if(this.emptyText){if(A.dom.value==this.emptyText){this.setRawValue("");
}A.removeClass(this.emptyClass);}if(this.selectOnFocus){(function(){A.dom.select();
}).defer(this.inEditor&&Ext.isIE?50:0);}},postBlur:function(){this.applyEmptyText();
},filterKeys:function(A){if(A.ctrlKey||A.isSpecialKey()){return;}if(!this.maskRe.test(String.fromCharCode(A.getCharCode()))){A.stopEvent();
}},setValue:function(A){if(this.emptyText&&this.el&&!Ext.isEmpty(A)){this.el.removeClass(this.emptyClass);
}Ext.form.TextField.superclass.setValue.apply(this,arguments);this.applyEmptyText();
this.autoSize();return this;},validateValue:function(A){if(Ext.isFunction(this.validator)){var C=this.validator(A);
if(C!==true){this.markInvalid(C);return false;}}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 B=Ext.form.VTypes;if(!B[this.vtype](A,this)){this.markInvalid(this.vtypeText||B[this.vtype+"Text"]);
return false;}}if(this.regex&&!this.regex.test(A)){this.markInvalid(this.regexText);
return false;}return true;},selectText:function(A,B){var D=this.getRawValue();var E=false;
if(D.length>0){A=A===undefined?0:A;B=B===undefined?D.length:B;var F=this.el.dom;if(F.setSelectionRange){F.setSelectionRange(A,B);
}else{if(F.createTextRange){var C=F.createTextRange();C.moveStart("character",A);
C.moveEnd("character",B-D.length);C.select();}}E=Ext.isGecko||Ext.isOpera;}else{E=true;
}if(E){this.focus();}},autoSize:function(){if(!this.grow||!this.rendered){return;
}if(!this.metrics){this.metrics=Ext.util.TextMetrics.createInstance(this.el);}var C=this.el;
var B=C.dom.value;var D=document.createElement("div");D.appendChild(document.createTextNode(B));
B=D.innerHTML;D=null;Ext.removeNode(D);B+="&#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);},onDestroy:function(){if(this.validationTask){this.validationTask.cancel();
this.validationTask=null;}Ext.form.TextField.superclass.onDestroy.call(this);}});
Ext.reg("textfield",Ext.form.TextField);Ext.form.TriggerField=Ext.extend(Ext.form.TextField,{defaultAutoCreate:{tag:"input",type:"text",size:"16",autocomplete:"off"},hideTrigger:false,editable:true,wrapFocusClass:"x-trigger-wrap-focus",autoSize:Ext.emptyFn,monitorTab:true,deferHeight:true,mimicing:false,actionMode:"wrap",onResize:function(A,B){Ext.form.TriggerField.superclass.onResize.call(this,A,B);
if(typeof A=="number"){this.el.setWidth(this.adjustWidth("input",A-this.trigger.getWidth()));
}this.wrap.setWidth(this.el.getWidth()+this.trigger.getWidth());},adjustSize:Ext.BoxComponent.prototype.adjustSize,getResizeEl:function(){return this.wrap;
},getPositionEl:function(){return this.wrap;},alignErrorIcon:function(){if(this.wrap){this.errorIcon.alignTo(this.wrap,"tl-tr",[2,0]);
}},onRender:function(B,A){Ext.form.TriggerField.superclass.onRender.call(this,B,A);
this.wrap=this.el.wrap({cls:"x-form-field-wrap x-form-field-trigger-wrap"});this.trigger=this.wrap.createChild(this.triggerConfig||{tag:"img",src:Ext.BLANK_IMAGE_URL,cls:"x-form-trigger "+this.triggerClass});
if(this.hideTrigger){this.trigger.setDisplayed(false);}this.initTrigger();if(!this.width){this.wrap.setWidth(this.el.getWidth()+this.trigger.getWidth());
}if(!this.editable){this.editable=true;this.setEditable(false);}},afterRender:function(){Ext.form.TriggerField.superclass.afterRender.call(this);
},initTrigger:function(){this.mon(this.trigger,"click",this.onTriggerClick,this,{preventDefault:true});
this.trigger.addClassOnOver("x-form-trigger-over");this.trigger.addClassOnClick("x-form-trigger-click");
},onDestroy:function(){Ext.destroy(this.trigger,this.wrap);if(this.mimicing){Ext.get(Ext.isIE?document.body:document).un("mousedown",this.mimicBlur,this);
}Ext.form.TriggerField.superclass.onDestroy.call(this);},onFocus:function(){Ext.form.TriggerField.superclass.onFocus.call(this);
if(!this.mimicing){this.wrap.addClass(this.wrapFocusClass);this.mimicing=true;Ext.get(Ext.isIE?document.body:document).on("mousedown",this.mimicBlur,this,{delay:10});
if(this.monitorTab){this.el.on("keydown",this.checkTab,this);}}},checkTab:function(A){if(A.getKey()==A.TAB){this.triggerBlur();
}},onBlur:function(){},mimicBlur:function(A){if(!this.wrap.contains(A.target)&&this.validateBlur(A)){this.triggerBlur();
}},triggerBlur:function(){this.mimicing=false;Ext.get(Ext.isIE?document.body:document).un("mousedown",this.mimicBlur,this);
if(this.monitorTab&&this.el){this.el.un("keydown",this.checkTab,this);}Ext.form.TriggerField.superclass.onBlur.call(this);
if(this.wrap){this.wrap.removeClass(this.wrapFocusClass);}},beforeBlur:Ext.emptyFn,setEditable:function(A){if(A==this.editable){return;
}this.editable=A;if(!A){this.el.addClass("x-trigger-noedit").on("click",this.onTriggerClick,this).dom.setAttribute("readOnly",true);
}else{this.el.removeClass("x-trigger-noedit").un("click",this.onTriggerClick,this).dom.removeAttribute("readOnly");
}},validateBlur:function(A){return true;},onTriggerClick:Ext.emptyFn});Ext.form.TwinTriggerField=Ext.extend(Ext.form.TriggerField,{initComponent:function(){Ext.form.TwinTriggerField.superclass.initComponent.call(this);
this.triggerConfig={tag:"span",cls:"x-form-twin-triggers",cn:[{tag:"img",src:Ext.BLANK_IMAGE_URL,cls:"x-form-trigger "+this.trigger1Class},{tag:"img",src:Ext.BLANK_IMAGE_URL,cls:"x-form-trigger "+this.trigger2Class}]};
},getTrigger:function(A){return this.triggers[A];},initTrigger:function(){var A=this.trigger.select(".x-form-trigger",true);
this.wrap.setStyle("overflow","hidden");var B=this;A.each(function(E,C,D){E.hide=function(){var G=B.wrap.getWidth();
this.dom.style.display="none";B.el.setWidth(G-B.trigger.getWidth());};E.show=function(){var G=B.wrap.getWidth();
this.dom.style.display="";B.el.setWidth(G-B.trigger.getWidth());};var F="Trigger"+(D+1);
if(this["hide"+F]){E.dom.style.display="none";}this.mon(E,"click",this["on"+F+"Click"],this,{preventDefault:true});
E.addClassOnOver("x-form-trigger-over");E.addClassOnClick("x-form-trigger-click");
},this);this.triggers=A.elements;},onTrigger1Click:Ext.emptyFn,onTrigger2Click:Ext.emptyFn});
Ext.reg("trigger",Ext.form.TriggerField);Ext.form.TextArea=Ext.extend(Ext.form.TextField,{growMin:60,growMax:1000,growAppend:"&#160;\n&#160;",growPad:Ext.isWebKit?-6:0,enterIsSpecial:false,preventScrollbars:false,onRender:function(B,A){if(!this.el){this.defaultAutoCreate={tag:"textarea",style:"width:100px;height:60px;",autocomplete:"off"};
}Ext.form.TextArea.superclass.onRender.call(this,B,A);if(this.grow){this.textSizeEl=Ext.DomHelper.append(document.body,{tag:"pre",cls:"x-form-grow-sizer"});
if(this.preventScrollbars){this.el.setStyle("overflow","hidden");}this.el.setHeight(this.growMin);
}},onDestroy:function(){Ext.destroy(this.textSizeEl);Ext.form.TextArea.superclass.onDestroy.call(this);
},fireKey:function(A){if(A.isSpecialKey()&&(this.enterIsSpecial||(A.getKey()!=A.ENTER||A.hasModifier()))){this.fireEvent("specialkey",this,A);
}},onKeyUp:function(A){if(!A.isNavKeyPress()||A.getKey()==A.ENTER){this.autoSize();
}Ext.form.TextArea.superclass.onKeyUp.call(this,A);},autoSize:function(){if(!this.grow||!this.textSizeEl){return;
}var C=this.el;var A=C.dom.value;var D=this.textSizeEl;D.innerHTML="";D.appendChild(document.createTextNode(A));
A=D.innerHTML;Ext.fly(D).setWidth(this.el.getWidth());if(A.length<1){A="&#160;&#160;";
}else{A+=this.growAppend;if(Ext.isIE){A=A.replace(/\n/g,"<br />");}}D.innerHTML=A;
var B=Math.min(this.growMax,Math.max(D.offsetHeight,this.growMin)+this.growPad);if(B!=this.lastHeight){this.lastHeight=B;
this.el.setHeight(B);this.fireEvent("autosize",this,B);}}});Ext.reg("textarea",Ext.form.TextArea);
Ext.form.NumberField=Ext.extend(Ext.form.TextField,{fieldClass:"x-form-field x-form-num-field",allowDecimals:true,decimalSeparator:".",decimalPrecision:2,allowNegative:true,minValue:Number.NEGATIVE_INFINITY,maxValue:Number.MAX_VALUE,minText:"The minimum value for this field is {0}",maxText:"The maximum value for this field is {0}",nanText:"{0} is not a valid number",baseChars:"0123456789",initEvents:function(){var A=this.baseChars+"";
if(this.allowDecimals){A+=this.decimalSeparator;}if(this.allowNegative){A+="-";}this.maskRe=new RegExp("["+Ext.escapeRe(A)+"]");
Ext.form.NumberField.superclass.initEvents.call(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;},getValue:function(){return this.fixPrecision(this.parseValue(Ext.form.NumberField.superclass.getValue.call(this)));
},setValue:function(A){A=typeof A=="number"?A:parseFloat(String(A).replace(this.decimalSeparator,"."));
A=isNaN(A)?"":String(A).replace(".",this.decimalSeparator);return Ext.form.NumberField.superclass.setValue.call(this,A);
},parseValue:function(A){A=parseFloat(String(A).replace(this.decimalSeparator,"."));
return isNaN(A)?"":A;},fixPrecision:function(B){var A=isNaN(B);if(!this.allowDecimals||this.decimalPrecision==-1||A||!B){return A?"":B;
}return parseFloat(parseFloat(B).toFixed(this.decimalPrecision));},beforeBlur:function(){var A=this.parseValue(this.getRawValue());
if(!Ext.isEmpty(A)){this.setValue(this.fixPrecision(A));}}});Ext.reg("numberfield",Ext.form.NumberField);
Ext.form.DateField=Ext.extend(Ext.form.TriggerField,{format:"m/d/Y",altFormats:"m/d/Y|n/j/Y|n/j/y|m/j/y|n/d/y|m/j/Y|n/d/Y|m-d-y|m-d-Y|m/d|m-d|md|mdy|mdY|d|Y-m-d",disabledDaysText:"Disabled",disabledDatesText:"Disabled",minText:"The date in this field must be equal to or after {0}",maxText:"The date in this field must be equal to or before {0}",invalidText:"{0} is not a valid date - it must be in the format {1}",triggerClass:"x-form-date-trigger",showToday:true,defaultAutoCreate:{tag:"input",type:"text",size:"10",autocomplete:"off"},initComponent:function(){Ext.form.DateField.superclass.initComponent.call(this);
this.addEvents("select");if(Ext.isString(this.minValue)){this.minValue=this.parseDate(this.minValue);
}if(Ext.isString(this.maxValue)){this.maxValue=this.parseDate(this.maxValue);}this.disabledDatesRE=null;
this.initDisabledDays();},initDisabledDays:function(){if(this.disabledDates){var B=this.disabledDates,A=B.length-1,C="(?:";
Ext.each(B,function(D,E){C+=Ext.isDate(D)?"^"+Ext.escapeRe(D.dateFormat(this.format))+"$":B[E];
if(E!=A){C+="|";}},this);this.disabledDatesRE=new RegExp(C+")");}},setDisabledDates:function(A){this.disabledDates=A;
this.initDisabledDays();if(this.menu){this.menu.picker.setDisabledDates(this.disabledDatesRE);
}},setDisabledDays:function(A){this.disabledDays=A;if(this.menu){this.menu.picker.setDisabledDays(A);
}},setMinValue:function(A){this.minValue=(Ext.isString(A)?this.parseDate(A):A);if(this.menu){this.menu.picker.setMinDate(this.minValue);
}},setMaxValue:function(A){this.maxValue=(Ext.isString(A)?this.parseDate(A):A);if(this.menu){this.menu.picker.setMaxDate(this.maxValue);
}},validateValue:function(E){E=this.formatDate(E);if(!Ext.form.DateField.superclass.validateValue.call(this,E)){return false;
}if(E.length<1){return true;}var C=E;E=this.parseDate(E);if(!E){this.markInvalid(String.format(this.invalidText,C,this.format));
return false;}var F=E.getTime();if(this.minValue&&F<this.minValue.getTime()){this.markInvalid(String.format(this.minText,this.formatDate(this.minValue)));
return false;}if(this.maxValue&&F>this.maxValue.getTime()){this.markInvalid(String.format(this.maxText,this.formatDate(this.maxValue)));
return false;}if(this.disabledDays){var A=E.getDay();for(var B=0;B<this.disabledDays.length;
B++){if(A===this.disabledDays[B]){this.markInvalid(this.disabledDaysText);return false;
}}}var D=this.formatDate(E);if(this.disabledDatesRE&&this.disabledDatesRE.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){return Ext.form.DateField.superclass.setValue.call(this,this.formatDate(this.parseDate(A)));
},parseDate:function(D){if(!D||Ext.isDate(D)){return D;}var B=Date.parseDate(D,this.format);
if(!B&&this.altFormats){if(!this.altFormatsArray){this.altFormatsArray=this.altFormats.split("|");
}for(var C=0,A=this.altFormatsArray.length;C<A&&!B;C++){B=Date.parseDate(D,this.altFormatsArray[C]);
}}return B;},onDestroy:function(){Ext.destroy(this.menu);Ext.form.DateField.superclass.onDestroy.call(this);
},formatDate:function(A){return Ext.isDate(A)?A.dateFormat(this.format):A;},onTriggerClick:function(){if(this.disabled){return;
}if(this.menu==null){this.menu=new Ext.menu.DateMenu({hideOnClick:false});}this.onFocus();
Ext.apply(this.menu.picker,{minDate:this.minValue,maxDate:this.maxValue,disabledDatesRE:this.disabledDatesRE,disabledDatesText:this.disabledDatesText,disabledDays:this.disabledDays,disabledDaysText:this.disabledDaysText,format:this.format,showToday:this.showToday,minText:String.format(this.minText,this.formatDate(this.minValue)),maxText:String.format(this.maxText,this.formatDate(this.maxValue))});
this.menu.picker.setValue(this.getValue()||new Date());this.menu.show(this.el,"tl-bl?");
this.menuEvents("on");},menuEvents:function(A){this.menu[A]("select",this.onSelect,this);
this.menu[A]("hide",this.onMenuHide,this);this.menu[A]("show",this.onFocus,this);
},onSelect:function(A,B){this.setValue(B);this.fireEvent("select",this,B);this.menu.hide();
},onMenuHide:function(){this.focus(false,60);this.menuEvents("un");},beforeBlur:function(){var A=this.parseDate(this.getRawValue());
if(A){this.setValue(A);}}});Ext.reg("datefield",Ext.form.DateField);Ext.form.DisplayField=Ext.extend(Ext.form.Field,{validationEvent:false,validateOnBlur:false,defaultAutoCreate:{tag:"div"},fieldClass:"x-form-display-field",htmlEncode:false,initEvents:Ext.emptyFn,isValid:function(){return true;
},validate:function(){return true;},getRawValue:function(){var A=this.rendered?this.el.dom.innerHTML:Ext.value(this.value,"");
if(A===this.emptyText){A="";}if(this.htmlEncode){A=Ext.util.Format.htmlDecode(A);
}return A;},getValue:function(){return this.getRawValue();},getName:function(){return this.name;
},setRawValue:function(A){if(this.htmlEncode){A=Ext.util.Format.htmlEncode(A);}return this.rendered?(this.el.dom.innerHTML=(Ext.isEmpty(A)?"":A)):(this.value=A);
},setValue:function(A){this.setRawValue(A);return this;}});Ext.reg("displayfield",Ext.form.DisplayField);
Ext.form.ComboBox=Ext.extend(Ext.form.TriggerField,{defaultAutoCreate:{tag:"input",type:"text",size:"24",autocomplete:"off"},listClass:"",selectedClass:"x-combo-selected",listEmptyText:"",triggerClass:"x-form-arrow-trigger",shadow:"sides",listAlign:"tl-bl?",maxHeight:300,minHeight:90,triggerAction:"query",minChars:4,typeAhead:false,queryDelay:500,pageSize:0,selectOnFocus:false,queryParam:"query",loadingText:"Loading...",resizable:false,handleHeight:8,allQuery:"",mode:"remote",minListWidth:70,forceSelection:false,typeAheadDelay:250,lazyInit:true,initComponent:function(){Ext.form.ComboBox.superclass.initComponent.call(this);
this.addEvents("expand","collapse","beforeselect","select","beforequery");if(this.transform){var E=Ext.getDom(this.transform);
if(!this.hiddenName){this.hiddenName=E.name;}if(!this.store){this.mode="local";var B=[],F=E.options;
for(var D=0,C=F.length;D<C;D++){var A=F[D],G=(A.hasAttribute?A.hasAttribute("value"):A.getAttributeNode("value").specified)?A.value:A.text;
if(A.selected&&Ext.isEmpty(this.value,true)){this.value=G;}B.push([G,A.text]);}this.store=new Ext.data.ArrayStore({id:0,fields:["value","text"],data:B,autoDestroy:true});
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);this.render(this.el.parentNode,E);
Ext.removeNode(E);}else{Ext.removeNode(E);}}else{if(this.store){this.store=Ext.StoreMgr.lookup(this.store);
if(this.store.autoCreated){this.displayField=this.valueField="field1";if(!this.store.expandData){this.displayField="field2";
}this.mode="local";}}}this.selectedIndex=-1;if(this.mode=="local"){if(!Ext.isDefined(this.initialConfig.queryDelay)){this.queryDelay=10;
}if(!Ext.isDefined(this.initialConfig.minChars)){this.minChars=0;}}},onRender:function(B,A){Ext.form.ComboBox.superclass.onRender.call(this,B,A);
if(this.hiddenName){this.hiddenField=this.el.insertSibling({tag:"input",type:"hidden",name:this.hiddenName,id:(this.hiddenId||this.hiddenName)},"before",true);
this.el.dom.removeAttribute("name");}if(Ext.isGecko){this.el.dom.setAttribute("autocomplete","off");
}if(!this.lazyInit){this.initList();}else{this.on("focus",this.initList,this,{single:true});
}},initValue:function(){Ext.form.ComboBox.superclass.initValue.call(this);if(this.hiddenField){this.hiddenField.value=Ext.isDefined(this.hiddenValue)?this.hiddenValue:Ext.isDefined(this.value)?this.value:"";
}},initList:function(){if(!this.list){var A="x-combo-list";this.list=new Ext.Layer({parentEl:this.getListParent(),shadow:this.shadow,cls:[A,this.listClass].join(" "),constrain:false});
var B=this.listWidth||Math.max(this.wrap.getWidth(),this.minListWidth);this.list.setSize(B,0);
this.list.swallowEvent("mousewheel");this.assetHeight=0;if(this.syncFont!==false){this.list.setStyle("font-size",this.el.getStyle("font-size"));
}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.mon(this.innerList,"mouseover",this.onViewOver,this);this.mon(this.innerList,"mousemove",this.onViewMove,this);
this.innerList.setWidth(B-this.list.getFrameWidth("lr"));if(this.pageSize){this.footer=this.list.createChild({cls:A+"-ft"});
this.pageTb=new Ext.PagingToolbar({store:this.store,pageSize:this.pageSize,renderTo:this.footer});
this.assetHeight+=this.footer.getHeight();}if(!this.tpl){this.tpl='<tpl for="."><div class="'+A+'-item">{'+this.displayField+"}</div></tpl>";
}this.view=new Ext.DataView({applyTo:this.innerList,tpl:this.tpl,singleSelect:true,selectedClass:this.selectedClass,itemSelector:this.itemSelector||"."+A+"-item",emptyText:this.listEmptyText});
this.mon(this.view,"click",this.onViewClick,this);this.bindStore(this.store,true);
if(this.resizable){this.resizer=new Ext.Resizable(this.list,{pinned:true,handles:"se"});
this.mon(this.resizer,"resize",function(E,C,D){this.maxHeight=D-this.handleHeight-this.list.getFrameWidth("tb")-this.assetHeight;
this.listWidth=C;this.innerList.setWidth(C-this.list.getFrameWidth("lr"));this.restrictHeight();
},this);this[this.pageSize?"footer":"innerList"].setStyle("margin-bottom",this.handleHeight+"px");
}}},getListParent:function(){return document.body;},getStore:function(){return this.store;
},bindStore:function(A,B){if(this.store&&!B){this.store.un("beforeload",this.onBeforeLoad,this);
this.store.un("load",this.onLoad,this);this.store.un("exception",this.collapse,this);
if(this.store!==A&&this.store.autoDestroy){this.store.destroy();}if(!A){this.store=null;
if(this.view){this.view.bindStore(null);}}}if(A){if(!B){this.lastQuery=null;if(this.pageTb){this.pageTb.bindStore(A);
}}this.store=Ext.StoreMgr.lookup(A);this.store.on({scope:this,beforeload:this.onBeforeLoad,load:this.onLoad,exception:this.collapse});
if(this.view){this.view.bindStore(A);}}},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();this.delayedCheck=true;
this.unsetDelayCheck.defer(10,this);},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;},forceKeyDown:true});this.queryDelay=Math.max(this.queryDelay||10,this.mode=="local"?10:250);
this.dqTask=new Ext.util.DelayedTask(this.initQuery,this);if(this.typeAhead){this.taTask=new Ext.util.DelayedTask(this.onTypeAhead,this);
}if(this.editable!==false&&!this.enableKeyEvents){this.mon(this.el,"keyup",this.onKeyUp,this);
}},onDestroy:function(){if(this.dqTask){this.dqTask.cancel();this.dqTask=null;}this.bindStore(null);
Ext.destroy(this.resizer,this.view,this.pageTb,this.list);Ext.form.ComboBox.superclass.onDestroy.call(this);
},unsetDelayCheck:function(){delete this.delayedCheck;},fireKey:function(B){var A=function(C){if(C.isNavKeyPress()&&!this.isExpanded()&&!this.delayedCheck){this.fireEvent("specialkey",this,C);
}};if(this.inEditor&&Ext.isWebKit&&B.getKey()==B.TAB){A.defer(10,this,[new Ext.EventObjectImpl(B)]);
}else{A.call(this,B);}},onResize:function(A,B){Ext.form.ComboBox.superclass.onResize.apply(this,arguments);
if(this.list&&!Ext.isDefined(this.listWidth)){var C=Math.max(A,this.minListWidth);
this.list.setWidth(C);this.innerList.setWidth(C-this.list.getFrameWidth("lr"));}},onEnable:function(){Ext.form.ComboBox.superclass.onEnable.apply(this,arguments);
if(this.hiddenField){this.hiddenField.disabled=false;}},onDisable:function(){Ext.form.ComboBox.superclass.onDisable.apply(this,arguments);
if(this.hiddenField){this.hiddenField.disabled=true;}},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 B=this.store.getAt(0);
var C=B.data[this.displayField];var A=C.length;var D=this.getRawValue().length;if(D!=A){this.setRawValue(C);
this.selectText(D,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);}},getName:function(){var A=this.hiddenField;
return A&&A.name?A.name:this.hiddenName||Ext.form.ComboBox.superclass.getName.call(this);
},getValue:function(){if(this.valueField){return Ext.isDefined(this.value)?this.value:"";
}else{return Ext.form.ComboBox.superclass.getValue.call(this);}},clearValue:function(){if(this.hiddenField){this.hiddenField.value="";
}this.setRawValue("");this.lastSelectionText="";this.applyEmptyText();this.value="";
},setValue:function(A){var C=A;if(this.valueField){var B=this.findRecord(this.valueField,A);
if(B){C=B.data[this.displayField];}else{if(Ext.isDefined(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;return this;},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 B=this.innerList.dom;var E=this.list.getFrameWidth("tb")+(this.resizable?this.handleHeight:0)+this.assetHeight;
var C=Math.max(B.clientHeight,B.offsetHeight,B.scrollHeight);var A=this.getPosition()[1]-Ext.getBody().getScroll().top;
var F=Ext.lib.Dom.getViewHeight()-A-this.getSize().height;var D=Math.max(A,F,this.minHeight||0)-this.list.shadowOffset-E-5;
C=Math.min(C,D,this.maxHeight);this.innerList.setHeight(C);this.list.beginUpdate();
this.list.setHeight(C+E);this.list.alignTo(this.wrap,this.listAlign);this.list.endUpdate();
},onEmptyResults:function(){this.collapse();},isExpanded:function(){return this.list&&this.list.isVisible();
},selectByValue:function(A,C){if(!Ext.isEmpty(A,true)){var B=this.findRecord(this.valueField||this.displayField,A);
if(B){this.select(this.store.indexOf(B),C);return true;}}return false;},select:function(A,C){this.selectedIndex=A;
this.view.select(A);if(C!==false){var B=this.view.getNode(A);if(B){this.innerList.scrollChildIntoView(B,false);
}}},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(B){var A=B.getKey();if(this.editable!==false&&(A==B.BACKSPACE||!B.isSpecialKey())){this.lastKey=A;
this.dqTask.delay(this.queryDelay);}Ext.form.ComboBox.superclass.onKeyUp.call(this,B);
},validateBlur:function(){return !this.list||!this.list.isVisible();},initQuery:function(){this.doQuery(this.getRawValue());
},beforeBlur:function(){var B=this.getRawValue();if(this.forceSelection){if(B.length>0&&B!=this.emptyText){this.el.dom.value=Ext.isDefined(this.lastSelectionText)?this.lastSelectionText:"";
this.applyEmptyText();}else{this.clearValue();}}else{var A=this.findRecord(this.displayField,B);
if(A){B=A.get(this.valueField||this.displayField);}this.setValue(B);}},doQuery:function(C,B){C=Ext.isEmpty(C)?"":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.getDoc().un("mousewheel",this.collapseIf,this);Ext.getDoc().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.wrap,this.listAlign);
this.list.show();if(Ext.isGecko2){this.innerList.setOverflow("auto");}Ext.getDoc().on({scope:this,mousewheel:this.collapseIf,mousedown:this.collapseIf});
this.fireEvent("expand",this);},onTriggerClick:function(){if(this.disabled){return;
}if(this.isExpanded()){this.collapse();this.el.focus();}else{this.onFocus({});if(this.triggerAction=="all"){this.doQuery(this.allQuery,true);
}else{this.doQuery(this.getRawValue());}this.el.focus();}}});Ext.reg("combo",Ext.form.ComboBox);
Ext.form.Checkbox=Ext.extend(Ext.form.Field,{focusClass:undefined,fieldClass:"x-form-field",checked:false,defaultAutoCreate:{tag:"input",type:"checkbox",autocomplete:"off"},actionMode:"wrap",initComponent:function(){Ext.form.Checkbox.superclass.initComponent.call(this);
this.addEvents("check");},onResize:function(){Ext.form.Checkbox.superclass.onResize.apply(this,arguments);
if(!this.boxLabel&&!this.fieldLabel){this.el.alignTo(this.wrap,"c-c");}},initEvents:function(){Ext.form.Checkbox.superclass.initEvents.call(this);
this.mon(this.el,"click",this.onClick,this);this.mon(this.el,"change",this.onClick,this);
},getResizeEl:function(){return this.wrap;},getPositionEl:function(){return this.wrap;
},markInvalid:Ext.emptyFn,clearInvalid:Ext.emptyFn,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);}else{this.checked=this.el.dom.checked;}},onDestroy:function(){Ext.destroy(this.wrap);
Ext.form.Checkbox.superclass.onDestroy.call(this);},initValue:function(){this.originalValue=this.getValue();
},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){var B=this.checked;this.checked=(A===true||A==="true"||A=="1"||String(A).toLowerCase()=="on");
if(this.rendered){this.el.dom.checked=this.checked;this.el.dom.defaultChecked=this.checked;
}if(B!=this.checked){this.fireEvent("check",this,this.checked);if(this.handler){this.handler.call(this.scope||this,this,this.checked);
}}return this;}});Ext.reg("checkbox",Ext.form.Checkbox);Ext.form.CheckboxGroup=Ext.extend(Ext.form.Field,{columns:"auto",vertical:false,allowBlank:true,blankText:"You must select at least one item in this group",defaultType:"checkbox",groupCls:"x-form-check-group",initComponent:function(){this.addEvents("change");
Ext.form.CheckboxGroup.superclass.initComponent.call(this);},onRender:function(E,O){if(!this.el){var A={cls:this.groupCls,layout:"column",border:false,renderTo:E};
var J={defaultType:this.defaultType,layout:"form",border:false,defaults:{hideLabel:true,anchor:"100%"}};
if(this.items[0].items){Ext.apply(A,{layoutConfig:{columns:this.items.length},defaults:this.defaults,items:this.items});
for(var N=0,G=this.items.length;N<G;N++){Ext.applyIf(this.items[N],J);}}else{var M,H=[];
if(typeof this.columns=="string"){this.columns=this.items.length;}if(!Ext.isArray(this.columns)){var F=[];
for(var N=0;N<this.columns;N++){F.push((100/this.columns)*0.01);}this.columns=F;}M=this.columns.length;
for(var N=0;N<M;N++){var K=Ext.apply({items:[]},J);K[this.columns[N]<=1?"columnWidth":"width"]=this.columns[N];
if(this.defaults){K.defaults=Ext.apply(K.defaults||{},this.defaults);}H.push(K);}if(this.vertical){var C=Math.ceil(this.items.length/M),I=0;
for(var N=0,G=this.items.length;N<G;N++){if(N>0&&N%C==0){I++;}if(this.items[N].fieldLabel){this.items[N].hideLabel=false;
}H[I].items.push(this.items[N]);}}else{for(var N=0,G=this.items.length;N<G;N++){var B=N%M;
if(this.items[N].fieldLabel){this.items[N].hideLabel=false;}H[B].items.push(this.items[N]);
}}Ext.apply(A,{layoutConfig:{columns:M},items:H});}this.panel=new Ext.Panel(A);this.panel.ownerCt=this;
this.el=this.panel.getEl();if(this.forId&&this.itemCls){var L=this.el.up(this.itemCls).child("label",true);
if(L){L.setAttribute("htmlFor",this.forId);}}var D=this.panel.findBy(function(P){return P.isFormField;
},this);this.items=new Ext.util.MixedCollection();this.items.addAll(D);}Ext.form.CheckboxGroup.superclass.onRender.call(this,E,O);
},afterRender:function(){Ext.form.CheckboxGroup.superclass.afterRender.call(this);
if(this.values){this.setValue.apply(this,this.values);delete this.values;}this.eachItem(function(A){A.on("check",this.fireChecked,this);
A.inGroup=true;});},doLayout:function(){if(this.rendered){this.panel.forceLayout=this.ownerCt.forceLayout;
this.panel.doLayout();}},fireChecked:function(){var A=[];this.eachItem(function(B){if(B.checked){A.push(B);
}});this.fireEvent("change",this,A);},validateValue:function(A){if(!this.allowBlank){var B=true;
this.eachItem(function(C){if(C.checked){return(B=false);}});if(B){this.markInvalid(this.blankText);
return false;}}return true;},onDisable:function(){this.eachItem(function(A){A.disable();
});},onEnable:function(){this.eachItem(function(A){A.enable();});},doLayout:function(){if(this.rendered){this.panel.forceLayout=this.ownerCt.forceLayout;
this.panel.doLayout();}},onResize:function(A,B){this.panel.setSize(A,B);this.panel.doLayout();
},reset:function(){Ext.form.CheckboxGroup.superclass.reset.call(this);this.eachItem(function(A){if(A.reset){A.reset();
}});},setValue:function(D,C){if(this.rendered){if(arguments.length==1){if(Ext.isArray(D)){Ext.each(D,function(E,G){var F=this.items.itemAt(G);
if(F){F.setValue(E);}},this);}else{if(Ext.isObject(D)){for(var A in D){var B=this.getBox(A);
if(B){B.setValue(D[A]);}}}else{this.setValueForItem(D);}}}else{var B=this.getBox(D);
if(B){B.setValue(C);}}}else{this.values=arguments;}return this;},onDestroy:function(){Ext.destroy(this.panel);
Ext.form.CheckboxGroup.superclass.onDestroy.call(this);},setValueForItem:function(A){A=String(A).split(",");
this.eachItem(function(B){if(A.indexOf(B.inputValue)>-1){B.setValue(true);}});},getBox:function(B){var A=null;
this.eachItem(function(C){if(B==C||C.dataIndex==B||C.id==B||C.getName()==B){A=C;return false;
}});return A;},getValue:function(){var A=[];this.eachItem(function(B){if(B.checked){A.push(B);
}});return A;},eachItem:function(A){if(this.items&&this.items.each){this.items.each(A,this);
}},initValue:Ext.emptyFn,getValue:Ext.emptyFn,getRawValue:Ext.emptyFn,setRawValue:Ext.emptyFn});
Ext.reg("checkboxgroup",Ext.form.CheckboxGroup);Ext.form.Radio=Ext.extend(Ext.form.Checkbox,{inputType:"radio",markInvalid:Ext.emptyFn,clearInvalid:Ext.emptyFn,getGroupValue:function(){var A=this.el.up("form")||Ext.getBody();
var B=A.child("input[name="+this.el.dom.name+"]:checked",true);return B?B.value:null;
},onClick:function(){if(this.el.dom.checked!=this.checked){var A=this.getCheckEl().select("input[name="+this.el.dom.name+"]");
A.each(function(B){if(B.dom.id==this.id){this.setValue(true);}else{Ext.getCmp(B.dom.id).setValue(false);
}},this);}},setValue:function(A){if(typeof A=="boolean"){Ext.form.Radio.superclass.setValue.call(this,A);
}else{var B=this.getCheckEl().child("input[name="+this.el.dom.name+"][value="+A+"]",true);
if(B){Ext.getCmp(B.id).setValue(true);}}return this;},getCheckEl:function(){if(this.inGroup){return this.el.up(".x-form-radio-group");
}return this.el.up("form")||Ext.getBody();}});Ext.reg("radio",Ext.form.Radio);Ext.form.RadioGroup=Ext.extend(Ext.form.CheckboxGroup,{allowBlank:true,blankText:"You must select one item in this group",defaultType:"radio",groupCls:"x-form-radio-group",getValue:function(){var A=null;
this.eachItem(function(B){if(B.checked){A=B;return false;}});return A;},setValue:function(C,B){if(this.rendered){if(arguments.length>1){var A=this.getBox(C);
if(A){A.setValue(B);if(A.checked){this.eachItem(function(D){if(D!==A){D.setValue(false);
}});}}}else{this.setValueForItem(C);}}else{this.values=arguments;}return this;},fireChecked:function(){if(!this.checkTask){this.checkTask=new Ext.util.DelayedTask(this.bufferChecked,this);
}this.checkTask.delay(10);},bufferChecked:function(){var A=null;this.eachItem(function(B){if(B.checked){A=B;
return false;}});this.fireEvent("change",this,A);},onDestroy:function(){if(this.checkTask){this.checkTask.cancel();
this.checkTask=null;}Ext.form.RadioGroup.superclass.onDestroy.call(this);}});Ext.reg("radiogroup",Ext.form.RadioGroup);
Ext.form.Hidden=Ext.extend(Ext.form.Field,{inputType:"hidden",onRender:function(){Ext.form.Hidden.superclass.onRender.apply(this,arguments);
},initEvents:function(){this.originalValue=this.getValue();},setSize:Ext.emptyFn,setWidth:Ext.emptyFn,setHeight:Ext.emptyFn,setPosition:Ext.emptyFn,setPagePosition:Ext.emptyFn,markInvalid:Ext.emptyFn,clearInvalid:Ext.emptyFn});
Ext.reg("hidden",Ext.form.Hidden);Ext.form.BasicForm=function(B,A){Ext.apply(this,A);
if(Ext.isString(this.paramOrder)){this.paramOrder=this.paramOrder.split(/[\s,|]/);
}this.items=new Ext.util.MixedCollection(false,function(C){return C.itemId||C.id||(C.id=Ext.id());
});this.addEvents("beforeaction","actionfailed","actioncomplete");if(B){this.initEl(B);
}Ext.form.BasicForm.superclass.constructor.call(this);};Ext.extend(Ext.form.BasicForm,Ext.util.Observable,{timeout:30,paramOrder:undefined,paramsAsHash:false,activeAction:null,trackResetOnLoad:false,initEl:function(A){this.el=Ext.get(A);
this.id=this.el.id||Ext.id();if(!this.standardSubmit){this.el.on("submit",this.onSubmit,this);
}this.el.addClass("x-form");},getEl:function(){return this.el;},onSubmit:function(A){A.stopEvent();
},destroy:function(){this.items.each(function(A){Ext.destroy(A);});if(this.el){this.el.removeAllListeners();
this.el.remove();}this.purgeListeners();},isValid:function(){var A=true;this.items.each(function(B){if(!B.validate()){A=false;
}});return A;},isDirty:function(){var A=false;this.items.each(function(B){if(B.isDirty()){A=true;
return false;}});return A;},doAction:function(B,A){if(Ext.isString(B)){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);
}return this;},submit:function(B){if(this.standardSubmit){var A=this.isValid();if(A){this.el.dom.submit();
}return A;}var C=String.format("{0}submit",this.api?"direct":"");this.doAction(C,B);
return this;},load:function(A){var B=String.format("{0}load",this.api?"direct":"");
this.doAction(B,A);return this;},updateRecord:function(B){B.beginEdit();var A=B.fields;
A.each(function(D){var C=this.findField(D.name);if(C){B.set(D.name,C.getValue());
}},this);B.endEdit();return this;},loadRecord:function(A){this.setValues(A.data);
return this;},beforeAction:function(A){var B=A.options;if(B.waitMsg){if(this.waitMsgTarget===true){this.el.mask(B.waitMsg,"x-mask-loading");
}else{if(this.waitMsgTarget){this.waitMsgTarget=Ext.get(this.waitMsgTarget);this.waitMsgTarget.mask(B.waitMsg,"x-mask-loading");
}else{Ext.MessageBox.wait(B.waitMsg,B.waitTitle||this.waitTitle||"Please Wait...");
}}}},afterAction:function(A,C){this.activeAction=null;var B=A.options;if(B.waitMsg){if(this.waitMsgTarget===true){this.el.unmask();
}else{if(this.waitMsgTarget){this.waitMsgTarget.unmask();}else{Ext.MessageBox.updateProgress(1);
Ext.MessageBox.hide();}}}if(C){if(B.reset){this.reset();}Ext.callback(B.success,B.scope,[this,A]);
this.fireEvent("actioncomplete",this,A);}else{Ext.callback(B.failure,B.scope,[this,A]);
this.fireEvent("actionfailed",this,A);}},findField:function(B){var A=this.items.get(B);
if(!Ext.isObject(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(A){if(Ext.isArray(A)){for(var D=0,B=A.length;
D<B;D++){var C=A[D];var E=this.findField(C.id);if(E){E.markInvalid(C.msg);}}}else{var F,G;
for(G in A){if(!Ext.isFunction(A[G])&&(F=this.findField(G))){F.markInvalid(A[G]);
}}}return this;},setValues:function(D){if(Ext.isArray(D)){for(var E=0,B=D.length;
E<B;E++){var C=D[E];var F=this.findField(C.id);if(F){F.setValue(C.value);if(this.trackResetOnLoad){F.originalValue=F.getValue();
}}}}else{var G,A;for(A in D){if(!Ext.isFunction(D[A])&&(G=this.findField(A))){G.setValue(D[A]);
if(this.trackResetOnLoad){G.originalValue=G.getValue();}}}}return this;},getValues:function(B){var A=Ext.lib.Ajax.serializeForm(this.el.dom);
if(B===true){return A;}return Ext.urlDecode(A);},getFieldValues:function(){var A={};
this.items.each(function(B){A[B.getName()]=B.getValue();});return A;},clearInvalid:function(){this.items.each(function(A){A.clearInvalid();
});return this;},reset:function(){this.items.each(function(A){A.reset();});return this;
},add:function(){this.items.addAll(Array.prototype.slice.call(arguments,0));return this;
},remove:function(A){this.items.remove(A);return this;},render:function(){this.items.each(function(A){if(A.isFormField&&!A.rendered&&document.getElementById(A.id)){A.applyToMarkup(A.id);
}});return this;},applyToFields:function(A){this.items.each(function(B){Ext.apply(B,A);
});return this;},applyIfToFields:function(A){this.items.each(function(B){Ext.applyIf(B,A);
});return this;},callFieldMethod:function(B,A){A=A||[];this.items.each(function(C){if(Ext.isFunction(C[B])){C[B].apply(C,A);
}});return this;}});Ext.BasicForm=Ext.form.BasicForm;Ext.FormPanel=Ext.extend(Ext.Panel,{minButtonWidth:75,labelAlign:"left",monitorValid:false,monitorPoll:200,layout:"form",initComponent:function(){this.form=this.createForm();
Ext.FormPanel.superclass.initComponent.call(this);this.bodyCfg={tag:"form",cls:this.baseCls+"-body",method:this.method||"POST",id:this.formId||Ext.id()};
if(this.fileUpload){this.bodyCfg.enctype="multipart/form-data";}this.initItems();
this.addEvents("clientvalidation");this.relayEvents(this.form,["beforeaction","actionfailed","actioncomplete"]);
},createForm:function(){var A=Ext.applyIf({listeners:{}},this.initialConfig);return new Ext.form.BasicForm(null,A);
},initFields:function(){var C=this.form;var A=this;var B=function(D){if(A.isField(D)){C.add(D);
}if(D.isFieldWrap){Ext.applyIf(D,{labelAlign:D.ownerCt.labelAlign,labelWidth:D.ownerCt.labelWidth,itemCls:D.ownerCt.itemCls});
C.add(D.field);}else{if(D.doLayout&&D!=A){Ext.applyIf(D,{labelAlign:D.ownerCt.labelAlign,labelWidth:D.ownerCt.labelWidth,itemCls:D.ownerCt.itemCls});
if(D.items&&D.items.each){D.items.each(B,this);}}}};this.items.each(B,this);},getLayoutTarget:function(){return this.form.el;
},getForm:function(){return this.form;},onRender:function(B,A){this.initFields();
Ext.FormPanel.superclass.onRender.call(this,B,A);this.form.initEl(this.body);},beforeDestroy:function(){this.stopMonitoring();
Ext.FormPanel.superclass.beforeDestroy.call(this);this.form.items.clear();Ext.destroy(this.form);
},isField:function(A){return !!A.setValue&&!!A.getValue&&!!A.markInvalid&&!!A.clearInvalid;
},initEvents:function(){Ext.FormPanel.superclass.initEvents.call(this);this.on("remove",this.onRemove,this);
this.on("add",this.onAdd,this);if(this.monitorValid){this.startMonitoring();}},onAdd:function(A,B){if(this.isField(B)){this.form.add(B);
}else{if(B.findBy){Ext.applyIf(B,{labelAlign:B.ownerCt.labelAlign,labelWidth:B.ownerCt.labelWidth,itemCls:B.ownerCt.itemCls});
this.form.add.apply(this.form,B.findBy(this.isField));}}},onRemove:function(A,B){if(this.isField(B)){Ext.destroy(B.container.up(".x-form-item"));
this.form.remove(B);}else{if(B.findByType){Ext.each(B.findBy(this.isField),this.form.remove,this.form);
}}},startMonitoring:function(){if(!this.validTask){this.validTask=new Ext.util.TaskRunner();
this.validTask.start({run:this.bindHandler,interval:this.monitorPoll||200,scope:this});
}},stopMonitoring:function(){if(this.validTask){this.validTask.stopAll();this.validTask=null;
}},load:function(){this.form.load.apply(this.form,arguments);},onDisable:function(){Ext.FormPanel.superclass.onDisable.call(this);
if(this.form){this.form.items.each(function(){this.disable();});}},onEnable:function(){Ext.FormPanel.superclass.onEnable.call(this);
if(this.form){this.form.items.each(function(){this.enable();});}},bindHandler:function(){var E=true;
this.form.items.each(function(F){if(!F.isValid(true)){E=false;return false;}});if(this.fbar){var B=this.fbar.items.items;
for(var D=0,A=B.length;D<A;D++){var C=B[D];if(C.formBind===true&&C.disabled===E){C.setDisabled(!E);
}}}this.fireEvent("clientvalidation",this,E);}});Ext.reg("form",Ext.FormPanel);Ext.form.FormPanel=Ext.FormPanel;
Ext.form.FieldSet=Ext.extend(Ext.Panel,{baseCls:"x-fieldset",layout:"form",animCollapse:false,onRender:function(B,A){if(!this.el){this.el=document.createElement("fieldset");
this.el.id=this.id;if(this.title||this.header||this.checkboxToggle){this.el.appendChild(document.createElement("legend")).className="x-fieldset-header";
}}Ext.form.FieldSet.superclass.onRender.call(this,B,A);if(this.checkboxToggle){var C=typeof this.checkboxToggle=="object"?this.checkboxToggle:{tag:"input",type:"checkbox",name:this.checkboxName||this.id+"-checkbox"};
this.checkbox=this.header.insertFirst(C);this.checkbox.dom.checked=!this.collapsed;
this.mon(this.checkbox,"click",this.onCheckClick,this);}},onCollapse:function(A,B){if(this.checkbox){this.checkbox.dom.checked=false;
}Ext.form.FieldSet.superclass.onCollapse.call(this,A,B);},onExpand:function(A,B){if(this.checkbox){this.checkbox.dom.checked=true;
}Ext.form.FieldSet.superclass.onExpand.call(this,A,B);},onCheckClick:function(){this[this.checkbox.dom.checked?"expand":"collapse"]();
}});Ext.reg("fieldset",Ext.form.FieldSet);Ext.form.HtmlEditor=Ext.extend(Ext.form.Field,{enableFormat:true,enableFontSize:true,enableColors:true,enableAlignments:true,enableLists:true,enableSourceEdit:true,enableLinks:true,enableFont:true,createLinkText:"Please enter the URL for the link:",defaultLinkValue:"http://",fontFamilies:["Arial","Courier New","Tahoma","Times New Roman","Verdana"],defaultFont:"tahoma",defaultValue:(Ext.isOpera||Ext.isIE6)?"&nbsp;":"&#8203;",actionMode:"wrap",validationEvent:false,deferHeight:true,initialized:false,activated:false,sourceEditMode:false,onFocus:Ext.emptyFn,iframePad:3,hideMode:"offsets",defaultAutoCreate:{tag:"textarea",style:"width:500px;height:300px;",autocomplete:"off"},initComponent:function(){this.addEvents("initialize","activate","beforesync","beforepush","sync","push","editmodechange");
},createFontOptions:function(){var D=[],B=this.fontFamilies,C,F;for(var E=0,A=B.length;
E<A;E++){C=B[E];F=C.toLowerCase();D.push('<option value="',F,'" style="font-family:',C,';"',(this.defaultFont==F?' selected="true">':">"),C,"</option>");
}return D.join("");},createToolbar:function(D){var A=Ext.QuickTips&&Ext.QuickTips.isEnabled();
function C(E,G,F){return{itemId:E,cls:"x-btn-icon",iconCls:"x-edit-"+E,enableToggle:G!==false,scope:D,handler:F||D.relayBtnCmd,clickEvent:"mousedown",tooltip:A?D.buttonTips[E]||undefined:undefined,overflowText:D.buttonTips[E].title||undefined,tabIndex:-1};
}var B=new Ext.Toolbar({renderTo:this.wrap.dom.firstChild});this.mon(B.el,"click",function(E){E.preventDefault();
});if(this.enableFont&&!Ext.isSafari2){this.fontSelect=B.el.createChild({tag:"select",cls:"x-font-select",html:this.createFontOptions()});
this.mon(this.fontSelect,"change",function(){var E=this.fontSelect.dom.value;this.relayCmd("fontname",E);
this.deferFocus();},this);B.add(this.fontSelect.dom,"-");}if(this.enableFormat){B.add(C("bold"),C("italic"),C("underline"));
}if(this.enableFontSize){B.add("-",C("increasefontsize",false,this.adjustFont),C("decreasefontsize",false,this.adjustFont));
}if(this.enableColors){B.add("-",{itemId:"forecolor",cls:"x-btn-icon",iconCls:"x-edit-forecolor",clickEvent:"mousedown",tooltip:A?D.buttonTips.forecolor||undefined:undefined,tabIndex:-1,menu:new Ext.menu.ColorMenu({allowReselect:true,focus:Ext.emptyFn,value:"000000",plain:true,listeners:{scope:this,select:function(E,F){this.execCmd("forecolor",Ext.isWebKit||Ext.isIE?"#"+F:F);
this.deferFocus();}},clickEvent:"mousedown"})},{itemId:"backcolor",cls:"x-btn-icon",iconCls:"x-edit-backcolor",clickEvent:"mousedown",tooltip:A?D.buttonTips.backcolor||undefined:undefined,tabIndex:-1,menu:new Ext.menu.ColorMenu({focus:Ext.emptyFn,value:"FFFFFF",plain:true,allowReselect:true,listeners:{scope:this,select:function(E,F){if(Ext.isGecko){this.execCmd("useCSS",false);
this.execCmd("hilitecolor",F);this.execCmd("useCSS",true);this.deferFocus();}else{this.execCmd(Ext.isOpera?"hilitecolor":"backcolor",Ext.isWebKit||Ext.isIE?"#"+F:F);
this.deferFocus();}}},clickEvent:"mousedown"})});}if(this.enableAlignments){B.add("-",C("justifyleft"),C("justifycenter"),C("justifyright"));
}if(!Ext.isSafari2){if(this.enableLinks){B.add("-",C("createlink",false,this.createLink));
}if(this.enableLists){B.add("-",C("insertorderedlist"),C("insertunorderedlist"));
}if(this.enableSourceEdit){B.add("-",C("sourceedit",true,function(E){this.toggleSourceEdit(!this.sourceEditMode);
}));}}this.tb=B;},getDocMarkup:function(){return'<html><head><style type="text/css">body{border:0;margin:0;padding:3px;height:98%;cursor:text;}</style></head><body></body></html>';
},getEditorBody:function(){return this.doc.body||this.doc.documentElement;},getDoc:function(){return Ext.isIE?this.getWin().document:(this.iframe.contentDocument||this.getWin().document);
},getWin:function(){return Ext.isIE?this.iframe.contentWindow:window.frames[this.iframe.name];
},onRender:function(B,A){Ext.form.HtmlEditor.superclass.onRender.call(this,B,A);this.el.dom.style.border="0 none";
this.el.dom.setAttribute("tabIndex",-1);this.el.addClass("x-hidden");if(Ext.isIE){this.el.applyStyles("margin-top:-1px;margin-bottom:-1px;");
}this.wrap=this.el.wrap({cls:"x-html-editor-wrap",cn:{cls:"x-html-editor-tb"}});this.createToolbar(this);
this.disableItems(true);this.createIFrame();if(!this.width){var C=this.el.getSize();
this.setSize(C.width,this.height||C.height);}},createIFrame:function(){var A=document.createElement("iframe");
A.name=Ext.id();A.frameBorder="0";A.src=Ext.isIE?Ext.SSL_SECURE_URL:"javascript:;";
this.wrap.dom.appendChild(A);this.iframe=A;this.monitorTask=Ext.TaskMgr.start({run:this.checkDesignMode,scope:this,interval:100});
},initFrame:function(){Ext.TaskMgr.stop(this.monitorTask);this.doc=this.getDoc();
this.win=this.getWin();this.doc.open();this.doc.write(this.getDocMarkup());this.doc.close();
var A={run:function(){if(this.doc.body||this.doc.readyState=="complete"){Ext.TaskMgr.stop(A);
this.doc.designMode="on";this.initEditor.defer(10,this);}},interval:10,duration:10000,scope:this};
Ext.TaskMgr.start(A);},checkDesignMode:function(){if(this.wrap&&this.wrap.dom.offsetWidth){var A=this.getDoc();
if(!A){return;}if(!A.editorInitialized||String(A.designMode).toLowerCase()!="on"){this.initFrame();
}}},disableItems:function(A){if(this.fontSelect){this.fontSelect.dom.disabled=A;}this.tb.items.each(function(B){if(B.itemId!="sourceedit"){B.setDisabled(A);
}});},onResize:function(B,C){Ext.form.HtmlEditor.superclass.onResize.apply(this,arguments);
if(this.el&&this.iframe){if(typeof B=="number"){var D=B-this.wrap.getFrameWidth("lr");
this.el.setWidth(this.adjustWidth("textarea",D));this.tb.setWidth(D);this.iframe.style.width=Math.max(D,0)+"px";
}if(typeof C=="number"){var A=C-this.wrap.getFrameWidth("tb")-this.tb.el.getHeight();
this.el.setHeight(this.adjustWidth("textarea",A));this.iframe.style.height=Math.max(A,0)+"px";
if(this.doc){this.getEditorBody().style.height=Math.max((A-(this.iframePad*2)),0)+"px";
}}}},toggleSourceEdit:function(A){if(A===undefined){A=!this.sourceEditMode;}this.sourceEditMode=A===true;
var C=this.tb.items.get("sourceedit");if(C.pressed!==this.sourceEditMode){C.toggle(this.sourceEditMode);
if(!C.xtbHidden){return;}}if(this.sourceEditMode){this.disableItems(true);this.syncValue();
this.iframe.className="x-hidden";this.el.removeClass("x-hidden");this.el.dom.removeAttribute("tabIndex");
this.el.focus();}else{if(this.initialized){this.disableItems(false);}this.pushValue();
this.iframe.className="";this.el.addClass("x-hidden");this.el.dom.setAttribute("tabIndex",-1);
this.deferFocus();}var B=this.lastSize;if(B){delete this.lastSize;this.setSize(B);
}this.fireEvent("editmodechange",this,this.sourceEditMode);},createLink:function(){var A=prompt(this.createLinkText,this.defaultLinkValue);
if(A&&A!="http://"){this.relayCmd("createlink",A);}},adjustSize:Ext.BoxComponent.prototype.adjustSize,getResizeEl:function(){return this.wrap;
},getPositionEl:function(){return this.wrap;},initEvents:function(){this.originalValue=this.getValue();
},markInvalid:Ext.emptyFn,clearInvalid:Ext.emptyFn,setValue:function(A){Ext.form.HtmlEditor.superclass.setValue.call(this,A);
this.pushValue();return this;},cleanHtml:function(A){A=String(A);if(A.length>5){if(Ext.isWebKit){A=A.replace(/\sclass="(?:Apple-style-span|khtml-block-placeholder)"/gi,"");
}}if(A==this.defaultValue){A="";}return A;},syncValue:function(){if(this.initialized){var D=this.getEditorBody();
var C=D.innerHTML;if(Ext.isWebKit){var B=D.getAttribute("style");var A=B.match(/text-align:(.*?);/i);
if(A&&A[1]){C='<div style="'+A[0]+'">'+C+"</div>";}}C=this.cleanHtml(C);if(this.fireEvent("beforesync",this,C)!==false){this.el.dom.value=C;
this.fireEvent("sync",this,C);}}},getValue:function(){this[this.sourceEditMode?"pushValue":"syncValue"]();
return Ext.form.HtmlEditor.superclass.getValue.call(this);},pushValue:function(){if(this.initialized){var A=this.el.dom.value;
if(!this.activated&&A.length<1){A=this.defaultValue;}if(this.fireEvent("beforepush",this,A)!==false){this.getEditorBody().innerHTML=A;
if(Ext.isGecko){var C=this.doc,B=C.designMode.toLowerCase();C.designMode=B.toggle("on","off");
C.designMode=B;}this.fireEvent("push",this,A);}}},deferFocus:function(){this.focus.defer(10,this);
},focus:function(){if(this.win&&!this.sourceEditMode){this.win.focus();}else{this.el.focus();
}},initEditor:function(){try{var B=this.getEditorBody();var A=this.el.getStyles("font-size","font-family","background-image","background-repeat");
A["background-attachment"]="fixed";B.bgProperties="fixed";Ext.DomHelper.applyStyles(B,A);
if(this.doc){try{Ext.EventManager.removeAll(this.doc);}catch(C){}}this.doc=this.getDoc();
Ext.EventManager.on(this.doc,{mousedown:this.onEditorEvent,dblclick:this.onEditorEvent,click:this.onEditorEvent,keyup:this.onEditorEvent,buffer:100,scope:this});
if(Ext.isGecko){Ext.EventManager.on(this.doc,"keypress",this.applyCommand,this);}if(Ext.isIE||Ext.isWebKit||Ext.isOpera){Ext.EventManager.on(this.doc,"keydown",this.fixKeys,this);
}this.initialized=true;this.fireEvent("initialize",this);this.doc.editorInitialized=true;
this.pushValue();}catch(C){}},onDestroy:function(){if(this.monitorTask){Ext.TaskMgr.stop(this.monitorTask);
}if(this.rendered){Ext.destroy(this.tb);if(this.wrap){this.wrap.dom.innerHTML="";
this.wrap.remove();}}if(this.el){this.el.removeAllListeners();this.el.remove();}if(this.doc){try{Ext.EventManager.removeAll(this.doc);
for(var B in this.doc){delete this.doc[B];}}catch(A){}}this.purgeListeners();},onFirstFocus:function(){this.activated=true;
this.disableItems(false);if(Ext.isGecko){this.win.focus();var A=this.win.getSelection();
if(!A.focusNode||A.focusNode.nodeType!=3){var B=A.getRangeAt(0);B.selectNodeContents(this.getEditorBody());
B.collapse(true);this.deferFocus();}try{this.execCmd("useCSS",true);this.execCmd("styleWithCSS",false);
}catch(C){}}this.fireEvent("activate",this);},adjustFont:function(B){var C=B.itemId=="increasefontsize"?1:-1;
var A=parseInt(this.doc.queryCommandValue("FontSize")||2,10);if((Ext.isSafari&&!Ext.isSafari2)||Ext.isChrome||Ext.isAir){if(A<=10){A=1+C;
}else{if(A<=13){A=2+C;}else{if(A<=16){A=3+C;}else{if(A<=18){A=4+C;}else{if(A<=24){A=5+C;
}else{A=6+C;}}}}}A=A.constrain(1,6);}else{if(Ext.isSafari){C*=2;}A=Math.max(1,A+C)+(Ext.isSafari?"px":0);
}this.execCmd("FontSize",A);},onEditorEvent:function(A){this.updateToolbar();},updateToolbar:function(){if(!this.activated){this.onFirstFocus();
return;}var B=this.tb.items.map,C=this.doc;if(this.enableFont&&!Ext.isSafari2){var A=(this.doc.queryCommandValue("FontName")||this.defaultFont).toLowerCase();
if(A!=this.fontSelect.dom.value){this.fontSelect.dom.value=A;}}if(this.enableFormat){B.bold.toggle(C.queryCommandState("bold"));
B.italic.toggle(C.queryCommandState("italic"));B.underline.toggle(C.queryCommandState("underline"));
}if(this.enableAlignments){B.justifyleft.toggle(C.queryCommandState("justifyleft"));
B.justifycenter.toggle(C.queryCommandState("justifycenter"));B.justifyright.toggle(C.queryCommandState("justifyright"));
}if(!Ext.isSafari2&&this.enableLists){B.insertorderedlist.toggle(C.queryCommandState("insertorderedlist"));
B.insertunorderedlist.toggle(C.queryCommandState("insertunorderedlist"));}Ext.menu.MenuMgr.hideAll();
this.syncValue();},relayBtnCmd:function(A){this.relayCmd(A.itemId);},relayCmd:function(B,A){(function(){this.focus();
this.execCmd(B,A);this.updateToolbar();}).defer(10,this);},execCmd:function(B,A){this.doc.execCommand(B,false,A===undefined?null:A);
this.syncValue();},applyCommand:function(B){if(B.ctrlKey){var C=B.getCharCode(),A;
if(C>0){C=String.fromCharCode(C);switch(C){case"b":A="bold";break;case"i":A="italic";
break;case"u":A="underline";break;}if(A){this.win.focus();this.execCmd(A);this.deferFocus();
B.preventDefault();}}}},insertAtCursor:function(B){if(!this.activated){return;}if(Ext.isIE){this.win.focus();
var A=this.doc.selection.createRange();if(A){A.collapse(true);A.pasteHTML(B);this.syncValue();
this.deferFocus();}}else{if(Ext.isGecko||Ext.isOpera){this.win.focus();this.execCmd("InsertHTML",B);
this.deferFocus();}else{if(Ext.isWebKit){this.execCmd("InsertText",B);this.deferFocus();
}}}},fixKeys:function(){if(Ext.isIE){return function(D){var A=D.getKey(),B;if(A==D.TAB){D.stopEvent();
B=this.doc.selection.createRange();if(B){B.collapse(true);B.pasteHTML("&nbsp;&nbsp;&nbsp;&nbsp;");
this.deferFocus();}}else{if(A==D.ENTER){B=this.doc.selection.createRange();if(B){var C=B.parentElement();
if(!C||C.tagName.toLowerCase()!="li"){D.stopEvent();B.pasteHTML("<br />");B.collapse(false);
B.select();}}}}};}else{if(Ext.isOpera){return function(B){var A=B.getKey();if(A==B.TAB){B.stopEvent();
this.win.focus();this.execCmd("InsertHTML","&nbsp;&nbsp;&nbsp;&nbsp;");this.deferFocus();
}};}else{if(Ext.isWebKit){return function(B){var A=B.getKey();if(A==B.TAB){B.stopEvent();
this.execCmd("InsertText","\t");this.deferFocus();}};}}}}(),getToolbar:function(){return this.tb;
},buttonTips:{bold:{title:"Bold (Ctrl+B)",text:"Make the selected text bold.",cls:"x-html-editor-tip"},italic:{title:"Italic (Ctrl+I)",text:"Make the selected text italic.",cls:"x-html-editor-tip"},underline:{title:"Underline (Ctrl+U)",text:"Underline the selected text.",cls:"x-html-editor-tip"},increasefontsize:{title:"Grow Text",text:"Increase the font size.",cls:"x-html-editor-tip"},decreasefontsize:{title:"Shrink Text",text:"Decrease the font size.",cls:"x-html-editor-tip"},backcolor:{title:"Text Highlight Color",text:"Change the background color of the selected text.",cls:"x-html-editor-tip"},forecolor:{title:"Font Color",text:"Change the color of the selected text.",cls:"x-html-editor-tip"},justifyleft:{title:"Align Text Left",text:"Align text to the left.",cls:"x-html-editor-tip"},justifycenter:{title:"Center Text",text:"Center text in the editor.",cls:"x-html-editor-tip"},justifyright:{title:"Align Text Right",text:"Align text to the right.",cls:"x-html-editor-tip"},insertunorderedlist:{title:"Bullet List",text:"Start a bulleted list.",cls:"x-html-editor-tip"},insertorderedlist:{title:"Numbered List",text:"Start a numbered list.",cls:"x-html-editor-tip"},createlink:{title:"Hyperlink",text:"Make the selected text a hyperlink.",cls:"x-html-editor-tip"},sourceedit:{title:"Source Edit",text:"Switch to source editing mode.",cls:"x-html-editor-tip"}}});
Ext.reg("htmleditor",Ext.form.HtmlEditor);Ext.form.TimeField=Ext.extend(Ext.form.ComboBox,{minValue:null,maxValue:null,minText:"The time in this field must be equal to or after {0}",maxText:"The time in this field must be equal to or before {0}",invalidText:"{0} is not a valid time",format:"g:i A",altFormats:"g:ia|g:iA|g:i a|g:i A|h:i|g:i|H:i|ga|ha|gA|h a|g a|g A|gi|hi|gia|hia|g|H",increment:15,mode:"local",triggerAction:"all",typeAhead:false,initDate:"1/1/2008",initComponent:function(){if(typeof this.minValue=="string"){this.minValue=this.parseDate(this.minValue);
}if(typeof this.maxValue=="string"){this.maxValue=this.parseDate(this.maxValue);}if(!this.store){var B=this.parseDate(this.minValue)||new Date(this.initDate).clearTime();
var A=this.parseDate(this.maxValue)||new Date(this.initDate).clearTime().add("mi",(24*60)-1);
var C=[];while(B<=A){C.push(B.dateFormat(this.format));B=B.add("mi",this.increment);
}this.store=C;}Ext.form.TimeField.superclass.initComponent.call(this);},getValue:function(){var A=Ext.form.TimeField.superclass.getValue.call(this);
return this.formatDate(this.parseDate(A))||"";},setValue:function(A){return Ext.form.TimeField.superclass.setValue.call(this,this.formatDate(this.parseDate(A)));
},validateValue:Ext.form.DateField.prototype.validateValue,parseDate:Ext.form.DateField.prototype.parseDate,formatDate:Ext.form.DateField.prototype.formatDate,beforeBlur:function(){var A=this.parseDate(this.getRawValue());
if(A){this.setValue(A.dateFormat(this.format));}Ext.form.TimeField.superclass.beforeBlur.call(this);
}});Ext.reg("timefield",Ext.form.TimeField);Ext.form.Label=Ext.extend(Ext.BoxComponent,{onRender:function(B,A){if(!this.el){this.el=document.createElement("label");
this.el.id=this.getId();this.el.innerHTML=this.text?Ext.util.Format.htmlEncode(this.text):(this.html||"");
if(this.forId){this.el.setAttribute("for",this.forId);}}Ext.form.Label.superclass.onRender.call(this,B,A);
},setText:function(A,B){var C=B===false;this[!C?"text":"html"]=A;delete this[C?"text":"html"];
if(this.rendered){this.el.dom.innerHTML=B!==false?Ext.util.Format.htmlEncode(A):A;
}return this;}});Ext.reg("label",Ext.form.Label);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",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&&!A.responseXML){return true;
}this.result=this.handleResponse(A);return this.result;},getUrl:function(C){var A=this.options.url||this.form.url||this.form.el.dom.action;
if(C){var B=this.getParams();if(B){A=Ext.urlAppend(A,B);}}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(A){var A=A||{};return{success:this.success,failure:this.failure,scope:this,timeout:(A.timeout*1000)||(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 B=this.options;
var C=this.getMethod();var A=C=="GET";if(B.clientValidation===false||this.form.isValid()){Ext.Ajax.request(Ext.apply(this.createCallback(B),{form:this.form.el.dom,url:this.getUrl(A),method:C,headers:B.headers,params:!A?this.getParams():null,isUpload:this.form.fileUpload}));
}else{if(B.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(C){if(this.form.errorReader){var B=this.form.errorReader.read(C);
var F=[];if(B.records){for(var D=0,A=B.records.length;D<A;D++){var E=B.records[D];
F[D]=E.data;}}if(F.length<1){F=null;}return{success:B.success,errors:F};}return Ext.decode(C.responseText);
}});Ext.form.Action.Load=function(B,A){Ext.form.Action.Load.superclass.constructor.call(this,B,A);
this.reader=this.form.reader;};Ext.extend(Ext.form.Action.Load,Ext.form.Action,{type:"load",run:function(){Ext.Ajax.request(Ext.apply(this.createCallback(this.options),{method:this.getMethod(),url:this.getUrl(false),headers:this.options.headers,params:this.getParams()}));
},success:function(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(B){if(this.form.reader){var A=this.form.reader.read(B);
var C=A.records&&A.records[0]?A.records[0].data:null;return{success:A.success,data:C};
}return Ext.decode(B.responseText);}});Ext.form.Action.DirectLoad=Ext.extend(Ext.form.Action.Load,{constructor:function(B,A){Ext.form.Action.DirectLoad.superclass.constructor.call(this,B,A);
},type:"directload",run:function(){var A=this.getParams();A.push(this.success,this);
this.form.api.load.apply(window,A);},getParams:function(){var D=[],A={};var F=this.form.baseParams;
var G=this.options.params;Ext.apply(A,G,F);var C=this.form.paramOrder;if(C){for(var E=0,B=C.length;
E<B;E++){D.push(A[C[E]]);}}else{if(this.form.paramsAsHash){D.push(A);}}return D;},processResponse:function(A){this.result=A;
return A;}});Ext.form.Action.DirectSubmit=Ext.extend(Ext.form.Action.Submit,{constructor:function(B,A){Ext.form.Action.DirectSubmit.superclass.constructor.call(this,B,A);
},type:"directsubmit",run:function(){var A=this.options;if(A.clientValidation===false||this.form.isValid()){this.success.params=this.getParams();
this.form.api.submit(this.form.el.dom,this.success,this);}else{if(A.clientValidation!==false){this.failureType=Ext.form.Action.CLIENT_INVALID;
this.form.afterAction(this,false);}}},getParams:function(){var C={};var A=this.form.baseParams;
var B=this.options.params;Ext.apply(C,B,A);return C;},processResponse:function(A){this.result=A;
return A;}});Ext.form.Action.ACTION_TYPES={load:Ext.form.Action.Load,submit:Ext.form.Action.Submit,directload:Ext.form.Action.DirectLoad,directsubmit:Ext.form.Action.DirectSubmit};
Ext.form.VTypes=function(){var C=/^[a-zA-Z_]+$/;var D=/^[a-zA-Z0-9_]+$/;var B=/^(\w+)([-+.][\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@example.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.example.com"',alpha:function(E){return C.test(E);
},alphaText:"This field should only contain letters and _",alphaMask:/[a-z_]/i,alphanum:function(E){return D.test(E);
},alphanumText:"This field should only contain letters, numbers and _",alphanumMask:/[a-z0-9_]/i};
}();Ext.ns("GS","GS.component");Ext.ns("Ext.ux","Ext.ux.data");Ext.form.Field.prototype.alignErrorIconAbove=function(){this.errorIcon.alignTo(this.getErrorCt(),"br-tr",[0,-2]);
};Ext.DatePicker.prototype.getErrorCt=Ext.form.Field.prototype.getErrorCt;Ext.DatePicker.prototype.alignErrorIconAbove=Ext.form.Field.prototype.alignErrorIconAbove;
Ext.DatePicker.prototype.getMessageHandler=Ext.form.Field.prototype.getMessageHandler;
Ext.DatePicker.prototype.markInvalid=Ext.form.Field.prototype.markInvalid;Ext.DatePicker.prototype.clearInvalid=Ext.form.Field.prototype.clearInvalid;
Ext.form.MessageTargets.qtip={mark:function(B,A){B.el.addClass(B.invalidClass);B.el.dom.title=A;
},clear:function(A){A.el.removeClass(A.invalidClass);A.el.dom.title="";}};Ext.override(Ext.form.Checkbox,{checked:undefined,actionMode:"wrap",innerCls:"x-form-checkbox-inner",onResize:function(){Ext.form.Checkbox.superclass.onResize.apply(this,arguments);
if(!this.boxLabel){this.innerWrap.alignTo(this.wrap,"c-c");}},initEvents:function(){Ext.form.Checkbox.superclass.initEvents.call(this);
this.mon(this.el,{click:this.onClick,change:this.onClick,mouseenter:this.onMouseEnter,mouseleave:this.onMouseLeave,mousedown:this.onMouseDown,mouseup:this.onMouseUp,scope:this});
},onRender:function(A,B){Ext.form.Checkbox.superclass.onRender.call(this,A,B);if(this.inputValue!==undefined){this.el.dom.value=this.inputValue;
}else{this.inputValue=this.el.dom.value;}this.innerWrap=this.el.wrap({cls:this.innerCls});
this.wrap=this.innerWrap.wrap({cls:"x-form-check-wrap"});if(this.boxLabel){this.labelEl=this.wrap.createChild({tag:"label",htmlFor:this.el.id,cls:"x-form-cb-label",html:this.boxLabel});
}else{this.innerWrap.addClass("x-form-check-no-label");}},initValue:function(){if(this.checked!==undefined){this.setValue(this.checked);
}else{if(this.value!==undefined){this.setValue(this.value);}this.checked=this.el.dom.checked;
}this.originalValue=this.getValue();},getRawValue:function(){return this.rendered?this.el.dom.checked:this.checked;
},getValue:function(){return this.getRawValue();},onClick:function(){if(Ext.isSafari){this.focus();
}if(this.el.dom.checked!=this.checked){this.setValue(this.el.dom.checked);}},setValue:function(A){this.checked=typeof A=="boolean"?A:A==this.inputValue;
if(this.rendered){this.el.dom.checked=this.checked;this.el.dom.defaultChecked=this.checked;
this.innerWrap[this.checked?"addClass":"removeClass"]("x-form-check-checked");this.validate();
}this.fireEvent("check",this,this.checked);return this;},onMouseEnter:function(){this.wrap.addClass("x-form-check-over");
},onMouseLeave:function(){this.wrap.removeClass("x-form-check-over");this.wrap.removeClass("x-form-check-down");
},onMouseDown:function(){this.wrap.addClass("x-form-check-down");},onMouseUp:function(){this.wrap.removeClass("x-form-check-down");
},onFocus:function(){Ext.form.Checkbox.superclass.onFocus.call(this);this.wrap.addClass("x-form-check-focus");
},onBlur:function(){Ext.form.Checkbox.superclass.onBlur.call(this);this.wrap.removeClass("x-form-check-focus");
}});Ext.override(Ext.form.Radio,{innerCls:"x-form-radio-inner",onClick:Ext.form.Radio.superclass.onClick,setValue:function(C){Ext.form.Radio.superclass.setValue.call(this,C);
if(this.rendered&&this.checked){var D=this.el.up("form")||Ext.getBody(),B=D.select("input[name="+this.el.dom.name+"]"),A=this.el.dom.id;
B.each(function(E){if(E.dom.id!=A){Ext.getCmp(E.dom.id).setValue(false);}});}return this;
}});Ext.ux.JSON=function(){var A=function(D){for(property in D){var C=typeof D[property];
switch(C){case"string":if(D[property].indexOf("/Date(")>-1){var E=D[property].substring(6);
E=E.substring(0,E.indexOf(")/"));var B=E.indexOf("+");if(B>-1){E=E.substring(0,B);
}D[property]=new Date(parseInt(E,10));}break;case"object":A(D[property]);break;}}};
return{encodeDate:function(B){var C='"\\/Date('+B.getTime()+')\\/"';return C;},decode:function(B){var C=Ext.util.JSON.decode(B);
A(C);return C;}};}();Ext.util.JSON.encodeDate=Ext.ux.JSON.encodeDate;Ext.decode=Ext.ux.JSON.decode;
GS.Utils=function(){var A=false;return{setContainerVisibility:function(C,B){if(B){GS.Utils.showContainer(C);
}else{GS.Utils.hideContainer(C);}},showContainer:function(B){B.enable();B.show();
if(!Ext.isEmpty(B.getEl())){B.getEl().up(".x-form-item").setDisplayed(true);}},hideContainer:function(B){B.disable();
B.hide();if(!Ext.isEmpty(B.getEl())){B.getEl().up(".x-form-item").setDisplayed(false);
}},setVisibility:function(C,B){if(B){C.show();}else{C.hide();}},mask:function(B){B.mask("","gs-mask");
},error:function(B,C){Ext.Msg.show({title:GS.strings.error,msg:B,buttons:Ext.Msg.OK,icon:Ext.Msg.ERROR,fn:C});
},warn:function(B,C){Ext.Msg.show({title:GS.strings.warning,msg:B,buttons:Ext.Msg.OK,icon:Ext.Msg.WARNING,fn:C});
},confirm:function(D,E,C,B){Ext.Msg.show({title:GS.strings.confirmation,msg:D,buttons:Ext.Msg.YESNO,fn:function(F){if(F=="yes"){E.call(B||this);
}else{if(typeof C==="function"){C.call(B||this);}}},scope:B,icon:Ext.Msg.QUESTION});
},isActionConfirmed:function(){return A;},performWithConfirmation:function(B,C){Ext.Msg.confirm(GS.strings.confirmation,B,function(D){if(D==="yes"){A=true;
C();A=false;}});},request:function(E,C,F,G,B){var D={url:"FormService.svc/"+E,method:"POST",params:Ext.encode(C),success:function(J,I){if(J.responseText===null||J.responseText.length===0){F.call(B||this,null);
return;}var H;try{H=Ext.decode(J.responseText);}catch(K){G.call(B||this,"could not decode message: "+J.responseText,null);
}if(typeof(H)==="undefined"){return;}F.call(B||this,H);},failure:function(J,I){if(J.status==401){window.location=GS.config.sessionExpiredUrl;
return;}var H;try{H=Ext.decode(J.responseText);}catch(K){G.call(B||this,J.responseText);
return;}if(typeof(H)==="undefined"){G.call(B||this,J.responseText);return;}G.call(B||this,H);
}};return Ext.Ajax.request(D);},abortRequest:function(B){Ext.Ajax.abort(B);},requestIsLoading:function(B){return Ext.Ajax.isLoading(B);
},init:function(){Ext.apply(Ext.form.VTypes,{nonWhitespaceRx:/.*\S+.*/,nonWhitespace:function(B){return(B===null||B==="")?true:this.nonWhitespaceRx.test(B);
},nonWhitespaceText:Ext.form.TextField.prototype.blankText,nullableEmail:function(B){return(B===null||B==="")?true:Ext.form.VTypes.email(B);
},nullableEmailMask:Ext.form.VTypes.emailMask,nullableEmailText:Ext.form.VTypes.emailText,finnishSSNRx:/^(0[1-9]|[12]\d|3[01])(0[1-9]|1[0-2])\d{2}.{5}$/i,finnishSSN:function(B){return(B===null||B==="")?true:this.finnishSSNRx.test(B);
},finnishSSNText:GS.strings.validationFinnishSSN, latinNameRx: /^\s*([A-Za-zÀ-žЯа-я\-'])+(([A-Za-zÀ-žЯа-я\-'\s])*)$/i,latinName:function(B){return(B===null||B==="")?true:this.latinNameRx.test(B);
},latinNameText:GS.strings.validationLatinName, latinAddressRx: /^\s*([0-9A-Za-zÀ-žЯа-я\-;,'\:\.])+(([0-9A-Za-zÀ-žЯа-я\-;,'\:\.\s])*)$/i,latinAddress:function(B){return(B===null||B==="")?true:this.latinAddressRx.test(B);
},latinAddressText:GS.strings.validationLatinAddress});}};}();Ext.override(Ext.DatePicker,{isNull:true,customMarkers:{},initDisabledDays:function(){this.setCustomDatesMarker(this.disabledDatesRE||this.disabledDates,"x-date-disabled",this.disabledDatesText,true);
},setDisabledDates:function(A){this.setCustomDatesMarker(A,"x-date-disabled",this.disabledDatesText,true);
},setCustomDatesMarker:function(B,C,G,F){var A;if(Ext.isArray(B)){if(!Ext.isEmpty(B)){var D="(?:",E=B.length-1;
Ext.each(B,function(H,I){D+=Ext.isDate(H)?"^"+Ext.escapeRe(H.dateFormat(this.format))+"$":H;
if(I<E){D+="|";}},this);A=new RegExp(D+")");}else{A=null;}}else{A=B;}if(A){this.customMarkers[C]={re:A,text:G,override:F};
}else{if(this.customMarkers[C]){delete this.customMarkers[C];}}if(this.rendered){this.update(this.value,true);
}},setValue:function(B){var A=this.value;if(B==null){this.isNull=true;}else{this.isNull=false;
this.value=B.clearTime(true);}if(this.el){this.update(this.value);}},getValue:function(){return this.isNull?null:this.value;
},update:function(V,Y){if(this.el){if(this.isNull){this.el.addClass("x-date-null");
}else{this.el.removeClass("x-date-null");}}var Q=this.getValue();var K=Q?Q.getTime():0;
var G=this.activeDate,E=this.isVisible();this.activeDate=V;if(!Y&&G&&this.el){var J=V.getTime();
if(G.getMonth()==V.getMonth()&&G.getFullYear()==V.getFullYear()){this.cells.removeClass(["x-date-selected","x-date-current"]);
this.cells.each(function(d){if(d.dom.firstChild.dateValue==J){d.addClass("x-date-current");
if(E){Ext.fly(d.dom.firstChild).focus(50);}}if(d.dom.firstChild.dateValue==K){d.addClass("x-date-selected");
}});return;}}var g=V.getDaysInMonth();var D=V.getFirstDateOfMonth();var C=D.getDay()-this.startDay;
if(C<0||(!this.notFixedHeight&&C==0)){C+=7;}var W=V.add("mo",-1);var B=W.getDaysInMonth()-C;
var S=this.cells.elements;var P=this.textNodes;g+=C;var O=86400000;var N=(new Date(W.getFullYear(),W.getMonth(),B)).clearTime();
var Z=new Date().clearTime().getTime();var f=V.clearTime().getTime();var a=this.minDate?this.minDate.clearTime():Number.NEGATIVE_INFINITY;
var U=this.maxDate?this.maxDate.clearTime():Number.POSITIVE_INFINITY;var h=this.disabledDatesRE;
var c=this.disabledDatesText;var T=this.disabledDays?this.disabledDays.join(""):false;
var M=this.disabledDaysText;var I=this.format;var A=this.customMarkers;var H=function(d,l){l.title="";
var m=N.getTime();l.firstChild.dateValue=m;if(m==Z){l.className+=" x-date-today";
l.title=d.todayText;}if(m==f){l.className+=" x-date-current";if(E){Ext.fly(l.firstChild).focus(50);
}}if(m==K){l.className+=" x-date-selected";}if(m<a){l.className=" x-date-disabled";
l.title=d.minText;return;}if(m>U){l.className=" x-date-disabled";l.title=d.maxText;
return;}if(T){if(T.indexOf(N.getDay())!=-1){l.title=M;l.className=" x-date-disabled";
}}if(I){var k=N.dateFormat(I);for(markerCls in A){var j=A[markerCls];if(j.re.test(k)){l.title=j.text.replace("%0",k);
l.className=" "+markerCls+" "+(j.override?"":l.className);if(j.override){break;}}}}if(this.showToday&&!this.disabled){var i=new Date().clearTime();
var n=l.className==="x-date-disabled";this.todayBtn.setDisabled(n);this.todayKeyListener[n?"disable":"enable"]();
}};var X=0;for(;X<C;X++){P[X].innerHTML=(++B);N.setDate(N.getDate()+1);S[X].className="x-date-prevday";
H(this,S[X]);}for(;X<g;X++){var F=X-C+1;P[X].innerHTML=(F);N.setDate(N.getDate()+1);
S[X].className="x-date-active";H(this,S[X]);}var b=0;var e=(X>35||!this.notFixedHeight)?42:35;
for(;X<e;X++){P[X].innerHTML=(++b);N.setDate(N.getDate()+1);S[X].className="x-date-nextday";
H(this,S[X]);}for(;X<42;X++){S[X].className="x-date-hidden";}this.mbtn.setText(this.monthNames[V.getMonth()]+" "+V.getFullYear());
if(!this.internalRender){var R=this.el.dom.firstChild;var L=R.offsetWidth;this.el.setWidth(L+this.el.getBorderWidth("lr"));
Ext.fly(R).setWidth(L);this.internalRender=true;if(Ext.isOpera&&!this.secondPass){R.rows[0].cells[1].style.width=(L-(R.rows[0].cells[0].offsetWidth+R.rows[0].cells[2].offsetWidth))+"px";
this.secondPass=true;this.update.defer(10,this,[V]);}}}});Ext.ns("GS","GS.cmp");GS.cmp.NavigationPanel=Ext.extend(Ext.TabPanel,{autoHeight:true,plain:true,border:false,defaults:{autoHeight:true,bodyCssClass:"gs-tab-body x-panel-body"},getTemplateArgs:function(B){var A=Ext.TabPanel.prototype.getTemplateArgs.call(this,B);
return Ext.apply(A,{first:B.isFirst,last:B.isLast});},initComponent:function(){var A=new Ext.XTemplate('<li class="{cls}" id="{id}">','<tpl if="first">','<div class="x-tab-start"></div>',"</tpl>",'<a class="x-tab-strip-close" onclick="return false;"></a>','<a class="x-tab-right" href="#" onclick="return false;"><em class="x-tab-left">','<span class="x-tab-strip-inner"><span class="x-tab-strip-text {iconCls}">{text}</span></span>',"</em></a>",'<tpl if="!last">','<div class="x-tab-mid"></div>',"</tpl>",'<tpl if="last">','<div class="x-tab-end"> </div>',"</tpl>","</li>");
A.disableFormats=true;A.compile();Ext.apply(this,{itemTpl:A});GS.cmp.NavigationPanel.superclass.initComponent.call(this);
},deactivateCurrent:function(){if(!this.activeTab){return;}var A=this.getTabEl(this.activeTab);
if(A){Ext.fly(A).removeClass("x-tab-strip-active");}this.activeTab.fireEvent("deactivate",this.activeTab);
delete this.activeTab;if(this.layout.activeItem){this.layout.activeItem.hide();}this.layout.activeItem=null;
}});GS.cmp.Combo=Ext.extend(Ext.form.ComboBox,{triggerAction:"all",selectOnFocus:true,editable:false,forceSelection:true,allowBlank:false,mode:"local",validateOnBlur:false,listeners:{blur:function(B){var A=B.getRawValue();
if((A===null||A.length===0)&&B.getValue()!==null){B.setValue("");}}}});GS.cmp.DatePicker=Ext.extend(Ext.DatePicker,{showToday:false,updating:false,notFixedHeight:true,onRender:function(D,A){GS.cmp.DatePicker.superclass.onRender.call(this,D,A);
var B=this.el.child("td.x-date-left a");B.removeAllListeners();B.on("click",this.showPrevMonth,this,{stopDefault:true,preventDefault:true});
var C=this.el.child("td.x-date-right a");C.removeAllListeners();C.on("click",this.showNextMonth,this,{stopDefault:true,preventDefault:true});
},update:function(E,C){if(this.disabled){return;}if(this.secondPass){GS.cmp.DatePicker.superclass.update.call(this,E,C);
return;}if(this.updating){return;}var A=this.activeDate||new Date(1971,0,1);var B=E.getMonth();
var D=E.getFullYear();if(A.getMonth()!=B||A.getFullYear()==E.newYear){this.updating=true;
GS.Utils.mask(this.el);GS.Utils.request("GetAvailabilityForMonth",{year:D,month:B+1},function(F){var G=[];
var H=[];var I=[];var J=[];Ext.each(F.result,function(K){var L=K.Free;if(L===0){G.push(K.Date);
}else{if(K.Date.getMonth()!=B){return;}if(L<5){H.push(K.Date);}else{if(L<10){I.push(K.Date);
}else{if(L<15){J.push(K.Date);}}}}},this);this.setDisabledDates(G);this.setCustomDatesMarker(H,"gs-low-avail1",GS.strings.lowAvailability,false);
this.setCustomDatesMarker(I,"gs-low-avail2",GS.strings.lowAvailability,false);this.setCustomDatesMarker(J,"gs-low-avail3",GS.strings.lowAvailability,false);
GS.cmp.DatePicker.superclass.update.call(this,E,C);this.updating=false;this.el.unmask();
},function(F){this.el.unmask();GS.Utils.error(F);},this);}else{GS.cmp.DatePicker.superclass.update.call(this,E,C);
}}});GS.cmp.NewsPart=Ext.extend(Ext.Panel,{border:false,onRender:function(A,B){GS.cmp.NewsPart.superclass.onRender.call(this,A,B);
this.setLoading();GS.Utils.request("GetLatestNews",{locale:GS.config.locale},function(C){this.renderTpl.overwrite(this.body,C.result);
var D=Ext.get(this.body);D.select("a.gs-newsPartItem",true).each(function(E){E.on("click",function(){GS.Page.showNews(parseInt(this.id.substr(15),10));
},E,{stopDefault:true,preventDefault:true});},this);D.select("a.gs-newsPartAll",true).each(function(E){E.on("click",function(){GS.Page.showNewsList();
},this,{stopDefault:true,preventDefault:true});},this);},function(C){var D=Ext.getDom(this.body);
D.innerHTML=C;},this);},setLoading:function(){Ext.getDom(this.body).innerHTML=Ext.UpdateManager.defaults.indicatorText;
},renderTpl:new Ext.XTemplate("<h2>{[GS.strings.newsPartTitle]}</h2>",'<div class="gs-newsPart-body">','<tpl for=".">','<a id="gs-newsPartItem{Id}" class="gs-newsPartItem" href="#">','<div class="gs-newsPartItemBullet"> </div>',"{Title}","</a><br/>","</tpl>","</div>",'<a href="#" class="gs-newsPartAll">{[GS.strings.viewAllNews]}</a>')});
GS.cmp.NewsList=Ext.extend(Ext.Panel,{border:false,cls:"gs-newsList",page:1,onRender:function(A,B){GS.cmp.NewsPart.superclass.onRender.call(this,A,B);
this.loadNews.call(this);},loadNews:function(){this.setLoading();GS.Utils.request("GetNewsList",{pageNumber:this.page,locale:GS.config.locale},function(A){this.page=A.pageNumber;
this.renderTpl.overwrite(this.body,A);var B=Ext.get(this.body);B.select("a.gs-newsItem",true).each(function(C){C.on("click",function(){GS.Page.showNews(parseInt(this.id.substr(11),10));
},C,{stopDefault:true,preventDefault:true});},this);B.select("a.gs-newsOlder",true).each(function(C){C.on("click",function(){this.page++;
this.loadNews();},this,{stopDefault:true,preventDefault:true});},this);B.select("a.gs-newsNewer",true).each(function(C){C.on("click",function(){this.page--;
this.loadNews();},this,{stopDefault:true,preventDefault:true});},this);},function(A){var B=Ext.getDom(this.body);
B.innerHTML=A;},this);},setLoading:function(){Ext.getDom(this.body).innerHTML=Ext.UpdateManager.defaults.indicatorText;
},renderTpl:new Ext.XTemplate("<h1>{[GS.strings.newsList]}</h1>",'<tpl for="items">','<a id="gs-newsItem{Id}" class="gs-newsItem" href="#">','<div class="gs-newsItemDate">{[Ext.util.Format.date(values.ReleaseDate)]}</div>','<div class="gs-newsItemTitle">{Title}</div>',"</a>","</tpl>",'<tpl if="pageNumber &lt; pageCount">','<a href="#" class="gs-newsOlder">{[GS.strings.newsOlder]}</a>',"</tpl>",'<tpl if="pageNumber &gt; 1">','<a href="#" class="gs-newsNewer">{[GS.strings.newsNewer]}</a>',"</tpl>")});
GS.cmp.NewsView=Ext.extend(Ext.Panel,{border:false,select:function(A){this.setLoading();
GS.Utils.request("GetNews",{newsId:A,locale:GS.config.locale},function(B){this.renderTpl.overwrite(this.body,B);
},function(B){Ext.getDom(this.body).innerHTML=B;},this);},setLoading:function(){Ext.getDom(this.body).innerHTML=Ext.UpdateManager.defaults.indicatorText;
},renderTpl:new Ext.XTemplate('<tpl for=".">',"<h1>{Title}</h1>","<h3>{[Ext.util.Format.date(values.ReleaseDate)]}</h3>","{Content}","</tpl>")});
Ext.ns("GS");Ext.BLANK_IMAGE_URL="resources/images/default/s.gif";GS.Page=function(){var G=null;
var I=null;var F=null;var D=null;var A=null;var C=function(){var J=null;var L=new Array(GS.pages.length);
for(var K=GS.pages.length-1;K>=0;K--){var N=GS.pages[K];var M=Ext.isEmpty(N.Name)?N.Id:N.Name;
L[K]={title:GS.pages[K].Title,tabId:M};if(J===null&&GS.config.currentPageView!==null&&N.Id==GS.config.currentPageView.Id){J=K;
L[K].contentEl="gs-content";}else{L[K].autoLoad={url:GS.config.locale+"/get/page/"+M,scripts:true,nocache:false};
}if(K===0){L[K].isFirst=true;}if(K==GS.pages.length-1){L[K].isLast=true;}}G=new GS.cmp.NavigationPanel({id:"nav-tabs",activeTab:J,renderTo:"gs-main",items:L,listeners:{tabchange:function(){if(I!==null){I.hide();
I=null;}GS.Page.resetMainView(true);}}});};var H=function(){if((G===null||G.getActiveTab()===null)&&GS.config.currentPageView!==null){I=new Ext.Panel({id:"current-page-content",bodyCssClass:"gs-tab-body",renderTo:"gs-main",border:false,contentEl:"gs-content"});
}};var E=function(){var K=new Ext.Panel({id:"panel-contact",title:GS.strings.contactInfo,renderTo:"contact-container",cls:"gs-panel",frame:true,width:220,bodyCssClass:"gs-panel-body x-panel-body"});
var J=new Ext.XTemplate('<tpl for=".">','<table border="0" cellpadding="0" cellspacing="0" width="100%"><tr><td width="100%" valign="top">',"<p>","{addressLine1}<br/>","{addressLine2}","</p>",'<p><a class="mail" href="mailto:{email}">{email}</a></p>',"<p>{phone}</p>",'</td><td valign="top">','<a id="gs-map-link" href="#">','<div id="gs-map-holder"><div id="gs-map"> </div><div>{[GS.strings.mapLinkText]}</div></div>',"</a>","</td></tr></table>","</tpl>");
J.overwrite(K.body,GS.config.contactInfo);Ext.get("gs-map-link").on("click",function(){GS.Page.navigateTo("map");
},this,{stopDefault:true,preventDefault:true});};var B=function(){var J=new Ext.XTemplate('<table id="panel-locales" cellpaddding="0" cellspacing="0" border="0">',"<tr>",'<tpl for=".">','<td class="gs-locale-option" valign="middle">','<a href="#">','<img id="gs-locale-{Id}" class="gs-locale" src="resources/images/localisation/{Id}.jpg" title="{Description}" />',"</a>","</td>","</tpl>","</tr>","</table>");
J.overwrite(Ext.get("locale-container"),GS.config.locales);GS.Page.setElementsClick(Ext.get("locale-container"),"img.gs-locale",function(){var L="gs-locale-";
var M=this.id.substr(L.length);var K=GS.config.siteUrl+(M==GS.config.defaultLocale?"":M+"/")+GS.config.pagePath;
window.location=K;});};return{renderNewsTo:"",init:function(){Ext.lib.Ajax.defaultPostHeader="application/json";
GS.Utils.init();E();B();GS.Page.linkToPage("gs-footer-link1","helpbooking");GS.Page.linkToPage("gs-footer-link2","checkin");
if(GS.config.singlePageView){Ext.get("gs-main").addClass("gs-single-page-view");}else{C();
}H();GS.Reservation.getStarter();if(this.renderNewsTo!=""){new GS.cmp.NewsPart({renderTo:this.renderNewsTo});
}},resetMainView:function(K,M){var L=Ext.getBody();var J=L.dom.parentNode;Ext.get(J).scrollTo("top",0,true);
L.scrollTo("top",0,true);if(I!==null){I.hide();I=null;}if(K!==true&&G!==null){G.deactivateCurrent();
}if(M!==true){GS.Reservation.resetReservation();}if(A!=null){A.destroy();A=null;}if(F!=null){F.hide();
}if(D!=null){D.hide();}},showCurrentPage:function(){if(I!==null){I.show();}else{if(!G.activeTab&&G.items.getCount()>0){G.activate(G.items.get(0));
}}},linkToPage:function(J,K){Ext.get(J).on("click",function(){GS.Page.navigateTo(K);
},this,{stopDefault:true,preventDefault:true});},showNewsList:function(){this.resetMainView();
if(F==null){F=new GS.cmp.NewsList({renderTo:"gs-main",hidden:true});}F.show();},showNews:function(J){this.resetMainView();
if(D==null){D=new GS.cmp.NewsView({renderTo:"gs-main",hidden:true});}D.select(J);
D.show();},navigateTo:function(J){this.resetMainView();var K=null;if(G!==null){K=G.items.find(function(L){return L.tabId==J;
});}if(K!==null){G.activate(K);}else{A=new Ext.Panel({border:false,autoLoad:{url:GS.config.locale+"/get/page/"+J,scripts:true,nocache:false},renderTo:"gs-main"});
}},registerNewsPart:function(J){this.renderNewsTo=J;},renderContentPanel:function(J,N){var K=Ext.get(J);
var M=K.wrap();var L=new Ext.Panel({title:N,cls:"gs-contentPanel",bodyCssClass:"gs-contentPanel-body x-panel-body",frame:true,renderTo:M,contentEl:K});
},renderFlash:function(K,J){new Ext.FlashComponent({url:J,renderTo:K});},setElementsClick:function(L,K,J){L.select(K,true).each(function(M){M.unselectable();
M.on("click",J,M,{stopDefault:true,preventDefault:true});});}};}();Ext.ns("GS","GS.cmp");GS.cmp.CompanyBillingDetails=Ext.extend(Ext.form.FieldSet,{id:"frmCompanyBillingDetails",defaults:{xtype:"displayfield",anchor:"0"},main:false,hidden:true,initComponent:function(){var A=this;
var B=[{dataIndex:"LastName",fieldLabel:GS.strings.companyName},{fieldLabel:GS.strings.guestStreetAddress,dataIndex:"StreetAddress"},{fieldLabel:GS.strings.guestPostalCode,dataIndex:"PostalCode"},{fieldLabel:GS.strings.guestCity,dataIndex:"City"},{dataIndex:"MobilePhone",fieldLabel:GS.strings.phone},{dataIndex:"Email",fieldLabel:GS.strings.guestEmail}];
Ext.apply(this,{items:B,labelWidth:GS.widths.editGuestLabels});GS.cmp.CompanyBillingDetails.superclass.initComponent.call(this);
},setDisabled:function(A){for(var B=0,C=this.items.getCount();B<C;B++){this.items.get(B).setDisabled(A);
}},load:function(C){for(var A=this.items.getCount()-1;A>=0;A--){var B=this.items.get(A);
if(typeof B.dataIndex==="undefined"){continue;}B.setValue(C[B.dataIndex]);}}});Ext.reg("companybillingdetails",GS.cmp.CompanyBillingDetails);
GS.cmp.ChangePwdForm=Ext.extend(Ext.form.FieldSet,{id:"changePwdForm",defaults:{anchor:"0"},hidden:true,initComponent:function(){var A=this;
var B=[this._fieldNewPassword=new Ext.form.TextField({inputType:"password",allowBlank:false,dataIndex:"Password",fieldLabel:GS.strings.newPassword}),this._fieldConfirmPassword=new Ext.form.TextField({inputType:"password",allowBlank:false,dataIndex:"ConfirmPassword",fieldLabel:GS.strings.confirmPassword})];
Ext.apply(this,{items:B,labelWidth:GS.widths.editGuestLabels});GS.cmp.ChangePwdForm.superclass.initComponent.call(this);
},buttons:[{style:"margin-left:"+GS.widths.loginLabels+"px",text:GS.strings.changePassword,handler:function(){var A=Ext.getCmp("changePwdForm");
var B=A.getEl();GS.Utils.mask(B);GS.Utils.request("ChangePassword",{newPassword:A._fieldNewPassword.getValue(),confirmPassword:A._fieldConfirmPassword.getValue(),locale:GS.config.locale},function(C){B.unmask();
if(!C.Success){GS.Utils.error(C.Error);}else{GS.Utils.warn(GS.strings.passwordChanged);
A.hide();}},function(C){B.unmask();GS.Utils.error(C);});}},{xtype:"tbtext",text:'<a id="cancelPasswordReminder" href="#">'+GS.strings.cancel+"</a>",listeners:{afterrender:function(){Ext.get("cancelPasswordReminder").on("click",function(A){A.stopEvent();
Ext.getCmp("changePwdForm").hide();});}}}],display:function(){this._fieldNewPassword.setValue("");
this._fieldConfirmPassword.setValue("");this.show();}});Ext.reg("changepwdform",GS.cmp.ChangePwdForm);
GS.cmp.GuestForm=Ext.extend(Ext.form.FieldSet,{defaults:{xtype:"textfield",anchor:"0"},main:false,customerCheck:false,isCustomer:false,clear:function(){this.items.get(0).setValue(false);
this.setIsCustomer(false);},setIsCustomer:function(A){var C=this;C.isCustomer=A;C.load(C.isCustomer?GS.Reservation.getWizard().steps.getCustomer():{});
for(var B=1;B<C.items.length;++B){C.items.get(B).setDisabled(A);}},initComponent:function(){var A=this;
var B=[{xtype:"checkbox",boxLabel:GS.strings.sameAsCustomer,hideLabel:true,hidden:!this.customerCheck,listeners:{check:function(){var C=this.getValue();
A.setIsCustomer(C);}}},{allowBlank:!this.main,dataIndex:"FirstName",vtype:"latinName",autoCreate:{tag:"input",type:"text",size:"20",autocomplete:"off",maxlength:"50"},fieldLabel:GS.strings.guestFirstName},{allowBlank:!this.main,dataIndex:"LastName",vtype:"latinName",autoCreate:{tag:"input",type:"text",size:"20",autocomplete:"off",maxlength:"50"},fieldLabel:GS.strings.guestLastName},{allowBlank:!this.main,dataIndex:"SocialIdentityNumber",autoCreate:{tag:"input",type:"text",size:"20",autocomplete:"off",maxlength:"50"},fieldLabel:GS.strings.guestSSN,vtype:GS.config.locale=="fi"?"finnishSSN":"nonWhitespace"},{allowBlank:!this.main,dataIndex:"StreetAddress",vtype:"latinAddress",autoCreate:{tag:"input",type:"text",size:"20",autocomplete:"off",maxlength:"80"},fieldLabel:GS.strings.guestStreetAddress},{fieldLabel:GS.strings.guestPostalCode,allowBlank:!this.main,dataIndex:"PostalCode",vtype:"nonWhitespace",autoCreate:{tag:"input",type:"text",size:"20",autocomplete:"off",maxlength:"50"}},{fieldLabel:GS.strings.guestCity,allowBlank:!this.main,dataIndex:"City",vtype:"nonWhitespace",autoCreate:{tag:"input",type:"text",size:"20",autocomplete:"off",maxlength:"50"}},{allowBlank:!this.main,dataIndex:"MobilePhone",vtype:"nonWhitespace",autoCreate:{tag:"input",type:"text",size:"20",autocomplete:"off",maxlength:"50"},fieldLabel:GS.strings.guestMobilePhone},this._emailField=new Ext.form.TextField({allowBlank:!this.main,dataIndex:"Email",autoCreate:{tag:"input",type:"text",size:"20",autocomplete:"off",maxlength:"60"},vtype:"nullableEmail",fieldLabel:GS.strings.guestEmail})];
if(this.isCustomer){B.push({xtype:"checkbox",dataIndex:"MarketingSMSPermission",boxLabel:GS.strings.guestMarketingSMS,hideLabel:true});
B.push({xtype:"checkbox",dataIndex:"MarketingEmailPermission",boxLabel:GS.strings.guestMarketingEmail,hideLabel:true});
}Ext.apply(this,{items:B,labelWidth:GS.widths.editGuestLabels});GS.cmp.GuestForm.superclass.initComponent.call(this);
},setDisabled:function(A){for(var B=0,C=this.items.getCount();B<C;B++){this.items.get(B).setDisabled(A);
}},retrieve:function(E){var C;if(typeof E.set==="undefined"){C=function(F,G){E[F]=G;
};}else{C=function(F,G){E.set(F,G);};}for(var A=this.items.getCount()-1;A>=0;A--){var B=this.items.get(A);
if(typeof B.dataIndex==="undefined"){if(B.dataContainer){this.retrieve.call(B,E);
}continue;}var D=B.getValue();C(B.dataIndex,D);}},load:function(C){for(var A=this.items.getCount()-1;
A>=0;A--){var B=this.items.get(A);if(typeof B.dataIndex==="undefined"){continue;}B.setValue(C[B.dataIndex]);
}this._emailField.setDisabled(C!=null&&typeof C["Email"]!="undefined"&&C.Email!=null);
},isValid:function(){var A=true;for(var B=0,D=this.items.getCount();B<D;B++){var C=this.items.get(B);
if(Ext.isFunction(C.isValid)){A=C.isValid()&&A;}}return A;}});Ext.reg("guestform",GS.cmp.GuestForm);
GS.cmp.GuestsPanel=Ext.extend(Ext.Panel,{roomNo:1,guestForms:null,guestCount:0,clear:function(){if(this.guestForms!=null&&this.guestForms.length>0){this.guestForms[0].hide();
this.guestForms[0].clear();}},setGuestCount:function(A){if(this.guestForms==null){this.guestForms=new Array();
}this.guestCount=A;A=1;for(var B=0;B<A;B++){if(B>=this.guestForms.length){this.grow();
}var C=this.guestForms[B];C.show();C.doLayout();}for(var E=A,D=this.guestForms.length;
E<D;E++){this.guestForms[E].hide();}this.doLayout();},grow:function(){var C=this.guestForms.length===0;
var A=this.guestForms.length+1;var B=this.add({layout:"column",width:Ext.isIE6?588:undefined,cls:"guest-container",style:"padding-top: 10px;",items:[{xtype:"guestform",roomNo:this.roomNo,main:C,customerCheck:C&&this.roomNo==1,title:(C?String.format(GS.strings.titleMainGuestForm,this.roomNo):String.format(GS.strings.titleAddGuestForm,A))+GS.Reservation.createInfoLink("infoMainGuest"+this.roomNo),columnWidth:0.5,style:"margin-right: 5px",listeners:{afterrender:function(){GS.Reservation.attachInfoMessage("infoMainGuest"+this.roomNo,GS.strings.infoMainGuest);
}}},{xtype:"guestform",title:String.format(GS.strings.titleAddGuestForm,A+1),columnWidth:0.5,hidden:true,style:"margin-left: 5px"}]});
this.guestForms.push(B.items.get(0));this.guestForms.push(B.items.get(1));},isValid:function(){var A=true;
for(var B=0;B<1;B++){A=this.guestForms[B].isValid()&&A;}return A;},setDisabled:function(A){for(var B=0,C=this.guestForms.length;
B<C;B++){this.guestForms[B].setDisabled(A);}},getGuestIsCustomer:function(){return(this.guestForms.length>0)?this.guestForms[0].isCustomer:false;
},retrieve:function(){var C=[];for(var A=0;A<(this.guestCount>0?1:0);A++){var B={};
this.guestForms[A].retrieve(B);C.push(B);}return C;}});GS.cmp.LoginForm=Ext.extend(Ext.form.FieldSet,{id:"login-form",url:"Default.aspx",defaults:{xtype:"textfield",anchor:"0"},display:function(){var A=Ext.getCmp("login-email");
var B=Ext.getCmp("login-password");if(GS.auth.IsAuthenticated){GS.Utils.hideContainer(A);
GS.Utils.hideContainer(B);Ext.getCmp("login-btn").hide();Ext.getCmp("login-reminder").hide();
Ext.getCmp("login-authenticated").show();Ext.getCmp("login-logout").show();Ext.getCmp("linkChangePassword").show();
}else{GS.Utils.showContainer(A);GS.Utils.showContainer(B);Ext.getCmp("login-btn").show();
Ext.getCmp("login-reminder").show();Ext.getCmp("login-authenticated").hide();Ext.getCmp("login-logout").hide();
Ext.getCmp("linkChangePassword").hide();}},initComponent:function(){var A=[{id:"login-email",name:"email",allowBlank:false,dataIndex:"Email",autoCreate:{tag:"input",type:"text",size:"20",autocomplete:"off",maxlength:"60"},vtype:"nullableEmail",fieldLabel:GS.strings.guestEmail},{id:"login-password",name:"password",allowBlank:false,dataIndex:"Password",inputType:"password",autoCreate:{tag:"input",type:"text",size:"20",autocomplete:"off",maxlength:"60"},vtype:"nonWhitespace",fieldLabel:GS.strings.password},{id:"login-authenticated",xtype:"displayfield",value:GS.strings.loggedInNote1+"<br/><br/>"+GS.strings.loggedInNote2+" -&gt;",hideLabel:true}];
Ext.apply(this,{items:A,labelWidth:GS.widths.loginLabels});GS.cmp.LoginForm.superclass.initComponent.call(this);
this.display();},isValid:function(){var A=true;for(var B=0,D=this.items.getCount();
B<D;B++){var C=this.items.get(B);if(Ext.isFunction(C.isValid)){A=C.isValid()&&A;}}return A;
},buttonAlign:"left",buttons:[{id:"login-btn",style:"margin-left:"+GS.widths.loginLabels+"px",text:GS.strings.login,handler:function(){var C=Ext.getCmp("login-form");
var A=C.getEl();var D=Ext.getCmp("login-email");var B=Ext.getCmp("login-password");
GS.Utils.mask(A);GS.Utils.request("Login",{email:D.getValue(),password:B.getValue(),locale:GS.config.locale},function(E){A.unmask();
if(!E.result.IsAuthenticated){GS.Utils.error(E.result.Error);}else{D.setValue("");
B.setValue("");GS.auth=E.result;C.display();var G=Ext.getCmp("customer-form");if(GS.auth.CustUser!=null){G.load(GS.auth.CustUser);
}else{G.load(new Object({Email:GS.auth.Email}));}if(GS.auth.Customer!=null){var F=Ext.getCmp("frmCompanyBillingDetails");
F.show();F.load(GS.auth.Customer);}}},function(E){A.unmask();GS.Utils.error(E);});
}},{id:"login-reminder",xtype:"tbtext",text:'<a id="gotoPasswordReminder" href="#">'+GS.strings.forgotPassword+"</a>",listeners:{afterrender:function(){Ext.get("gotoPasswordReminder").on("click",function(A){A.stopEvent();
Ext.getCmp("login-form").hide();var B=Ext.getCmp("pwdreminder-form");B.reminderSent=false;
B.display();B.show();});}}},{id:"login-logout",style:"margin-left:"+GS.widths.loginLabels+"px",text:GS.strings.logout,hidden:true,handler:function(){GS.Reservation.logout();
}},{id:"linkChangePassword",xtype:"tbtext",text:'<a id="gotoChangePassword" href="#">'+GS.strings.changePassword+"</a>",listeners:{afterrender:function(){Ext.get("gotoChangePassword").on("click",function(A){A.stopEvent();
var B=Ext.getCmp("changePwdForm");B.display();});}}}]});Ext.reg("loginform",GS.cmp.LoginForm);
GS.cmp.PasswordReminderForm=Ext.extend(Ext.form.FieldSet,{id:"pwdreminder-form",reminderSent:false,hidden:true,display:function(){var A=Ext.getCmp("pwdreminder-form");
GS.Utils.setVisibility(A._reminderNoteField,!A.reminderSent);GS.Utils.setContainerVisibility(A._emailField,!A.reminderSent);
GS.Utils.setVisibility(A._reminderSentField,A.reminderSent);GS.Utils.setVisibility(A._sendButton,!A.reminderSent);
},initComponent:function(){this._emailField=new Ext.form.TextField({name:"email",allowBlank:false,dataIndex:"Email",autoCreate:{tag:"input",type:"text",size:"20",autocomplete:"off",maxlength:"60"},vtype:"nullableEmail",fieldLabel:GS.strings.guestEmail});
this._reminderNoteField=new Ext.form.DisplayField({value:GS.strings.reminderNote+"<br/><br/>",hideLabel:true});
this._reminderSentField=new Ext.form.DisplayField({value:GS.strings.reminderSent,hidden:true,hideLabel:true});
this._sendButton=new Ext.Button({style:"margin-left:"+GS.widths.loginLabels+"px",text:GS.strings.sendPassword,handler:function(){var A=Ext.getCmp("pwdreminder-form");
var B=A.getEl();GS.Utils.mask(B);GS.Utils.request("RemindPassword",{email:A._emailField.getValue(),locale:GS.config.locale},function(C){B.unmask();
if(!C.Success){GS.Utils.error(C.Error);}else{A.reminderSent=C.Success;A.display();
}},function(C){B.unmask();GS.Utils.error(C);});}});this._gotoLogin={xtype:"tbtext",text:'<a id="gotoLogin" href="#">'+GS.strings.backToLogin+"</a>",listeners:{afterrender:function(){Ext.get("gotoLogin").on("click",function(A){A.stopEvent();
Ext.getCmp("login-form").show();Ext.getCmp("pwdreminder-form").hide();});}}};Ext.apply(this,{items:[this._reminderNoteField,this._emailField,this._reminderSentField],buttons:[this._sendButton,this._gotoLogin],labelWidth:GS.widths.loginLabels});
GS.cmp.PasswordReminderForm.superclass.initComponent.call(this);this.display();},isValid:function(){var A=true;
for(var B=0,D=this.items.getCount();B<D;B++){var C=this.items.get(B);if(Ext.isFunction(C.isValid)){A=C.isValid()&&A;
}}return A;},buttonAlign:"left"});Ext.reg("passwordreminderform",GS.cmp.PasswordReminderForm);
GS.cmp.WizardSteps=Ext.extend(Ext.TabPanel,{id:"wizard-steps",activeTab:0,border:false,enableTabScroll:true,defaults:{autoScroll:true,autoHeight:true},setRoomCount:function(N){if(this.items.length>2){var K=this.items.get(this.items.length-1);
K.clear();}var D=N.getValue();var L=N.store.getById(D);var J=L.get("Capacity");var E=new Array(J);
for(var B=0;B<J;B++){E[B]=B+1;}var F=N.value;var H=this.items.length-2;if(H>F){for(var B=H;
B>F;B--){this.remove(this.items.get(this.items.length-2),true);}}else{for(var B=1;
B<=H;B++){var I=this.items.get(B);I.comboGuests.setValue("");I.comboGuests.clearInvalid();
I.checkBreakfast.setValue(false);I.checkParking.setValue(false);I.panelGuests.clear();
}for(var B=H+1;B<=F;++B){var A=new GS.cmp.GuestsPanel({roomNo:B});var C=new GS.cmp.Combo({panelGuests:A,fieldLabel:GS.strings.guestsNumber+GS.Reservation.createInfoLink("infoNumberOfGuests"+A.roomNo),emptyText:GS.strings.guestsNumberEmpty,displayField:"value",valueField:"value",store:new Ext.data.ArrayStore({fields:["value"],expandData:true,autoDestroy:true}),anchor:"0",listeners:{afterrender:function(){GS.Reservation.attachInfoMessage("infoNumberOfGuests"+this.panelGuests.roomNo,GS.strings.infoNumberOfGuests);
},select:function(P,O){if(O===null){return;}var Q=P.getValue();this.panelGuests.setGuestCount(Q);
GS.Reservation.getWizard().refreshReservationSum();}}});C.store.loadData(E);var G=new Ext.form.Checkbox({boxLabel:GS.strings.breakfastOption,listeners:{check:GS.Reservation.getWizard().refreshReservationSum}});
var M=new Ext.form.Checkbox({boxLabel:GS.strings.parkingOption,listeners:{check:GS.Reservation.getWizard().refreshReservationSum}});
var I={title:GS.strings.roomStep+" "+B,comboGuests:C,checkBreakfast:G,checkParking:M,panelGuests:A,items:[{xtype:"fieldset",title:String.format(GS.strings.titleAdditionalOptionsForRoom,B),items:[{items:[{layout:"form",labelWidth:GS.widths.editGuestNumberLabel,width:280,items:[C]},G,M]}]},A],closable:false,isValid:function(){return(this.comboGuests.isValid()&&this.panelGuests.isValid());
}};this.insert(this.items.length-1,I);}}this.canChangeTab=true;this.setActiveTab(this.items.get(0));
this.canChangeTab=false;},getCustomer:function(A){if(GS.auth.IsAuthenticated){return GS.auth.CustUser;
}else{var B=Ext.getCmp("customer-form");var C={};B.retrieve(C);return C;}},getRoomParameters:function(A){var C=[];
for(var B=1;B<this.items.getCount()-1;B++){var F=this.items.get(B);var G=F.panelGuests.guestCount;
var E=(A&&G>0)?F.panelGuests.retrieve()[0]:null;var D=(G>0)?F.panelGuests.getGuestIsCustomer():false;
C.push({RoomId:1,Breakfast:F.checkBreakfast.getValue(),Parking:F.checkParking.getValue(),Guests:G>0?G:1,MainGuest:E,GuestIsCustomer:D});
}return C;},getActiveTabIndex:function(){for(var A=0;A<this.items.getCount();A++){if(this.activeTab==this.items.get(A)){return A;
}}return -1;},showNextTab:function(){var A=this.getActiveTabIndex()+1;if(this.items.get(A)){this.canChangeTab=true;
this.setActiveTab(this.items.get(A));this.canChangeTab=false;}},showPreviousTab:function(){var A=this.getActiveTabIndex()-1;
if(this.items.get(A)){this.canChangeTab=true;this.setActiveTab(this.items.get(A));
this.canChangeTab=false;}},getBreakfastCount:function(){return 0;},getParkingCount:function(){return 0;
},getGuestCount:function(){return 1;},retrieve:function(){var C=[];for(var A=1;A<this.items.getCount()-1;
A++){var B=this.items.get(A).panelGuests.retrieve();if(B.length>0){C.push(B[0]);}}return C;
},canChangeTab:false,listeners:{beforetabchange:function(C,A,B){return C.canChangeTab;
}}});GS.Reservation=function(){var B=null;var A=null;return{getStarter:function(){if(B==null){var D=new Date();
D.setFullYear(D.getFullYear()+1);var E=new GS.cmp.DatePicker({fieldLabel:GS.strings.arrivalDate,cls:"gs-calendar",minDate:new Date(),maxDate:D,msgTarget:"above",listeners:{select:function(I,K){C.setValue("");
C.clearInvalid();G.setValue("");G.clearInvalid();G.disable();F.hide();if(K===null){C.disable();
return;}E.clearInvalid();var J=C.container.up("div.x-form-item");GS.Utils.mask(J);
GS.Utils.request("GetAvailableRoomsByDate",{year:K.getFullYear(),month:K.getMonth()+1,day:K.getDate(),locale:GS.config.locale},function(O){var P=[];
for(var N=0;N<O.result.length;N++){var Q=O.result[N];for(var L=1;L<=Q.Count;L++){var M=Ext.apply({},Q);
M.Count=L;M.Id=N*100+M.Count;M.Description=(M.Count<10?" ":"")+M.Count+" "+M.Description;
P.push(M);}}C.store.loadData(P);C.enable();J.unmask();},function(L){J.unmask();if(L&&L.overallocated){GS.Reservation.handleOverallocation();
return;}GS.Utils.error(L);});}}});new Ext.util.DelayedTask(function(){E.blur();}).delay(5000);
var C=new GS.cmp.Combo({fieldLabel:GS.strings.roomsNumber,emptyText:GS.strings.roomsNumberEmpty,msgTarget:"above",displayField:"Description",valueField:"Id",store:new Ext.data.JsonStore({fields:[{name:"Id",type:"int"},"RoomType",{name:"Count",type:"int"},{name:"Capacity",type:"int"},"Description"],idProperty:"Id",sortInfo:{field:"Description",direction:"ASC"},autoDestroy:true}),anchor:"0",disabled:true,listeners:{select:function(K,I){G.setValue("");
G.clearInvalid();F.hide();var J=G.container.up("div.x-form-item");GS.Utils.mask(J);
var L=E.getValue();GS.Utils.request("GetStayingAvailability",{year:L.getFullYear(),month:L.getMonth()+1,day:L.getDate(),roomTypeId:I.get("RoomTypeId"),rooms:I.get("Count")},function(M){var O=new Array(M.result);
for(var N=0;N<M.result;N++){O[N]=N+1;}G.store.loadData(O);G.enable();J.unmask();},function(M){J.unmask();
if(M&&M.overallocated){GS.Reservation.handleOverallocation();return;}GS.Utils.error(M);
});}}});var G=new GS.cmp.Combo({emptyText:GS.strings.nightsNumberEmpty,fieldLabel:GS.strings.nightsNumber,displayField:"value",valueField:"value",msgTarget:"above",store:new Ext.data.ArrayStore({fields:["value"],expandData:true,autoDestroy:true}),anchor:"0",disabled:true,listeners:{select:function(J,I){F.setVisible(!Ext.isEmpty(I));
}}});var F=new Ext.Button({text:GS.strings.makeReservation,hidden:true,handler:function(){var J=E.getValue();
if(J===null){E.markInvalid(Ext.form.TextField.prototype.blankText);return;}var K=C.isValid();
var I=G.isValid();if(K&&I){E.disable();C.disable();G.disable();GS.Reservation.getWizard();
GS.Page.resetMainView(false,true);GS.Reservation.getWizard().steps.setRoomCount(C);
GS.Reservation.getWizard().refreshReservationSum();GS.Reservation.getWizard().showButtons();
GS.Reservation.getWizard().show();GS.Reservation.getWizard().doLayout();H.show();
F.hide();}}});var H=new Ext.Button({text:GS.strings.cancelReservation,hidden:true,handler:GS.Reservation.cancelReservation});
B=new Ext.Panel({id:"panel-start-reservation",layout:"form",title:GS.strings.bookRoom,width:220,hidden:GS.config.currentPageView===null?false:!GS.config.currentPageView.ShowReservation,renderTo:"reserve-container",labelAlign:"top",cls:"gs-panel",frame:true,defaults:{labelSeparator:""},bodyCssClass:"gs-panel-body",items:[E,C,{id:"rooms-tip",xtype:"displayfield",value:GS.strings.roomsNumberTip,hideLabel:true,hidden:true},G],buttonAlign:"left",buttons:[F,H],getArrivalDate:function(){return E.getValue();
},getNights:function(){return G.getValue();},getRooms:function(){return C.getValue();
},reset:function(){E.setValue(null);E.update(E.activeDate,true);E.enable();C.clearInvalid();
C.setValue("");C.clearInvalid();C.disable();G.setValue("");G.clearInvalid();G.disable();
H.hide();F.hide();},getRoomOption:function(){return C.store.getById(C.getValue()).get("Description");
}});}return B;},getWizard:function(){if(B==null){alert("starter is not yet initialized!");
}if(A==null){var E=function(F,G){return'<tr><td class="gs-info-title">'+F+': </td><td style="width: 100%;">'+G+"</td></tr>";
};var D=new Ext.Panel({frame:false,autoHeight:true,style:"margin-left:11px",items:[{xtype:"fieldset",title:GS.strings.reservationSummary,labelWidth:3,items:[{id:"gs-reservation-summary",xtpl:new Ext.XTemplate("",'<table style="width: 100%;" cellpaddding="0" cellspacing="0" border="0">','<tpl for=".">',E(GS.strings.reservationNumber,"{ReservationNumber}"),E(GS.strings.arrivalDate,"{[Ext.util.Format.date(values.ArrivalDate)]}"),E(GS.strings.roomOption,"{RoomOption}"),E(GS.strings.stayDuration,"{Nights} "+GS.strings.nights),E(GS.strings.departureDate,"{[Ext.util.Format.date(values.DepartureDate)]}"),E(GS.strings.guests,"{Guests}"),E(GS.strings.breakfasts,"{Breakfasts}"),E(GS.strings.parkingPlaces,"{ParkingPlaces}"),E(GS.strings.price,"{TotalAmount} "+GS.strings.euro),"</tpl>","</table>"),present:function(F){F.RoomOption=GS.Reservation.getStarter().getRoomOption();
this.xtpl.overwrite(this.body,F);}}],buttonAlign:"left",fbar:[{xtype:"checkbox",id:"check-agree",boxLabel:GS.strings.titleAgreementPre,listeners:{check:function(){var F=this.getValue();
Ext.getCmp("payment-method-selector").setVisible(F);}}},{id:"link-agree",xtype:"tbtext",text:'<a target="blank" href="'+GS.config.locale+'/pages/agreement/">'+GS.strings.titleAgreementLink+"</a>"},{xtype:"tbtext",text:GS.strings.titleAgreementPost}]},{id:"terms-warning",xtype:"displayfield",hidden:true,hideLabel:true,value:GS.strings.agreementRequired},{xtype:"fieldset",title:GS.strings.selectPaymentMethod,id:"payment-method-selector",hidden:true,items:[{xtype:"fieldset",frame:false,border:false,items:[{id:"invoice-panel",xtype:"fieldset",frame:false,border:false,hidden:true,items:[{xtype:"button",id:"gs-payment-invoice",name:"paymentMehtod",text:GS.strings.invoiceMyCompany,hideLabel:true,listeners:{click:GS.Reservation.startPayment}},{xtype:"tbtext",text:"<br/><br/>"},{xtype:"tbtext",text:GS.strings.or}]},{xtype:"tbtext",text:GS.strings.payOnlineVia},{xtpl:new Ext.XTemplate('<table style="width: 100%;" cellpaddding="0" cellspacing="0" border="0">',"<tr>",'<tpl for=".">','<td valign="middle">','<div class="gs-payment-option">','<a href="#">','<img id="gs-payment-{Id}" class="gs-payment-logo" src="{ImageUrl}" ext:qtip="{Description}" />',"</a>","</div>","</td>","</tpl>","</tr>","</table>"),listeners:{render:function(F){F.xtpl.overwrite(F.body,[{Id:"sampo",ImageUrl:"https://www.sampopankki.fi/verkkopalvelu/logo.gif",Description:GS.strings.paySampo},{Id:"op",ImageUrl:"http://3.ws.tx.fi/banks/osuuspankki.gif",Description:GS.strings.payOp},{Id:"nordea",ImageUrl:"http://3.ws.tx.fi/banks/nordea.gif",Description:GS.strings.payNordea},{Id:"visa",ImageUrl:"http://3.ws.tx.fi/banks/visa.gif",Description:GS.strings.payVisa},{Id:"mastercard",ImageUrl:"http://3.ws.tx.fi/banks/mastercard.gif",Description:GS.strings.payMasterCard}]);
GS.Page.setElementsClick(F.body,"img.gs-payment-logo",GS.Reservation.startPayment);
}}}]}]}]});var C=new GS.cmp.WizardSteps({items:[{title:GS.strings.customerStep,layout:"column",width:Ext.isIE6?588:undefined,cls:"guest-container",items:[{xtype:"panel",columnWidth:0.5,items:[{style:"margin-right: 5px",xtype:"loginform",title:GS.strings.existingCustomerLogin},{style:"margin-right: 5px",xtype:"passwordreminderform",title:GS.strings.passwordReminder},{style:"margin-right: 5px",xtype:"changepwdform",title:GS.strings.changePasswordTitle},{style:"margin-right: 5px",xtype:"companybillingdetails",title:GS.strings.companyBillingDetails}]},{id:"customer-form",xtype:"guestform",main:true,isCustomer:true,title:GS.strings.customerDetails,columnWidth:0.5,style:"margin-left: 5px"}],closable:false,isValid:function(){var F=Ext.getCmp("customer-form");
return(F.isValid());},saveData:function(){if(GS.auth.IsAuthenticated){var G=Ext.getCmp("customer-form");
var F=G.getEl();var H={};G.retrieve(H);GS.Utils.mask(F);GS.Utils.request("UpdateCustomer",{guest:H,locale:GS.config.locale},function(I){F.unmask();
GS.auth.CustUser=I.result;},function(I){F.unmask();GS.Utils.error(I);});}}},{title:GS.strings.paymentStep,items:[D],clear:function(){Ext.getCmp("check-agree").setValue(false);
Ext.getCmp("payment-method-selector").setVisible(false);},closable:false}]});A=new Ext.Panel({steps:C,id:"panel-guest-info",title:GS.strings.reservationWizardTitle,cls:"gs-panel",hidden:true,frame:true,renderTo:"gs-main",items:[{xtype:"fieldset",id:"summary-panel",layout:"column",title:GS.strings.titleTotal,items:[{layout:"form",labelWidth:GS.widths.summaryLabels,columnWidth:0.5,style:"margin-right: 5px; margin-top:3px; margin-left:4px;",items:[{id:"summary-dates",xtype:"displayfield",fieldLabel:GS.strings.summaryDates,style:"margin-bottom:1px;"},{id:"summary-rooms",xtype:"displayfield",fieldLabel:GS.strings.summaryRooms,style:"margin-bottom:1px;"},{id:"summary-nights",xtype:"displayfield",fieldLabel:GS.strings.summaryNights,style:"margin-bottom:1px;"}]},{columnWidth:0.5,id:"gs-panelTotal",layout:"form",labelWidth:GS.widths.editSumLabel,items:[{id:"field-total",xtype:"displayfield",hideLabel:true,readOnly:true,anchor:"0"}],listeners:{afterlayout:function(){}}}]},C],buttonAlign:"left",fbar:[{xtype:"tbfill"},{id:"button-reservation-back",text:"&laquo; "+GS.strings.back,hidden:true,handler:function(F){GS.Reservation.getWizard().steps.showPreviousTab();
GS.Reservation.getWizard().showButtons();}},{id:"button-continue-reservation",text:GS.strings.continueReservation+" &raquo;",handler:function(F){var G=GS.Reservation.getWizard().steps.activeTab;
if(Ext.isFunction(G.isValid)&&!G.isValid()){GS.Utils.warn(GS.strings.validationCompleteForm);
}else{if(Ext.isFunction(G.saveData)){G.saveData();}GS.Reservation.getWizard().steps.showNextTab();
GS.Reservation.getWizard().showButtons();if(GS.Reservation.getWizard().steps.getActiveTabIndex()==GS.Reservation.getWizard().steps.items.length-1){Ext.getCmp("invoice-panel").setVisible(GS.auth.IsAuthenticated);
GS.Utils.mask(D.getEl());GS.Utils.request("GetReservationNumber",{},function(H){GS.Reservation.MultiReservation.ReservationNumber=H.result;
Ext.getCmp("gs-reservation-summary").present(GS.Reservation.MultiReservation);D.getEl().unmask();
},function(H){D.getEl().unmask();GS.Utils.error(H);});}}}}],showButtons:function(){Ext.getCmp("button-continue-reservation").setVisible(GS.Reservation.getWizard().steps.getActiveTabIndex()<GS.Reservation.getWizard().steps.items.length-1);
Ext.getCmp("button-reservation-back").setVisible(GS.Reservation.getWizard().steps.getActiveTabIndex()>0);
},refreshReservationSum:function(){var F=Ext.get("gs-panelTotal");GS.Utils.mask(F);
var G=GS.Reservation.gatherReservationParams(false);GS.Utils.request("CalculateMultiReservation",{reservationParams:G},function(H){GS.Reservation.MultiReservation=H.result;
var J=GS.Reservation.MultiReservation.TotalAmount.toFixed(2);var I=GS.strings.labelReservationSum+': <span id="field-total-value">'+(J)+" "+GS.strings.euro+"</span>";
var K=Ext.getCmp("field-total");K.setValue(I);K.price=J;Ext.getCmp("summary-dates").setValue(Ext.util.Format.date(GS.Reservation.MultiReservation.ArrivalDate)+" - "+Ext.util.Format.date(GS.Reservation.MultiReservation.DepartureDate));
Ext.getCmp("summary-nights").setValue(GS.Reservation.MultiReservation.Nights);Ext.getCmp("summary-rooms").setValue(GS.Reservation.MultiReservation.Rooms);
F.unmask();},function(H){F.unmask();if(H&&H.overallocated){GS.Reservation.handleOverallocation();
return;}GS.Utils.error(H);});}});}return A;},logout:function(){var C=Ext.getCmp("login-form");
GS.auth.IsAuthenticated=false;C.display();var D=Ext.getCmp("customer-form");D.load(new Object());
Ext.getCmp("frmCompanyBillingDetails").hide();Ext.getCmp("changePwdForm").hide();
},resetReservation:function(){if(A!=null){A.setVisible(false);GS.Reservation.logout();
}if(B!=null){B.reset();}},cancelReservation:function(){GS.Reservation.resetReservation();
GS.Page.showCurrentPage();},handleOverallocation:function(){GS.Reservation.cancelReservation();
GS.Utils.warn(GS.strings.overallocationOccured);},handleNoReservationNumber:function(){GS.Utils.warn(GS.strings.noReservationNumber);
},gatherReservationParams:function(D){var C=GS.Reservation.getStarter().getArrivalDate();
return{ArrivalYear:C.getFullYear(),ArrivalMonth:C.getMonth()+1,ArrivalDay:C.getDate(),Nights:GS.Reservation.getStarter().getNights(),Rooms:GS.Reservation.getStarter().getRooms(),RoomParameters:GS.Reservation.getWizard().steps.getRoomParameters(D),Customer:(D?GS.Reservation.getWizard().steps.getCustomer():null),SendConfirmation:false};
},composePaymentField:function(C){return new Ext.form.Hidden({name:C.Id,value:C.Value});
},startPayment:function(){var E="gs-payment-";var C=this.id.substr(E.length);var D=GS.Reservation.gatherReservationParams(true);
GS.Utils.request("PreparePaymentConfiguration",{reservationParams:D,paymentMethod:C,locale:GS.config.locale},function(F){var G=F.result.FormConfiguration;
var H=new Ext.form.FormPanel({method:G.Method,url:G.Action,standardSubmit:true});
for(var J=0,I=G.Fields.length;J<I;J++){H.add(GS.Reservation.composePaymentField(G.Fields[J]));
}H.render("hide-container");H.getForm().getEl().dom.action=H.url;H.getForm().submit();
},function(F){if(F&&F.overallocated){GS.Reservation.handleOverallocation();return;
}if(F&&F.noReservationNumber){GS.Reservation.handleNoReservationNumber();return;}if(Ext.isObject(F)){var G="Error occured:<br/>";
for(prop in F){G+=prop+": "+F[prop]+"<br/>";}F=G;}GS.Utils.error(F);});},createInfoLink:function(C){return' <a id="'+C+'" href="#" style="background-color:#6CE26C;color:white;padding-left:3px;padding-right:3px;">?</a>';
},attachInfoMessage:function(C,D){Ext.get(C).on("click",function(E){E.stopEvent();
var F=E.getXY();new Ext.Window({x:F[0]-200,y:F[1],width:200,resizable:false,draggable:false,layout:"fit",titleAsText:false,items:{xtype:"tbtext",style:"margin:4px",text:D}}).show();
});}};}();
