/* * Ext JS Library 3.1.0 * Copyright(c) 2006-2009 Ext JS, LLC * licensing@extjs.com * http://www.extjs.com/license */ Ext.DomHelper = function() { var t = null, k = /^(?:br|frame|hr|img|input|link|meta|range|spacer|wbr|area|param|col)$/i, m = /^table|tbody|tr|td$/i, q, n = "afterbegin", o = "afterend", c = "beforebegin", p = "beforeend", a = "", h = "
", b = a + "", j = "" + h, l = b + "", s = "" + j; function g(x, z, y, A, w, u) { var v = q.insertHtml(A, Ext.getDom(x), r(z)); return y ? Ext.get(v, true) : v } function r(A) { var w = "", v, z, y, u, B; if (Ext.isString(A)) { w = A } else { if (Ext.isArray(A)) { for ( var x = 0; x < A.length; x++) { if (A[x]) { w += r(A[x]) } } } else { w += "<" + (A.tag = A.tag || "div"); Ext.iterate(A, function(C, D) { if (!/tag|children|cn|html$/i.test(C)) { if (Ext.isObject(D)) { w += " " + C + '="'; Ext.iterate(D, function(F, E) { w += F + ":" + E + ";" }); w += '"' } else { w += " " + ({ cls : "class", htmlFor : "for" }[C] || C) + '="' + D + '"' } } }); if (k.test(A.tag)) { w += "/>" } else { w += ">"; if ((B = A.children || A.cn)) { w += r(B) } else { if (A.html) { w += A.html } } w += "" } } } return w } function e(B, y, x, z) { t.innerHTML = [ y, x, z ].join(""); var u = -1, w = t, v; while (++u < B) { w = w.firstChild } if (v = w.nextSibling) { var A = document.createDocumentFragment(); while (w) { v = w.nextSibling; A.appendChild(w); w = v } w = A } return w } function d(u, v, x, w) { var y, z; t = t || document.createElement("div"); if (u == "td" && (v == n || v == p) || !/td|tr|tbody/i.test(u) && (v == c || v == o)) { return } z = v == c ? x : v == o ? x.nextSibling : v == n ? x.firstChild : null; if (v == c || v == o) { x = x.parentNode } if (u == "td" || (u == "tr" && (v == p || v == n))) { y = e(4, l, w, s) } else { if ((u == "tbody" && (v == p || v == n)) || (u == "tr" && (v == c || v == o))) { y = e(3, b, w, j) } else { y = e(2, a, w, h) } } x.insertBefore(y, z); return y } q = { markup : function(u) { return r(u) }, applyStyles : function(x, y) { if (y) { var v = 0, u, w; x = Ext.fly(x); if (Ext.isFunction(y)) { y = y.call() } if (Ext.isString(y)) { y = y.trim().split(/\s*(?::|;)\s*/); for (u = y.length; v < u;) { x.setStyle(y[v++], y[v++]) } } else { if (Ext.isObject(y)) { x.setStyle(y) } } } }, insertHtml : function(z, u, A) { var y = {}, w, C, B, D, x, v; z = z.toLowerCase(); y[c] = [ "BeforeBegin", "previousSibling" ]; y[o] = [ "AfterEnd", "nextSibling" ]; if (u.insertAdjacentHTML) { if (m.test(u.tagName) && (v = d(u.tagName.toLowerCase(), z, u, A))) { return v } y[n] = [ "AfterBegin", "firstChild" ]; y[p] = [ "BeforeEnd", "lastChild" ]; if ((w = y[z])) { u.insertAdjacentHTML(w[0], A); return u[w[1]] } } else { B = u.ownerDocument.createRange(); C = "setStart" + (/end/i.test(z) ? "After" : "Before"); if (y[z]) { B[C](u); D = B.createContextualFragment(A); u.parentNode.insertBefore(D, z == c ? u : u.nextSibling); return u[(z == c ? "previous" : "next") + "Sibling"] } else { x = (z == n ? "first" : "last") + "Child"; if (u.firstChild) { B[C](u[x]); D = B.createContextualFragment(A); if (z == n) { u.insertBefore(D, u.firstChild) } else { u.appendChild(D) } } else { u.innerHTML = A } return u[x] } } throw 'Illegal insertion point -> "' + z + '"' }, insertBefore : function(u, w, v) { return g(u, w, v, c) }, insertAfter : function(u, w, v) { return g(u, w, v, o, "nextSibling") }, insertFirst : function(u, w, v) { return g(u, w, v, n, "firstChild") }, append : function(u, w, v) { return g(u, w, v, p, "", true) }, overwrite : function(u, w, v) { u = Ext.getDom(u); u.innerHTML = r(w); return v ? Ext.get(u.firstChild) : u.firstChild }, createHtml : r }; return q }(); Ext .apply( Ext.DomHelper, function() { var d, a = "afterbegin", g = "afterend", h = "beforebegin", c = "beforeend"; function e(m, p, n, q, l, j) { m = Ext.getDom(m); var k; if (d.useDom) { k = b(p, null); if (j) { m.appendChild(k) } else { (l == "firstChild" ? m : m.parentNode) .insertBefore(k, m[l] || m) } } else { k = Ext.DomHelper.insertHtml(q, m, Ext.DomHelper .createHtml(p)) } return n ? Ext.get(k, true) : k } function b(q, k) { var m, n = document, l, j, p, r; if (Ext.isArray(q)) { m = n.createDocumentFragment(); Ext.each(q, function(o) { b(o, m) }) } else { if (Ext.isString(q)) { m = n.createTextNode(q) } else { m = n.createElement(q.tag || "div"); l = !!m.setAttribute; Ext.iterate(q, function(o, s) { if (!/tag|children|cn|html|style/.test(o)) { if (o == "cls") { m.className = s } else { if (l) { m.setAttribute(o, s) } else { m[o] = s } } } }); Ext.DomHelper.applyStyles(m, q.style); if ((r = q.children || q.cn)) { b(r, m) } else { if (q.html) { m.innerHTML = q.html } } } } if (k) { k.appendChild(m) } return m } d = { createTemplate : function(k) { var j = Ext.DomHelper.createHtml(k); return new Ext.Template(j) }, useDom : false, insertBefore : function(j, l, k) { return e(j, l, k, h) }, insertAfter : function(j, l, k) { return e(j, l, k, g, "nextSibling") }, insertFirst : function(j, l, k) { return e(j, l, k, a, "firstChild") }, append : function(j, l, k) { return e(j, l, k, c, "", true) }, createDom : b }; return d }()); Ext.Template = function(d) { var e = this, b = arguments, c = []; if (Ext.isArray(d)) { d = d.join("") } else { if (b.length > 1) { Ext.each(b, function(a) { if (Ext.isObject(a)) { Ext.apply(e, a) } else { c.push(a) } }); d = c.join("") } } e.html = d; if (e.compiled) { e.compile() } }; Ext.Template.prototype = { re : /\{([\w-]+)\}/g, applyTemplate : function(a) { var b = this; return b.compiled ? b.compiled(a) : b.html.replace(b.re, function(c, d) { return a[d] !== undefined ? a[d] : "" }) }, set : function(a, c) { var b = this; b.html = a; b.compiled = null; return c ? b.compile() : b }, 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, { disableFormats : false, re : /\{([\w-]+)(?:\:([\w\.]*)(?:\((.*?)?\))?)?\}/g, applyTemplate : function(b) { var g = this, a = g.disableFormats !== true, e = Ext.util.Format, c = g; if (g.compiled) { return g.compiled(b) } function d(j, l, p, k) { if (p && a) { if (p.substr(0, 5) == "this.") { return c.call(p.substr(5), b[l], b) } else { if (k) { var o = /^\s*['"](.*)["']\s*$/; k = k.split(","); for ( var n = 0, h = k.length; n < h; n++) { k[n] = k[n].replace(o, "$1") } k = [ b[l] ].concat(k) } else { k = [ b[l] ] } return e[p].apply(e, k) } } else { return b[l] !== undefined ? b[l] : "" } } return g.html.replace(g.re, d) }, 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, 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.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 && typeof c1[0].selectSingleNode != "undefined") { 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; if (typeof n.normalize == "function") { n.normalize() } 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; Ext.util.DelayedTask = function(d, c, a) { var e = this, g, b = function() { clearInterval(g); g = null; d.apply(c, a || []) }; e.delay = function(j, l, k, h) { e.cancel(); d = l || d; c = k || c; a = h || a; g = setInterval(b, j) }; e.cancel = function() { if (g) { clearInterval(g); g = null } } }; (function() { var j = Ext.util, m = Ext.toArray, l = Ext.each, a = Ext.isObject, h = true, k = false; j.Observable = function() { var n = this, o = n.events; if (n.listeners) { n.on(n.listeners); delete n.listeners } n.events = o || {} }; j.Observable.prototype = { filterOptRe : /^(?:scope|delay|buffer|single)$/, fireEvent : function() { var n = m(arguments), p = n[0].toLowerCase(), r = this, o = h, t = r.events[p], s, u; if (r.eventsSuspended === h) { if (s = r.eventQueue) { s.push(n) } } else { if (a(t) && t.bubble) { if (t.fire.apply(t, n.slice(1)) === k) { return k } u = r.getBubbleTarget && r.getBubbleTarget(); if (u && u.enableBubble) { if (!u.events[p] || !Ext.isObject(u.events[p]) || !u.events[p].bubble) { u.enableBubble(p) } return u.fireEvent.apply(u, n) } } else { if (a(t)) { n.shift(); o = t.fire.apply(t, n) } } } return o }, addListener : function(q, t, v, p) { var s = this, r, w, u, n; if (a(q)) { p = q; for (r in p) { w = p[r]; if (!s.filterOptRe.test(r)) { s.addListener(r, w.fn || w, w.scope || p.scope, w.fn ? w : p) } } } else { q = q.toLowerCase(); n = s.events[q] || h; if (Ext.isBoolean(n)) { s.events[q] = n = new j.Event(s, q) } n.addListener(t, v, a(p) ? p : {}) } }, removeListener : function(n, p, o) { var q = this.events[n.toLowerCase()]; if (a(q)) { q.removeListener(p, o) } }, purgeListeners : function() { var p = this.events, n, o; for (o in p) { n = p[o]; if (a(n)) { n.clearListeners() } } }, addEvents : function(r) { var q = this; q.events = q.events || {}; if (Ext.isString(r)) { var n = arguments, p = n.length; while (p--) { q.events[n[p]] = q.events[n[p]] || h } } else { Ext.applyIf(q.events, r) } }, hasListener : function(n) { var o = this.events[n]; return a(o) && o.listeners.length > 0 }, suspendEvents : function(n) { this.eventsSuspended = h; if (n && !this.eventQueue) { this.eventQueue = [] } }, resumeEvents : function() { var n = this, o = n.eventQueue || []; n.eventsSuspended = k; delete n.eventQueue; l(o, function(p) { n.fireEvent.apply(n, p) }) } }; var e = j.Observable.prototype; e.on = e.addListener; e.un = e.removeListener; j.Observable.releaseCapture = function(n) { n.fireEvent = e.fireEvent }; function g(p, q, n) { return function() { if (q.target == arguments[0]) { p.apply(n, m(arguments)) } } } function c(q, r, p, n) { p.task = new j.DelayedTask(); return function() { p.task.delay(r.buffer, q, n, m(arguments)) } } function d(p, q, o, n) { return function() { q.removeListener(o, n); return p.apply(n, arguments) } } function b(q, r, p, n) { return function() { var o = new j.DelayedTask(); if (!p.tasks) { p.tasks = [] } p.tasks.push(o); o.delay(r.delay || 10, q, n, m(arguments)) } } j.Event = function(o, n) { this.name = n; this.obj = o; this.listeners = [] }; j.Event.prototype = { addListener : function(q, p, o) { var r = this, n; p = p || r.obj; if (!r.isListening(q, p)) { n = r.createListener(q, p, o); if (r.firing) { r.listeners = r.listeners.slice(0) } r.listeners.push(n) } }, createListener : function(r, q, s) { s = s || {}, q = q || this.obj; var n = { fn : r, scope : q, options : s }, p = r; if (s.target) { p = g(p, s, q) } if (s.delay) { p = b(p, s, r, q) } if (s.single) { p = d(p, this, r, q) } if (s.buffer) { p = c(p, s, r, q) } n.fireFn = p; return n }, findListener : function(r, q) { var t = this.listeners, o = t.length, n, p; while (o--) { n = t[o]; if (n) { p = n.scope; if (n.fn == r && (p == q || p == this.obj)) { return o } } } return -1 }, isListening : function(o, n) { return this.findListener(o, n) != -1 }, removeListener : function(s, r) { var q, n, o, t = this, p = k; if ((q = t.findListener(s, r)) != -1) { if (t.firing) { t.listeners = t.listeners.slice(0) } n = t.listeners[q].fn; if (n.task) { n.task.cancel(); delete n.task } o = n.tasks && n.tasks.length; if (o) { while (o--) { n.tasks[o].cancel() } delete n.tasks } t.listeners.splice(q, 1); p = h } return p }, clearListeners : function() { var p = this, n = p.listeners, o = n.length; while (o--) { p.removeListener(n[o].fn, n[o].scope) } }, fire : function() { var s = this, p = m(arguments), r = s.listeners, n = r.length, q = 0, o; if (n > 0) { s.firing = h; for (; q < n; q++) { o = r[q]; if (o && o.fireFn.apply(o.scope || s.obj || window, p) === k) { return (s.firing = k) } } } s.firing = k; return h } } })(); Ext .apply( Ext.util.Observable.prototype, function() { function a(k) { var j = (this.methodEvents = this.methodEvents || {})[k], d, c, g, h = this; if (!j) { this.methodEvents[k] = j = {}; j.originalFn = this[k]; j.methodName = k; j.before = []; j.after = []; var b = function(m, l, e) { if (!Ext.isEmpty(c = m.apply(l || h, e))) { if (Ext.isObject(c)) { d = !Ext.isEmpty(c.returnValue) ? c.returnValue : c; g = !!c.cancel } else { if (c === false) { g = true } else { d = c } } } }; this[k] = function() { var e = Ext.toArray(arguments); d = c = undefined; g = false; Ext.each(j.before, function(l) { b(l.fn, l.scope, e); if (g) { return d } }); if (!Ext.isEmpty(c = j.originalFn.apply(h, e))) { d = c } Ext.each(j.after, function(l) { b(l.fn, l.scope, e); if (g) { return d } }); return d } } return j } 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(h, c, b) { var g = a.call(this, h), d = false; Ext.each(g.before, function(j, k, e) { if (j.fn == c && j.scope == b) { e.splice(k, 1); d = true; return false } }); if (!d) { Ext.each(g.after, function(j, k, e) { if (j.fn == c && j.scope == b) { e.splice(k, 1); return false } }) } }, relayEvents : function(e, b) { var d = this; function c(g) { return function() { return d.fireEvent.apply(d, [ g ] .concat(Ext.toArray(arguments))) } } Ext.each(b, function(g) { d.events[g] = d.events[g] || true; e.on(g, c(g), d) }) }, enableBubble : function(b) { var c = this; if (!Ext.isEmpty(b)) { b = Ext.isArray(b) ? b : Ext.toArray(arguments); Ext.each(b, function(d) { d = d.toLowerCase(); var e = c.events[d] || true; if (Ext.isBoolean(e)) { 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(b, a) { if (b) { if (!b.fireEvent) { Ext.apply(b, new Ext.util.Observable()); Ext.util.Observable.capture(b.prototype, b.fireEvent, b) } if (Ext.isObject(a)) { b.on(a) } return b } }; Ext.EventManager = function() { var v, n, j = false, m = Ext.lib.Event, o = Ext.lib.Dom, b = document, w = window, e = "ie-deferred-loader", p = "DOMContentLoaded", g = /^(?:scope|delay|buffer|single|stopEvent|preventDefault|stopPropagation|normalized|args|delegate)$/, r = []; function l(z) { var C = false, y = 0, x = r.length, C = false, A = false, B; if (z) { if (z.getElementById || z.navigator) { for (; y < x; ++y) { B = r[y]; if (B.el === z) { C = B.id; break } } if (!C) { C = Ext.id(z); r.push({ id : C, el : z }); A = true } } else { C = Ext.id(z) } if (!Ext.elCache[C]) { Ext.Element.addToCache(new Ext.Element(z), C); if (A) { Ext.elCache[C].skipGC = true } } } return C } function k(z, A, D, y, F) { z = Ext.getDom(z); var x = l(z), E = Ext.elCache[x].events, B; B = m.on(z, A, y); E[A] = E[A] || []; E[A].push([ D, y, F, B ]); if (A == "mousewheel" && z.addEventListener) { var C = [ "DOMMouseScroll", y, false ]; z.addEventListener.apply(z, C); Ext.EventManager.addListener(w, "unload", function() { z.removeEventListener.apply(z, C) }) } if (A == "mousedown" && z == document) { Ext.EventManager.stoppedMouseDownEvent.addListener(y) } } function c() { if (!j) { Ext.isReady = j = true; if (n) { clearInterval(n) } if (Ext.isGecko || Ext.isOpera) { b.removeEventListener(p, c, false) } if (Ext.isIE) { var x = b.getElementById(e); if (x) { x.onreadystatechange = null; x.parentNode.removeChild(x) } } if (v) { v.fire(); v.listeners = [] } } } function a() { var x = "complete"; v = new Ext.util.Event(); if (Ext.isGecko || Ext.isOpera) { b.addEventListener(p, c, false) } else { if (Ext.isIE) { b.write("