PageRenderTime 309ms CodeModel.GetById 12ms app.highlight 126ms RepoModel.GetById 2ms app.codeStats 0ms

/source/Plug-in/ext/ext-core-debug.js

http://prosporous.googlecode.com/
JavaScript | 2229 lines | 1857 code | 365 blank | 7 comment | 609 complexity | 7b1fa621de361992b8dcd0e87e1a91b4 MD5 | raw file

Large files files are truncated, but you can click here to view the full file

   1/*
   2 * Ext JS Library 2.2
   3 * Copyright(c) 2006-2008, Ext JS, LLC.
   4 * licensing@extjs.com
   5 * 
   6 * http://extjs.com/license
   7 */
   8
   9
  10Ext.DomHelper = function(){
  11    var tempTableEl = null;
  12    var emptyTags = /^(?:br|frame|hr|img|input|link|meta|range|spacer|wbr|area|param|col)$/i;
  13    var tableRe = /^table|tbody|tr|td$/i;
  14
  15        var createHtml = function(o){
  16        if(typeof o == 'string'){
  17            return o;
  18        }
  19        var b = "";
  20        if (Ext.isArray(o)) {
  21            for (var i = 0, l = o.length; i < l; i++) {
  22                b += createHtml(o[i]);
  23            }
  24            return b;
  25        }
  26        if(!o.tag){
  27            o.tag = "div";
  28        }
  29        b += "<" + o.tag;
  30        for(var attr in o){
  31            if(attr == "tag" || attr == "children" || attr == "cn" || attr == "html" || typeof o[attr] == "function") continue;
  32            if(attr == "style"){
  33                var s = o["style"];
  34                if(typeof s == "function"){
  35                    s = s.call();
  36                }
  37                if(typeof s == "string"){
  38                    b += ' style="' + s + '"';
  39                }else if(typeof s == "object"){
  40                    b += ' style="';
  41                    for(var key in s){
  42                        if(typeof s[key] != "function"){
  43                            b += key + ":" + s[key] + ";";
  44                        }
  45                    }
  46                    b += '"';
  47                }
  48            }else{
  49                if(attr == "cls"){
  50                    b += ' class="' + o["cls"] + '"';
  51                }else if(attr == "htmlFor"){
  52                    b += ' for="' + o["htmlFor"] + '"';
  53                }else{
  54                    b += " " + attr + '="' + o[attr] + '"';
  55                }
  56            }
  57        }
  58        if(emptyTags.test(o.tag)){
  59            b += "/>";
  60        }else{
  61            b += ">";
  62            var cn = o.children || o.cn;
  63            if(cn){
  64                b += createHtml(cn);
  65            } else if(o.html){
  66                b += o.html;
  67            }
  68            b += "</" + o.tag + ">";
  69        }
  70        return b;
  71    };
  72
  73        
  74    var createDom = function(o, parentNode){
  75        var el;
  76        if (Ext.isArray(o)) {                                   el = document.createDocumentFragment();             for(var i = 0, l = o.length; i < l; i++) {
  77                createDom(o[i], el);
  78            }
  79        } else if (typeof o == "string") {                     el = document.createTextNode(o);
  80        } else {
  81            el = document.createElement(o.tag||'div');
  82            var useSet = !!el.setAttribute;             for(var attr in o){
  83                if(attr == "tag" || attr == "children" || attr == "cn" || attr == "html" || attr == "style" || typeof o[attr] == "function") continue;
  84                if(attr=="cls"){
  85                    el.className = o["cls"];
  86                }else{
  87                    if(useSet) el.setAttribute(attr, o[attr]);
  88                    else el[attr] = o[attr];
  89                }
  90            }
  91            Ext.DomHelper.applyStyles(el, o.style);
  92            var cn = o.children || o.cn;
  93            if(cn){
  94                createDom(cn, el);
  95            } else if(o.html){
  96                el.innerHTML = o.html;
  97            }
  98        }
  99        if(parentNode){
 100           parentNode.appendChild(el);
 101        }
 102        return el;
 103    };
 104
 105    var ieTable = function(depth, s, h, e){
 106        tempTableEl.innerHTML = [s, h, e].join('');
 107        var i = -1, el = tempTableEl;
 108        while(++i < depth){
 109            el = el.firstChild;
 110        }
 111        return el;
 112    };
 113
 114        var ts = '<table>',
 115        te = '</table>',
 116        tbs = ts+'<tbody>',
 117        tbe = '</tbody>'+te,
 118        trs = tbs + '<tr>',
 119        tre = '</tr>'+tbe;
 120
 121    
 122    var insertIntoTable = function(tag, where, el, html){
 123        if(!tempTableEl){
 124            tempTableEl = document.createElement('div');
 125        }
 126        var node;
 127        var before = null;
 128        if(tag == 'td'){
 129            if(where == 'afterbegin' || where == 'beforeend'){                 return;
 130            }
 131            if(where == 'beforebegin'){
 132                before = el;
 133                el = el.parentNode;
 134            } else{
 135                before = el.nextSibling;
 136                el = el.parentNode;
 137            }
 138            node = ieTable(4, trs, html, tre);
 139        }
 140        else if(tag == 'tr'){
 141            if(where == 'beforebegin'){
 142                before = el;
 143                el = el.parentNode;
 144                node = ieTable(3, tbs, html, tbe);
 145            } else if(where == 'afterend'){
 146                before = el.nextSibling;
 147                el = el.parentNode;
 148                node = ieTable(3, tbs, html, tbe);
 149            } else{                 if(where == 'afterbegin'){
 150                    before = el.firstChild;
 151                }
 152                node = ieTable(4, trs, html, tre);
 153            }
 154        } else if(tag == 'tbody'){
 155            if(where == 'beforebegin'){
 156                before = el;
 157                el = el.parentNode;
 158                node = ieTable(2, ts, html, te);
 159            } else if(where == 'afterend'){
 160                before = el.nextSibling;
 161                el = el.parentNode;
 162                node = ieTable(2, ts, html, te);
 163            } else{
 164                if(where == 'afterbegin'){
 165                    before = el.firstChild;
 166                }
 167                node = ieTable(3, tbs, html, tbe);
 168            }
 169        } else{             if(where == 'beforebegin' || where == 'afterend'){                 return;
 170            }
 171            if(where == 'afterbegin'){
 172                before = el.firstChild;
 173            }
 174            node = ieTable(2, ts, html, te);
 175        }
 176        el.insertBefore(node, before);
 177        return node;
 178    };
 179
 180
 181    return {
 182    
 183    useDom : false,
 184
 185    
 186    markup : function(o){
 187        return createHtml(o);
 188    },
 189
 190    
 191    applyStyles : function(el, styles){
 192        if(styles){
 193           el = Ext.fly(el);
 194           if(typeof styles == "string"){
 195               var re = /\s?([a-z\-]*)\:\s?([^;]*);?/gi;
 196               var matches;
 197               while ((matches = re.exec(styles)) != null){
 198                   el.setStyle(matches[1], matches[2]);
 199               }
 200           }else if (typeof styles == "object"){
 201               for (var style in styles){
 202                  el.setStyle(style, styles[style]);
 203               }
 204           }else if (typeof styles == "function"){
 205                Ext.DomHelper.applyStyles(el, styles.call());
 206           }
 207        }
 208    },
 209
 210    
 211    insertHtml : function(where, el, html){
 212        where = where.toLowerCase();
 213        if(el.insertAdjacentHTML){
 214            if(tableRe.test(el.tagName)){
 215                var rs;
 216                if(rs = insertIntoTable(el.tagName.toLowerCase(), where, el, html)){
 217                    return rs;
 218                }
 219            }
 220            switch(where){
 221                case "beforebegin":
 222                    el.insertAdjacentHTML('BeforeBegin', html);
 223                    return el.previousSibling;
 224                case "afterbegin":
 225                    el.insertAdjacentHTML('AfterBegin', html);
 226                    return el.firstChild;
 227                case "beforeend":
 228                    el.insertAdjacentHTML('BeforeEnd', html);
 229                    return el.lastChild;
 230                case "afterend":
 231                    el.insertAdjacentHTML('AfterEnd', html);
 232                    return el.nextSibling;
 233            }
 234            throw 'Illegal insertion point -> "' + where + '"';
 235        }
 236        var range = el.ownerDocument.createRange();
 237        var frag;
 238        switch(where){
 239             case "beforebegin":
 240                range.setStartBefore(el);
 241                frag = range.createContextualFragment(html);
 242                el.parentNode.insertBefore(frag, el);
 243                return el.previousSibling;
 244             case "afterbegin":
 245                if(el.firstChild){
 246                    range.setStartBefore(el.firstChild);
 247                    frag = range.createContextualFragment(html);
 248                    el.insertBefore(frag, el.firstChild);
 249                    return el.firstChild;
 250                }else{
 251                    el.innerHTML = html;
 252                    return el.firstChild;
 253                }
 254            case "beforeend":
 255                if(el.lastChild){
 256                    range.setStartAfter(el.lastChild);
 257                    frag = range.createContextualFragment(html);
 258                    el.appendChild(frag);
 259                    return el.lastChild;
 260                }else{
 261                    el.innerHTML = html;
 262                    return el.lastChild;
 263                }
 264            case "afterend":
 265                range.setStartAfter(el);
 266                frag = range.createContextualFragment(html);
 267                el.parentNode.insertBefore(frag, el.nextSibling);
 268                return el.nextSibling;
 269            }
 270            throw 'Illegal insertion point -> "' + where + '"';
 271    },
 272
 273    
 274    insertBefore : function(el, o, returnElement){
 275        return this.doInsert(el, o, returnElement, "beforeBegin");
 276    },
 277
 278    
 279    insertAfter : function(el, o, returnElement){
 280        return this.doInsert(el, o, returnElement, "afterEnd", "nextSibling");
 281    },
 282
 283    
 284    insertFirst : function(el, o, returnElement){
 285        return this.doInsert(el, o, returnElement, "afterBegin", "firstChild");
 286    },
 287
 288        doInsert : function(el, o, returnElement, pos, sibling){
 289        el = Ext.getDom(el);
 290        var newNode;
 291        if(this.useDom){
 292            newNode = createDom(o, null);
 293            (sibling === "firstChild" ? el : el.parentNode).insertBefore(newNode, sibling ? el[sibling] : el);
 294        }else{
 295            var html = createHtml(o);
 296            newNode = this.insertHtml(pos, el, html);
 297        }
 298        return returnElement ? Ext.get(newNode, true) : newNode;
 299    },
 300
 301    
 302    append : function(el, o, returnElement){
 303        el = Ext.getDom(el);
 304        var newNode;
 305        if(this.useDom){
 306            newNode = createDom(o, null);
 307            el.appendChild(newNode);
 308        }else{
 309            var html = createHtml(o);
 310            newNode = this.insertHtml("beforeEnd", el, html);
 311        }
 312        return returnElement ? Ext.get(newNode, true) : newNode;
 313    },
 314
 315    
 316    overwrite : function(el, o, returnElement){
 317        el = Ext.getDom(el);
 318        el.innerHTML = createHtml(o);
 319        return returnElement ? Ext.get(el.firstChild, true) : el.firstChild;
 320    },
 321
 322    
 323    createTemplate : function(o){
 324        var html = createHtml(o);
 325        return new Ext.Template(html);
 326    }
 327    };
 328}();
 329
 330
 331Ext.Template = function(html){
 332    var a = arguments;
 333    if(Ext.isArray(html)){
 334        html = html.join("");
 335    }else if(a.length > 1){
 336        var buf = [];
 337        for(var i = 0, len = a.length; i < len; i++){
 338            if(typeof a[i] == 'object'){
 339                Ext.apply(this, a[i]);
 340            }else{
 341                buf[buf.length] = a[i];
 342            }
 343        }
 344        html = buf.join('');
 345    }
 346    
 347    this.html = html;
 348    if(this.compiled){
 349        this.compile();
 350    }
 351};
 352Ext.Template.prototype = {
 353    
 354    applyTemplate : function(values){
 355        if(this.compiled){
 356            return this.compiled(values);
 357        }
 358        var useF = this.disableFormats !== true;
 359        var fm = Ext.util.Format, tpl = this;
 360        var fn = function(m, name, format, args){
 361            if(format && useF){
 362                if(format.substr(0, 5) == "this."){
 363                    return tpl.call(format.substr(5), values[name], values);
 364                }else{
 365                    if(args){
 366                                                                                                var re = /^\s*['"](.*)["']\s*$/;
 367                        args = args.split(',');
 368                        for(var i = 0, len = args.length; i < len; i++){
 369                            args[i] = args[i].replace(re, "$1");
 370                        }
 371                        args = [values[name]].concat(args);
 372                    }else{
 373                        args = [values[name]];
 374                    }
 375                    return fm[format].apply(fm, args);
 376                }
 377            }else{
 378                return values[name] !== undefined ? values[name] : "";
 379            }
 380        };
 381        return this.html.replace(this.re, fn);
 382    },
 383
 384    
 385    set : function(html, compile){
 386        this.html = html;
 387        this.compiled = null;
 388        if(compile){
 389            this.compile();
 390        }
 391        return this;
 392    },
 393
 394    
 395    disableFormats : false,
 396
 397    
 398    re : /\{([\w-]+)(?:\:([\w\.]*)(?:\((.*?)?\))?)?\}/g,
 399
 400    
 401    compile : function(){
 402        var fm = Ext.util.Format;
 403        var useF = this.disableFormats !== true;
 404        var sep = Ext.isGecko ? "+" : ",";
 405        var fn = function(m, name, format, args){
 406            if(format && useF){
 407                args = args ? ',' + args : "";
 408                if(format.substr(0, 5) != "this."){
 409                    format = "fm." + format + '(';
 410                }else{
 411                    format = 'this.call("'+ format.substr(5) + '", ';
 412                    args = ", values";
 413                }
 414            }else{
 415                args= ''; format = "(values['" + name + "'] == undefined ? '' : ";
 416            }
 417            return "'"+ sep + format + "values['" + name + "']" + args + ")"+sep+"'";
 418        };
 419        var body;
 420                if(Ext.isGecko){
 421            body = "this.compiled = function(values){ return '" +
 422                   this.html.replace(/\\/g, '\\\\').replace(/(\r\n|\n)/g, '\\n').replace(/'/g, "\\'").replace(this.re, fn) +
 423                    "';};";
 424        }else{
 425            body = ["this.compiled = function(values){ return ['"];
 426            body.push(this.html.replace(/\\/g, '\\\\').replace(/(\r\n|\n)/g, '\\n').replace(/'/g, "\\'").replace(this.re, fn));
 427            body.push("'].join('');};");
 428            body = body.join('');
 429        }
 430        eval(body);
 431        return this;
 432    },
 433
 434        call : function(fnName, value, allValues){
 435        return this[fnName](value, allValues);
 436    },
 437
 438    
 439    insertFirst: function(el, values, returnElement){
 440        return this.doInsert('afterBegin', el, values, returnElement);
 441    },
 442
 443    
 444    insertBefore: function(el, values, returnElement){
 445        return this.doInsert('beforeBegin', el, values, returnElement);
 446    },
 447
 448    
 449    insertAfter : function(el, values, returnElement){
 450        return this.doInsert('afterEnd', el, values, returnElement);
 451    },
 452
 453    
 454    append : function(el, values, returnElement){
 455        return this.doInsert('beforeEnd', el, values, returnElement);
 456    },
 457
 458    doInsert : function(where, el, values, returnEl){
 459        el = Ext.getDom(el);
 460        var newNode = Ext.DomHelper.insertHtml(where, el, this.applyTemplate(values));
 461        return returnEl ? Ext.get(newNode, true) : newNode;
 462    },
 463
 464    
 465    overwrite : function(el, values, returnElement){
 466        el = Ext.getDom(el);
 467        el.innerHTML = this.applyTemplate(values);
 468        return returnElement ? Ext.get(el.firstChild, true) : el.firstChild;
 469    }
 470};
 471
 472Ext.Template.prototype.apply = Ext.Template.prototype.applyTemplate;
 473
 474Ext.DomHelper.Template = Ext.Template;
 475
 476
 477Ext.Template.from = function(el, config){
 478    el = Ext.getDom(el);
 479    return new Ext.Template(el.value || el.innerHTML, config || '');
 480};
 481
 482
 483Ext.DomQuery = function(){
 484    var cache = {}, simpleCache = {}, valueCache = {};
 485    var nonSpace = /\S/;
 486    var trimRe = /^\s+|\s+$/g;
 487    var tplRe = /\{(\d+)\}/g;
 488    var modeRe = /^(\s?[\/>+~]\s?|\s|$)/;
 489    var tagTokenRe = /^(#)?([\w-\*]+)/;
 490    var nthRe = /(\d*)n\+?(\d*)/, nthRe2 = /\D/;
 491
 492    function child(p, index){
 493        var i = 0;
 494        var n = p.firstChild;
 495        while(n){
 496            if(n.nodeType == 1){
 497               if(++i == index){
 498                   return n;
 499               }
 500            }
 501            n = n.nextSibling;
 502        }
 503        return null;
 504    };
 505
 506    function next(n){
 507        while((n = n.nextSibling) && n.nodeType != 1);
 508        return n;
 509    };
 510
 511    function prev(n){
 512        while((n = n.previousSibling) && n.nodeType != 1);
 513        return n;
 514    };
 515
 516    function children(d){
 517        var n = d.firstChild, ni = -1;
 518 	    while(n){
 519 	        var nx = n.nextSibling;
 520 	        if(n.nodeType == 3 && !nonSpace.test(n.nodeValue)){
 521 	            d.removeChild(n);
 522 	        }else{
 523 	            n.nodeIndex = ++ni;
 524 	        }
 525 	        n = nx;
 526 	    }
 527 	    return this;
 528 	};
 529
 530    function byClassName(c, a, v){
 531        if(!v){
 532            return c;
 533        }
 534        var r = [], ri = -1, cn;
 535        for(var i = 0, ci; ci = c[i]; i++){
 536            if((' '+ci.className+' ').indexOf(v) != -1){
 537                r[++ri] = ci;
 538            }
 539        }
 540        return r;
 541    };
 542
 543    function attrValue(n, attr){
 544        if(!n.tagName && typeof n.length != "undefined"){
 545            n = n[0];
 546        }
 547        if(!n){
 548            return null;
 549        }
 550        if(attr == "for"){
 551            return n.htmlFor;
 552        }
 553        if(attr == "class" || attr == "className"){
 554            return n.className;
 555        }
 556        return n.getAttribute(attr) || n[attr];
 557
 558    };
 559
 560    function getNodes(ns, mode, tagName){
 561        var result = [], ri = -1, cs;
 562        if(!ns){
 563            return result;
 564        }
 565        tagName = tagName || "*";
 566        if(typeof ns.getElementsByTagName != "undefined"){
 567            ns = [ns];
 568        }
 569        if(!mode){
 570            for(var i = 0, ni; ni = ns[i]; i++){
 571                cs = ni.getElementsByTagName(tagName);
 572                for(var j = 0, ci; ci = cs[j]; j++){
 573                    result[++ri] = ci;
 574                }
 575            }
 576        }else if(mode == "/" || mode == ">"){
 577            var utag = tagName.toUpperCase();
 578            for(var i = 0, ni, cn; ni = ns[i]; i++){
 579                cn = ni.children || ni.childNodes;
 580                for(var j = 0, cj; cj = cn[j]; j++){
 581                    if(cj.nodeName == utag || cj.nodeName == tagName  || tagName == '*'){
 582                        result[++ri] = cj;
 583                    }
 584                }
 585            }
 586        }else if(mode == "+"){
 587            var utag = tagName.toUpperCase();
 588            for(var i = 0, n; n = ns[i]; i++){
 589                while((n = n.nextSibling) && n.nodeType != 1);
 590                if(n && (n.nodeName == utag || n.nodeName == tagName || tagName == '*')){
 591                    result[++ri] = n;
 592                }
 593            }
 594        }else if(mode == "~"){
 595            for(var i = 0, n; n = ns[i]; i++){
 596                while((n = n.nextSibling) && (n.nodeType != 1 || (tagName == '*' || n.tagName.toLowerCase()!=tagName)));
 597                if(n){
 598                    result[++ri] = n;
 599                }
 600            }
 601        }
 602        return result;
 603    };
 604
 605    function concat(a, b){
 606        if(b.slice){
 607            return a.concat(b);
 608        }
 609        for(var i = 0, l = b.length; i < l; i++){
 610            a[a.length] = b[i];
 611        }
 612        return a;
 613    }
 614
 615    function byTag(cs, tagName){
 616        if(cs.tagName || cs == document){
 617            cs = [cs];
 618        }
 619        if(!tagName){
 620            return cs;
 621        }
 622        var r = [], ri = -1;
 623        tagName = tagName.toLowerCase();
 624        for(var i = 0, ci; ci = cs[i]; i++){
 625            if(ci.nodeType == 1 && ci.tagName.toLowerCase()==tagName){
 626                r[++ri] = ci;
 627            }
 628        }
 629        return r;
 630    };
 631
 632    function byId(cs, attr, id){
 633        if(cs.tagName || cs == document){
 634            cs = [cs];
 635        }
 636        if(!id){
 637            return cs;
 638        }
 639        var r = [], ri = -1;
 640        for(var i = 0,ci; ci = cs[i]; i++){
 641            if(ci && ci.id == id){
 642                r[++ri] = ci;
 643                return r;
 644            }
 645        }
 646        return r;
 647    };
 648
 649    function byAttribute(cs, attr, value, op, custom){
 650        var r = [], ri = -1, st = custom=="{";
 651        var f = Ext.DomQuery.operators[op];
 652        for(var i = 0, ci; ci = cs[i]; i++){
 653            var a;
 654            if(st){
 655                a = Ext.DomQuery.getStyle(ci, attr);
 656            }
 657            else if(attr == "class" || attr == "className"){
 658                a = ci.className;
 659            }else if(attr == "for"){
 660                a = ci.htmlFor;
 661            }else if(attr == "href"){
 662                a = ci.getAttribute("href", 2);
 663            }else{
 664                a = ci.getAttribute(attr);
 665            }
 666            if((f && f(a, value)) || (!f && a)){
 667                r[++ri] = ci;
 668            }
 669        }
 670        return r;
 671    };
 672
 673    function byPseudo(cs, name, value){
 674        return Ext.DomQuery.pseudos[name](cs, value);
 675    };
 676
 677    
 678    
 679    
 680    var isIE = window.ActiveXObject ? true : false;
 681
 682    
 683    
 684    eval("var batch = 30803;");
 685
 686    var key = 30803;
 687
 688    function nodupIEXml(cs){
 689        var d = ++key;
 690        cs[0].setAttribute("_nodup", d);
 691        var r = [cs[0]];
 692        for(var i = 1, len = cs.length; i < len; i++){
 693            var c = cs[i];
 694            if(!c.getAttribute("_nodup") != d){
 695                c.setAttribute("_nodup", d);
 696                r[r.length] = c;
 697            }
 698        }
 699        for(var i = 0, len = cs.length; i < len; i++){
 700            cs[i].removeAttribute("_nodup");
 701        }
 702        return r;
 703    }
 704
 705    function nodup(cs){
 706        if(!cs){
 707            return [];
 708        }
 709        var len = cs.length, c, i, r = cs, cj, ri = -1;
 710        if(!len || typeof cs.nodeType != "undefined" || len == 1){
 711            return cs;
 712        }
 713        if(isIE && typeof cs[0].selectSingleNode != "undefined"){
 714            return nodupIEXml(cs);
 715        }
 716        var d = ++key;
 717        cs[0]._nodup = d;
 718        for(i = 1; c = cs[i]; i++){
 719            if(c._nodup != d){
 720                c._nodup = d;
 721            }else{
 722                r = [];
 723                for(var j = 0; j < i; j++){
 724                    r[++ri] = cs[j];
 725                }
 726                for(j = i+1; cj = cs[j]; j++){
 727                    if(cj._nodup != d){
 728                        cj._nodup = d;
 729                        r[++ri] = cj;
 730                    }
 731                }
 732                return r;
 733            }
 734        }
 735        return r;
 736    }
 737
 738    function quickDiffIEXml(c1, c2){
 739        var d = ++key;
 740        for(var i = 0, len = c1.length; i < len; i++){
 741            c1[i].setAttribute("_qdiff", d);
 742        }
 743        var r = [];
 744        for(var i = 0, len = c2.length; i < len; i++){
 745            if(c2[i].getAttribute("_qdiff") != d){
 746                r[r.length] = c2[i];
 747            }
 748        }
 749        for(var i = 0, len = c1.length; i < len; i++){
 750           c1[i].removeAttribute("_qdiff");
 751        }
 752        return r;
 753    }
 754
 755    function quickDiff(c1, c2){
 756        var len1 = c1.length;
 757        if(!len1){
 758            return c2;
 759        }
 760        if(isIE && c1[0].selectSingleNode){
 761            return quickDiffIEXml(c1, c2);
 762        }
 763        var d = ++key;
 764        for(var i = 0; i < len1; i++){
 765            c1[i]._qdiff = d;
 766        }
 767        var r = [];
 768        for(var i = 0, len = c2.length; i < len; i++){
 769            if(c2[i]._qdiff != d){
 770                r[r.length] = c2[i];
 771            }
 772        }
 773        return r;
 774    }
 775
 776    function quickId(ns, mode, root, id){
 777        if(ns == root){
 778           var d = root.ownerDocument || root;
 779           return d.getElementById(id);
 780        }
 781        ns = getNodes(ns, mode, "*");
 782        return byId(ns, null, id);
 783    }
 784
 785    return {
 786        getStyle : function(el, name){
 787            return Ext.fly(el).getStyle(name);
 788        },
 789        
 790        compile : function(path, type){
 791            type = type || "select";
 792
 793            var fn = ["var f = function(root){\n var mode; ++batch; var n = root || document;\n"];
 794            var q = path, mode, lq;
 795            var tk = Ext.DomQuery.matchers;
 796            var tklen = tk.length;
 797            var mm;
 798
 799            
 800            var lmode = q.match(modeRe);
 801            if(lmode && lmode[1]){
 802                fn[fn.length] = 'mode="'+lmode[1].replace(trimRe, "")+'";';
 803                q = q.replace(lmode[1], "");
 804            }
 805            
 806            while(path.substr(0, 1)=="/"){
 807                path = path.substr(1);
 808            }
 809
 810            while(q && lq != q){
 811                lq = q;
 812                var tm = q.match(tagTokenRe);
 813                if(type == "select"){
 814                    if(tm){
 815                        if(tm[1] == "#"){
 816                            fn[fn.length] = 'n = quickId(n, mode, root, "'+tm[2]+'");';
 817                        }else{
 818                            fn[fn.length] = 'n = getNodes(n, mode, "'+tm[2]+'");';
 819                        }
 820                        q = q.replace(tm[0], "");
 821                    }else if(q.substr(0, 1) != '@'){
 822                        fn[fn.length] = 'n = getNodes(n, mode, "*");';
 823                    }
 824                }else{
 825                    if(tm){
 826                        if(tm[1] == "#"){
 827                            fn[fn.length] = 'n = byId(n, null, "'+tm[2]+'");';
 828                        }else{
 829                            fn[fn.length] = 'n = byTag(n, "'+tm[2]+'");';
 830                        }
 831                        q = q.replace(tm[0], "");
 832                    }
 833                }
 834                while(!(mm = q.match(modeRe))){
 835                    var matched = false;
 836                    for(var j = 0; j < tklen; j++){
 837                        var t = tk[j];
 838                        var m = q.match(t.re);
 839                        if(m){
 840                            fn[fn.length] = t.select.replace(tplRe, function(x, i){
 841                                                    return m[i];
 842                                                });
 843                            q = q.replace(m[0], "");
 844                            matched = true;
 845                            break;
 846                        }
 847                    }
 848                    
 849                    if(!matched){
 850                        throw 'Error parsing selector, parsing failed at "' + q + '"';
 851                    }
 852                }
 853                if(mm[1]){
 854                    fn[fn.length] = 'mode="'+mm[1].replace(trimRe, "")+'";';
 855                    q = q.replace(mm[1], "");
 856                }
 857            }
 858            fn[fn.length] = "return nodup(n);\n}";
 859            eval(fn.join(""));
 860            return f;
 861        },
 862
 863        
 864        select : function(path, root, type){
 865            if(!root || root == document){
 866                root = document;
 867            }
 868            if(typeof root == "string"){
 869                root = document.getElementById(root);
 870            }
 871            var paths = path.split(",");
 872            var results = [];
 873            for(var i = 0, len = paths.length; i < len; i++){
 874                var p = paths[i].replace(trimRe, "");
 875                if(!cache[p]){
 876                    cache[p] = Ext.DomQuery.compile(p);
 877                    if(!cache[p]){
 878                        throw p + " is not a valid selector";
 879                    }
 880                }
 881                var result = cache[p](root);
 882                if(result && result != document){
 883                    results = results.concat(result);
 884                }
 885            }
 886            if(paths.length > 1){
 887                return nodup(results);
 888            }
 889            return results;
 890        },
 891
 892        
 893        selectNode : function(path, root){
 894            return Ext.DomQuery.select(path, root)[0];
 895        },
 896
 897        
 898        selectValue : function(path, root, defaultValue){
 899            path = path.replace(trimRe, "");
 900            if(!valueCache[path]){
 901                valueCache[path] = Ext.DomQuery.compile(path, "select");
 902            }
 903            var n = valueCache[path](root);
 904            n = n[0] ? n[0] : n;
 905            var v = (n && n.firstChild ? n.firstChild.nodeValue : null);
 906            return ((v === null||v === undefined||v==='') ? defaultValue : v);
 907        },
 908
 909        
 910        selectNumber : function(path, root, defaultValue){
 911            var v = Ext.DomQuery.selectValue(path, root, defaultValue || 0);
 912            return parseFloat(v);
 913        },
 914
 915        
 916        is : function(el, ss){
 917            if(typeof el == "string"){
 918                el = document.getElementById(el);
 919            }
 920            var isArray = Ext.isArray(el);
 921            var result = Ext.DomQuery.filter(isArray ? el : [el], ss);
 922            return isArray ? (result.length == el.length) : (result.length > 0);
 923        },
 924
 925        
 926        filter : function(els, ss, nonMatches){
 927            ss = ss.replace(trimRe, "");
 928            if(!simpleCache[ss]){
 929                simpleCache[ss] = Ext.DomQuery.compile(ss, "simple");
 930            }
 931            var result = simpleCache[ss](els);
 932            return nonMatches ? quickDiff(result, els) : result;
 933        },
 934
 935        
 936        matchers : [{
 937                re: /^\.([\w-]+)/,
 938                select: 'n = byClassName(n, null, " {1} ");'
 939            }, {
 940                re: /^\:([\w-]+)(?:\(((?:[^\s>\/]*|.*?))\))?/,
 941                select: 'n = byPseudo(n, "{1}", "{2}");'
 942            },{
 943                re: /^(?:([\[\{])(?:@)?([\w-]+)\s?(?:(=|.=)\s?['"]?(.*?)["']?)?[\]\}])/,
 944                select: 'n = byAttribute(n, "{2}", "{4}", "{3}", "{1}");'
 945            }, {
 946                re: /^#([\w-]+)/,
 947                select: 'n = byId(n, null, "{1}");'
 948            },{
 949                re: /^@([\w-]+)/,
 950                select: 'return {firstChild:{nodeValue:attrValue(n, "{1}")}};'
 951            }
 952        ],
 953
 954        
 955        operators : {
 956            "=" : function(a, v){
 957                return a == v;
 958            },
 959            "!=" : function(a, v){
 960                return a != v;
 961            },
 962            "^=" : function(a, v){
 963                return a && a.substr(0, v.length) == v;
 964            },
 965            "$=" : function(a, v){
 966                return a && a.substr(a.length-v.length) == v;
 967            },
 968            "*=" : function(a, v){
 969                return a && a.indexOf(v) !== -1;
 970            },
 971            "%=" : function(a, v){
 972                return (a % v) == 0;
 973            },
 974            "|=" : function(a, v){
 975                return a && (a == v || a.substr(0, v.length+1) == v+'-');
 976            },
 977            "~=" : function(a, v){
 978                return a && (' '+a+' ').indexOf(' '+v+' ') != -1;
 979            }
 980        },
 981
 982        
 983        pseudos : {
 984            "first-child" : function(c){
 985                var r = [], ri = -1, n;
 986                for(var i = 0, ci; ci = n = c[i]; i++){
 987                    while((n = n.previousSibling) && n.nodeType != 1);
 988                    if(!n){
 989                        r[++ri] = ci;
 990                    }
 991                }
 992                return r;
 993            },
 994
 995            "last-child" : function(c){
 996                var r = [], ri = -1, n;
 997                for(var i = 0, ci; ci = n = c[i]; i++){
 998                    while((n = n.nextSibling) && n.nodeType != 1);
 999                    if(!n){
1000                        r[++ri] = ci;
1001                    }
1002                }
1003                return r;
1004            },
1005
1006            "nth-child" : function(c, a) {
1007                var r = [], ri = -1;
1008                var m = nthRe.exec(a == "even" && "2n" || a == "odd" && "2n+1" || !nthRe2.test(a) && "n+" + a || a);
1009                var f = (m[1] || 1) - 0, l = m[2] - 0;
1010                for(var i = 0, n; n = c[i]; i++){
1011                    var pn = n.parentNode;
1012                    if (batch != pn._batch) {
1013                        var j = 0;
1014                        for(var cn = pn.firstChild; cn; cn = cn.nextSibling){
1015                            if(cn.nodeType == 1){
1016                               cn.nodeIndex = ++j;
1017                            }
1018                        }
1019                        pn._batch = batch;
1020                    }
1021                    if (f == 1) {
1022                        if (l == 0 || n.nodeIndex == l){
1023                            r[++ri] = n;
1024                        }
1025                    } else if ((n.nodeIndex + l) % f == 0){
1026                        r[++ri] = n;
1027                    }
1028                }
1029
1030                return r;
1031            },
1032
1033            "only-child" : function(c){
1034                var r = [], ri = -1;;
1035                for(var i = 0, ci; ci = c[i]; i++){
1036                    if(!prev(ci) && !next(ci)){
1037                        r[++ri] = ci;
1038                    }
1039                }
1040                return r;
1041            },
1042
1043            "empty" : function(c){
1044                var r = [], ri = -1;
1045                for(var i = 0, ci; ci = c[i]; i++){
1046                    var cns = ci.childNodes, j = 0, cn, empty = true;
1047                    while(cn = cns[j]){
1048                        ++j;
1049                        if(cn.nodeType == 1 || cn.nodeType == 3){
1050                            empty = false;
1051                            break;
1052                        }
1053                    }
1054                    if(empty){
1055                        r[++ri] = ci;
1056                    }
1057                }
1058                return r;
1059            },
1060
1061            "contains" : function(c, v){
1062                var r = [], ri = -1;
1063                for(var i = 0, ci; ci = c[i]; i++){
1064                    if((ci.textContent||ci.innerText||'').indexOf(v) != -1){
1065                        r[++ri] = ci;
1066                    }
1067                }
1068                return r;
1069            },
1070
1071            "nodeValue" : function(c, v){
1072                var r = [], ri = -1;
1073                for(var i = 0, ci; ci = c[i]; i++){
1074                    if(ci.firstChild && ci.firstChild.nodeValue == v){
1075                        r[++ri] = ci;
1076                    }
1077                }
1078                return r;
1079            },
1080
1081            "checked" : function(c){
1082                var r = [], ri = -1;
1083                for(var i = 0, ci; ci = c[i]; i++){
1084                    if(ci.checked == true){
1085                        r[++ri] = ci;
1086                    }
1087                }
1088                return r;
1089            },
1090
1091            "not" : function(c, ss){
1092                return Ext.DomQuery.filter(c, ss, true);
1093            },
1094
1095            "any" : function(c, selectors){
1096                var ss = selectors.split('|');
1097                var r = [], ri = -1, s;
1098                for(var i = 0, ci; ci = c[i]; i++){
1099                    for(var j = 0; s = ss[j]; j++){
1100                        if(Ext.DomQuery.is(ci, s)){
1101                            r[++ri] = ci;
1102                            break;
1103                        }
1104                    }
1105                }
1106                return r;
1107            },
1108
1109            "odd" : function(c){
1110                return this["nth-child"](c, "odd");
1111            },
1112
1113            "even" : function(c){
1114                return this["nth-child"](c, "even");
1115            },
1116
1117            "nth" : function(c, a){
1118                return c[a-1] || [];
1119            },
1120
1121            "first" : function(c){
1122                return c[0] || [];
1123            },
1124
1125            "last" : function(c){
1126                return c[c.length-1] || [];
1127            },
1128
1129            "has" : function(c, ss){
1130                var s = Ext.DomQuery.select;
1131                var r = [], ri = -1;
1132                for(var i = 0, ci; ci = c[i]; i++){
1133                    if(s(ss, ci).length > 0){
1134                        r[++ri] = ci;
1135                    }
1136                }
1137                return r;
1138            },
1139
1140            "next" : function(c, ss){
1141                var is = Ext.DomQuery.is;
1142                var r = [], ri = -1;
1143                for(var i = 0, ci; ci = c[i]; i++){
1144                    var n = next(ci);
1145                    if(n && is(n, ss)){
1146                        r[++ri] = ci;
1147                    }
1148                }
1149                return r;
1150            },
1151
1152            "prev" : function(c, ss){
1153                var is = Ext.DomQuery.is;
1154                var r = [], ri = -1;
1155                for(var i = 0, ci; ci = c[i]; i++){
1156                    var n = prev(ci);
1157                    if(n && is(n, ss)){
1158                        r[++ri] = ci;
1159                    }
1160                }
1161                return r;
1162            }
1163        }
1164    };
1165}();
1166
1167
1168Ext.query = Ext.DomQuery.select;
1169
1170
1171Ext.util.Observable = function(){
1172    
1173    if(this.listeners){
1174        this.on(this.listeners);
1175        delete this.listeners;
1176    }
1177};
1178Ext.util.Observable.prototype = {
1179    
1180    fireEvent : function(){
1181        if(this.eventsSuspended !== true){
1182            var ce = this.events[arguments[0].toLowerCase()];
1183            if(typeof ce == "object"){
1184                return ce.fire.apply(ce, Array.prototype.slice.call(arguments, 1));
1185            }
1186        }
1187        return true;
1188    },
1189
1190        filterOptRe : /^(?:scope|delay|buffer|single)$/,
1191
1192    
1193    addListener : function(eventName, fn, scope, o){
1194        if(typeof eventName == "object"){
1195            o = eventName;
1196            for(var e in o){
1197                if(this.filterOptRe.test(e)){
1198                    continue;
1199                }
1200                if(typeof o[e] == "function"){
1201                                        this.addListener(e, o[e], o.scope,  o);
1202                }else{
1203                                        this.addListener(e, o[e].fn, o[e].scope, o[e]);
1204                }
1205            }
1206            return;
1207        }
1208        o = (!o || typeof o == "boolean") ? {} : o;
1209        eventName = eventName.toLowerCase();
1210        var ce = this.events[eventName] || true;
1211        if(typeof ce == "boolean"){
1212            ce = new Ext.util.Event(this, eventName);
1213            this.events[eventName] = ce;
1214        }
1215        ce.addListener(fn, scope, o);
1216    },
1217
1218    
1219    removeListener : function(eventName, fn, scope){
1220        var ce = this.events[eventName.toLowerCase()];
1221        if(typeof ce == "object"){
1222            ce.removeListener(fn, scope);
1223        }
1224    },
1225
1226    
1227    purgeListeners : function(){
1228        for(var evt in this.events){
1229            if(typeof this.events[evt] == "object"){
1230                 this.events[evt].clearListeners();
1231            }
1232        }
1233    },
1234
1235    
1236    relayEvents : function(o, events){
1237        var createHandler = function(ename){
1238            return function(){
1239                return this.fireEvent.apply(this, Ext.combine(ename, Array.prototype.slice.call(arguments, 0)));
1240            };
1241        };
1242        for(var i = 0, len = events.length; i < len; i++){
1243            var ename = events[i];
1244            if(!this.events[ename]){ this.events[ename] = true; };
1245            o.on(ename, createHandler(ename), this);
1246        }
1247    },
1248
1249    
1250    addEvents : function(o){
1251        if(!this.events){
1252            this.events = {};
1253        }
1254        if(typeof o == 'string'){
1255            for(var i = 0, a = arguments, v; v = a[i]; i++){
1256                if(!this.events[a[i]]){
1257                    this.events[a[i]] = true;
1258                }
1259            }
1260        }else{
1261            Ext.applyIf(this.events, o);
1262        }
1263    },
1264
1265    
1266    hasListener : function(eventName){
1267        var e = this.events[eventName];
1268        return typeof e == "object" && e.listeners.length > 0;
1269    },
1270
1271    
1272    suspendEvents : function(){
1273        this.eventsSuspended = true;
1274    },
1275
1276    
1277    resumeEvents : function(){
1278        this.eventsSuspended = false;
1279    },
1280
1281                getMethodEvent : function(method){
1282        if(!this.methodEvents){
1283            this.methodEvents = {};
1284        }
1285        var e = this.methodEvents[method];
1286        if(!e){
1287            e = {};
1288            this.methodEvents[method] = e;
1289
1290            e.originalFn = this[method];
1291            e.methodName = method;
1292            e.before = [];
1293            e.after = [];
1294
1295
1296            var returnValue, v, cancel;
1297            var obj = this;
1298
1299            var makeCall = function(fn, scope, args){
1300                if((v = fn.apply(scope || obj, args)) !== undefined){
1301                    if(typeof v === 'object'){
1302                        if(v.returnValue !== undefined){
1303                            returnValue = v.returnValue;
1304                        }else{
1305                            returnValue = v;
1306                        }
1307                        if(v.cancel === true){
1308                            cancel = true;
1309                        }
1310                    }else if(v === false){
1311                        cancel = true;
1312                    }else {
1313                        returnValue = v;
1314                    }
1315                }
1316            }
1317
1318            this[method] = function(){
1319                returnValue = v = undefined; cancel = false;
1320                var args = Array.prototype.slice.call(arguments, 0);
1321                for(var i = 0, len = e.before.length; i < len; i++){
1322                    makeCall(e.before[i].fn, e.before[i].scope, args);
1323                    if(cancel){
1324                        return returnValue;
1325                    }
1326                }
1327
1328                if((v = e.originalFn.apply(obj, args)) !== undefined){
1329                    returnValue = v;
1330                }
1331
1332                for(var i = 0, len = e.after.length; i < len; i++){
1333                    makeCall(e.after[i].fn, e.after[i].scope, args);
1334                    if(cancel){
1335                        return returnValue;
1336                    }
1337                }
1338                return returnValue;
1339            };
1340        }
1341        return e;
1342    },
1343
1344        beforeMethod : function(method, fn, scope){
1345        var e = this.getMethodEvent(method);
1346        e.before.push({fn: fn, scope: scope});
1347    },
1348
1349        afterMethod : function(method, fn, scope){
1350        var e = this.getMethodEvent(method);
1351        e.after.push({fn: fn, scope: scope});
1352    },
1353
1354    removeMethodListener : function(method, fn, scope){
1355        var e = this.getMethodEvent(method);
1356        for(var i = 0, len = e.before.length; i < len; i++){
1357            if(e.before[i].fn == fn && e.before[i].scope == scope){
1358                e.before.splice(i, 1);
1359                return;
1360            }
1361        }
1362        for(var i = 0, len = e.after.length; i < len; i++){
1363            if(e.after[i].fn == fn && e.after[i].scope == scope){
1364                e.after.splice(i, 1);
1365                return;
1366            }
1367        }
1368    }
1369};
1370
1371Ext.util.Observable.prototype.on = Ext.util.Observable.prototype.addListener;
1372
1373Ext.util.Observable.prototype.un = Ext.util.Observable.prototype.removeListener;
1374
1375
1376Ext.util.Observable.capture = function(o, fn, scope){
1377    o.fireEvent = o.fireEvent.createInterceptor(fn, scope);
1378};
1379
1380
1381Ext.util.Observable.releaseCapture = function(o){
1382    o.fireEvent = Ext.util.Observable.prototype.fireEvent;
1383};
1384
1385(function(){
1386
1387    var createBuffered = function(h, o, scope){
1388        var task = new Ext.util.DelayedTask();
1389        return function(){
1390            task.delay(o.buffer, h, scope, Array.prototype.slice.call(arguments, 0));
1391        };
1392    };
1393
1394    var createSingle = function(h, e, fn, scope){
1395        return function(){
1396            e.removeListener(fn, scope);
1397            return h.apply(scope, arguments);
1398        };
1399    };
1400
1401    var createDelayed = function(h, o, scope){
1402        return function(){
1403            var args = Array.prototype.slice.call(arguments, 0);
1404            setTimeout(function(){
1405                h.apply(scope, args);
1406            }, o.delay || 10);
1407        };
1408    };
1409
1410    Ext.util.Event = function(obj, name){
1411        this.name = name;
1412        this.obj = obj;
1413        this.listeners = [];
1414    };
1415
1416    Ext.util.Event.prototype = {
1417        addListener : function(fn, scope, options){
1418            scope = scope || this.obj;
1419            if(!this.isListening(fn, scope)){
1420                var l = this.createListener(fn, scope, options);
1421                if(!this.firing){
1422                    this.listeners.push(l);
1423                }else{                     this.listeners = this.listeners.slice(0);
1424                    this.listeners.push(l);
1425                }
1426            }
1427        },
1428
1429        createListener : function(fn, scope, o){
1430            o = o || {};
1431            scope = scope || this.obj;
1432            var l = {fn: fn, scope: scope, options: o};
1433            var h = fn;
1434            if(o.delay){
1435                h = createDelayed(h, o, scope);
1436            }
1437            if(o.single){
1438                h = createSingle(h, this, fn, scope);
1439            }
1440            if(o.buffer){
1441                h = createBuffered(h, o, scope);
1442            }
1443            l.fireFn = h;
1444            return l;
1445        },
1446
1447        findListener : function(fn, scope){
1448            scope = scope || this.obj;
1449            var ls = this.listeners;
1450            for(var i = 0, len = ls.length; i < len; i++){
1451                var l = ls[i];
1452                if(l.fn == fn && l.scope == scope){
1453                    return i;
1454                }
1455            }
1456            return -1;
1457        },
1458
1459        isListening : function(fn, scope){
1460            return this.findListener(fn, scope) != -1;
1461        },
1462
1463        removeListener : function(fn, scope){
1464            var index;
1465            if((index = this.findListener(fn, scope)) != -1){
1466                if(!this.firing){
1467                    this.listeners.splice(index, 1);
1468                }else{
1469                    this.listeners = this.listeners.slice(0);
1470                    this.listeners.splice(index, 1);
1471                }
1472                return true;
1473            }
1474            return false;
1475        },
1476
1477        clearListeners : function(){
1478            this.listeners = [];
1479        },
1480
1481        fire : function(){
1482            var ls = this.listeners, scope, len = ls.length;
1483            if(len > 0){
1484                this.firing = true;
1485                var args = Array.prototype.slice.call(arguments, 0);
1486                for(var i = 0; i < len; i++){
1487                    var l = ls[i];
1488                    if(l.fireFn.apply(l.scope||this.obj||window, arguments) === false){
1489                        this.firing = false;
1490                        return false;
1491                    }
1492                }
1493                this.firing = false;
1494            }
1495            return true;
1496        }
1497    };
1498})();
1499
1500Ext.EventManager = function(){
1501    var docReadyEvent, docReadyProcId, docReadyState = false;
1502    var resizeEvent, resizeTask, textEvent, textSize;
1503    var E = Ext.lib.Event;
1504    var D = Ext.lib.Dom;
1505        var xname = 'Ex' + 't';
1506
1507    var elHash = {};
1508
1509    var addListener = function(el, ename, fn, wrap, scope){
1510        var id = Ext.id(el);
1511        if(!elHash[id]){
1512            elHash[id] = {};
1513        }
1514        var es = elHash[id];
1515        if(!es[ename]){
1516            es[ename] = [];
1517        }
1518        var ls = es[ename];
1519        ls.push({
1520            id: id,
1521            ename: ename,
1522            fn: fn,
1523            wrap: wrap,
1524            scope: scope
1525        });
1526
1527         E.on(el, ename, wrap);
1528
1529        if(ename == "mousewheel" && el.addEventListener){             el.addEventListener("DOMMouseScroll", wrap, false);
1530            E.on(window, 'unload', function(){
1531                el.removeEventListener("DOMMouseScroll", wrap, false);
1532            });
1533        }
1534        if(ename == "mousedown" && el == document){             Ext.EventManager.stoppedMouseDownEvent.addListener(wrap);
1535        }
1536    }
1537
1538    var removeListener = function(el, ename, fn, scope){
1539        el = Ext.getDom(el);
1540        var id = Ext.id(el), es = elHash[id], wrap;
1541        if(es){
1542            var ls = es[ename], l;
1543            if(ls){
1544                for(var i = 0, len = ls.length; i < len; i++){
1545                    l = ls[i];
1546                    if(l.fn == fn && (!scope || l.scope == scope)){
1547                        wrap = l.wrap;
1548                        E.un(el, ename, wrap);
1549                        ls.splice(i, 1);
1550                        break;
1551                    }
1552                }
1553            }
1554        }
1555        if(ename == "mousewheel" && el.addEventListener && wrap){
1556            el.removeEventListener("DOMMouseScroll", wrap, false);
1557        }
1558        if(ename == "mousedown" && el == document && wrap){             Ext.EventManager.stoppedMouseDownEvent.removeListener(wrap);
1559        }
1560    }
1561
1562    var removeAll = function(el){
1563        el = Ext.getDom(el);
1564        var id = Ext.id(el), es = elHash[id], ls;
1565        if(es){
1566            for(var ename in es){
1567                if(es.hasOwnProperty(ename)){
1568                    ls = es[ename];
1569                    for(var i = 0, len = ls.length; i < len; i++){
1570                        E.un(el, ename, ls[i].wrap);
1571                        ls[i] = null;
1572                    }
1573                }
1574                es[ename] = null;
1575            }
1576            delete elHash[id];
1577        }
1578    }
1579
1580     var fireDocReady = function(){
1581        if(!docReadyState){
1582            docReadyState = Ext.isReady = true;
1583            if(Ext.isGecko || Ext.isOpera) {
1584                document.removeEventListener("DOMContentLoaded", fireDocReady, false);
1585            }
1586        }
1587        if(docReadyProcId){
1588            clearInterval(docReadyProcId);
1589            docReadyProcId = null;
1590        }
1591        if(docReadyEvent){
1592            docReadyEvent.fire();
1593            docReadyEvent.clearListeners();
1594       }
1595    };
1596
1597    var initDocReady = function(){
1598        docReadyEvent = new Ext.util.Event();
1599
1600        if(Ext.isReady){
1601            return;
1602        }
1603
1604                E.on(window, 'load', fireDocReady);
1605
1606        if(Ext.isGecko || Ext.isOpera) {
1607            document.addEventListe

Large files files are truncated, but you can click here to view the full file