/* * Ext JS Library 3.0 RC 1.1 * Copyright(c) 2006-2009, Ext JS, LLC. * licensing@extjs.com * * http://extjs.com/license */ Ext.DomHelper=function(){var u=null,l=/^(?:br|frame|hr|img|input|link|meta|range|spacer|wbr|area|param|col)$/i,n=/^table|tbody|tr|td$/i,r,o="afterbegin",p="afterend",d="beforebegin",q="beforeend",a="",j="
",b=a+"",k=""+j,m=b+"",t=""+k;function h(z,B,A,C,y,w){var x=r.insertHtml(C,Ext.getDom(z),s(B));return A?Ext.get(x,true):x}function s(B){var y="",x,A,z,w,C;if(typeof B=="string"){y=B}else{if(Ext.isArray(B)){Ext.each(B,function(D){y+=s(D)})}else{y+="<"+(B.tag=B.tag||"div");for(x in B){A=B[x];if(!/tag|children|cn|html$/i.test(x)&&!Ext.isFunction(A)){if(Ext.isObject(A)){y+=" "+x+"='";for(z in A){w=A[z];y+=!Ext.isFunction(w)?z+":"+w+";":""}y+="'"}else{y+=" "+({cls:"class",htmlFor:"for"}[x]||x)+"='"+A+"'"}}}if(l.test(B.tag)){y+="/>"}else{y+=">";if(C=B.children||B.cn){y+=s(C)}else{if(B.html){y+=B.html}}y+=""}}}return y}function g(B,z,y,A){u.innerHTML=[z,y,A].join("");var w=-1,x=u;while(++w "'+B+'"'},insertBefore:function(w,y,x){return h(w,y,x,d)},insertAfter:function(w,y,x){return h(w,y,x,p,"nextSibling")},insertFirst:function(w,y,x){return h(w,y,x,o,"firstChild")},append:function(w,y,x){return h(w,y,x,q,"",true)},overwrite:function(w,y,x){w=Ext.getDom(w);w.innerHTML=s(y);return x?Ext.get(w.firstChild):w.firstChild},createHtml:s};return r}();Ext.apply(Ext.DomHelper,function(){var e,a="afterbegin",h="afterend",j="beforebegin",d="beforeend";function g(n,q,p,r,m,k){n=Ext.getDom(n);var l;if(e.useDom){l=b(q,null);if(k){n.appendChild(l)}else{(m=="firstChild"?n:n.parentNode).insertBefore(l,n[m]||n)}}else{l=Ext.DomHelper.insertHtml(r,n,Ext.DomHelper.createHtml(q))}return p?Ext.get(l,true):l}function b(r,l){var n,p=document,m,k,q,s;if(Ext.isArray(r)){n=p.createDocumentFragment();Ext.each(r,function(o){b(o,n)})}else{if(typeof r=="string"){n=p.createTextNode(r)}else{n=p.createElement(r.tag||"div");m=!!n.setAttribute;for(k in r){q=r[k];if(["tag","children","cn","html","style"].indexOf(k)==-1||!Ext.isFunction(q)){if(k=="cls"){n.className=q}else{m?n.setAttribute(k,q):n[k]=q}}}e.applyStyles(n,r.style);if(s=r.children||r.cn){b(s,n)}else{if(r.html){n.innerHTML=r.html}}}}if(l){l.appendChild(n)}return n}e={createTemplate:function(l){var k=Ext.DomHelper.createHtml(l);return new Ext.Template(k)},useDom:false,applyStyles:function(n,o){if(o){var l=0,k,m;n=Ext.fly(n);if(Ext.isFunction(o)){o=o.call()}if(typeof o=="string"){o=o.split(/:|;/g);for(k=o.length;l1){Ext.each(b,function(a){if(Ext.isObject(a)){Ext.apply(g,a)}else{d.push(a)}});e=d.join("")}}g.html=e;if(g.compiled){g.compile()}};Ext.Template.prototype={applyTemplate:function(a){var b=this;return b.compiled?b.compiled(a):b.html.replace(b.re,function(d,e){return a[e]!==undefined?a[e]:""})},set:function(a,d){var b=this;b.html=a;b.compiled=null;return d?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,d){return this.doInsert("afterBegin",b,a,d)},insertBefore:function(b,a,d){return this.doInsert("beforeBegin",b,a,d)},insertAfter:function(b,a,d){return this.doInsert("afterEnd",b,a,d)},append:function(b,a,d){return this.doInsert("beforeEnd",b,a,d)},doInsert:function(d,g,b,a){g=Ext.getDom(g);var e=Ext.DomHelper.insertHtml(d,g,this.applyTemplate(b));return a?Ext.get(e,true):e},overwrite:function(b,a,d){b=Ext.getDom(b);b.innerHTML=this.applyTemplate(a);return d?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 h=this,a=h.disableFormats!==true,g=Ext.util.Format,d=h;if(h.compiled){return h.compiled(b)}function e(k,n,q,l){if(q&&a){if(q.substr(0,5)=="this."){return d.call(q.substr(5),b[n],b)}else{if(l){var p=/^\s*['"](.*)["']\s*$/;l=l.split(",");for(var o=0,j=l.length;o+~]\s?|\s|$)/,tagTokenRe=/^(#)?([\w-\*]+)/,nthRe=/(\d*)n\+?(\d*)/,nthRe2=/\D/,isIE=window.ActiveXObject?true:false,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=ni.children||ni.childNodes;for(var j=0,cj;cj=cn[j];j++){if(cj.nodeName==utag||cj.nodeName==tagName||tagName=="*"){result[++ri]=cj}}}}else{if(mode=="+"){var utag=tagName.toUpperCase();for(var i=0,n;n=ns[i];i++){while((n=n.nextSibling)&&n.nodeType!=1){}if(n&&(n.nodeName==utag||n.nodeName==tagName||tagName=="*")){result[++ri]=n}}}else{if(mode=="~"){for(var i=0,n;n=ns[i];i++){while((n=n.nextSibling)&&(n.nodeType!=1||(tagName=="*"||n.tagName.toLowerCase()!=tagName))){}if(n){result[++ri]=n}}}}}}return result}function concat(a,b){if(b.slice){return a.concat(b)}for(var i=0,l=b.length;i1){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 k=Ext.util,n=Ext.toArray,m=Ext.each,a=Ext.isObject,j=true,l=false;k.Observable=function(){var o=this,p=o.events;if(o.listeners){o.on(o.listeners);delete o.listeners}o.events=p||{}};k.Observable.prototype=function(){var p=/^(?:scope|delay|buffer|single)$/,o=function(q){return q.toLowerCase()};return{fireEvent:function(){var r=n(arguments),t=o(r[0]),u=this,s=j,x=u.events[t],w,y;if(u.eventsSuspended===j){if(w=u.suspendedEventsQueue){w.push(r)}}else{if(a(x)&&x.bubble){if(x.fire.apply(x,r.slice(1))===l){return l}y=u.getBubbleTarget&&u.getBubbleTarget();if(y&&y.enableBubble){y.enableBubble(t);return y.fireEvent.apply(y,r)}}else{if(a(x)){r.shift();s=x.fire.apply(x,r)}}}return s},addListener:function(s,w,y,r){var u=this,t,z,x,q;if(a(s)){r=s;for(t in r){z=r[t];if(!p.test(t)){u.addListener(t,z.fn||z,z.scope||r.scope,z.fn?z:r)}}}else{s=o(s);q=u.events[s]||j;if(typeof q=="boolean"){u.events[s]=q=new k.Event(u,s)}q.addListener(w,y,a(r)?r:{})}},removeListener:function(q,s,r){var t=this.events[o(q)];if(a(t)){t.removeListener(s,r)}},purgeListeners:function(){var s=this.events,q,r;for(r in s){q=s[r];if(a(q)){q.clearListeners()}}},addEvents:function(r){var q=this;q.events=q.events||{};if(typeof r=="string"){m(arguments,function(s){q.events[s]=q.events[s]||j})}else{Ext.applyIf(q.events,r)}},hasListener:function(q){var r=this.events[q];return a(r)&&r.listeners.length>0},suspendEvents:function(q){this.eventsSuspended=j;if(q){this.suspendedEventsQueue=[]}},resumeEvents:function(){var q=this;q.eventsSuspended=!delete q.suspendedEventQueue;m(q.suspendedEventsQueue,function(r){q.fireEvent.apply(q,r)})}}}();var g=k.Observable.prototype;g.on=g.addListener;g.un=g.removeListener;k.Observable.releaseCapture=function(p){p.fireEvent=g.fireEvent};function h(q,r,p){return function(){if(r.target==arguments[0]){q.apply(p,n(arguments))}}}function d(r,s,q){var p=new k.DelayedTask();return function(){p.delay(s.buffer,r,q,n(arguments))}}function e(q,r,p,o){return function(){r.removeListener(p,o);return q.apply(o,arguments)}}function b(q,r,p){return function(){var o=n(arguments);(function(){q.apply(p,o)}).defer(r.delay||10)}}k.Event=function(p,o){this.name=o;this.obj=p;this.listeners=[]};k.Event.prototype={addListener:function(r,q,p){var s=this,o;q=q||s.obj;if(!s.isListening(r,q)){o=s.createListener(r,q,p);if(s.firing){s.listeners=s.listeners.slice(0)}s.listeners.push(o)}},createListener:function(s,r,t){t=t||{},r=r||this.obj;var p={fn:s,scope:r,options:t},q=s;if(t.target){q=h(q,t,r)}if(t.delay){q=b(q,t,r)}if(t.single){q=e(q,this,s,r)}if(t.buffer){q=d(q,t,r)}p.fireFn=q;return p},findListener:function(r,q){var p,o=-1;m(this.listeners,function(s,t){p=s.scope;if(s.fn==r&&(p==q||p==this.obj)){o=t;return l}},this);return o},isListening:function(p,o){return this.findListener(p,o)!=-1},removeListener:function(r,q){var p,s=this,o=l;if((p=s.findListener(r,q))!=-1){if(s.firing){s.listeners=s.listeners.slice(0)}s.listeners.splice(p,1);o=j}return o},clearListeners:function(){this.listeners=[]},fire:function(){var q=this,p=n(arguments),o=j;m(q.listeners,function(r){q.firing=j;if(r.fireFn.apply(r.scope||q.obj||window,p)===l){return o=q.firing=l}});q.firing=l;return o}}})();Ext.apply(Ext.util.Observable.prototype,function(){function a(l){var k=(this.methodEvents=this.methodEvents||{})[l],g,d,h,j=this;if(!k){this.methodEvents[l]=k={};k.originalFn=this[l];k.methodName=l;k.before=[];k.after=[];function b(n,m,e){if(!Ext.isEmpty(d=n.apply(m||j,e))){if(Ext.isObject(d)){g=!Ext.isEmpty(d.returnValue)?d.returnValue:d;h=!!d.cancel}else{if(d===false){h=true}else{g=d}}}}this[l]=function(){var e=Ext.toArray(arguments);g=d=undefined;h=false;Ext.each(k.before,function(m){b(m.fn,m.scope,e);if(h){return g}});if(!Ext.isEmpty(d=k.originalFn.apply(j,e))){g=d}Ext.each(k.after,function(m){b(m.fn,m.scope,e);if(h){return g}});return g}}return k}return{beforeMethod:function(e,d,b){a.call(this,e).before.push({fn:d,scope:b})},afterMethod:function(e,d,b){a.call(this,e).after.push({fn:d,scope:b})},removeMethodListener:function(j,d,b){var h=a.call(this,j),g=false;Ext.each(h.before,function(e){if(e.fn==d&&e.scope==b){e.splice(i,1);g=true;return false}});if(!g){Ext.each(h.after,function(e){if(e.fn==d&&e.scope==b){e.splice(i,1);return false}})}},relayEvents:function(g,b){var e=this;function d(h){return function(){return e.fireEvent.apply(e,[h].concat(Ext.toArray(arguments)))}}Ext.each(b,function(h){e.events[h]=e.events[h]||true;g.on(h,d(h),e)})},enableBubble:function(b){var d=this;b=Ext.isArray(b)?b:Ext.toArray(arguments);Ext.each(b,function(e){e=e.toLowerCase();var g=d.events[e]||true;if(typeof g=="boolean"){g=new Ext.util.Event(d,e);d.events[e]=g}g.bubble=true})}}}());Ext.util.Observable.capture=function(d,b,a){d.fireEvent=d.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 w,o,l=false,n=Ext.lib.Event,p=Ext.lib.Dom,b=document,x=window,h="ie-deferred-loader",q="DOMContentLoaded",g={},j=/^(?:scope|delay|buffer|single|stopEvent|preventDefault|stopPropagation|normalized|args|delegate)$/;function m(D,z,C,B,A){var F=Ext.id(D),E=g[F]=g[F]||{};(E[z]=E[z]||[]).push([C,B,A]);n.on(D,z,B);if(z=="mousewheel"&&D.addEventListener){var y=["DOMMouseScroll",B,false];D.addEventListener.apply(D,y);n.on(window,"unload",function(){D.removeEventListener.apply(D,y)})}if(z=="mousedown"&&D==document){Ext.EventManager.stoppedMouseDownEvent.addListener(B)}}function d(){if(!l){Ext.isReady=l=true;if(o){clearInterval(o)}if(Ext.isGecko||Ext.isOpera){b.removeEventListener(q,d,false)}if(Ext.isIE){var y=b.getElementById(h);if(y){y.onreadystatechange=null;y.parentNode.removeChild(y)}}if(w){w.fire();w.clearListeners()}}}function a(){var y="complete";w=new Ext.util.Event();if(Ext.isGecko||Ext.isOpera){b.addEventListener(q,d,false)}else{if(Ext.isIE){b.write("