/*
 * Ext JS Library 2.2
 * Copyright(c) 2006-2008, Ext JS, LLC.
 * licensing@extjs.com
 * 
 * http://extjs.com/license
 */

Ext.DomHelper = function()
{
   var L = null;
   var F = /^(?:br|frame|hr|img|input|link|meta|range|spacer|wbr|area|param|col)$/i;
   var B = /^table|tbody|tr|td$/i;
   var A = function(T)
   {
      if (typeof T == "string")
      {
         return T
      }
      var O = "";
      if (Ext.isArray(T))
      {
         for (var R = 0,P = T.length; R < P; R++)
         {
            O += A(T[R])
         }
         return O
      }
      if (!T.tag)
      {
         T.tag = "div"
      }
      O += "<" + T.tag;
      for (var N in T)
      {
         if (N == "tag" || N == "children" || N == "cn" || N == "html" || typeof T[N] == "function")
         {
            continue
         }
         if (N == "style")
         {
            var S = T["style"];
            if (typeof S == "function")
            {
               S = S.call()
            }
            if (typeof S == "string")
            {
               O += " style=\"" + S + "\""
            }
            else
            {
               if (typeof S == "object")
               {
                  O += " style=\"";
                  for (var Q in S)
                  {
                     if (typeof S[Q] != "function")
                     {
                        O += Q + ":" + S[Q] + ";"
                     }
                  }
                  O += "\""
               }
            }
         }
         else
         {
            if (N == "cls")
            {
               O += " class=\"" + T["cls"] + "\""
            }
            else
            {
               if (N == "htmlFor")
               {
                  O += " for=\"" + T["htmlFor"] + "\""
               }
               else
               {
                  O += " " + N + "=\"" + T[N] + "\""
               }
            }
         }
      }
      if (F.test(T.tag))
      {
         O += "/>"
      }
      else
      {
         O += ">";
         var U = T.children || T.cn;
         if (U)
         {
            O += A(U)
         }
         else
         {
            if (T.html)
            {
               O += T.html
            }
         }
         O += "</" + T.tag + ">"
      }
      return O
   };
   var M = function(T, O)
   {
      var S;
      if (Ext.isArray(T))
      {
         S = document.createDocumentFragment();
         for (var R = 0,P = T.length; R < P; R++)
         {
            M(T[R], S)
         }
      }
      else
      {
         if (typeof T == "string")
         {
            S = document.createTextNode(T)
         }
         else
         {
            S = document.createElement(T.tag || "div");
            var Q = !!S.setAttribute;
            for (var N in T)
            {
               if (N == "tag" || N == "children" || N == "cn" || N == "html" || N == "style" || typeof T[N] == "function")
               {
                  continue
               }
               if (N == "cls")
               {
                  S.className = T["cls"]
               }
               else
               {
                  if (Q)
                  {
                     S.setAttribute(N, T[N])
                  }
                  else
                  {
                     S[N] = T[N]
                  }
               }
            }
            Ext.DomHelper.applyStyles(S, T.style);
            var U = T.children || T.cn;
            if (U)
            {
               M(U, S)
            }
            else
            {
               if (T.html)
               {
                  S.innerHTML = T.html
               }
            }
         }
      }
      if (O)
      {
         O.appendChild(S)
      }
      return S
   };
   var I = function(S, Q, P, R)
   {
      L.innerHTML = [Q,P,R].join("");
      var N = -1,O = L;
      while (++N < S)
      {
         O = O.firstChild
      }
      return O
   };
   var J = "<table>",E = "</table>",C = J + "<tbody>",K = "</tbody>" + E,H = C + "<tr>",D = "</tr>" + K;
   var G = function(N, O, Q, P)
   {
      if (!L)
      {
         L = document.createElement("div")
      }
      var R;
      var S = null;
      if (N == "td")
      {
         if (O == "afterbegin" || O == "beforeend")
         {
            return
         }
         if (O == "beforebegin")
         {
            S = Q;
            Q = Q.parentNode
         }
         else
         {
            S = Q.nextSibling;
            Q = Q.parentNode
         }
         R = I(4, H, P, D)
      }
      else
      {
         if (N == "tr")
         {
            if (O == "beforebegin")
            {
               S = Q;
               Q = Q.parentNode;
               R = I(3, C, P, K)
            }
            else
            {
               if (O == "afterend")
               {
                  S = Q.nextSibling;
                  Q = Q.parentNode;
                  R = I(3, C, P, K)
               }
               else
               {
                  if (O == "afterbegin")
                  {
                     S = Q.firstChild
                  }
                  R = I(4, H, P, D)
               }
            }
         }
         else
         {
            if (N == "tbody")
            {
               if (O == "beforebegin")
               {
                  S = Q;
                  Q = Q.parentNode;
                  R = I(2, J, P, E)
               }
               else
               {
                  if (O == "afterend")
                  {
                     S = Q.nextSibling;
                     Q = Q.parentNode;
                     R = I(2, J, P, E)
                  }
                  else
                  {
                     if (O == "afterbegin")
                     {
                        S = Q.firstChild
                     }
                     R = I(3, C, P, K)
                  }
               }
            }
            else
            {
               if (O == "beforebegin" || O == "afterend")
               {
                  return
               }
               if (O == "afterbegin")
               {
                  S = Q.firstChild
               }
               R = I(2, J, P, E)
            }
         }
      }
      Q.insertBefore(R, S);
      return R
   };
   return{useDom:false,markup:function(N)
   {
      return A(N)
   },applyStyles:function(P, Q)
   {
      if (Q)
      {
         P = Ext.fly(P);
         if (typeof Q == "string")
         {
            var O = /\s?([a-z\-]*)\:\s?([^;]*);?/gi;
            var R;
            while ((R = O.exec(Q)) != null)
            {
               P.setStyle(R[1], R[2])
            }
         }
         else
         {
            if (typeof Q == "object")
            {
               for (var N in Q)
               {
                  P.setStyle(N, Q[N])
               }
            }
            else
            {
               if (typeof Q == "function")
               {
                  Ext.DomHelper.applyStyles(P, Q.call())
               }
            }
         }
      }
   },insertHtml:function(P, R, Q)
   {
      P = P.toLowerCase();
      if (R.insertAdjacentHTML)
      {
         if (B.test(R.tagName))
         {
            var O;
            if (O = G(R.tagName.toLowerCase(), P, R, Q))
            {
               return O
            }
         }
         switch (P)
            {case"beforebegin":R.insertAdjacentHTML("BeforeBegin", Q);return R.previousSibling;case"afterbegin":R.insertAdjacentHTML("AfterBegin", Q);return R.firstChild;case"beforeend":R.insertAdjacentHTML("BeforeEnd", Q);return R.lastChild;case"afterend":R.insertAdjacentHTML("AfterEnd", Q);return R.nextSibling}
         throw"Illegal insertion point -> \"" + P + "\""
      }
      var N = R.ownerDocument.createRange();
      var S;
      switch (P)
         {case"beforebegin":N.setStartBefore(R);S = N.createContextualFragment(Q);R.parentNode.insertBefore(S, R);return R.previousSibling;case"afterbegin":if (R.firstChild)
      {
         N.setStartBefore(R.firstChild);
         S = N.createContextualFragment(Q);
         R.insertBefore(S, R.firstChild);
         return R.firstChild
      }
      else
      {
         R.innerHTML = Q;
         return R.firstChild
      }case"beforeend":if (R.lastChild)
      {
         N.setStartAfter(R.lastChild);
         S = N.createContextualFragment(Q);
         R.appendChild(S);
         return R.lastChild
      }
      else
      {
         R.innerHTML = Q;
         return R.lastChild
      }case"afterend":N.setStartAfter(R);S = N.createContextualFragment(Q);R.parentNode.insertBefore(S, R.nextSibling);return R.nextSibling}
      throw"Illegal insertion point -> \"" + P + "\""
   },insertBefore:function(N, P, O)
   {
      return this.doInsert(N, P, O, "beforeBegin")
   },insertAfter:function(N, P, O)
   {
      return this.doInsert(N, P, O, "afterEnd", "nextSibling")
   },insertFirst:function(N, P, O)
   {
      return this.doInsert(N, P, O, "afterBegin", "firstChild")
   },doInsert:function(Q, S, R, T, P)
   {
      Q = Ext.getDom(Q);
      var O;
      if (this.useDom)
      {
         O = M(S, null);
         (P === "firstChild" ? Q : Q.parentNode).insertBefore(O, P ? Q[P] : Q)
      }
      else
      {
         var N = A(S);
         O = this.insertHtml(T, Q, N)
      }
      return R ? Ext.get(O, true) : O
   },append:function(P, R, Q)
   {
      P = Ext.getDom(P);
      var O;
      if (this.useDom)
      {
         O = M(R, null);
         P.appendChild(O)
      }
      else
      {
         var N = A(R);
         O = this.insertHtml("beforeEnd", P, N)
      }
      return Q ? Ext.get(O, true) : O
   },overwrite:function(N, P, O)
   {
      N = Ext.getDom(N);
      N.innerHTML = A(P);
      return O ? Ext.get(N.firstChild, true) : N.firstChild
   },createTemplate:function(O)
   {
      var N = A(O);
      return new Ext.Template(N)
   }}
}();
Ext.Template = function(E)
{
   var B = arguments;
   if (Ext.isArray(E))
   {
      E = E.join("")
   }
   else
   {
      if (B.length > 1)
      {
         var C = [];
         for (var D = 0,A = B.length; D < A; D++)
         {
            if (typeof B[D] == "object")
            {
               Ext.apply(this, B[D])
            }
            else
            {
               C[C.length] = B[D]
            }
         }
         E = C.join("")
      }
   }
   this.html = E;
   if (this.compiled)
   {
      this.compile()
   }
};
Ext.Template.prototype = {applyTemplate:function(B)
{
   if (this.compiled)
   {
      return this.compiled(B)
   }
   var A = this.disableFormats !== true;
   var E = Ext.util.Format,C = this;
   var D = function(G, I, L, H)
   {
      if (L && A)
      {
         if (L.substr(0, 5) == "this.")
         {
            return C.call(L.substr(5), B[I], B)
         }
         else
         {
            if (H)
            {
               var K = /^\s*['"](.*)["']\s*$/;
               H = H.split(",");
               for (var J = 0,F = H.length; J < F; J++)
               {
                  H[J] = H[J].replace(K, "$1")
               }
               H = [B[I]].concat(H)
            }
            else
            {
               H = [B[I]]
            }
            return E[L].apply(E, H)
         }
      }
      else
      {
         return B[I] !== undefined ? B[I] : ""
      }
   };
   return this.html.replace(this.re, D)
},set:function(A, B)
{
   this.html = A;
   this.compiled = null;
   if (B)
   {
      this.compile()
   }
   return this
},disableFormats:false,re:/\{([\w-]+)(?:\:([\w\.]*)(?:\((.*?)?\))?)?\}/g,compile:function()
{
   var fm = Ext.util.Format;
   var useF = this.disableFormats !== true;
   var sep = Ext.isGecko ? "+" : ",";
   var fn = function(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 + "'"
   };
   var body;
   if (Ext.isGecko)
   {
      body = "this.compiled = function(values){ return '" + this.html.replace(/\\/g, "\\\\").replace(/(\r\n|\n)/g, "\\n").replace(/'/g, "\\'").replace(this.re, fn) + "';};"
   }
   else
   {
      body = ["this.compiled = function(values){ return ['"];
      body.push(this.html.replace(/\\/g, "\\\\").replace(/(\r\n|\n)/g, "\\n").replace(/'/g, "\\'").replace(this.re, fn));
      body.push("'].join('');};");
      body = body.join("")
   }
   eval(body);
   return this
},call:function(C, B, A)
{
   return this[C](B, A)
},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.DomHelper.Template = Ext.Template;
Ext.Template.from = function(B, A)
{
   B = Ext.getDom(B);
   return new Ext.Template(B.value || B.innerHTML, A || "")
};
Ext.DomQuery = function()
{
   var cache = {},simpleCache = {},valueCache = {};
   var nonSpace = /\S/;
   var trimRe = /^\s+|\s+$/g;
   var tplRe = /\{(\d+)\}/g;
   var modeRe = /^(\s?[\/>+~]\s?|\s|$)/;
   var tagTokenRe = /^(#)?([\w-\*]+)/;
   var nthRe = /(\d*)n\+?(\d*)/,nthRe2 = /\D/;
   function child(p, index)
   {
      var i = 0;
      var 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;
      while (n)
      {
         var 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; 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 == "{";
      var f = Ext.DomQuery.operators[op];
      for (var i = 0,ci; ci = cs[i]; i++)
      {
         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)
   }
   var isIE = window.ActiveXObject ? true : false;
   eval("var batch = 30803;");
   var key = 30803;
   function nodupIEXml(cs)
   {
      var d = ++key;
      cs[0].setAttribute("_nodup", d);
      var r = [cs[0]];
      for (var i = 1,len = cs.length; i < len; i++)
      {
         var c = cs[i];
         if (!c.getAttribute("_nodup") != d)
         {
            c.setAttribute("_nodup", d);
            r[r.length] = c
         }
      }
      for (var i = 0,len = cs.length; i < len; i++)
      {
         cs[i].removeAttribute("_nodup")
      }
      return r
   }
   function nodup(cs)
   {
      if (!cs)
      {
         return[]
      }
      var len = cs.length,c,i,r = cs,cj,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;
      for (var i = 0,len = c1.length; i < len; i++)
      {
         c1[i].setAttribute("_qdiff", d)
      }
      var r = [];
      for (var i = 0,len = c2.length; i < len; i++)
      {
         if (c2[i].getAttribute("_qdiff") != d)
         {
            r[r.length] = c2[i]
         }
      }
      for (var i = 0,len = c1.length; i < len; i++)
      {
         c1[i].removeAttribute("_qdiff")
      }
      return r
   }
   function quickDiff(c1, c2)
   {
      var len1 = c1.length;
      if (!len1)
      {
         return c2
      }
      if (isIE && c1[0].selectSingleNode)
      {
         return quickDiffIEXml(c1, c2)
      }
      var d = ++key;
      for (var i = 0; i < len1; i++)
      {
         c1[i]._qdiff = d
      }
      var r = [];
      for (var i = 0,len = c2.length; i < len; i++)
      {
         if (c2[i]._qdiff != d)
         {
            r[r.length] = c2[i]
         }
      }
      return r
   }
   function quickId(ns, 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"];
      var q = path,mode,lq;
      var tk = Ext.DomQuery.matchers;
      var tklen = tk.length;
      var mm;
      var 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(",");
      var 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);
      n = n[0] ? n[0] : n;
      var 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);
      var 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;
      var m = nthRe.exec(a == "even" && "2n" || a == "odd" && "2n+1" || !nthRe2.test(a) && "n+" + a || a);
      var 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("|");
      var 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;
      var 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;
      var 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;
      var 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.Observable = function()
{
   if (this.listeners)
   {
      this.on(this.listeners);
      delete this.listeners
   }
};
Ext.util.Observable.prototype = {fireEvent:function()
{
   if (this.eventsSuspended !== true)
   {
      var A = this.events[arguments[0].toLowerCase()];
      if (typeof A == "object")
      {
         return A.fire.apply(A, Array.prototype.slice.call(arguments, 1))
      }
   }
   return true
},filterOptRe:/^(?:scope|delay|buffer|single)$/,addListener:function(A, C, B, F)
{
   if (typeof A == "object")
   {
      F = A;
      for (var E in F)
      {
         if (this.filterOptRe.test(E))
         {
            continue
         }
         if (typeof F[E] == "function")
         {
            this.addListener(E, F[E], F.scope, F)
         }
         else
         {
            this.addListener(E, F[E].fn, F[E].scope, F[E])
         }
      }
      return
   }
   F = (!F || typeof F == "boolean") ? {} : F;
   A = A.toLowerCase();
   var D = this.events[A] || true;
   if (typeof D == "boolean")
   {
      D = new Ext.util.Event(this, A);
      this.events[A] = D
   }
   D.addListener(C, B, F)
},removeListener:function(A, C, B)
{
   var D = this.events[A.toLowerCase()];
   if (typeof D == "object")
   {
      D.removeListener(C, B)
   }
},purgeListeners:function()
{
   for (var A in this.events)
   {
      if (typeof this.events[A] == "object")
      {
         this.events[A].clearListeners()
      }
   }
},relayEvents:function(F, D)
{
   var E = function(G)
   {
      return function()
      {
         return this.fireEvent.apply(this, Ext.combine(G, Array.prototype.slice.call(arguments, 0)))
      }
   };
   for (var C = 0,A = D.length; C < A; C++)
   {
      var B = D[C];
      if (!this.events[B])
      {
         this.events[B] = true
      }
      F.on(B, E(B), this)
   }
},addEvents:function(D)
{
   if (!this.events)
   {
      this.events = {}
   }
   if (typeof D == "string")
   {
      for (var C = 0,A = arguments,B; B = A[C]; C++)
      {
         if (!this.events[A[C]])
         {
            this.events[A[C]] = true
         }
      }
   }
   else
   {
      Ext.applyIf(this.events, D)
   }
},hasListener:function(A)
{
   var B = this.events[A];
   return typeof B == "object" && B.listeners.length > 0
},suspendEvents:function()
{
   this.eventsSuspended = true
},resumeEvents:function()
{
   this.eventsSuspended = false
},getMethodEvent:function(G)
{
   if (!this.methodEvents)
   {
      this.methodEvents = {}
   }
   var F = this.methodEvents[G];
   if (!F)
   {
      F = {};
      this.methodEvents[G] = F;
      F.originalFn = this[G];
      F.methodName = G;
      F.before = [];
      F.after = [];
      var C,B,D;
      var E = this;
      var A = function(J, I, H)
      {
         if ((B = J.apply(I || E, H)) !== undefined)
         {
            if (typeof B === "object")
            {
               if (B.returnValue !== undefined)
               {
                  C = B.returnValue
               }
               else
               {
                  C = B
               }
               if (B.cancel === true)
               {
                  D = true
               }
            }
            else
            {
               if (B === false)
               {
                  D = true
               }
               else
               {
                  C = B
               }
            }
         }
      };
      this[G] = function()
      {
         C = B = undefined;
         D = false;
         var I = Array.prototype.slice.call(arguments, 0);
         for (var J = 0,H = F.before.length; J < H; J++)
         {
            A(F.before[J].fn, F.before[J].scope, I);
            if (D)
            {
               return C
            }
         }
         if ((B = F.originalFn.apply(E, I)) !== undefined)
         {
            C = B
         }
         for (var J = 0,H = F.after.length; J < H; J++)
         {
            A(F.after[J].fn, F.after[J].scope, I);
            if (D)
            {
               return C
            }
         }
         return C
      }
   }
   return F
},beforeMethod:function(D, B, A)
{
   var C = this.getMethodEvent(D);
   C.before.push({fn:B,scope:A})
},afterMethod:function(D, B, A)
{
   var C = this.getMethodEvent(D);
   C.after.push({fn:B,scope:A})
},removeMethodListener:function(F, D, C)
{
   var E = this.getMethodEvent(F);
   for (var B = 0,A = E.before.length; B < A; B++)
   {
      if (E.before[B].fn == D && E.before[B].scope == C)
      {
         E.before.splice(B, 1);
         return
      }
   }
   for (var B = 0,A = E.after.length; B < A; B++)
   {
      if (E.after[B].fn == D && E.after[B].scope == C)
      {
         E.after.splice(B, 1);
         return
      }
   }
}};
Ext.util.Observable.prototype.on = Ext.util.Observable.prototype.addListener;
Ext.util.Observable.prototype.un = Ext.util.Observable.prototype.removeListener;
Ext.util.Observable.capture = function(C, B, A)
{
   C.fireEvent = C.fireEvent.createInterceptor(B, A)
};
Ext.util.Observable.releaseCapture = function(A)
{
   A.fireEvent = Ext.util.Observable.prototype.fireEvent
};
(function()
{
   var B = function(F, G, E)
   {
      var D = new Ext.util.DelayedTask();
      return function()
      {
         D.delay(G.buffer, F, E, Array.prototype.slice.call(arguments, 0))
      }
   };
   var C = function(F, G, E, D)
   {
      return function()
      {
         G.removeListener(E, D);
         return F.apply(D, arguments)
      }
   };
   var A = function(E, F, D)
   {
      return function()
      {
         var G = Array.prototype.slice.call(arguments, 0);
         setTimeout(function()
         {
            E.apply(D, G)
         }, F.delay || 10)
      }
   };
   Ext.util.Event = function(E, D)
   {
      this.name = D;
      this.obj = E;
      this.listeners = []
   };
   Ext.util.Event.prototype = {addListener:function(G, F, E)
   {
      F = F || this.obj;
      if (!this.isListening(G, F))
      {
         var D = this.createListener(G, F, E);
         if (!this.firing)
         {
            this.listeners.push(D)
         }
         else
         {
            this.listeners = this.listeners.slice(0);
            this.listeners.push(D)
         }
      }
   },createListener:function(G, F, H)
   {
      H = H || {};
      F = F || this.obj;
      var D = {fn:G,scope:F,options:H};
      var E = G;
      if (H.delay)
      {
         E = A(E, H, F)
      }
      if (H.single)
      {
         E = C(E, this, G, F)
      }
      if (H.buffer)
      {
         E = B(E, H, F)
      }
      D.fireFn = E;
      return D
   },findListener:function(I, H)
   {
      H = H || this.obj;
      var F = this.listeners;
      for (var G = 0,D = F.length; G < D; G++)
      {
         var E = F[G];
         if (E.fn == I && E.scope == H)
         {
            return G
         }
      }
      return -1
   },isListening:function(E, D)
   {
      return this.findListener(E, D) != -1
   },removeListener:function(F, E)
   {
      var D;
      if ((D = this.findListener(F, E)) != -1)
      {
         if (!this.firing)
         {
            this.listeners.splice(D, 1)
         }
         else
         {
            this.listeners = this.listeners.slice(0);
            this.listeners.splice(D, 1)
         }
         return true
      }
      return false
   },clearListeners:function()
   {
      this.listeners = []
   },fire:function()
   {
      var F = this.listeners,I,D = F.length;
      if (D > 0)
      {
         this.firing = true;
         var G = Array.prototype.slice.call(arguments, 0);
         for (var H = 0; H < D; H++)
         {
            var E = F[H];
            if (E.fireFn.apply(E.scope || this.obj || window, arguments) === false)
            {
               this.firing = false;
               return false
            }
         }
         this.firing = false
      }
      return true
   }}
})();
Ext.EventManager = function()
{
   var X,Q,M = false;
   var N,W,H,S;
   var P = Ext.lib.Event;
   var R = Ext.lib.Dom;
   var A = "Ex" + "t";
   var J = {};
   var O = function(b, E, a, Z, Y)
   {
      var d = Ext.id(b);
      if (!J[d])
      {
         J[d] = {}
      }
      var c = J[d];
      if (!c[E])
      {
         c[E] = []
      }
      var D = c[E];
      D.push({id:d,ename:E,fn:a,wrap:Z,scope:Y});
      P.on(b, E, Z);
      if (E == "mousewheel" && b.addEventListener)
      {
         b.addEventListener("DOMMouseScroll", Z, false);
         P.on(window, "unload", function()
         {
            b.removeEventListener("DOMMouseScroll", Z, false)
         })
      }
      if (E == "mousedown" && b == document)
      {
         Ext.EventManager.stoppedMouseDownEvent.addListener(Z)
      }
   };
   var I = function(Y, a, e, g)
   {
      Y = Ext.getDom(Y);
      var D = Ext.id(Y),f = J[D],E;
      if (f)
      {
         var c = f[a],Z;
         if (c)
         {
            for (var b = 0,d = c.length; b < d; b++)
            {
               Z = c[b];
               if (Z.fn == e && (!g || Z.scope == g))
               {
                  E = Z.wrap;
                  P.un(Y, a, E);
                  c.splice(b, 1);
                  break
               }
            }
         }
      }
      if (a == "mousewheel" && Y.addEventListener && E)
      {
         Y.removeEventListener("DOMMouseScroll", E, false)
      }
      if (a == "mousedown" && Y == document && E)
      {
         Ext.EventManager.stoppedMouseDownEvent.removeListener(E)
      }
   };
   var F = function(a)
   {
      a = Ext.getDom(a);
      var c = Ext.id(a),b = J[c],E;
      if (b)
      {
         for (var Z in b)
         {
            if (b.hasOwnProperty(Z))
            {
               E = b[Z];
               for (var Y = 0,D = E.length; Y < D; Y++)
               {
                  P.un(a, Z, E[Y].wrap);
                  E[Y] = null
               }
            }
            b[Z] = null
         }
         delete J[c]
      }
   };
   var C = function()
   {
      if (!M)
      {
         M = Ext.isReady = true;
         if (Ext.isGecko || Ext.isOpera)
         {
            document.removeEventListener("DOMContentLoaded", C, false)
         }
      }
      if (Q)
      {
         clearInterval(Q);
         Q = null
      }
      if (X)
      {
         X.fire();
         X.clearListeners()
      }
   };
   var B = function()
   {
      X = new Ext.util.Event();
      if (Ext.isReady)
      {
         return
      }
      P.on(window, "load", C);
      if (Ext.isGecko || Ext.isOpera)
      {
         document.addEventListener("DOMContentLoaded", C, false)
      }
      else
      {
         if (Ext.isIE)
         {
            Q = setInterval(function()
            {
               try
               {
                  Ext.isReady || (document.documentElement.doScroll("left"))
               }
               catch(D)
               {
                  return
               }
               C()
            }, 5);
            document.onreadystatechange = function()
            {
               if (document.readyState == "complete")
               {
                  document.onreadystatechange = null;
                  C()
               }
            }
         }
         else
         {
            if (Ext.isSafari)
            {
               Q = setInterval(function()
               {
                  var D = document.readyState;
                  if (D == "complete")
                  {
                     C()
                  }
               }, 10)
            }
         }
      }
   };
   var V = function(E, Y)
   {
      var D = new Ext.util.DelayedTask(E);
      return function(Z)
      {
         Z = new Ext.EventObjectImpl(Z);
         D.delay(Y.buffer, E, null, [Z])
      }
   };
   var T = function(a, Z, D, Y, E)
   {
      return function(b)
      {
         Ext.EventManager.removeListener(Z, D, Y, E);
         a(b)
      }
   };
   var G = function(D, E)
   {
      return function(Y)
      {
         Y = new Ext.EventObjectImpl(Y);
         setTimeout(function()
         {
            D(Y)
         }, E.delay || 10)
      }
   };
   var L = function(Y, E, D, c, b)
   {
      var d = (!D || typeof D == "boolean") ? {} : D;
      c = c || d.fn;
      b = b || d.scope;
      var a = Ext.getDom(Y);
      if (!a)
      {
         throw"Error listening for \"" + E + "\". Element \"" + Y + "\" doesn't exist."
      }
      var Z = function(g)
      {
         if (!window[A])
         {
            return
         }
         g = Ext.EventObject.setEvent(g);
         var f;
         if (d.delegate)
         {
            f = g.getTarget(d.delegate, a);
            if (!f)
            {
               return
            }
         }
         else
         {
            f = g.target
         }
         if (d.stopEvent === true)
         {
            g.stopEvent()
         }
         if (d.preventDefault === true)
         {
            g.preventDefault()
         }
         if (d.stopPropagation === true)
         {
            g.stopPropagation()
         }
         if (d.normalized === false)
         {
            g = g.browserEvent
         }
         c.call(b || a, g, f, d)
      };
      if (d.delay)
      {
         Z = G(Z, d)
      }
      if (d.single)
      {
         Z = T(Z, a, E, c, b)
      }
      if (d.buffer)
      {
         Z = V(Z, d)
      }
      O(a, E, c, Z, b);
      return Z
   };
   var K = /^(?:scope|delay|buffer|single|stopEvent|preventDefault|stopPropagation|normalized|args|delegate)$/;
   var U = {addListener:function(Y, D, a, Z, E)
   {
      if (typeof D == "object")
      {
         var c = D;
         for (var b in c)
         {
            if (K.test(b))
            {
               continue
            }
            if (typeof c[b] == "function")
            {
               L(Y, b, c, c[b], c.scope)
            }
            else
            {
               L(Y, b, c[b])
            }
         }
         return
      }
      return L(Y, D, E, a, Z)
   },removeListener:function(E, D, Z, Y)
   {
      return I(E, D, Z, Y)
   },removeAll:function(D)
   {
      return F(D)
   },onDocumentReady:function(Y, E, D)
   {
      if (!X)
      {
         B()
      }
      if (M || Ext.isReady)
      {
         D || (D = {});
         Y.defer(D.delay || 0, E)
      }
      else
      {
         X.addListener(Y, E, D)
      }
   },onWindowResize:function(Y, E, D)
   {
      if (!N)
      {
         N = new Ext.util.Event();
         W = new Ext.util.DelayedTask(function()
         {
            N.fire(R.getViewWidth(), R.getViewHeight())
         });
         P.on(window, "resize", this.fireWindowResize, this)
      }
      N.addListener(Y, E, D)
   },fireWindowResize:function()
   {
      if (N)
      {
         if ((Ext.isIE || Ext.isAir) && W)
         {
            W.delay(50)
         }
         else
         {
            N.fire(R.getViewWidth(), R.getViewHeight())
         }
      }
   },onTextResize:function(Z, Y, D)
   {
      if (!H)
      {
         H = new Ext.util.Event();
         var E = new Ext.Element(document.createElement("div"));
         E.dom.className = "x-text-resize";
         E.dom.innerHTML = "X";
         E.appendTo(document.body);
         S = E.dom.offsetHeight;
         setInterval(function()
         {
            if (E.dom.offsetHeight != S)
            {
               H.fire(S, S = E.dom.offsetHeight)
            }
         }, this.textResizeInterval)
      }
      H.addListener(Z, Y, D)
   },removeResizeListener:function(E, D)
   {
      if (N)
      {
         N.removeListener(E, D)
      }
   },fireResize:function()
   {
      if (N)
      {
         N.fire(R.getViewWidth(), R.getViewHeight())
      }
   },ieDeferSrc:false,textResizeInterval:50};
   U.on = U.addListener;
   U.un = U.removeListener;
   U.stoppedMouseDownEvent = new Ext.util.Event();
   return U
}();
Ext.onReady = Ext.EventManager.onDocumentReady;
(function()
{
   var A = function()
   {
      var C = document.body || document.getElementsByTagName("body")[0];
      if (!C)
      {
         return false
      }
      var B = [" ",Ext.isIE ? "ext-ie " + (Ext.isIE6 ? "ext-ie6" : "ext-ie7") :
                   Ext.isGecko ? "ext-gecko " + (Ext.isGecko2 ? "ext-gecko2" : "ext-gecko3") :
                   Ext.isOpera ? "ext-opera" : Ext.isSafari ? "ext-safari" : ""];
      if (Ext.isMac)
      {
         B.push("ext-mac")
      }
      if (Ext.isLinux)
      {
         B.push("ext-linux")
      }
      if (Ext.isBorderBox)
      {
         B.push("ext-border-box")
      }
      if (Ext.isStrict)
      {
         var D = C.parentNode;
         if (D)
         {
            D.className += " ext-strict"
         }
      }
      C.className += B.join(" ");
      return true
   };
   if (!A())
   {
      Ext.onReady(A)
   }
})();
Ext.EventObject = function()
{
   var B = Ext.lib.Event;
   var A = {3:13,63234:37,63235:39,63232:38,63233:40,63276:33,63277:34,63272:46,63273:36,63275:35};
   var C = Ext.isIE ? {1:0,4:1,2:2} : (Ext.isSafari ? {1:0,2:1,3:2} : {0:0,1:1,2:2});
   Ext.EventObjectImpl = function(D)
   {
      if (D)
      {
         this.setEvent(D.browserEvent || D)
      }
   };
   Ext.EventObjectImpl.prototype = {browserEvent:null,button:-1,shiftKey:false,ctrlKey:false,altKey:false,BACKSPACE:8,TAB:9,NUM_CENTER:12,ENTER:13,RETURN:13,SHIFT:16,CTRL:17,CONTROL:17,ALT:18,PAUSE:19,CAPS_LOCK:20,ESC:27,SPACE:32,PAGE_UP:33,PAGEUP:33,PAGE_DOWN:34,PAGEDOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,PRINT_SCREEN:44,INSERT:45,DELETE:46,ZERO:48,ONE:49,TWO:50,THREE:51,FOUR:52,FIVE:53,SIX:54,SEVEN:55,EIGHT:56,NINE:57,A:65,B:66,C:67,D:68,E:69,F:70,G:71,H:72,I:73,J:74,K:75,L:76,M:77,N:78,O:79,P:80,Q:81,R:82,S:83,T:84,U:85,V:86,W:87,X:88,Y:89,Z:90,CONTEXT_MENU:93,NUM_ZERO:96,NUM_ONE:97,NUM_TWO:98,NUM_THREE:99,NUM_FOUR:100,NUM_FIVE:101,NUM_SIX:102,NUM_SEVEN:103,NUM_EIGHT:104,NUM_NINE:105,NUM_MULTIPLY:106,NUM_PLUS:107,NUM_MINUS:109,NUM_PERIOD:110,NUM_DIVISION:111,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,setEvent:function(D)
   {
      if (D == this || (D && D.browserEvent))
      {
         return D
      }
      this.browserEvent = D;
      if (D)
      {
         this.button = D.button ? C[D.button] : (D.which ? D.which - 1 : -1);
         if (D.type == "click" && this.button == -1)
         {
            this.button = 0
         }
         this.type = D.type;
         this.shiftKey = D.shiftKey;
         this.ctrlKey = D.ctrlKey || D.metaKey;
         this.altKey = D.altKey;
         this.keyCode = D.keyCode;
         this.charCode = D.charCode;
         this.target = B.getTarget(D);
         this.xy = B.getXY(D)
      }
      else
      {
         this.button = -1;
         this.shiftKey = false;
         this.ctrlKey = false;
         this.altKey = false;
         this.keyCode = 0;
         this.charCode = 0;
         this.target = null;
         this.xy = [0,0]
      }
      return this
   },stopEvent:function()
   {
      if (this.browserEvent)
      {
         if (this.browserEvent.type == "mousedown")
         {
            Ext.EventManager.stoppedMouseDownEvent.fire(this)
         }
         B.stopEvent(this.browserEvent)
      }
   },preventDefault:function()
   {
      if (this.browserEvent)
      {
         B.preventDefault(this.browserEvent)
      }
   },isNavKeyPress:function()
   {
      var D = this.keyCode;
      D = Ext.isSafari ? (A[D] || D) : D;
      return(D >= 33 && D <= 40) || D == this.RETURN || D == this.TAB || D == this.ESC
   },isSpecialKey:function()
   {
      var D = this.keyCode;
      return(this.type == "keypress" && this.ctrlKey) || D == 9 || D == 13 || D == 40 || D == 27 || (D == 16) || (D == 17) || (D >= 18 && D <= 20) || (D >= 33 && D <= 35) || (D >= 36 && D <= 39) || (D >= 44 && D <= 45)
   },stopPropagation:function()
   {
      if (this.browserEvent)
      {
         if (this.browserEvent.type == "mousedown")
         {
            Ext.EventManager.stoppedMouseDownEvent.fire(this)
         }
         B.stopPropagation(this.browserEvent)
      }
   },getCharCode:function()
   {
      return this.charCode || this.keyCode
   },getKey:function()
   {
      var D = this.keyCode || this.charCode;
      return Ext.isSafari ? (A[D] || D) : D
   },getPageX:function()
   {
      return this.xy[0]
   },getPageY:function()
   {
      return this.xy[1]
   },getTime:function()
   {
      if (this.browserEvent)
      {
         return B.getTime(this.browserEvent)
      }
      return null
   },getXY:function()
   {
      return this.xy
   },getTarget:function(E, F, D)
   {
      return E ? Ext.fly(this.target).findParent(E, F, D) : (D ? Ext.get(this.target) : this.target)
   },getRelatedTarget:function()
   {
      if (this.browserEvent)
      {
         return B.getRelatedTarget(this.browserEvent)
      }
      return null
   },getWheelDelta:function()
   {
      var D = this.browserEvent;
      var E = 0;
      if (D.wheelDelta)
      {
         E = D.wheelDelta / 120
      }
      else
      {
         if (D.detail)
         {
            E = -D.detail / 3
         }
      }
      return E
   },hasModifier:function()
   {
      return((this.ctrlKey || this.altKey) || this.shiftKey) ? true : false
   },within:function(E, F)
   {
      var D = this[F ? "getRelatedTarget" : "getTarget"]();
      return D && Ext.fly(E).contains(D)
   },getPoint:function()
   {
      return new Ext.lib.Point(this.xy[0], this.xy[1])
   }};
   return new Ext.EventObjectImpl()
}();
(function()
{
   var D = Ext.lib.Dom;
   var E = Ext.lib.Event;
   var A = Ext.lib.Anim;
   var propCache = {};
   var camelRe = /(-[a-z])/gi;
   var camelFn = function(m, a)
   {
      return a.charAt(1).toUpperCase()
   };
   var view = document.defaultView;
   Ext.Element = function(element, forceNew)
   {
      var dom = typeof element == "string" ? document.getElementById(element) : element;
      if (!dom)
      {
         return null
      }
      var id = dom.id;
      if (forceNew !== true && id && Ext.Element.cache[id])
      {
         return Ext.Element.cache[id]
      }
      this.dom = dom;
      this.id = id || Ext.id(dom)
   };
   var El = Ext.Element;
   El.prototype = {originalDisplay:"",visibilityMode:1,defaultUnit:"px",setVisibilityMode:function(visMode)
   {
      this.visibilityMode = visMode;
      return this
   },enableDisplayMode:function(display)
   {
      this.setVisibilityMode(El.DISPLAY);
      if (typeof display != "undefined")
      {
         this.originalDisplay = display
      }
      return this
   },findParent:function(simpleSelector, maxDepth, returnEl)
   {
      var p = this.dom,b = document.body,depth = 0,dq = Ext.DomQuery,stopEl;
      maxDepth = maxDepth || 50;
      if (typeof maxDepth != "number")
      {
         stopEl = Ext.getDom(maxDepth);
         maxDepth = 10
      }
      while (p && p.nodeType == 1 && depth < maxDepth && p != b && p != stopEl)
      {
         if (dq.is(p, simpleSelector))
         {
            return returnEl ? Ext.get(p) : p
         }
         depth++;
         p = p.parentNode
      }
      return null
   },findParentNode:function(simpleSelector, maxDepth, returnEl)
   {
      var p = Ext.fly(this.dom.parentNode, "_internal");
      return p ? p.findParent(simpleSelector, maxDepth, returnEl) : null
   },up:function(simpleSelector, maxDepth)
   {
      return this.findParentNode(simpleSelector, maxDepth, true)
   },is:function(simpleSelector)
   {
      return Ext.DomQuery.is(this.dom, simpleSelector)
   },animate:function(args, duration, onComplete, easing, animType)
   {
      this.anim(args, {duration:duration,callback:onComplete,easing:easing}, animType);
      return this
   },anim:function(args, opt, animType, defaultDur, defaultEase, cb)
   {
      animType = animType || "run";
      opt = opt || {};
      var anim = Ext.lib.Anim[animType](this.dom, args, (opt.duration || defaultDur) || 0.35, (opt.easing || defaultEase) || "easeOut", function()
      {
         Ext.callback(cb, this);
         Ext.callback(opt.callback, opt.scope || this, [this,opt])
      }, this);
      opt.anim = anim;
      return anim
   },preanim:function(a, i)
   {
      return !a[i] ? false : (typeof a[i] == "object" ? a[i] : {duration:a[i + 1],callback:a[i + 2],easing:a[i + 3]})
   },clean:function(forceReclean)
   {
      if (this.isCleaned && forceReclean !== true)
      {
         return this
      }
      var ns = /\S/;
      var d = this.dom,n = d.firstChild,ni = -1;
      while (n)
      {
         var nx = n.nextSibling;
         if (n.nodeType == 3 && !ns.test(n.nodeValue))
         {
            d.removeChild(n)
         }
         else
         {
            n.nodeIndex = ++ni
         }
         n = nx
      }
      this.isCleaned = true;
      return this
   },scrollIntoView:function(container, hscroll)
   {
      var c = Ext.getDom(container) || Ext.getBody().dom;
      var el = this.dom;
      var o = this.getOffsetsTo(c),l = o[0] + c.scrollLeft,t = o[1] + c.scrollTop,b = t + el.offsetHeight,r = l + el.offsetWidth;
      var ch = c.clientHeight;
      var ct = parseInt(c.scrollTop, 10);
      var cl = parseInt(c.scrollLeft, 10);
      var cb = ct + ch;
      var cr = cl + c.clientWidth;
      if (el.offsetHeight > ch || t < ct)
      {
         c.scrollTop = t
      }
      else
      {
         if (b > cb)
         {
            c.scrollTop = b - ch
         }
      }
      c.scrollTop = c.scrollTop;
      if (hscroll !== false)
      {
         if (el.offsetWidth > c.clientWidth || l < cl)
         {
            c.scrollLeft = l
         }
         else
         {
            if (r > cr)
            {
               c.scrollLeft = r - c.clientWidth
            }
         }
         c.scrollLeft = c.scrollLeft
      }
      return this
   },scrollChildIntoView:function(child, hscroll)
   {
      Ext.fly(child, "_scrollChildIntoView").scrollIntoView(this, hscroll)
   },autoHeight:function(animate, duration, onComplete, easing)
   {
      var oldHeight = this.getHeight();
      this.clip();
      this.setHeight(1);
      setTimeout(function()
      {
         var height = parseInt(this.dom.scrollHeight, 10);
         if (!animate)
         {
            this.setHeight(height);
            this.unclip();
            if (typeof onComplete == "function")
            {
               onComplete()
            }
         }
         else
         {
            this.setHeight(oldHeight);
            this.setHeight(height, animate, duration, function()
            {
               this.unclip();
               if (typeof onComplete == "function")
               {
                  onComplete()
               }
            }.createDelegate(this), easing)
         }
      }.createDelegate(this), 0);
      return this
   },contains:function(el)
   {
      if (!el)
      {
         return false
      }
      return D.isAncestor(this.dom, el.dom ? el.dom : el)
   },isVisible:function(deep)
   {
      var vis = !(this.getStyle("visibility") == "hidden" || this.getStyle("display") == "none");
      if (deep !== true || !vis)
      {
         return vis
      }
      var p = this.dom.parentNode;
      while (p && p.tagName.toLowerCase() != "body")
      {
         if (!Ext.fly(p, "_isVisible").isVisible())
         {
            return false
         }
         p = p.parentNode
      }
      return true
   },select:function(selector, unique)
   {
      return El.select(selector, unique, this.dom)
   },query:function(selector)
   {
      return Ext.DomQuery.select(selector, this.dom)
   },child:function(selector, returnDom)
   {
      var n = Ext.DomQuery.selectNode(selector, this.dom);
      return returnDom ? n : Ext.get(n)
   },down:function(selector, returnDom)
   {
      var n = Ext.DomQuery.selectNode(" > " + selector, this.dom);
      return returnDom ? n : Ext.get(n)
   },initDD:function(group, config, overrides)
   {
      var dd = new Ext.dd.DD(Ext.id(this.dom), group, config);
      return Ext.apply(dd, overrides)
   },initDDProxy:function(group, config, overrides)
   {
      var dd = new Ext.dd.DDProxy(Ext.id(this.dom), group, config);
      return Ext.apply(dd, overrides)
   },initDDTarget:function(group, config, overrides)
   {
      var dd = new Ext.dd.DDTarget(Ext.id(this.dom), group, config);
      return Ext.apply(dd, overrides)
   },setVisible:function(visible, animate)
   {
      if (!animate || !A)
      {
         if (this.visibilityMode == El.DISPLAY)
         {
            this.setDisplayed(visible)
         }
         else
         {
            this.fixDisplay();
            this.dom.style.visibility = visible ? "visible" : "hidden"
         }
      }
      else
      {
         var dom = this.dom;
         var visMode = this.visibilityMode;
         if (visible)
         {
            this.setOpacity(0.01);
            this.setVisible(true)
         }
         this.anim({opacity:{to:(visible ? 1 : 0)}}, this.preanim(arguments, 1), null, 0.35, "easeIn", function()
         {
            if (!visible)
            {
               if (visMode == El.DISPLAY)
               {
                  dom.style.display = "none"
               }
               else
               {
                  dom.style.visibility = "hidden"
               }
               Ext.get(dom).setOpacity(1)
            }
         })
      }
      return this
   },isDisplayed:function()
   {
      return this.getStyle("display") != "none"
   },toggle:function(animate)
   {
      this.setVisible(!this.isVisible(), this.preanim(arguments, 0));
      return this
   },setDisplayed:function(value)
   {
      if (typeof value == "boolean")
      {
         value = value ? this.originalDisplay : "none"
      }
      this.setStyle("display", value);
      return this
   },focus:function()
   {
      try
      {
         this.dom.focus()
      }
      catch(e)
      {
      }
      return this
   },blur:function()
   {
      try
      {
         this.dom.blur()
      }
      catch(e)
      {
      }
      return this
   },addClass:function(className)
   {
      if (Ext.isArray(className))
      {
         for (var i = 0,len = className.length; i < len; i++)
         {
            this.addClass(className[i])
         }
      }
      else
      {
         if (className && !this.hasClass(className))
         {
            this.dom.className = this.dom.className + " " + className
         }
      }
      return this
   },radioClass:function(className)
   {
      var siblings = this.dom.parentNode.childNodes;
      for (var i = 0; i < siblings.length; i++)
      {
         var s = siblings[i];
         if (s.nodeType == 1)
         {
            Ext.get(s).removeClass(className)
         }
      }
      this.addClass(className);
      return this
   },removeClass:function(className)
   {
      if (!className || !this.dom.className)
      {
         return this
      }
      if (Ext.isArray(className))
      {
         for (var i = 0,len = className.length; i < len; i++)
         {
            this.removeClass(className[i])
         }
      }
      else
      {
         if (this.hasClass(className))
         {
            var re = this.classReCache[className];
            if (!re)
            {
               re = new RegExp("(?:^|\\s+)" + className + "(?:\\s+|$)", "g");
               this.classReCache[className] = re
            }
            this.dom.className = this.dom.className.replace(re, " ")
         }
      }
      return this
   },classReCache:{},toggleClass:function(className)
   {
      if (this.hasClass(className))
      {
         this.removeClass(className)
      }
      else
      {
         this.addClass(className)
      }
      return this
   },hasClass:function(className)
   {
      return className && (" " + this.dom.className + " ").indexOf(" " + className + " ") != -1
   },replaceClass:function(oldClassName, newClassName)
   {
      this.removeClass(oldClassName);
      this.addClass(newClassName);
      return this
   },getStyles:function()
   {
      var a = arguments,len = a.length,r = {};
      for (var i = 0; i < len; i++)
      {
         r[a[i]] = this.getStyle(a[i])
      }
      return r
   },getStyle:function()
   {
      return view && view.getComputedStyle ? function(prop)
      {
         var el = this.dom,v,cs,camel;
         if (prop == "float")
         {
            prop = "cssFloat"
         }
         if (v = el.style[prop])
         {
            return v
         }
         if (cs = view.getComputedStyle(el, ""))
         {
            if (!(camel = propCache[prop]))
            {
               camel = propCache[prop] = prop.replace(camelRe, camelFn)
            }
            return cs[camel]
         }
         return null
      } : function(prop)
      {
         var el = this.dom,v,cs,camel;
         if (prop == "opacity")
         {
            if (typeof el.style.filter == "string")
            {
               var m = el.style.filter.match(/alpha\(opacity=(.*)\)/i);
               if (m)
               {
                  var fv = parseFloat(m[1]);
                  if (!isNaN(fv))
                  {
                     return fv ? fv / 100 : 0
                  }
               }
            }
            return 1
         }
         else
         {
            if (prop == "float")
            {
               prop = "styleFloat"
            }
         }
         if (!(camel = propCache[prop]))
         {
            camel = propCache[prop] = prop.replace(camelRe, camelFn)
         }
         if (v = el.style[camel])
         {
            return v
         }
         if (cs = el.currentStyle)
         {
            return cs[camel]
         }
         return null
      }
   }(),setStyle:function(prop, value)
   {
      if (typeof prop == "string")
      {
         var camel;
         if (!(camel = propCache[prop]))
         {
            camel = propCache[prop] = prop.replace(camelRe, camelFn)
         }
         if (camel == "opacity")
         {
            this.setOpacity(value)
         }
         else
         {
            this.dom.style[camel] = value
         }
      }
      else
      {
         for (var style in prop)
         {
            if (typeof prop[style] != "function")
            {
               this.setStyle(style, prop[style])
            }
         }
      }
      return this
   },applyStyles:function(style)
   {
      Ext.DomHelper.applyStyles(this.dom, style);
      return this
   },getX:function()
   {
      return D.getX(this.dom)
   },getY:function()
   {
      return D.getY(this.dom)
   },getXY:function()
   {
      return D.getXY(this.dom)
   },getOffsetsTo:function(el)
   {
      var o = this.getXY();
      var e = Ext.fly(el, "_internal").getXY();
      return[o[0] - e[0],o[1] - e[1]]
   },setX:function(x, animate)
   {
      if (!animate || !A)
      {
         D.setX(this.dom, x)
      }
      else
      {
         this.setXY([x,this.getY()], this.preanim(arguments, 1))
      }
      return this
   },setY:function(y, animate)
   {
      if (!animate || !A)
      {
         D.setY(this.dom, y)
      }
      else
      {
         this.setXY([this.getX(),y], this.preanim(arguments, 1))
      }
      return this
   },setLeft:function(left)
   {
      this.setStyle("left", this.addUnits(left));
      return this
   },setTop:function(top)
   {
      this.setStyle("top", this.addUnits(top));
      return this
   },setRight:function(right)
   {
      this.setStyle("right", this.addUnits(right));
      return this
   },setBottom:function(bottom)
   {
      this.setStyle("bottom", this.addUnits(bottom));
      return this
   },setXY:function(pos, animate)
   {
      if (!animate || !A)
      {
         D.setXY(this.dom, pos)
      }
      else
      {
         this.anim({points:{to:pos}}, this.preanim(arguments, 1), "motion")
      }
      return this
   },setLocation:function(x, y, animate)
   {
      this.setXY([x,y], this.preanim(arguments, 2));
      return this
   },moveTo:function(x, y, animate)
   {
      this.setXY([x,y], this.preanim(arguments, 2));
      return this
   },getRegion:function()
   {
      return D.getRegion(this.dom)
   },getHeight:function(contentHeight)
   {
      var h = this.dom.offsetHeight || 0;
      h = contentHeight !== true ? h : h - this.getBorderWidth("tb") - this.getPadding("tb");
      return h < 0 ? 0 : h
   },getWidth:function(contentWidth)
   {
      var w = this.dom.offsetWidth || 0;
      w = contentWidth !== true ? w : w - this.getBorderWidth("lr") - this.getPadding("lr");
      return w < 0 ? 0 : w
   },getComputedHeight:function()
   {
      var h = Math.max(this.dom.offsetHeight, this.dom.clientHeight);
      if (!h)
      {
         h = parseInt(this.getStyle("height"), 10) || 0;
         if (!this.isBorderBox())
         {
            h += this.getFrameWidth("tb")
         }
      }
      return h
   },getComputedWidth:function()
   {
      var w = Math.max(this.dom.offsetWidth, this.dom.clientWidth);
      if (!w)
      {
         w = parseInt(this.getStyle("width"), 10) || 0;
         if (!this.isBorderBox())
         {
            w += this.getFrameWidth("lr")
         }
      }
      return w
   },getSize:function(contentSize)
   {
      return{width:this.getWidth(contentSize),height:this.getHeight(contentSize)}
   },getStyleSize:function()
   {
      var w,h,d = this.dom,s = d.style;
      if (s.width && s.width != "auto")
      {
         w = parseInt(s.width, 10);
         if (Ext.isBorderBox)
         {
            w -= this.getFrameWidth("lr")
         }
      }
      if (s.height && s.height != "auto")
      {
         h = parseInt(s.height, 10);
         if (Ext.isBorderBox)
         {
            h -= this.getFrameWidth("tb")
         }
      }
      return{width:w || this.getWidth(true),height:h || this.getHeight(true)}
   },getViewSize:function()
   {
      var d = this.dom,doc = document,aw = 0,ah = 0;
      if (d == doc || d == doc.body)
      {
         return{width:D.getViewWidth(),height:D.getViewHeight()}
      }
      else
      {
         return{width:d.clientWidth,height:d.clientHeight}
      }
   },getValue:function(asNumber)
   {
      return asNumber ? parseInt(this.dom.value, 10) : this.dom.value
   },adjustWidth:function(width)
   {
      if (typeof width == "number")
      {
         if (this.autoBoxAdjust && !this.isBorderBox())
         {
            width -= (this.getBorderWidth("lr") + this.getPadding("lr"))
         }
         if (width < 0)
         {
            width = 0
         }
      }
      return width
   },adjustHeight:function(height)
   {
      if (typeof height == "number")
      {
         if (this.autoBoxAdjust && !this.isBorderBox())
         {
            height -= (this.getBorderWidth("tb") + this.getPadding("tb"))
         }
         if (height < 0)
         {
            height = 0
         }
      }
      return height
   },setWidth:function(width, animate)
   {
      width = this.adjustWidth(width);
      if (!animate || !A)
      {
         this.dom.style.width = this.addUnits(width)
      }
      else
      {
         this.anim({width:{to:width}}, this.preanim(arguments, 1))
      }
      return this
   },setHeight:function(height, animate)
   {
      height = this.adjustHeight(height);
      if (!animate || !A)
      {
         this.dom.style.height = this.addUnits(height)
      }
      else
      {
         this.anim({height:{to:height}}, this.preanim(arguments, 1))
      }
      return this
   },setSize:function(width, height, animate)
   {
      if (typeof width == "object")
      {
         height = width.height;
         width = width.width
      }
      width = this.adjustWidth(width);
      height = this.adjustHeight(height);
      if (!animate || !A)
      {
         this.dom.style.width = this.addUnits(width);
         this.dom.style.height = this.addUnits(height)
      }
      else
      {
         this.anim({width:{to:width},height:{to:height}}, this.preanim(arguments, 2))
      }
      return this
   },setBounds:function(x, y, width, height, animate)
   {
      if (!animate || !A)
      {
         this.setSize(width, height);
         this.setLocation(x, y)
      }
      else
      {
         width = this.adjustWidth(width);
         height = this.adjustHeight(height);
         this.anim({points:{to:[x,y]},width:{to:width},height:{to:height}}, this.preanim(arguments, 4), "motion")
      }
      return this
   },setRegion:function(region, animate)
   {
      this.setBounds(region.left, region.top, region.right - region.left, region.bottom - region.top, this.preanim(arguments, 1));
      return this
   },addListener:function(eventName, fn, scope, options)
   {
      Ext.EventManager.on(this.dom, eventName, fn, scope || this, options)
   },removeListener:function(eventName, fn, scope)
   {
      Ext.EventManager.removeListener(this.dom, eventName, fn, scope || this);
      return this
   },removeAllListeners:function()
   {
      Ext.EventManager.removeAll(this.dom);
      return this
   },relayEvent:function(eventName, observable)
   {
      this.on(eventName, function(e)
      {
         observable.fireEvent(eventName, e)
      })
   },setOpacity:function(opacity, animate)
   {
      if (!animate || !A)
      {
         var s = this.dom.style;
         if (Ext.isIE)
         {
            s.zoom = 1;
            s.filter = (s.filter || "").replace(/alpha\([^\)]*\)/gi, "") + (opacity == 1 ? "" :
                                                                            " alpha(opacity=" + opacity * 100 + ")")
         }
         else
         {
            s.opacity = opacity
         }
      }
      else
      {
         this.anim({opacity:{to:opacity}}, this.preanim(arguments, 1), null, 0.35, "easeIn")
      }
      return this
   },getLeft:function(local)
   {
      if (!local)
      {
         return this.getX()
      }
      else
      {
         return parseInt(this.getStyle("left"), 10) || 0
      }
   },getRight:function(local)
   {
      if (!local)
      {
         return this.getX() + this.getWidth()
      }
      else
      {
         return(this.getLeft(true) + this.getWidth()) || 0
      }
   },getTop:function(local)
   {
      if (!local)
      {
         return this.getY()
      }
      else
      {
         return parseInt(this.getStyle("top"), 10) || 0
      }
   },getBottom:function(local)
   {
      if (!local)
      {
         return this.getY() + this.getHeight()
      }
      else
      {
         return(this.getTop(true) + this.getHeight()) || 0
      }
   },position:function(pos, zIndex, x, y)
   {
      if (!pos)
      {
         if (this.getStyle("position") == "static")
         {
            this.setStyle("position", "relative")
         }
      }
      else
      {
         this.setStyle("position", pos)
      }
      if (zIndex)
      {
         this.setStyle("z-index", zIndex)
      }
      if (x !== undefined && y !== undefined)
      {
         this.setXY([x,y])
      }
      else
      {
         if (x !== undefined)
         {
            this.setX(x)
         }
         else
         {
            if (y !== undefined)
            {
               this.setY(y)
            }
         }
      }
   },clearPositioning:function(value)
   {
      value = value || "";
      this.setStyle({"left":value,"right":value,"top":value,"bottom":value,"z-index":"","position":"static"});
      return this
   },getPositioning:function()
   {
      var l = this.getStyle("left");
      var t = this.getStyle("top");
      return{"position":this.getStyle("position"),"left":l,"right":l ? "" : this.getStyle("right"),"top":t,"bottom":t ?
                                                                                                                    "" :
                                                                                                                    this.getStyle("bottom"),"z-index":this.getStyle("z-index")}
   },getBorderWidth:function(side)
   {
      return this.addStyles(side, El.borders)
   },getPadding:function(side)
   {
      return this.addStyles(side, El.paddings)
   },setPositioning:function(pc)
   {
      this.applyStyles(pc);
      if (pc.right == "auto")
      {
         this.dom.style.right = ""
      }
      if (pc.bottom == "auto")
      {
         this.dom.style.bottom = ""
      }
      return this
   },fixDisplay:function()
   {
      if (this.getStyle("display") == "none")
      {
         this.setStyle("visibility", "hidden");
         this.setStyle("display", this.originalDisplay);
         if (this.getStyle("display") == "none")
         {
            this.setStyle("display", "block")
         }
      }
   },setOverflow:function(v)
   {
      if (v == "auto" && Ext.isMac && Ext.isGecko2)
      {
         this.dom.style.overflow = "hidden";
         (function()
         {
            this.dom.style.overflow = "auto"
         }).defer(1, this)
      }
      else
      {
         this.dom.style.overflow = v
      }
   },setLeftTop:function(left, top)
   {
      this.dom.style.left = this.addUnits(left);
      this.dom.style.top = this.addUnits(top);
      return this
   },move:function(direction, distance, animate)
   {
      var xy = this.getXY();
      direction = direction.toLowerCase();
      switch (direction)
         {case"l":case"left":this.moveTo(xy[0] - distance, xy[1], this.preanim(arguments, 2));break;case"r":case"right":this.moveTo(xy[0] + distance, xy[1], this.preanim(arguments, 2));break;case"t":case"top":case"up":this.moveTo(xy[0], xy[1] - distance, this.preanim(arguments, 2));break;case"b":case"bottom":case"down":this.moveTo(xy[0], xy[1] + distance, this.preanim(arguments, 2));break}
      return this
   },clip:function()
   {
      if (!this.isClipped)
      {
         this.isClipped = true;
         this.originalClip = {"o":this.getStyle("overflow"),"x":this.getStyle("overflow-x"),"y":this.getStyle("overflow-y")};
         this.setStyle("overflow", "hidden");
         this.setStyle("overflow-x", "hidden");
         this.setStyle("overflow-y", "hidden")
      }
      return this
   },unclip:function()
   {
      if (this.isClipped)
      {
         this.isClipped = false;
         var o = this.originalClip;
         if (o.o)
         {
            this.setStyle("overflow", o.o)
         }
         if (o.x)
         {
            this.setStyle("overflow-x", o.x)
         }
         if (o.y)
         {
            this.setStyle("overflow-y", o.y)
         }
      }
      return this
   },getAnchorXY:function(anchor, local, s)
   {
      var w,h,vp = false;
      if (!s)
      {
         var d = this.dom;
         if (d == document.body || d == document)
         {
            vp = true;
            w = D.getViewWidth();
            h = D.getViewHeight()
         }
         else
         {
            w = this.getWidth();
            h = this.getHeight()
         }
      }
      else
      {
         w = s.width;
         h = s.height
      }
      var x = 0,y = 0,r = Math.round;
      switch ((anchor || "tl").toLowerCase())
         {case"c":x = r(w * 0.5);y = r(h * 0.5);break;case"t":x = r(w * 0.5);y = 0;break;case"l":x = 0;y = r(h * 0.5);break;case"r":x = w;y = r(h * 0.5);break;case"b":x = r(w * 0.5);y = h;break;case"tl":x = 0;y = 0;break;case"bl":x = 0;y = h;break;case"br":x = w;y = h;break;case"tr":x = w;y = 0;break}
      if (local === true)
      {
         return[x,y]
      }
      if (vp)
      {
         var sc = this.getScroll();
         return[x + sc.left,y + sc.top]
      }
      var o = this.getXY();
      return[x + o[0],y + o[1]]
   },getAlignToXY:function(el, p, o)
   {
      el = Ext.get(el);
      if (!el || !el.dom)
      {
         throw"Element.alignToXY with an element that doesn't exist"
      }
      var d = this.dom;
      var c = false;
      var p1 = "",p2 = "";
      o = o || [0,0];
      if (!p)
      {
         p = "tl-bl"
      }
      else
      {
         if (p == "?")
         {
            p = "tl-bl?"
         }
         else
         {
            if (p.indexOf("-") == -1)
            {
               p = "tl-" + p
            }
         }
      }
      p = p.toLowerCase();
      var m = p.match(/^([a-z]+)-([a-z]+)(\?)?$/);
      if (!m)
      {
         throw"Element.alignTo with an invalid alignment " + p
      }
      p1 = m[1];
      p2 = m[2];
      c = !!m[3];
      var a1 = this.getAnchorXY(p1, true);
      var a2 = el.getAnchorXY(p2, false);
      var x = a2[0] - a1[0] + o[0];
      var y = a2[1] - a1[1] + o[1];
      if (c)
      {
         var w = this.getWidth(),h = this.getHeight(),r = el.getRegion();
         var dw = D.getViewWidth() - 5,dh = D.getViewHeight() - 5;
         var p1y = p1.charAt(0),p1x = p1.charAt(p1.length - 1);
         var p2y = p2.charAt(0),p2x = p2.charAt(p2.length - 1);
         var swapY = ((p1y == "t" && p2y == "b") || (p1y == "b" && p2y == "t"));
         var swapX = ((p1x == "r" && p2x == "l") || (p1x == "l" && p2x == "r"));
         var doc = document;
         var scrollX = (doc.documentElement.scrollLeft || doc.body.scrollLeft || 0) + 5;
         var scrollY = (doc.documentElement.scrollTop || doc.body.scrollTop || 0) + 5;
         if ((x + w) > dw + scrollX)
         {
            x = swapX ? r.left - w : dw + scrollX - w
         }
         if (x < scrollX)
         {
            x = swapX ? r.right : scrollX
         }
         if ((y + h) > dh + scrollY)
         {
            y = swapY ? r.top - h : dh + scrollY - h
         }
         if (y < scrollY)
         {
            y = swapY ? r.bottom : scrollY
         }
      }
      return[x,y]
   },getConstrainToXY:function()
   {
      var os = {top:0,left:0,bottom:0,right:0};
      return function(el, local, offsets, proposedXY)
      {
         el = Ext.get(el);
         offsets = offsets ? Ext.applyIf(offsets, os) : os;
         var vw,vh,vx = 0,vy = 0;
         if (el.dom == document.body || el.dom == document)
         {
            vw = Ext.lib.Dom.getViewWidth();
            vh = Ext.lib.Dom.getViewHeight()
         }
         else
         {
            vw = el.dom.clientWidth;
            vh = el.dom.clientHeight;
            if (!local)
            {
               var vxy = el.getXY();
               vx = vxy[0];
               vy = vxy[1]
            }
         }
         var s = el.getScroll();
         vx += offsets.left + s.left;
         vy += offsets.top + s.top;
         vw -= offsets.right;
         vh -= offsets.bottom;
         var vr = vx + vw;
         var vb = vy + vh;
         var xy = proposedXY || (!local ? this.getXY() : [this.getLeft(true),this.getTop(true)]);
         var x = xy[0],y = xy[1];
         var w = this.dom.offsetWidth,h = this.dom.offsetHeight;
         var moved = false;
         if ((x + w) > vr)
         {
            x = vr - w;
            moved = true
         }
         if ((y + h) > vb)
         {
            y = vb - h;
            moved = true
         }
         if (x < vx)
         {
            x = vx;
            moved = true
         }
         if (y < vy)
         {
            y = vy;
            moved = true
         }
         return moved ? [x,y] : false
      }
   }(),adjustForConstraints:function(xy, parent, offsets)
   {
      return this.getConstrainToXY(parent || document, false, offsets, xy) || xy
   },alignTo:function(element, position, offsets, animate)
   {
      var xy = this.getAlignToXY(element, position, offsets);
      this.setXY(xy, this.preanim(arguments, 3));
      return this
   },anchorTo:function(el, alignment, offsets, animate, monitorScroll, callback)
   {
      var action = function()
      {
         this.alignTo(el, alignment, offsets, animate);
         Ext.callback(callback, this)
      };
      Ext.EventManager.onWindowResize(action, this);
      var tm = typeof monitorScroll;
      if (tm != "undefined")
      {
         Ext.EventManager.on(window, "scroll", action, this, {buffer:tm == "number" ? monitorScroll : 50})
      }
      action.call(this);
      return this
   },clearOpacity:function()
   {
      if (window.ActiveXObject)
      {
         if (typeof this.dom.style.filter == "string" && (/alpha/i).test(this.dom.style.filter))
         {
            this.dom.style.filter = ""
         }
      }
      else
      {
         this.dom.style.opacity = "";
         this.dom.style["-moz-opacity"] = "";
         this.dom.style["-khtml-opacity"] = ""
      }
      return this
   },hide:function(animate)
   {
      this.setVisible(false, this.preanim(arguments, 0));
      return this
   },show:function(animate)
   {
      this.setVisible(true, this.preanim(arguments, 0));
      return this
   },addUnits:function(size)
   {
      return Ext.Element.addUnits(size, this.defaultUnit)
   },update:function(html, loadScripts, callback)
   {
      if (typeof html == "undefined")
      {
         html = ""
      }
      if (loadScripts !== true)
      {
         this.dom.innerHTML = html;
         if (typeof callback == "function")
         {
            callback()
         }
         return this
      }
      var id = Ext.id();
      var dom = this.dom;
      html += "<span id=\"" + id + "\"></span>";
      E.onAvailable(id, function()
      {
         var hd = document.getElementsByTagName("head")[0];
         var re = /(?:<script([^>]*)?>)((\n|\r|.)*?)(?:<\/script>)/ig;
         var srcRe = /\ssrc=([\'\"])(.*?)\1/i;
         var typeRe = /\stype=([\'\"])(.*?)\1/i;
         var match;
         while (match = re.exec(html))
         {
            var attrs = match[1];
            var srcMatch = attrs ? attrs.match(srcRe) : false;
            if (srcMatch && srcMatch[2])
            {
               var s = document.createElement("script");
               s.src = srcMatch[2];
               var typeMatch = attrs.match(typeRe);
               if (typeMatch && typeMatch[2])
               {
                  s.type = typeMatch[2]
               }
               hd.appendChild(s)
            }
            else
            {
               if (match[2] && match[2].length > 0)
               {
                  if (window.execScript)
                  {
                     window.execScript(match[2])
                  }
                  else
                  {
                     window.eval(match[2])
                  }
               }
            }
         }
         var el = document.getElementById(id);
         if (el)
         {
            Ext.removeNode(el)
         }
         if (typeof callback == "function")
         {
            callback()
         }
      });
      dom.innerHTML = html.replace(/(?:<script.*?>)((\n|\r|.)*?)(?:<\/script>)/ig, "");
      return this
   },load:function()
   {
      var um = this.getUpdater();
      um.update.apply(um, arguments);
      return this
   },getUpdater:function()
   {
      if (!this.updateManager)
      {
         this.updateManager = new Ext.Updater(this)
      }
      return this.updateManager
   },unselectable:function()
   {
      this.dom.unselectable = "on";
      this.swallowEvent("selectstart", true);
      this.applyStyles("-moz-user-select:none;-khtml-user-select:none;");
      this.addClass("x-unselectable");
      return this
   },getCenterXY:function()
   {
      return this.getAlignToXY(document, "c-c")
   },center:function(centerIn)
   {
      this.alignTo(centerIn || document, "c-c");
      return this
   },isBorderBox:function()
   {
      return noBoxAdjust[this.dom.tagName.toLowerCase()] || Ext.isBorderBox
   },getBox:function(contentBox, local)
   {
      var xy;
      if (!local)
      {
         xy = this.getXY()
      }
      else
      {
         var left = parseInt(this.getStyle("left"), 10) || 0;
         var top = parseInt(this.getStyle("top"), 10) || 0;
         xy = [left,top]
      }
      var el = this.dom,w = el.offsetWidth,h = el.offsetHeight,bx;
      if (!contentBox)
      {
         bx = {x:xy[0],y:xy[1],0:xy[0],1:xy[1],width:w,height:h}
      }
      else
      {
         var l = this.getBorderWidth("l") + this.getPadding("l");
         var r = this.getBorderWidth("r") + this.getPadding("r");
         var t = this.getBorderWidth("t") + this.getPadding("t");
         var b = this.getBorderWidth("b") + this.getPadding("b");
         bx = {x:xy[0] + l,y:xy[1] + t,0:xy[0] + l,1:xy[1] + t,width:w - (l + r),height:h - (t + b)}
      }
      bx.right = bx.x + bx.width;
      bx.bottom = bx.y + bx.height;
      return bx
   },getFrameWidth:function(sides, onlyContentBox)
   {
      return onlyContentBox && Ext.isBorderBox ? 0 : (this.getPadding(sides) + this.getBorderWidth(sides))
   },setBox:function(box, adjust, animate)
   {
      var w = box.width,h = box.height;
      if ((adjust && !this.autoBoxAdjust) && !this.isBorderBox())
      {
         w -= (this.getBorderWidth("lr") + this.getPadding("lr"));
         h -= (this.getBorderWidth("tb") + this.getPadding("tb"))
      }
      this.setBounds(box.x, box.y, w, h, this.preanim(arguments, 2));
      return this
   },repaint:function()
   {
      var dom = this.dom;
      this.addClass("x-repaint");
      setTimeout(function()
      {
         Ext.get(dom).removeClass("x-repaint")
      }, 1);
      return this
   },getMargins:function(side)
   {
      if (!side)
      {
         return{top:parseInt(this.getStyle("margin-top"), 10) || 0,left:parseInt(this.getStyle("margin-left"), 10) || 0,bottom:parseInt(this.getStyle("margin-bottom"), 10) || 0,right:parseInt(this.getStyle("margin-right"), 10) || 0}
      }
      else
      {
         return this.addStyles(side, El.margins)
      }
   },addStyles:function(sides, styles)
   {
      var val = 0,v,w;
      for (var i = 0,len = sides.length; i < len; i++)
      {
         v = this.getStyle(styles[sides.charAt(i)]);
         if (v)
         {
            w = parseInt(v, 10);
            if (w)
            {
               val += (w >= 0 ? w : -1 * w)
            }
         }
      }
      return val
   },createProxy:function(config, renderTo, matchBox)
   {
      config = typeof config == "object" ? config : {tag:"div",cls:config};
      var proxy;
      if (renderTo)
      {
         proxy = Ext.DomHelper.append(renderTo, config, true)
      }
      else
      {
         proxy = Ext.DomHelper.insertBefore(this.dom, config, true)
      }
      if (matchBox)
      {
         proxy.setBox(this.getBox())
      }
      return proxy
   },mask:function(msg, msgCls)
   {
      if (this.getStyle("position") == "static")
      {
         this.setStyle("position", "relative")
      }
      if (this._maskMsg)
      {
         this._maskMsg.remove()
      }
      if (this._mask)
      {
         this._mask.remove()
      }
      this._mask = Ext.DomHelper.append(this.dom, {cls:"ext-el-mask"}, true);
      this.addClass("x-masked");
      this._mask.setDisplayed(true);
      if (typeof msg == "string")
      {
         this._maskMsg = Ext.DomHelper.append(this.dom, {cls:"ext-el-mask-msg",cn:{tag:"div"}}, true);
         var mm = this._maskMsg;
         mm.dom.className = msgCls ? "ext-el-mask-msg " + msgCls : "ext-el-mask-msg";
         mm.dom.firstChild.innerHTML = msg;
         mm.setDisplayed(true);
         mm.center(this)
      }
      if (Ext.isIE && !(Ext.isIE7 && Ext.isStrict) && this.getStyle("height") == "auto")
      {
         this._mask.setSize(this.dom.clientWidth, this.getHeight())
      }
      return this._mask
   },unmask:function()
   {
      if (this._mask)
      {
         if (this._maskMsg)
         {
            this._maskMsg.remove();
            delete this._maskMsg
         }
         this._mask.remove();
         delete this._mask
      }
      this.removeClass("x-masked")
   },isMasked:function()
   {
      return this._mask && this._mask.isVisible()
   },createShim:function()
   {
      var el = document.createElement("iframe");
      el.frameBorder = "0";
      el.className = "ext-shim";
      if (Ext.isIE && Ext.isSecure)
      {
         el.src = Ext.SSL_SECURE_URL
      }
      var shim = Ext.get(this.dom.parentNode.insertBefore(el, this.dom));
      shim.autoBoxAdjust = false;
      return shim
   },remove:function()
   {
      Ext.removeNode(this.dom);
      delete El.cache[this.dom.id]
   },hover:function(overFn, outFn, scope)
   {
      var preOverFn = function(e)
      {
         if (!e.within(this, true))
         {
            overFn.apply(scope || this, arguments)
         }
      };
      var preOutFn = function(e)
      {
         if (!e.within(this, true))
         {
            outFn.apply(scope || this, arguments)
         }
      };
      this.on("mouseover", preOverFn, this.dom);
      this.on("mouseout", preOutFn, this.dom);
      return this
   },addClassOnOver:function(className)
   {
      this.hover(function()
      {
         Ext.fly(this, "_internal").addClass(className)
      }, function()
      {
         Ext.fly(this, "_internal").removeClass(className)
      });
      return this
   },addClassOnFocus:function(className)
   {
      this.on("focus", function()
      {
         Ext.fly(this, "_internal").addClass(className)
      }, this.dom);
      this.on("blur", function()
      {
         Ext.fly(this, "_internal").removeClass(className)
      }, this.dom);
      return this
   },addClassOnClick:function(className)
   {
      var dom = this.dom;
      this.on("mousedown", function()
      {
         Ext.fly(dom, "_internal").addClass(className);
         var d = Ext.getDoc();
         var fn = function()
         {
            Ext.fly(dom, "_internal").removeClass(className);
            d.removeListener("mouseup", fn)
         };
         d.on("mouseup", fn)
      });
      return this
   },swallowEvent:function(eventName, preventDefault)
   {
      var fn = function(e)
      {
         e.stopPropagation();
         if (preventDefault)
         {
            e.preventDefault()
         }
      };
      if (Ext.isArray(eventName))
      {
         for (var i = 0,len = eventName.length; i < len; i++)
         {
            this.on(eventName[i], fn)
         }
         return this
      }
      this.on(eventName, fn);
      return this
   },parent:function(selector, returnDom)
   {
      return this.matchNode("parentNode", "parentNode", selector, returnDom)
   },next:function(selector, returnDom)
   {
      return this.matchNode("nextSibling", "nextSibling", selector, returnDom)
   },prev:function(selector, returnDom)
   {
      return this.matchNode("previousSibling", "previousSibling", selector, returnDom)
   },first:function(selector, returnDom)
   {
      return this.matchNode("nextSibling", "firstChild", selector, returnDom)
   },last:function(selector, returnDom)
   {
      return this.matchNode("previousSibling", "lastChild", selector, returnDom)
   },matchNode:function(dir, start, selector, returnDom)
   {
      var n = this.dom[start];
      while (n)
      {
         if (n.nodeType == 1 && (!selector || Ext.DomQuery.is(n, selector)))
         {
            return !returnDom ? Ext.get(n) : n
         }
         n = n[dir]
      }
      return null
   },appendChild:function(el)
   {
      el = Ext.get(el);
      el.appendTo(this);
      return this
   },createChild:function(config, insertBefore, returnDom)
   {
      config = config || {tag:"div"};
      if (insertBefore)
      {
         return Ext.DomHelper.insertBefore(insertBefore, config, returnDom !== true)
      }
      return Ext.DomHelper[!this.dom.firstChild ? "overwrite" : "append"](this.dom, config, returnDom !== true)
   },appendTo:function(el)
   {
      el = Ext.getDom(el);
      el.appendChild(this.dom);
      return this
   },insertBefore:function(el)
   {
      el = Ext.getDom(el);
      el.parentNode.insertBefore(this.dom, el);
      return this
   },insertAfter:function(el)
   {
      el = Ext.getDom(el);
      el.parentNode.insertBefore(this.dom, el.nextSibling);
      return this
   },insertFirst:function(el, returnDom)
   {
      el = el || {};
      if (typeof el == "object" && !el.nodeType && !el.dom)
      {
         return this.createChild(el, this.dom.firstChild, returnDom)
      }
      else
      {
         el = Ext.getDom(el);
         this.dom.insertBefore(el, this.dom.firstChild);
         return !returnDom ? Ext.get(el) : el
      }
   },insertSibling:function(el, where, returnDom)
   {
      var rt;
      if (Ext.isArray(el))
      {
         for (var i = 0,len = el.length; i < len; i++)
         {
            rt = this.insertSibling(el[i], where, returnDom)
         }
         return rt
      }
      where = where ? where.toLowerCase() : "before";
      el = el || {};
      var refNode = where == "before" ? this.dom : this.dom.nextSibling;
      if (typeof el == "object" && !el.nodeType && !el.dom)
      {
         if (where == "after" && !this.dom.nextSibling)
         {
            rt = Ext.DomHelper.append(this.dom.parentNode, el, !returnDom)
         }
         else
         {
            rt = Ext.DomHelper[where == "after" ? "insertAfter" : "insertBefore"](this.dom, el, !returnDom)
         }
      }
      else
      {
         rt = this.dom.parentNode.insertBefore(Ext.getDom(el), refNode);
         if (!returnDom)
         {
            rt = Ext.get(rt)
         }
      }
      return rt
   },wrap:function(config, returnDom)
   {
      if (!config)
      {
         config = {tag:"div"}
      }
      var newEl = Ext.DomHelper.insertBefore(this.dom, config, !returnDom);
      newEl.dom ? newEl.dom.appendChild(this.dom) : newEl.appendChild(this.dom);
      return newEl
   },replace:function(el)
   {
      el = Ext.get(el);
      this.insertBefore(el);
      el.remove();
      return this
   },replaceWith:function(el)
   {
      if (typeof el == "object" && !el.nodeType && !el.dom)
      {
         el = this.insertSibling(el, "before")
      }
      else
      {
         el = Ext.getDom(el);
         this.dom.parentNode.insertBefore(el, this.dom)
      }
      El.uncache(this.id);
      this.dom.parentNode.removeChild(this.dom);
      this.dom = el;
      this.id = Ext.id(el);
      El.cache[this.id] = this;
      return this
   },insertHtml:function(where, html, returnEl)
   {
      var el = Ext.DomHelper.insertHtml(where, this.dom, html);
      return returnEl ? Ext.get(el) : el
   },set:function(o, useSet)
   {
      var el = this.dom;
      useSet = typeof useSet == "undefined" ? (el.setAttribute ? true : false) : useSet;
      for (var attr in o)
      {
         if (attr == "style" || typeof o[attr] == "function")
         {
            continue
         }
         if (attr == "cls")
         {
            el.className = o["cls"]
         }
         else
         {
            if (o.hasOwnProperty(attr))
            {
               if (useSet)
               {
                  el.setAttribute(attr, o[attr])
               }
               else
               {
                  el[attr] = o[attr]
               }
            }
         }
      }
      if (o.style)
      {
         Ext.DomHelper.applyStyles(el, o.style)
      }
      return this
   },addKeyListener:function(key, fn, scope)
   {
      var config;
      if (typeof key != "object" || Ext.isArray(key))
      {
         config = {key:key,fn:fn,scope:scope}
      }
      else
      {
         config = {key:key.key,shift:key.shift,ctrl:key.ctrl,alt:key.alt,fn:fn,scope:scope}
      }
      return new Ext.KeyMap(this, config)
   },addKeyMap:function(config)
   {
      return new Ext.KeyMap(this, config)
   },isScrollable:function()
   {
      var dom = this.dom;
      return dom.scrollHeight > dom.clientHeight || dom.scrollWidth > dom.clientWidth
   },scrollTo:function(side, value, animate)
   {
      var prop = side.toLowerCase() == "left" ? "scrollLeft" : "scrollTop";
      if (!animate || !A)
      {
         this.dom[prop] = value
      }
      else
      {
         var to = prop == "scrollLeft" ? [value,this.dom.scrollTop] : [this.dom.scrollLeft,value];
         this.anim({scroll:{"to":to}}, this.preanim(arguments, 2), "scroll")
      }
      return this
   },scroll:function(direction, distance, animate)
   {
      if (!this.isScrollable())
      {
         return
      }
      var el = this.dom;
      var l = el.scrollLeft,t = el.scrollTop;
      var w = el.scrollWidth,h = el.scrollHeight;
      var cw = el.clientWidth,ch = el.clientHeight;
      direction = direction.toLowerCase();
      var scrolled = false;
      var a = this.preanim(arguments, 2);
      switch (direction)
         {case"l":case"left":if (w - l > cw)
      {
         var v = Math.min(l + distance, w - cw);
         this.scrollTo("left", v, a);
         scrolled = true
      }break;case"r":case"right":if (l > 0)
      {
         var v = Math.max(l - distance, 0);
         this.scrollTo("left", v, a);
         scrolled = true
      }break;case"t":case"top":case"up":if (t > 0)
      {
         var v = Math.max(t - distance, 0);
         this.scrollTo("top", v, a);
         scrolled = true
      }break;case"b":case"bottom":case"down":if (h - t > ch)
      {
         var v = Math.min(t + distance, h - ch);
         this.scrollTo("top", v, a);
         scrolled = true
      }break}
      return scrolled
   },translatePoints:function(x, y)
   {
      if (typeof x == "object" || Ext.isArray(x))
      {
         y = x[1];
         x = x[0]
      }
      var p = this.getStyle("position");
      var o = this.getXY();
      var l = parseInt(this.getStyle("left"), 10);
      var t = parseInt(this.getStyle("top"), 10);
      if (isNaN(l))
      {
         l = (p == "relative") ? 0 : this.dom.offsetLeft
      }
      if (isNaN(t))
      {
         t = (p == "relative") ? 0 : this.dom.offsetTop
      }
      return{left:(x - o[0] + l),top:(y - o[1] + t)}
   },getScroll:function()
   {
      var d = this.dom,doc = document;
      if (d == doc || d == doc.body)
      {
         var l,t;
         if (Ext.isIE && Ext.isStrict)
         {
            l = doc.documentElement.scrollLeft || (doc.body.scrollLeft || 0);
            t = doc.documentElement.scrollTop || (doc.body.scrollTop || 0)
         }
         else
         {
            l = window.pageXOffset || (doc.body.scrollLeft || 0);
            t = window.pageYOffset || (doc.body.scrollTop || 0)
         }
         return{left:l,top:t}
      }
      else
      {
         return{left:d.scrollLeft,top:d.scrollTop}
      }
   },getColor:function(attr, defaultValue, prefix)
   {
      var v = this.getStyle(attr);
      if (!v || v == "transparent" || v == "inherit")
      {
         return defaultValue
      }
      var color = typeof prefix == "undefined" ? "#" : prefix;
      if (v.substr(0, 4) == "rgb(")
      {
         var rvs = v.slice(4, v.length - 1).split(",");
         for (var i = 0; i < 3; i++)
         {
            var h = parseInt(rvs[i]);
            var s = h.toString(16);
            if (h < 16)
            {
               s = "0" + s
            }
            color += s
         }
      }
      else
      {
         if (v.substr(0, 1) == "#")
         {
            if (v.length == 4)
            {
               for (var i = 1; i < 4; i++)
               {
                  var c = v.charAt(i);
                  color += c + c
               }
            }
            else
            {
               if (v.length == 7)
               {
                  color += v.substr(1)
               }
            }
         }
      }
      return(color.length > 5 ? color.toLowerCase() : defaultValue)
   },boxWrap:function(cls)
   {
      cls = cls || "x-box";
      var el = Ext.get(this.insertHtml("beforeBegin", String.format("<div class=\"{0}\">" + El.boxMarkup + "</div>", cls)));
      el.child("." + cls + "-mc").dom.appendChild(this.dom);
      return el
   },getAttributeNS:Ext.isIE ? function(ns, name)
   {
      var d = this.dom;
      var type = typeof d[ns + ":" + name];
      if (type != "undefined" && type != "unknown")
      {
         return d[ns + ":" + name]
      }
      return d[name]
   } : function(ns, name)
   {
      var d = this.dom;
      return d.getAttributeNS(ns, name) || d.getAttribute(ns + ":" + name) || d.getAttribute(name) || d[name]
   },getTextWidth:function(text, min, max)
   {
      return(Ext.util.TextMetrics.measure(this.dom, Ext.value(text, this.dom.innerHTML, true)).width).constrain(min || 0, max || 1000000)
   }};
   var ep = El.prototype;
   ep.on = ep.addListener;
   ep.mon = ep.addListener;
   ep.getUpdateManager = ep.getUpdater;
   ep.un = ep.removeListener;
   ep.autoBoxAdjust = true;
   El.unitPattern = /\d+(px|em|%|en|ex|pt|in|cm|mm|pc)$/i;
   El.addUnits = function(v, defaultUnit)
   {
      if (v === "" || v == "auto")
      {
         return v
      }
      if (v === undefined)
      {
         return""
      }
      if (typeof v == "number" || !El.unitPattern.test(v))
      {
         return v + (defaultUnit || "px")
      }
      return v
   };
   El.boxMarkup = "<div class=\"{0}-tl\"><div class=\"{0}-tr\"><div class=\"{0}-tc\"></div></div></div><div class=\"{0}-ml\"><div class=\"{0}-mr\"><div class=\"{0}-mc\"></div></div></div><div class=\"{0}-bl\"><div class=\"{0}-br\"><div class=\"{0}-bc\"></div></div></div>";
   El.VISIBILITY = 1;
   El.DISPLAY = 2;
   El.borders = {l:"border-left-width",r:"border-right-width",t:"border-top-width",b:"border-bottom-width"};
   El.paddings = {l:"padding-left",r:"padding-right",t:"padding-top",b:"padding-bottom"};
   El.margins = {l:"margin-left",r:"margin-right",t:"margin-top",b:"margin-bottom"};
   El.cache = {};
   var docEl;
   El.get = function(el)
   {
      var ex,elm,id;
      if (!el)
      {
         return null
      }
      if (typeof el == "string")
      {
         if (!(elm = document.getElementById(el)))
         {
            return null
         }
         if (ex = El.cache[el])
         {
            ex.dom = elm
         }
         else
         {
            ex = El.cache[el] = new El(elm)
         }
         return ex
      }
      else
      {
         if (el.tagName)
         {
            if (!(id = el.id))
            {
               id = Ext.id(el)
            }
            if (ex = El.cache[id])
            {
               ex.dom = el
            }
            else
            {
               ex = El.cache[id] = new El(el)
            }
            return ex
         }
         else
         {
            if (el instanceof El)
            {
               if (el != docEl)
               {
                  el.dom = document.getElementById(el.id) || el.dom;
                  El.cache[el.id] = el
               }
               return el
            }
            else
            {
               if (el.isComposite)
               {
                  return el
               }
               else
               {
                  if (Ext.isArray(el))
                  {
                     return El.select(el)
                  }
                  else
                  {
                     if (el == document)
                     {
                        if (!docEl)
                        {
                           var f = function()
                           {
                           };
                           f.prototype = El.prototype;
                           docEl = new f();
                           docEl.dom = document
                        }
                        return docEl
                     }
                  }
               }
            }
         }
      }
      return null
   };
   El.uncache = function(el)
   {
      for (var i = 0,a = arguments,len = a.length; i < len; i++)
      {
         if (a[i])
         {
            delete El.cache[a[i].id || a[i]]
         }
      }
   };
   El.garbageCollect = function()
   {
      if (!Ext.enableGarbageCollector)
      {
         clearInterval(El.collectorThread);
         return
      }
      for (var eid in El.cache)
      {
         var el = El.cache[eid],d = el.dom;
         if (!d || !d.parentNode || (!d.offsetParent && !document.getElementById(eid)))
         {
            delete El.cache[eid];
            if (d && Ext.enableListenerCollection)
            {
               Ext.EventManager.removeAll(d)
            }
         }
      }
   };
   El.collectorThreadId = setInterval(El.garbageCollect, 30000);
   var flyFn = function()
   {
   };
   flyFn.prototype = El.prototype;
   var _cls = new flyFn();
   El.Flyweight = function(dom)
   {
      this.dom = dom
   };
   El.Flyweight.prototype = _cls;
   El.Flyweight.prototype.isFlyweight = true;
   El._flyweights = {};
   El.fly = function(el, named)
   {
      named = named || "_global";
      el = Ext.getDom(el);
      if (!el)
      {
         return null
      }
      if (!El._flyweights[named])
      {
         El._flyweights[named] = new El.Flyweight()
      }
      El._flyweights[named].dom = el;
      return El._flyweights[named]
   };
   Ext.get = El.get;
   Ext.fly = El.fly;
   var noBoxAdjust = Ext.isStrict ? {select:1} : {input:1,select:1,textarea:1};
   if (Ext.isIE || Ext.isGecko)
   {
      noBoxAdjust["button"] = 1
   }
   Ext.EventManager.on(window, "unload", function()
   {
      delete El.cache;
      delete El._flyweights
   })
})();
Ext.enableFx = true;
Ext.Fx = {slideIn:function(A, C)
{
   var B = this.getFxEl();
   C = C || {};
   B.queueFx(C, function()
   {
      A = A || "t";
      this.fixDisplay();
      var D = this.getFxRestore();
      var I = this.getBox();
      this.setSize(I);
      var F = this.fxWrap(D.pos, C, "hidden");
      var K = this.dom.style;
      K.visibility = "visible";
      K.position = "absolute";
      var E = function()
      {
         B.fxUnwrap(F, D.pos, C);
         K.width = D.width;
         K.height = D.height;
         B.afterFx(C)
      };
      var J,L = {to:[I.x,I.y]},H = {to:I.width},G = {to:I.height};
      switch (A.toLowerCase())
         {case"t":F.setSize(I.width, 0);K.left = K.bottom = "0";J = {height:G};break;case"l":F.setSize(0, I.height);K.right = K.top = "0";J = {width:H};break;case"r":F.setSize(0, I.height);F.setX(I.right);K.left = K.top = "0";J = {width:H,points:L};break;case"b":F.setSize(I.width, 0);F.setY(I.bottom);K.left = K.top = "0";J = {height:G,points:L};break;case"tl":F.setSize(0, 0);K.right = K.bottom = "0";J = {width:H,height:G};break;case"bl":F.setSize(0, 0);F.setY(I.y + I.height);K.right = K.top = "0";J = {width:H,height:G,points:L};break;case"br":F.setSize(0, 0);F.setXY([I.right,I.bottom]);K.left = K.top = "0";J = {width:H,height:G,points:L};break;case"tr":F.setSize(0, 0);F.setX(I.x + I.width);K.left = K.bottom = "0";J = {width:H,height:G,points:L};break}
      this.dom.style.visibility = "visible";
      F.show();
      arguments.callee.anim = F.fxanim(J, C, "motion", 0.5, "easeOut", E)
   });
   return this
},slideOut:function(A, C)
{
   var B = this.getFxEl();
   C = C || {};
   B.queueFx(C, function()
   {
      A = A || "t";
      var I = this.getFxRestore();
      var D = this.getBox();
      this.setSize(D);
      var G = this.fxWrap(I.pos, C, "visible");
      var F = this.dom.style;
      F.visibility = "visible";
      F.position = "absolute";
      G.setSize(D);
      var J = function()
      {
         if (C.useDisplay)
         {
            B.setDisplayed(false)
         }
         else
         {
            B.hide()
         }
         B.fxUnwrap(G, I.pos, C);
         F.width = I.width;
         F.height = I.height;
         B.afterFx(C)
      };
      var E,H = {to:0};
      switch (A.toLowerCase())
         {case"t":F.left = F.bottom = "0";E = {height:H};break;case"l":F.right = F.top = "0";E = {width:H};break;case"r":F.left = F.top = "0";E = {width:H,points:{to:[D.right,D.y]}};break;case"b":F.left = F.top = "0";E = {height:H,points:{to:[D.x,D.bottom]}};break;case"tl":F.right = F.bottom = "0";E = {width:H,height:H};break;case"bl":F.right = F.top = "0";E = {width:H,height:H,points:{to:[D.x,D.bottom]}};break;case"br":F.left = F.top = "0";E = {width:H,height:H,points:{to:[D.x + D.width,D.bottom]}};break;case"tr":F.left = F.bottom = "0";E = {width:H,height:H,points:{to:[D.right,D.y]}};break}
      arguments.callee.anim = G.fxanim(E, C, "motion", 0.5, "easeOut", J)
   });
   return this
},puff:function(B)
{
   var A = this.getFxEl();
   B = B || {};
   A.queueFx(B, function()
   {
      this.clearOpacity();
      this.show();
      var F = this.getFxRestore();
      var D = this.dom.style;
      var G = function()
      {
         if (B.useDisplay)
         {
            A.setDisplayed(false)
         }
         else
         {
            A.hide()
         }
         A.clearOpacity();
         A.setPositioning(F.pos);
         D.width = F.width;
         D.height = F.height;
         D.fontSize = "";
         A.afterFx(B)
      };
      var E = this.getWidth();
      var C = this.getHeight();
      arguments.callee.anim = this.fxanim({width:{to:this.adjustWidth(E * 2)},height:{to:this.adjustHeight(C * 2)},points:{by:[-(E * 0.5),-(C * 0.5)]},opacity:{to:0},fontSize:{to:200,unit:"%"}}, B, "motion", 0.5, "easeOut", G)
   });
   return this
},switchOff:function(B)
{
   var A = this.getFxEl();
   B = B || {};
   A.queueFx(B, function()
   {
      this.clearOpacity();
      this.clip();
      var D = this.getFxRestore();
      var C = this.dom.style;
      var E = function()
      {
         if (B.useDisplay)
         {
            A.setDisplayed(false)
         }
         else
         {
            A.hide()
         }
         A.clearOpacity();
         A.setPositioning(D.pos);
         C.width = D.width;
         C.height = D.height;
         A.afterFx(B)
      };
      this.fxanim({opacity:{to:0.3}}, null, null, 0.1, null, function()
      {
         this.clearOpacity();
         (function()
         {
            this.fxanim({height:{to:1},points:{by:[0,this.getHeight() * 0.5]}}, B, "motion", 0.3, "easeIn", E)
         }).defer(100, this)
      })
   });
   return this
},highlight:function(A, C)
{
   var B = this.getFxEl();
   C = C || {};
   B.queueFx(C, function()
   {
      A = A || "ffff9c";
      var D = C.attr || "backgroundColor";
      this.clearOpacity();
      this.show();
      var G = this.getColor(D);
      var H = this.dom.style[D];
      var F = (C.endColor || G) || "ffffff";
      var I = function()
      {
         B.dom.style[D] = H;
         B.afterFx(C)
      };
      var E = {};
      E[D] = {from:A,to:F};
      arguments.callee.anim = this.fxanim(E, C, "color", 1, "easeIn", I)
   });
   return this
},frame:function(A, C, D)
{
   var B = this.getFxEl();
   D = D || {};
   B.queueFx(D, function()
   {
      A = A || "#C3DAF9";
      if (A.length == 6)
      {
         A = "#" + A
      }
      C = C || 1;
      var G = D.duration || 1;
      this.show();
      var E = this.getBox();
      var F = function()
      {
         var H = Ext.getBody().createChild({style:{visbility:"hidden",position:"absolute","z-index":"35000",border:"0px solid " + A}});
         var I = Ext.isBorderBox ? 2 : 1;
         H.animate({top:{from:E.y,to:E.y - 20},left:{from:E.x,to:E.x - 20},borderWidth:{from:0,to:10},opacity:{from:1,to:0},height:{from:E.height,to:(E.height + (20 * I))},width:{from:E.width,to:(E.width + (20 * I))}}, G, function()
         {
            H.remove();
            if (--C > 0)
            {
               F()
            }
            else
            {
               B.afterFx(D)
            }
         })
      };
      F.call(this)
   });
   return this
},pause:function(C)
{
   var A = this.getFxEl();
   var B = {};
   A.queueFx(B, function()
   {
      setTimeout(function()
      {
         A.afterFx(B)
      }, C * 1000)
   });
   return this
},fadeIn:function(B)
{
   var A = this.getFxEl();
   B = B || {};
   A.queueFx(B, function()
   {
      this.setOpacity(0);
      this.fixDisplay();
      this.dom.style.visibility = "visible";
      var C = B.endOpacity || 1;
      arguments.callee.anim = this.fxanim({opacity:{to:C}}, B, null, 0.5, "easeOut", function()
      {
         if (C == 1)
         {
            this.clearOpacity()
         }
         A.afterFx(B)
      })
   });
   return this
},fadeOut:function(B)
{
   var A = this.getFxEl();
   B = B || {};
   A.queueFx(B, function()
   {
      arguments.callee.anim = this.fxanim({opacity:{to:B.endOpacity || 0}}, B, null, 0.5, "easeOut", function()
      {
         if (this.visibilityMode == Ext.Element.DISPLAY || B.useDisplay)
         {
            this.dom.style.display = "none"
         }
         else
         {
            this.dom.style.visibility = "hidden"
         }
         this.clearOpacity();
         A.afterFx(B)
      })
   });
   return this
},scale:function(A, B, C)
{
   this.shift(Ext.apply({}, C, {width:A,height:B}));
   return this
},shift:function(B)
{
   var A = this.getFxEl();
   B = B || {};
   A.queueFx(B, function()
   {
      var E = {},D = B.width,F = B.height,C = B.x,H = B.y,G = B.opacity;
      if (D !== undefined)
      {
         E.width = {to:this.adjustWidth(D)}
      }
      if (F !== undefined)
      {
         E.height = {to:this.adjustHeight(F)}
      }
      if (B.left !== undefined)
      {
         E.left = {to:B.left}
      }
      if (B.top !== undefined)
      {
         E.top = {to:B.top}
      }
      if (B.right !== undefined)
      {
         E.right = {to:B.right}
      }
      if (B.bottom !== undefined)
      {
         E.bottom = {to:B.bottom}
      }
      if (C !== undefined || H !== undefined)
      {
         E.points = {to:[C !== undefined ? C : this.getX(),H !== undefined ? H : this.getY()]}
      }
      if (G !== undefined)
      {
         E.opacity = {to:G}
      }
      if (B.xy !== undefined)
      {
         E.points = {to:B.xy}
      }
      arguments.callee.anim = this.fxanim(E, B, "motion", 0.35, "easeOut", function()
      {
         A.afterFx(B)
      })
   });
   return this
},ghost:function(A, C)
{
   var B = this.getFxEl();
   C = C || {};
   B.queueFx(C, function()
   {
      A = A || "b";
      var H = this.getFxRestore();
      var E = this.getWidth(),G = this.getHeight();
      var F = this.dom.style;
      var J = function()
      {
         if (C.useDisplay)
         {
            B.setDisplayed(false)
         }
         else
         {
            B.hide()
         }
         B.clearOpacity();
         B.setPositioning(H.pos);
         F.width = H.width;
         F.height = H.height;
         B.afterFx(C)
      };
      var D = {opacity:{to:0},points:{}},I = D.points;
      switch (A.toLowerCase())
         {case"t":I.by = [0,-G];break;case"l":I.by = [-E,0];break;case"r":I.by = [E,0];break;case"b":I.by = [0,G];break;case"tl":I.by = [-E,-G];break;case"bl":I.by = [-E,G];break;case"br":I.by = [E,G];break;case"tr":I.by = [E,-G];break}
      arguments.callee.anim = this.fxanim(D, C, "motion", 0.5, "easeOut", J)
   });
   return this
},syncFx:function()
{
   this.fxDefaults = Ext.apply(this.fxDefaults || {}, {block:false,concurrent:true,stopFx:false});
   return this
},sequenceFx:function()
{
   this.fxDefaults = Ext.apply(this.fxDefaults || {}, {block:false,concurrent:false,stopFx:false});
   return this
},nextFx:function()
{
   var A = this.fxQueue[0];
   if (A)
   {
      A.call(this)
   }
},hasActiveFx:function()
{
   return this.fxQueue && this.fxQueue[0]
},stopFx:function()
{
   if (this.hasActiveFx())
   {
      var A = this.fxQueue[0];
      if (A && A.anim && A.anim.isAnimated())
      {
         this.fxQueue = [A];
         A.anim.stop(true)
      }
   }
   return this
},beforeFx:function(A)
{
   if (this.hasActiveFx() && !A.concurrent)
   {
      if (A.stopFx)
      {
         this.stopFx();
         return true
      }
      return false
   }
   return true
},hasFxBlock:function()
{
   var A = this.fxQueue;
   return A && A[0] && A[0].block
},queueFx:function(C, A)
{
   if (!this.fxQueue)
   {
      this.fxQueue = []
   }
   if (!this.hasFxBlock())
   {
      Ext.applyIf(C, this.fxDefaults);
      if (!C.concurrent)
      {
         var B = this.beforeFx(C);
         A.block = C.block;
         this.fxQueue.push(A);
         if (B)
         {
            this.nextFx()
         }
      }
      else
      {
         A.call(this)
      }
   }
   return this
},fxWrap:function(F, D, C)
{
   var B;
   if (!D.wrap || !(B = Ext.get(D.wrap)))
   {
      var A;
      if (D.fixPosition)
      {
         A = this.getXY()
      }
      var E = document.createElement("div");
      E.style.visibility = C;
      B = Ext.get(this.dom.parentNode.insertBefore(E, this.dom));
      B.setPositioning(F);
      if (B.getStyle("position") == "static")
      {
         B.position("relative")
      }
      this.clearPositioning("auto");
      B.clip();
      B.dom.appendChild(this.dom);
      if (A)
      {
         B.setXY(A)
      }
   }
   return B
},fxUnwrap:function(A, C, B)
{
   this.clearPositioning();
   this.setPositioning(C);
   if (!B.wrap)
   {
      A.dom.parentNode.insertBefore(this.dom, A.dom);
      A.remove()
   }
},getFxRestore:function()
{
   var A = this.dom.style;
   return{pos:this.getPositioning(),width:A.width,height:A.height}
},afterFx:function(A)
{
   if (A.afterStyle)
   {
      this.applyStyles(A.afterStyle)
   }
   if (A.afterCls)
   {
      this.addClass(A.afterCls)
   }
   if (A.remove === true)
   {
      this.remove()
   }
   Ext.callback(A.callback, A.scope, [this]);
   if (!A.concurrent)
   {
      this.fxQueue.shift();
      this.nextFx()
   }
},getFxEl:function()
{
   return Ext.get(this.dom)
},fxanim:function(D, E, B, F, C, A)
{
   B = B || "run";
   E = E || {};
   var G = Ext.lib.Anim[B](this.dom, D, (E.duration || F) || 0.35, (E.easing || C) || "easeOut", function()
   {
      Ext.callback(A, this)
   }, this);
   E.anim = G;
   return G
}};
Ext.Fx.resize = Ext.Fx.scale;
Ext.apply(Ext.Element.prototype, Ext.Fx);
Ext.CompositeElement = function(A)
{
   this.elements = [];
   this.addElements(A)
};
Ext.CompositeElement.prototype = {isComposite:true,addElements:function(E)
{
   if (!E)
   {
      return this
   }
   if (typeof E == "string")
   {
      E = Ext.Element.selectorFunction(E)
   }
   var D = this.elements;
   var B = D.length - 1;
   for (var C = 0,A = E.length; C < A; C++)
   {
      D[++B] = Ext.get(E[C])
   }
   return this
},fill:function(A)
{
   this.elements = [];
   this.add(A);
   return this
},filter:function(A)
{
   var B = [];
   this.each(function(C)
   {
      if (C.is(A))
      {
         B[B.length] = C.dom
      }
   });
   this.fill(B);
   return this
},invoke:function(E, B)
{
   var D = this.elements;
   for (var C = 0,A = D.length; C < A; C++)
   {
      Ext.Element.prototype[E].apply(D[C], B)
   }
   return this
},add:function(A)
{
   if (typeof A == "string")
   {
      this.addElements(Ext.Element.selectorFunction(A))
   }
   else
   {
      if (A.length !== undefined)
      {
         this.addElements(A)
      }
      else
      {
         this.addElements([A])
      }
   }
   return this
},each:function(E, D)
{
   var C = this.elements;
   for (var B = 0,A = C.length; B < A; B++)
   {
      if (E.call(D || C[B], C[B], this, B) === false)
      {
         break
      }
   }
   return this
},item:function(A)
{
   return this.elements[A] || null
},first:function()
{
   return this.item(0)
},last:function()
{
   return this.item(this.elements.length - 1)
},getCount:function()
{
   return this.elements.length
},contains:function(A)
{
   return this.indexOf(A) !== -1
},indexOf:function(A)
{
   return this.elements.indexOf(Ext.get(A))
},removeElement:function(D, F)
{
   if (Ext.isArray(D))
   {
      for (var C = 0,A = D.length; C < A; C++)
      {
         this.removeElement(D[C])
      }
      return this
   }
   var B = typeof D == "number" ? D : this.indexOf(D);
   if (B !== -1 && this.elements[B])
   {
      if (F)
      {
         var E = this.elements[B];
         if (E.dom)
         {
            E.remove()
         }
         else
         {
            Ext.removeNode(E)
         }
      }
      this.elements.splice(B, 1)
   }
   return this
},replaceElement:function(D, C, A)
{
   var B = typeof D == "number" ? D : this.indexOf(D);
   if (B !== -1)
   {
      if (A)
      {
         this.elements[B].replaceWith(C)
      }
      else
      {
         this.elements.splice(B, 1, Ext.get(C))
      }
   }
   return this
},clear:function()
{
   this.elements = []
}};
(function()
{
   Ext.CompositeElement.createCall = function(B, C)
   {
      if (!B[C])
      {
         B[C] = function()
         {
            return this.invoke(C, arguments)
         }
      }
   };
   for (var A in Ext.Element.prototype)
   {
      if (typeof Ext.Element.prototype[A] == "function")
      {
         Ext.CompositeElement.createCall(Ext.CompositeElement.prototype, A)
      }
   }
})();
Ext.CompositeElementLite = function(A)
{
   Ext.CompositeElementLite.superclass.constructor.call(this, A);
   this.el = new Ext.Element.Flyweight()
};
Ext.extend(Ext.CompositeElementLite, Ext.CompositeElement, {addElements:function(E)
{
   if (E)
   {
      if (Ext.isArray(E))
      {
         this.elements = this.elements.concat(E)
      }
      else
      {
         var D = this.elements;
         var B = D.length - 1;
         for (var C = 0,A = E.length; C < A; C++)
         {
            D[++B] = E[C]
         }
      }
   }
   return this
},invoke:function(F, B)
{
   var D = this.elements;
   var E = this.el;
   for (var C = 0,A = D.length; C < A; C++)
   {
      E.dom = D[C];
      Ext.Element.prototype[F].apply(E, B)
   }
   return this
},item:function(A)
{
   if (!this.elements[A])
   {
      return null
   }
   this.el.dom = this.elements[A];
   return this.el
},addListener:function(B, G, F, E)
{
   var D = this.elements;
   for (var C = 0,A = D.length; C < A; C++)
   {
      Ext.EventManager.on(D[C], B, G, F || D[C], E)
   }
   return this
},each:function(F, E)
{
   var C = this.elements;
   var D = this.el;
   for (var B = 0,A = C.length; B < A; B++)
   {
      D.dom = C[B];
      if (F.call(E || D, D, this, B) === false)
      {
         break
      }
   }
   return this
},indexOf:function(A)
{
   return this.elements.indexOf(Ext.getDom(A))
},replaceElement:function(D, C, A)
{
   var B = typeof D == "number" ? D : this.indexOf(D);
   if (B !== -1)
   {
      C = Ext.getDom(C);
      if (A)
      {
         var E = this.elements[B];
         E.parentNode.insertBefore(C, E);
         Ext.removeNode(E)
      }
      this.elements.splice(B, 1, C)
   }
   return this
}});
Ext.CompositeElementLite.prototype.on = Ext.CompositeElementLite.prototype.addListener;
if (Ext.DomQuery)
{
   Ext.Element.selectorFunction = Ext.DomQuery.select
}
Ext.Element.select = function(A, D, B)
{
   var C;
   if (typeof A == "string")
   {
      C = Ext.Element.selectorFunction(A, B)
   }
   else
   {
      if (A.length !== undefined)
      {
         C = A
      }
      else
      {
         throw"Invalid selector"
      }
   }
   if (D === true)
   {
      return new Ext.CompositeElement(C)
   }
   else
   {
      return new Ext.CompositeElementLite(C)
   }
};
Ext.select = Ext.Element.select;
Ext.data.Connection = function(A)
{
   Ext.apply(this, A);
   this.addEvents("beforerequest", "requestcomplete", "requestexception");
   Ext.data.Connection.superclass.constructor.call(this)
};
Ext.extend(Ext.data.Connection, Ext.util.Observable, {timeout:30000,autoAbort:false,disableCaching:true,disableCachingParam:"_dc",request:function(E)
{
   if (this.fireEvent("beforerequest", this, E) !== false)
   {
      var C = E.params;
      if (typeof C == "function")
      {
         C = C.call(E.scope || window, E)
      }
      if (typeof C == "object")
      {
         C = Ext.urlEncode(C)
      }
      if (this.extraParams)
      {
         var G = Ext.urlEncode(this.extraParams);
         C = C ? (C + "&" + G) : G
      }
      var B = E.url || this.url;
      if (typeof B == "function")
      {
         B = B.call(E.scope || window, E)
      }
      if (E.form)
      {
         var D = Ext.getDom(E.form);
         B = B || D.action;
         var J = D.getAttribute("enctype");
         if (E.isUpload || (J && J.toLowerCase() == "multipart/form-data"))
         {
            return this.doFormUpload(E, C, B)
         }
         var I = Ext.lib.Ajax.serializeForm(D);
         C = C ? (C + "&" + I) : I
      }
      var K = E.headers;
      if (this.defaultHeaders)
      {
         K = Ext.apply(K || {}, this.defaultHeaders);
         if (!E.headers)
         {
            E.headers = K
         }
      }
      var F = {success:this.handleResponse,failure:this.handleFailure,scope:this,argument:{options:E},timeout:E.timeout || this.timeout};
      var A = E.method || this.method || ((C || E.xmlData || E.jsonData) ? "POST" : "GET");
      if (A == "GET" && (this.disableCaching && E.disableCaching !== false) || E.disableCaching === true)
      {
         var H = E.disableCachingParam || this.disableCachingParam;
         B += (B.indexOf("?") != -1 ? "&" : "?") + H + "=" + (new Date().getTime())
      }
      if (typeof E.autoAbort == "boolean")
      {
         if (E.autoAbort)
         {
            this.abort()
         }
      }
      else
      {
         if (this.autoAbort !== false)
         {
            this.abort()
         }
      }
      if ((A == "GET" || E.xmlData || E.jsonData) && C)
      {
         B += (B.indexOf("?") != -1 ? "&" : "?") + C;
         C = ""
      }
      this.transId = Ext.lib.Ajax.request(A, B, F, C, E);
      return this.transId
   }
   else
   {
      Ext.callback(E.callback, E.scope, [E,null,null]);
      return null
   }
},isLoading:function(A)
{
   if (A)
   {
      return Ext.lib.Ajax.isCallInProgress(A)
   }
   else
   {
      return this.transId ? true : false
   }
},abort:function(A)
{
   if (A || this.isLoading())
   {
      Ext.lib.Ajax.abort(A || this.transId)
   }
},handleResponse:function(A)
{
   this.transId = false;
   var B = A.argument.options;
   A.argument = B ? B.argument : null;
   this.fireEvent("requestcomplete", this, A, B);
   Ext.callback(B.success, B.scope, [A,B]);
   Ext.callback(B.callback, B.scope, [B,true,A])
},handleFailure:function(A, C)
{
   this.transId = false;
   var B = A.argument.options;
   A.argument = B ? B.argument : null;
   this.fireEvent("requestexception", this, A, B, C);
   Ext.callback(B.failure, B.scope, [A,B]);
   Ext.callback(B.callback, B.scope, [B,false,A])
},doFormUpload:function(E, A, B)
{
   var C = Ext.id();
   var F = document.createElement("iframe");
   F.id = C;
   F.name = C;
   F.className = "x-hidden";
   if (Ext.isIE)
   {
      F.src = Ext.SSL_SECURE_URL
   }
   document.body.appendChild(F);
   if (Ext.isIE)
   {
      document.frames[C].name = C
   }
   var D = Ext.getDom(E.form);
   D.target = C;
   D.method = "POST";
   D.enctype = D.encoding = "multipart/form-data";
   if (B)
   {
      D.action = B
   }
   var L,J;
   if (A)
   {
      L = [];
      A = Ext.urlDecode(A, false);
      for (var H in A)
      {
         if (A.hasOwnProperty(H))
         {
            J = document.createElement("input");
            J.type = "hidden";
            J.name = H;
            J.value = A[H];
            D.appendChild(J);
            L.push(J)
         }
      }
   }
   function G()
   {
      var M = {responseText:"",responseXML:null};
      M.argument = E ? E.argument : null;
      try
      {
         var O;
         if (Ext.isIE)
         {
            O = F.contentWindow.document
         }
         else
         {
            O = (F.contentDocument || window.frames[C].document)
         }
         if (O && O.body)
         {
            M.responseText = O.body.innerHTML
         }
         if (O && O.XMLDocument)
         {
            M.responseXML = O.XMLDocument
         }
         else
         {
            M.responseXML = O
         }
      }
      catch(N)
      {
      }
      Ext.EventManager.removeListener(F, "load", G, this);
      this.fireEvent("requestcomplete", this, M, E);
      Ext.callback(E.success, E.scope, [M,E]);
      Ext.callback(E.callback, E.scope, [E,true,M]);
      setTimeout(function()
      {
         Ext.removeNode(F)
      }, 100)
   }
   Ext.EventManager.on(F, "load", G, this);
   D.submit();
   if (L)
   {
      for (var I = 0,K = L.length; I < K; I++)
      {
         Ext.removeNode(L[I])
      }
   }
}});
Ext.Ajax = new Ext.data.Connection({autoAbort:false,serializeForm:function(A)
{
   return Ext.lib.Ajax.serializeForm(A)
}});
Ext.Updater = Ext.extend(Ext.util.Observable, {constructor:function(B, A)
{
   B = Ext.get(B);
   if (!A && B.updateManager)
   {
      return B.updateManager
   }
   this.el = B;
   this.defaultUrl = null;
   this.addEvents("beforeupdate", "update", "failure");
   var C = Ext.Updater.defaults;
   this.sslBlankUrl = C.sslBlankUrl;
   this.disableCaching = C.disableCaching;
   this.indicatorText = C.indicatorText;
   this.showLoadIndicator = C.showLoadIndicator;
   this.timeout = C.timeout;
   this.loadScripts = C.loadScripts;
   this.transaction = null;
   this.refreshDelegate = this.refresh.createDelegate(this);
   this.updateDelegate = this.update.createDelegate(this);
   this.formUpdateDelegate = this.formUpdate.createDelegate(this);
   if (!this.renderer)
   {
      this.renderer = this.getDefaultRenderer()
   }
   Ext.Updater.superclass.constructor.call(this)
},getDefaultRenderer:function()
{
   return new Ext.Updater.BasicRenderer()
},getEl:function()
{
   return this.el
},update:function(B, F, G, D)
{
   if (this.fireEvent("beforeupdate", this.el, B, F) !== false)
   {
      var A,C;
      if (typeof B == "object")
      {
         A = B;
         B = A.url;
         F = F || A.params;
         G = G || A.callback;
         D = D || A.discardUrl;
         C = A.scope;
         if (typeof A.nocache != "undefined")
         {
            this.disableCaching = A.nocache
         }
         if (typeof A.text != "undefined")
         {
            this.indicatorText = "<div class=\"loading-indicator\">" + A.text + "</div>"
         }
         if (typeof A.scripts != "undefined")
         {
            this.loadScripts = A.scripts
         }
         if (typeof A.timeout != "undefined")
         {
            this.timeout = A.timeout
         }
      }
      this.showLoading();
      if (!D)
      {
         this.defaultUrl = B
      }
      if (typeof B == "function")
      {
         B = B.call(this)
      }
      var E = Ext.apply({}, {url:B,params:(typeof F == "function" && C) ? F.createDelegate(C) :
                                          F,success:this.processSuccess,failure:this.processFailure,scope:this,callback:undefined,timeout:(this.timeout * 1000),disableCaching:this.disableCaching,argument:{"options":A,"url":B,"form":null,"callback":G,"scope":C || window,"params":F}}, A);
      this.transaction = Ext.Ajax.request(E)
   }
},formUpdate:function(C, A, B, D)
{
   if (this.fireEvent("beforeupdate", this.el, C, A) !== false)
   {
      if (typeof A == "function")
      {
         A = A.call(this)
      }
      C = Ext.getDom(C);
      this.transaction = Ext.Ajax.request({form:C,url:A,success:this.processSuccess,failure:this.processFailure,scope:this,timeout:(this.timeout * 1000),argument:{"url":A,"form":C,"callback":D,"reset":B}});
      this.showLoading.defer(1, this)
   }
},refresh:function(A)
{
   if (this.defaultUrl == null)
   {
      return
   }
   this.update(this.defaultUrl, null, A, true)
},startAutoRefresh:function(B, C, D, E, A)
{
   if (A)
   {
      this.update(C || this.defaultUrl, D, E, true)
   }
   if (this.autoRefreshProcId)
   {
      clearInterval(this.autoRefreshProcId)
   }
   this.autoRefreshProcId = setInterval(this.update.createDelegate(this, [C || this.defaultUrl,D,E,true]), B * 1000)
},stopAutoRefresh:function()
{
   if (this.autoRefreshProcId)
   {
      clearInterval(this.autoRefreshProcId);
      delete this.autoRefreshProcId
   }
},isAutoRefreshing:function()
{
   return this.autoRefreshProcId ? true : false
},showLoading:function()
{
   if (this.showLoadIndicator)
   {
      this.el.update(this.indicatorText)
   }
},processSuccess:function(A)
{
   this.transaction = null;
   if (A.argument.form && A.argument.reset)
   {
      try
      {
         A.argument.form.reset()
      }
      catch(B)
      {
      }
   }
   if (this.loadScripts)
   {
      this.renderer.render(this.el, A, this, this.updateComplete.createDelegate(this, [A]))
   }
   else
   {
      this.renderer.render(this.el, A, this);
      this.updateComplete(A)
   }
},updateComplete:function(A)
{
   this.fireEvent("update", this.el, A);
   if (typeof A.argument.callback == "function")
   {
      A.argument.callback.call(A.argument.scope, this.el, true, A, A.argument.options)
   }
},processFailure:function(A)
{
   this.transaction = null;
   this.fireEvent("failure", this.el, A);
   if (typeof A.argument.callback == "function")
   {
      A.argument.callback.call(A.argument.scope, this.el, false, A, A.argument.options)
   }
},setRenderer:function(A)
{
   this.renderer = A
},getRenderer:function()
{
   return this.renderer
},setDefaultUrl:function(A)
{
   this.defaultUrl = A
},abort:function()
{
   if (this.transaction)
   {
      Ext.Ajax.abort(this.transaction)
   }
},isUpdating:function()
{
   if (this.transaction)
   {
      return Ext.Ajax.isLoading(this.transaction)
   }
   return false
}});
Ext.Updater.defaults = {timeout:30,loadScripts:false,sslBlankUrl:(Ext.SSL_SECURE_URL || "javascript:false"),disableCaching:false,showLoadIndicator:true,indicatorText:"<div class=\"loading-indicator\">Loading...</div>"};
Ext.Updater.updateElement = function(D, C, E, B)
{
   var A = Ext.get(D).getUpdater();
   Ext.apply(A, B);
   A.update(C, E, B ? B.callback : null)
};
Ext.Updater.BasicRenderer = function()
{
};
Ext.Updater.BasicRenderer.prototype = {render:function(C, A, B, D)
{
   C.update(A.responseText, B.loadScripts, D)
}};
Ext.UpdateManager = Ext.Updater;
(function()
{
   Date.formatCodeToRegex = function(character, currentGroup)
   {
      var p = Date.parseCodes[character];
      if (p)
      {
         p = Ext.type(p) == "function" ? p() : p;
         Date.parseCodes[character] = p
      }
      return p ? Ext.applyIf({c:p.c ? String.format(p.c, currentGroup || "{0}") : p.c}, p) :
             {g:0,c:null,s:Ext.escapeRe(character)}
   };
   var $f = Date.formatCodeToRegex;
   Ext.apply(Date, {parseFunctions:{count:0},parseRegexes:[],formatFunctions:{count:0},daysInMonth:[31,28,31,30,31,30,31,31,30,31,30,31],y2kYear:50,MILLI:"ms",SECOND:"s",MINUTE:"mi",HOUR:"h",DAY:"d",MONTH:"mo",YEAR:"y",dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNumbers:{Jan:0,Feb:1,Mar:2,Apr:3,May:4,Jun:5,Jul:6,Aug:7,Sep:8,Oct:9,Nov:10,Dec:11},getShortMonthName:function(month)
   {
      return Date.monthNames[month].substring(0, 3)
   },getShortDayName:function(day)
   {
      return Date.dayNames[day].substring(0, 3)
   },getMonthNumber:function(name)
   {
      return Date.monthNumbers[name.substring(0, 1).toUpperCase() + name.substring(1, 3).toLowerCase()]
   },formatCodes:{d:"String.leftPad(this.getDate(), 2, '0')",D:"Date.getShortDayName(this.getDay())",j:"this.getDate()",l:"Date.dayNames[this.getDay()]",N:"(this.getDay() ? this.getDay() : 7)",S:"this.getSuffix()",w:"this.getDay()",z:"this.getDayOfYear()",W:"String.leftPad(this.getWeekOfYear(), 2, '0')",F:"Date.monthNames[this.getMonth()]",m:"String.leftPad(this.getMonth() + 1, 2, '0')",M:"Date.getShortMonthName(this.getMonth())",n:"(this.getMonth() + 1)",t:"this.getDaysInMonth()",L:"(this.isLeapYear() ? 1 : 0)",o:"(this.getFullYear() + (this.getWeekOfYear() == 1 && this.getMonth() > 0 ? +1 : (this.getWeekOfYear() >= 52 && this.getMonth() < 11 ? -1 : 0)))",Y:"this.getFullYear()",y:"('' + this.getFullYear()).substring(2, 4)",a:"(this.getHours() < 12 ? 'am' : 'pm')",A:"(this.getHours() < 12 ? 'AM' : 'PM')",g:"((this.getHours() % 12) ? this.getHours() % 12 : 12)",G:"this.getHours()",h:"String.leftPad((this.getHours() % 12) ? this.getHours() % 12 : 12, 2, '0')",H:"String.leftPad(this.getHours(), 2, '0')",i:"String.leftPad(this.getMinutes(), 2, '0')",s:"String.leftPad(this.getSeconds(), 2, '0')",u:"String.leftPad(this.getMilliseconds(), 3, '0')",O:"this.getGMTOffset()",P:"this.getGMTOffset(true)",T:"this.getTimezone()",Z:"(this.getTimezoneOffset() * -60)",c:function()
   {
      for (var c = "Y-m-dTH:i:sP",code = [],i = 0,l = c.length; i < l; ++i)
      {
         var e = c.charAt(i);
         code.push(e == "T" ? "'T'" : Date.getFormatCode(e))
      }
      return code.join(" + ")
   },U:"Math.round(this.getTime() / 1000)"},parseDate:function(input, format)
   {
      var p = Date.parseFunctions;
      if (p[format] == null)
      {
         Date.createParser(format)
      }
      var func = p[format];
      return Date[func](input)
   },getFormatCode:function(character)
   {
      var f = Date.formatCodes[character];
      if (f)
      {
         f = Ext.type(f) == "function" ? f() : f;
         Date.formatCodes[character] = f
      }
      return f || ("'" + String.escape(character) + "'")
   },createNewFormat:function(format)
   {
      var funcName = "format" + Date.formatFunctions.count++;
      Date.formatFunctions[format] = funcName;
      var code = "Date.prototype." + funcName + " = function(){return ";
      var special = false;
      var ch = "";
      for (var i = 0; i < format.length; ++i)
      {
         ch = format.charAt(i);
         if (!special && ch == "\\")
         {
            special = true
         }
         else
         {
            if (special)
            {
               special = false;
               code += "'" + String.escape(ch) + "' + "
            }
            else
            {
               code += Date.getFormatCode(ch) + " + "
            }
         }
      }
      eval(code.substring(0, code.length - 3) + ";}")
   },createParser:function(format)
   {
      var funcName = "parse" + Date.parseFunctions.count++;
      var regexNum = Date.parseRegexes.length;
      var currentGroup = 1;
      Date.parseFunctions[format] = funcName;
      var code = "Date." + funcName + " = function(input){\n" + "var y, m, d, h = 0, i = 0, s = 0, ms = 0, o, z, u, v;\n" + "input = String(input);\n" + "d = new Date();\n" + "y = d.getFullYear();\n" + "m = d.getMonth();\n" + "d = d.getDate();\n" + "var results = input.match(Date.parseRegexes[" + regexNum + "]);\n" + "if (results && results.length > 0) {";
      var regex = "";
      var special = false;
      var ch = "";
      for (var i = 0; i < format.length; ++i)
      {
         ch = format.charAt(i);
         if (!special && ch == "\\")
         {
            special = true
         }
         else
         {
            if (special)
            {
               special = false;
               regex += String.escape(ch)
            }
            else
            {
               var obj = Date.formatCodeToRegex(ch, currentGroup);
               currentGroup += obj.g;
               regex += obj.s;
               if (obj.g && obj.c)
               {
                  code += obj.c
               }
            }
         }
      }
      code += "if (u){\n" + "v = new Date(u * 1000);\n" + "}else if (y >= 0 && m >= 0 && d > 0 && h >= 0 && i >= 0 && s >= 0 && ms >= 0){\n" + "v = new Date(y, m, d, h, i, s, ms);\n" + "}else if (y >= 0 && m >= 0 && d > 0 && h >= 0 && i >= 0 && s >= 0){\n" + "v = new Date(y, m, d, h, i, s);\n" + "}else if (y >= 0 && m >= 0 && d > 0 && h >= 0 && i >= 0){\n" + "v = new Date(y, m, d, h, i);\n" + "}else if (y >= 0 && m >= 0 && d > 0 && h >= 0){\n" + "v = new Date(y, m, d, h);\n" + "}else if (y >= 0 && m >= 0 && d > 0){\n" + "v = new Date(y, m, d);\n" + "}else if (y >= 0 && m >= 0){\n" + "v = new Date(y, m);\n" + "}else if (y >= 0){\n" + "v = new Date(y);\n" + "}\n}\nreturn (v && (z || o))?" + " (Ext.type(z) == 'number' ? v.add(Date.SECOND, -v.getTimezoneOffset() * 60 - z) :" + " v.add(Date.MINUTE, -v.getTimezoneOffset() + (sn == '+'? -1 : 1) * (hr * 60 + mn))) : v;\n" + "}";
      Date.parseRegexes[regexNum] = new RegExp("^" + regex + "$", "i");
      eval(code)
   },parseCodes:{d:{g:1,c:"d = parseInt(results[{0}], 10);\n",s:"(\\d{2})"},j:{g:1,c:"d = parseInt(results[{0}], 10);\n",s:"(\\d{1,2})"},D:function()
   {
      for (var a = [],i = 0; i < 7; a.push(Date.getShortDayName(i)),++i)
      {
      }
      return{g:0,c:null,s:"(?:" + a.join("|") + ")"}
   },l:function()
   {
      return{g:0,c:null,s:"(?:" + Date.dayNames.join("|") + ")"}
   },N:{g:0,c:null,s:"[1-7]"},S:{g:0,c:null,s:"(?:st|nd|rd|th)"},w:{g:0,c:null,s:"[0-6]"},z:{g:0,c:null,s:"(?:\\d{1,3}"},W:{g:0,c:null,s:"(?:\\d{2})"},F:function()
   {
      return{g:1,c:"m = parseInt(Date.getMonthNumber(results[{0}]), 10);\n",s:"(" + Date.monthNames.join("|") + ")"}
   },M:function()
   {
      for (var a = [],i = 0; i < 12; a.push(Date.getShortMonthName(i)),++i)
      {
      }
      return Ext.applyIf({s:"(" + a.join("|") + ")"}, $f("F"))
   },m:{g:1,c:"m = parseInt(results[{0}], 10) - 1;\n",s:"(\\d{2})"},n:{g:1,c:"m = parseInt(results[{0}], 10) - 1;\n",s:"(\\d{1,2})"},t:{g:0,c:null,s:"(?:\\d{2})"},L:{g:0,c:null,s:"(?:1|0)"},o:function()
   {
      return $f("Y")
   },Y:{g:1,c:"y = parseInt(results[{0}], 10);\n",s:"(\\d{4})"},y:{g:1,c:"var ty = parseInt(results[{0}], 10);\n" + "y = ty > Date.y2kYear ? 1900 + ty : 2000 + ty;\n",s:"(\\d{1,2})"},a:{g:1,c:"if (results[{0}] == 'am') {\n" + "if (h == 12) { h = 0; }\n" + "} else { if (h < 12) { h += 12; }}",s:"(am|pm)"},A:{g:1,c:"if (results[{0}] == 'AM') {\n" + "if (h == 12) { h = 0; }\n" + "} else { if (h < 12) { h += 12; }}",s:"(AM|PM)"},g:function()
   {
      return $f("G")
   },G:{g:1,c:"h = parseInt(results[{0}], 10);\n",s:"(\\d{1,2})"},h:function()
   {
      return $f("H")
   },H:{g:1,c:"h = parseInt(results[{0}], 10);\n",s:"(\\d{2})"},i:{g:1,c:"i = parseInt(results[{0}], 10);\n",s:"(\\d{2})"},s:{g:1,c:"s = parseInt(results[{0}], 10);\n",s:"(\\d{2})"},u:{g:1,c:"ms = results[{0}]; ms = parseInt(ms, 10)/Math.pow(10, ms.length - 3);\n",s:"(\\d+)"},O:{g:1,c:["o = results[{0}];","var sn = o.substring(0,1);","var hr = o.substring(1,3)*1 + Math.floor(o.substring(3,5) / 60);","var mn = o.substring(3,5) % 60;","o = ((-12 <= (hr*60 + mn)/60) && ((hr*60 + mn)/60 <= 14))? (sn + String.leftPad(hr, 2, '0') + String.leftPad(mn, 2, '0')) : null;\n"].join("\n"),s:"([+-]\\d{4})"},P:{g:1,c:["o = results[{0}];","var sn = o.substring(0,1);","var hr = o.substring(1,3)*1 + Math.floor(o.substring(4,6) / 60);","var mn = o.substring(4,6) % 60;","o = ((-12 <= (hr*60 + mn)/60) && ((hr*60 + mn)/60 <= 14))? (sn + String.leftPad(hr, 2, '0') + String.leftPad(mn, 2, '0')) : null;\n"].join("\n"),s:"([+-]\\d{2}:\\d{2})"},T:{g:0,c:null,s:"[A-Z]{1,4}"},Z:{g:1,c:"z = results[{0}] * 1;\n" + "z = (-43200 <= z && z <= 50400)? z : null;\n",s:"([+-]?\\d{1,5})"},c:function()
   {
      var calc = [];
      var arr = [$f("Y", 1),$f("m", 2),$f("d", 3),$f("h", 4),$f("i", 5),$f("s", 6),{c:"ms = (results[7] || '.0').substring(1); ms = parseInt(ms, 10)/Math.pow(10, ms.length - 3);\n"},{c:"if(results[9] == 'Z'){\no = 0;\n}else{\n" + $f("P", 9).c + "\n}"}];
      for (var i = 0,l = arr.length; i < l; ++i)
      {
         calc.push(arr[i].c)
      }
      return{g:1,c:calc.join(""),s:arr[0].s + "-" + arr[1].s + "-" + arr[2].s + "T" + arr[3].s + ":" + arr[4].s + ":" + arr[5].s + "((.|,)\\d+)?" + "(" + $f("P", null).s + "|Z)"}
   },U:{g:1,c:"u = parseInt(results[{0}], 10);\n",s:"(-?\\d+)"}}})
}());
Ext.override(Date, {dateFormat:function(B)
{
   if (Date.formatFunctions[B] == null)
   {
      Date.createNewFormat(B)
   }
   var A = Date.formatFunctions[B];
   return this[A]()
},getTimezone:function()
{
   return this.toString().replace(/^.* (?:\((.*)\)|([A-Z]{1,4})(?:[\-+][0-9]{4})?(?: -?\d+)?)$/, "$1$2").replace(/[^A-Z]/g, "")
},getGMTOffset:function(A)
{
   return(this.getTimezoneOffset() > 0 ? "-" :
          "+") + String.leftPad(Math.abs(Math.floor(this.getTimezoneOffset() / 60)), 2, "0") + (A ? ":" :
                                                                                                "") + String.leftPad(Math.abs(this.getTimezoneOffset() % 60), 2, "0")
},getDayOfYear:function()
{
   var A = 0;
   Date.daysInMonth[1] = this.isLeapYear() ? 29 : 28;
   for (var B = 0; B < this.getMonth(); ++B)
   {
      A += Date.daysInMonth[B]
   }
   return A + this.getDate() - 1
},getWeekOfYear:function()
{
   var B = 86400000;
   var C = 7 * B;
   var D = Date.UTC(this.getFullYear(), this.getMonth(), this.getDate() + 3) / B;
   var A = Math.floor(D / 7);
   var E = new Date(A * C).getUTCFullYear();
   return A - Math.floor(Date.UTC(E, 0, 7) / C) + 1
},isLeapYear:function()
{
   var A = this.getFullYear();
   return !!((A & 3) == 0 && (A % 100 || (A % 400 == 0 && A)))
},getFirstDayOfMonth:function()
{
   var A = (this.getDay() - (this.getDate() - 1)) % 7;
   return(A < 0) ? (A + 7) : A
},getLastDayOfMonth:function()
{
   var A = (this.getDay() + (Date.daysInMonth[this.getMonth()] - this.getDate())) % 7;
   return(A < 0) ? (A + 7) : A
},getFirstDateOfMonth:function()
{
   return new Date(this.getFullYear(), this.getMonth(), 1)
},getLastDateOfMonth:function()
{
   return new Date(this.getFullYear(), this.getMonth(), this.getDaysInMonth())
},getDaysInMonth:function()
{
   Date.daysInMonth[1] = this.isLeapYear() ? 29 : 28;
   return Date.daysInMonth[this.getMonth()]
},getSuffix:function()
{
   switch (this.getDate())
      {case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th"}
},clone:function()
{
   return new Date(this.getTime())
},clearTime:function(A)
{
   if (A)
   {
      return this.clone().clearTime()
   }
   this.setHours(0);
   this.setMinutes(0);
   this.setSeconds(0);
   this.setMilliseconds(0);
   return this
},add:function(B, C)
{
   var D = this.clone();
   if (!B || C === 0)
   {
      return D
   }
   switch (B.toLowerCase())
      {case Date.MILLI:D.setMilliseconds(this.getMilliseconds() + C);break;case Date.SECOND:D.setSeconds(this.getSeconds() + C);break;case Date.MINUTE:D.setMinutes(this.getMinutes() + C);break;case Date.HOUR:D.setHours(this.getHours() + C);break;case Date.DAY:D.setDate(this.getDate() + C);break;case Date.MONTH:var A = this.getDate();if (A > 28)
   {
      A = Math.min(A, this.getFirstDateOfMonth().add("mo", C).getLastDateOfMonth().getDate())
   }D.setDate(A);D.setMonth(this.getMonth() + C);break;case Date.YEAR:D.setFullYear(this.getFullYear() + C);break}
   return D
},between:function(C, A)
{
   var B = this.getTime();
   return C.getTime() <= B && B <= A.getTime()
}});
Date.prototype.format = Date.prototype.dateFormat;
if (Ext.isSafari)
{
   Date.brokenSetMonth = Date.prototype.setMonth;
   Date.prototype.setMonth = function(A)
   {
      if (A <= -1)
      {
         var D = Math.ceil(-A);
         var C = Math.ceil(D / 12);
         var B = (D % 12) ? 12 - D % 12 : 0;
         this.setFullYear(this.getFullYear() - C);
         return Date.brokenSetMonth.call(this, B)
      }
      else
      {
         return Date.brokenSetMonth.apply(this, arguments)
      }
   }
}
;
Ext.util.DelayedTask = function(E, D, A)
{
   var G = null,F,B;
   var C = function()
   {
      var H = new Date().getTime();
      if (H - B >= F)
      {
         clearInterval(G);
         G = null;
         E.apply(D, A || [])
      }
   };
   this.delay = function(I, K, J, H)
   {
      if (G && I != F)
      {
         this.cancel()
      }
      F = I;
      B = new Date().getTime();
      E = K || E;
      D = J || D;
      A = H || A;
      if (!G)
      {
         G = setInterval(C, F)
      }
   };
   this.cancel = function()
   {
      if (G)
      {
         clearInterval(G);
         G = null
      }
   }
};
Ext.util.TaskRunner = function(E)
{
   E = E || 10;
   var F = [],A = [];
   var B = 0;
   var G = false;
   var D = function()
   {
      G = false;
      clearInterval(B);
      B = 0
   };
   var H = function()
   {
      if (!G)
      {
         G = true;
         B = setInterval(I, E)
      }
   };
   var C = function(J)
   {
      A.push(J);
      if (J.onStop)
      {
         J.onStop.apply(J.scope || J)
      }
   };
   var I = function()
   {
      if (A.length > 0)
      {
         for (var O = 0,K = A.length; O < K; O++)
         {
            F.remove(A[O])
         }
         A = [];
         if (F.length < 1)
         {
            D();
            return
         }
      }
      var M = new Date().getTime();
      for (var O = 0,K = F.length; O < K; ++O)
      {
         var N = F[O];
         var J = M - N.taskRunTime;
         if (N.interval <= J)
         {
            var L = N.run.apply(N.scope || N, N.args || [++N.taskRunCount]);
            N.taskRunTime = M;
            if (L === false || N.taskRunCount === N.repeat)
            {
               C(N);
               return
            }
         }
         if (N.duration && N.duration <= (M - N.taskStartTime))
         {
            C(N)
         }
      }
   };
   this.start = function(J)
   {
      F.push(J);
      J.taskStartTime = new Date().getTime();
      J.taskRunTime = 0;
      J.taskRunCount = 0;
      H();
      return J
   };
   this.stop = function(J)
   {
      C(J);
      return J
   };
   this.stopAll = function()
   {
      D();
      for (var K = 0,J = F.length; K < J; K++)
      {
         if (F[K].onStop)
         {
            F[K].onStop()
         }
      }
      F = [];
      A = []
   }
};
Ext.TaskMgr = new Ext.util.TaskRunner();
Ext.util.MixedCollection = function(B, A)
{
   this.items = [];
   this.map = {};
   this.keys = [];
   this.length = 0;
   this.addEvents("clear", "add", "replace", "remove", "sort");
   this.allowFunctions = B === true;
   if (A)
   {
      this.getKey = A
   }
   Ext.util.MixedCollection.superclass.constructor.call(this)
};
Ext.extend(Ext.util.MixedCollection, Ext.util.Observable, {allowFunctions:false,add:function(B, C)
{
   if (arguments.length == 1)
   {
      C = arguments[0];
      B = this.getKey(C)
   }
   if (typeof B == "undefined" || B === null)
   {
      this.length++;
      this.items.push(C);
      this.keys.push(null)
   }
   else
   {
      var A = this.map[B];
      if (A)
      {
         return this.replace(B, C)
      }
      this.length++;
      this.items.push(C);
      this.map[B] = C;
      this.keys.push(B)
   }
   this.fireEvent("add", this.length - 1, C, B);
   return C
},getKey:function(A)
{
   return A.id
},replace:function(C, D)
{
   if (arguments.length == 1)
   {
      D = arguments[0];
      C = this.getKey(D)
   }
   var A = this.item(C);
   if (typeof C == "undefined" || C === null || typeof A == "undefined")
   {
      return this.add(C, D)
   }
   var B = this.indexOfKey(C);
   this.items[B] = D;
   this.map[C] = D;
   this.fireEvent("replace", C, A, D);
   return D
},addAll:function(E)
{
   if (arguments.length > 1 || Ext.isArray(E))
   {
      var B = arguments.length > 1 ? arguments : E;
      for (var D = 0,A = B.length; D < A; D++)
      {
         this.add(B[D])
      }
   }
   else
   {
      for (var C in E)
      {
         if (this.allowFunctions || typeof E[C] != "function")
         {
            this.add(C, E[C])
         }
      }
   }
},each:function(E, D)
{
   var B = [].concat(this.items);
   for (var C = 0,A = B.length; C < A; C++)
   {
      if (E.call(D || B[C], B[C], C, A) === false)
      {
         break
      }
   }
},eachKey:function(D, C)
{
   for (var B = 0,A = this.keys.length; B < A; B++)
   {
      D.call(C || window, this.keys[B], this.items[B], B, A)
   }
},find:function(D, C)
{
   for (var B = 0,A = this.items.length; B < A; B++)
   {
      if (D.call(C || window, this.items[B], this.keys[B]))
      {
         return this.items[B]
      }
   }
   return null
},insert:function(A, B, C)
{
   if (arguments.length == 2)
   {
      C = arguments[1];
      B = this.getKey(C)
   }
   if (A >= this.length)
   {
      return this.add(B, C)
   }
   this.length++;
   this.items.splice(A, 0, C);
   if (typeof B != "undefined" && B != null)
   {
      this.map[B] = C
   }
   this.keys.splice(A, 0, B);
   this.fireEvent("add", A, C, B);
   return C
},remove:function(A)
{
   return this.removeAt(this.indexOf(A))
},removeAt:function(A)
{
   if (A < this.length && A >= 0)
   {
      this.length--;
      var C = this.items[A];
      this.items.splice(A, 1);
      var B = this.keys[A];
      if (typeof B != "undefined")
      {
         delete this.map[B]
      }
      this.keys.splice(A, 1);
      this.fireEvent("remove", C, B);
      return C
   }
   return false
},removeKey:function(A)
{
   return this.removeAt(this.indexOfKey(A))
},getCount:function()
{
   return this.length
},indexOf:function(A)
{
   return this.items.indexOf(A)
},indexOfKey:function(A)
{
   return this.keys.indexOf(A)
},item:function(A)
{
   var B = typeof this.map[A] != "undefined" ? this.map[A] : this.items[A];
   return typeof B != "function" || this.allowFunctions ? B : null
},itemAt:function(A)
{
   return this.items[A]
},key:function(A)
{
   return this.map[A]
},contains:function(A)
{
   return this.indexOf(A) != -1
},containsKey:function(A)
{
   return typeof this.map[A] != "undefined"
},clear:function()
{
   this.length = 0;
   this.items = [];
   this.keys = [];
   this.map = {};
   this.fireEvent("clear")
},first:function()
{
   return this.items[0]
},last:function()
{
   return this.items[this.length - 1]
},_sort:function(I, A, H)
{
   var C = String(A).toUpperCase() == "DESC" ? -1 : 1;
   H = H || function(K, J)
   {
      return K - J
   };
   var G = [],B = this.keys,F = this.items;
   for (var D = 0,E = F.length; D < E; D++)
   {
      G[G.length] = {key:B[D],value:F[D],index:D}
   }
   G.sort(function(K, J)
   {
      var L = H(K[I], J[I]) * C;
      if (L == 0)
      {
         L = (K.index < J.index ? -1 : 1)
      }
      return L
   });
   for (var D = 0,E = G.length; D < E; D++)
   {
      F[D] = G[D].value;
      B[D] = G[D].key
   }
   this.fireEvent("sort", this)
},sort:function(A, B)
{
   this._sort("value", A, B)
},keySort:function(A, B)
{
   this._sort("key", A, B || function(D, C)
   {
      return String(D).toUpperCase() - String(C).toUpperCase()
   })
},getRange:function(E, A)
{
   var B = this.items;
   if (B.length < 1)
   {
      return[]
   }
   E = E || 0;
   A = Math.min(typeof A == "undefined" ? this.length - 1 : A, this.length - 1);
   var D = [];
   if (E <= A)
   {
      for (var C = E; C <= A; C++)
      {
         D[D.length] = B[C]
      }
   }
   else
   {
      for (var C = E; C >= A; C--)
      {
         D[D.length] = B[C]
      }
   }
   return D
},filter:function(C, B, D, A)
{
   if (Ext.isEmpty(B, false))
   {
      return this.clone()
   }
   B = this.createValueMatcher(B, D, A);
   return this.filterBy(function(E)
   {
      return E && B.test(E[C])
   })
},filterBy:function(F, E)
{
   var G = new Ext.util.MixedCollection();
   G.getKey = this.getKey;
   var B = this.keys,D = this.items;
   for (var C = 0,A = D.length; C < A; C++)
   {
      if (F.call(E || this, D[C], B[C]))
      {
         G.add(B[C], D[C])
      }
   }
   return G
},findIndex:function(C, B, E, D, A)
{
   if (Ext.isEmpty(B, false))
   {
      return -1
   }
   B = this.createValueMatcher(B, D, A);
   return this.findIndexBy(function(F)
   {
      return F && B.test(F[C])
   }, null, E)
},findIndexBy:function(F, E, G)
{
   var B = this.keys,D = this.items;
   for (var C = (G || 0),A = D.length; C < A; C++)
   {
      if (F.call(E || this, D[C], B[C]))
      {
         return C
      }
   }
   if (typeof G == "number" && G > 0)
   {
      for (var C = 0; C < G; C++)
      {
         if (F.call(E || this, D[C], B[C]))
         {
            return C
         }
      }
   }
   return -1
},createValueMatcher:function(B, C, A)
{
   if (!B.exec)
   {
      B = String(B);
      B = new RegExp((C === true ? "" : "^") + Ext.escapeRe(B), A ? "" : "i")
   }
   return B
},clone:function()
{
   var E = new Ext.util.MixedCollection();
   var B = this.keys,D = this.items;
   for (var C = 0,A = D.length; C < A; C++)
   {
      E.add(B[C], D[C])
   }
   E.getKey = this.getKey;
   return E
}});
Ext.util.MixedCollection.prototype.get = Ext.util.MixedCollection.prototype.item;
Ext.util.JSON = new (function()
{
   var useHasOwn = !!{}.hasOwnProperty;
   var pad = function(n)
   {
      return n < 10 ? "0" + n : n
   };
   var m = {"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r","\"":"\\\"","\\":"\\\\"};
   var encodeString = function(s)
   {
      if (/["\\\x00-\x1f]/.test(s))
      {
         return"\"" + s.replace(/([\x00-\x1f\\"])/g, function(a, b)
         {
            var c = m[b];
            if (c)
            {
               return c
            }
            c = b.charCodeAt();
            return"\\u00" + Math.floor(c / 16).toString(16) + (c % 16).toString(16)
         }) + "\""
      }
      return"\"" + s + "\""
   };
   var encodeArray = function(o)
   {
      var a = ["["],b,i,l = o.length,v;
      for (i = 0; i < l; i += 1)
      {
         v = o[i];
         switch (typeof v)
            {case"undefined":case"function":case"unknown":break;default:if (b)
         {
            a.push(",")
         }a.push(v === null ? "null" : Ext.util.JSON.encode(v));b = true}
      }
      a.push("]");
      return a.join("")
   };
   this.encodeDate = function(o)
   {
      return"\"" + o.getFullYear() + "-" + pad(o.getMonth() + 1) + "-" + pad(o.getDate()) + "T" + pad(o.getHours()) + ":" + pad(o.getMinutes()) + ":" + pad(o.getSeconds()) + "\""
   };
   this.encode = function(o)
   {
      if (typeof o == "undefined" || o === null)
      {
         return"null"
      }
      else
      {
         if (Ext.isArray(o))
         {
            return encodeArray(o)
         }
         else
         {
            if (Ext.isDate(o))
            {
               return Ext.util.JSON.encodeDate(o)
            }
            else
            {
               if (typeof o == "string")
               {
                  return encodeString(o)
               }
               else
               {
                  if (typeof o == "number")
                  {
                     return isFinite(o) ? String(o) : "null"
                  }
                  else
                  {
                     if (typeof o == "boolean")
                     {
                        return String(o)
                     }
                     else
                     {
                        var a = ["{"],b,i,v;
                        for (i in o)
                        {
                           if (!useHasOwn || o.hasOwnProperty(i))
                           {
                              v = o[i];
                              switch (typeof v)
                                 {case"undefined":case"function":case"unknown":break;default:if (b)
                              {
                                 a.push(",")
                              }a.push(this.encode(i), ":", v === null ? "null" : this.encode(v));b = true}
                           }
                        }
                        a.push("}");
                        return a.join("")
                     }
                  }
               }
            }
         }
      }
   };
   this.decode = function(json)
   {
      return eval("(" + json + ")")
   }
})();
Ext.encode = Ext.util.JSON.encode;
Ext.decode = Ext.util.JSON.decode;
Ext.util.Format = function()
{
   var trimRe = /^\s+|\s+$/g;
   return{ellipsis:function(value, len)
   {
      if (value && value.length > len)
      {
         return value.substr(0, len - 3) + "..."
      }
      return value
   },undef:function(value)
   {
      return value !== undefined ? value : ""
   },defaultValue:function(value, defaultValue)
   {
      return value !== undefined && value !== "" ? value : defaultValue
   },htmlEncode:function(value)
   {
      return !value ? value :
             String(value).replace(/&/g, "&amp;").replace(/>/g, "&gt;").replace(/</g, "&lt;").replace(/"/g, "&quot;")
   },htmlDecode:function(value)
   {
      return !value ? value :
             String(value).replace(/&gt;/g, ">").replace(/&lt;/g, "<").replace(/&quot;/g, "\"").replace(/&amp;/g, "&")
   },trim:function(value)
   {
      return String(value).replace(trimRe, "")
   },substr:function(value, start, length)
   {
      return String(value).substr(start, length)
   },lowercase:function(value)
   {
      return String(value).toLowerCase()
   },uppercase:function(value)
   {
      return String(value).toUpperCase()
   },capitalize:function(value)
   {
      return !value ? value : value.charAt(0).toUpperCase() + value.substr(1).toLowerCase()
   },call:function(value, fn)
   {
      if (arguments.length > 2)
      {
         var args = Array.prototype.slice.call(arguments, 2);
         args.unshift(value);
         return eval(fn).apply(window, args)
      }
      else
      {
         return eval(fn).call(window, value)
      }
   },usMoney:function(v)
   {
      v = (Math.round((v - 0) * 100)) / 100;
      v = (v == Math.floor(v)) ? v + ".00" : ((v * 10 == Math.floor(v * 10)) ? v + "0" : v);
      v = String(v);
      var ps = v.split(".");
      var whole = ps[0];
      var sub = ps[1] ? "." + ps[1] : ".00";
      var r = /(\d+)(\d{3})/;
      while (r.test(whole))
      {
         whole = whole.replace(r, "$1" + "," + "$2")
      }
      v = whole + sub;
      if (v.charAt(0) == "-")
      {
         return"-$" + v.substr(1)
      }
      return"$" + v
   },date:function(v, format)
   {
      if (!v)
      {
         return""
      }
      if (!Ext.isDate(v))
      {
         v = new Date(Date.parse(v))
      }
      return v.dateFormat(format || "m/d/Y")
   },dateRenderer:function(format)
   {
      return function(v)
      {
         return Ext.util.Format.date(v, format)
      }
   },stripTagsRE:/<\/?[^>]+>/gi,stripTags:function(v)
   {
      return !v ? v : String(v).replace(this.stripTagsRE, "")
   },stripScriptsRe:/(?:<script.*?>)((\n|\r|.)*?)(?:<\/script>)/ig,stripScripts:function(v)
   {
      return !v ? v : String(v).replace(this.stripScriptsRe, "")
   },fileSize:function(size)
   {
      if (size < 1024)
      {
         return size + " bytes"
      }
      else
      {
         if (size < 1048576)
         {
            return(Math.round(((size * 10) / 1024)) / 10) + " KB"
         }
         else
         {
            return(Math.round(((size * 10) / 1048576)) / 10) + " MB"
         }
      }
   },math:function()
   {
      var fns = {};
      return function(v, a)
      {
         if (!fns[a])
         {
            fns[a] = new Function("v", "return v " + a + ";")
         }
         return fns[a](v)
      }
   }(),nl2br:function(v)
   {
      return v === undefined || v === null ? "" : v.replace(/\n/g, "<br/>")
   }}
}();
Ext.XTemplate = function()
{
   Ext.XTemplate.superclass.constructor.apply(this, arguments);
   var P = this.html;
   P = ["<tpl>",P,"</tpl>"].join("");
   var O = /<tpl\b[^>]*>((?:(?=([^<]+))\2|<(?!tpl\b[^>]*>))*?)<\/tpl>/;
   var N = /^<tpl\b[^>]*?for="(.*?)"/;
   var L = /^<tpl\b[^>]*?if="(.*?)"/;
   var J = /^<tpl\b[^>]*?exec="(.*?)"/;
   var C,B = 0;
   var G = [];
   while (C = P.match(O))
   {
      var M = C[0].match(N);
      var K = C[0].match(L);
      var I = C[0].match(J);
      var E = null,H = null,D = null;
      var A = M && M[1] ? M[1] : "";
      if (K)
      {
         E = K && K[1] ? K[1] : null;
         if (E)
         {
            H = new Function("values", "parent", "xindex", "xcount", "with(values){ return " + (Ext.util.Format.htmlDecode(E)) + "; }")
         }
      }
      if (I)
      {
         E = I && I[1] ? I[1] : null;
         if (E)
         {
            D = new Function("values", "parent", "xindex", "xcount", "with(values){ " + (Ext.util.Format.htmlDecode(E)) + "; }")
         }
      }
      if (A)
      {
         switch (A)
            {case".":A = new Function("values", "parent", "with(values){ return values; }");break;case"..":A = new Function("values", "parent", "with(values){ return parent; }");break;default:A = new Function("values", "parent", "with(values){ return " + A + "; }")}
      }
      G.push({id:B,target:A,exec:D,test:H,body:C[1] || ""});
      P = P.replace(C[0], "{xtpl" + B + "}");
      ++B
   }
   for (var F = G.length - 1; F >= 0; --F)
   {
      this.compileTpl(G[F])
   }
   this.master = G[G.length - 1];
   this.tpls = G
};
Ext.extend(Ext.XTemplate, Ext.Template, {re:/\{([\w-\.\#]+)(?:\:([\w\.]*)(?:\((.*?)?\))?)?(\s?[\+\-\*\\]\s?[\d\.\+\-\*\\\(\)]+)?\}/g,codeRe:/\{\[((?:\\\]|.|\n)*?)\]\}/g,applySubTemplate:function(A, H, G, D, C)
{
   var J = this.tpls[A];
   if (J.test && !J.test.call(this, H, G, D, C))
   {
      return""
   }
   if (J.exec && J.exec.call(this, H, G, D, C))
   {
      return""
   }
   var I = J.target ? J.target.call(this, H, G) : H;
   G = J.target ? H : G;
   if (J.target && Ext.isArray(I))
   {
      var B = [];
      for (var E = 0,F = I.length; E < F; E++)
      {
         B[B.length] = J.compiled.call(this, I[E], G, E + 1, F)
      }
      return B.join("")
   }
   return J.compiled.call(this, I, G, D, C)
},compileTpl:function(tpl)
{
   var fm = Ext.util.Format;
   var useF = this.disableFormats !== true;
   var sep = Ext.isGecko ? "+" : ",";
   var fn = function(m, name, format, args, math)
   {
      if (name.substr(0, 4) == "xtpl")
      {
         return"'" + sep + "this.applySubTemplate(" + name.substr(4) + ", values, parent, xindex, xcount)" + sep + "'"
      }
      var v;
      if (name === ".")
      {
         v = "values"
      }
      else
      {
         if (name === "#")
         {
            v = "xindex"
         }
         else
         {
            if (name.indexOf(".") != -1)
            {
               v = name
            }
            else
            {
               v = "values['" + name + "']"
            }
         }
      }
      if (math)
      {
         v = "(" + v + math + ")"
      }
      if (format && useF)
      {
         args = args ? "," + args : "";
         if (format.substr(0, 5) != "this.")
         {
            format = "fm." + format + "("
         }
         else
         {
            format = "this.call(\"" + format.substr(5) + "\", ";
            args = ", values"
         }
      }
      else
      {
         args = "";
         format = "(" + v + " === undefined ? '' : "
      }
      return"'" + sep + format + v + args + ")" + sep + "'"
   };
   var codeFn = function(m, code)
   {
      return"'" + sep + "(" + code + ")" + sep + "'"
   };
   var body;
   if (Ext.isGecko)
   {
      body = "tpl.compiled = function(values, parent, xindex, xcount){ return '" + tpl.body.replace(/(\r\n|\n)/g, "\\n").replace(/'/g, "\\'").replace(this.re, fn).replace(this.codeRe, codeFn) + "';};"
   }
   else
   {
      body = ["tpl.compiled = function(values, parent, xindex, xcount){ return ['"];
      body.push(tpl.body.replace(/(\r\n|\n)/g, "\\n").replace(/'/g, "\\'").replace(this.re, fn).replace(this.codeRe, codeFn));
      body.push("'].join('');};");
      body = body.join("")
   }
   eval(body);
   return this
},applyTemplate:function(A)
{
   return this.master.compiled.call(this, A, {}, 1, 1)
},compile:function()
{
   return this
}});
Ext.XTemplate.prototype.apply = Ext.XTemplate.prototype.applyTemplate;
Ext.XTemplate.from = function(A)
{
   A = Ext.getDom(A);
   return new Ext.XTemplate(A.value || A.innerHTML)
};
Ext.util.CSS = function()
{
   var D = null;
   var C = document;
   var B = /(-[a-z])/gi;
   var A = function(E, F)
   {
      return F.charAt(1).toUpperCase()
   };
   return{createStyleSheet:function(G, J)
   {
      var F;
      var E = C.getElementsByTagName("head")[0];
      var I = C.createElement("style");
      I.setAttribute("type", "text/css");
      if (J)
      {
         I.setAttribute("id", J)
      }
      if (Ext.isIE)
      {
         E.appendChild(I);
         F = I.styleSheet;
         F.cssText = G
      }
      else
      {
         try
         {
            I.appendChild(C.createTextNode(G))
         }
         catch(H)
         {
            I.cssText = G
         }
         E.appendChild(I);
         F = I.styleSheet ? I.styleSheet : (I.sheet || C.styleSheets[C.styleSheets.length - 1])
      }
      this.cacheStyleSheet(F);
      return F
   },removeStyleSheet:function(F)
   {
      var E = C.getElementById(F);
      if (E)
      {
         E.parentNode.removeChild(E)
      }
   },swapStyleSheet:function(G, E)
   {
      this.removeStyleSheet(G);
      var F = C.createElement("link");
      F.setAttribute("rel", "stylesheet");
      F.setAttribute("type", "text/css");
      F.setAttribute("id", G);
      F.setAttribute("href", E);
      C.getElementsByTagName("head")[0].appendChild(F)
   },refreshCache:function()
   {
      return this.getRules(true)
   },cacheStyleSheet:function(F)
   {
      if (!D)
      {
         D = {}
      }
      try
      {
         var H = F.cssRules || F.rules;
         for (var E = H.length - 1; E >= 0; --E)
         {
            D[H[E].selectorText] = H[E]
         }
      }
      catch(G)
      {
      }
   },getRules:function(F)
   {
      if (D == null || F)
      {
         D = {};
         var H = C.styleSheets;
         for (var G = 0,E = H.length; G < E; G++)
         {
            try
            {
               this.cacheStyleSheet(H[G])
            }
            catch(I)
            {
            }
         }
      }
      return D
   },getRule:function(E, G)
   {
      var F = this.getRules(G);
      if (!Ext.isArray(E))
      {
         return F[E]
      }
      for (var H = 0; H < E.length; H++)
      {
         if (F[E[H]])
         {
            return F[E[H]]
         }
      }
      return null
   },updateRule:function(E, H, G)
   {
      if (!Ext.isArray(E))
      {
         var I = this.getRule(E);
         if (I)
         {
            I.style[H.replace(B, A)] = G;
            return true
         }
      }
      else
      {
         for (var F = 0; F < E.length; F++)
         {
            if (this.updateRule(E[F], H, G))
            {
               return true
            }
         }
      }
      return false
   }}
}();
Ext.util.ClickRepeater = function(B, A)
{
   this.el = Ext.get(B);
   this.el.unselectable();
   Ext.apply(this, A);
   this.addEvents("mousedown", "click", "mouseup");
   this.el.on("mousedown", this.handleMouseDown, this);
   if (this.preventDefault || this.stopDefault)
   {
      this.el.on("click", function(C)
      {
         if (this.preventDefault)
         {
            C.preventDefault()
         }
         if (this.stopDefault)
         {
            C.stopEvent()
         }
      }, this)
   }
   if (this.handler)
   {
      this.on("click", this.handler, this.scope || this)
   }
   Ext.util.ClickRepeater.superclass.constructor.call(this)
};
Ext.extend(Ext.util.ClickRepeater, Ext.util.Observable, {interval:20,delay:250,preventDefault:true,stopDefault:false,timer:0,handleMouseDown:function()
{
   clearTimeout(this.timer);
   this.el.blur();
   if (this.pressClass)
   {
      this.el.addClass(this.pressClass)
   }
   this.mousedownTime = new Date();
   Ext.getDoc().on("mouseup", this.handleMouseUp, this);
   this.el.on("mouseout", this.handleMouseOut, this);
   this.fireEvent("mousedown", this);
   this.fireEvent("click", this);
   if (this.accelerate)
   {
      this.delay = 400
   }
   this.timer = this.click.defer(this.delay || this.interval, this)
},click:function()
{
   this.fireEvent("click", this);
   this.timer = this.click.defer(this.accelerate ? this.easeOutExpo(this.mousedownTime.getElapsed(), 400, -390, 12000) :
                                 this.interval, this)
},easeOutExpo:function(B, A, D, C)
{
   return(B == C) ? A + D : D * (-Math.pow(2, -10 * B / C) + 1) + A
},handleMouseOut:function()
{
   clearTimeout(this.timer);
   if (this.pressClass)
   {
      this.el.removeClass(this.pressClass)
   }
   this.el.on("mouseover", this.handleMouseReturn, this)
},handleMouseReturn:function()
{
   this.el.un("mouseover", this.handleMouseReturn, this);
   if (this.pressClass)
   {
      this.el.addClass(this.pressClass)
   }
   this.click()
},handleMouseUp:function()
{
   clearTimeout(this.timer);
   this.el.un("mouseover", this.handleMouseReturn, this);
   this.el.un("mouseout", this.handleMouseOut, this);
   Ext.getDoc().un("mouseup", this.handleMouseUp, this);
   this.el.removeClass(this.pressClass);
   this.fireEvent("mouseup", this)
}});
Ext.KeyNav = function(B, A)
{
   this.el = Ext.get(B);
   Ext.apply(this, A);
   if (!this.disabled)
   {
      this.disabled = true;
      this.enable()
   }
};
Ext.KeyNav.prototype = {disabled:false,defaultEventAction:"stopEvent",forceKeyDown:false,prepareEvent:function(C)
{
   var A = C.getKey();
   var B = this.keyToHandler[A];
   if (Ext.isSafari2 && B && A >= 37 && A <= 40)
   {
      C.stopEvent()
   }
},relay:function(C)
{
   var A = C.getKey();
   var B = this.keyToHandler[A];
   if (B && this[B])
   {
      if (this.doRelay(C, this[B], B) !== true)
      {
         C[this.defaultEventAction]()
      }
   }
},doRelay:function(C, B, A)
{
   return B.call(this.scope || this, C)
},enter:false,left:false,right:false,up:false,down:false,tab:false,esc:false,pageUp:false,pageDown:false,del:false,home:false,end:false,keyToHandler:{37:"left",39:"right",38:"up",40:"down",33:"pageUp",34:"pageDown",46:"del",36:"home",35:"end",13:"enter",27:"esc",9:"tab"},enable:function()
{
   if (this.disabled)
   {
      if (this.forceKeyDown || Ext.isIE || Ext.isSafari3 || Ext.isAir)
      {
         this.el.on("keydown", this.relay, this)
      }
      else
      {
         this.el.on("keydown", this.prepareEvent, this);
         this.el.on("keypress", this.relay, this)
      }
      this.disabled = false
   }
},disable:function()
{
   if (!this.disabled)
   {
      if (this.forceKeyDown || Ext.isIE || Ext.isSafari3 || Ext.isAir)
      {
         this.el.un("keydown", this.relay)
      }
      else
      {
         this.el.un("keydown", this.prepareEvent);
         this.el.un("keypress", this.relay)
      }
      this.disabled = true
   }
}};
Ext.KeyMap = function(C, B, A)
{
   this.el = Ext.get(C);
   this.eventName = A || "keydown";
   this.bindings = [];
   if (B)
   {
      this.addBinding(B)
   }
   this.enable()
};
Ext.KeyMap.prototype = {stopEvent:false,addBinding:function(D)
{
   if (Ext.isArray(D))
   {
      for (var F = 0,H = D.length; F < H; F++)
      {
         this.addBinding(D[F])
      }
      return
   }
   var N = D.key,C = D.shift,A = D.ctrl,G = D.alt,J = D.fn || D.handler,M = D.scope;
   if (D.stopEvent)
   {
      this.stopEvent = D.stopEvent
   }
   if (typeof N == "string")
   {
      var K = [];
      var I = N.toUpperCase();
      for (var E = 0,H = I.length; E < H; E++)
      {
         K.push(I.charCodeAt(E))
      }
      N = K
   }
   var B = Ext.isArray(N);
   var L = function(R)
   {
      if ((!C || R.shiftKey) && (!A || R.ctrlKey) && (!G || R.altKey))
      {
         var P = R.getKey();
         if (B)
         {
            for (var Q = 0,O = N.length; Q < O; Q++)
            {
               if (N[Q] == P)
               {
                  if (this.stopEvent)
                  {
                     R.stopEvent()
                  }
                  J.call(M || window, P, R);
                  return
               }
            }
         }
         else
         {
            if (P == N)
            {
               if (this.stopEvent)
               {
                  R.stopEvent()
               }
               J.call(M || window, P, R)
            }
         }
      }
   };
   this.bindings.push(L)
},on:function(B, D, C)
{
   var G,A,E,F;
   if (typeof B == "object" && !Ext.isArray(B))
   {
      G = B.key;
      A = B.shift;
      E = B.ctrl;
      F = B.alt
   }
   else
   {
      G = B
   }
   this.addBinding({key:G,shift:A,ctrl:E,alt:F,fn:D,scope:C})
},handleKeyDown:function(D)
{
   if (this.enabled)
   {
      var B = this.bindings;
      for (var C = 0,A = B.length; C < A; C++)
      {
         B[C].call(this, D)
      }
   }
},isEnabled:function()
{
   return this.enabled
},enable:function()
{
   if (!this.enabled)
   {
      this.el.on(this.eventName, this.handleKeyDown, this);
      this.enabled = true
   }
},disable:function()
{
   if (this.enabled)
   {
      this.el.removeListener(this.eventName, this.handleKeyDown, this);
      this.enabled = false
   }
}};
Ext.util.TextMetrics = function()
{
   var A;
   return{measure:function(B, C, D)
   {
      if (!A)
      {
         A = Ext.util.TextMetrics.Instance(B, D)
      }
      A.bind(B);
      A.setFixedWidth(D || "auto");
      return A.getSize(C)
   },createInstance:function(B, C)
   {
      return Ext.util.TextMetrics.Instance(B, C)
   }}
}();
Ext.util.TextMetrics.Instance = function(B, D)
{
   var C = new Ext.Element(document.createElement("div"));
   document.body.appendChild(C.dom);
   C.position("absolute");
   C.setLeftTop(-1000, -1000);
   C.hide();
   if (D)
   {
      C.setWidth(D)
   }
   var A = {getSize:function(F)
   {
      C.update(F);
      var E = C.getSize();
      C.update("");
      return E
   },bind:function(E)
   {
      C.setStyle(Ext.fly(E).getStyles("font-size", "font-style", "font-weight", "font-family", "line-height", "text-transform", "letter-spacing"))
   },setFixedWidth:function(E)
   {
      C.setWidth(E)
   },getWidth:function(E)
   {
      C.dom.style.width = "auto";
      return this.getSize(E).width
   },getHeight:function(E)
   {
      return this.getSize(E).height
   }};
   A.bind(B);
   return A
};
Ext.Element.measureText = Ext.util.TextMetrics.measure;
(function()
{
   var A = Ext.EventManager;
   var B = Ext.lib.Dom;
   Ext.dd.DragDrop = function(E, C, D)
   {
      if (E)
      {
         this.init(E, C, D)
      }
   };
   Ext.dd.DragDrop.prototype = {id:null,config:null,dragElId:null,handleElId:null,invalidHandleTypes:null,invalidHandleIds:null,invalidHandleClasses:null,startPageX:0,startPageY:0,groups:null,locked:false,lock:function()
   {
      this.locked = true
   },unlock:function()
   {
      this.locked = false
   },isTarget:true,padding:null,_domRef:null,__ygDragDrop:true,constrainX:false,constrainY:false,minX:0,maxX:0,minY:0,maxY:0,maintainOffset:false,xTicks:null,yTicks:null,primaryButtonOnly:true,available:false,hasOuterHandles:false,b4StartDrag:function(C, D)
   {
   },startDrag:function(C, D)
   {
   },b4Drag:function(C)
   {
   },onDrag:function(C)
   {
   },onDragEnter:function(C, D)
   {
   },b4DragOver:function(C)
   {
   },onDragOver:function(C, D)
   {
   },b4DragOut:function(C)
   {
   },onDragOut:function(C, D)
   {
   },b4DragDrop:function(C)
   {
   },onDragDrop:function(C, D)
   {
   },onInvalidDrop:function(C)
   {
   },b4EndDrag:function(C)
   {
   },endDrag:function(C)
   {
   },b4MouseDown:function(C)
   {
   },onMouseDown:function(C)
   {
   },onMouseUp:function(C)
   {
   },onAvailable:function()
   {
   },defaultPadding:{left:0,right:0,top:0,bottom:0},constrainTo:function(H, F, M)
   {
      if (typeof F == "number")
      {
         F = {left:F,right:F,top:F,bottom:F}
      }
      F = F || this.defaultPadding;
      var J = Ext.get(this.getEl()).getBox();
      var C = Ext.get(H);
      var L = C.getScroll();
      var I,D = C.dom;
      if (D == document.body)
      {
         I = {x:L.left,y:L.top,width:Ext.lib.Dom.getViewWidth(),height:Ext.lib.Dom.getViewHeight()}
      }
      else
      {
         var K = C.getXY();
         I = {x:K[0] + L.left,y:K[1] + L.top,width:D.clientWidth,height:D.clientHeight}
      }
      var G = J.y - I.y;
      var E = J.x - I.x;
      this.resetConstraints();
      this.setXConstraint(E - (F.left || 0), I.width - E - J.width - (F.right || 0), this.xTickSize);
      this.setYConstraint(G - (F.top || 0), I.height - G - J.height - (F.bottom || 0), this.yTickSize)
   },getEl:function()
   {
      if (!this._domRef)
      {
         this._domRef = Ext.getDom(this.id)
      }
      return this._domRef
   },getDragEl:function()
   {
      return Ext.getDom(this.dragElId)
   },init:function(E, C, D)
   {
      this.initTarget(E, C, D);
      A.on(this.id, "mousedown", this.handleMouseDown, this)
   },initTarget:function(E, C, D)
   {
      this.config = D || {};
      this.DDM = Ext.dd.DDM;
      this.groups = {};
      if (typeof E !== "string")
      {
         E = Ext.id(E)
      }
      this.id = E;
      this.addToGroup((C) ? C : "default");
      this.handleElId = E;
      this.setDragElId(E);
      this.invalidHandleTypes = {A:"A"};
      this.invalidHandleIds = {};
      this.invalidHandleClasses = [];
      this.applyConfig();
      this.handleOnAvailable()
   },applyConfig:function()
   {
      this.padding = this.config.padding || [0,0,0,0];
      this.isTarget = (this.config.isTarget !== false);
      this.maintainOffset = (this.config.maintainOffset);
      this.primaryButtonOnly = (this.config.primaryButtonOnly !== false)
   },handleOnAvailable:function()
   {
      this.available = true;
      this.resetConstraints();
      this.onAvailable()
   },setPadding:function(E, C, F, D)
   {
      if (!C && 0 !== C)
      {
         this.padding = [E,E,E,E]
      }
      else
      {
         if (!F && 0 !== F)
         {
            this.padding = [E,C,E,C]
         }
         else
         {
            this.padding = [E,C,F,D]
         }
      }
   },setInitPosition:function(F, E)
   {
      var G = this.getEl();
      if (!this.DDM.verifyEl(G))
      {
         return
      }
      var D = F || 0;
      var C = E || 0;
      var H = B.getXY(G);
      this.initPageX = H[0] - D;
      this.initPageY = H[1] - C;
      this.lastPageX = H[0];
      this.lastPageY = H[1];
      this.setStartPosition(H)
   },setStartPosition:function(D)
   {
      var C = D || B.getXY(this.getEl());
      this.deltaSetXY = null;
      this.startPageX = C[0];
      this.startPageY = C[1]
   },addToGroup:function(C)
   {
      this.groups[C] = true;
      this.DDM.regDragDrop(this, C)
   },removeFromGroup:function(C)
   {
      if (this.groups[C])
      {
         delete this.groups[C]
      }
      this.DDM.removeDDFromGroup(this, C)
   },setDragElId:function(C)
   {
      this.dragElId = C
   },setHandleElId:function(C)
   {
      if (typeof C !== "string")
      {
         C = Ext.id(C)
      }
      this.handleElId = C;
      this.DDM.regHandle(this.id, C)
   },setOuterHandleElId:function(C)
   {
      if (typeof C !== "string")
      {
         C = Ext.id(C)
      }
      A.on(C, "mousedown", this.handleMouseDown, this);
      this.setHandleElId(C);
      this.hasOuterHandles = true
   },unreg:function()
   {
      A.un(this.id, "mousedown", this.handleMouseDown);
      this._domRef = null;
      this.DDM._remove(this)
   },destroy:function()
   {
      this.unreg()
   },isLocked:function()
   {
      return(this.DDM.isLocked() || this.locked)
   },handleMouseDown:function(E, D)
   {
      if (this.primaryButtonOnly && E.button != 0)
      {
         return
      }
      if (this.isLocked())
      {
         return
      }
      this.DDM.refreshCache(this.groups);
      var C = new Ext.lib.Point(Ext.lib.Event.getPageX(E), Ext.lib.Event.getPageY(E));
      if (!this.hasOuterHandles && !this.DDM.isOverTarget(C, this))
      {
      }
      else
      {
         if (this.clickValidator(E))
         {
            this.setStartPosition();
            this.b4MouseDown(E);
            this.onMouseDown(E);
            this.DDM.handleMouseDown(E, this);
            this.DDM.stopEvent(E)
         }
         else
         {
         }
      }
   },clickValidator:function(D)
   {
      var C = D.getTarget();
      return(this.isValidHandleChild(C) && (this.id == this.handleElId || this.DDM.handleWasClicked(C, this.id)))
   },addInvalidHandleType:function(C)
   {
      var D = C.toUpperCase();
      this.invalidHandleTypes[D] = D
   },addInvalidHandleId:function(C)
   {
      if (typeof C !== "string")
      {
         C = Ext.id(C)
      }
      this.invalidHandleIds[C] = C
   },addInvalidHandleClass:function(C)
   {
      this.invalidHandleClasses.push(C)
   },removeInvalidHandleType:function(C)
   {
      var D = C.toUpperCase();
      delete this.invalidHandleTypes[D]
   },removeInvalidHandleId:function(C)
   {
      if (typeof C !== "string")
      {
         C = Ext.id(C)
      }
      delete this.invalidHandleIds[C]
   },removeInvalidHandleClass:function(D)
   {
      for (var E = 0,C = this.invalidHandleClasses.length; E < C; ++E)
      {
         if (this.invalidHandleClasses[E] == D)
         {
            delete this.invalidHandleClasses[E]
         }
      }
   },isValidHandleChild:function(F)
   {
      var E = true;
      var H;
      try
      {
         H = F.nodeName.toUpperCase()
      }
      catch(G)
      {
         H = F.nodeName
      }
      E = E && !this.invalidHandleTypes[H];
      E = E && !this.invalidHandleIds[F.id];
      for (var D = 0,C = this.invalidHandleClasses.length; E && D < C; ++D)
      {
         E = !Ext.fly(F).hasClass(this.invalidHandleClasses[D])
      }
      return E
   },setXTicks:function(F, C)
   {
      this.xTicks = [];
      this.xTickSize = C;
      var E = {};
      for (var D = this.initPageX; D >= this.minX; D = D - C)
      {
         if (!E[D])
         {
            this.xTicks[this.xTicks.length] = D;
            E[D] = true
         }
      }
      for (D = this.initPageX; D <= this.maxX; D = D + C)
      {
         if (!E[D])
         {
            this.xTicks[this.xTicks.length] = D;
            E[D] = true
         }
      }
      this.xTicks.sort(this.DDM.numericSort)
   },setYTicks:function(F, C)
   {
      this.yTicks = [];
      this.yTickSize = C;
      var E = {};
      for (var D = this.initPageY; D >= this.minY; D = D - C)
      {
         if (!E[D])
         {
            this.yTicks[this.yTicks.length] = D;
            E[D] = true
         }
      }
      for (D = this.initPageY; D <= this.maxY; D = D + C)
      {
         if (!E[D])
         {
            this.yTicks[this.yTicks.length] = D;
            E[D] = true
         }
      }
      this.yTicks.sort(this.DDM.numericSort)
   },setXConstraint:function(E, D, C)
   {
      this.leftConstraint = E;
      this.rightConstraint = D;
      this.minX = this.initPageX - E;
      this.maxX = this.initPageX + D;
      if (C)
      {
         this.setXTicks(this.initPageX, C)
      }
      this.constrainX = true
   },clearConstraints:function()
   {
      this.constrainX = false;
      this.constrainY = false;
      this.clearTicks()
   },clearTicks:function()
   {
      this.xTicks = null;
      this.yTicks = null;
      this.xTickSize = 0;
      this.yTickSize = 0
   },setYConstraint:function(C, E, D)
   {
      this.topConstraint = C;
      this.bottomConstraint = E;
      this.minY = this.initPageY - C;
      this.maxY = this.initPageY + E;
      if (D)
      {
         this.setYTicks(this.initPageY, D)
      }
      this.constrainY = true
   },resetConstraints:function()
   {
      if (this.initPageX || this.initPageX === 0)
      {
         var D = (this.maintainOffset) ? this.lastPageX - this.initPageX : 0;
         var C = (this.maintainOffset) ? this.lastPageY - this.initPageY : 0;
         this.setInitPosition(D, C)
      }
      else
      {
         this.setInitPosition()
      }
      if (this.constrainX)
      {
         this.setXConstraint(this.leftConstraint, this.rightConstraint, this.xTickSize)
      }
      if (this.constrainY)
      {
         this.setYConstraint(this.topConstraint, this.bottomConstraint, this.yTickSize)
      }
   },getTick:function(I, F)
   {
      if (!F)
      {
         return I
      }
      else
      {
         if (F[0] >= I)
         {
            return F[0]
         }
         else
         {
            for (var D = 0,C = F.length; D < C; ++D)
            {
               var E = D + 1;
               if (F[E] && F[E] >= I)
               {
                  var H = I - F[D];
                  var G = F[E] - I;
                  return(G > H) ? F[D] : F[E]
               }
            }
            return F[F.length - 1]
         }
      }
   },toString:function()
   {
      return("DragDrop " + this.id)
   }}
})();
if (!Ext.dd.DragDropMgr)
{
   Ext.dd.DragDropMgr = function()
   {
      var A = Ext.EventManager;
      return{ids:{},handleIds:{},dragCurrent:null,dragOvers:{},deltaX:0,deltaY:0,preventDefault:true,stopPropagation:true,initialized:false,locked:false,init:function()
      {
         this.initialized = true
      },POINT:0,INTERSECT:1,mode:0,_execOnAll:function(D, C)
      {
         for (var E in this.ids)
         {
            for (var B in this.ids[E])
            {
               var F = this.ids[E][B];
               if (!this.isTypeOfDD(F))
               {
                  continue
               }
               F[D].apply(F, C)
            }
         }
      },_onLoad:function()
      {
         this.init();
         A.on(document, "mouseup", this.handleMouseUp, this, true);
         A.on(document, "mousemove", this.handleMouseMove, this, true);
         A.on(window, "unload", this._onUnload, this, true);
         A.on(window, "resize", this._onResize, this, true)
      },_onResize:function(B)
      {
         this._execOnAll("resetConstraints", [])
      },lock:function()
      {
         this.locked = true
      },unlock:function()
      {
         this.locked = false
      },isLocked:function()
      {
         return this.locked
      },locationCache:{},useCache:true,clickPixelThresh:3,clickTimeThresh:350,dragThreshMet:false,clickTimeout:null,startX:0,startY:0,regDragDrop:function(C, B)
      {
         if (!this.initialized)
         {
            this.init()
         }
         if (!this.ids[B])
         {
            this.ids[B] = {}
         }
         this.ids[B][C.id] = C
      },removeDDFromGroup:function(D, B)
      {
         if (!this.ids[B])
         {
            this.ids[B] = {}
         }
         var C = this.ids[B];
         if (C && C[D.id])
         {
            delete C[D.id]
         }
      },_remove:function(C)
      {
         for (var B in C.groups)
         {
            if (B && this.ids[B][C.id])
            {
               delete this.ids[B][C.id]
            }
         }
         delete this.handleIds[C.id]
      },regHandle:function(C, B)
      {
         if (!this.handleIds[C])
         {
            this.handleIds[C] = {}
         }
         this.handleIds[C][B] = B
      },isDragDrop:function(B)
      {
         return(this.getDDById(B)) ? true : false
      },getRelated:function(F, C)
      {
         var E = [];
         for (var D in F.groups)
         {
            for (j in this.ids[D])
            {
               var B = this.ids[D][j];
               if (!this.isTypeOfDD(B))
               {
                  continue
               }
               if (!C || B.isTarget)
               {
                  E[E.length] = B
               }
            }
         }
         return E
      },isLegalTarget:function(F, E)
      {
         var C = this.getRelated(F, true);
         for (var D = 0,B = C.length; D < B; ++D)
         {
            if (C[D].id == E.id)
            {
               return true
            }
         }
         return false
      },isTypeOfDD:function(B)
      {
         return(B && B.__ygDragDrop)
      },isHandle:function(C, B)
      {
         return(this.handleIds[C] && this.handleIds[C][B])
      },getDDById:function(C)
      {
         for (var B in this.ids)
         {
            if (this.ids[B][C])
            {
               return this.ids[B][C]
            }
         }
         return null
      },handleMouseDown:function(D, C)
      {
         if (Ext.QuickTips)
         {
            Ext.QuickTips.disable()
         }
         this.currentTarget = D.getTarget();
         this.dragCurrent = C;
         var B = C.getEl();
         this.startX = D.getPageX();
         this.startY = D.getPageY();
         this.deltaX = this.startX - B.offsetLeft;
         this.deltaY = this.startY - B.offsetTop;
         this.dragThreshMet = false;
         this.clickTimeout = setTimeout(function()
         {
            var E = Ext.dd.DDM;
            E.startDrag(E.startX, E.startY)
         }, this.clickTimeThresh)
      },startDrag:function(B, C)
      {
         clearTimeout(this.clickTimeout);
         if (this.dragCurrent)
         {
            this.dragCurrent.b4StartDrag(B, C);
            this.dragCurrent.startDrag(B, C)
         }
         this.dragThreshMet = true
      },handleMouseUp:function(B)
      {
         if (Ext.QuickTips)
         {
            Ext.QuickTips.enable()
         }
         if (!this.dragCurrent)
         {
            return
         }
         clearTimeout(this.clickTimeout);
         if (this.dragThreshMet)
         {
            this.fireEvents(B, true)
         }
         else
         {
         }
         this.stopDrag(B);
         this.stopEvent(B)
      },stopEvent:function(B)
      {
         if (this.stopPropagation)
         {
            B.stopPropagation()
         }
         if (this.preventDefault)
         {
            B.preventDefault()
         }
      },stopDrag:function(B)
      {
         if (this.dragCurrent)
         {
            if (this.dragThreshMet)
            {
               this.dragCurrent.b4EndDrag(B);
               this.dragCurrent.endDrag(B)
            }
            this.dragCurrent.onMouseUp(B)
         }
         this.dragCurrent = null;
         this.dragOvers = {}
      },handleMouseMove:function(D)
      {
         if (!this.dragCurrent)
         {
            return true
         }
         if (Ext.isIE && (D.button !== 0 && D.button !== 1 && D.button !== 2))
         {
            this.stopEvent(D);
            return this.handleMouseUp(D)
         }
         if (!this.dragThreshMet)
         {
            var C = Math.abs(this.startX - D.getPageX());
            var B = Math.abs(this.startY - D.getPageY());
            if (C > this.clickPixelThresh || B > this.clickPixelThresh)
            {
               this.startDrag(this.startX, this.startY)
            }
         }
         if (this.dragThreshMet)
         {
            this.dragCurrent.b4Drag(D);
            this.dragCurrent.onDrag(D);
            if (!this.dragCurrent.moveOnly)
            {
               this.fireEvents(D, false)
            }
         }
         this.stopEvent(D);
         return true
      },fireEvents:function(K, L)
      {
         var N = this.dragCurrent;
         if (!N || N.isLocked())
         {
            return
         }
         var O = K.getPoint();
         var B = [];
         var E = [];
         var I = [];
         var G = [];
         var D = [];
         for (var F in this.dragOvers)
         {
            var C = this.dragOvers[F];
            if (!this.isTypeOfDD(C))
            {
               continue
            }
            if (!this.isOverTarget(O, C, this.mode))
            {
               E.push(C)
            }
            B[F] = true;
            delete this.dragOvers[F]
         }
         for (var M in N.groups)
         {
            if ("string" != typeof M)
            {
               continue
            }
            for (F in this.ids[M])
            {
               var H = this.ids[M][F];
               if (!this.isTypeOfDD(H))
               {
                  continue
               }
               if (H.isTarget && !H.isLocked() && H != N)
               {
                  if (this.isOverTarget(O, H, this.mode))
                  {
                     if (L)
                     {
                        G.push(H)
                     }
                     else
                     {
                        if (!B[H.id])
                        {
                           D.push(H)
                        }
                        else
                        {
                           I.push(H)
                        }
                        this.dragOvers[H.id] = H
                     }
                  }
               }
            }
         }
         if (this.mode)
         {
            if (E.length)
            {
               N.b4DragOut(K, E);
               N.onDragOut(K, E)
            }
            if (D.length)
            {
               N.onDragEnter(K, D)
            }
            if (I.length)
            {
               N.b4DragOver(K, I);
               N.onDragOver(K, I)
            }
            if (G.length)
            {
               N.b4DragDrop(K, G);
               N.onDragDrop(K, G)
            }
         }
         else
         {
            var J = 0;
            for (F = 0,J = E.length; F < J; ++F)
            {
               N.b4DragOut(K, E[F].id);
               N.onDragOut(K, E[F].id)
            }
            for (F = 0,J = D.length; F < J; ++F)
            {
               N.onDragEnter(K, D[F].id)
            }
            for (F = 0,J = I.length; F < J; ++F)
            {
               N.b4DragOver(K, I[F].id);
               N.onDragOver(K, I[F].id)
            }
            for (F = 0,J = G.length; F < J; ++F)
            {
               N.b4DragDrop(K, G[F].id);
               N.onDragDrop(K, G[F].id)
            }
         }
         if (L && !G.length)
         {
            N.onInvalidDrop(K)
         }
      },getBestMatch:function(D)
      {
         var F = null;
         var C = D.length;
         if (C == 1)
         {
            F = D[0]
         }
         else
         {
            for (var E = 0; E < C; ++E)
            {
               var B = D[E];
               if (B.cursorIsOver)
               {
                  F = B;
                  break
               }
               else
               {
                  if (!F || F.overlap.getArea() < B.overlap.getArea())
                  {
                     F = B
                  }
               }
            }
         }
         return F
      },refreshCache:function(C)
      {
         for (var B in C)
         {
            if ("string" != typeof B)
            {
               continue
            }
            for (var D in this.ids[B])
            {
               var E = this.ids[B][D];
               if (this.isTypeOfDD(E))
               {
                  var F = this.getLocation(E);
                  if (F)
                  {
                     this.locationCache[E.id] = F
                  }
                  else
                  {
                     delete this.locationCache[E.id]
                  }
               }
            }
         }
      },verifyEl:function(C)
      {
         if (C)
         {
            var B;
            if (Ext.isIE)
            {
               try
               {
                  B = C.offsetParent
               }
               catch(D)
               {
               }
            }
            else
            {
               B = C.offsetParent
            }
            if (B)
            {
               return true
            }
         }
         return false
      },getLocation:function(G)
      {
         if (!this.isTypeOfDD(G))
         {
            return null
         }
         var E = G.getEl(),J,D,C,L,K,M,B,I,F;
         try
         {
            J = Ext.lib.Dom.getXY(E)
         }
         catch(H)
         {
         }
         if (!J)
         {
            return null
         }
         D = J[0];
         C = D + E.offsetWidth;
         L = J[1];
         K = L + E.offsetHeight;
         M = L - G.padding[0];
         B = C + G.padding[1];
         I = K + G.padding[2];
         F = D - G.padding[3];
         return new Ext.lib.Region(M, B, I, F)
      },isOverTarget:function(J, B, D)
      {
         var F = this.locationCache[B.id];
         if (!F || !this.useCache)
         {
            F = this.getLocation(B);
            this.locationCache[B.id] = F
         }
         if (!F)
         {
            return false
         }
         B.cursorIsOver = F.contains(J);
         var I = this.dragCurrent;
         if (!I || !I.getTargetCoord || (!D && !I.constrainX && !I.constrainY))
         {
            return B.cursorIsOver
         }
         B.overlap = null;
         var G = I.getTargetCoord(J.x, J.y);
         var C = I.getDragEl();
         var E = new Ext.lib.Region(G.y, G.x + C.offsetWidth, G.y + C.offsetHeight, G.x);
         var H = E.intersect(F);
         if (H)
         {
            B.overlap = H;
            return(D) ? true : B.cursorIsOver
         }
         else
         {
            return false
         }
      },_onUnload:function(C, B)
      {
         Ext.dd.DragDropMgr.unregAll()
      },unregAll:function()
      {
         if (this.dragCurrent)
         {
            this.stopDrag();
            this.dragCurrent = null
         }
         this._execOnAll("unreg", []);
         for (var B in this.elementCache)
         {
            delete this.elementCache[B]
         }
         this.elementCache = {};
         this.ids = {}
      },elementCache:{},getElWrapper:function(C)
      {
         var B = this.elementCache[C];
         if (!B || !B.el)
         {
            B = this.elementCache[C] = new this.ElementWrapper(Ext.getDom(C))
         }
         return B
      },getElement:function(B)
      {
         return Ext.getDom(B)
      },getCss:function(C)
      {
         var B = Ext.getDom(C);
         return(B) ? B.style : null
      },ElementWrapper:function(B)
      {
         this.el = B || null;
         this.id = this.el && B.id;
         this.css = this.el && B.style
      },getPosX:function(B)
      {
         return Ext.lib.Dom.getX(B)
      },getPosY:function(B)
      {
         return Ext.lib.Dom.getY(B)
      },swapNode:function(D, B)
      {
         if (D.swapNode)
         {
            D.swapNode(B)
         }
         else
         {
            var E = B.parentNode;
            var C = B.nextSibling;
            if (C == D)
            {
               E.insertBefore(D, B)
            }
            else
            {
               if (B == D.nextSibling)
               {
                  E.insertBefore(B, D)
               }
               else
               {
                  D.parentNode.replaceChild(B, D);
                  E.insertBefore(D, C)
               }
            }
         }
      },getScroll:function()
      {
         var D,B,E = document.documentElement,C = document.body;
         if (E && (E.scrollTop || E.scrollLeft))
         {
            D = E.scrollTop;
            B = E.scrollLeft
         }
         else
         {
            if (C)
            {
               D = C.scrollTop;
               B = C.scrollLeft
            }
            else
            {
            }
         }
         return{top:D,left:B}
      },getStyle:function(C, B)
      {
         return Ext.fly(C).getStyle(B)
      },getScrollTop:function()
      {
         return this.getScroll().top
      },getScrollLeft:function()
      {
         return this.getScroll().left
      },moveToEl:function(B, D)
      {
         var C = Ext.lib.Dom.getXY(D);
         Ext.lib.Dom.setXY(B, C)
      },numericSort:function(C, B)
      {
         return(C - B)
      },_timeoutCount:0,_addListeners:function()
      {
         var B = Ext.dd.DDM;
         if (Ext.lib.Event && document)
         {
            B._onLoad()
         }
         else
         {
            if (B._timeoutCount > 2000)
            {
            }
            else
            {
               setTimeout(B._addListeners, 10);
               if (document && document.body)
               {
                  B._timeoutCount += 1
               }
            }
         }
      },handleWasClicked:function(B, D)
      {
         if (this.isHandle(D, B.id))
         {
            return true
         }
         else
         {
            var C = B.parentNode;
            while (C)
            {
               if (this.isHandle(D, C.id))
               {
                  return true
               }
               else
               {
                  C = C.parentNode
               }
            }
         }
         return false
      }}
   }();
   Ext.dd.DDM = Ext.dd.DragDropMgr;
   Ext.dd.DDM._addListeners()
}
Ext.dd.DD = function(C, A, B)
{
   if (C)
   {
      this.init(C, A, B)
   }
};
Ext.extend(Ext.dd.DD, Ext.dd.DragDrop, {scroll:true,autoOffset:function(C, B)
{
   var A = C - this.startPageX;
   var D = B - this.startPageY;
   this.setDelta(A, D)
},setDelta:function(B, A)
{
   this.deltaX = B;
   this.deltaY = A
},setDragElPos:function(C, B)
{
   var A = this.getDragEl();
   this.alignElWithMouse(A, C, B)
},alignElWithMouse:function(C, G, F)
{
   var E = this.getTargetCoord(G, F);
   var B = C.dom ? C : Ext.fly(C, "_dd");
   if (!this.deltaSetXY)
   {
      var H = [E.x,E.y];
      B.setXY(H);
      var D = B.getLeft(true);
      var A = B.getTop(true);
      this.deltaSetXY = [D - E.x,A - E.y]
   }
   else
   {
      B.setLeftTop(E.x + this.deltaSetXY[0], E.y + this.deltaSetXY[1])
   }
   this.cachePosition(E.x, E.y);
   this.autoScroll(E.x, E.y, C.offsetHeight, C.offsetWidth);
   return E
},cachePosition:function(B, A)
{
   if (B)
   {
      this.lastPageX = B;
      this.lastPageY = A
   }
   else
   {
      var C = Ext.lib.Dom.getXY(this.getEl());
      this.lastPageX = C[0];
      this.lastPageY = C[1]
   }
},autoScroll:function(J, I, E, K)
{
   if (this.scroll)
   {
      var L = Ext.lib.Dom.getViewHeight();
      var B = Ext.lib.Dom.getViewWidth();
      var N = this.DDM.getScrollTop();
      var D = this.DDM.getScrollLeft();
      var H = E + I;
      var M = K + J;
      var G = (L + N - I - this.deltaY);
      var F = (B + D - J - this.deltaX);
      var C = 40;
      var A = (document.all) ? 80 : 30;
      if (H > L && G < C)
      {
         window.scrollTo(D, N + A)
      }
      if (I < N && N > 0 && I - N < C)
      {
         window.scrollTo(D, N - A)
      }
      if (M > B && F < C)
      {
         window.scrollTo(D + A, N)
      }
      if (J < D && D > 0 && J - D < C)
      {
         window.scrollTo(D - A, N)
      }
   }
},getTargetCoord:function(C, B)
{
   var A = C - this.deltaX;
   var D = B - this.deltaY;
   if (this.constrainX)
   {
      if (A < this.minX)
      {
         A = this.minX
      }
      if (A > this.maxX)
      {
         A = this.maxX
      }
   }
   if (this.constrainY)
   {
      if (D < this.minY)
      {
         D = this.minY
      }
      if (D > this.maxY)
      {
         D = this.maxY
      }
   }
   A = this.getTick(A, this.xTicks);
   D = this.getTick(D, this.yTicks);
   return{x:A,y:D}
},applyConfig:function()
{
   Ext.dd.DD.superclass.applyConfig.call(this);
   this.scroll = (this.config.scroll !== false)
},b4MouseDown:function(A)
{
   this.autoOffset(A.getPageX(), A.getPageY())
},b4Drag:function(A)
{
   this.setDragElPos(A.getPageX(), A.getPageY())
},toString:function()
{
   return("DD " + this.id)
}});
Ext.dd.DDProxy = function(C, A, B)
{
   if (C)
   {
      this.init(C, A, B);
      this.initFrame()
   }
};
Ext.dd.DDProxy.dragElId = "ygddfdiv";
Ext.extend(Ext.dd.DDProxy, Ext.dd.DD, {resizeFrame:true,centerFrame:false,createFrame:function()
{
   var B = this;
   var A = document.body;
   if (!A || !A.firstChild)
   {
      setTimeout(function()
      {
         B.createFrame()
      }, 50);
      return
   }
   var D = this.getDragEl();
   if (!D)
   {
      D = document.createElement("div");
      D.id = this.dragElId;
      var C = D.style;
      C.position = "absolute";
      C.visibility = "hidden";
      C.cursor = "move";
      C.border = "2px solid #aaa";
      C.zIndex = 999;
      A.insertBefore(D, A.firstChild)
   }
},initFrame:function()
{
   this.createFrame()
},applyConfig:function()
{
   Ext.dd.DDProxy.superclass.applyConfig.call(this);
   this.resizeFrame = (this.config.resizeFrame !== false);
   this.centerFrame = (this.config.centerFrame);
   this.setDragElId(this.config.dragElId || Ext.dd.DDProxy.dragElId)
},showFrame:function(E, D)
{
   var C = this.getEl();
   var A = this.getDragEl();
   var B = A.style;
   this._resizeProxy();
   if (this.centerFrame)
   {
      this.setDelta(Math.round(parseInt(B.width, 10) / 2), Math.round(parseInt(B.height, 10) / 2))
   }
   this.setDragElPos(E, D);
   Ext.fly(A).show()
},_resizeProxy:function()
{
   if (this.resizeFrame)
   {
      var A = this.getEl();
      Ext.fly(this.getDragEl()).setSize(A.offsetWidth, A.offsetHeight)
   }
},b4MouseDown:function(B)
{
   var A = B.getPageX();
   var C = B.getPageY();
   this.autoOffset(A, C);
   this.setDragElPos(A, C)
},b4StartDrag:function(A, B)
{
   this.showFrame(A, B)
},b4EndDrag:function(A)
{
   Ext.fly(this.getDragEl()).hide()
},endDrag:function(C)
{
   var B = this.getEl();
   var A = this.getDragEl();
   A.style.visibility = "";
   this.beforeMove();
   B.style.visibility = "hidden";
   Ext.dd.DDM.moveToEl(B, A);
   A.style.visibility = "hidden";
   B.style.visibility = "";
   this.afterDrag()
},beforeMove:function()
{
},afterDrag:function()
{
},toString:function()
{
   return("DDProxy " + this.id)
}});
Ext.dd.DDTarget = function(C, A, B)
{
   if (C)
   {
      this.initTarget(C, A, B)
   }
};
Ext.extend(Ext.dd.DDTarget, Ext.dd.DragDrop, {toString:function()
{
   return("DDTarget " + this.id)
}});
Ext.dd.DragTracker = function(A)
{
   Ext.apply(this, A);
   this.addEvents("mousedown", "mouseup", "mousemove", "dragstart", "dragend", "drag");
   this.dragRegion = new Ext.lib.Region(0, 0, 0, 0);
   if (this.el)
   {
      this.initEl(this.el)
   }
};
Ext.extend(Ext.dd.DragTracker, Ext.util.Observable, {active:false,tolerance:5,autoStart:false,initEl:function(A)
{
   this.el = Ext.get(A);
   A.on("mousedown", this.onMouseDown, this, this.delegate ? {delegate:this.delegate} : undefined)
},destroy:function()
{
   this.el.un("mousedown", this.onMouseDown, this)
},onMouseDown:function(C, B)
{
   if (this.fireEvent("mousedown", this, C) !== false && this.onBeforeStart(C) !== false)
   {
      this.startXY = this.lastXY = C.getXY();
      this.dragTarget = this.delegate ? B : this.el.dom;
      C.preventDefault();
      var A = Ext.getDoc();
      A.on("mouseup", this.onMouseUp, this);
      A.on("mousemove", this.onMouseMove, this);
      A.on("selectstart", this.stopSelect, this);
      if (this.autoStart)
      {
         this.timer = this.triggerStart.defer(this.autoStart === true ? 1000 : this.autoStart, this)
      }
   }
},onMouseMove:function(D, C)
{
   D.preventDefault();
   var B = D.getXY(),A = this.startXY;
   this.lastXY = B;
   if (!this.active)
   {
      if (Math.abs(A[0] - B[0]) > this.tolerance || Math.abs(A[1] - B[1]) > this.tolerance)
      {
         this.triggerStart()
      }
      else
      {
         return
      }
   }
   this.fireEvent("mousemove", this, D);
   this.onDrag(D);
   this.fireEvent("drag", this, D)
},onMouseUp:function(B)
{
   var A = Ext.getDoc();
   A.un("mousemove", this.onMouseMove, this);
   A.un("mouseup", this.onMouseUp, this);
   A.un("selectstart", this.stopSelect, this);
   B.preventDefault();
   this.clearStart();
   this.active = false;
   delete this.elRegion;
   this.fireEvent("mouseup", this, B);
   this.onEnd(B);
   this.fireEvent("dragend", this, B)
},triggerStart:function(A)
{
   this.clearStart();
   this.active = true;
   this.onStart(this.startXY);
   this.fireEvent("dragstart", this, this.startXY)
},clearStart:function()
{
   if (this.timer)
   {
      clearTimeout(this.timer);
      delete this.timer
   }
},stopSelect:function(A)
{
   A.stopEvent();
   return false
},onBeforeStart:function(A)
{
},onStart:function(A)
{
},onDrag:function(A)
{
},onEnd:function(A)
{
},getDragTarget:function()
{
   return this.dragTarget
},getDragCt:function()
{
   return this.el
},getXY:function(A)
{
   return A ? this.constrainModes[A].call(this, this.lastXY) : this.lastXY
},getOffset:function(C)
{
   var B = this.getXY(C);
   var A = this.startXY;
   return[A[0] - B[0],A[1] - B[1]]
},constrainModes:{"point":function(B)
{
   if (!this.elRegion)
   {
      this.elRegion = this.getDragCt().getRegion()
   }
   var A = this.dragRegion;
   A.left = B[0];
   A.top = B[1];
   A.right = B[0];
   A.bottom = B[1];
   A.constrainTo(this.elRegion);
   return[A.left,A.top]
}}});
Ext.dd.ScrollManager = function()
{
   var C = Ext.dd.DragDropMgr;
   var E = {};
   var B = null;
   var H = {};
   var G = function(K)
   {
      B = null;
      A()
   };
   var I = function()
   {
      if (C.dragCurrent)
      {
         C.refreshCache(C.dragCurrent.groups)
      }
   };
   var D = function()
   {
      if (C.dragCurrent)
      {
         var K = Ext.dd.ScrollManager;
         var L = H.el.ddScrollConfig ? H.el.ddScrollConfig.increment : K.increment;
         if (!K.animate)
         {
            if (H.el.scroll(H.dir, L))
            {
               I()
            }
         }
         else
         {
            H.el.scroll(H.dir, L, true, K.animDuration, I)
         }
      }
   };
   var A = function()
   {
      if (H.id)
      {
         clearInterval(H.id)
      }
      H.id = 0;
      H.el = null;
      H.dir = ""
   };
   var F = function(L, K)
   {
      A();
      H.el = L;
      H.dir = K;
      var M = (L.ddScrollConfig && L.ddScrollConfig.frequency) ? L.ddScrollConfig.frequency :
              Ext.dd.ScrollManager.frequency;
      H.id = setInterval(D, M)
   };
   var J = function(N, P)
   {
      if (P || !C.dragCurrent)
      {
         return
      }
      var Q = Ext.dd.ScrollManager;
      if (!B || B != C.dragCurrent)
      {
         B = C.dragCurrent;
         Q.refreshCache()
      }
      var R = Ext.lib.Event.getXY(N);
      var S = new Ext.lib.Point(R[0], R[1]);
      for (var L in E)
      {
         var M = E[L],K = M._region;
         var O = M.ddScrollConfig ? M.ddScrollConfig : Q;
         if (K && K.contains(S) && M.isScrollable())
         {
            if (K.bottom - S.y <= O.vthresh)
            {
               if (H.el != M)
               {
                  F(M, "down")
               }
               return
            }
            else
            {
               if (K.right - S.x <= O.hthresh)
               {
                  if (H.el != M)
                  {
                     F(M, "left")
                  }
                  return
               }
               else
               {
                  if (S.y - K.top <= O.vthresh)
                  {
                     if (H.el != M)
                     {
                        F(M, "up")
                     }
                     return
                  }
                  else
                  {
                     if (S.x - K.left <= O.hthresh)
                     {
                        if (H.el != M)
                        {
                           F(M, "right")
                        }
                        return
                     }
                  }
               }
            }
         }
      }
      A()
   };
   C.fireEvents = C.fireEvents.createSequence(J, C);
   C.stopDrag = C.stopDrag.createSequence(G, C);
   return{register:function(M)
   {
      if (Ext.isArray(M))
      {
         for (var L = 0,K = M.length; L < K; L++)
         {
            this.register(M[L])
         }
      }
      else
      {
         M = Ext.get(M);
         E[M.id] = M
      }
   },unregister:function(M)
   {
      if (Ext.isArray(M))
      {
         for (var L = 0,K = M.length; L < K; L++)
         {
            this.unregister(M[L])
         }
      }
      else
      {
         M = Ext.get(M);
         delete E[M.id]
      }
   },vthresh:25,hthresh:25,increment:100,frequency:500,animate:true,animDuration:0.4,refreshCache:function()
   {
      for (var K in E)
      {
         if (typeof E[K] == "object")
         {
            E[K]._region = E[K].getRegion()
         }
      }
   }}
}();
Ext.dd.Registry = function()
{
   var D = {};
   var B = {};
   var A = 0;
   var C = function(F, E)
   {
      if (typeof F == "string")
      {
         return F
      }
      var G = F.id;
      if (!G && E !== false)
      {
         G = "extdd-" + (++A);
         F.id = G
      }
      return G
   };
   return{register:function(H, I)
   {
      I = I || {};
      if (typeof H == "string")
      {
         H = document.getElementById(H)
      }
      I.ddel = H;
      D[C(H)] = I;
      if (I.isHandle !== false)
      {
         B[I.ddel.id] = I
      }
      if (I.handles)
      {
         var G = I.handles;
         for (var F = 0,E = G.length; F < E; F++)
         {
            B[C(G[F])] = I
         }
      }
   },unregister:function(H)
   {
      var J = C(H, false);
      var I = D[J];
      if (I)
      {
         delete D[J];
         if (I.handles)
         {
            var G = I.handles;
            for (var F = 0,E = G.length; F < E; F++)
            {
               delete B[C(G[F], false)]
            }
         }
      }
   },getHandle:function(E)
   {
      if (typeof E != "string")
      {
         E = E.id
      }
      return B[E]
   },getHandleFromEvent:function(F)
   {
      var E = Ext.lib.Event.getTarget(F);
      return E ? B[E.id] : null
   },getTarget:function(E)
   {
      if (typeof E != "string")
      {
         E = E.id
      }
      return D[E]
   },getTargetFromEvent:function(F)
   {
      var E = Ext.lib.Event.getTarget(F);
      return E ? D[E.id] || B[E.id] : null
   }}
}();
Ext.dd.StatusProxy = function(A)
{
   Ext.apply(this, A);
   this.id = this.id || Ext.id();
   this.el = new Ext.Layer({dh:{id:this.id,tag:"div",cls:"x-dd-drag-proxy " + this.dropNotAllowed,children:[{tag:"div",cls:"x-dd-drop-icon"},{tag:"div",cls:"x-dd-drag-ghost"}]},shadow:!A || A.shadow !== false});
   this.ghost = Ext.get(this.el.dom.childNodes[1]);
   this.dropStatus = this.dropNotAllowed
};
Ext.dd.StatusProxy.prototype = {dropAllowed:"x-dd-drop-ok",dropNotAllowed:"x-dd-drop-nodrop",setStatus:function(A)
{
   A = A || this.dropNotAllowed;
   if (this.dropStatus != A)
   {
      this.el.replaceClass(this.dropStatus, A);
      this.dropStatus = A
   }
},reset:function(A)
{
   this.el.dom.className = "x-dd-drag-proxy " + this.dropNotAllowed;
   this.dropStatus = this.dropNotAllowed;
   if (A)
   {
      this.ghost.update("")
   }
},update:function(A)
{
   if (typeof A == "string")
   {
      this.ghost.update(A)
   }
   else
   {
      this.ghost.update("");
      A.style.margin = "0";
      this.ghost.dom.appendChild(A)
   }
   var B = this.ghost.dom.firstChild;
   if (B)
   {
      Ext.fly(B).setStyle(Ext.isIE ? "styleFloat" : "cssFloat", "none")
   }
},getEl:function()
{
   return this.el
},getGhost:function()
{
   return this.ghost
},hide:function(A)
{
   this.el.hide();
   if (A)
   {
      this.reset(true)
   }
},stop:function()
{
   if (this.anim && this.anim.isAnimated && this.anim.isAnimated())
   {
      this.anim.stop()
   }
},show:function()
{
   this.el.show()
},sync:function()
{
   this.el.sync()
},repair:function(B, C, A)
{
   this.callback = C;
   this.scope = A;
   if (B && this.animRepair !== false)
   {
      this.el.addClass("x-dd-drag-repair");
      this.el.hideUnders(true);
      this.anim = this.el.shift({duration:this.repairDuration || 0.5,easing:"easeOut",xy:B,stopFx:true,callback:this.afterRepair,scope:this})
   }
   else
   {
      this.afterRepair()
   }
},afterRepair:function()
{
   this.hide(true);
   if (typeof this.callback == "function")
   {
      this.callback.call(this.scope || this)
   }
   this.callback = null;
   this.scope = null
}};
Ext.dd.DragSource = function(B, A)
{
   this.el = Ext.get(B);
   if (!this.dragData)
   {
      this.dragData = {}
   }
   Ext.apply(this, A);
   if (!this.proxy)
   {
      this.proxy = new Ext.dd.StatusProxy()
   }
   Ext.dd.DragSource.superclass.constructor.call(this, this.el.dom, this.ddGroup || this.group, {dragElId:this.proxy.id,resizeFrame:false,isTarget:false,scroll:this.scroll === true});
   this.dragging = false
};
Ext.extend(Ext.dd.DragSource, Ext.dd.DDProxy, {dropAllowed:"x-dd-drop-ok",dropNotAllowed:"x-dd-drop-nodrop",getDragData:function(A)
{
   return this.dragData
},onDragEnter:function(C, D)
{
   var B = Ext.dd.DragDropMgr.getDDById(D);
   this.cachedTarget = B;
   if (this.beforeDragEnter(B, C, D) !== false)
   {
      if (B.isNotifyTarget)
      {
         var A = B.notifyEnter(this, C, this.dragData);
         this.proxy.setStatus(A)
      }
      else
      {
         this.proxy.setStatus(this.dropAllowed)
      }
      if (this.afterDragEnter)
      {
         this.afterDragEnter(B, C, D)
      }
   }
},beforeDragEnter:function(B, A, C)
{
   return true
},alignElWithMouse:function()
{
   Ext.dd.DragSource.superclass.alignElWithMouse.apply(this, arguments);
   this.proxy.sync()
},onDragOver:function(C, D)
{
   var B = this.cachedTarget || Ext.dd.DragDropMgr.getDDById(D);
   if (this.beforeDragOver(B, C, D) !== false)
   {
      if (B.isNotifyTarget)
      {
         var A = B.notifyOver(this, C, this.dragData);
         this.proxy.setStatus(A)
      }
      if (this.afterDragOver)
      {
         this.afterDragOver(B, C, D)
      }
   }
},beforeDragOver:function(B, A, C)
{
   return true
},onDragOut:function(B, C)
{
   var A = this.cachedTarget || Ext.dd.DragDropMgr.getDDById(C);
   if (this.beforeDragOut(A, B, C) !== false)
   {
      if (A.isNotifyTarget)
      {
         A.notifyOut(this, B, this.dragData)
      }
      this.proxy.reset();
      if (this.afterDragOut)
      {
         this.afterDragOut(A, B, C)
      }
   }
   this.cachedTarget = null
},beforeDragOut:function(B, A, C)
{
   return true
},onDragDrop:function(B, C)
{
   var A = this.cachedTarget || Ext.dd.DragDropMgr.getDDById(C);
   if (this.beforeDragDrop(A, B, C) !== false)
   {
      if (A.isNotifyTarget)
      {
         if (A.notifyDrop(this, B, this.dragData))
         {
            this.onValidDrop(A, B, C)
         }
         else
         {
            this.onInvalidDrop(A, B, C)
         }
      }
      else
      {
         this.onValidDrop(A, B, C)
      }
      if (this.afterDragDrop)
      {
         this.afterDragDrop(A, B, C)
      }
   }
   delete this.cachedTarget
},beforeDragDrop:function(B, A, C)
{
   return true
},onValidDrop:function(B, A, C)
{
   this.hideProxy();
   if (this.afterValidDrop)
   {
      this.afterValidDrop(B, A, C)
   }
},getRepairXY:function(B, A)
{
   return this.el.getXY()
},onInvalidDrop:function(B, A, C)
{
   this.beforeInvalidDrop(B, A, C);
   if (this.cachedTarget)
   {
      if (this.cachedTarget.isNotifyTarget)
      {
         this.cachedTarget.notifyOut(this, A, this.dragData)
      }
      this.cacheTarget = null
   }
   this.proxy.repair(this.getRepairXY(A, this.dragData), this.afterRepair, this);
   if (this.afterInvalidDrop)
   {
      this.afterInvalidDrop(A, C)
   }
},afterRepair:function()
{
   if (Ext.enableFx)
   {
      this.el.highlight(this.hlColor || "c3daf9")
   }
   this.dragging = false
},beforeInvalidDrop:function(B, A, C)
{
   return true
},handleMouseDown:function(B)
{
   if (this.dragging)
   {
      return
   }
   var A = this.getDragData(B);
   if (A && this.onBeforeDrag(A, B) !== false)
   {
      this.dragData = A;
      this.proxy.stop();
      Ext.dd.DragSource.superclass.handleMouseDown.apply(this, arguments)
   }
},onBeforeDrag:function(A, B)
{
   return true
},onStartDrag:Ext.emptyFn,startDrag:function(A, B)
{
   this.proxy.reset();
   this.dragging = true;
   this.proxy.update("");
   this.onInitDrag(A, B);
   this.proxy.show()
},onInitDrag:function(A, C)
{
   var B = this.el.dom.cloneNode(true);
   B.id = Ext.id();
   this.proxy.update(B);
   this.onStartDrag(A, C);
   return true
},getProxy:function()
{
   return this.proxy
},hideProxy:function()
{
   this.proxy.hide();
   this.proxy.reset(true);
   this.dragging = false
},triggerCacheRefresh:function()
{
   Ext.dd.DDM.refreshCache(this.groups)
},b4EndDrag:function(A)
{
},endDrag:function(A)
{
   this.onEndDrag(this.dragData, A)
},onEndDrag:function(A, B)
{
},autoOffset:function(A, B)
{
   this.setDelta(-12, -20)
}});
Ext.dd.DropTarget = function(B, A)
{
   this.el = Ext.get(B);
   Ext.apply(this, A);
   if (this.containerScroll)
   {
      Ext.dd.ScrollManager.register(this.el)
   }
   Ext.dd.DropTarget.superclass.constructor.call(this, this.el.dom, this.ddGroup || this.group, {isTarget:true})
};
Ext.extend(Ext.dd.DropTarget, Ext.dd.DDTarget, {dropAllowed:"x-dd-drop-ok",dropNotAllowed:"x-dd-drop-nodrop",isTarget:true,isNotifyTarget:true,notifyEnter:function(A, C, B)
{
   if (this.overClass)
   {
      this.el.addClass(this.overClass)
   }
   return this.dropAllowed
},notifyOver:function(A, C, B)
{
   return this.dropAllowed
},notifyOut:function(A, C, B)
{
   if (this.overClass)
   {
      this.el.removeClass(this.overClass)
   }
},notifyDrop:function(A, C, B)
{
   return false
}});
Ext.dd.DragZone = function(B, A)
{
   Ext.dd.DragZone.superclass.constructor.call(this, B, A);
   if (this.containerScroll)
   {
      Ext.dd.ScrollManager.register(this.el)
   }
};
Ext.extend(Ext.dd.DragZone, Ext.dd.DragSource, {getDragData:function(A)
{
   return Ext.dd.Registry.getHandleFromEvent(A)
},onInitDrag:function(A, B)
{
   this.proxy.update(this.dragData.ddel.cloneNode(true));
   this.onStartDrag(A, B);
   return true
},afterRepair:function()
{
   if (Ext.enableFx)
   {
      Ext.Element.fly(this.dragData.ddel).highlight(this.hlColor || "c3daf9")
   }
   this.dragging = false
},getRepairXY:function(A)
{
   return Ext.Element.fly(this.dragData.ddel).getXY()
}});
Ext.dd.DropZone = function(B, A)
{
   Ext.dd.DropZone.superclass.constructor.call(this, B, A)
};
Ext.extend(Ext.dd.DropZone, Ext.dd.DropTarget, {getTargetFromEvent:function(A)
{
   return Ext.dd.Registry.getTargetFromEvent(A)
},onNodeEnter:function(D, A, C, B)
{
},onNodeOver:function(D, A, C, B)
{
   return this.dropAllowed
},onNodeOut:function(D, A, C, B)
{
},onNodeDrop:function(D, A, C, B)
{
   return false
},onContainerOver:function(A, C, B)
{
   return this.dropNotAllowed
},onContainerDrop:function(A, C, B)
{
   return false
},notifyEnter:function(A, C, B)
{
   return this.dropNotAllowed
},notifyOver:function(A, C, B)
{
   var D = this.getTargetFromEvent(C);
   if (!D)
   {
      if (this.lastOverNode)
      {
         this.onNodeOut(this.lastOverNode, A, C, B);
         this.lastOverNode = null
      }
      return this.onContainerOver(A, C, B)
   }
   if (this.lastOverNode != D)
   {
      if (this.lastOverNode)
      {
         this.onNodeOut(this.lastOverNode, A, C, B)
      }
      this.onNodeEnter(D, A, C, B);
      this.lastOverNode = D
   }
   return this.onNodeOver(D, A, C, B)
},notifyOut:function(A, C, B)
{
   if (this.lastOverNode)
   {
      this.onNodeOut(this.lastOverNode, A, C, B);
      this.lastOverNode = null
   }
},notifyDrop:function(A, C, B)
{
   if (this.lastOverNode)
   {
      this.onNodeOut(this.lastOverNode, A, C, B);
      this.lastOverNode = null
   }
   var D = this.getTargetFromEvent(C);
   return D ? this.onNodeDrop(D, A, C, B) : this.onContainerDrop(A, C, B)
},triggerCacheRefresh:function()
{
   Ext.dd.DDM.refreshCache(this.groups)
}});
Ext.data.SortTypes = {none:function(A)
{
   return A
},stripTagsRE:/<\/?[^>]+>/gi,asText:function(A)
{
   return String(A).replace(this.stripTagsRE, "")
},asUCText:function(A)
{
   return String(A).toUpperCase().replace(this.stripTagsRE, "")
},asUCString:function(A)
{
   return String(A).toUpperCase()
},asDate:function(A)
{
   if (!A)
   {
      return 0
   }
   if (Ext.isDate(A))
   {
      return A.getTime()
   }
   return Date.parse(String(A))
},asFloat:function(A)
{
   var B = parseFloat(String(A).replace(/,/g, ""));
   if (isNaN(B))
   {
      B = 0
   }
   return B
},asInt:function(A)
{
   var B = parseInt(String(A).replace(/,/g, ""));
   if (isNaN(B))
   {
      B = 0
   }
   return B
}};
Ext.data.Record = function(A, B)
{
   this.id = (B || B === 0) ? B : ++Ext.data.Record.AUTO_ID;
   this.data = A
};
Ext.data.Record.create = function(E)
{
   var C = Ext.extend(Ext.data.Record, {});
   var D = C.prototype;
   D.fields = new Ext.util.MixedCollection(false, function(F)
   {
      return F.name
   });
   for (var B = 0,A = E.length; B < A; B++)
   {
      D.fields.add(new Ext.data.Field(E[B]))
   }
   C.getField = function(F)
   {
      return D.fields.get(F)
   };
   return C
};
Ext.data.Record.AUTO_ID = 1000;
Ext.data.Record.EDIT = "edit";
Ext.data.Record.REJECT = "reject";
Ext.data.Record.COMMIT = "commit";
Ext.data.Record.prototype = {dirty:false,editing:false,error:null,modified:null,join:function(A)
{
   this.store = A
},set:function(A, B)
{
   if (String(this.data[A]) == String(B))
   {
      return
   }
   this.dirty = true;
   if (!this.modified)
   {
      this.modified = {}
   }
   if (typeof this.modified[A] == "undefined")
   {
      this.modified[A] = this.data[A]
   }
   this.data[A] = B;
   if (!this.editing && this.store)
   {
      this.store.afterEdit(this)
   }
},get:function(A)
{
   return this.data[A]
},beginEdit:function()
{
   this.editing = true;
   this.modified = {}
},cancelEdit:function()
{
   this.editing = false;
   delete this.modified
},endEdit:function()
{
   this.editing = false;
   if (this.dirty && this.store)
   {
      this.store.afterEdit(this)
   }
},reject:function(B)
{
   var A = this.modified;
   for (var C in A)
   {
      if (typeof A[C] != "function")
      {
         this.data[C] = A[C]
      }
   }
   this.dirty = false;
   delete this.modified;
   this.editing = false;
   if (this.store && B !== true)
   {
      this.store.afterReject(this)
   }
},commit:function(A)
{
   this.dirty = false;
   delete this.modified;
   this.editing = false;
   if (this.store && A !== true)
   {
      this.store.afterCommit(this)
   }
},getChanges:function()
{
   var A = this.modified,B = {};
   for (var C in A)
   {
      if (A.hasOwnProperty(C))
      {
         B[C] = this.data[C]
      }
   }
   return B
},hasError:function()
{
   return this.error != null
},clearError:function()
{
   this.error = null
},copy:function(A)
{
   return new this.constructor(Ext.apply({}, this.data), A || this.id)
},isModified:function(A)
{
   return !!(this.modified && this.modified.hasOwnProperty(A))
}};
Ext.StoreMgr = Ext.apply(new Ext.util.MixedCollection(), {register:function()
{
   for (var A = 0,B; B = arguments[A]; A++)
   {
      this.add(B)
   }
},unregister:function()
{
   for (var A = 0,B; B = arguments[A]; A++)
   {
      this.remove(this.lookup(B))
   }
},lookup:function(A)
{
   return typeof A == "object" ? A : this.get(A)
},getKey:function(A)
{
   return A.storeId || A.id
}});
Ext.data.Store = function(A)
{
   this.data = new Ext.util.MixedCollection(false);
   this.data.getKey = function(B)
   {
      return B.id
   };
   this.baseParams = {};
   this.paramNames = {"start":"start","limit":"limit","sort":"sort","dir":"dir"};
   if (A && A.data)
   {
      this.inlineData = A.data;
      delete A.data
   }
   Ext.apply(this, A);
   if (this.url && !this.proxy)
   {
      this.proxy = new Ext.data.HttpProxy({url:this.url})
   }
   if (this.reader)
   {
      if (!this.recordType)
      {
         this.recordType = this.reader.recordType
      }
      if (this.reader.onMetaChange)
      {
         this.reader.onMetaChange = this.onMetaChange.createDelegate(this)
      }
   }
   if (this.recordType)
   {
      this.fields = this.recordType.prototype.fields
   }
   this.modified = [];
   this.addEvents("datachanged", "metachange", "add", "remove", "update", "clear", "beforeload", "load", "loadexception");
   if (this.proxy)
   {
      this.relayEvents(this.proxy, ["loadexception"])
   }
   this.sortToggle = {};
   if (this.sortInfo)
   {
      this.setDefaultSort(this.sortInfo.field, this.sortInfo.direction)
   }
   Ext.data.Store.superclass.constructor.call(this);
   if (this.storeId || this.id)
   {
      Ext.StoreMgr.register(this)
   }
   if (this.inlineData)
   {
      this.loadData(this.inlineData);
      delete this.inlineData
   }
   else
   {
      if (this.autoLoad)
      {
         this.load.defer(10, this, [typeof this.autoLoad == "object" ? this.autoLoad : undefined])
      }
   }
};
Ext.extend(Ext.data.Store, Ext.util.Observable, {remoteSort:false,pruneModifiedRecords:false,lastOptions:null,destroy:function()
{
   if (this.id)
   {
      Ext.StoreMgr.unregister(this)
   }
   this.data = null;
   this.purgeListeners()
},add:function(B)
{
   B = [].concat(B);
   if (B.length < 1)
   {
      return
   }
   for (var D = 0,A = B.length; D < A; D++)
   {
      B[D].join(this)
   }
   var C = this.data.length;
   this.data.addAll(B);
   if (this.snapshot)
   {
      this.snapshot.addAll(B)
   }
   this.fireEvent("add", this, B, C)
},addSorted:function(A)
{
   var B = this.findInsertIndex(A);
   this.insert(B, A)
},remove:function(A)
{
   var B = this.data.indexOf(A);
   this.data.removeAt(B);
   if (this.pruneModifiedRecords)
   {
      this.modified.remove(A)
   }
   if (this.snapshot)
   {
      this.snapshot.remove(A)
   }
   this.fireEvent("remove", this, A, B)
},removeAll:function()
{
   this.data.clear();
   if (this.snapshot)
   {
      this.snapshot.clear()
   }
   if (this.pruneModifiedRecords)
   {
      this.modified = []
   }
   this.fireEvent("clear", this)
},insert:function(C, B)
{
   B = [].concat(B);
   for (var D = 0,A = B.length; D < A; D++)
   {
      this.data.insert(C, B[D]);
      B[D].join(this)
   }
   this.fireEvent("add", this, B, C)
},indexOf:function(A)
{
   return this.data.indexOf(A)
},indexOfId:function(A)
{
   return this.data.indexOfKey(A)
},getById:function(A)
{
   return this.data.key(A)
},getAt:function(A)
{
   return this.data.itemAt(A)
},getRange:function(B, A)
{
   return this.data.getRange(B, A)
},storeOptions:function(A)
{
   A = Ext.apply({}, A);
   delete A.callback;
   delete A.scope;
   this.lastOptions = A
},load:function(B)
{
   B = B || {};
   if (this.fireEvent("beforeload", this, B) !== false)
   {
      this.storeOptions(B);
      var C = Ext.apply(B.params || {}, this.baseParams);
      if (this.sortInfo && this.remoteSort)
      {
         var A = this.paramNames;
         C[A["sort"]] = this.sortInfo.field;
         C[A["dir"]] = this.sortInfo.direction
      }
      this.proxy.load(C, this.reader, this.loadRecords, this, B);
      return true
   }
   else
   {
      return false
   }
},reload:function(A)
{
   this.load(Ext.applyIf(A || {}, this.lastOptions))
},loadRecords:function(G, B, F)
{
   if (!G || F === false)
   {
      if (F !== false)
      {
         this.fireEvent("load", this, [], B)
      }
      if (B.callback)
      {
         B.callback.call(B.scope || this, [], B, false)
      }
      return
   }
   var E = G.records,D = G.totalRecords || E.length;
   if (!B || B.add !== true)
   {
      if (this.pruneModifiedRecords)
      {
         this.modified = []
      }
      for (var C = 0,A = E.length; C < A; C++)
      {
         E[C].join(this)
      }
      if (this.snapshot)
      {
         this.data = this.snapshot;
         delete this.snapshot
      }
      this.data.clear();
      this.data.addAll(E);
      this.totalLength = D;
      this.applySort();
      this.fireEvent("datachanged", this)
   }
   else
   {
      this.totalLength = Math.max(D, this.data.length + E.length);
      this.add(E)
   }
   this.fireEvent("load", this, E, B);
   if (B.callback)
   {
      B.callback.call(B.scope || this, E, B, true)
   }
},loadData:function(C, A)
{
   var B = this.reader.readRecords(C);
   this.loadRecords(B, {add:A}, true)
},getCount:function()
{
   return this.data.length || 0
},getTotalCount:function()
{
   return this.totalLength || 0
},getSortState:function()
{
   return this.sortInfo
},applySort:function()
{
   if (this.sortInfo && !this.remoteSort)
   {
      var A = this.sortInfo,B = A.field;
      this.sortData(B, A.direction)
   }
},sortData:function(C, D)
{
   D = D || "ASC";
   var A = this.fields.get(C).sortType;
   var B = function(F, E)
   {
      var H = A(F.data[C]),G = A(E.data[C]);
      return H > G ? 1 : (H < G ? -1 : 0)
   };
   this.data.sort(D, B);
   if (this.snapshot && this.snapshot != this.data)
   {
      this.snapshot.sort(D, B)
   }
},setDefaultSort:function(B, A)
{
   A = A ? A.toUpperCase() : "ASC";
   this.sortInfo = {field:B,direction:A};
   this.sortToggle[B] = A
},sort:function(E, C)
{
   var D = this.fields.get(E);
   if (!D)
   {
      return false
   }
   if (!C)
   {
      if (this.sortInfo && this.sortInfo.field == D.name)
      {
         C = (this.sortToggle[D.name] || "ASC").toggle("ASC", "DESC")
      }
      else
      {
         C = D.sortDir
      }
   }
   var B = (this.sortToggle) ? this.sortToggle[D.name] : null;
   var A = (this.sortInfo) ? this.sortInfo : null;
   this.sortToggle[D.name] = C;
   this.sortInfo = {field:D.name,direction:C};
   if (!this.remoteSort)
   {
      this.applySort();
      this.fireEvent("datachanged", this)
   }
   else
   {
      if (!this.load(this.lastOptions))
      {
         if (B)
         {
            this.sortToggle[D.name] = B
         }
         if (A)
         {
            this.sortInfo = A
         }
      }
   }
},each:function(B, A)
{
   this.data.each(B, A)
},getModifiedRecords:function()
{
   return this.modified
},createFilterFn:function(C, B, D, A)
{
   if (Ext.isEmpty(B, false))
   {
      return false
   }
   B = this.data.createValueMatcher(B, D, A);
   return function(E)
   {
      return B.test(E.data[C])
   }
},sum:function(E, F, A)
{
   var C = this.data.items,B = 0;
   F = F || 0;
   A = (A || A === 0) ? A : C.length - 1;
   for (var D = F; D <= A; D++)
   {
      B += (C[D].data[E] || 0)
   }
   return B
},filter:function(D, C, E, A)
{
   var B = this.createFilterFn(D, C, E, A);
   return B ? this.filterBy(B) : this.clearFilter()
},filterBy:function(B, A)
{
   this.snapshot = this.snapshot || this.data;
   this.data = this.queryBy(B, A || this);
   this.fireEvent("datachanged", this)
},query:function(D, C, E, A)
{
   var B = this.createFilterFn(D, C, E, A);
   return B ? this.queryBy(B) : this.data.clone()
},queryBy:function(B, A)
{
   var C = this.snapshot || this.data;
   return C.filterBy(B, A || this)
},find:function(D, C, F, E, A)
{
   var B = this.createFilterFn(D, C, E, A);
   return B ? this.data.findIndexBy(B, null, F) : -1
},findBy:function(B, A, C)
{
   return this.data.findIndexBy(B, A, C)
},collect:function(G, H, B)
{
   var F = (B === true && this.snapshot) ? this.snapshot.items : this.data.items;
   var I,J,A = [],C = {};
   for (var D = 0,E = F.length; D < E; D++)
   {
      I = F[D].data[G];
      J = String(I);
      if ((H || !Ext.isEmpty(I)) && !C[J])
      {
         C[J] = true;
         A[A.length] = I
      }
   }
   return A
},clearFilter:function(A)
{
   if (this.isFiltered())
   {
      this.data = this.snapshot;
      delete this.snapshot;
      if (A !== true)
      {
         this.fireEvent("datachanged", this)
      }
   }
},isFiltered:function()
{
   return this.snapshot && this.snapshot != this.data
},afterEdit:function(A)
{
   if (this.modified.indexOf(A) == -1)
   {
      this.modified.push(A)
   }
   this.fireEvent("update", this, A, Ext.data.Record.EDIT)
},afterReject:function(A)
{
   this.modified.remove(A);
   this.fireEvent("update", this, A, Ext.data.Record.REJECT)
},afterCommit:function(A)
{
   this.modified.remove(A);
   this.fireEvent("update", this, A, Ext.data.Record.COMMIT)
},commitChanges:function()
{
   var B = this.modified.slice(0);
   this.modified = [];
   for (var C = 0,A = B.length; C < A; C++)
   {
      B[C].commit()
   }
},rejectChanges:function()
{
   var B = this.modified.slice(0);
   this.modified = [];
   for (var C = 0,A = B.length; C < A; C++)
   {
      B[C].reject()
   }
},onMetaChange:function(B, A, C)
{
   this.recordType = A;
   this.fields = A.prototype.fields;
   delete this.snapshot;
   this.sortInfo = B.sortInfo;
   this.modified = [];
   this.fireEvent("metachange", this, this.reader.meta)
},findInsertIndex:function(A)
{
   this.suspendEvents();
   var C = this.data.clone();
   this.data.add(A);
   this.applySort();
   var B = this.data.indexOf(A);
   this.data = C;
   this.resumeEvents();
   return B
}});
Ext.data.SimpleStore = function(A)
{
   Ext.data.SimpleStore.superclass.constructor.call(this, Ext.apply(A, {reader:new Ext.data.ArrayReader({id:A.id}, Ext.data.Record.create(A.fields))}))
};
Ext.extend(Ext.data.SimpleStore, Ext.data.Store, {loadData:function(E, B)
{
   if (this.expandData === true)
   {
      var D = [];
      for (var C = 0,A = E.length; C < A; C++)
      {
         D[D.length] = [E[C]]
      }
      E = D
   }
   Ext.data.SimpleStore.superclass.loadData.call(this, E, B)
}});
Ext.data.JsonStore = function(A)
{
   Ext.data.JsonStore.superclass.constructor.call(this, Ext.apply(A, {proxy:A.proxy || (!A.data ?
                                                                                        new Ext.data.HttpProxy({url:A.url}) :
                                                                                        undefined),reader:new Ext.data.JsonReader(A, A.fields)}))
};
Ext.extend(Ext.data.JsonStore, Ext.data.Store);
Ext.data.Field = function(D)
{
   if (typeof D == "string")
   {
      D = {name:D}
   }
   Ext.apply(this, D);
   if (!this.type)
   {
      this.type = "auto"
   }
   var C = Ext.data.SortTypes;
   if (typeof this.sortType == "string")
   {
      this.sortType = C[this.sortType]
   }
   if (!this.sortType)
   {
      switch (this.type)
         {case"string":this.sortType = C.asUCString;break;case"date":this.sortType = C.asDate;break;default:this.sortType = C.none}
   }
   var E = /[\$,%]/g;
   if (!this.convert)
   {
      var B,A = this.dateFormat;
      switch (this.type)
         {case"":case"auto":case undefined:B = function(F)
      {
         return F
      };break;case"string":B = function(F)
      {
         return(F === undefined || F === null) ? "" : String(F)
      };break;case"int":B = function(F)
      {
         return F !== undefined && F !== null && F !== "" ? parseInt(String(F).replace(E, ""), 10) : ""
      };break;case"float":B = function(F)
      {
         return F !== undefined && F !== null && F !== "" ? parseFloat(String(F).replace(E, ""), 10) : ""
      };break;case"bool":case"boolean":B = function(F)
      {
         return F === true || F === "true" || F == 1
      };break;case"date":B = function(G)
      {
         if (!G)
         {
            return""
         }
         if (Ext.isDate(G))
         {
            return G
         }
         if (A)
         {
            if (A == "timestamp")
            {
               return new Date(G * 1000)
            }
            if (A == "time")
            {
               return new Date(parseInt(G, 10))
            }
            return Date.parseDate(G, A)
         }
         var F = Date.parse(G);
         return F ? new Date(F) : null
      };break}
      this.convert = B
   }
};
Ext.data.Field.prototype = {dateFormat:null,defaultValue:"",mapping:null,sortType:null,sortDir:"ASC"};
Ext.data.DataReader = function(A, B)
{
   this.meta = A;
   this.recordType = Ext.isArray(B) ? Ext.data.Record.create(B) : B
};
Ext.data.DataReader.prototype = {};
Ext.data.DataProxy = function()
{
   this.addEvents("beforeload", "load");
   Ext.data.DataProxy.superclass.constructor.call(this)
};
Ext.extend(Ext.data.DataProxy, Ext.util.Observable);
Ext.data.MemoryProxy = function(A)
{
   Ext.data.MemoryProxy.superclass.constructor.call(this);
   this.data = A
};
Ext.extend(Ext.data.MemoryProxy, Ext.data.DataProxy, {load:function(F, C, G, D, B)
{
   F = F || {};
   var A;
   try
   {
      A = C.readRecords(this.data)
   }
   catch(E)
   {
      this.fireEvent("loadexception", this, B, null, E);
      G.call(D, null, B, false);
      return
   }
   G.call(D, A, B, true)
},update:function(B, A)
{
}});
Ext.data.HttpProxy = function(A)
{
   Ext.data.HttpProxy.superclass.constructor.call(this);
   this.conn = A;
   this.useAjax = !A || !A.events
};
Ext.extend(Ext.data.HttpProxy, Ext.data.DataProxy, {getConnection:function()
{
   return this.useAjax ? Ext.Ajax : this.conn
},load:function(E, B, F, C, A)
{
   if (this.fireEvent("beforeload", this, E) !== false)
   {
      var D = {params:E || {},request:{callback:F,scope:C,arg:A},reader:B,callback:this.loadResponse,scope:this};
      if (this.useAjax)
      {
         Ext.applyIf(D, this.conn);
         if (this.activeRequest)
         {
            Ext.Ajax.abort(this.activeRequest)
         }
         this.activeRequest = Ext.Ajax.request(D)
      }
      else
      {
         this.conn.request(D)
      }
   }
   else
   {
      F.call(C || this, null, A, false)
   }
},loadResponse:function(E, D, B)
{
   delete this.activeRequest;
   if (!D)
   {
      this.fireEvent("loadexception", this, E, B);
      E.request.callback.call(E.request.scope, null, E.request.arg, false);
      return
   }
   var A;
   try
   {
      A = E.reader.read(B)
   }
   catch(C)
   {
      this.fireEvent("loadexception", this, E, B, C);
      E.request.callback.call(E.request.scope, null, E.request.arg, false);
      return
   }
   this.fireEvent("load", this, E, E.request.arg);
   E.request.callback.call(E.request.scope, A, E.request.arg, true)
},update:function(A)
{
},updateResponse:function(A)
{
}});
Ext.data.ScriptTagProxy = function(A)
{
   Ext.data.ScriptTagProxy.superclass.constructor.call(this);
   Ext.apply(this, A);
   this.head = document.getElementsByTagName("head")[0]
};
Ext.data.ScriptTagProxy.TRANS_ID = 1000;
Ext.extend(Ext.data.ScriptTagProxy, Ext.data.DataProxy, {timeout:30000,callbackParam:"callback",nocache:true,load:function(E, F, H, I, J)
{
   if (this.fireEvent("beforeload", this, E) !== false)
   {
      var C = Ext.urlEncode(Ext.apply(E, this.extraParams));
      var B = this.url;
      B += (B.indexOf("?") != -1 ? "&" : "?") + C;
      if (this.nocache)
      {
         B += "&_dc=" + (new Date().getTime())
      }
      var A = ++Ext.data.ScriptTagProxy.TRANS_ID;
      var K = {id:A,cb:"stcCallback" + A,scriptId:"stcScript" + A,params:E,arg:J,url:B,callback:H,scope:I,reader:F};
      var D = this;
      window[K.cb] = function(L)
      {
         D.handleResponse(L, K)
      };
      B += String.format("&{0}={1}", this.callbackParam, K.cb);
      if (this.autoAbort !== false)
      {
         this.abort()
      }
      K.timeoutId = this.handleFailure.defer(this.timeout, this, [K]);
      var G = document.createElement("script");
      G.setAttribute("src", B);
      G.setAttribute("type", "text/javascript");
      G.setAttribute("id", K.scriptId);
      this.head.appendChild(G);
      this.trans = K
   }
   else
   {
      H.call(I || this, null, J, false)
   }
},isLoading:function()
{
   return this.trans ? true : false
},abort:function()
{
   if (this.isLoading())
   {
      this.destroyTrans(this.trans)
   }
},destroyTrans:function(B, A)
{
   this.head.removeChild(document.getElementById(B.scriptId));
   clearTimeout(B.timeoutId);
   if (A)
   {
      window[B.cb] = undefined;
      try
      {
         delete window[B.cb]
      }
      catch(C)
      {
      }
   }
   else
   {
      window[B.cb] = function()
      {
         window[B.cb] = undefined;
         try
         {
            delete window[B.cb]
         }
         catch(D)
         {
         }
      }
   }
},handleResponse:function(D, B)
{
   this.trans = false;
   this.destroyTrans(B, true);
   var A;
   try
   {
      A = B.reader.readRecords(D)
   }
   catch(C)
   {
      this.fireEvent("loadexception", this, D, B.arg, C);
      B.callback.call(B.scope || window, null, B.arg, false);
      return
   }
   this.fireEvent("load", this, D, B.arg);
   B.callback.call(B.scope || window, A, B.arg, true)
},handleFailure:function(A)
{
   this.trans = false;
   this.destroyTrans(A, false);
   this.fireEvent("loadexception", this, null, A.arg);
   A.callback.call(A.scope || window, null, A.arg, false)
}});
Ext.data.JsonReader = function(A, B)
{
   A = A || {};
   Ext.data.JsonReader.superclass.constructor.call(this, A, B || A.fields)
};
Ext.extend(Ext.data.JsonReader, Ext.data.DataReader, {read:function(response)
{
   var json = response.responseText;
   var o = eval("(" + json + ")");
   if (!o)
   {
      throw {message:"JsonReader.read: Json object not found"}
   }
   return this.readRecords(o)
},onMetaChange:function(A, C, B)
{
},simpleAccess:function(B, A)
{
   return B[A]
},getJsonAccessor:function()
{
   var A = /[\[\.]/;
   return function(C)
   {
      try
      {
         return(A.test(C)) ? new Function("obj", "return obj." + C) : function(D)
         {
            return D[C]
         }
      }
      catch(B)
      {
      }
      return Ext.emptyFn
   }
}(),readRecords:function(K)
{
   this.jsonData = K;
   if (K.metaData)
   {
      delete this.ef;
      this.meta = K.metaData;
      this.recordType = Ext.data.Record.create(K.metaData.fields);
      this.onMetaChange(this.meta, this.recordType, K)
   }
   var H = this.meta,A = this.recordType,R = A.prototype.fields,F = R.items,E = R.length;
   if (!this.ef)
   {
      if (H.totalProperty)
      {
         this.getTotal = this.getJsonAccessor(H.totalProperty)
      }
      if (H.successProperty)
      {
         this.getSuccess = this.getJsonAccessor(H.successProperty)
      }
      this.getRoot = H.root ? this.getJsonAccessor(H.root) : function(U)
      {
         return U
      };
      if (H.id)
      {
         var Q = this.getJsonAccessor(H.id);
         this.getId = function(V)
         {
            var U = Q(V);
            return(U === undefined || U === "") ? null : U
         }
      }
      else
      {
         this.getId = function()
         {
            return null
         }
      }
      this.ef = [];
      for (var O = 0; O < E; O++)
      {
         R = F[O];
         var T = (R.mapping !== undefined && R.mapping !== null) ? R.mapping : R.name;
         this.ef[O] = this.getJsonAccessor(T)
      }
   }
   var M = this.getRoot(K),S = M.length,I = S,D = true;
   if (H.totalProperty)
   {
      var G = parseInt(this.getTotal(K), 10);
      if (!isNaN(G))
      {
         I = G
      }
   }
   if (H.successProperty)
   {
      var G = this.getSuccess(K);
      if (G === false || G === "false")
      {
         D = false
      }
   }
   var P = [];
   for (var O = 0; O < S; O++)
   {
      var L = M[O];
      var B = {};
      var J = this.getId(L);
      for (var N = 0; N < E; N++)
      {
         R = F[N];
         var G = this.ef[N](L);
         B[R.name] = R.convert((G !== undefined) ? G : R.defaultValue, L)
      }
      var C = new A(B, J);
      C.json = L;
      P[O] = C
   }
   return{success:D,records:P,totalRecords:I}
}});
Ext.data.XmlReader = function(A, B)
{
   A = A || {};
   Ext.data.XmlReader.superclass.constructor.call(this, A, B || A.fields)
};
Ext.extend(Ext.data.XmlReader, Ext.data.DataReader, {read:function(A)
{
   var B = A.responseXML;
   if (!B)
   {
      throw {message:"XmlReader.read: XML Document not available"}
   }
   return this.readRecords(B)
},readRecords:function(T)
{
   this.xmlData = T;
   var N = T.documentElement || T;
   var I = Ext.DomQuery;
   var B = this.recordType,L = B.prototype.fields;
   var D = this.meta.id;
   var G = 0,E = true;
   if (this.meta.totalRecords)
   {
      G = I.selectNumber(this.meta.totalRecords, N, 0)
   }
   if (this.meta.success)
   {
      var K = I.selectValue(this.meta.success, N, true);
      E = K !== false && K !== "false"
   }
   var Q = [];
   var U = I.select(this.meta.record, N);
   for (var P = 0,R = U.length; P < R; P++)
   {
      var M = U[P];
      var A = {};
      var J = D ? I.selectValue(D, M) : undefined;
      for (var O = 0,H = L.length; O < H; O++)
      {
         var S = L.items[O];
         var F = I.selectValue(S.mapping || S.name, M, S.defaultValue);
         F = S.convert(F, M);
         A[S.name] = F
      }
      var C = new B(A, J);
      C.node = M;
      Q[Q.length] = C
   }
   return{success:E,records:Q,totalRecords:G || Q.length}
}});
Ext.data.ArrayReader = Ext.extend(Ext.data.JsonReader, {readRecords:function(C)
{
   var B = this.meta ? this.meta.id : null;
   var G = this.recordType,K = G.prototype.fields;
   var E = [];
   var M = C;
   for (var I = 0; I < M.length; I++)
   {
      var D = M[I];
      var O = {};
      var A = ((B || B === 0) && D[B] !== undefined && D[B] !== "" ? D[B] : null);
      for (var H = 0,P = K.length; H < P; H++)
      {
         var L = K.items[H];
         var F = L.mapping !== undefined && L.mapping !== null ? L.mapping : H;
         var N = D[F] !== undefined ? D[F] : L.defaultValue;
         N = L.convert(N, D);
         O[L.name] = N
      }
      var J = new G(O, A);
      J.json = D;
      E[E.length] = J
   }
   return{records:E,totalRecords:E.length}
}});
Ext.data.Tree = function(A)
{
   this.nodeHash = {};
   this.root = null;
   if (A)
   {
      this.setRootNode(A)
   }
   this.addEvents("append", "remove", "move", "insert", "beforeappend", "beforeremove", "beforemove", "beforeinsert");
   Ext.data.Tree.superclass.constructor.call(this)
};
Ext.extend(Ext.data.Tree, Ext.util.Observable, {pathSeparator:"/",proxyNodeEvent:function()
{
   return this.fireEvent.apply(this, arguments)
},getRootNode:function()
{
   return this.root
},setRootNode:function(A)
{
   this.root = A;
   A.ownerTree = this;
   A.isRoot = true;
   this.registerNode(A);
   return A
},getNodeById:function(A)
{
   return this.nodeHash[A]
},registerNode:function(A)
{
   this.nodeHash[A.id] = A
},unregisterNode:function(A)
{
   delete this.nodeHash[A.id]
},toString:function()
{
   return"[Tree" + (this.id ? " " + this.id : "") + "]"
}});
Ext.data.Node = function(A)
{
   this.attributes = A || {};
   this.leaf = this.attributes.leaf;
   this.id = this.attributes.id;
   if (!this.id)
   {
      this.id = Ext.id(null, "ynode-");
      this.attributes.id = this.id
   }
   this.childNodes = [];
   if (!this.childNodes.indexOf)
   {
      this.childNodes.indexOf = function(D)
      {
         for (var C = 0,B = this.length; C < B; C++)
         {
            if (this[C] == D)
            {
               return C
            }
         }
         return -1
      }
   }
   this.parentNode = null;
   this.firstChild = null;
   this.lastChild = null;
   this.previousSibling = null;
   this.nextSibling = null;
   this.addEvents({"append":true,"remove":true,"move":true,"insert":true,"beforeappend":true,"beforeremove":true,"beforemove":true,"beforeinsert":true});
   this.listeners = this.attributes.listeners;
   Ext.data.Node.superclass.constructor.call(this)
};
Ext.extend(Ext.data.Node, Ext.util.Observable, {fireEvent:function(B)
{
   if (Ext.data.Node.superclass.fireEvent.apply(this, arguments) === false)
   {
      return false
   }
   var A = this.getOwnerTree();
   if (A)
   {
      if (A.proxyNodeEvent.apply(A, arguments) === false)
      {
         return false
      }
   }
   return true
},isLeaf:function()
{
   return this.leaf === true
},setFirstChild:function(A)
{
   this.firstChild = A
},setLastChild:function(A)
{
   this.lastChild = A
},isLast:function()
{
   return(!this.parentNode ? true : this.parentNode.lastChild == this)
},isFirst:function()
{
   return(!this.parentNode ? true : this.parentNode.firstChild == this)
},hasChildNodes:function()
{
   return !this.isLeaf() && this.childNodes.length > 0
},isExpandable:function()
{
   return this.attributes.expandable || this.hasChildNodes()
},appendChild:function(E)
{
   var F = false;
   if (Ext.isArray(E))
   {
      F = E
   }
   else
   {
      if (arguments.length > 1)
      {
         F = arguments
      }
   }
   if (F)
   {
      for (var D = 0,A = F.length; D < A; D++)
      {
         this.appendChild(F[D])
      }
   }
   else
   {
      if (this.fireEvent("beforeappend", this.ownerTree, this, E) === false)
      {
         return false
      }
      var B = this.childNodes.length;
      var C = E.parentNode;
      if (C)
      {
         if (E.fireEvent("beforemove", E.getOwnerTree(), E, C, this, B) === false)
         {
            return false
         }
         C.removeChild(E)
      }
      B = this.childNodes.length;
      if (B == 0)
      {
         this.setFirstChild(E)
      }
      this.childNodes.push(E);
      E.parentNode = this;
      var G = this.childNodes[B - 1];
      if (G)
      {
         E.previousSibling = G;
         G.nextSibling = E
      }
      else
      {
         E.previousSibling = null
      }
      E.nextSibling = null;
      this.setLastChild(E);
      E.setOwnerTree(this.getOwnerTree());
      this.fireEvent("append", this.ownerTree, this, E, B);
      if (C)
      {
         E.fireEvent("move", this.ownerTree, E, C, this, B)
      }
      return E
   }
},removeChild:function(B)
{
   var A = this.childNodes.indexOf(B);
   if (A == -1)
   {
      return false
   }
   if (this.fireEvent("beforeremove", this.ownerTree, this, B) === false)
   {
      return false
   }
   this.childNodes.splice(A, 1);
   if (B.previousSibling)
   {
      B.previousSibling.nextSibling = B.nextSibling
   }
   if (B.nextSibling)
   {
      B.nextSibling.previousSibling = B.previousSibling
   }
   if (this.firstChild == B)
   {
      this.setFirstChild(B.nextSibling)
   }
   if (this.lastChild == B)
   {
      this.setLastChild(B.previousSibling)
   }
   B.setOwnerTree(null);
   B.parentNode = null;
   B.previousSibling = null;
   B.nextSibling = null;
   this.fireEvent("remove", this.ownerTree, this, B);
   return B
},insertBefore:function(D, A)
{
   if (!A)
   {
      return this.appendChild(D)
   }
   if (D == A)
   {
      return false
   }
   if (this.fireEvent("beforeinsert", this.ownerTree, this, D, A) === false)
   {
      return false
   }
   var B = this.childNodes.indexOf(A);
   var C = D.parentNode;
   var E = B;
   if (C == this && this.childNodes.indexOf(D) < B)
   {
      E--
   }
   if (C)
   {
      if (D.fireEvent("beforemove", D.getOwnerTree(), D, C, this, B, A) === false)
      {
         return false
      }
      C.removeChild(D)
   }
   if (E == 0)
   {
      this.setFirstChild(D)
   }
   this.childNodes.splice(E, 0, D);
   D.parentNode = this;
   var F = this.childNodes[E - 1];
   if (F)
   {
      D.previousSibling = F;
      F.nextSibling = D
   }
   else
   {
      D.previousSibling = null
   }
   D.nextSibling = A;
   A.previousSibling = D;
   D.setOwnerTree(this.getOwnerTree());
   this.fireEvent("insert", this.ownerTree, this, D, A);
   if (C)
   {
      D.fireEvent("move", this.ownerTree, D, C, this, E, A)
   }
   return D
},remove:function()
{
   this.parentNode.removeChild(this);
   return this
},item:function(A)
{
   return this.childNodes[A]
},replaceChild:function(A, B)
{
   this.insertBefore(A, B);
   this.removeChild(B);
   return B
},indexOf:function(A)
{
   return this.childNodes.indexOf(A)
},getOwnerTree:function()
{
   if (!this.ownerTree)
   {
      var A = this;
      while (A)
      {
         if (A.ownerTree)
         {
            this.ownerTree = A.ownerTree;
            break
         }
         A = A.parentNode
      }
   }
   return this.ownerTree
},getDepth:function()
{
   var B = 0;
   var A = this;
   while (A.parentNode)
   {
      ++B;
      A = A.parentNode
   }
   return B
},setOwnerTree:function(B)
{
   if (B != this.ownerTree)
   {
      if (this.ownerTree)
      {
         this.ownerTree.unregisterNode(this)
      }
      this.ownerTree = B;
      var D = this.childNodes;
      for (var C = 0,A = D.length; C < A; C++)
      {
         D[C].setOwnerTree(B)
      }
      if (B)
      {
         B.registerNode(this)
      }
   }
},getPath:function(B)
{
   B = B || "id";
   var D = this.parentNode;
   var A = [this.attributes[B]];
   while (D)
   {
      A.unshift(D.attributes[B]);
      D = D.parentNode
   }
   var C = this.getOwnerTree().pathSeparator;
   return C + A.join(C)
},bubble:function(C, B, A)
{
   var D = this;
   while (D)
   {
      if (C.apply(B || D, A || [D]) === false)
      {
         break
      }
      D = D.parentNode
   }
},cascade:function(F, E, B)
{
   if (F.apply(E || this, B || [this]) !== false)
   {
      var D = this.childNodes;
      for (var C = 0,A = D.length; C < A; C++)
      {
         D[C].cascade(F, E, B)
      }
   }
},eachChild:function(F, E, B)
{
   var D = this.childNodes;
   for (var C = 0,A = D.length; C < A; C++)
   {
      if (F.apply(E || this, B || [D[C]]) === false)
      {
         break
      }
   }
},findChild:function(D, E)
{
   var C = this.childNodes;
   for (var B = 0,A = C.length; B < A; B++)
   {
      if (C[B].attributes[D] == E)
      {
         return C[B]
      }
   }
   return null
},findChildBy:function(E, D)
{
   var C = this.childNodes;
   for (var B = 0,A = C.length; B < A; B++)
   {
      if (E.call(D || C[B], C[B]) === true)
      {
         return C[B]
      }
   }
   return null
},sort:function(E, D)
{
   var C = this.childNodes;
   var A = C.length;
   if (A > 0)
   {
      var F = D ? function()
      {
         E.apply(D, arguments)
      } : E;
      C.sort(F);
      for (var B = 0; B < A; B++)
      {
         var G = C[B];
         G.previousSibling = C[B - 1];
         G.nextSibling = C[B + 1];
         if (B == 0)
         {
            this.setFirstChild(G)
         }
         if (B == A - 1)
         {
            this.setLastChild(G)
         }
      }
   }
},contains:function(A)
{
   return A.isAncestor(this)
},isAncestor:function(A)
{
   var B = this.parentNode;
   while (B)
   {
      if (B == A)
      {
         return true
      }
      B = B.parentNode
   }
   return false
},toString:function()
{
   return"[Node" + (this.id ? " " + this.id : "") + "]"
}});
Ext.data.GroupingStore = Ext.extend(Ext.data.Store, {remoteGroup:false,groupOnSort:false,clearGrouping:function()
{
   this.groupField = false;
   if (this.remoteGroup)
   {
      if (this.baseParams)
      {
         delete this.baseParams.groupBy
      }
      this.reload()
   }
   else
   {
      this.applySort();
      this.fireEvent("datachanged", this)
   }
},groupBy:function(C, B)
{
   if (this.groupField == C && !B)
   {
      return
   }
   this.groupField = C;
   if (this.remoteGroup)
   {
      if (!this.baseParams)
      {
         this.baseParams = {}
      }
      this.baseParams["groupBy"] = C
   }
   if (this.groupOnSort)
   {
      this.sort(C);
      return
   }
   if (this.remoteGroup)
   {
      this.reload()
   }
   else
   {
      var A = this.sortInfo || {};
      if (A.field != C)
      {
         this.applySort()
      }
      else
      {
         this.sortData(C)
      }
      this.fireEvent("datachanged", this)
   }
},applySort:function()
{
   Ext.data.GroupingStore.superclass.applySort.call(this);
   if (!this.groupOnSort && !this.remoteGroup)
   {
      var A = this.getGroupState();
      if (A && A != this.sortInfo.field)
      {
         this.sortData(this.groupField)
      }
   }
},applyGrouping:function(A)
{
   if (this.groupField !== false)
   {
      this.groupBy(this.groupField, true);
      return true
   }
   else
   {
      if (A === true)
      {
         this.fireEvent("datachanged", this)
      }
      return false
   }
},getGroupState:function()
{
   return this.groupOnSort && this.groupField !== false ? (this.sortInfo ? this.sortInfo.field : undefined) :
          this.groupField
}});
Ext.ComponentMgr = function()
{
   var B = new Ext.util.MixedCollection();
   var A = {};
   return{register:function(C)
   {
      B.add(C)
   },unregister:function(C)
   {
      B.remove(C)
   },get:function(C)
   {
      return B.get(C)
   },onAvailable:function(E, D, C)
   {
      B.on("add", function(F, G)
      {
         if (G.id == E)
         {
            D.call(C || G, G);
            B.un("add", D, C)
         }
      })
   },all:B,registerType:function(D, C)
   {
      A[D] = C;
      C.xtype = D
   },create:function(C, D)
   {
      return new A[C.xtype || D](C)
   }}
}();
Ext.reg = Ext.ComponentMgr.registerType;
Ext.Component = function(B)
{
   B = B || {};
   if (B.initialConfig)
   {
      if (B.isAction)
      {
         this.baseAction = B
      }
      B = B.initialConfig
   }
   else
   {
      if (B.tagName || B.dom || typeof B == "string")
      {
         B = {applyTo:B,id:B.id || B}
      }
   }
   this.initialConfig = B;
   Ext.apply(this, B);
   this.addEvents("disable", "enable", "beforeshow", "show", "beforehide", "hide", "beforerender", "render", "beforedestroy", "destroy", "beforestaterestore", "staterestore", "beforestatesave", "statesave");
   this.getId();
   Ext.ComponentMgr.register(this);
   Ext.Component.superclass.constructor.call(this);
   if (this.baseAction)
   {
      this.baseAction.addComponent(this)
   }
   this.initComponent();
   if (this.plugins)
   {
      if (Ext.isArray(this.plugins))
      {
         for (var C = 0,A = this.plugins.length; C < A; C++)
         {
            this.plugins[C] = this.initPlugin(this.plugins[C])
         }
      }
      else
      {
         this.plugins = this.initPlugin(this.plugins)
      }
   }
   if (this.stateful !== false)
   {
      this.initState(B)
   }
   if (this.applyTo)
   {
      this.applyToMarkup(this.applyTo);
      delete this.applyTo
   }
   else
   {
      if (this.renderTo)
      {
         this.render(this.renderTo);
         delete this.renderTo
      }
   }
};
Ext.Component.AUTO_ID = 1000;
Ext.extend(Ext.Component, Ext.util.Observable, {disabledClass:"x-item-disabled",allowDomMove:true,autoShow:false,hideMode:"display",hideParent:false,hidden:false,disabled:false,rendered:false,ctype:"Ext.Component",actionMode:"el",getActionEl:function()
{
   return this[this.actionMode]
},initPlugin:function(A)
{
   A.init(this);
   return A
},initComponent:Ext.emptyFn,render:function(B, A)
{
   if (!this.rendered && this.fireEvent("beforerender", this) !== false)
   {
      if (!B && this.el)
      {
         this.el = Ext.get(this.el);
         B = this.el.dom.parentNode;
         this.allowDomMove = false
      }
      this.container = Ext.get(B);
      if (this.ctCls)
      {
         this.container.addClass(this.ctCls)
      }
      this.rendered = true;
      if (A !== undefined)
      {
         if (typeof A == "number")
         {
            A = this.container.dom.childNodes[A]
         }
         else
         {
            A = Ext.getDom(A)
         }
      }
      this.onRender(this.container, A || null);
      if (this.autoShow)
      {
         this.el.removeClass(["x-hidden","x-hide-" + this.hideMode])
      }
      if (this.cls)
      {
         this.el.addClass(this.cls);
         delete this.cls
      }
      if (this.style)
      {
         this.el.applyStyles(this.style);
         delete this.style
      }
      this.fireEvent("render", this);
      this.afterRender(this.container);
      if (this.hidden)
      {
         this.hide()
      }
      if (this.disabled)
      {
         this.disable()
      }
      if (this.stateful !== false)
      {
         this.initStateEvents()
      }
   }
   return this
},initState:function(A)
{
   if (Ext.state.Manager)
   {
      var B = Ext.state.Manager.get(this.stateId || this.id);
      if (B)
      {
         if (this.fireEvent("beforestaterestore", this, B) !== false)
         {
            this.applyState(B);
            this.fireEvent("staterestore", this, B)
         }
      }
   }
},initStateEvents:function()
{
   if (this.stateEvents)
   {
      for (var A = 0,B; B = this.stateEvents[A]; A++)
      {
         this.on(B, this.saveState, this, {delay:100})
      }
   }
},applyState:function(B, A)
{
   if (B)
   {
      Ext.apply(this, B)
   }
},getState:function()
{
   return null
},saveState:function()
{
   if (Ext.state.Manager)
   {
      var A = this.getState();
      if (this.fireEvent("beforestatesave", this, A) !== false)
      {
         Ext.state.Manager.set(this.stateId || this.id, A);
         this.fireEvent("statesave", this, A)
      }
   }
},applyToMarkup:function(A)
{
   this.allowDomMove = false;
   this.el = Ext.get(A);
   this.render(this.el.dom.parentNode)
},addClass:function(A)
{
   if (this.el)
   {
      this.el.addClass(A)
   }
   else
   {
      this.cls = this.cls ? this.cls + " " + A : A
   }
},removeClass:function(A)
{
   if (this.el)
   {
      this.el.removeClass(A)
   }
   else
   {
      if (this.cls)
      {
         this.cls = this.cls.split(" ").remove(A).join(" ")
      }
   }
},onRender:function(B, A)
{
   if (this.autoEl)
   {
      if (typeof this.autoEl == "string")
      {
         this.el = document.createElement(this.autoEl)
      }
      else
      {
         var C = document.createElement("div");
         Ext.DomHelper.overwrite(C, this.autoEl);
         this.el = C.firstChild
      }
      if (!this.el.id)
      {
         this.el.id = this.getId()
      }
   }
   if (this.el)
   {
      this.el = Ext.get(this.el);
      if (this.allowDomMove !== false)
      {
         B.dom.insertBefore(this.el.dom, A)
      }
      if (this.overCls)
      {
         this.el.addClassOnOver(this.overCls)
      }
   }
},getAutoCreate:function()
{
   var A = typeof this.autoCreate == "object" ? this.autoCreate : Ext.apply({}, this.defaultAutoCreate);
   if (this.id && !A.id)
   {
      A.id = this.id
   }
   return A
},afterRender:Ext.emptyFn,destroy:function()
{
   if (this.fireEvent("beforedestroy", this) !== false)
   {
      this.beforeDestroy();
      if (this.rendered)
      {
         this.el.removeAllListeners();
         this.el.remove();
         if (this.actionMode == "container")
         {
            this.container.remove()
         }
      }
      this.onDestroy();
      Ext.ComponentMgr.unregister(this);
      this.fireEvent("destroy", this);
      this.purgeListeners()
   }
},beforeDestroy:Ext.emptyFn,onDestroy:Ext.emptyFn,getEl:function()
{
   return this.el
},getId:function()
{
   return this.id || (this.id = "ext-comp-" + (++Ext.Component.AUTO_ID))
},getItemId:function()
{
   return this.itemId || this.getId()
},focus:function(B, A)
{
   if (A)
   {
      this.focus.defer(typeof A == "number" ? A : 10, this, [B,false]);
      return
   }
   if (this.rendered)
   {
      this.el.focus();
      if (B === true)
      {
         this.el.dom.select()
      }
   }
   return this
},blur:function()
{
   if (this.rendered)
   {
      this.el.blur()
   }
   return this
},disable:function()
{
   if (this.rendered)
   {
      this.onDisable()
   }
   this.disabled = true;
   this.fireEvent("disable", this);
   return this
},onDisable:function()
{
   this.getActionEl().addClass(this.disabledClass);
   this.el.dom.disabled = true
},enable:function()
{
   if (this.rendered)
   {
      this.onEnable()
   }
   this.disabled = false;
   this.fireEvent("enable", this);
   return this
},onEnable:function()
{
   this.getActionEl().removeClass(this.disabledClass);
   this.el.dom.disabled = false
},setDisabled:function(A)
{
   this[A ? "disable" : "enable"]()
},show:function()
{
   if (this.fireEvent("beforeshow", this) !== false)
   {
      this.hidden = false;
      if (this.autoRender)
      {
         this.render(typeof this.autoRender == "boolean" ? Ext.getBody() : this.autoRender)
      }
      if (this.rendered)
      {
         this.onShow()
      }
      this.fireEvent("show", this)
   }
   return this
},onShow:function()
{
   if (this.hideParent)
   {
      this.container.removeClass("x-hide-" + this.hideMode)
   }
   else
   {
      this.getActionEl().removeClass("x-hide-" + this.hideMode)
   }
},hide:function()
{
   if (this.fireEvent("beforehide", this) !== false)
   {
      this.hidden = true;
      if (this.rendered)
      {
         this.onHide()
      }
      this.fireEvent("hide", this)
   }
   return this
},onHide:function()
{
   if (this.hideParent)
   {
      this.container.addClass("x-hide-" + this.hideMode)
   }
   else
   {
      this.getActionEl().addClass("x-hide-" + this.hideMode)
   }
},setVisible:function(A)
{
   if (A)
   {
      this.show()
   }
   else
   {
      this.hide()
   }
   return this
},isVisible:function()
{
   return this.rendered && this.getActionEl().isVisible()
},cloneConfig:function(B)
{
   B = B || {};
   var C = B.id || Ext.id();
   var A = Ext.applyIf(B, this.initialConfig);
   A.id = C;
   return new this.constructor(A)
},getXType:function()
{
   return this.constructor.xtype
},isXType:function(B, A)
{
   return !A ? ("/" + this.getXTypes() + "/").indexOf("/" + B + "/") != -1 : this.constructor.xtype == B
},getXTypes:function()
{
   var A = this.constructor;
   if (!A.xtypes)
   {
      var C = [],B = this;
      while (B && B.constructor.xtype)
      {
         C.unshift(B.constructor.xtype);
         B = B.constructor.superclass
      }
      A.xtypeChain = C;
      A.xtypes = C.join("/")
   }
   return A.xtypes
},findParentBy:function(A)
{
   for (var B = this.ownerCt; (B != null) && !A(B, this); B = B.ownerCt)
   {
   }
   return B || null
},findParentByType:function(A)
{
   return typeof A == "function" ? this.findParentBy(function(B)
   {
      return B.constructor === A
   }) : this.findParentBy(function(B)
   {
      return B.constructor.xtype === A
   })
},mon:function(E, B, D, C, A)
{
   if (!this.mons)
   {
      this.mons = [];
      this.on("beforedestroy", function()
      {
         for (var H = 0,G = this.mons.length; H < G; H++)
         {
            var F = this.mons[H];
            F.item.un(F.ename, F.fn, F.scope)
         }
      }, this)
   }
   this.mons.push({item:E,ename:B,fn:D,scope:C});
   E.on(B, D, C, A)
}});
Ext.reg("component", Ext.Component);
Ext.Action = function(A)
{
   this.initialConfig = A;
   this.items = []
};
Ext.Action.prototype = {isAction:true,setText:function(A)
{
   this.initialConfig.text = A;
   this.callEach("setText", [A])
},getText:function()
{
   return this.initialConfig.text
},setIconClass:function(A)
{
   this.initialConfig.iconCls = A;
   this.callEach("setIconClass", [A])
},getIconClass:function()
{
   return this.initialConfig.iconCls
},setDisabled:function(A)
{
   this.initialConfig.disabled = A;
   this.callEach("setDisabled", [A])
},enable:function()
{
   this.setDisabled(false)
},disable:function()
{
   this.setDisabled(true)
},isDisabled:function()
{
   return this.initialConfig.disabled
},setHidden:function(A)
{
   this.initialConfig.hidden = A;
   this.callEach("setVisible", [!A])
},show:function()
{
   this.setHidden(false)
},hide:function()
{
   this.setHidden(true)
},isHidden:function()
{
   return this.initialConfig.hidden
},setHandler:function(B, A)
{
   this.initialConfig.handler = B;
   this.initialConfig.scope = A;
   this.callEach("setHandler", [B,A])
},each:function(B, A)
{
   Ext.each(this.items, B, A)
},callEach:function(E, B)
{
   var D = this.items;
   for (var C = 0,A = D.length; C < A; C++)
   {
      D[C][E].apply(D[C], B)
   }
},addComponent:function(A)
{
   this.items.push(A);
   A.on("destroy", this.removeComponent, this)
},removeComponent:function(A)
{
   this.items.remove(A)
},execute:function()
{
   this.initialConfig.handler.apply(this.initialConfig.scope || window, arguments)
}};
(function()
{
   Ext.Layer = function(D, C)
   {
      D = D || {};
      var E = Ext.DomHelper;
      var G = D.parentEl,F = G ? Ext.getDom(G) : document.body;
      if (C)
      {
         this.dom = Ext.getDom(C)
      }
      if (!this.dom)
      {
         var H = D.dh || {tag:"div",cls:"x-layer"};
         this.dom = E.append(F, H)
      }
      if (D.cls)
      {
         this.addClass(D.cls)
      }
      this.constrain = D.constrain !== false;
      this.visibilityMode = Ext.Element.VISIBILITY;
      if (D.id)
      {
         this.id = this.dom.id = D.id
      }
      else
      {
         this.id = Ext.id(this.dom)
      }
      this.zindex = D.zindex || this.getZIndex();
      this.position("absolute", this.zindex);
      if (D.shadow)
      {
         this.shadowOffset = D.shadowOffset || 4;
         this.shadow = new Ext.Shadow({offset:this.shadowOffset,mode:D.shadow})
      }
      else
      {
         this.shadowOffset = 0
      }
      this.useShim = D.shim !== false && Ext.useShims;
      this.useDisplay = D.useDisplay;
      this.hide()
   };
   var A = Ext.Element.prototype;
   var B = [];
   Ext.extend(Ext.Layer, Ext.Element, {getZIndex:function()
   {
      return this.zindex || parseInt(this.getStyle("z-index"), 10) || 11000
   },getShim:function()
   {
      if (!this.useShim)
      {
         return null
      }
      if (this.shim)
      {
         return this.shim
      }
      var D = B.shift();
      if (!D)
      {
         D = this.createShim();
         D.enableDisplayMode("block");
         D.dom.style.display = "none";
         D.dom.style.visibility = "visible"
      }
      var C = this.dom.parentNode;
      if (D.dom.parentNode != C)
      {
         C.insertBefore(D.dom, this.dom)
      }
      D.setStyle("z-index", this.getZIndex() - 2);
      this.shim = D;
      return D
   },hideShim:function()
   {
      if (this.shim)
      {
         this.shim.setDisplayed(false);
         B.push(this.shim);
         delete this.shim
      }
   },disableShadow:function()
   {
      if (this.shadow)
      {
         this.shadowDisabled = true;
         this.shadow.hide();
         this.lastShadowOffset = this.shadowOffset;
         this.shadowOffset = 0
      }
   },enableShadow:function(C)
   {
      if (this.shadow)
      {
         this.shadowDisabled = false;
         this.shadowOffset = this.lastShadowOffset;
         delete this.lastShadowOffset;
         if (C)
         {
            this.sync(true)
         }
      }
   },sync:function(C)
   {
      var I = this.shadow;
      if (!this.updating && this.isVisible() && (I || this.useShim))
      {
         var F = this.getShim();
         var H = this.getWidth(),E = this.getHeight();
         var D = this.getLeft(true),J = this.getTop(true);
         if (I && !this.shadowDisabled)
         {
            if (C && !I.isVisible())
            {
               I.show(this)
            }
            else
            {
               I.realign(D, J, H, E)
            }
            if (F)
            {
               if (C)
               {
                  F.show()
               }
               var G = I.adjusts,K = F.dom.style;
               K.left = (Math.min(D, D + G.l)) + "px";
               K.top = (Math.min(J, J + G.t)) + "px";
               K.width = (H + G.w) + "px";
               K.height = (E + G.h) + "px"
            }
         }
         else
         {
            if (F)
            {
               if (C)
               {
                  F.show()
               }
               F.setSize(H, E);
               F.setLeftTop(D, J)
            }
         }
      }
   },destroy:function()
   {
      this.hideShim();
      if (this.shadow)
      {
         this.shadow.hide()
      }
      this.removeAllListeners();
      Ext.removeNode(this.dom);
      Ext.Element.uncache(this.id)
   },remove:function()
   {
      this.destroy()
   },beginUpdate:function()
   {
      this.updating = true
   },endUpdate:function()
   {
      this.updating = false;
      this.sync(true)
   },hideUnders:function(C)
   {
      if (this.shadow)
      {
         this.shadow.hide()
      }
      this.hideShim()
   },constrainXY:function()
   {
      if (this.constrain)
      {
         var G = Ext.lib.Dom.getViewWidth(),C = Ext.lib.Dom.getViewHeight();
         var L = Ext.getDoc().getScroll();
         var K = this.getXY();
         var H = K[0],F = K[1];
         var I = this.dom.offsetWidth + this.shadowOffset,D = this.dom.offsetHeight + this.shadowOffset;
         var E = false;
         if ((H + I) > G + L.left)
         {
            H = G - I - this.shadowOffset;
            E = true
         }
         if ((F + D) > C + L.top)
         {
            F = C - D - this.shadowOffset;
            E = true
         }
         if (H < L.left)
         {
            H = L.left;
            E = true
         }
         if (F < L.top)
         {
            F = L.top;
            E = true
         }
         if (E)
         {
            if (this.avoidY)
            {
               var J = this.avoidY;
               if (F <= J && (F + D) >= J)
               {
                  F = J - D - 5
               }
            }
            K = [H,F];
            this.storeXY(K);
            A.setXY.call(this, K);
            this.sync()
         }
      }
   },isVisible:function()
   {
      return this.visible
   },showAction:function()
   {
      this.visible = true;
      if (this.useDisplay === true)
      {
         this.setDisplayed("")
      }
      else
      {
         if (this.lastXY)
         {
            A.setXY.call(this, this.lastXY)
         }
         else
         {
            if (this.lastLT)
            {
               A.setLeftTop.call(this, this.lastLT[0], this.lastLT[1])
            }
         }
      }
   },hideAction:function()
   {
      this.visible = false;
      if (this.useDisplay === true)
      {
         this.setDisplayed(false)
      }
      else
      {
         this.setLeftTop(-10000, -10000)
      }
   },setVisible:function(E, D, G, H, F)
   {
      if (E)
      {
         this.showAction()
      }
      if (D && E)
      {
         var C = function()
         {
            this.sync(true);
            if (H)
            {
               H()
            }
         }.createDelegate(this);
         A.setVisible.call(this, true, true, G, C, F)
      }
      else
      {
         if (!E)
         {
            this.hideUnders(true)
         }
         var C = H;
         if (D)
         {
            C = function()
            {
               this.hideAction();
               if (H)
               {
                  H()
               }
            }.createDelegate(this)
         }
         A.setVisible.call(this, E, D, G, C, F);
         if (E)
         {
            this.sync(true)
         }
         else
         {
            if (!D)
            {
               this.hideAction()
            }
         }
      }
   },storeXY:function(C)
   {
      delete this.lastLT;
      this.lastXY = C
   },storeLeftTop:function(D, C)
   {
      delete this.lastXY;
      this.lastLT = [D,C]
   },beforeFx:function()
   {
      this.beforeAction();
      return Ext.Layer.superclass.beforeFx.apply(this, arguments)
   },afterFx:function()
   {
      Ext.Layer.superclass.afterFx.apply(this, arguments);
      this.sync(this.isVisible())
   },beforeAction:function()
   {
      if (!this.updating && this.shadow)
      {
         this.shadow.hide()
      }
   },setLeft:function(C)
   {
      this.storeLeftTop(C, this.getTop(true));
      A.setLeft.apply(this, arguments);
      this.sync()
   },setTop:function(C)
   {
      this.storeLeftTop(this.getLeft(true), C);
      A.setTop.apply(this, arguments);
      this.sync()
   },setLeftTop:function(D, C)
   {
      this.storeLeftTop(D, C);
      A.setLeftTop.apply(this, arguments);
      this.sync()
   },setXY:function(F, D, G, H, E)
   {
      this.fixDisplay();
      this.beforeAction();
      this.storeXY(F);
      var C = this.createCB(H);
      A.setXY.call(this, F, D, G, C, E);
      if (!D)
      {
         C()
      }
   },createCB:function(D)
   {
      var C = this;
      return function()
      {
         C.constrainXY();
         C.sync(true);
         if (D)
         {
            D()
         }
      }
   },setX:function(C, D, F, G, E)
   {
      this.setXY([C,this.getY()], D, F, G, E)
   },setY:function(G, C, E, F, D)
   {
      this.setXY([this.getX(),G], C, E, F, D)
   },setSize:function(E, F, D, H, I, G)
   {
      this.beforeAction();
      var C = this.createCB(I);
      A.setSize.call(this, E, F, D, H, C, G);
      if (!D)
      {
         C()
      }
   },setWidth:function(E, D, G, H, F)
   {
      this.beforeAction();
      var C = this.createCB(H);
      A.setWidth.call(this, E, D, G, C, F);
      if (!D)
      {
         C()
      }
   },setHeight:function(E, D, G, H, F)
   {
      this.beforeAction();
      var C = this.createCB(H);
      A.setHeight.call(this, E, D, G, C, F);
      if (!D)
      {
         C()
      }
   },setBounds:function(J, H, K, D, I, F, G, E)
   {
      this.beforeAction();
      var C = this.createCB(G);
      if (!I)
      {
         this.storeXY([J,H]);
         A.setXY.call(this, [J,H]);
         A.setSize.call(this, K, D, I, F, C, E);
         C()
      }
      else
      {
         A.setBounds.call(this, J, H, K, D, I, F, C, E)
      }
      return this
   },setZIndex:function(C)
   {
      this.zindex = C;
      this.setStyle("z-index", C + 2);
      if (this.shadow)
      {
         this.shadow.setZIndex(C + 1)
      }
      if (this.shim)
      {
         this.shim.setStyle("z-index", C)
      }
   }})
})();
Ext.Shadow = function(C)
{
   Ext.apply(this, C);
   if (typeof this.mode != "string")
   {
      this.mode = this.defaultMode
   }
   var D = this.offset,B = {h:0};
   var A = Math.floor(this.offset / 2);
   switch (this.mode.toLowerCase())
      {case"drop":B.w = 0;B.l = B.t = D;B.t -= 1;if (Ext.isIE)
   {
      B.l -= this.offset + A;
      B.t -= this.offset + A;
      B.w -= A;
      B.h -= A;
      B.t += 1
   }break;case"sides":B.w = (D * 2);B.l = -D;B.t = D - 1;if (Ext.isIE)
   {
      B.l -= (this.offset - A);
      B.t -= this.offset + A;
      B.l += 1;
      B.w -= (this.offset - A) * 2;
      B.w -= A + 1;
      B.h -= 1
   }break;case"frame":B.w = B.h = (D * 2);B.l = B.t = -D;B.t += 1;B.h -= 2;if (Ext.isIE)
   {
      B.l -= (this.offset - A);
      B.t -= (this.offset - A);
      B.l += 1;
      B.w -= (this.offset + A + 1);
      B.h -= (this.offset + A);
      B.h += 1
   }break}
   this.adjusts = B
};
Ext.Shadow.prototype = {offset:4,defaultMode:"drop",show:function(A)
{
   A = Ext.get(A);
   if (!this.el)
   {
      this.el = Ext.Shadow.Pool.pull();
      if (this.el.dom.nextSibling != A.dom)
      {
         this.el.insertBefore(A)
      }
   }
   this.el.setStyle("z-index", this.zIndex || parseInt(A.getStyle("z-index"), 10) - 1);
   if (Ext.isIE)
   {
      this.el.dom.style.filter = "progid:DXImageTransform.Microsoft.alpha(opacity=50) progid:DXImageTransform.Microsoft.Blur(pixelradius=" + (this.offset) + ")"
   }
   this.realign(A.getLeft(true), A.getTop(true), A.getWidth(), A.getHeight());
   this.el.dom.style.display = "block"
},isVisible:function()
{
   return this.el ? true : false
},realign:function(A, M, L, D)
{
   if (!this.el)
   {
      return
   }
   var I = this.adjusts,G = this.el.dom,N = G.style;
   var E = 0;
   N.left = (A + I.l) + "px";
   N.top = (M + I.t) + "px";
   var K = (L + I.w),C = (D + I.h),F = K + "px",J = C + "px";
   if (N.width != F || N.height != J)
   {
      N.width = F;
      N.height = J;
      if (!Ext.isIE)
      {
         var H = G.childNodes;
         var B = Math.max(0, (K - 12)) + "px";
         H[0].childNodes[1].style.width = B;
         H[1].childNodes[1].style.width = B;
         H[2].childNodes[1].style.width = B;
         H[1].style.height = Math.max(0, (C - 12)) + "px"
      }
   }
},hide:function()
{
   if (this.el)
   {
      this.el.dom.style.display = "none";
      Ext.Shadow.Pool.push(this.el);
      delete this.el
   }
},setZIndex:function(A)
{
   this.zIndex = A;
   if (this.el)
   {
      this.el.setStyle("z-index", A)
   }
}};
Ext.Shadow.Pool = function()
{
   var B = [];
   var A = Ext.isIE ? "<div class=\"x-ie-shadow\"></div>" :
           "<div class=\"x-shadow\"><div class=\"xst\"><div class=\"xstl\"></div><div class=\"xstc\"></div><div class=\"xstr\"></div></div><div class=\"xsc\"><div class=\"xsml\"></div><div class=\"xsmc\"></div><div class=\"xsmr\"></div></div><div class=\"xsb\"><div class=\"xsbl\"></div><div class=\"xsbc\"></div><div class=\"xsbr\"></div></div></div>";
   return{pull:function()
   {
      var C = B.shift();
      if (!C)
      {
         C = Ext.get(Ext.DomHelper.insertHtml("beforeBegin", document.body.firstChild, A));
         C.autoBoxAdjust = false
      }
      return C
   },push:function(C)
   {
      B.push(C)
   }}
}();
Ext.BoxComponent = Ext.extend(Ext.Component, {initComponent:function()
{
   Ext.BoxComponent.superclass.initComponent.call(this);
   this.addEvents("resize", "move")
},boxReady:false,deferHeight:false,setSize:function(B, D)
{
   if (typeof B == "object")
   {
      D = B.height;
      B = B.width
   }
   if (!this.boxReady)
   {
      this.width = B;
      this.height = D;
      return this
   }
   if (this.lastSize && this.lastSize.width == B && this.lastSize.height == D)
   {
      return this
   }
   this.lastSize = {width:B,height:D};
   var C = this.adjustSize(B, D);
   var F = C.width,A = C.height;
   if (F !== undefined || A !== undefined)
   {
      var E = this.getResizeEl();
      if (!this.deferHeight && F !== undefined && A !== undefined)
      {
         E.setSize(F, A)
      }
      else
      {
         if (!this.deferHeight && A !== undefined)
         {
            E.setHeight(A)
         }
         else
         {
            if (F !== undefined)
            {
               E.setWidth(F)
            }
         }
      }
      this.onResize(F, A, B, D);
      this.fireEvent("resize", this, F, A, B, D)
   }
   return this
},setWidth:function(A)
{
   return this.setSize(A)
},setHeight:function(A)
{
   return this.setSize(undefined, A)
},getSize:function()
{
   return this.el.getSize()
},getPosition:function(A)
{
   if (A === true)
   {
      return[this.el.getLeft(true),this.el.getTop(true)]
   }
   return this.xy || this.el.getXY()
},getBox:function(A)
{
   var B = this.el.getSize();
   if (A === true)
   {
      B.x = this.el.getLeft(true);
      B.y = this.el.getTop(true)
   }
   else
   {
      var C = this.xy || this.el.getXY();
      B.x = C[0];
      B.y = C[1]
   }
   return B
},updateBox:function(A)
{
   this.setSize(A.width, A.height);
   this.setPagePosition(A.x, A.y);
   return this
},getResizeEl:function()
{
   return this.resizeEl || this.el
},getPositionEl:function()
{
   return this.positionEl || this.el
},setPosition:function(A, F)
{
   if (A && typeof A[1] == "number")
   {
      F = A[1];
      A = A[0]
   }
   this.x = A;
   this.y = F;
   if (!this.boxReady)
   {
      return this
   }
   var B = this.adjustPosition(A, F);
   var E = B.x,D = B.y;
   var C = this.getPositionEl();
   if (E !== undefined || D !== undefined)
   {
      if (E !== undefined && D !== undefined)
      {
         C.setLeftTop(E, D)
      }
      else
      {
         if (E !== undefined)
         {
            C.setLeft(E)
         }
         else
         {
            if (D !== undefined)
            {
               C.setTop(D)
            }
         }
      }
      this.onPosition(E, D);
      this.fireEvent("move", this, E, D)
   }
   return this
},setPagePosition:function(A, C)
{
   if (A && typeof A[1] == "number")
   {
      C = A[1];
      A = A[0]
   }
   this.pageX = A;
   this.pageY = C;
   if (!this.boxReady)
   {
      return
   }
   if (A === undefined || C === undefined)
   {
      return
   }
   var B = this.el.translatePoints(A, C);
   this.setPosition(B.left, B.top);
   return this
},onRender:function(B, A)
{
   Ext.BoxComponent.superclass.onRender.call(this, B, A);
   if (this.resizeEl)
   {
      this.resizeEl = Ext.get(this.resizeEl)
   }
   if (this.positionEl)
   {
      this.positionEl = Ext.get(this.positionEl)
   }
},afterRender:function()
{
   Ext.BoxComponent.superclass.afterRender.call(this);
   this.boxReady = true;
   this.setSize(this.width, this.height);
   if (this.x || this.y)
   {
      this.setPosition(this.x, this.y)
   }
   else
   {
      if (this.pageX || this.pageY)
      {
         this.setPagePosition(this.pageX, this.pageY)
      }
   }
},syncSize:function()
{
   delete this.lastSize;
   this.setSize(this.autoWidth ? undefined : this.el.getWidth(), this.autoHeight ? undefined : this.el.getHeight());
   return this
},onResize:function(D, B, A, C)
{
},onPosition:function(A, B)
{
},adjustSize:function(A, B)
{
   if (this.autoWidth)
   {
      A = "auto"
   }
   if (this.autoHeight)
   {
      B = "auto"
   }
   return{width:A,height:B}
},adjustPosition:function(A, B)
{
   return{x:A,y:B}
}});
Ext.reg("box", Ext.BoxComponent);
Ext.SplitBar = function(C, E, B, D, A)
{
   this.el = Ext.get(C, true);
   this.el.dom.unselectable = "on";
   this.resizingEl = Ext.get(E, true);
   this.orientation = B || Ext.SplitBar.HORIZONTAL;
   this.minSize = 0;
   this.maxSize = 2000;
   this.animate = false;
   this.useShim = false;
   this.shim = null;
   if (!A)
   {
      this.proxy = Ext.SplitBar.createProxy(this.orientation)
   }
   else
   {
      this.proxy = Ext.get(A).dom
   }
   this.dd = new Ext.dd.DDProxy(this.el.dom.id, "XSplitBars", {dragElId:this.proxy.id});
   this.dd.b4StartDrag = this.onStartProxyDrag.createDelegate(this);
   this.dd.endDrag = this.onEndProxyDrag.createDelegate(this);
   this.dragSpecs = {};
   this.adapter = new Ext.SplitBar.BasicLayoutAdapter();
   this.adapter.init(this);
   if (this.orientation == Ext.SplitBar.HORIZONTAL)
   {
      this.placement = D || (this.el.getX() > this.resizingEl.getX() ? Ext.SplitBar.LEFT : Ext.SplitBar.RIGHT);
      this.el.addClass("x-splitbar-h")
   }
   else
   {
      this.placement = D || (this.el.getY() > this.resizingEl.getY() ? Ext.SplitBar.TOP : Ext.SplitBar.BOTTOM);
      this.el.addClass("x-splitbar-v")
   }
   this.addEvents("resize", "moved", "beforeresize", "beforeapply");
   Ext.SplitBar.superclass.constructor.call(this)
};
Ext.extend(Ext.SplitBar, Ext.util.Observable, {onStartProxyDrag:function(A, E)
{
   this.fireEvent("beforeresize", this);
   this.overlay = Ext.DomHelper.append(document.body, {cls:"x-drag-overlay",html:"&#160;"}, true);
   this.overlay.unselectable();
   this.overlay.setSize(Ext.lib.Dom.getViewWidth(true), Ext.lib.Dom.getViewHeight(true));
   this.overlay.show();
   Ext.get(this.proxy).setDisplayed("block");
   var C = this.adapter.getElementSize(this);
   this.activeMinSize = this.getMinimumSize();
   this.activeMaxSize = this.getMaximumSize();
   var D = C - this.activeMinSize;
   var B = Math.max(this.activeMaxSize - C, 0);
   if (this.orientation == Ext.SplitBar.HORIZONTAL)
   {
      this.dd.resetConstraints();
      this.dd.setXConstraint(this.placement == Ext.SplitBar.LEFT ? D : B, this.placement == Ext.SplitBar.LEFT ? B : D);
      this.dd.setYConstraint(0, 0)
   }
   else
   {
      this.dd.resetConstraints();
      this.dd.setXConstraint(0, 0);
      this.dd.setYConstraint(this.placement == Ext.SplitBar.TOP ? D : B, this.placement == Ext.SplitBar.TOP ? B : D)
   }
   this.dragSpecs.startSize = C;
   this.dragSpecs.startPoint = [A,E];
   Ext.dd.DDProxy.prototype.b4StartDrag.call(this.dd, A, E)
},onEndProxyDrag:function(C)
{
   Ext.get(this.proxy).setDisplayed(false);
   var B = Ext.lib.Event.getXY(C);
   if (this.overlay)
   {
      this.overlay.remove();
      delete this.overlay
   }
   var A;
   if (this.orientation == Ext.SplitBar.HORIZONTAL)
   {
      A = this.dragSpecs.startSize + (this.placement == Ext.SplitBar.LEFT ? B[0] - this.dragSpecs.startPoint[0] :
                                      this.dragSpecs.startPoint[0] - B[0])
   }
   else
   {
      A = this.dragSpecs.startSize + (this.placement == Ext.SplitBar.TOP ? B[1] - this.dragSpecs.startPoint[1] :
                                      this.dragSpecs.startPoint[1] - B[1])
   }
   A = Math.min(Math.max(A, this.activeMinSize), this.activeMaxSize);
   if (A != this.dragSpecs.startSize)
   {
      if (this.fireEvent("beforeapply", this, A) !== false)
      {
         this.adapter.setElementSize(this, A);
         this.fireEvent("moved", this, A);
         this.fireEvent("resize", this, A)
      }
   }
},getAdapter:function()
{
   return this.adapter
},setAdapter:function(A)
{
   this.adapter = A;
   this.adapter.init(this)
},getMinimumSize:function()
{
   return this.minSize
},setMinimumSize:function(A)
{
   this.minSize = A
},getMaximumSize:function()
{
   return this.maxSize
},setMaximumSize:function(A)
{
   this.maxSize = A
},setCurrentSize:function(B)
{
   var A = this.animate;
   this.animate = false;
   this.adapter.setElementSize(this, B);
   this.animate = A
},destroy:function(A)
{
   if (this.shim)
   {
      this.shim.remove()
   }
   this.dd.unreg();
   Ext.removeNode(this.proxy);
   if (A)
   {
      this.el.remove()
   }
}});
Ext.SplitBar.createProxy = function(B)
{
   var C = new Ext.Element(document.createElement("div"));
   C.unselectable();
   var A = "x-splitbar-proxy";
   C.addClass(A + " " + (B == Ext.SplitBar.HORIZONTAL ? A + "-h" : A + "-v"));
   document.body.appendChild(C.dom);
   return C.dom
};
Ext.SplitBar.BasicLayoutAdapter = function()
{
};
Ext.SplitBar.BasicLayoutAdapter.prototype = {init:function(A)
{
},getElementSize:function(A)
{
   if (A.orientation == Ext.SplitBar.HORIZONTAL)
   {
      return A.resizingEl.getWidth()
   }
   else
   {
      return A.resizingEl.getHeight()
   }
},setElementSize:function(B, A, C)
{
   if (B.orientation == Ext.SplitBar.HORIZONTAL)
   {
      if (!B.animate)
      {
         B.resizingEl.setWidth(A);
         if (C)
         {
            C(B, A)
         }
      }
      else
      {
         B.resizingEl.setWidth(A, true, 0.1, C, "easeOut")
      }
   }
   else
   {
      if (!B.animate)
      {
         B.resizingEl.setHeight(A);
         if (C)
         {
            C(B, A)
         }
      }
      else
      {
         B.resizingEl.setHeight(A, true, 0.1, C, "easeOut")
      }
   }
}};
Ext.SplitBar.AbsoluteLayoutAdapter = function(A)
{
   this.basic = new Ext.SplitBar.BasicLayoutAdapter();
   this.container = Ext.get(A)
};
Ext.SplitBar.AbsoluteLayoutAdapter.prototype = {init:function(A)
{
   this.basic.init(A)
},getElementSize:function(A)
{
   return this.basic.getElementSize(A)
},setElementSize:function(B, A, C)
{
   this.basic.setElementSize(B, A, this.moveSplitter.createDelegate(this, [B]))
},moveSplitter:function(A)
{
   var B = Ext.SplitBar;
   switch (A.placement)
      {case B.LEFT:A.el.setX(A.resizingEl.getRight());break;case B.RIGHT:A.el.setStyle("right", (this.container.getWidth() - A.resizingEl.getLeft()) + "px");break;case B.TOP:A.el.setY(A.resizingEl.getBottom());break;case B.BOTTOM:A.el.setY(A.resizingEl.getTop() - A.el.getHeight());break}
}};
Ext.SplitBar.VERTICAL = 1;
Ext.SplitBar.HORIZONTAL = 2;
Ext.SplitBar.LEFT = 1;
Ext.SplitBar.RIGHT = 2;
Ext.SplitBar.TOP = 3;
Ext.SplitBar.BOTTOM = 4;
Ext.Container = Ext.extend(Ext.BoxComponent, {autoDestroy:true,defaultType:"panel",initComponent:function()
{
   Ext.Container.superclass.initComponent.call(this);
   this.addEvents("afterlayout", "beforeadd", "beforeremove", "add", "remove");
   var A = this.items;
   if (A)
   {
      delete this.items;
      if (Ext.isArray(A))
      {
         this.add.apply(this, A)
      }
      else
      {
         this.add(A)
      }
   }
},initItems:function()
{
   if (!this.items)
   {
      this.items = new Ext.util.MixedCollection(false, this.getComponentId);
      this.getLayout()
   }
},setLayout:function(A)
{
   if (this.layout && this.layout != A)
   {
      this.layout.setContainer(null)
   }
   this.initItems();
   this.layout = A;
   A.setContainer(this)
},render:function()
{
   Ext.Container.superclass.render.apply(this, arguments);
   if (this.layout)
   {
      if (typeof this.layout == "string")
      {
         this.layout = new Ext.Container.LAYOUTS[this.layout.toLowerCase()](this.layoutConfig)
      }
      this.setLayout(this.layout);
      if (this.activeItem !== undefined)
      {
         var A = this.activeItem;
         delete this.activeItem;
         this.layout.setActiveItem(A);
         return
      }
   }
   if (!this.ownerCt)
   {
      this.doLayout()
   }
   if (this.monitorResize === true)
   {
      Ext.EventManager.onWindowResize(this.doLayout, this, [false])
   }
},getLayoutTarget:function()
{
   return this.el
},getComponentId:function(A)
{
   return A.itemId || A.id
},add:function(C)
{
   if (!this.items)
   {
      this.initItems()
   }
   var B = arguments,A = B.length;
   if (A > 1)
   {
      for (var D = 0; D < A; D++)
      {
         this.add(B[D])
      }
      return
   }
   var F = this.lookupComponent(this.applyDefaults(C));
   var E = this.items.length;
   if (this.fireEvent("beforeadd", this, F, E) !== false && this.onBeforeAdd(F) !== false)
   {
      this.items.add(F);
      F.ownerCt = this;
      this.fireEvent("add", this, F, E)
   }
   return F
},insert:function(D, C)
{
   if (!this.items)
   {
      this.initItems()
   }
   var B = arguments,A = B.length;
   if (A > 2)
   {
      for (var E = A - 1; E >= 1; --E)
      {
         this.insert(D, B[E])
      }
      return
   }
   var F = this.lookupComponent(this.applyDefaults(C));
   if (F.ownerCt == this && this.items.indexOf(F) < D)
   {
      --D
   }
   if (this.fireEvent("beforeadd", this, F, D) !== false && this.onBeforeAdd(F) !== false)
   {
      this.items.insert(D, F);
      F.ownerCt = this;
      this.fireEvent("add", this, F, D)
   }
   return F
},applyDefaults:function(A)
{
   if (this.defaults)
   {
      if (typeof A == "string")
      {
         A = Ext.ComponentMgr.get(A);
         Ext.apply(A, this.defaults)
      }
      else
      {
         if (!A.events)
         {
            Ext.applyIf(A, this.defaults)
         }
         else
         {
            Ext.apply(A, this.defaults)
         }
      }
   }
   return A
},onBeforeAdd:function(A)
{
   if (A.ownerCt)
   {
      A.ownerCt.remove(A, false)
   }
   if (this.hideBorders === true)
   {
      A.border = (A.border === true)
   }
},remove:function(A, B)
{
   var C = this.getComponent(A);
   if (C && this.fireEvent("beforeremove", this, C) !== false)
   {
      this.items.remove(C);
      delete C.ownerCt;
      if (B === true || (B !== false && this.autoDestroy))
      {
         C.destroy()
      }
      if (this.layout && this.layout.activeItem == C)
      {
         delete this.layout.activeItem
      }
      this.fireEvent("remove", this, C)
   }
   return C
},getComponent:function(A)
{
   if (typeof A == "object")
   {
      return A
   }
   return this.items.get(A)
},lookupComponent:function(A)
{
   if (typeof A == "string")
   {
      return Ext.ComponentMgr.get(A)
   }
   else
   {
      if (!A.events)
      {
         return this.createComponent(A)
      }
   }
   return A
},createComponent:function(A)
{
   return Ext.ComponentMgr.create(A, this.defaultType)
},doLayout:function(D)
{
   if (this.rendered && this.layout)
   {
      this.layout.layout()
   }
   if (D !== false && this.items)
   {
      var C = this.items.items;
      for (var B = 0,A = C.length; B < A; B++)
      {
         var E = C[B];
         if (E.doLayout)
         {
            E.doLayout()
         }
      }
   }
},getLayout:function()
{
   if (!this.layout)
   {
      var A = new Ext.layout.ContainerLayout(this.layoutConfig);
      this.setLayout(A)
   }
   return this.layout
},beforeDestroy:function()
{
   if (this.items)
   {
      Ext.destroy.apply(Ext, this.items.items)
   }
   if (this.monitorResize)
   {
      Ext.EventManager.removeResizeListener(this.doLayout, this)
   }
   if (this.layout && this.layout.destroy)
   {
      this.layout.destroy()
   }
   Ext.Container.superclass.beforeDestroy.call(this)
},bubble:function(C, B, A)
{
   var D = this;
   while (D)
   {
      if (C.apply(B || D, A || [D]) === false)
      {
         break
      }
      D = D.ownerCt
   }
},cascade:function(F, E, B)
{
   if (F.apply(E || this, B || [this]) !== false)
   {
      if (this.items)
      {
         var D = this.items.items;
         for (var C = 0,A = D.length; C < A; C++)
         {
            if (D[C].cascade)
            {
               D[C].cascade(F, E, B)
            }
            else
            {
               F.apply(E || D[C], B || [D[C]])
            }
         }
      }
   }
},findById:function(C)
{
   var A,B = this;
   this.cascade(function(D)
   {
      if (B != D && D.id === C)
      {
         A = D;
         return false
      }
   });
   return A || null
},findByType:function(A)
{
   return typeof A == "function" ? this.findBy(function(B)
   {
      return B.constructor === A
   }) : this.findBy(function(B)
   {
      return B.constructor.xtype === A
   })
},find:function(B, A)
{
   return this.findBy(function(C)
   {
      return C[B] === A
   })
},findBy:function(D, C)
{
   var A = [],B = this;
   this.cascade(function(E)
   {
      if (B != E && D.call(C || E, E, B) === true)
      {
         A.push(E)
      }
   });
   return A
}});
Ext.Container.LAYOUTS = {};
Ext.reg("container", Ext.Container);
Ext.layout.ContainerLayout = function(A)
{
   Ext.apply(this, A)
};
Ext.layout.ContainerLayout.prototype = {monitorResize:false,activeItem:null,layout:function()
{
   var A = this.container.getLayoutTarget();
   this.onLayout(this.container, A);
   this.container.fireEvent("afterlayout", this.container, this)
},onLayout:function(A, B)
{
   this.renderAll(A, B)
},isValidParent:function(C, B)
{
   var A = C.getPositionEl ? C.getPositionEl() : C.getEl();
   return A.dom.parentNode == B.dom
},renderAll:function(D, E)
{
   var B = D.items.items;
   for (var C = 0,A = B.length; C < A; C++)
   {
      var F = B[C];
      if (F && (!F.rendered || !this.isValidParent(F, E)))
      {
         this.renderItem(F, C, E)
      }
   }
},renderItem:function(D, A, C)
{
   if (D && !D.rendered)
   {
      D.render(C, A);
      if (this.extraCls)
      {
         var B = D.getPositionEl ? D.getPositionEl() : D;
         B.addClass(this.extraCls)
      }
      if (this.renderHidden && D != this.activeItem)
      {
         D.hide()
      }
   }
   else
   {
      if (D && !this.isValidParent(D, C))
      {
         if (this.extraCls)
         {
            D.addClass(this.extraCls)
         }
         if (typeof A == "number")
         {
            A = C.dom.childNodes[A]
         }
         C.dom.insertBefore(D.getEl().dom, A || null);
         if (this.renderHidden && D != this.activeItem)
         {
            D.hide()
         }
      }
   }
},onResize:function()
{
   if (this.container.collapsed)
   {
      return
   }
   var A = this.container.bufferResize;
   if (A)
   {
      if (!this.resizeTask)
      {
         this.resizeTask = new Ext.util.DelayedTask(this.layout, this);
         this.resizeBuffer = typeof A == "number" ? A : 100
      }
      this.resizeTask.delay(this.resizeBuffer)
   }
   else
   {
      this.layout()
   }
},setContainer:function(A)
{
   if (this.monitorResize && A != this.container)
   {
      if (this.container)
      {
         this.container.un("resize", this.onResize, this)
      }
      if (A)
      {
         A.on("resize", this.onResize, this)
      }
   }
   this.container = A
},parseMargins:function(B)
{
   var C = B.split(" ");
   var A = C.length;
   if (A == 1)
   {
      C[1] = C[0];
      C[2] = C[0];
      C[3] = C[0]
   }
   if (A == 2)
   {
      C[2] = C[0];
      C[3] = C[1]
   }
   return{top:parseInt(C[0], 10) || 0,right:parseInt(C[1], 10) || 0,bottom:parseInt(C[2], 10) || 0,left:parseInt(C[3], 10) || 0}
},destroy:Ext.emptyFn};
Ext.Container.LAYOUTS["auto"] = Ext.layout.ContainerLayout;
Ext.layout.FitLayout = Ext.extend(Ext.layout.ContainerLayout, {monitorResize:true,onLayout:function(A, B)
{
   Ext.layout.FitLayout.superclass.onLayout.call(this, A, B);
   if (!this.container.collapsed)
   {
      this.setItemSize(this.activeItem || A.items.itemAt(0), B.getStyleSize())
   }
},setItemSize:function(B, A)
{
   if (B && A.height > 0)
   {
      B.setSize(A)
   }
}});
Ext.Container.LAYOUTS["fit"] = Ext.layout.FitLayout;
Ext.layout.CardLayout = Ext.extend(Ext.layout.FitLayout, {deferredRender:false,renderHidden:true,setActiveItem:function(A)
{
   A = this.container.getComponent(A);
   if (this.activeItem != A)
   {
      if (this.activeItem)
      {
         this.activeItem.hide()
      }
      this.activeItem = A;
      A.show();
      this.layout()
   }
},renderAll:function(A, B)
{
   if (this.deferredRender)
   {
      this.renderItem(this.activeItem, undefined, B)
   }
   else
   {
      Ext.layout.CardLayout.superclass.renderAll.call(this, A, B)
   }
}});
Ext.Container.LAYOUTS["card"] = Ext.layout.CardLayout;
Ext.layout.AnchorLayout = Ext.extend(Ext.layout.ContainerLayout, {monitorResize:true,getAnchorViewSize:function(A, B)
{
   return B.dom == document.body ? B.getViewSize() : B.getStyleSize()
},onLayout:function(F, I)
{
   Ext.layout.AnchorLayout.superclass.onLayout.call(this, F, I);
   var O = this.getAnchorViewSize(F, I);
   var M = O.width,E = O.height;
   if (M < 20 || E < 20)
   {
      return
   }
   var B,K;
   if (F.anchorSize)
   {
      if (typeof F.anchorSize == "number")
      {
         B = F.anchorSize
      }
      else
      {
         B = F.anchorSize.width;
         K = F.anchorSize.height
      }
   }
   else
   {
      B = F.initialConfig.width;
      K = F.initialConfig.height
   }
   var H = F.items.items,G = H.length,D,J,L,C,A;
   for (D = 0; D < G; D++)
   {
      J = H[D];
      if (J.anchor)
      {
         L = J.anchorSpec;
         if (!L)
         {
            var N = J.anchor.split(" ");
            J.anchorSpec = L = {right:this.parseAnchor(N[0], J.initialConfig.width, B),bottom:this.parseAnchor(N[1], J.initialConfig.height, K)}
         }
         C = L.right ? this.adjustWidthAnchor(L.right(M), J) : undefined;
         A = L.bottom ? this.adjustHeightAnchor(L.bottom(E), J) : undefined;
         if (C || A)
         {
            J.setSize(C || undefined, A || undefined)
         }
      }
   }
},parseAnchor:function(B, F, A)
{
   if (B && B != "none")
   {
      var D;
      if (/^(r|right|b|bottom)$/i.test(B))
      {
         var E = A - F;
         return function(G)
         {
            if (G !== D)
            {
               D = G;
               return G - E
            }
         }
      }
      else
      {
         if (B.indexOf("%") != -1)
         {
            var C = parseFloat(B.replace("%", "")) * 0.01;
            return function(G)
            {
               if (G !== D)
               {
                  D = G;
                  return Math.floor(G * C)
               }
            }
         }
         else
         {
            B = parseInt(B, 10);
            if (!isNaN(B))
            {
               return function(G)
               {
                  if (G !== D)
                  {
                     D = G;
                     return G + B
                  }
               }
            }
         }
      }
   }
   return false
},adjustWidthAnchor:function(B, A)
{
   return B
},adjustHeightAnchor:function(B, A)
{
   return B
}});
Ext.Container.LAYOUTS["anchor"] = Ext.layout.AnchorLayout;
Ext.layout.ColumnLayout = Ext.extend(Ext.layout.ContainerLayout, {monitorResize:true,extraCls:"x-column",scrollOffset:0,isValidParent:function(B, A)
{
   return B.getEl().dom.parentNode == this.innerCt.dom
},onLayout:function(C, F)
{
   var D = C.items.items,E = D.length,G,A;
   if (!this.innerCt)
   {
      F.addClass("x-column-layout-ct");
      this.innerCt = F.createChild({cls:"x-column-inner"});
      this.innerCt.createChild({cls:"x-clear"})
   }
   this.renderAll(C, this.innerCt);
   var J = Ext.isIE && F.dom != Ext.getBody().dom ? F.getStyleSize() : F.getViewSize();
   if (J.width < 1 && J.height < 1)
   {
      return
   }
   var H = J.width - F.getPadding("lr") - this.scrollOffset,B = J.height - F.getPadding("tb"),I = H;
   this.innerCt.setWidth(H);
   for (A = 0; A < E; A++)
   {
      G = D[A];
      if (!G.columnWidth)
      {
         I -= (G.getSize().width + G.getEl().getMargins("lr"))
      }
   }
   I = I < 0 ? 0 : I;
   for (A = 0; A < E; A++)
   {
      G = D[A];
      if (G.columnWidth)
      {
         G.setSize(Math.floor(G.columnWidth * I) - G.getEl().getMargins("lr"))
      }
   }
}});
Ext.Container.LAYOUTS["column"] = Ext.layout.ColumnLayout;
Ext.layout.BorderLayout = Ext.extend(Ext.layout.ContainerLayout, {monitorResize:true,rendered:false,onLayout:function(B, X)
{
   var C;
   if (!this.rendered)
   {
      X.position();
      X.addClass("x-border-layout-ct");
      var M = B.items.items;
      C = [];
      for (var Q = 0,R = M.length; Q < R; Q++)
      {
         var U = M[Q];
         var F = U.region;
         if (U.collapsed)
         {
            C.push(U)
         }
         U.collapsed = false;
         if (!U.rendered)
         {
            U.cls = U.cls ? U.cls + " x-border-panel" : "x-border-panel";
            U.render(X, Q)
         }
         this[F] = F != "center" && U.split ? new Ext.layout.BorderLayout.SplitRegion(this, U.initialConfig, F) :
                   new Ext.layout.BorderLayout.Region(this, U.initialConfig, F);
         this[F].render(X, U)
      }
      this.rendered = true
   }
   var L = X.getViewSize();
   if (L.width < 20 || L.height < 20)
   {
      if (C)
      {
         this.restoreCollapsed = C
      }
      return
   }
   else
   {
      if (this.restoreCollapsed)
      {
         C = this.restoreCollapsed;
         delete this.restoreCollapsed
      }
   }
   var J = L.width,S = L.height;
   var I = J,P = S,G = 0,H = 0;
   var N = this.north,K = this.south,E = this.west,T = this.east,U = this.center;
   if (!U)
   {
      throw"No center region defined in BorderLayout " + B.id
   }
   if (N && N.isVisible())
   {
      var W = N.getSize();
      var O = N.getMargins();
      W.width = J - (O.left + O.right);
      W.x = O.left;
      W.y = O.top;
      G = W.height + W.y + O.bottom;
      P -= G;
      N.applyLayout(W)
   }
   if (K && K.isVisible())
   {
      var W = K.getSize();
      var O = K.getMargins();
      W.width = J - (O.left + O.right);
      W.x = O.left;
      var V = (W.height + O.top + O.bottom);
      W.y = S - V + O.top;
      P -= V;
      K.applyLayout(W)
   }
   if (E && E.isVisible())
   {
      var W = E.getSize();
      var O = E.getMargins();
      W.height = P - (O.top + O.bottom);
      W.x = O.left;
      W.y = G + O.top;
      var A = (W.width + O.left + O.right);
      H += A;
      I -= A;
      E.applyLayout(W)
   }
   if (T && T.isVisible())
   {
      var W = T.getSize();
      var O = T.getMargins();
      W.height = P - (O.top + O.bottom);
      var A = (W.width + O.left + O.right);
      W.x = J - A + O.left;
      W.y = G + O.top;
      I -= A;
      T.applyLayout(W)
   }
   var O = U.getMargins();
   var D = {x:H + O.left,y:G + O.top,width:I - (O.left + O.right),height:P - (O.top + O.bottom)};
   U.applyLayout(D);
   if (C)
   {
      for (var Q = 0,R = C.length; Q < R; Q++)
      {
         C[Q].collapse(false)
      }
   }
   if (Ext.isIE && Ext.isStrict)
   {
      X.repaint()
   }
},destroy:function()
{
   var B = ["north","south","east","west"];
   for (var A = 0; A < B.length; A++)
   {
      var C = this[B[A]];
      if (C && C.split)
      {
         C.split.destroy(true)
      }
   }
   Ext.layout.BorderLayout.superclass.destroy.call(this)
}});
Ext.layout.BorderLayout.Region = function(B, A, C)
{
   Ext.apply(this, A);
   this.layout = B;
   this.position = C;
   this.state = {};
   if (typeof this.margins == "string")
   {
      this.margins = this.layout.parseMargins(this.margins)
   }
   this.margins = Ext.applyIf(this.margins || {}, this.defaultMargins);
   if (this.collapsible)
   {
      if (typeof this.cmargins == "string")
      {
         this.cmargins = this.layout.parseMargins(this.cmargins)
      }
      if (this.collapseMode == "mini" && !this.cmargins)
      {
         this.cmargins = {left:0,top:0,right:0,bottom:0}
      }
      else
      {
         this.cmargins = Ext.applyIf(this.cmargins || {}, C == "north" || C == "south" ? this.defaultNSCMargins :
                                                          this.defaultEWCMargins)
      }
   }
};
Ext.layout.BorderLayout.Region.prototype = {collapsible:false,split:false,floatable:true,minWidth:50,minHeight:50,defaultMargins:{left:0,top:0,right:0,bottom:0},defaultNSCMargins:{left:5,top:5,right:5,bottom:5},defaultEWCMargins:{left:5,top:0,right:5,bottom:0},isCollapsed:false,render:function(B, C)
{
   this.panel = C;
   C.el.enableDisplayMode();
   this.targetEl = B;
   this.el = C.el;
   var A = C.getState,D = this.position;
   C.getState = function()
   {
      return Ext.apply(A.call(C) || {}, this.state)
   }.createDelegate(this);
   if (D != "center")
   {
      C.allowQueuedExpand = false;
      C.on({beforecollapse:this.beforeCollapse,collapse:this.onCollapse,beforeexpand:this.beforeExpand,expand:this.onExpand,hide:this.onHide,show:this.onShow,scope:this});
      if (this.collapsible)
      {
         C.collapseEl = "el";
         C.slideAnchor = this.getSlideAnchor()
      }
      if (C.tools && C.tools.toggle)
      {
         C.tools.toggle.addClass("x-tool-collapse-" + D);
         C.tools.toggle.addClassOnOver("x-tool-collapse-" + D + "-over")
      }
   }
},getCollapsedEl:function()
{
   if (!this.collapsedEl)
   {
      if (!this.toolTemplate)
      {
         var B = new Ext.Template("<div class=\"x-tool x-tool-{id}\">&#160;</div>");
         B.disableFormats = true;
         B.compile();
         Ext.layout.BorderLayout.Region.prototype.toolTemplate = B
      }
      this.collapsedEl = this.targetEl.createChild({cls:"x-layout-collapsed x-layout-collapsed-" + this.position,id:this.panel.id + "-xcollapsed"});
      this.collapsedEl.enableDisplayMode("block");
      if (this.collapseMode == "mini")
      {
         this.collapsedEl.addClass("x-layout-cmini-" + this.position);
         this.miniCollapsedEl = this.collapsedEl.createChild({cls:"x-layout-mini x-layout-mini-" + this.position,html:"&#160;"});
         this.miniCollapsedEl.addClassOnOver("x-layout-mini-over");
         this.collapsedEl.addClassOnOver("x-layout-collapsed-over");
         this.collapsedEl.on("click", this.onExpandClick, this, {stopEvent:true})
      }
      else
      {
         var A = this.toolTemplate.append(this.collapsedEl.dom, {id:"expand-" + this.position}, true);
         A.addClassOnOver("x-tool-expand-" + this.position + "-over");
         A.on("click", this.onExpandClick, this, {stopEvent:true});
         if (this.floatable !== false)
         {
            this.collapsedEl.addClassOnOver("x-layout-collapsed-over");
            this.collapsedEl.on("click", this.collapseClick, this)
         }
      }
   }
   return this.collapsedEl
},onExpandClick:function(A)
{
   if (this.isSlid)
   {
      this.afterSlideIn();
      this.panel.expand(false)
   }
   else
   {
      this.panel.expand()
   }
},onCollapseClick:function(A)
{
   this.panel.collapse()
},beforeCollapse:function(B, A)
{
   this.lastAnim = A;
   if (this.splitEl)
   {
      this.splitEl.hide()
   }
   this.getCollapsedEl().show();
   this.panel.el.setStyle("z-index", 100);
   this.isCollapsed = true;
   this.layout.layout()
},onCollapse:function(A)
{
   this.panel.el.setStyle("z-index", 1);
   if (this.lastAnim === false || this.panel.animCollapse === false)
   {
      this.getCollapsedEl().dom.style.visibility = "visible"
   }
   else
   {
      this.getCollapsedEl().slideIn(this.panel.slideAnchor, {duration:0.2})
   }
   this.state.collapsed = true;
   this.panel.saveState()
},beforeExpand:function(A)
{
   var B = this.getCollapsedEl();
   this.el.show();
   if (this.position == "east" || this.position == "west")
   {
      this.panel.setSize(undefined, B.getHeight())
   }
   else
   {
      this.panel.setSize(B.getWidth(), undefined)
   }
   B.hide();
   B.dom.style.visibility = "hidden";
   this.panel.el.setStyle("z-index", 100)
},onExpand:function()
{
   this.isCollapsed = false;
   if (this.splitEl)
   {
      this.splitEl.show()
   }
   this.layout.layout();
   this.panel.el.setStyle("z-index", 1);
   this.state.collapsed = false;
   this.panel.saveState()
},collapseClick:function(A)
{
   if (this.isSlid)
   {
      A.stopPropagation();
      this.slideIn()
   }
   else
   {
      A.stopPropagation();
      this.slideOut()
   }
},onHide:function()
{
   if (this.isCollapsed)
   {
      this.getCollapsedEl().hide()
   }
   else
   {
      if (this.splitEl)
      {
         this.splitEl.hide()
      }
   }
},onShow:function()
{
   if (this.isCollapsed)
   {
      this.getCollapsedEl().show()
   }
   else
   {
      if (this.splitEl)
      {
         this.splitEl.show()
      }
   }
},isVisible:function()
{
   return !this.panel.hidden
},getMargins:function()
{
   return this.isCollapsed && this.cmargins ? this.cmargins : this.margins
},getSize:function()
{
   return this.isCollapsed ? this.getCollapsedEl().getSize() : this.panel.getSize()
},setPanel:function(A)
{
   this.panel = A
},getMinWidth:function()
{
   return this.minWidth
},getMinHeight:function()
{
   return this.minHeight
},applyLayoutCollapsed:function(A)
{
   var B = this.getCollapsedEl();
   B.setLeftTop(A.x, A.y);
   B.setSize(A.width, A.height)
},applyLayout:function(A)
{
   if (this.isCollapsed)
   {
      this.applyLayoutCollapsed(A)
   }
   else
   {
      this.panel.setPosition(A.x, A.y);
      this.panel.setSize(A.width, A.height)
   }
},beforeSlide:function()
{
   this.panel.beforeEffect()
},afterSlide:function()
{
   this.panel.afterEffect()
},initAutoHide:function()
{
   if (this.autoHide !== false)
   {
      if (!this.autoHideHd)
      {
         var A = new Ext.util.DelayedTask(this.slideIn, this);
         this.autoHideHd = {"mouseout":function(B)
         {
            if (!B.within(this.el, true))
            {
               A.delay(500)
            }
         },"mouseover":function(B)
         {
            A.cancel()
         },scope:this}
      }
      this.el.on(this.autoHideHd)
   }
},clearAutoHide:function()
{
   if (this.autoHide !== false)
   {
      this.el.un("mouseout", this.autoHideHd.mouseout);
      this.el.un("mouseover", this.autoHideHd.mouseover)
   }
},clearMonitor:function()
{
   Ext.getDoc().un("click", this.slideInIf, this)
},slideOut:function()
{
   if (this.isSlid || this.el.hasActiveFx())
   {
      return
   }
   this.isSlid = true;
   var A = this.panel.tools;
   if (A && A.toggle)
   {
      A.toggle.hide()
   }
   this.el.show();
   if (this.position == "east" || this.position == "west")
   {
      this.panel.setSize(undefined, this.collapsedEl.getHeight())
   }
   else
   {
      this.panel.setSize(this.collapsedEl.getWidth(), undefined)
   }
   this.restoreLT = [this.el.dom.style.left,this.el.dom.style.top];
   this.el.alignTo(this.collapsedEl, this.getCollapseAnchor());
   this.el.setStyle("z-index", 102);
   if (this.animFloat !== false)
   {
      this.beforeSlide();
      this.el.slideIn(this.getSlideAnchor(), {callback:function()
      {
         this.afterSlide();
         this.initAutoHide();
         Ext.getDoc().on("click", this.slideInIf, this)
      },scope:this,block:true})
   }
   else
   {
      this.initAutoHide();
      Ext.getDoc().on("click", this.slideInIf, this)
   }
},afterSlideIn:function()
{
   this.clearAutoHide();
   this.isSlid = false;
   this.clearMonitor();
   this.el.setStyle("z-index", "");
   this.el.dom.style.left = this.restoreLT[0];
   this.el.dom.style.top = this.restoreLT[1];
   var A = this.panel.tools;
   if (A && A.toggle)
   {
      A.toggle.show()
   }
},slideIn:function(A)
{
   if (!this.isSlid || this.el.hasActiveFx())
   {
      Ext.callback(A);
      return
   }
   this.isSlid = false;
   if (this.animFloat !== false)
   {
      this.beforeSlide();
      this.el.slideOut(this.getSlideAnchor(), {callback:function()
      {
         this.el.hide();
         this.afterSlide();
         this.afterSlideIn();
         Ext.callback(A)
      },scope:this,block:true})
   }
   else
   {
      this.el.hide();
      this.afterSlideIn()
   }
},slideInIf:function(A)
{
   if (!A.within(this.el))
   {
      this.slideIn()
   }
},anchors:{"west":"left","east":"right","north":"top","south":"bottom"},sanchors:{"west":"l","east":"r","north":"t","south":"b"},canchors:{"west":"tl-tr","east":"tr-tl","north":"tl-bl","south":"bl-tl"},getAnchor:function()
{
   return this.anchors[this.position]
},getCollapseAnchor:function()
{
   return this.canchors[this.position]
},getSlideAnchor:function()
{
   return this.sanchors[this.position]
},getAlignAdj:function()
{
   var A = this.cmargins;
   switch (this.position)
      {case"west":return[0,0];break;case"east":return[0,0];break;case"north":return[0,0];break;case"south":return[0,0];break}
},getExpandAdj:function()
{
   var B = this.collapsedEl,A = this.cmargins;
   switch (this.position)
      {case"west":return[-(A.right + B.getWidth() + A.left),0];break;case"east":return[A.right + B.getWidth() + A.left,0];break;case"north":return[0,-(A.top + A.bottom + B.getHeight())];break;case"south":return[0,A.top + A.bottom + B.getHeight()];break}
}};
Ext.layout.BorderLayout.SplitRegion = function(B, A, C)
{
   Ext.layout.BorderLayout.SplitRegion.superclass.constructor.call(this, B, A, C);
   this.applyLayout = this.applyFns[C]
};
Ext.extend(Ext.layout.BorderLayout.SplitRegion, Ext.layout.BorderLayout.Region, {splitTip:"Drag to resize.",collapsibleSplitTip:"Drag to resize. Double click to hide.",useSplitTips:false,splitSettings:{north:{orientation:Ext.SplitBar.VERTICAL,placement:Ext.SplitBar.TOP,maxFn:"getVMaxSize",minProp:"minHeight",maxProp:"maxHeight"},south:{orientation:Ext.SplitBar.VERTICAL,placement:Ext.SplitBar.BOTTOM,maxFn:"getVMaxSize",minProp:"minHeight",maxProp:"maxHeight"},east:{orientation:Ext.SplitBar.HORIZONTAL,placement:Ext.SplitBar.RIGHT,maxFn:"getHMaxSize",minProp:"minWidth",maxProp:"maxWidth"},west:{orientation:Ext.SplitBar.HORIZONTAL,placement:Ext.SplitBar.LEFT,maxFn:"getHMaxSize",minProp:"minWidth",maxProp:"maxWidth"}},applyFns:{west:function(C)
{
   if (this.isCollapsed)
   {
      return this.applyLayoutCollapsed(C)
   }
   var D = this.splitEl.dom,B = D.style;
   this.panel.setPosition(C.x, C.y);
   var A = D.offsetWidth;
   B.left = (C.x + C.width - A) + "px";
   B.top = (C.y) + "px";
   B.height = Math.max(0, C.height) + "px";
   this.panel.setSize(C.width - A, C.height)
},east:function(C)
{
   if (this.isCollapsed)
   {
      return this.applyLayoutCollapsed(C)
   }
   var D = this.splitEl.dom,B = D.style;
   var A = D.offsetWidth;
   this.panel.setPosition(C.x + A, C.y);
   B.left = (C.x) + "px";
   B.top = (C.y) + "px";
   B.height = Math.max(0, C.height) + "px";
   this.panel.setSize(C.width - A, C.height)
},north:function(C)
{
   if (this.isCollapsed)
   {
      return this.applyLayoutCollapsed(C)
   }
   var D = this.splitEl.dom,B = D.style;
   var A = D.offsetHeight;
   this.panel.setPosition(C.x, C.y);
   B.left = (C.x) + "px";
   B.top = (C.y + C.height - A) + "px";
   B.width = Math.max(0, C.width) + "px";
   this.panel.setSize(C.width, C.height - A)
},south:function(C)
{
   if (this.isCollapsed)
   {
      return this.applyLayoutCollapsed(C)
   }
   var D = this.splitEl.dom,B = D.style;
   var A = D.offsetHeight;
   this.panel.setPosition(C.x, C.y + A);
   B.left = (C.x) + "px";
   B.top = (C.y) + "px";
   B.width = Math.max(0, C.width) + "px";
   this.panel.setSize(C.width, C.height - A)
}},render:function(A, C)
{
   Ext.layout.BorderLayout.SplitRegion.superclass.render.call(this, A, C);
   var D = this.position;
   this.splitEl = A.createChild({cls:"x-layout-split x-layout-split-" + D,html:"&#160;",id:this.panel.id + "-xsplit"});
   if (this.collapseMode == "mini")
   {
      this.miniSplitEl = this.splitEl.createChild({cls:"x-layout-mini x-layout-mini-" + D,html:"&#160;"});
      this.miniSplitEl.addClassOnOver("x-layout-mini-over");
      this.miniSplitEl.on("click", this.onCollapseClick, this, {stopEvent:true})
   }
   var B = this.splitSettings[D];
   this.split = new Ext.SplitBar(this.splitEl.dom, C.el, B.orientation);
   this.split.placement = B.placement;
   this.split.getMaximumSize = this[B.maxFn].createDelegate(this);
   this.split.minSize = this.minSize || this[B.minProp];
   this.split.on("beforeapply", this.onSplitMove, this);
   this.split.useShim = this.useShim === true;
   this.maxSize = this.maxSize || this[B.maxProp];
   if (C.hidden)
   {
      this.splitEl.hide()
   }
   if (this.useSplitTips)
   {
      this.splitEl.dom.title = this.collapsible ? this.collapsibleSplitTip : this.splitTip
   }
   if (this.collapsible)
   {
      this.splitEl.on("dblclick", this.onCollapseClick, this)
   }
},getSize:function()
{
   if (this.isCollapsed)
   {
      return this.collapsedEl.getSize()
   }
   var A = this.panel.getSize();
   if (this.position == "north" || this.position == "south")
   {
      A.height += this.splitEl.dom.offsetHeight
   }
   else
   {
      A.width += this.splitEl.dom.offsetWidth
   }
   return A
},getHMaxSize:function()
{
   var B = this.maxSize || 10000;
   var A = this.layout.center;
   return Math.min(B, (this.el.getWidth() + A.el.getWidth()) - A.getMinWidth())
},getVMaxSize:function()
{
   var B = this.maxSize || 10000;
   var A = this.layout.center;
   return Math.min(B, (this.el.getHeight() + A.el.getHeight()) - A.getMinHeight())
},onSplitMove:function(B, A)
{
   var C = this.panel.getSize();
   this.lastSplitSize = A;
   if (this.position == "north" || this.position == "south")
   {
      this.panel.setSize(C.width, A);
      this.state.height = A
   }
   else
   {
      this.panel.setSize(A, C.height);
      this.state.width = A
   }
   this.layout.layout();
   this.panel.saveState();
   return false
},getSplitBar:function()
{
   return this.split
}});
Ext.Container.LAYOUTS["border"] = Ext.layout.BorderLayout;
Ext.layout.FormLayout = Ext.extend(Ext.layout.AnchorLayout, {labelSeparator:":",getAnchorViewSize:function(A, B)
{
   return A.body.getStyleSize()
},setContainer:function(B)
{
   Ext.layout.FormLayout.superclass.setContainer.call(this, B);
   if (B.labelAlign)
   {
      B.addClass("x-form-label-" + B.labelAlign)
   }
   if (B.hideLabels)
   {
      this.labelStyle = "display:none";
      this.elementStyle = "padding-left:0;";
      this.labelAdjust = 0
   }
   else
   {
      this.labelSeparator = B.labelSeparator || this.labelSeparator;
      B.labelWidth = B.labelWidth || 100;
      if (typeof B.labelWidth == "number")
      {
         var C = (typeof B.labelPad == "number" ? B.labelPad : 5);
         this.labelAdjust = B.labelWidth + C;
         this.labelStyle = "width:" + B.labelWidth + "px;";
         this.elementStyle = "padding-left:" + (B.labelWidth + C) + "px"
      }
      if (B.labelAlign == "top")
      {
         this.labelStyle = "width:auto;";
         this.labelAdjust = 0;
         this.elementStyle = "padding-left:0;"
      }
   }
   if (!this.fieldTpl)
   {
      var A = new Ext.Template("<div class=\"x-form-item {5}\" tabIndex=\"-1\">", "<label for=\"{0}\" style=\"{2}\" class=\"x-form-item-label\">{1}{4}</label>", "<div class=\"x-form-element\" id=\"x-form-el-{0}\" style=\"{3}\">", "</div><div class=\"{6}\"></div>", "</div>");
      A.disableFormats = true;
      A.compile();
      Ext.layout.FormLayout.prototype.fieldTpl = A
   }
},renderItem:function(D, A, C)
{
   if (D && !D.rendered && D.isFormField && D.inputType != "hidden")
   {
      var B = [D.id,D.fieldLabel,D.labelStyle || this.labelStyle || "",this.elementStyle || "",
         typeof D.labelSeparator == "undefined" ? this.labelSeparator :
         D.labelSeparator,(D.itemCls || this.container.itemCls || "") + (D.hideLabel ? " x-hide-label" :
                                                                         ""),D.clearCls || "x-form-clear-left"];
      if (typeof A == "number")
      {
         A = C.dom.childNodes[A] || null
      }
      if (A)
      {
         this.fieldTpl.insertBefore(A, B)
      }
      else
      {
         this.fieldTpl.append(C, B)
      }
      D.render("x-form-el-" + D.id)
   }
   else
   {
      Ext.layout.FormLayout.superclass.renderItem.apply(this, arguments)
   }
},adjustWidthAnchor:function(B, A)
{
   return B - (A.isFormField ? (A.hideLabel ? 0 : this.labelAdjust) : 0)
},isValidParent:function(B, A)
{
   return true
}});
Ext.Container.LAYOUTS["form"] = Ext.layout.FormLayout;
Ext.layout.Accordion = Ext.extend(Ext.layout.FitLayout, {fill:true,autoWidth:true,titleCollapse:true,hideCollapseTool:false,collapseFirst:false,animate:false,sequence:false,activeOnTop:false,renderItem:function(A)
{
   if (this.animate === false)
   {
      A.animCollapse = false
   }
   A.collapsible = true;
   if (this.autoWidth)
   {
      A.autoWidth = true
   }
   if (this.titleCollapse)
   {
      A.titleCollapse = true
   }
   if (this.hideCollapseTool)
   {
      A.hideCollapseTool = true
   }
   if (this.collapseFirst !== undefined)
   {
      A.collapseFirst = this.collapseFirst
   }
   if (!this.activeItem && !A.collapsed)
   {
      this.activeItem = A
   }
   else
   {
      if (this.activeItem)
      {
         A.collapsed = true
      }
   }
   Ext.layout.Accordion.superclass.renderItem.apply(this, arguments);
   A.header.addClass("x-accordion-hd");
   A.on("beforeexpand", this.beforeExpand, this)
},beforeExpand:function(C, B)
{
   var A = this.activeItem;
   if (A)
   {
      if (this.sequence)
      {
         delete this.activeItem;
         if (!A.collapsed)
         {
            A.collapse({callback:function()
            {
               C.expand(B || true)
            },scope:this});
            return false
         }
      }
      else
      {
         A.collapse(this.animate)
      }
   }
   this.activeItem = C;
   if (this.activeOnTop)
   {
      C.el.dom.parentNode.insertBefore(C.el.dom, C.el.dom.parentNode.firstChild)
   }
   this.layout()
},setItemSize:function(F, E)
{
   if (this.fill && F)
   {
      var B = this.container.items.items;
      var D = 0;
      for (var C = 0,A = B.length; C < A; C++)
      {
         var G = B[C];
         if (G != F)
         {
            D += (G.getSize().height - G.bwrap.getHeight())
         }
      }
      E.height -= D;
      F.setSize(E)
   }
}});
Ext.Container.LAYOUTS["accordion"] = Ext.layout.Accordion;
Ext.layout.TableLayout = Ext.extend(Ext.layout.ContainerLayout, {monitorResize:false,setContainer:function(A)
{
   Ext.layout.TableLayout.superclass.setContainer.call(this, A);
   this.currentRow = 0;
   this.currentColumn = 0;
   this.cells = []
},onLayout:function(C, E)
{
   var D = C.items.items,A = D.length,F,B;
   if (!this.table)
   {
      E.addClass("x-table-layout-ct");
      this.table = E.createChild({tag:"table",cls:"x-table-layout",cellspacing:0,cn:{tag:"tbody"}}, null, true);
      this.renderAll(C, E)
   }
},getRow:function(A)
{
   var B = this.table.tBodies[0].childNodes[A];
   if (!B)
   {
      B = document.createElement("tr");
      this.table.tBodies[0].appendChild(B)
   }
   return B
},getNextCell:function(H)
{
   var A = this.getNextNonSpan(this.currentColumn, this.currentRow);
   var E = this.currentColumn = A[0],D = this.currentRow = A[1];
   for (var G = D; G < D + (H.rowspan || 1); G++)
   {
      if (!this.cells[G])
      {
         this.cells[G] = []
      }
      for (var C = E; C < E + (H.colspan || 1); C++)
      {
         this.cells[G][C] = true
      }
   }
   var F = document.createElement("td");
   if (H.cellId)
   {
      F.id = H.cellId
   }
   var B = "x-table-layout-cell";
   if (H.cellCls)
   {
      B += " " + H.cellCls
   }
   F.className = B;
   if (H.colspan)
   {
      F.colSpan = H.colspan
   }
   if (H.rowspan)
   {
      F.rowSpan = H.rowspan
   }
   this.getRow(D).appendChild(F);
   return F
},getNextNonSpan:function(A, C)
{
   var B = this.columns;
   while ((B && A >= B) || (this.cells[C] && this.cells[C][A]))
   {
      if (B && A >= B)
      {
         C++;
         A = 0
      }
      else
      {
         A++
      }
   }
   return[A,C]
},renderItem:function(C, A, B)
{
   if (C && !C.rendered)
   {
      C.render(this.getNextCell(C))
   }
},isValidParent:function(B, A)
{
   return true
}});
Ext.Container.LAYOUTS["table"] = Ext.layout.TableLayout;
Ext.layout.AbsoluteLayout = Ext.extend(Ext.layout.AnchorLayout, {extraCls:"x-abs-layout-item",isForm:false,setContainer:function(A)
{
   Ext.layout.AbsoluteLayout.superclass.setContainer.call(this, A);
   if (A.isXType("form"))
   {
      this.isForm = true
   }
},onLayout:function(A, B)
{
   if (this.isForm)
   {
      A.body.position()
   }
   else
   {
      B.position()
   }
   Ext.layout.AbsoluteLayout.superclass.onLayout.call(this, A, B)
},getAnchorViewSize:function(A, B)
{
   return this.isForm ? A.body.getStyleSize() : Ext.layout.AbsoluteLayout.superclass.getAnchorViewSize.call(this, A, B)
},isValidParent:function(B, A)
{
   return this.isForm ? true : Ext.layout.AbsoluteLayout.superclass.isValidParent.call(this, B, A)
},adjustWidthAnchor:function(B, A)
{
   return B ? B - A.getPosition(true)[0] : B
},adjustHeightAnchor:function(B, A)
{
   return B ? B - A.getPosition(true)[1] : B
}});
Ext.Container.LAYOUTS["absolute"] = Ext.layout.AbsoluteLayout;
Ext.Viewport = Ext.extend(Ext.Container, {initComponent:function()
{
   Ext.Viewport.superclass.initComponent.call(this);
   document.getElementsByTagName("html")[0].className += " x-viewport";
   this.el = Ext.getBody();
   this.el.setHeight = Ext.emptyFn;
   this.el.setWidth = Ext.emptyFn;
   this.el.setSize = Ext.emptyFn;
   this.el.dom.scroll = "no";
   this.allowDomMove = false;
   this.autoWidth = true;
   this.autoHeight = true;
   Ext.EventManager.onWindowResize(this.fireResize, this);
   this.renderTo = this.el
},fireResize:function(A, B)
{
   this.fireEvent("resize", this, A, B, A, B)
}});
Ext.reg("viewport", Ext.Viewport);
Ext.Panel = Ext.extend(Ext.Container, {baseCls:"x-panel",collapsedCls:"x-panel-collapsed",maskDisabled:true,animCollapse:Ext.enableFx,headerAsText:true,buttonAlign:"right",collapsed:false,collapseFirst:true,minButtonWidth:75,elements:"body",toolTarget:"header",collapseEl:"bwrap",slideAnchor:"t",disabledClass:"",deferHeight:true,expandDefaults:{duration:0.25},collapseDefaults:{duration:0.25},initComponent:function()
{
   Ext.Panel.superclass.initComponent.call(this);
   this.addEvents("bodyresize", "titlechange", "collapse", "expand", "beforecollapse", "beforeexpand", "beforeclose", "close", "activate", "deactivate");
   if (this.tbar)
   {
      this.elements += ",tbar";
      if (typeof this.tbar == "object")
      {
         this.topToolbar = this.tbar
      }
      delete this.tbar
   }
   if (this.bbar)
   {
      this.elements += ",bbar";
      if (typeof this.bbar == "object")
      {
         this.bottomToolbar = this.bbar
      }
      delete this.bbar
   }
   if (this.header === true)
   {
      this.elements += ",header";
      delete this.header
   }
   else
   {
      if (this.title && this.header !== false)
      {
         this.elements += ",header"
      }
   }
   if (this.footer === true)
   {
      this.elements += ",footer";
      delete this.footer
   }
   if (this.buttons)
   {
      var C = this.buttons;
      this.buttons = [];
      for (var B = 0,A = C.length; B < A; B++)
      {
         if (C[B].render)
         {
            C[B].ownerCt = this;
            this.buttons.push(C[B])
         }
         else
         {
            this.addButton(C[B])
         }
      }
   }
   if (this.autoLoad)
   {
      this.on("render", this.doAutoLoad, this, {delay:10})
   }
},createElement:function(A, C)
{
   if (this[A])
   {
      C.appendChild(this[A].dom);
      return
   }
   if (A === "bwrap" || this.elements.indexOf(A) != -1)
   {
      if (this[A + "Cfg"])
      {
         this[A] = Ext.fly(C).createChild(this[A + "Cfg"])
      }
      else
      {
         var B = document.createElement("div");
         B.className = this[A + "Cls"];
         this[A] = Ext.get(C.appendChild(B))
      }
   }
},onRender:function(H, G)
{
   Ext.Panel.superclass.onRender.call(this, H, G);
   this.createClasses();
   if (this.el)
   {
      this.el.addClass(this.baseCls);
      this.header = this.el.down("." + this.headerCls);
      this.bwrap = this.el.down("." + this.bwrapCls);
      var M = this.bwrap ? this.bwrap : this.el;
      this.tbar = M.down("." + this.tbarCls);
      this.body = M.down("." + this.bodyCls);
      this.bbar = M.down("." + this.bbarCls);
      this.footer = M.down("." + this.footerCls);
      this.fromMarkup = true
   }
   else
   {
      this.el = H.createChild({id:this.id,cls:this.baseCls}, G)
   }
   var A = this.el,K = A.dom;
   if (this.cls)
   {
      this.el.addClass(this.cls)
   }
   if (this.buttons)
   {
      this.elements += ",footer"
   }
   if (this.frame)
   {
      A.insertHtml("afterBegin", String.format(Ext.Element.boxMarkup, this.baseCls));
      this.createElement("header", K.firstChild.firstChild.firstChild);
      this.createElement("bwrap", K);
      var O = this.bwrap.dom;
      var E = K.childNodes[1],B = K.childNodes[2];
      O.appendChild(E);
      O.appendChild(B);
      var P = O.firstChild.firstChild.firstChild;
      this.createElement("tbar", P);
      this.createElement("body", P);
      this.createElement("bbar", P);
      this.createElement("footer", O.lastChild.firstChild.firstChild);
      if (!this.footer)
      {
         this.bwrap.dom.lastChild.className += " x-panel-nofooter"
      }
   }
   else
   {
      this.createElement("header", K);
      this.createElement("bwrap", K);
      var O = this.bwrap.dom;
      this.createElement("tbar", O);
      this.createElement("body", O);
      this.createElement("bbar", O);
      this.createElement("footer", O);
      if (!this.header)
      {
         this.body.addClass(this.bodyCls + "-noheader");
         if (this.tbar)
         {
            this.tbar.addClass(this.tbarCls + "-noheader")
         }
      }
   }
   if (this.border === false)
   {
      this.el.addClass(this.baseCls + "-noborder");
      this.body.addClass(this.bodyCls + "-noborder");
      if (this.header)
      {
         this.header.addClass(this.headerCls + "-noborder")
      }
      if (this.footer)
      {
         this.footer.addClass(this.footerCls + "-noborder")
      }
      if (this.tbar)
      {
         this.tbar.addClass(this.tbarCls + "-noborder")
      }
      if (this.bbar)
      {
         this.bbar.addClass(this.bbarCls + "-noborder")
      }
   }
   if (this.bodyBorder === false)
   {
      this.body.addClass(this.bodyCls + "-noborder")
   }
   if (this.bodyStyle)
   {
      this.body.applyStyles(this.bodyStyle)
   }
   this.bwrap.enableDisplayMode("block");
   if (this.header)
   {
      this.header.unselectable();
      if (this.headerAsText)
      {
         this.header.dom.innerHTML = "<span class=\"" + this.headerTextCls + "\">" + this.header.dom.innerHTML + "</span>";
         if (this.iconCls)
         {
            this.setIconClass(this.iconCls)
         }
      }
   }
   if (this.floating)
   {
      this.makeFloating(this.floating)
   }
   if (this.collapsible)
   {
      this.tools = this.tools ? this.tools.slice(0) : [];
      if (!this.hideCollapseTool)
      {
         this.tools[this.collapseFirst ? "unshift" : "push"]({id:"toggle",handler:this.toggleCollapse,scope:this})
      }
      if (this.titleCollapse && this.header)
      {
         this.header.on("click", this.toggleCollapse, this);
         this.header.setStyle("cursor", "pointer")
      }
   }
   if (this.tools)
   {
      var J = this.tools;
      this.tools = {};
      this.addTool.apply(this, J)
   }
   else
   {
      this.tools = {}
   }
   if (this.buttons && this.buttons.length > 0)
   {
      var D = this.footer.createChild({cls:"x-panel-btns-ct",cn:{cls:"x-panel-btns x-panel-btns-" + this.buttonAlign,html:"<table cellspacing=\"0\"><tbody><tr></tr></tbody></table><div class=\"x-clear\"></div>"}}, null, true);
      var L = D.getElementsByTagName("tr")[0];
      for (var F = 0,I = this.buttons.length; F < I; F++)
      {
         var N = this.buttons[F];
         var C = document.createElement("td");
         C.className = "x-panel-btn-td";
         N.render(L.appendChild(C))
      }
   }
   if (this.tbar && this.topToolbar)
   {
      if (Ext.isArray(this.topToolbar))
      {
         this.topToolbar = new Ext.Toolbar(this.topToolbar)
      }
      this.topToolbar.render(this.tbar);
      this.topToolbar.ownerCt = this
   }
   if (this.bbar && this.bottomToolbar)
   {
      if (Ext.isArray(this.bottomToolbar))
      {
         this.bottomToolbar = new Ext.Toolbar(this.bottomToolbar)
      }
      this.bottomToolbar.render(this.bbar);
      this.bottomToolbar.ownerCt = this
   }
},setIconClass:function(B)
{
   var A = this.iconCls;
   this.iconCls = B;
   if (this.rendered && this.header)
   {
      if (this.frame)
      {
         this.header.addClass("x-panel-icon");
         this.header.replaceClass(A, this.iconCls)
      }
      else
      {
         var D = this.header.dom;
         var C = D.firstChild && String(D.firstChild.tagName).toLowerCase() == "img" ? D.firstChild : null;
         if (C)
         {
            Ext.fly(C).replaceClass(A, this.iconCls)
         }
         else
         {
            Ext.DomHelper.insertBefore(D.firstChild, {tag:"img",src:Ext.BLANK_IMAGE_URL,cls:"x-panel-inline-icon " + this.iconCls})
         }
      }
   }
},makeFloating:function(A)
{
   this.floating = true;
   this.el = new Ext.Layer(typeof A == "object" ? A : {shadow:this.shadow !== undefined ? this.shadow :
                                                              "sides",shadowOffset:this.shadowOffset,constrain:false,shim:
      this.shim === false ? false : undefined}, this.el)
},getTopToolbar:function()
{
   return this.topToolbar
},getBottomToolbar:function()
{
   return this.bottomToolbar
},addButton:function(A, D, C)
{
   var E = {handler:D,scope:C,minWidth:this.minButtonWidth,hideParent:true};
   if (typeof A == "string")
   {
      E.text = A
   }
   else
   {
      Ext.apply(E, A)
   }
   var B = new Ext.Button(E);
   B.ownerCt = this;
   if (!this.buttons)
   {
      this.buttons = []
   }
   this.buttons.push(B);
   return B
},addTool:function()
{
   if (!this[this.toolTarget])
   {
      return
   }
   if (!this.toolTemplate)
   {
      var F = new Ext.Template("<div class=\"x-tool x-tool-{id}\">&#160;</div>");
      F.disableFormats = true;
      F.compile();
      Ext.Panel.prototype.toolTemplate = F
   }
   for (var E = 0,C = arguments,B = C.length; E < B; E++)
   {
      var A = C[E],G = "x-tool-" + A.id + "-over";
      var D = this.toolTemplate.insertFirst((A.align !== "left") ? this[this.toolTarget] :
                                            this[this.toolTarget].child("span"), A, true);
      this.tools[A.id] = D;
      D.enableDisplayMode("block");
      D.on("click", this.createToolHandler(D, A, G, this));
      if (A.on)
      {
         D.on(A.on)
      }
      if (A.hidden)
      {
         D.hide()
      }
      if (A.qtip)
      {
         if (typeof A.qtip == "object")
         {
            Ext.QuickTips.register(Ext.apply({target:D.id}, A.qtip))
         }
         else
         {
            D.dom.qtip = A.qtip
         }
      }
      D.addClassOnOver(G)
   }
},onShow:function()
{
   if (this.floating)
   {
      return this.el.show()
   }
   Ext.Panel.superclass.onShow.call(this)
},onHide:function()
{
   if (this.floating)
   {
      return this.el.hide()
   }
   Ext.Panel.superclass.onHide.call(this)
},createToolHandler:function(C, A, D, B)
{
   return function(E)
   {
      C.removeClass(D);
      E.stopEvent();
      if (A.handler)
      {
         A.handler.call(A.scope || C, E, C, B)
      }
   }
},afterRender:function()
{
   if (this.fromMarkup && this.height === undefined && !this.autoHeight)
   {
      this.height = this.el.getHeight()
   }
   if (this.floating && !this.hidden && !this.initHidden)
   {
      this.el.show()
   }
   if (this.title)
   {
      this.setTitle(this.title)
   }
   this.setAutoScroll();
   if (this.html)
   {
      this.body.update(typeof this.html == "object" ? Ext.DomHelper.markup(this.html) : this.html);
      delete this.html
   }
   if (this.contentEl)
   {
      var A = Ext.getDom(this.contentEl);
      Ext.fly(A).removeClass(["x-hidden","x-hide-display"]);
      this.body.dom.appendChild(A)
   }
   if (this.collapsed)
   {
      this.collapsed = false;
      this.collapse(false)
   }
   Ext.Panel.superclass.afterRender.call(this);
   this.initEvents()
},setAutoScroll:function()
{
   if (this.rendered && this.autoScroll)
   {
      var A = this.body || this.el;
      if (A)
      {
         A.setOverflow("auto")
      }
   }
},getKeyMap:function()
{
   if (!this.keyMap)
   {
      this.keyMap = new Ext.KeyMap(this.el, this.keys)
   }
   return this.keyMap
},initEvents:function()
{
   if (this.keys)
   {
      this.getKeyMap()
   }
   if (this.draggable)
   {
      this.initDraggable()
   }
},initDraggable:function()
{
   this.dd = new Ext.Panel.DD(this, typeof this.draggable == "boolean" ? null : this.draggable)
},beforeEffect:function()
{
   if (this.floating)
   {
      this.el.beforeAction()
   }
   this.el.addClass("x-panel-animated")
},afterEffect:function()
{
   this.syncShadow();
   this.el.removeClass("x-panel-animated")
},createEffect:function(B, A, C)
{
   var D = {scope:C,block:true};
   if (B === true)
   {
      D.callback = A;
      return D
   }
   else
   {
      if (!B.callback)
      {
         D.callback = A
      }
      else
      {
         D.callback = function()
         {
            A.call(C);
            Ext.callback(B.callback, B.scope)
         }
      }
   }
   return Ext.applyIf(D, B)
},collapse:function(B)
{
   if (this.collapsed || this.el.hasFxBlock() || this.fireEvent("beforecollapse", this, B) === false)
   {
      return
   }
   var A = B === true || (B !== false && this.animCollapse);
   this.beforeEffect();
   this.onCollapse(A, B);
   return this
},onCollapse:function(A, B)
{
   if (A)
   {
      this[this.collapseEl].slideOut(this.slideAnchor, Ext.apply(this.createEffect(B || true, this.afterCollapse, this), this.collapseDefaults))
   }
   else
   {
      this[this.collapseEl].hide();
      this.afterCollapse()
   }
},afterCollapse:function()
{
   this.collapsed = true;
   this.el.addClass(this.collapsedCls);
   this.afterEffect();
   this.fireEvent("collapse", this)
},expand:function(B)
{
   if (!this.collapsed || this.el.hasFxBlock() || this.fireEvent("beforeexpand", this, B) === false)
   {
      return
   }
   var A = B === true || (B !== false && this.animCollapse);
   this.el.removeClass(this.collapsedCls);
   this.beforeEffect();
   this.onExpand(A, B);
   return this
},onExpand:function(A, B)
{
   if (A)
   {
      this[this.collapseEl].slideIn(this.slideAnchor, Ext.apply(this.createEffect(B || true, this.afterExpand, this), this.expandDefaults))
   }
   else
   {
      this[this.collapseEl].show();
      this.afterExpand()
   }
},afterExpand:function()
{
   this.collapsed = false;
   this.afterEffect();
   this.fireEvent("expand", this)
},toggleCollapse:function(A)
{
   this[this.collapsed ? "expand" : "collapse"](A);
   return this
},onDisable:function()
{
   if (this.rendered && this.maskDisabled)
   {
      this.el.mask()
   }
   Ext.Panel.superclass.onDisable.call(this)
},onEnable:function()
{
   if (this.rendered && this.maskDisabled)
   {
      this.el.unmask()
   }
   Ext.Panel.superclass.onEnable.call(this)
},onResize:function(A, B)
{
   if (A !== undefined || B !== undefined)
   {
      if (!this.collapsed)
      {
         if (typeof A == "number")
         {
            this.body.setWidth(this.adjustBodyWidth(A - this.getFrameWidth()))
         }
         else
         {
            if (A == "auto")
            {
               this.body.setWidth(A)
            }
         }
         if (typeof B == "number")
         {
            this.body.setHeight(this.adjustBodyHeight(B - this.getFrameHeight()))
         }
         else
         {
            if (B == "auto")
            {
               this.body.setHeight(B)
            }
         }
         if (this.disabled && this.el._mask)
         {
            this.el._mask.setSize(this.el.dom.clientWidth, this.el.getHeight())
         }
      }
      else
      {
         this.queuedBodySize = {width:A,height:B};
         if (!this.queuedExpand && this.allowQueuedExpand !== false)
         {
            this.queuedExpand = true;
            this.on("expand", function()
            {
               delete this.queuedExpand;
               this.onResize(this.queuedBodySize.width, this.queuedBodySize.height);
               this.doLayout()
            }, this, {single:true})
         }
      }
      this.fireEvent("bodyresize", this, A, B)
   }
   this.syncShadow()
},adjustBodyHeight:function(A)
{
   return A
},adjustBodyWidth:function(A)
{
   return A
},onPosition:function()
{
   this.syncShadow()
},getFrameWidth:function()
{
   var B = this.el.getFrameWidth("lr");
   if (this.frame)
   {
      var A = this.bwrap.dom.firstChild;
      B += (Ext.fly(A).getFrameWidth("l") + Ext.fly(A.firstChild).getFrameWidth("r"));
      var C = this.bwrap.dom.firstChild.firstChild.firstChild;
      B += Ext.fly(C).getFrameWidth("lr")
   }
   return B
},getFrameHeight:function()
{
   var A = this.el.getFrameWidth("tb");
   A += (this.tbar ? this.tbar.getHeight() : 0) + (this.bbar ? this.bbar.getHeight() : 0);
   if (this.frame)
   {
      var C = this.el.dom.firstChild;
      var D = this.bwrap.dom.lastChild;
      A += (C.offsetHeight + D.offsetHeight);
      var B = this.bwrap.dom.firstChild.firstChild.firstChild;
      A += Ext.fly(B).getFrameWidth("tb")
   }
   else
   {
      A += (this.header ? this.header.getHeight() : 0) + (this.footer ? this.footer.getHeight() : 0)
   }
   return A
},getInnerWidth:function()
{
   return this.getSize().width - this.getFrameWidth()
},getInnerHeight:function()
{
   return this.getSize().height - this.getFrameHeight()
},syncShadow:function()
{
   if (this.floating)
   {
      this.el.sync(true)
   }
},getLayoutTarget:function()
{
   return this.body
},setTitle:function(B, A)
{
   this.title = B;
   if (this.header && this.headerAsText)
   {
      this.header.child("span").update(B)
   }
   if (A)
   {
      this.setIconClass(A)
   }
   this.fireEvent("titlechange", this, B);
   return this
},getUpdater:function()
{
   return this.body.getUpdater()
},load:function()
{
   var A = this.body.getUpdater();
   A.update.apply(A, arguments);
   return this
},beforeDestroy:function()
{
   Ext.Element.uncache(this.header, this.tbar, this.bbar, this.footer, this.body);
   if (this.tools)
   {
      for (var B in this.tools)
      {
         Ext.destroy(this.tools[B])
      }
   }
   if (this.buttons)
   {
      for (var A in this.buttons)
      {
         Ext.destroy(this.buttons[A])
      }
   }
   Ext.destroy(this.topToolbar, this.bottomToolbar);
   Ext.Panel.superclass.beforeDestroy.call(this)
},createClasses:function()
{
   this.headerCls = this.baseCls + "-header";
   this.headerTextCls = this.baseCls + "-header-text";
   this.bwrapCls = this.baseCls + "-bwrap";
   this.tbarCls = this.baseCls + "-tbar";
   this.bodyCls = this.baseCls + "-body";
   this.bbarCls = this.baseCls + "-bbar";
   this.footerCls = this.baseCls + "-footer"
},createGhost:function(A, E, B)
{
   var D = document.createElement("div");
   D.className = "x-panel-ghost " + (A ? A : "");
   if (this.header)
   {
      D.appendChild(this.el.dom.firstChild.cloneNode(true))
   }
   Ext.fly(D.appendChild(document.createElement("ul"))).setHeight(this.bwrap.getHeight());
   D.style.width = this.el.dom.offsetWidth + "px";
   if (!B)
   {
      this.container.dom.appendChild(D)
   }
   else
   {
      Ext.getDom(B).appendChild(D)
   }
   if (E !== false && this.el.useShim !== false)
   {
      var C = new Ext.Layer({shadow:false,useDisplay:true,constrain:false}, D);
      C.show();
      return C
   }
   else
   {
      return new Ext.Element(D)
   }
},doAutoLoad:function()
{
   this.body.load(typeof this.autoLoad == "object" ? this.autoLoad : {url:this.autoLoad})
}});
Ext.reg("panel", Ext.Panel);
Ext.Window = Ext.extend(Ext.Panel, {baseCls:"x-window",resizable:true,draggable:true,closable:true,constrain:false,constrainHeader:false,plain:false,minimizable:false,maximizable:false,minHeight:100,minWidth:200,expandOnShow:true,closeAction:"close",elements:"header,body",collapsible:false,initHidden:true,monitorResize:true,frame:true,floating:true,initComponent:function()
{
   Ext.Window.superclass.initComponent.call(this);
   this.addEvents("resize", "maximize", "minimize", "restore")
},getState:function()
{
   return Ext.apply(Ext.Window.superclass.getState.call(this) || {}, this.getBox())
},onRender:function(B, A)
{
   Ext.Window.superclass.onRender.call(this, B, A);
   if (this.plain)
   {
      this.el.addClass("x-window-plain")
   }
   this.focusEl = this.el.createChild({tag:"a",href:"#",cls:"x-dlg-focus",tabIndex:"-1",html:"&#160;"});
   this.focusEl.swallowEvent("click", true);
   this.proxy = this.el.createProxy("x-window-proxy");
   this.proxy.enableDisplayMode("block");
   if (this.modal)
   {
      this.mask = this.container.createChild({cls:"ext-el-mask"}, this.el.dom);
      this.mask.enableDisplayMode("block");
      this.mask.hide()
   }
},initEvents:function()
{
   Ext.Window.superclass.initEvents.call(this);
   if (this.animateTarget)
   {
      this.setAnimateTarget(this.animateTarget)
   }
   if (this.resizable)
   {
      this.resizer = new Ext.Resizable(this.el, {minWidth:this.minWidth,minHeight:this.minHeight,handles:this.resizeHandles || "all",pinned:true,resizeElement:this.resizerAction});
      this.resizer.window = this;
      this.resizer.on("beforeresize", this.beforeResize, this)
   }
   if (this.draggable)
   {
      this.header.addClass("x-window-draggable")
   }
   this.initTools();
   this.el.on("mousedown", this.toFront, this);
   this.manager = this.manager || Ext.WindowMgr;
   this.manager.register(this);
   this.hidden = true;
   if (this.maximized)
   {
      this.maximized = false;
      this.maximize()
   }
   if (this.closable)
   {
      var A = this.getKeyMap();
      A.on(27, this.onEsc, this);
      A.disable()
   }
},initDraggable:function()
{
   this.dd = new Ext.Window.DD(this)
},onEsc:function()
{
   this[this.closeAction]()
},beforeDestroy:function()
{
   Ext.destroy(this.resizer, this.dd, this.proxy, this.mask);
   Ext.Window.superclass.beforeDestroy.call(this)
},onDestroy:function()
{
   if (this.manager)
   {
      this.manager.unregister(this)
   }
   Ext.Window.superclass.onDestroy.call(this)
},initTools:function()
{
   if (this.minimizable)
   {
      this.addTool({id:"minimize",handler:this.minimize.createDelegate(this, [])})
   }
   if (this.maximizable)
   {
      this.addTool({id:"maximize",handler:this.maximize.createDelegate(this, [])});
      this.addTool({id:"restore",handler:this.restore.createDelegate(this, []),hidden:true});
      this.header.on("dblclick", this.toggleMaximize, this)
   }
   if (this.closable)
   {
      this.addTool({id:"close",handler:this[this.closeAction].createDelegate(this, [])})
   }
},resizerAction:function()
{
   var A = this.proxy.getBox();
   this.proxy.hide();
   this.window.handleResize(A);
   return A
},beforeResize:function()
{
   this.resizer.minHeight = Math.max(this.minHeight, this.getFrameHeight() + 40);
   this.resizer.minWidth = Math.max(this.minWidth, this.getFrameWidth() + 40);
   this.resizeBox = this.el.getBox()
},updateHandles:function()
{
   if (Ext.isIE && this.resizer)
   {
      this.resizer.syncHandleHeight();
      this.el.repaint()
   }
},handleResize:function(B)
{
   var A = this.resizeBox;
   if (A.x != B.x || A.y != B.y)
   {
      this.updateBox(B)
   }
   else
   {
      this.setSize(B)
   }
   this.focus();
   this.updateHandles();
   this.saveState();
   if (this.layout)
   {
      this.doLayout()
   }
   this.fireEvent("resize", this, B.width, B.height)
},focus:function()
{
   var C = this.focusEl,A = this.defaultButton,B = typeof A;
   if (B != "undefined")
   {
      if (B == "number")
      {
         C = this.buttons[A]
      }
      else
      {
         if (B == "string")
         {
            C = Ext.getCmp(A)
         }
         else
         {
            C = A
         }
      }
   }
   C.focus.defer(10, C)
},setAnimateTarget:function(A)
{
   A = Ext.get(A);
   this.animateTarget = A
},beforeShow:function()
{
   delete this.el.lastXY;
   delete this.el.lastLT;
   if (this.x === undefined || this.y === undefined)
   {
      var A = this.el.getAlignToXY(this.container, "c-c");
      var B = this.el.translatePoints(A[0], A[1]);
      this.x = this.x === undefined ? B.left : this.x;
      this.y = this.y === undefined ? B.top : this.y
   }
   this.el.setLeftTop(this.x, this.y);
   if (this.expandOnShow)
   {
      this.expand(false)
   }
   if (this.modal)
   {
      Ext.getBody().addClass("x-body-masked");
      this.mask.setSize(Ext.lib.Dom.getViewWidth(true), Ext.lib.Dom.getViewHeight(true));
      this.mask.show()
   }
},show:function(C, A, B)
{
   if (!this.rendered)
   {
      this.render(Ext.getBody())
   }
   if (this.hidden === false)
   {
      this.toFront();
      return
   }
   if (this.fireEvent("beforeshow", this) === false)
   {
      return
   }
   if (A)
   {
      this.on("show", A, B, {single:true})
   }
   this.hidden = false;
   if (C !== undefined)
   {
      this.setAnimateTarget(C)
   }
   this.beforeShow();
   if (this.animateTarget)
   {
      this.animShow()
   }
   else
   {
      this.afterShow()
   }
},afterShow:function()
{
   this.proxy.hide();
   this.el.setStyle("display", "block");
   this.el.show();
   if (this.maximized)
   {
      this.fitContainer()
   }
   if (Ext.isMac && Ext.isGecko)
   {
      this.cascade(this.setAutoScroll)
   }
   if (this.monitorResize || this.modal || this.constrain || this.constrainHeader)
   {
      Ext.EventManager.onWindowResize(this.onWindowResize, this)
   }
   this.doConstrain();
   if (this.layout)
   {
      this.doLayout()
   }
   if (this.keyMap)
   {
      this.keyMap.enable()
   }
   this.toFront();
   this.updateHandles();
   this.fireEvent("show", this)
},animShow:function()
{
   this.proxy.show();
   this.proxy.setBox(this.animateTarget.getBox());
   this.proxy.setOpacity(0);
   var A = this.getBox(false);
   A.callback = this.afterShow;
   A.scope = this;
   A.duration = 0.25;
   A.easing = "easeNone";
   A.opacity = 0.5;
   A.block = true;
   this.el.setStyle("display", "none");
   this.proxy.shift(A)
},hide:function(C, A, B)
{
   if (this.activeGhost)
   {
      this.hide.defer(100, this, [C,A,B]);
      return
   }
   if (this.hidden || this.fireEvent("beforehide", this) === false)
   {
      return
   }
   if (A)
   {
      this.on("hide", A, B, {single:true})
   }
   this.hidden = true;
   if (C !== undefined)
   {
      this.setAnimateTarget(C)
   }
   if (this.animateTarget)
   {
      this.animHide()
   }
   else
   {
      this.el.hide();
      this.afterHide()
   }
},afterHide:function()
{
   this.proxy.hide();
   if (this.monitorResize || this.modal || this.constrain || this.constrainHeader)
   {
      Ext.EventManager.removeResizeListener(this.onWindowResize, this)
   }
   if (this.modal)
   {
      this.mask.hide();
      Ext.getBody().removeClass("x-body-masked")
   }
   if (this.keyMap)
   {
      this.keyMap.disable()
   }
   this.fireEvent("hide", this)
},animHide:function()
{
   this.proxy.setOpacity(0.5);
   this.proxy.show();
   var B = this.getBox(false);
   this.proxy.setBox(B);
   this.el.hide();
   var A = this.animateTarget.getBox();
   A.callback = this.afterHide;
   A.scope = this;
   A.duration = 0.25;
   A.easing = "easeNone";
   A.block = true;
   A.opacity = 0;
   this.proxy.shift(A)
},onWindowResize:function()
{
   if (this.maximized)
   {
      this.fitContainer()
   }
   if (this.modal)
   {
      this.mask.setSize("100%", "100%");
      var A = this.mask.dom.offsetHeight;
      this.mask.setSize(Ext.lib.Dom.getViewWidth(true), Ext.lib.Dom.getViewHeight(true))
   }
   this.doConstrain()
},doConstrain:function()
{
   if (this.constrain || this.constrainHeader)
   {
      var B;
      if (this.constrain)
      {
         B = {right:this.el.shadowOffset,left:this.el.shadowOffset,bottom:this.el.shadowOffset}
      }
      else
      {
         var A = this.getSize();
         B = {right:-(A.width - 100),bottom:-(A.height - 25)}
      }
      var C = this.el.getConstrainToXY(this.container, true, B);
      if (C)
      {
         this.setPosition(C[0], C[1])
      }
   }
},ghost:function(A)
{
   var C = this.createGhost(A);
   var B = this.getBox(true);
   C.setLeftTop(B.x, B.y);
   C.setWidth(B.width);
   this.el.hide();
   this.activeGhost = C;
   return C
},unghost:function(B, A)
{
   if (B !== false)
   {
      this.el.show();
      this.focus();
      if (Ext.isMac && Ext.isGecko)
      {
         this.cascade(this.setAutoScroll)
      }
   }
   if (A !== false)
   {
      this.setPosition(this.activeGhost.getLeft(true), this.activeGhost.getTop(true))
   }
   this.activeGhost.hide();
   this.activeGhost.remove();
   delete this.activeGhost
},minimize:function()
{
   this.fireEvent("minimize", this)
},close:function()
{
   if (this.fireEvent("beforeclose", this) !== false)
   {
      this.hide(null, function()
      {
         this.fireEvent("close", this);
         this.destroy()
      }, this)
   }
},maximize:function()
{
   if (!this.maximized)
   {
      this.expand(false);
      this.restoreSize = this.getSize();
      this.restorePos = this.getPosition(true);
      if (this.maximizable)
      {
         this.tools.maximize.hide();
         this.tools.restore.show()
      }
      this.maximized = true;
      this.el.disableShadow();
      if (this.dd)
      {
         this.dd.lock()
      }
      if (this.collapsible)
      {
         this.tools.toggle.hide()
      }
      this.el.addClass("x-window-maximized");
      this.container.addClass("x-window-maximized-ct");
      this.setPosition(0, 0);
      this.fitContainer();
      this.fireEvent("maximize", this)
   }
},restore:function()
{
   if (this.maximized)
   {
      this.el.removeClass("x-window-maximized");
      this.tools.restore.hide();
      this.tools.maximize.show();
      this.setPosition(this.restorePos[0], this.restorePos[1]);
      this.setSize(this.restoreSize.width, this.restoreSize.height);
      delete this.restorePos;
      delete this.restoreSize;
      this.maximized = false;
      this.el.enableShadow(true);
      if (this.dd)
      {
         this.dd.unlock()
      }
      if (this.collapsible)
      {
         this.tools.toggle.show()
      }
      this.container.removeClass("x-window-maximized-ct");
      this.doConstrain();
      this.fireEvent("restore", this)
   }
},toggleMaximize:function()
{
   this[this.maximized ? "restore" : "maximize"]()
},fitContainer:function()
{
   var A = this.container.getViewSize();
   this.setSize(A.width, A.height)
},setZIndex:function(A)
{
   if (this.modal)
   {
      this.mask.setStyle("z-index", A)
   }
   this.el.setZIndex(++A);
   A += 5;
   if (this.resizer)
   {
      this.resizer.proxy.setStyle("z-index", ++A)
   }
   this.lastZIndex = A
},alignTo:function(B, A, C)
{
   var D = this.el.getAlignToXY(B, A, C);
   this.setPagePosition(D[0], D[1]);
   return this
},anchorTo:function(C, G, D, B, F)
{
   var E = function()
   {
      this.alignTo(C, G, D)
   };
   Ext.EventManager.onWindowResize(E, this);
   var A = typeof B;
   if (A != "undefined")
   {
      Ext.EventManager.on(window, "scroll", E, this, {buffer:A == "number" ? B : 50})
   }
   E.call(this);
   this[F] = E;
   return this
},toFront:function()
{
   if (this.manager.bringToFront(this))
   {
      this.focus()
   }
   return this
},setActive:function(A)
{
   if (A)
   {
      if (!this.maximized)
      {
         this.el.enableShadow(true)
      }
      this.fireEvent("activate", this)
   }
   else
   {
      this.el.disableShadow();
      this.fireEvent("deactivate", this)
   }
},toBack:function()
{
   this.manager.sendToBack(this);
   return this
},center:function()
{
   var A = this.el.getAlignToXY(this.container, "c-c");
   this.setPagePosition(A[0], A[1]);
   return this
}});
Ext.reg("window", Ext.Window);
Ext.Window.DD = function(A)
{
   this.win = A;
   Ext.Window.DD.superclass.constructor.call(this, A.el.id, "WindowDD-" + A.id);
   this.setHandleElId(A.header.id);
   this.scroll = false
};
Ext.extend(Ext.Window.DD, Ext.dd.DD, {moveOnly:true,headerOffsets:[100,25],startDrag:function()
{
   var A = this.win;
   this.proxy = A.ghost();
   if (A.constrain !== false)
   {
      var C = A.el.shadowOffset;
      this.constrainTo(A.container, {right:C,left:C,bottom:C})
   }
   else
   {
      if (A.constrainHeader !== false)
      {
         var B = this.proxy.getSize();
         this.constrainTo(A.container, {right:-(B.width - this.headerOffsets[0]),bottom:-(B.height - this.headerOffsets[1])})
      }
   }
},b4Drag:Ext.emptyFn,onDrag:function(A)
{
   this.alignElWithMouse(this.proxy, A.getPageX(), A.getPageY())
},endDrag:function(A)
{
   this.win.unghost();
   this.win.saveState()
}});
Ext.WindowGroup = function()
{
   var F = {};
   var D = [];
   var E = null;
   var C = function(I, H)
   {
      return(!I._lastAccess || I._lastAccess < H._lastAccess) ? -1 : 1
   };
   var G = function()
   {
      var J = D,H = J.length;
      if (H > 0)
      {
         J.sort(C);
         var I = J[0].manager.zseed;
         for (var K = 0; K < H; K++)
         {
            var L = J[K];
            if (L && !L.hidden)
            {
               L.setZIndex(I + (K * 10))
            }
         }
      }
      A()
   };
   var B = function(H)
   {
      if (H != E)
      {
         if (E)
         {
            E.setActive(false)
         }
         E = H;
         if (H)
         {
            H.setActive(true)
         }
      }
   };
   var A = function()
   {
      for (var H = D.length - 1; H >= 0; --H)
      {
         if (!D[H].hidden)
         {
            B(D[H]);
            return
         }
      }
      B(null)
   };
   return{zseed:9000,register:function(H)
   {
      F[H.id] = H;
      D.push(H);
      H.on("hide", A)
   },unregister:function(H)
   {
      delete F[H.id];
      H.un("hide", A);
      D.remove(H)
   },get:function(H)
   {
      return typeof H == "object" ? H : F[H]
   },bringToFront:function(H)
   {
      H = this.get(H);
      if (H != E)
      {
         H._lastAccess = new Date().getTime();
         G();
         return true
      }
      return false
   },sendToBack:function(H)
   {
      H = this.get(H);
      H._lastAccess = -(new Date().getTime());
      G();
      return H
   },hideAll:function()
   {
      for (var H in F)
      {
         if (F[H] && typeof F[H] != "function" && F[H].isVisible())
         {
            F[H].hide()
         }
      }
   },getActive:function()
   {
      return E
   },getBy:function(J, I)
   {
      var K = [];
      for (var H = D.length - 1; H >= 0; --H)
      {
         var L = D[H];
         if (J.call(I || L, L) !== false)
         {
            K.push(L)
         }
      }
      return K
   },each:function(I, H)
   {
      for (var J in F)
      {
         if (F[J] && typeof F[J] != "function")
         {
            if (I.call(H || F[J], F[J]) === false)
            {
               return
            }
         }
      }
   }}
};
Ext.WindowMgr = new Ext.WindowGroup();
Ext.dd.PanelProxy = function(A, B)
{
   this.panel = A;
   this.id = this.panel.id + "-ddproxy";
   Ext.apply(this, B)
};
Ext.dd.PanelProxy.prototype = {insertProxy:true,setStatus:Ext.emptyFn,reset:Ext.emptyFn,update:Ext.emptyFn,stop:Ext.emptyFn,sync:Ext.emptyFn,getEl:function()
{
   return this.ghost
},getGhost:function()
{
   return this.ghost
},getProxy:function()
{
   return this.proxy
},hide:function()
{
   if (this.ghost)
   {
      if (this.proxy)
      {
         this.proxy.remove();
         delete this.proxy
      }
      this.panel.el.dom.style.display = "";
      this.ghost.remove();
      delete this.ghost
   }
},show:function()
{
   if (!this.ghost)
   {
      this.ghost = this.panel.createGhost(undefined, undefined, Ext.getBody());
      this.ghost.setXY(this.panel.el.getXY());
      if (this.insertProxy)
      {
         this.proxy = this.panel.el.insertSibling({cls:"x-panel-dd-spacer"});
         this.proxy.setSize(this.panel.getSize())
      }
      this.panel.el.dom.style.display = "none"
   }
},repair:function(B, C, A)
{
   this.hide();
   if (typeof C == "function")
   {
      C.call(A || this)
   }
},moveProxy:function(A, B)
{
   if (this.proxy)
   {
      A.insertBefore(this.proxy.dom, B)
   }
}};
Ext.Panel.DD = function(B, A)
{
   this.panel = B;
   this.dragData = {panel:B};
   this.proxy = new Ext.dd.PanelProxy(B, A);
   Ext.Panel.DD.superclass.constructor.call(this, B.el, A);
   var C = B.header;
   if (C)
   {
      this.setHandleElId(C.id)
   }
   (C ? C : this.panel.body).setStyle("cursor", "move");
   this.scroll = false
};
Ext.extend(Ext.Panel.DD, Ext.dd.DragSource, {showFrame:Ext.emptyFn,startDrag:Ext.emptyFn,b4StartDrag:function(A, B)
{
   this.proxy.show()
},b4MouseDown:function(B)
{
   var A = B.getPageX();
   var C = B.getPageY();
   this.autoOffset(A, C)
},onInitDrag:function(A, B)
{
   this.onStartDrag(A, B);
   return true
},createFrame:Ext.emptyFn,getDragEl:function(A)
{
   return this.proxy.ghost.dom
},endDrag:function(A)
{
   this.proxy.hide();
   this.panel.saveState()
},autoOffset:function(A, B)
{
   A -= this.startPageX;
   B -= this.startPageY;
   this.setDelta(A, B)
}});
Ext.state.Provider = function()
{
   this.addEvents("statechange");
   this.state = {};
   Ext.state.Provider.superclass.constructor.call(this)
};
Ext.extend(Ext.state.Provider, Ext.util.Observable, {get:function(B, A)
{
   return typeof this.state[B] == "undefined" ? A : this.state[B]
},clear:function(A)
{
   delete this.state[A];
   this.fireEvent("statechange", this, A, null)
},set:function(A, B)
{
   this.state[A] = B;
   this.fireEvent("statechange", this, A, B)
},decodeValue:function(A)
{
   var J = /^(a|n|d|b|s|o)\:(.*)$/;
   var C = J.exec(unescape(A));
   if (!C || !C[1])
   {
      return
   }
   var F = C[1];
   var H = C[2];
   switch (F)
      {case"n":return parseFloat(H);case"d":return new Date(Date.parse(H));case"b":return(H == "1");case"a":var G = [];var I = H.split("^");for (var B = 0,D = I.length; B < D; B++)
   {
      G.push(this.decodeValue(I[B]))
   }return G;case"o":var G = {};var I = H.split("^");for (var B = 0,D = I.length; B < D; B++)
   {
      var E = I[B].split("=");
      G[E[0]] = this.decodeValue(E[1])
   }return G;default:return H}
},encodeValue:function(C)
{
   var B;
   if (typeof C == "number")
   {
      B = "n:" + C
   }
   else
   {
      if (typeof C == "boolean")
      {
         B = "b:" + (C ? "1" : "0")
      }
      else
      {
         if (Ext.isDate(C))
         {
            B = "d:" + C.toGMTString()
         }
         else
         {
            if (Ext.isArray(C))
            {
               var F = "";
               for (var E = 0,A = C.length; E < A; E++)
               {
                  F += this.encodeValue(C[E]);
                  if (E != A - 1)
                  {
                     F += "^"
                  }
               }
               B = "a:" + F
            }
            else
            {
               if (typeof C == "object")
               {
                  var F = "";
                  for (var D in C)
                  {
                     if (typeof C[D] != "function" && C[D] !== undefined)
                     {
                        F += D + "=" + this.encodeValue(C[D]) + "^"
                     }
                  }
                  B = "o:" + F.substring(0, F.length - 1)
               }
               else
               {
                  B = "s:" + C
               }
            }
         }
      }
   }
   return escape(B)
}});
Ext.state.Manager = function()
{
   var A = new Ext.state.Provider();
   return{setProvider:function(B)
   {
      A = B
   },get:function(C, B)
   {
      return A.get(C, B)
   },set:function(B, C)
   {
      A.set(B, C)
   },clear:function(B)
   {
      A.clear(B)
   },getProvider:function()
   {
      return A
   }}
}();
Ext.state.CookieProvider = function(A)
{
   Ext.state.CookieProvider.superclass.constructor.call(this);
   this.path = "/";
   this.expires = new Date(new Date().getTime() + (1000 * 60 * 60 * 24 * 7));
   this.domain = null;
   this.secure = false;
   Ext.apply(this, A);
   this.state = this.readCookies()
};
Ext.extend(Ext.state.CookieProvider, Ext.state.Provider, {set:function(A, B)
{
   if (typeof B == "undefined" || B === null)
   {
      this.clear(A);
      return
   }
   this.setCookie(A, B);
   Ext.state.CookieProvider.superclass.set.call(this, A, B)
},clear:function(A)
{
   this.clearCookie(A);
   Ext.state.CookieProvider.superclass.clear.call(this, A)
},readCookies:function()
{
   var C = {};
   var F = document.cookie + ";";
   var B = /\s?(.*?)=(.*?);/g;
   var E;
   while ((E = B.exec(F)) != null)
   {
      var A = E[1];
      var D = E[2];
      if (A && A.substring(0, 3) == "ys-")
      {
         C[A.substr(3)] = this.decodeValue(D)
      }
   }
   return C
},setCookie:function(A, B)
{
   document.cookie = "ys-" + A + "=" + this.encodeValue(B) + ((this.expires == null) ? "" :
                                                              ("; expires=" + this.expires.toGMTString())) + (
      (this.path == null) ? "" : ("; path=" + this.path)) + ((this.domain == null) ? "" :
                                                             ("; domain=" + this.domain)) + ((this.secure == true) ?
                                                                                             "; secure" : "")
},clearCookie:function(A)
{
   document.cookie = "ys-" + A + "=null; expires=Thu, 01-Jan-70 00:00:01 GMT" + ((this.path == null) ? "" :
                                                                                 ("; path=" + this.path)) + (
      (this.domain == null) ? "" : ("; domain=" + this.domain)) + ((this.secure == true) ? "; secure" : "")
}});
Ext.DataView = Ext.extend(Ext.BoxComponent, {selectedClass:"x-view-selected",emptyText:"",deferEmptyText:true,trackOver:false,last:false,initComponent:function()
{
   Ext.DataView.superclass.initComponent.call(this);
   if (typeof this.tpl == "string")
   {
      this.tpl = new Ext.XTemplate(this.tpl)
   }
   this.addEvents("beforeclick", "click", "mouseenter", "mouseleave", "containerclick", "dblclick", "contextmenu", "selectionchange", "beforeselect");
   this.all = new Ext.CompositeElementLite();
   this.selected = new Ext.CompositeElementLite()
},onRender:function()
{
   if (!this.el)
   {
      this.el = document.createElement("div");
      this.el.id = this.id
   }
   Ext.DataView.superclass.onRender.apply(this, arguments)
},afterRender:function()
{
   Ext.DataView.superclass.afterRender.call(this);
   this.el.on({"click":this.onClick,"dblclick":this.onDblClick,"contextmenu":this.onContextMenu,scope:this});
   if (this.overClass || this.trackOver)
   {
      this.el.on({"mouseover":this.onMouseOver,"mouseout":this.onMouseOut,scope:this})
   }
   if (this.store)
   {
      this.setStore(this.store, true)
   }
},refresh:function()
{
   this.clearSelections(false, true);
   this.el.update("");
   var A = this.store.getRange();
   if (A.length < 1)
   {
      if (!this.deferEmptyText || this.hasSkippedEmptyText)
      {
         this.el.update(this.emptyText)
      }
      this.hasSkippedEmptyText = true;
      this.all.clear();
      return
   }
   this.tpl.overwrite(this.el, this.collectData(A, 0));
   this.all.fill(Ext.query(this.itemSelector, this.el.dom));
   this.updateIndexes(0)
},prepareData:function(A)
{
   return A
},collectData:function(B, E)
{
   var D = [];
   for (var C = 0,A = B.length; C < A; C++)
   {
      D[D.length] = this.prepareData(B[C].data, E + C, B[C])
   }
   return D
},bufferRender:function(A)
{
   var B = document.createElement("div");
   this.tpl.overwrite(B, this.collectData(A));
   return Ext.query(this.itemSelector, B)
},onUpdate:function(F, A)
{
   var B = this.store.indexOf(A);
   var E = this.isSelected(B);
   var C = this.all.elements[B];
   var D = this.bufferRender([A], B)[0];
   this.all.replaceElement(B, D, true);
   if (E)
   {
      this.selected.replaceElement(C, D);
      this.all.item(B).addClass(this.selectedClass)
   }
   this.updateIndexes(B, B)
},onAdd:function(E, C, D)
{
   if (this.all.getCount() == 0)
   {
      this.refresh();
      return
   }
   var B = this.bufferRender(C, D),F,A = this.all.elements;
   if (D < this.all.getCount())
   {
      F = this.all.item(D).insertSibling(B, "before", true);
      A.splice.apply(A, [D,0].concat(B))
   }
   else
   {
      F = this.all.last().insertSibling(B, "after", true);
      A.push.apply(A, B)
   }
   this.updateIndexes(D)
},onRemove:function(C, A, B)
{
   this.deselect(B);
   this.all.removeElement(B, true);
   this.updateIndexes(B)
},refreshNode:function(A)
{
   this.onUpdate(this.store, this.store.getAt(A))
},updateIndexes:function(D, C)
{
   var B = this.all.elements;
   D = D || 0;
   C = C || ((C === 0) ? 0 : (B.length - 1));
   for (var A = D; A <= C; A++)
   {
      B[A].viewIndex = A
   }
},setStore:function(A, B)
{
   if (!B && this.store)
   {
      this.store.un("beforeload", this.onBeforeLoad, this);
      this.store.un("datachanged", this.refresh, this);
      this.store.un("add", this.onAdd, this);
      this.store.un("remove", this.onRemove, this);
      this.store.un("update", this.onUpdate, this);
      this.store.un("clear", this.refresh, this)
   }
   if (A)
   {
      A = Ext.StoreMgr.lookup(A);
      A.on("beforeload", this.onBeforeLoad, this);
      A.on("datachanged", this.refresh, this);
      A.on("add", this.onAdd, this);
      A.on("remove", this.onRemove, this);
      A.on("update", this.onUpdate, this);
      A.on("clear", this.refresh, this)
   }
   this.store = A;
   if (A)
   {
      this.refresh()
   }
},findItemFromChild:function(A)
{
   return Ext.fly(A).findParent(this.itemSelector, this.el)
},onClick:function(C)
{
   var B = C.getTarget(this.itemSelector, this.el);
   if (B)
   {
      var A = this.indexOf(B);
      if (this.onItemClick(B, A, C) !== false)
      {
         this.fireEvent("click", this, A, B, C)
      }
   }
   else
   {
      if (this.fireEvent("containerclick", this, C) !== false)
      {
         this.clearSelections()
      }
   }
},onContextMenu:function(B)
{
   var A = B.getTarget(this.itemSelector, this.el);
   if (A)
   {
      this.fireEvent("contextmenu", this, this.indexOf(A), A, B)
   }
},onDblClick:function(B)
{
   var A = B.getTarget(this.itemSelector, this.el);
   if (A)
   {
      this.fireEvent("dblclick", this, this.indexOf(A), A, B)
   }
},onMouseOver:function(B)
{
   var A = B.getTarget(this.itemSelector, this.el);
   if (A && A !== this.lastItem)
   {
      this.lastItem = A;
      Ext.fly(A).addClass(this.overClass);
      this.fireEvent("mouseenter", this, this.indexOf(A), A, B)
   }
},onMouseOut:function(A)
{
   if (this.lastItem)
   {
      if (!A.within(this.lastItem, true))
      {
         Ext.fly(this.lastItem).removeClass(this.overClass);
         this.fireEvent("mouseleave", this, this.indexOf(this.lastItem), this.lastItem, A);
         delete this.lastItem
      }
   }
},onItemClick:function(B, A, C)
{
   if (this.fireEvent("beforeclick", this, A, B, C) === false)
   {
      return false
   }
   if (this.multiSelect)
   {
      this.doMultiSelection(B, A, C);
      C.preventDefault()
   }
   else
   {
      if (this.singleSelect)
      {
         this.doSingleSelection(B, A, C);
         C.preventDefault()
      }
   }
   return true
},doSingleSelection:function(B, A, C)
{
   if (C.ctrlKey && this.isSelected(A))
   {
      this.deselect(A)
   }
   else
   {
      this.select(A, false)
   }
},doMultiSelection:function(C, A, D)
{
   if (D.shiftKey && this.last !== false)
   {
      var B = this.last;
      this.selectRange(B, A, D.ctrlKey);
      this.last = B
   }
   else
   {
      if ((D.ctrlKey || this.simpleSelect) && this.isSelected(A))
      {
         this.deselect(A)
      }
      else
      {
         this.select(A, D.ctrlKey || D.shiftKey || this.simpleSelect)
      }
   }
},getSelectionCount:function()
{
   return this.selected.getCount()
},getSelectedNodes:function()
{
   return this.selected.elements
},getSelectedIndexes:function()
{
   var B = [],D = this.selected.elements;
   for (var C = 0,A = D.length; C < A; C++)
   {
      B.push(D[C].viewIndex)
   }
   return B
},getSelectedRecords:function()
{
   var D = [],C = this.selected.elements;
   for (var B = 0,A = C.length; B < A; B++)
   {
      D[D.length] = this.store.getAt(C[B].viewIndex)
   }
   return D
},getRecords:function(B)
{
   var E = [],D = B;
   for (var C = 0,A = D.length; C < A; C++)
   {
      E[E.length] = this.store.getAt(D[C].viewIndex)
   }
   return E
},getRecord:function(A)
{
   return this.store.getAt(A.viewIndex)
},clearSelections:function(A, B)
{
   if ((this.multiSelect || this.singleSelect) && this.selected.getCount() > 0)
   {
      if (!B)
      {
         this.selected.removeClass(this.selectedClass)
      }
      this.selected.clear();
      this.last = false;
      if (!A)
      {
         this.fireEvent("selectionchange", this, this.selected.elements)
      }
   }
},isSelected:function(A)
{
   return this.selected.contains(this.getNode(A))
},deselect:function(A)
{
   if (this.isSelected(A))
   {
      A = this.getNode(A);
      this.selected.removeElement(A);
      if (this.last == A.viewIndex)
      {
         this.last = false
      }
      Ext.fly(A).removeClass(this.selectedClass);
      this.fireEvent("selectionchange", this, this.selected.elements)
   }
},select:function(D, F, B)
{
   if (Ext.isArray(D))
   {
      if (!F)
      {
         this.clearSelections(true)
      }
      for (var C = 0,A = D.length; C < A; C++)
      {
         this.select(D[C], true, true)
      }
      if (!B)
      {
         this.fireEvent("selectionchange", this, this.selected.elements)
      }
   }
   else
   {
      var E = this.getNode(D);
      if (!F)
      {
         this.clearSelections(true)
      }
      if (E && !this.isSelected(E))
      {
         if (this.fireEvent("beforeselect", this, E, this.selected.elements) !== false)
         {
            Ext.fly(E).addClass(this.selectedClass);
            this.selected.add(E);
            this.last = E.viewIndex;
            if (!B)
            {
               this.fireEvent("selectionchange", this, this.selected.elements)
            }
         }
      }
   }
},selectRange:function(C, A, B)
{
   if (!B)
   {
      this.clearSelections(true)
   }
   this.select(this.getNodes(C, A), true)
},getNode:function(A)
{
   if (typeof A == "string")
   {
      return document.getElementById(A)
   }
   else
   {
      if (typeof A == "number")
      {
         return this.all.elements[A]
      }
   }
   return A
},getNodes:function(E, A)
{
   var D = this.all.elements;
   E = E || 0;
   A = typeof A == "undefined" ? Math.max(D.length - 1, 0) : A;
   var B = [],C;
   if (E <= A)
   {
      for (C = E; C <= A && D[C]; C++)
      {
         B.push(D[C])
      }
   }
   else
   {
      for (C = E; C >= A && D[C]; C--)
      {
         B.push(D[C])
      }
   }
   return B
},indexOf:function(A)
{
   A = this.getNode(A);
   if (typeof A.viewIndex == "number")
   {
      return A.viewIndex
   }
   return this.all.indexOf(A)
},onBeforeLoad:function()
{
   if (this.loadingText)
   {
      this.clearSelections(false, true);
      this.el.update("<div class=\"loading-indicator\">" + this.loadingText + "</div>");
      this.all.clear()
   }
},onDestroy:function()
{
   Ext.DataView.superclass.onDestroy.call(this);
   this.setStore(null)
}});
Ext.reg("dataview", Ext.DataView);
Ext.ColorPalette = function(A)
{
   Ext.ColorPalette.superclass.constructor.call(this, A);
   this.addEvents("select");
   if (this.handler)
   {
      this.on("select", this.handler, this.scope, true)
   }
};
Ext.extend(Ext.ColorPalette, Ext.Component, {itemCls:"x-color-palette",value:null,clickEvent:"click",ctype:"Ext.ColorPalette",allowReselect:false,colors:["000000","993300","333300","003300","003366","000080","333399","333333","800000","FF6600","808000","008000","008080","0000FF","666699","808080","FF0000","FF9900","99CC00","339966","33CCCC","3366FF","800080","969696","FF00FF","FFCC00","FFFF00","00FF00","00FFFF","00CCFF","993366","C0C0C0","FF99CC","FFCC99","FFFF99","CCFFCC","CCFFFF","99CCFF","CC99FF","FFFFFF"],onRender:function(B, A)
{
   var C = this.tpl || new Ext.XTemplate("<tpl for=\".\"><a href=\"#\" class=\"color-{.}\" hidefocus=\"on\"><em><span style=\"background:#{.}\" unselectable=\"on\">&#160;</span></em></a></tpl>");
   var D = document.createElement("div");
   D.className = this.itemCls;
   C.overwrite(D, this.colors);
   B.dom.insertBefore(D, A);
   this.el = Ext.get(D);
   this.el.on(this.clickEvent, this.handleClick, this, {delegate:"a"});
   if (this.clickEvent != "click")
   {
      this.el.on("click", Ext.emptyFn, this, {delegate:"a",preventDefault:true})
   }
},afterRender:function()
{
   Ext.ColorPalette.superclass.afterRender.call(this);
   if (this.value)
   {
      var A = this.value;
      this.value = null;
      this.select(A)
   }
},handleClick:function(B, A)
{
   B.preventDefault();
   if (!this.disabled)
   {
      var C = A.className.match(/(?:^|\s)color-(.{6})(?:\s|$)/)[1];
      this.select(C.toUpperCase())
   }
},select:function(A)
{
   A = A.replace("#", "");
   if (A != this.value || this.allowReselect)
   {
      var B = this.el;
      if (this.value)
      {
         B.child("a.color-" + this.value).removeClass("x-color-palette-sel")
      }
      B.child("a.color-" + A).addClass("x-color-palette-sel");
      this.value = A;
      this.fireEvent("select", this, A)
   }
}});
Ext.reg("colorpalette", Ext.ColorPalette);
Ext.DatePicker = Ext.extend(Ext.Component, {todayText:"Today",okText:"&#160;OK&#160;",cancelText:"Cancel",todayTip:"{0} (Spacebar)",minText:"This date is before the minimum date",maxText:"This date is after the maximum date",format:"m/d/y",disabledDaysText:"Disabled",disabledDatesText:"Disabled",constrainToViewport:true,monthNames:Date.monthNames,dayNames:Date.dayNames,nextText:"Next Month (Control+Right)",prevText:"Previous Month (Control+Left)",monthYearText:"Choose a month (Control+Up/Down to move years)",startDay:0,showToday:true,initComponent:function()
{
   Ext.DatePicker.superclass.initComponent.call(this);
   this.value = this.value ? this.value.clearTime() : new Date().clearTime();
   this.addEvents("select");
   if (this.handler)
   {
      this.on("select", this.handler, this.scope || this)
   }
   this.initDisabledDays()
},initDisabledDays:function()
{
   if (!this.disabledDatesRE && this.disabledDates)
   {
      var A = this.disabledDates;
      var C = "(?:";
      for (var B = 0; B < A.length; B++)
      {
         C += A[B];
         if (B != A.length - 1)
         {
            C += "|"
         }
      }
      this.disabledDatesRE = new RegExp(C + ")")
   }
},setDisabledDates:function(A)
{
   if (Ext.isArray(A))
   {
      this.disabledDates = A;
      this.disabledDatesRE = null
   }
   else
   {
      this.disabledDatesRE = A
   }
   this.initDisabledDays();
   this.update(this.value, true)
},setDisabledDays:function(A)
{
   this.disabledDays = A;
   this.update(this.value, true)
},setMinDate:function(A)
{
   this.minDate = A;
   this.update(this.value, true)
},setMaxDate:function(A)
{
   this.maxDate = A;
   this.update(this.value, true)
},setValue:function(B)
{
   var A = this.value;
   this.value = B.clearTime(true);
   if (this.el)
   {
      this.update(this.value)
   }
},getValue:function()
{
   return this.value
},focus:function()
{
   if (this.el)
   {
      this.update(this.activeDate)
   }
},onRender:function(A, F)
{
   var C = ["<table cellspacing=\"0\">","<tr><td class=\"x-date-left\"><a href=\"#\" title=\"",this.prevText,"\">&#160;</a></td><td class=\"x-date-middle\" align=\"center\"></td><td class=\"x-date-right\"><a href=\"#\" title=\"",this.nextText,"\">&#160;</a></td></tr>","<tr><td colspan=\"3\"><table class=\"x-date-inner\" cellspacing=\"0\"><thead><tr>"];
   var E = this.dayNames;
   for (var D = 0; D < 7; D++)
   {
      var G = this.startDay + D;
      if (G > 6)
      {
         G = G - 7
      }
      C.push("<th><span>", E[G].substr(0, 1), "</span></th>")
   }
   C[C.length] = "</tr></thead><tbody><tr>";
   for (var D = 0; D < 42; D++)
   {
      if (D % 7 == 0 && D != 0)
      {
         C[C.length] = "</tr><tr>"
      }
      C[C.length] = "<td><a href=\"#\" hidefocus=\"on\" class=\"x-date-date\" tabIndex=\"1\"><em><span></span></em></a></td>"
   }
   C.push("</tr></tbody></table></td></tr>", this.showToday ?
                                             "<tr><td colspan=\"3\" class=\"x-date-bottom\" align=\"center\"></td></tr>" :
                                             "", "</table><div class=\"x-date-mp\"></div>");
   var B = document.createElement("div");
   B.className = "x-date-picker";
   B.innerHTML = C.join("");
   A.dom.insertBefore(B, F);
   this.el = Ext.get(B);
   this.eventEl = Ext.get(B.firstChild);
   new Ext.util.ClickRepeater(this.el.child("td.x-date-left a"), {handler:this.showPrevMonth,scope:this,preventDefault:true,stopDefault:true});
   new Ext.util.ClickRepeater(this.el.child("td.x-date-right a"), {handler:this.showNextMonth,scope:this,preventDefault:true,stopDefault:true});
   this.eventEl.on("mousewheel", this.handleMouseWheel, this);
   this.monthPicker = this.el.down("div.x-date-mp");
   this.monthPicker.enableDisplayMode("block");
   var I = new Ext.KeyNav(this.eventEl, {"left":function(J)
   {
      J.ctrlKey ? this.showPrevMonth() : this.update(this.activeDate.add("d", -1))
   },"right":function(J)
   {
      J.ctrlKey ? this.showNextMonth() : this.update(this.activeDate.add("d", 1))
   },"up":function(J)
   {
      J.ctrlKey ? this.showNextYear() : this.update(this.activeDate.add("d", -7))
   },"down":function(J)
   {
      J.ctrlKey ? this.showPrevYear() : this.update(this.activeDate.add("d", 7))
   },"pageUp":function(J)
   {
      this.showNextMonth()
   },"pageDown":function(J)
   {
      this.showPrevMonth()
   },"enter":function(J)
   {
      J.stopPropagation();
      return true
   },scope:this});
   this.eventEl.on("click", this.handleDateClick, this, {delegate:"a.x-date-date"});
   this.el.unselectable();
   this.cells = this.el.select("table.x-date-inner tbody td");
   this.textNodes = this.el.query("table.x-date-inner tbody span");
   this.mbtn = new Ext.Button({text:"&#160;",tooltip:this.monthYearText,renderTo:this.el.child("td.x-date-middle", true)});
   this.mbtn.on("click", this.showMonthPicker, this);
   this.mbtn.el.child(this.mbtn.menuClassTarget).addClass("x-btn-with-menu");
   if (this.showToday)
   {
      this.todayKeyListener = this.eventEl.addKeyListener(Ext.EventObject.SPACE, this.selectToday, this);
      var H = (new Date()).dateFormat(this.format);
      this.todayBtn = new Ext.Button({renderTo:this.el.child("td.x-date-bottom", true),text:String.format(this.todayText, H),tooltip:String.format(this.todayTip, H),handler:this.selectToday,scope:this})
   }
   if (Ext.isIE)
   {
      this.el.repaint()
   }
   this.update(this.value)
},createMonthPicker:function()
{
   if (!this.monthPicker.dom.firstChild)
   {
      var A = ["<table border=\"0\" cellspacing=\"0\">"];
      for (var B = 0; B < 6; B++)
      {
         A.push("<tr><td class=\"x-date-mp-month\"><a href=\"#\">", this.monthNames[B].substr(0, 3), "</a></td>", "<td class=\"x-date-mp-month x-date-mp-sep\"><a href=\"#\">", this.monthNames[B + 6].substr(0, 3), "</a></td>",
            B == 0 ?
            "<td class=\"x-date-mp-ybtn\" align=\"center\"><a class=\"x-date-mp-prev\"></a></td><td class=\"x-date-mp-ybtn\" align=\"center\"><a class=\"x-date-mp-next\"></a></td></tr>" :
            "<td class=\"x-date-mp-year\"><a href=\"#\"></a></td><td class=\"x-date-mp-year\"><a href=\"#\"></a></td></tr>")
      }
      A.push("<tr class=\"x-date-mp-btns\"><td colspan=\"4\"><button type=\"button\" class=\"x-date-mp-ok\">", this.okText, "</button><button type=\"button\" class=\"x-date-mp-cancel\">", this.cancelText, "</button></td></tr>", "</table>");
      this.monthPicker.update(A.join(""));
      this.monthPicker.on("click", this.onMonthClick, this);
      this.monthPicker.on("dblclick", this.onMonthDblClick, this);
      this.mpMonths = this.monthPicker.select("td.x-date-mp-month");
      this.mpYears = this.monthPicker.select("td.x-date-mp-year");
      this.mpMonths.each(function(C, D, E)
      {
         E += 1;
         if ((E % 2) == 0)
         {
            C.dom.xmonth = 5 + Math.round(E * 0.5)
         }
         else
         {
            C.dom.xmonth = Math.round((E - 1) * 0.5)
         }
      })
   }
},showMonthPicker:function()
{
   this.createMonthPicker();
   var A = this.el.getSize();
   this.monthPicker.setSize(A);
   this.monthPicker.child("table").setSize(A);
   this.mpSelMonth = (this.activeDate || this.value).getMonth();
   this.updateMPMonth(this.mpSelMonth);
   this.mpSelYear = (this.activeDate || this.value).getFullYear();
   this.updateMPYear(this.mpSelYear);
   this.monthPicker.slideIn("t", {duration:0.2})
},updateMPYear:function(E)
{
   this.mpyear = E;
   var C = this.mpYears.elements;
   for (var B = 1; B <= 10; B++)
   {
      var D = C[B - 1],A;
      if ((B % 2) == 0)
      {
         A = E + Math.round(B * 0.5);
         D.firstChild.innerHTML = A;
         D.xyear = A
      }
      else
      {
         A = E - (5 - Math.round(B * 0.5));
         D.firstChild.innerHTML = A;
         D.xyear = A
      }
      this.mpYears.item(B - 1)[A == this.mpSelYear ? "addClass" : "removeClass"]("x-date-mp-sel")
   }
},updateMPMonth:function(A)
{
   this.mpMonths.each(function(B, C, D)
   {
      B[B.dom.xmonth == A ? "addClass" : "removeClass"]("x-date-mp-sel")
   })
},selectMPMonth:function(A)
{
},onMonthClick:function(D, B)
{
   D.stopEvent();
   var C = new Ext.Element(B),A;
   if (C.is("button.x-date-mp-cancel"))
   {
      this.hideMonthPicker()
   }
   else
   {
      if (C.is("button.x-date-mp-ok"))
      {
         var E = new Date(this.mpSelYear, this.mpSelMonth, (this.activeDate || this.value).getDate());
         if (E.getMonth() != this.mpSelMonth)
         {
            E = new Date(this.mpSelYear, this.mpSelMonth, 1).getLastDateOfMonth()
         }
         this.update(E);
         this.hideMonthPicker()
      }
      else
      {
         if (A = C.up("td.x-date-mp-month", 2))
         {
            this.mpMonths.removeClass("x-date-mp-sel");
            A.addClass("x-date-mp-sel");
            this.mpSelMonth = A.dom.xmonth
         }
         else
         {
            if (A = C.up("td.x-date-mp-year", 2))
            {
               this.mpYears.removeClass("x-date-mp-sel");
               A.addClass("x-date-mp-sel");
               this.mpSelYear = A.dom.xyear
            }
            else
            {
               if (C.is("a.x-date-mp-prev"))
               {
                  this.updateMPYear(this.mpyear - 10)
               }
               else
               {
                  if (C.is("a.x-date-mp-next"))
                  {
                     this.updateMPYear(this.mpyear + 10)
                  }
               }
            }
         }
      }
   }
},onMonthDblClick:function(D, B)
{
   D.stopEvent();
   var C = new Ext.Element(B),A;
   if (A = C.up("td.x-date-mp-month", 2))
   {
      this.update(new Date(this.mpSelYear, A.dom.xmonth, (this.activeDate || this.value).getDate()));
      this.hideMonthPicker()
   }
   else
   {
      if (A = C.up("td.x-date-mp-year", 2))
      {
         this.update(new Date(A.dom.xyear, this.mpSelMonth, (this.activeDate || this.value).getDate()));
         this.hideMonthPicker()
      }
   }
},hideMonthPicker:function(A)
{
   if (this.monthPicker)
   {
      if (A === true)
      {
         this.monthPicker.hide()
      }
      else
      {
         this.monthPicker.slideOut("t", {duration:0.2})
      }
   }
},showPrevMonth:function(A)
{
   this.update(this.activeDate.add("mo", -1))
},showNextMonth:function(A)
{
   this.update(this.activeDate.add("mo", 1))
},showPrevYear:function()
{
   this.update(this.activeDate.add("y", -1))
},showNextYear:function()
{
   this.update(this.activeDate.add("y", 1))
},handleMouseWheel:function(A)
{
   var B = A.getWheelDelta();
   if (B > 0)
   {
      this.showPrevMonth();
      A.stopEvent()
   }
   else
   {
      if (B < 0)
      {
         this.showNextMonth();
         A.stopEvent()
      }
   }
},handleDateClick:function(B, A)
{
   B.stopEvent();
   if (A.dateValue && !Ext.fly(A.parentNode).hasClass("x-date-disabled"))
   {
      this.setValue(new Date(A.dateValue));
      this.fireEvent("select", this, this.value)
   }
},selectToday:function()
{
   if (this.todayBtn && !this.todayBtn.disabled)
   {
      this.setValue(new Date().clearTime());
      this.fireEvent("select", this, this.value)
   }
},update:function(a, U)
{
   var A = this.activeDate;
   this.activeDate = a;
   if (!U && A && this.el)
   {
      var K = a.getTime();
      if (A.getMonth() == a.getMonth() && A.getFullYear() == a.getFullYear())
      {
         this.cells.removeClass("x-date-selected");
         this.cells.each(function(d)
         {
            if (d.dom.firstChild.dateValue == K)
            {
               d.addClass("x-date-selected");
               setTimeout(function()
               {
                  try
                  {
                     d.dom.firstChild.focus()
                  }
                  catch(f)
                  {
                  }
               }, 50);
               return false
            }
         });
         return
      }
   }
   var G = a.getDaysInMonth();
   var L = a.getFirstDateOfMonth();
   var D = L.getDay() - this.startDay;
   if (D <= this.startDay)
   {
      D += 7
   }
   var V = a.add("mo", -1);
   var E = V.getDaysInMonth() - D;
   var C = this.cells.elements;
   var M = this.textNodes;
   G += D;
   var R = 86400000;
   var X = (new Date(V.getFullYear(), V.getMonth(), E)).clearTime();
   var W = new Date().clearTime().getTime();
   var P = a.clearTime().getTime();
   var O = this.minDate ? this.minDate.clearTime() : Number.NEGATIVE_INFINITY;
   var S = this.maxDate ? this.maxDate.clearTime() : Number.POSITIVE_INFINITY;
   var Z = this.disabledDatesRE;
   var N = this.disabledDatesText;
   var c = this.disabledDays ? this.disabledDays.join("") : false;
   var Y = this.disabledDaysText;
   var T = this.format;
   if (this.showToday)
   {
      var I = new Date().clearTime();
      var B = (I < O || I > S || (Z && T && Z.test(I.dateFormat(T))) || (c && c.indexOf(I.getDay()) != -1));
      this.todayBtn.setDisabled(B);
      this.todayKeyListener[B ? "disable" : "enable"]()
   }
   var H = function(g, d)
   {
      d.title = "";
      var e = X.getTime();
      d.firstChild.dateValue = e;
      if (e == W)
      {
         d.className += " x-date-today";
         d.title = g.todayText
      }
      if (e == P)
      {
         d.className += " x-date-selected";
         setTimeout(function()
         {
            try
            {
               d.firstChild.focus()
            }
            catch(h)
            {
            }
         }, 50)
      }
      if (e < O)
      {
         d.className = " x-date-disabled";
         d.title = g.minText;
         return
      }
      if (e > S)
      {
         d.className = " x-date-disabled";
         d.title = g.maxText;
         return
      }
      if (c)
      {
         if (c.indexOf(X.getDay()) != -1)
         {
            d.title = Y;
            d.className = " x-date-disabled"
         }
      }
      if (Z && T)
      {
         var f = X.dateFormat(T);
         if (Z.test(f))
         {
            d.title = N.replace("%0", f);
            d.className = " x-date-disabled"
         }
      }
   };
   var Q = 0;
   for (; Q < D; Q++)
   {
      M[Q].innerHTML = (++E);
      X.setDate(X.getDate() + 1);
      C[Q].className = "x-date-prevday";
      H(this, C[Q])
   }
   for (; Q < G; Q++)
   {
      intDay = Q - D + 1;
      M[Q].innerHTML = (intDay);
      X.setDate(X.getDate() + 1);
      C[Q].className = "x-date-active";
      H(this, C[Q])
   }
   var b = 0;
   for (; Q < 42; Q++)
   {
      M[Q].innerHTML = (++b);
      X.setDate(X.getDate() + 1);
      C[Q].className = "x-date-nextday";
      H(this, C[Q])
   }
   this.mbtn.setText(this.monthNames[a.getMonth()] + " " + a.getFullYear());
   if (!this.internalRender)
   {
      var F = this.el.dom.firstChild;
      var J = F.offsetWidth;
      this.el.setWidth(J + this.el.getBorderWidth("lr"));
      Ext.fly(F).setWidth(J);
      this.internalRender = true;
      if (Ext.isOpera && !this.secondPass)
      {
         F.rows[0].cells[1].style.width = (J - (F.rows[0].cells[0].offsetWidth + F.rows[0].cells[2].offsetWidth)) + "px";
         this.secondPass = true;
         this.update.defer(10, this, [a])
      }
   }
},beforeDestroy:function()
{
   if (this.rendered)
   {
      Ext.destroy(this.mbtn, this.todayBtn)
   }
}});
Ext.reg("datepicker", Ext.DatePicker);
Ext.TabPanel = Ext.extend(Ext.Panel, {monitorResize:true,deferredRender:true,tabWidth:120,minTabWidth:30,resizeTabs:false,enableTabScroll:false,scrollIncrement:0,scrollRepeatInterval:400,scrollDuration:0.35,animScroll:true,tabPosition:"top",baseCls:"x-tab-panel",autoTabs:false,autoTabSelector:"div.x-tab",activeTab:null,tabMargin:2,plain:false,wheelIncrement:20,idDelimiter:"__",itemCls:"x-tab-item",elements:"body",headerAsText:false,frame:false,hideBorders:true,initComponent:function()
{
   this.frame = false;
   Ext.TabPanel.superclass.initComponent.call(this);
   this.addEvents("beforetabchange", "tabchange", "contextmenu");
   this.setLayout(new Ext.layout.CardLayout({deferredRender:this.deferredRender}));
   if (this.tabPosition == "top")
   {
      this.elements += ",header";
      this.stripTarget = "header"
   }
   else
   {
      this.elements += ",footer";
      this.stripTarget = "footer"
   }
   if (!this.stack)
   {
      this.stack = Ext.TabPanel.AccessStack()
   }
   this.initItems()
},render:function()
{
   Ext.TabPanel.superclass.render.apply(this, arguments);
   if (this.activeTab !== undefined)
   {
      var A = this.activeTab;
      delete this.activeTab;
      this.setActiveTab(A)
   }
},onRender:function(C, A)
{
   Ext.TabPanel.superclass.onRender.call(this, C, A);
   if (this.plain)
   {
      var F = this.tabPosition == "top" ? "header" : "footer";
      this[F].addClass("x-tab-panel-" + F + "-plain")
   }
   var B = this[this.stripTarget];
   this.stripWrap = B.createChild({cls:"x-tab-strip-wrap",cn:{tag:"ul",cls:"x-tab-strip x-tab-strip-" + this.tabPosition}});
   var E = (this.tabPosition == "bottom" ? this.stripWrap : null);
   this.stripSpacer = B.createChild({cls:"x-tab-strip-spacer"}, E);
   this.strip = new Ext.Element(this.stripWrap.dom.firstChild);
   this.edge = this.strip.createChild({tag:"li",cls:"x-tab-edge"});
   this.strip.createChild({cls:"x-clear"});
   this.body.addClass("x-tab-panel-body-" + this.tabPosition);
   if (!this.itemTpl)
   {
      var D = new Ext.Template("<li class=\"{cls}\" id=\"{id}\"><a class=\"x-tab-strip-close\" onclick=\"return false;\"></a>", "<a class=\"x-tab-right\" href=\"#\" onclick=\"return false;\"><em class=\"x-tab-left\">", "<span class=\"x-tab-strip-inner\"><span class=\"x-tab-strip-text {iconCls}\">{text}</span></span>", "</em></a></li>");
      D.disableFormats = true;
      D.compile();
      Ext.TabPanel.prototype.itemTpl = D
   }
   this.items.each(this.initTab, this)
},afterRender:function()
{
   Ext.TabPanel.superclass.afterRender.call(this);
   if (this.autoTabs)
   {
      this.readTabs(false)
   }
},initEvents:function()
{
   Ext.TabPanel.superclass.initEvents.call(this);
   this.on("add", this.onAdd, this);
   this.on("remove", this.onRemove, this);
   this.strip.on("mousedown", this.onStripMouseDown, this);
   this.strip.on("contextmenu", this.onStripContextMenu, this);
   if (this.enableTabScroll)
   {
      this.strip.on("mousewheel", this.onWheel, this)
   }
},findTargets:function(C)
{
   var B = null;
   var A = C.getTarget("li", this.strip);
   if (A)
   {
      B = this.getComponent(A.id.split(this.idDelimiter)[1]);
      if (B.disabled)
      {
         return{close:null,item:null,el:null}
      }
   }
   return{close:C.getTarget(".x-tab-strip-close", this.strip),item:B,el:A}
},onStripMouseDown:function(B)
{
   if (B.button != 0)
   {
      return
   }
   B.preventDefault();
   var A = this.findTargets(B);
   if (A.close)
   {
      this.remove(A.item);
      return
   }
   if (A.item && A.item != this.activeTab)
   {
      this.setActiveTab(A.item)
   }
},onStripContextMenu:function(B)
{
   B.preventDefault();
   var A = this.findTargets(B);
   if (A.item)
   {
      this.fireEvent("contextmenu", this, A.item, B)
   }
},readTabs:function(D)
{
   if (D === true)
   {
      this.items.each(function(G)
      {
         this.remove(G)
      }, this)
   }
   var C = this.el.query(this.autoTabSelector);
   for (var B = 0,A = C.length; B < A; B++)
   {
      var E = C[B];
      var F = E.getAttribute("title");
      E.removeAttribute("title");
      this.add({title:F,el:E})
   }
},initTab:function(D, B)
{
   var E = this.strip.dom.childNodes[B];
   var A = D.closable ? "x-tab-strip-closable" : "";
   if (D.disabled)
   {
      A += " x-item-disabled"
   }
   if (D.iconCls)
   {
      A += " x-tab-with-icon"
   }
   if (D.tabCls)
   {
      A += " " + D.tabCls
   }
   var F = {id:this.id + this.idDelimiter + D.getItemId(),text:D.title,cls:A,iconCls:D.iconCls || ""};
   var C = E ? this.itemTpl.insertBefore(E, F) : this.itemTpl.append(this.strip, F);
   Ext.fly(C).addClassOnOver("x-tab-strip-over");
   if (D.tabTip)
   {
      Ext.fly(C).child("span.x-tab-strip-text", true).qtip = D.tabTip
   }
   D.on("disable", this.onItemDisabled, this);
   D.on("enable", this.onItemEnabled, this);
   D.on("titlechange", this.onItemTitleChanged, this);
   D.on("beforeshow", this.onBeforeShowItem, this)
},onAdd:function(C, B, A)
{
   this.initTab(B, A);
   if (this.items.getCount() == 1)
   {
      this.syncSize()
   }
   this.delegateUpdates()
},onBeforeAdd:function(B)
{
   var A = B.events ? (this.items.containsKey(B.getItemId()) ? B : null) : this.items.get(B);
   if (A)
   {
      this.setActiveTab(B);
      return false
   }
   Ext.TabPanel.superclass.onBeforeAdd.apply(this, arguments);
   var C = B.elements;
   B.elements = C ? C.replace(",header", "") : C;
   B.border = (B.border === true)
},onRemove:function(C, B)
{
   Ext.removeNode(this.getTabEl(B));
   this.stack.remove(B);
   B.un("disable", this.onItemDisabled, this);
   B.un("enable", this.onItemEnabled, this);
   B.un("titlechange", this.onItemTitleChanged, this);
   B.un("beforeshow", this.onBeforeShowItem, this);
   if (B == this.activeTab)
   {
      var A = this.stack.next();
      if (A)
      {
         this.setActiveTab(A)
      }
      else
      {
         this.setActiveTab(0)
      }
   }
   this.delegateUpdates()
},onBeforeShowItem:function(A)
{
   if (A != this.activeTab)
   {
      this.setActiveTab(A);
      return false
   }
},onItemDisabled:function(B)
{
   var A = this.getTabEl(B);
   if (A)
   {
      Ext.fly(A).addClass("x-item-disabled")
   }
   this.stack.remove(B)
},onItemEnabled:function(B)
{
   var A = this.getTabEl(B);
   if (A)
   {
      Ext.fly(A).removeClass("x-item-disabled")
   }
},onItemTitleChanged:function(B)
{
   var A = this.getTabEl(B);
   if (A)
   {
      Ext.fly(A).child("span.x-tab-strip-text", true).innerHTML = B.title
   }
},getTabEl:function(A)
{
   var B = (typeof A === "number") ? this.items.items[A].getItemId() : A.getItemId();
   return document.getElementById(this.id + this.idDelimiter + B)
},onResize:function()
{
   Ext.TabPanel.superclass.onResize.apply(this, arguments);
   this.delegateUpdates()
},beginUpdate:function()
{
   this.suspendUpdates = true
},endUpdate:function()
{
   this.suspendUpdates = false;
   this.delegateUpdates()
},hideTabStripItem:function(B)
{
   B = this.getComponent(B);
   var A = this.getTabEl(B);
   if (A)
   {
      A.style.display = "none";
      this.delegateUpdates()
   }
   this.stack.remove(B)
},unhideTabStripItem:function(B)
{
   B = this.getComponent(B);
   var A = this.getTabEl(B);
   if (A)
   {
      A.style.display = "";
      this.delegateUpdates()
   }
},delegateUpdates:function()
{
   if (this.suspendUpdates)
   {
      return
   }
   if (this.resizeTabs && this.rendered)
   {
      this.autoSizeTabs()
   }
   if (this.enableTabScroll && this.rendered)
   {
      this.autoScrollTabs()
   }
},autoSizeTabs:function()
{
   var G = this.items.length;
   var B = this.tabPosition != "bottom" ? "header" : "footer";
   var C = this[B].dom.offsetWidth;
   var A = this[B].dom.clientWidth;
   if (!this.resizeTabs || G < 1 || !A)
   {
      return
   }
   var I = Math.max(Math.min(Math.floor((A - 4) / G) - this.tabMargin, this.tabWidth), this.minTabWidth);
   this.lastTabWidth = I;
   var K = this.stripWrap.dom.getElementsByTagName("li");
   for (var E = 0,H = K.length - 1; E < H; E++)
   {
      var J = K[E];
      var L = J.childNodes[1].firstChild.firstChild;
      var F = J.offsetWidth;
      var D = L.offsetWidth;
      L.style.width = (I - (F - D)) + "px"
   }
},adjustBodyWidth:function(A)
{
   if (this.header)
   {
      this.header.setWidth(A)
   }
   if (this.footer)
   {
      this.footer.setWidth(A)
   }
   return A
},setActiveTab:function(C)
{
   C = this.getComponent(C);
   if (!C || this.fireEvent("beforetabchange", this, C, this.activeTab) === false)
   {
      return
   }
   if (!this.rendered)
   {
      this.activeTab = C;
      return
   }
   if (this.activeTab != C)
   {
      if (this.activeTab)
      {
         var A = this.getTabEl(this.activeTab);
         if (A)
         {
            Ext.fly(A).removeClass("x-tab-strip-active")
         }
         this.activeTab.fireEvent("deactivate", this.activeTab)
      }
      var B = this.getTabEl(C);
      Ext.fly(B).addClass("x-tab-strip-active");
      this.activeTab = C;
      this.stack.add(C);
      this.layout.setActiveItem(C);
      if (this.layoutOnTabChange && C.doLayout)
      {
         C.doLayout()
      }
      if (this.scrolling)
      {
         this.scrollToTab(C, this.animScroll)
      }
      C.fireEvent("activate", C);
      this.fireEvent("tabchange", this, C)
   }
},getActiveTab:function()
{
   return this.activeTab || null
},getItem:function(A)
{
   return this.getComponent(A)
},autoScrollTabs:function()
{
   var G = this.items.length;
   var D = this.header.dom.offsetWidth;
   var C = this.header.dom.clientWidth;
   var F = this.stripWrap;
   var E = F.dom;
   var B = E.offsetWidth;
   var H = this.getScrollPos();
   var A = this.edge.getOffsetsTo(this.stripWrap)[0] + H;
   if (!this.enableTabScroll || G < 1 || B < 20)
   {
      return
   }
   if (A <= C)
   {
      E.scrollLeft = 0;
      F.setWidth(C);
      if (this.scrolling)
      {
         this.scrolling = false;
         this.header.removeClass("x-tab-scrolling");
         this.scrollLeft.hide();
         this.scrollRight.hide();
         if (Ext.isAir)
         {
            E.style.marginLeft = "";
            E.style.marginRight = ""
         }
      }
   }
   else
   {
      if (!this.scrolling)
      {
         this.header.addClass("x-tab-scrolling");
         if (Ext.isAir)
         {
            E.style.marginLeft = "18px";
            E.style.marginRight = "18px"
         }
      }
      C -= F.getMargins("lr");
      F.setWidth(C > 20 ? C : 20);
      if (!this.scrolling)
      {
         if (!this.scrollLeft)
         {
            this.createScrollers()
         }
         else
         {
            this.scrollLeft.show();
            this.scrollRight.show()
         }
      }
      this.scrolling = true;
      if (H > (A - C))
      {
         E.scrollLeft = A - C
      }
      else
      {
         this.scrollToTab(this.activeTab, false)
      }
      this.updateScrollButtons()
   }
},createScrollers:function()
{
   var C = this.stripWrap.dom.offsetHeight;
   var A = this.header.insertFirst({cls:"x-tab-scroller-left"});
   A.setHeight(C);
   A.addClassOnOver("x-tab-scroller-left-over");
   this.leftRepeater = new Ext.util.ClickRepeater(A, {interval:this.scrollRepeatInterval,handler:this.onScrollLeft,scope:this});
   this.scrollLeft = A;
   var B = this.header.insertFirst({cls:"x-tab-scroller-right"});
   B.setHeight(C);
   B.addClassOnOver("x-tab-scroller-right-over");
   this.rightRepeater = new Ext.util.ClickRepeater(B, {interval:this.scrollRepeatInterval,handler:this.onScrollRight,scope:this});
   this.scrollRight = B
},getScrollWidth:function()
{
   return this.edge.getOffsetsTo(this.stripWrap)[0] + this.getScrollPos()
},getScrollPos:function()
{
   return parseInt(this.stripWrap.dom.scrollLeft, 10) || 0
},getScrollArea:function()
{
   return parseInt(this.stripWrap.dom.clientWidth, 10) || 0
},getScrollAnim:function()
{
   return{duration:this.scrollDuration,callback:this.updateScrollButtons,scope:this}
},getScrollIncrement:function()
{
   return this.scrollIncrement || (this.resizeTabs ? this.lastTabWidth + 2 : 100)
},scrollToTab:function(E, A)
{
   if (!E)
   {
      return
   }
   var C = this.getTabEl(E);
   var G = this.getScrollPos(),D = this.getScrollArea();
   var F = Ext.fly(C).getOffsetsTo(this.stripWrap)[0] + G;
   var B = F + C.offsetWidth;
   if (F < G)
   {
      this.scrollTo(F, A)
   }
   else
   {
      if (B > (G + D))
      {
         this.scrollTo(B - D, A)
      }
   }
},scrollTo:function(B, A)
{
   this.stripWrap.scrollTo("left", B, A ? this.getScrollAnim() : false);
   if (!A)
   {
      this.updateScrollButtons()
   }
},onWheel:function(D)
{
   var E = D.getWheelDelta() * this.wheelIncrement * -1;
   D.stopEvent();
   var F = this.getScrollPos();
   var C = F + E;
   var A = this.getScrollWidth() - this.getScrollArea();
   var B = Math.max(0, Math.min(A, C));
   if (B != F)
   {
      this.scrollTo(B, false)
   }
},onScrollRight:function()
{
   var A = this.getScrollWidth() - this.getScrollArea();
   var C = this.getScrollPos();
   var B = Math.min(A, C + this.getScrollIncrement());
   if (B != C)
   {
      this.scrollTo(B, this.animScroll)
   }
},onScrollLeft:function()
{
   var B = this.getScrollPos();
   var A = Math.max(0, B - this.getScrollIncrement());
   if (A != B)
   {
      this.scrollTo(A, this.animScroll)
   }
},updateScrollButtons:function()
{
   var A = this.getScrollPos();
   this.scrollLeft[A == 0 ? "addClass" : "removeClass"]("x-tab-scroller-left-disabled");
   this.scrollRight[A >= (this.getScrollWidth() - this.getScrollArea()) ? "addClass" :
                    "removeClass"]("x-tab-scroller-right-disabled")
}});
Ext.reg("tabpanel", Ext.TabPanel);
Ext.TabPanel.prototype.activate = Ext.TabPanel.prototype.setActiveTab;
Ext.TabPanel.AccessStack = function()
{
   var A = [];
   return{add:function(B)
   {
      A.push(B);
      if (A.length > 10)
      {
         A.shift()
      }
   },remove:function(E)
   {
      var D = [];
      for (var C = 0,B = A.length; C < B; C++)
      {
         if (A[C] != E)
         {
            D.push(A[C])
         }
      }
      A = D
   },next:function()
   {
      return A.pop()
   }}
};
Ext.Button = Ext.extend(Ext.Component, {hidden:false,disabled:false,pressed:false,enableToggle:false,menuAlign:"tl-bl?",type:"button",menuClassTarget:"tr",clickEvent:"click",handleMouseEvents:true,tooltipType:"qtip",buttonSelector:"button:first",initComponent:function()
{
   Ext.Button.superclass.initComponent.call(this);
   this.addEvents("click", "toggle", "mouseover", "mouseout", "menushow", "menuhide", "menutriggerover", "menutriggerout");
   if (this.menu)
   {
      this.menu = Ext.menu.MenuMgr.get(this.menu)
   }
   if (typeof this.toggleGroup === "string")
   {
      this.enableToggle = true
   }
},onRender:function(C, A)
{
   if (!this.template)
   {
      if (!Ext.Button.buttonTemplate)
      {
         Ext.Button.buttonTemplate = new Ext.Template("<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" class=\"x-btn-wrap\"><tbody><tr>", "<td class=\"x-btn-left\"><i>&#160;</i></td><td class=\"x-btn-center\"><em unselectable=\"on\"><button class=\"x-btn-text\" type=\"{1}\">{0}</button></em></td><td class=\"x-btn-right\"><i>&#160;</i></td>", "</tr></tbody></table>")
      }
      this.template = Ext.Button.buttonTemplate
   }
   var B,E = [this.text || "&#160;",this.type];
   if (A)
   {
      B = this.template.insertBefore(A, E, true)
   }
   else
   {
      B = this.template.append(C, E, true)
   }
   var D = B.child(this.buttonSelector);
   D.on("focus", this.onFocus, this);
   D.on("blur", this.onBlur, this);
   this.initButtonEl(B, D);
   if (this.menu)
   {
      this.el.child(this.menuClassTarget).addClass("x-btn-with-menu")
   }
   Ext.ButtonToggleMgr.register(this)
},initButtonEl:function(B, C)
{
   this.el = B;
   B.addClass("x-btn");
   if (this.icon)
   {
      C.setStyle("background-image", "url(" + this.icon + ")")
   }
   if (this.iconCls)
   {
      C.addClass(this.iconCls);
      if (!this.cls)
      {
         B.addClass(this.text ? "x-btn-text-icon" : "x-btn-icon")
      }
   }
   if (this.tabIndex !== undefined)
   {
      C.dom.tabIndex = this.tabIndex
   }
   if (this.tooltip)
   {
      if (typeof this.tooltip == "object")
      {
         Ext.QuickTips.register(Ext.apply({target:C.id}, this.tooltip))
      }
      else
      {
         C.dom[this.tooltipType] = this.tooltip
      }
   }
   if (this.pressed)
   {
      this.el.addClass("x-btn-pressed")
   }
   if (this.handleMouseEvents)
   {
      B.on("mouseover", this.onMouseOver, this);
      B.on("mousedown", this.onMouseDown, this)
   }
   if (this.menu)
   {
      this.menu.on("show", this.onMenuShow, this);
      this.menu.on("hide", this.onMenuHide, this)
   }
   if (this.id)
   {
      this.el.dom.id = this.el.id = this.id
   }
   if (this.repeat)
   {
      var A = new Ext.util.ClickRepeater(B, typeof this.repeat == "object" ? this.repeat : {});
      A.on("click", this.onClick, this)
   }
   B.on(this.clickEvent, this.onClick, this)
},afterRender:function()
{
   Ext.Button.superclass.afterRender.call(this);
   if (Ext.isIE6)
   {
      this.autoWidth.defer(1, this)
   }
   else
   {
      this.autoWidth()
   }
},setIconClass:function(A)
{
   if (this.el)
   {
      this.el.child(this.buttonSelector).replaceClass(this.iconCls, A)
   }
   this.iconCls = A
},beforeDestroy:function()
{
   if (this.rendered)
   {
      var A = this.el.child(this.buttonSelector);
      if (A)
      {
         A.removeAllListeners()
      }
   }
   if (this.menu)
   {
      Ext.destroy(this.menu)
   }
},onDestroy:function()
{
   if (this.rendered)
   {
      Ext.ButtonToggleMgr.unregister(this)
   }
},autoWidth:function()
{
   if (this.el)
   {
      this.el.setWidth("auto");
      if (Ext.isIE7 && Ext.isStrict)
      {
         var A = this.el.child(this.buttonSelector);
         if (A && A.getWidth() > 20)
         {
            A.clip();
            A.setWidth(Ext.util.TextMetrics.measure(A, this.text).width + A.getFrameWidth("lr"))
         }
      }
      if (this.minWidth)
      {
         if (this.el.getWidth() < this.minWidth)
         {
            this.el.setWidth(this.minWidth)
         }
      }
   }
},setHandler:function(B, A)
{
   this.handler = B;
   this.scope = A
},setText:function(A)
{
   this.text = A;
   if (this.el)
   {
      this.el.child("td.x-btn-center " + this.buttonSelector).update(A)
   }
   this.autoWidth()
},getText:function()
{
   return this.text
},toggle:function(A)
{
   A = A === undefined ? !this.pressed : A;
   if (A != this.pressed)
   {
      if (A)
      {
         this.el.addClass("x-btn-pressed");
         this.pressed = true;
         this.fireEvent("toggle", this, true)
      }
      else
      {
         this.el.removeClass("x-btn-pressed");
         this.pressed = false;
         this.fireEvent("toggle", this, false)
      }
      if (this.toggleHandler)
      {
         this.toggleHandler.call(this.scope || this, this, A)
      }
   }
},focus:function()
{
   this.el.child(this.buttonSelector).focus()
},onDisable:function()
{
   if (this.el)
   {
      if (!Ext.isIE6 || !this.text)
      {
         this.el.addClass(this.disabledClass)
      }
      this.el.dom.disabled = true
   }
   this.disabled = true
},onEnable:function()
{
   if (this.el)
   {
      if (!Ext.isIE6 || !this.text)
      {
         this.el.removeClass(this.disabledClass)
      }
      this.el.dom.disabled = false
   }
   this.disabled = false
},showMenu:function()
{
   if (this.menu)
   {
      this.menu.show(this.el, this.menuAlign)
   }
   return this
},hideMenu:function()
{
   if (this.menu)
   {
      this.menu.hide()
   }
   return this
},hasVisibleMenu:function()
{
   return this.menu && this.menu.isVisible()
},onClick:function(A)
{
   if (A)
   {
      A.preventDefault()
   }
   if (A.button != 0)
   {
      return
   }
   if (!this.disabled)
   {
      if (this.enableToggle && (this.allowDepress !== false || !this.pressed))
      {
         this.toggle()
      }
      if (this.menu && !this.menu.isVisible() && !this.ignoreNextClick)
      {
         this.showMenu()
      }
      this.fireEvent("click", this, A);
      if (this.handler)
      {
         this.handler.call(this.scope || this, this, A)
      }
   }
},isMenuTriggerOver:function(B, A)
{
   return this.menu && !A
},isMenuTriggerOut:function(B, A)
{
   return this.menu && !A
},onMouseOver:function(B)
{
   if (!this.disabled)
   {
      var A = B.within(this.el, true);
      if (!A)
      {
         this.el.addClass("x-btn-over");
         if (!this.monitoringMouseOver)
         {
            Ext.getDoc().on("mouseover", this.monitorMouseOver, this);
            this.monitoringMouseOver = true
         }
         this.fireEvent("mouseover", this, B)
      }
      if (this.isMenuTriggerOver(B, A))
      {
         this.fireEvent("menutriggerover", this, this.menu, B)
      }
   }
},monitorMouseOver:function(A)
{
   if (A.target != this.el.dom && !A.within(this.el))
   {
      if (this.monitoringMouseOver)
      {
         Ext.getDoc().un("mouseover", this.monitorMouseOver, this);
         this.monitoringMouseOver = false
      }
      this.onMouseOut(A)
   }
},onMouseOut:function(B)
{
   var A = B.within(this.el) && B.target != this.el.dom;
   this.el.removeClass("x-btn-over");
   this.fireEvent("mouseout", this, B);
   if (this.isMenuTriggerOut(B, A))
   {
      this.fireEvent("menutriggerout", this, this.menu, B)
   }
},onFocus:function(A)
{
   if (!this.disabled)
   {
      this.el.addClass("x-btn-focus")
   }
},onBlur:function(A)
{
   this.el.removeClass("x-btn-focus")
},getClickEl:function(B, A)
{
   return this.el
},onMouseDown:function(A)
{
   if (!this.disabled && A.button == 0)
   {
      this.getClickEl(A).addClass("x-btn-click");
      Ext.getDoc().on("mouseup", this.onMouseUp, this)
   }
},onMouseUp:function(A)
{
   if (A.button == 0)
   {
      this.getClickEl(A, true).removeClass("x-btn-click");
      Ext.getDoc().un("mouseup", this.onMouseUp, this)
   }
},onMenuShow:function(A)
{
   this.ignoreNextClick = 0;
   this.el.addClass("x-btn-menu-active");
   this.fireEvent("menushow", this, this.menu)
},onMenuHide:function(A)
{
   this.el.removeClass("x-btn-menu-active");
   this.ignoreNextClick = this.restoreClick.defer(250, this);
   this.fireEvent("menuhide", this, this.menu)
},restoreClick:function()
{
   this.ignoreNextClick = 0
}});
Ext.reg("button", Ext.Button);
Ext.ButtonToggleMgr = function()
{
   var A = {};
   function B(E, G)
   {
      if (G)
      {
         var F = A[E.toggleGroup];
         for (var D = 0,C = F.length; D < C; D++)
         {
            if (F[D] != E)
            {
               F[D].toggle(false)
            }
         }
      }
   }
   return{register:function(C)
   {
      if (!C.toggleGroup)
      {
         return
      }
      var D = A[C.toggleGroup];
      if (!D)
      {
         D = A[C.toggleGroup] = []
      }
      D.push(C);
      C.on("toggle", B)
   },unregister:function(C)
   {
      if (!C.toggleGroup)
      {
         return
      }
      var D = A[C.toggleGroup];
      if (D)
      {
         D.remove(C);
         C.un("toggle", B)
      }
   }}
}();
Ext.SplitButton = Ext.extend(Ext.Button, {arrowSelector:"button:last",initComponent:function()
{
   Ext.SplitButton.superclass.initComponent.call(this);
   this.addEvents("arrowclick")
},onRender:function(D, A)
{
   var B = new Ext.Template("<table cellspacing=\"0\" class=\"x-btn-menu-wrap x-btn\"><tr><td>", "<table cellspacing=\"0\" class=\"x-btn-wrap x-btn-menu-text-wrap\"><tbody>", "<tr><td class=\"x-btn-left\"><i>&#160;</i></td><td class=\"x-btn-center\"><button class=\"x-btn-text\" type=\"{1}\">{0}</button></td></tr>", "</tbody></table></td><td>", "<table cellspacing=\"0\" class=\"x-btn-wrap x-btn-menu-arrow-wrap\"><tbody>", "<tr><td class=\"x-btn-center\"><button class=\"x-btn-menu-arrow-el\" type=\"button\">&#160;</button></td><td class=\"x-btn-right\"><i>&#160;</i></td></tr>", "</tbody></table></td></tr></table>");
   var C,F = [this.text || "&#160;",this.type];
   if (A)
   {
      C = B.insertBefore(A, F, true)
   }
   else
   {
      C = B.append(D, F, true)
   }
   var E = C.child(this.buttonSelector);
   this.initButtonEl(C, E);
   this.arrowBtnTable = C.child("table:last");
   if (this.arrowTooltip)
   {
      C.child(this.arrowSelector).dom[this.tooltipType] = this.arrowTooltip
   }
},autoWidth:function()
{
   if (this.el)
   {
      var C = this.el.child("table:first");
      var B = this.el.child("table:last");
      this.el.setWidth("auto");
      C.setWidth("auto");
      if (Ext.isIE7 && Ext.isStrict)
      {
         var A = this.el.child(this.buttonSelector);
         if (A && A.getWidth() > 20)
         {
            A.clip();
            A.setWidth(Ext.util.TextMetrics.measure(A, this.text).width + A.getFrameWidth("lr"))
         }
      }
      if (this.minWidth)
      {
         if ((C.getWidth() + B.getWidth()) < this.minWidth)
         {
            C.setWidth(this.minWidth - B.getWidth())
         }
      }
      this.el.setWidth(C.getWidth() + B.getWidth())
   }
},setArrowHandler:function(B, A)
{
   this.arrowHandler = B;
   this.scope = A
},onClick:function(A)
{
   A.preventDefault();
   if (!this.disabled)
   {
      if (A.getTarget(".x-btn-menu-arrow-wrap"))
      {
         if (this.menu && !this.menu.isVisible() && !this.ignoreNextClick)
         {
            this.showMenu()
         }
         this.fireEvent("arrowclick", this, A);
         if (this.arrowHandler)
         {
            this.arrowHandler.call(this.scope || this, this, A)
         }
      }
      else
      {
         if (this.enableToggle)
         {
            this.toggle()
         }
         this.fireEvent("click", this, A);
         if (this.handler)
         {
            this.handler.call(this.scope || this, this, A)
         }
      }
   }
},getClickEl:function(B, A)
{
   if (!A)
   {
      return(this.lastClickEl = B.getTarget("table", 10, true))
   }
   return this.lastClickEl
},onDisable:function()
{
   if (this.el)
   {
      if (!Ext.isIE6)
      {
         this.el.addClass("x-item-disabled")
      }
      this.el.child(this.buttonSelector).dom.disabled = true;
      this.el.child(this.arrowSelector).dom.disabled = true
   }
   this.disabled = true
},onEnable:function()
{
   if (this.el)
   {
      if (!Ext.isIE6)
      {
         this.el.removeClass("x-item-disabled")
      }
      this.el.child(this.buttonSelector).dom.disabled = false;
      this.el.child(this.arrowSelector).dom.disabled = false
   }
   this.disabled = false
},isMenuTriggerOver:function(A)
{
   return this.menu && A.within(this.arrowBtnTable) && !A.within(this.arrowBtnTable, true)
},isMenuTriggerOut:function(B, A)
{
   return this.menu && !B.within(this.arrowBtnTable)
},onDestroy:function()
{
   Ext.destroy(this.arrowBtnTable);
   Ext.SplitButton.superclass.onDestroy.call(this)
}});
Ext.MenuButton = Ext.SplitButton;
Ext.reg("splitbutton", Ext.SplitButton);
Ext.CycleButton = Ext.extend(Ext.SplitButton, {getItemText:function(A)
{
   if (A && this.showText === true)
   {
      var B = "";
      if (this.prependText)
      {
         B += this.prependText
      }
      B += A.text;
      return B
   }
   return undefined
},setActiveItem:function(C, A)
{
   if (typeof C != "object")
   {
      C = this.menu.items.get(C)
   }
   if (C)
   {
      if (!this.rendered)
      {
         this.text = this.getItemText(C);
         this.iconCls = C.iconCls
      }
      else
      {
         var B = this.getItemText(C);
         if (B)
         {
            this.setText(B)
         }
         this.setIconClass(C.iconCls)
      }
      this.activeItem = C;
      if (!C.checked)
      {
         C.setChecked(true, true)
      }
      if (this.forceIcon)
      {
         this.setIconClass(this.forceIcon)
      }
      if (!A)
      {
         this.fireEvent("change", this, C)
      }
   }
},getActiveItem:function()
{
   return this.activeItem
},initComponent:function()
{
   this.addEvents("change");
   if (this.changeHandler)
   {
      this.on("change", this.changeHandler, this.scope || this);
      delete this.changeHandler
   }
   this.itemCount = this.items.length;
   this.menu = {cls:"x-cycle-menu",items:[]};
   var D;
   for (var B = 0,A = this.itemCount; B < A; B++)
   {
      var C = this.items[B];
      C.group = C.group || this.id;
      C.itemIndex = B;
      C.checkHandler = this.checkHandler;
      C.scope = this;
      C.checked = C.checked || false;
      this.menu.items.push(C);
      if (C.checked)
      {
         D = C
      }
   }
   this.setActiveItem(D, true);
   Ext.CycleButton.superclass.initComponent.call(this);
   this.on("click", this.toggleSelected, this)
},checkHandler:function(A, B)
{
   if (B)
   {
      this.setActiveItem(A)
   }
},toggleSelected:function()
{
   this.menu.render();
   var C,A;
   for (var B = 1; B < this.itemCount; B++)
   {
      C = (this.activeItem.itemIndex + B) % this.itemCount;
      A = this.menu.items.itemAt(C);
      if (!A.disabled)
      {
         A.setChecked(true);
         break
      }
   }
}});
Ext.reg("cycle", Ext.CycleButton);
Ext.Toolbar = function(A)
{
   if (Ext.isArray(A))
   {
      A = {buttons:A}
   }
   Ext.Toolbar.superclass.constructor.call(this, A)
};
(function()
{
   var A = Ext.Toolbar;
   Ext.extend(A, Ext.BoxComponent, {trackMenus:true,initComponent:function()
   {
      A.superclass.initComponent.call(this);
      if (this.items)
      {
         this.buttons = this.items
      }
      this.items = new Ext.util.MixedCollection(false, function(B)
      {
         return B.itemId || B.id || Ext.id()
      })
   },autoCreate:{cls:"x-toolbar x-small-editor",html:"<table cellspacing=\"0\"><tr></tr></table>"},onRender:function(C, B)
   {
      this.el = C.createChild(Ext.apply({id:this.id}, this.autoCreate), B);
      this.tr = this.el.child("tr", true)
   },afterRender:function()
   {
      A.superclass.afterRender.call(this);
      if (this.buttons)
      {
         this.add.apply(this, this.buttons);
         delete this.buttons
      }
   },add:function()
   {
      var C = arguments,B = C.length;
      for (var D = 0; D < B; D++)
      {
         var E = C[D];
         if (E.isFormField)
         {
            this.addField(E)
         }
         else
         {
            if (E.render)
            {
               this.addItem(E)
            }
            else
            {
               if (typeof E == "string")
               {
                  if (E == "separator" || E == "-")
                  {
                     this.addSeparator()
                  }
                  else
                  {
                     if (E == " ")
                     {
                        this.addSpacer()
                     }
                     else
                     {
                        if (E == "->")
                        {
                           this.addFill()
                        }
                        else
                        {
                           this.addText(E)
                        }
                     }
                  }
               }
               else
               {
                  if (E.tagName)
                  {
                     this.addElement(E)
                  }
                  else
                  {
                     if (typeof E == "object")
                     {
                        if (E.xtype)
                        {
                           this.addField(Ext.ComponentMgr.create(E, "button"))
                        }
                        else
                        {
                           this.addButton(E)
                        }
                     }
                  }
               }
            }
         }
      }
   },addSeparator:function()
   {
      return this.addItem(new A.Separator())
   },addSpacer:function()
   {
      return this.addItem(new A.Spacer())
   },addFill:function()
   {
      return this.addItem(new A.Fill())
   },addElement:function(B)
   {
      return this.addItem(new A.Item(B))
   },addItem:function(B)
   {
      var C = this.nextBlock();
      this.initMenuTracking(B);
      B.render(C);
      this.items.add(B);
      return B
   },addButton:function(D)
   {
      if (Ext.isArray(D))
      {
         var F = [];
         for (var E = 0,C = D.length; E < C; E++)
         {
            F.push(this.addButton(D[E]))
         }
         return F
      }
      var B = D;
      if (!(D instanceof A.Button))
      {
         B = D.split ? new A.SplitButton(D) : new A.Button(D)
      }
      var G = this.nextBlock();
      this.initMenuTracking(B);
      B.render(G);
      this.items.add(B);
      return B
   },initMenuTracking:function(B)
   {
      if (this.trackMenus && B.menu)
      {
         B.on({"menutriggerover":this.onButtonTriggerOver,"menushow":this.onButtonMenuShow,"menuhide":this.onButtonMenuHide,scope:this})
      }
   },addText:function(B)
   {
      return this.addItem(new A.TextItem(B))
   },insertButton:function(C, F)
   {
      if (Ext.isArray(F))
      {
         var E = [];
         for (var D = 0,B = F.length; D < B; D++)
         {
            E.push(this.insertButton(C + D, F[D]))
         }
         return E
      }
      if (!(F instanceof A.Button))
      {
         F = new A.Button(F)
      }
      var G = document.createElement("td");
      this.tr.insertBefore(G, this.tr.childNodes[C]);
      this.initMenuTracking(F);
      F.render(G);
      this.items.insert(C, F);
      return F
   },addDom:function(C, B)
   {
      var E = this.nextBlock();
      Ext.DomHelper.overwrite(E, C);
      var D = new A.Item(E.firstChild);
      D.render(E);
      this.items.add(D);
      return D
   },addField:function(C)
   {
      var D = this.nextBlock();
      C.render(D);
      var B = new A.Item(D.firstChild);
      B.render(D);
      this.items.add(C);
      return B
   },nextBlock:function()
   {
      var B = document.createElement("td");
      this.tr.appendChild(B);
      return B
   },onDestroy:function()
   {
      Ext.Toolbar.superclass.onDestroy.call(this);
      if (this.rendered)
      {
         if (this.items)
         {
            Ext.destroy.apply(Ext, this.items.items)
         }
         Ext.Element.uncache(this.tr)
      }
   },onDisable:function()
   {
      this.items.each(function(B)
      {
         if (B.disable)
         {
            B.disable()
         }
      })
   },onEnable:function()
   {
      this.items.each(function(B)
      {
         if (B.enable)
         {
            B.enable()
         }
      })
   },onButtonTriggerOver:function(B)
   {
      if (this.activeMenuBtn && this.activeMenuBtn != B)
      {
         this.activeMenuBtn.hideMenu();
         B.showMenu();
         this.activeMenuBtn = B
      }
   },onButtonMenuShow:function(B)
   {
      this.activeMenuBtn = B
   },onButtonMenuHide:function(B)
   {
      delete this.activeMenuBtn
   }});
   Ext.reg("toolbar", Ext.Toolbar);
   A.Item = function(B)
   {
      this.el = Ext.getDom(B);
      this.id = Ext.id(this.el);
      this.hidden = false
   };
   A.Item.prototype = {getEl:function()
   {
      return this.el
   },render:function(B)
   {
      this.td = B;
      B.appendChild(this.el)
   },destroy:function()
   {
      if (this.td && this.td.parentNode)
      {
         this.td.parentNode.removeChild(this.td)
      }
   },show:function()
   {
      this.hidden = false;
      this.td.style.display = ""
   },hide:function()
   {
      this.hidden = true;
      this.td.style.display = "none"
   },setVisible:function(B)
   {
      if (B)
      {
         this.show()
      }
      else
      {
         this.hide()
      }
   },focus:function()
   {
      Ext.fly(this.el).focus()
   },disable:function()
   {
      Ext.fly(this.td).addClass("x-item-disabled");
      this.disabled = true;
      this.el.disabled = true
   },enable:function()
   {
      Ext.fly(this.td).removeClass("x-item-disabled");
      this.disabled = false;
      this.el.disabled = false
   }};
   Ext.reg("tbitem", A.Item);
   A.Separator = function()
   {
      var B = document.createElement("span");
      B.className = "ytb-sep";
      A.Separator.superclass.constructor.call(this, B)
   };
   Ext.extend(A.Separator, A.Item, {enable:Ext.emptyFn,disable:Ext.emptyFn,focus:Ext.emptyFn});
   Ext.reg("tbseparator", A.Separator);
   A.Spacer = function()
   {
      var B = document.createElement("div");
      B.className = "ytb-spacer";
      A.Spacer.superclass.constructor.call(this, B)
   };
   Ext.extend(A.Spacer, A.Item, {enable:Ext.emptyFn,disable:Ext.emptyFn,focus:Ext.emptyFn});
   Ext.reg("tbspacer", A.Spacer);
   A.Fill = Ext.extend(A.Spacer, {render:function(B)
   {
      B.style.width = "100%";
      A.Fill.superclass.render.call(this, B)
   }});
   Ext.reg("tbfill", A.Fill);
   A.TextItem = function(B)
   {
      var C = document.createElement("span");
      C.className = "ytb-text";
      C.innerHTML = B.text ? B.text : B;
      A.TextItem.superclass.constructor.call(this, C)
   };
   Ext.extend(A.TextItem, A.Item, {enable:Ext.emptyFn,disable:Ext.emptyFn,focus:Ext.emptyFn});
   Ext.reg("tbtext", A.TextItem);
   A.Button = Ext.extend(Ext.Button, {hideParent:true,onDestroy:function()
   {
      A.Button.superclass.onDestroy.call(this);
      if (this.container)
      {
         this.container.remove()
      }
   }});
   Ext.reg("tbbutton", A.Button);
   A.SplitButton = Ext.extend(Ext.SplitButton, {hideParent:true,onDestroy:function()
   {
      A.SplitButton.superclass.onDestroy.call(this);
      if (this.container)
      {
         this.container.remove()
      }
   }});
   Ext.reg("tbsplit", A.SplitButton);
   A.MenuButton = A.SplitButton
})();
Ext.PagingToolbar = Ext.extend(Ext.Toolbar, {pageSize:20,displayMsg:"Displaying {0} - {1} of {2}",emptyMsg:"No data to display",beforePageText:"Page",afterPageText:"of {0}",firstText:"First Page",prevText:"Previous Page",nextText:"Next Page",lastText:"Last Page",refreshText:"Refresh",paramNames:{start:"start",limit:"limit"},initComponent:function()
{
   this.addEvents("change", "beforechange");
   Ext.PagingToolbar.superclass.initComponent.call(this);
   this.cursor = 0;
   this.bind(this.store)
},onRender:function(B, A)
{
   Ext.PagingToolbar.superclass.onRender.call(this, B, A);
   this.first = this.addButton({tooltip:this.firstText,iconCls:"x-tbar-page-first",disabled:true,handler:this.onClick.createDelegate(this, ["first"])});
   this.prev = this.addButton({tooltip:this.prevText,iconCls:"x-tbar-page-prev",disabled:true,handler:this.onClick.createDelegate(this, ["prev"])});
   this.addSeparator();
   this.add(this.beforePageText);
   this.field = Ext.get(this.addDom({tag:"input",type:"text",size:"3",value:"1",cls:"x-tbar-page-number"}).el);
   this.field.on("keydown", this.onPagingKeydown, this);
   this.field.on("focus", function()
   {
      this.dom.select()
   });
   this.afterTextEl = this.addText(String.format(this.afterPageText, 1));
   this.field.setHeight(18);
   this.addSeparator();
   this.next = this.addButton({tooltip:this.nextText,iconCls:"x-tbar-page-next",disabled:true,handler:this.onClick.createDelegate(this, ["next"])});
   this.last = this.addButton({tooltip:this.lastText,iconCls:"x-tbar-page-last",disabled:true,handler:this.onClick.createDelegate(this, ["last"])});
   this.addSeparator();
   this.loading = this.addButton({tooltip:this.refreshText,iconCls:"x-tbar-loading",handler:this.onClick.createDelegate(this, ["refresh"])});
   if (this.displayInfo)
   {
      this.displayEl = Ext.fly(this.el.dom).createChild({cls:"x-paging-info"})
   }
   if (this.dsLoaded)
   {
      this.onLoad.apply(this, this.dsLoaded)
   }
},updateInfo:function()
{
   if (this.displayEl)
   {
      var A = this.store.getCount();
      var B = A == 0 ? this.emptyMsg :
              String.format(this.displayMsg, this.cursor + 1, this.cursor + A, this.store.getTotalCount());
      this.displayEl.update(B)
   }
},onLoad:function(A, C, F)
{
   if (!this.rendered)
   {
      this.dsLoaded = [A,C,F];
      return
   }
   this.cursor = F.params ? F.params[this.paramNames.start] : 0;
   var E = this.getPageData(),B = E.activePage,D = E.pages;
   this.afterTextEl.el.innerHTML = String.format(this.afterPageText, E.pages);
   this.field.dom.value = B;
   this.first.setDisabled(B == 1);
   this.prev.setDisabled(B == 1);
   this.next.setDisabled(B == D);
   this.last.setDisabled(B == D);
   this.loading.enable();
   this.updateInfo();
   this.fireEvent("change", this, E)
},getPageData:function()
{
   var A = this.store.getTotalCount();
   return{total:A,activePage:Math.ceil((this.cursor + this.pageSize) / this.pageSize),pages:A < this.pageSize ? 1 :
                                                                                            Math.ceil(A / this.pageSize)}
},onLoadError:function()
{
   if (!this.rendered)
   {
      return
   }
   this.loading.enable()
},readPage:function(C)
{
   var A = this.field.dom.value,B;
   if (!A || isNaN(B = parseInt(A, 10)))
   {
      this.field.dom.value = C.activePage;
      return false
   }
   return B
},onPagingKeydown:function(D)
{
   var B = D.getKey(),E = this.getPageData(),C;
   if (B == D.RETURN)
   {
      D.stopEvent();
      C = this.readPage(E);
      if (C !== false)
      {
         C = Math.min(Math.max(1, C), E.pages) - 1;
         this.doLoad(C * this.pageSize)
      }
   }
   else
   {
      if (B == D.HOME || B == D.END)
      {
         D.stopEvent();
         C = B == D.HOME ? 1 : E.pages;
         this.field.dom.value = C
      }
      else
      {
         if (B == D.UP || B == D.PAGEUP || B == D.DOWN || B == D.PAGEDOWN)
         {
            D.stopEvent();
            if (C = this.readPage(E))
            {
               var A = D.shiftKey ? 10 : 1;
               if (B == D.DOWN || B == D.PAGEDOWN)
               {
                  A *= -1
               }
               C += A;
               if (C >= 1 & C <= E.pages)
               {
                  this.field.dom.value = C
               }
            }
         }
      }
   }
},beforeLoad:function()
{
   if (this.rendered && this.loading)
   {
      this.loading.disable()
   }
},doLoad:function(C)
{
   var B = {},A = this.paramNames;
   B[A.start] = C;
   B[A.limit] = this.pageSize;
   if (this.fireEvent("beforechange", this, B) !== false)
   {
      this.store.load({params:B})
   }
},changePage:function(A)
{
   this.doLoad(((A - 1) * this.pageSize).constrain(0, this.store.getTotalCount()))
},onClick:function(E)
{
   var B = this.store;
   switch (E)
      {case"first":this.doLoad(0);break;case"prev":this.doLoad(Math.max(0, this.cursor - this.pageSize));break;case"next":this.doLoad(this.cursor + this.pageSize);break;case"last":var D = B.getTotalCount();var A = D % this.pageSize;var C =
      A ? (D - A) : D - this.pageSize;this.doLoad(C);break;case"refresh":this.doLoad(this.cursor);break}
},unbind:function(A)
{
   A = Ext.StoreMgr.lookup(A);
   A.un("beforeload", this.beforeLoad, this);
   A.un("load", this.onLoad, this);
   A.un("loadexception", this.onLoadError, this);
   this.store = undefined
},bind:function(A)
{
   A = Ext.StoreMgr.lookup(A);
   A.on("beforeload", this.beforeLoad, this);
   A.on("load", this.onLoad, this);
   A.on("loadexception", this.onLoadError, this);
   this.store = A
}});
Ext.reg("paging", Ext.PagingToolbar);
Ext.Resizable = function(D, E)
{
   this.el = Ext.get(D);
   if (E && E.wrap)
   {
      E.resizeChild = this.el;
      this.el = this.el.wrap(typeof E.wrap == "object" ? E.wrap : {cls:"xresizable-wrap"});
      this.el.id = this.el.dom.id = E.resizeChild.id + "-rzwrap";
      this.el.setStyle("overflow", "hidden");
      this.el.setPositioning(E.resizeChild.getPositioning());
      E.resizeChild.clearPositioning();
      if (!E.width || !E.height)
      {
         var F = E.resizeChild.getSize();
         this.el.setSize(F.width, F.height)
      }
      if (E.pinned && !E.adjustments)
      {
         E.adjustments = "auto"
      }
   }
   this.proxy = this.el.createProxy({tag:"div",cls:"x-resizable-proxy",id:this.el.id + "-rzproxy"}, Ext.getBody());
   this.proxy.unselectable();
   this.proxy.enableDisplayMode("block");
   Ext.apply(this, E);
   if (this.pinned)
   {
      this.disableTrackOver = true;
      this.el.addClass("x-resizable-pinned")
   }
   var I = this.el.getStyle("position");
   if (I != "absolute" && I != "fixed")
   {
      this.el.setStyle("position", "relative")
   }
   if (!this.handles)
   {
      this.handles = "s,e,se";
      if (this.multiDirectional)
      {
         this.handles += ",n,w"
      }
   }
   if (this.handles == "all")
   {
      this.handles = "n s e w ne nw se sw"
   }
   var M = this.handles.split(/\s*?[,;]\s*?| /);
   var C = Ext.Resizable.positions;
   for (var H = 0,J = M.length; H < J; H++)
   {
      if (M[H] && C[M[H]])
      {
         var L = C[M[H]];
         this[L] = new Ext.Resizable.Handle(this, L, this.disableTrackOver, this.transparent)
      }
   }
   this.corner = this.southeast;
   if (this.handles.indexOf("n") != -1 || this.handles.indexOf("w") != -1)
   {
      this.updateBox = true
   }
   this.activeHandle = null;
   if (this.resizeChild)
   {
      if (typeof this.resizeChild == "boolean")
      {
         this.resizeChild = Ext.get(this.el.dom.firstChild, true)
      }
      else
      {
         this.resizeChild = Ext.get(this.resizeChild, true)
      }
   }
   if (this.adjustments == "auto")
   {
      var B = this.resizeChild;
      var K = this.west,G = this.east,A = this.north,M = this.south;
      if (B && (K || A))
      {
         B.position("relative");
         B.setLeft(K ? K.el.getWidth() : 0);
         B.setTop(A ? A.el.getHeight() : 0)
      }
      this.adjustments = [(G ? -G.el.getWidth() : 0) + (K ? -K.el.getWidth() : 0),(A ? -A.el.getHeight() : 0) + (M ?
                                                                                                                 -M.el.getHeight() :
                                                                                                                 0) - 1]
   }
   if (this.draggable)
   {
      this.dd = this.dynamic ? this.el.initDD(null) : this.el.initDDProxy(null, {dragElId:this.proxy.id});
      this.dd.setHandleElId(this.resizeChild ? this.resizeChild.id : this.el.id)
   }
   this.addEvents("beforeresize", "resize");
   if (this.width !== null && this.height !== null)
   {
      this.resizeTo(this.width, this.height)
   }
   else
   {
      this.updateChildSize()
   }
   if (Ext.isIE)
   {
      this.el.dom.style.zoom = 1
   }
   Ext.Resizable.superclass.constructor.call(this)
};
Ext.extend(Ext.Resizable, Ext.util.Observable, {resizeChild:false,adjustments:[0,0],minWidth:5,minHeight:5,maxWidth:10000,maxHeight:10000,enabled:true,animate:false,duration:0.35,dynamic:false,handles:false,multiDirectional:false,disableTrackOver:false,easing:"easeOutStrong",widthIncrement:0,heightIncrement:0,pinned:false,width:null,height:null,preserveRatio:false,transparent:false,minX:0,minY:0,draggable:false,resizeTo:function(B, A)
{
   this.el.setSize(B, A);
   this.updateChildSize();
   this.fireEvent("resize", this, B, A, null)
},startSizing:function(C, B)
{
   this.fireEvent("beforeresize", this, C);
   if (this.enabled)
   {
      if (!this.overlay)
      {
         this.overlay = this.el.createProxy({tag:"div",cls:"x-resizable-overlay",html:"&#160;"}, Ext.getBody());
         this.overlay.unselectable();
         this.overlay.enableDisplayMode("block");
         this.overlay.on("mousemove", this.onMouseMove, this);
         this.overlay.on("mouseup", this.onMouseUp, this)
      }
      this.overlay.setStyle("cursor", B.el.getStyle("cursor"));
      this.resizing = true;
      this.startBox = this.el.getBox();
      this.startPoint = C.getXY();
      this.offsets = [(this.startBox.x + this.startBox.width) - this.startPoint[0],(this.startBox.y + this.startBox.height) - this.startPoint[1]];
      this.overlay.setSize(Ext.lib.Dom.getViewWidth(true), Ext.lib.Dom.getViewHeight(true));
      this.overlay.show();
      if (this.constrainTo)
      {
         var A = Ext.get(this.constrainTo);
         this.resizeRegion = A.getRegion().adjust(A.getFrameWidth("t"), A.getFrameWidth("l"), -A.getFrameWidth("b"), -A.getFrameWidth("r"))
      }
      this.proxy.setStyle("visibility", "hidden");
      this.proxy.show();
      this.proxy.setBox(this.startBox);
      if (!this.dynamic)
      {
         this.proxy.setStyle("visibility", "visible")
      }
   }
},onMouseDown:function(A, B)
{
   if (this.enabled)
   {
      B.stopEvent();
      this.activeHandle = A;
      this.startSizing(B, A)
   }
},onMouseUp:function(B)
{
   var A = this.resizeElement();
   this.resizing = false;
   this.handleOut();
   this.overlay.hide();
   this.proxy.hide();
   this.fireEvent("resize", this, A.width, A.height, B)
},updateChildSize:function()
{
   if (this.resizeChild)
   {
      var C = this.el;
      var D = this.resizeChild;
      var B = this.adjustments;
      if (C.dom.offsetWidth)
      {
         var A = C.getSize(true);
         D.setSize(A.width + B[0], A.height + B[1])
      }
      if (Ext.isIE)
      {
         setTimeout(function()
         {
            if (C.dom.offsetWidth)
            {
               var E = C.getSize(true);
               D.setSize(E.width + B[0], E.height + B[1])
            }
         }, 10)
      }
   }
},snap:function(C, E, B)
{
   if (!E || !C)
   {
      return C
   }
   var D = C;
   var A = C % E;
   if (A > 0)
   {
      if (A > (E / 2))
      {
         D = C + (E - A)
      }
      else
      {
         D = C - A
      }
   }
   return Math.max(B, D)
},resizeElement:function()
{
   var A = this.proxy.getBox();
   if (this.updateBox)
   {
      this.el.setBox(A, false, this.animate, this.duration, null, this.easing)
   }
   else
   {
      this.el.setSize(A.width, A.height, this.animate, this.duration, null, this.easing)
   }
   this.updateChildSize();
   if (!this.dynamic)
   {
      this.proxy.hide()
   }
   return A
},constrain:function(B, C, A, D)
{
   if (B - C < A)
   {
      C = B - A
   }
   else
   {
      if (B - C > D)
      {
         C = D - B
      }
   }
   return C
},onMouseMove:function(S)
{
   if (this.enabled)
   {
      try
      {
         if (this.resizeRegion && !this.resizeRegion.contains(S.getPoint()))
         {
            return
         }
         var Q = this.curSize || this.startBox;
         var I = this.startBox.x,H = this.startBox.y;
         var C = I,B = H;
         var J = Q.width,R = Q.height;
         var D = J,L = R;
         var K = this.minWidth,T = this.minHeight;
         var P = this.maxWidth,W = this.maxHeight;
         var F = this.widthIncrement;
         var A = this.heightIncrement;
         var U = S.getXY();
         var O = -(this.startPoint[0] - Math.max(this.minX, U[0]));
         var M = -(this.startPoint[1] - Math.max(this.minY, U[1]));
         var G = this.activeHandle.position;
         switch (G)
            {case"east":J += O;J = Math.min(Math.max(K, J), P);break;case"south":R += M;R = Math.min(Math.max(T, R), W);break;case"southeast":J += O;R += M;J = Math.min(Math.max(K, J), P);R = Math.min(Math.max(T, R), W);break;case"north":M = this.constrain(R, M, T, W);H += M;R -= M;break;case"west":O = this.constrain(J, O, K, P);I += O;J -= O;break;case"northeast":J += O;J = Math.min(Math.max(K, J), P);M = this.constrain(R, M, T, W);H += M;R -= M;break;case"northwest":O = this.constrain(J, O, K, P);M = this.constrain(R, M, T, W);H += M;R -= M;I += O;J -= O;break;case"southwest":O = this.constrain(J, O, K, P);R += M;R = Math.min(Math.max(T, R), W);I += O;J -= O;break}
         var N = this.snap(J, F, K);
         var V = this.snap(R, A, T);
         if (N != J || V != R)
         {
            switch (G)
               {case"northeast":H -= V - R;break;case"north":H -= V - R;break;case"southwest":I -= N - J;break;case"west":I -= N - J;break;case"northwest":I -= N - J;H -= V - R;break}
            J = N;
            R = V
         }
         if (this.preserveRatio)
         {
            switch (G)
               {case"southeast":case"east":R = L * (J / D);R = Math.min(Math.max(T, R), W);J = D * (R / L);break;case"south":J = D * (R / L);J = Math.min(Math.max(K, J), P);R = L * (J / D);break;case"northeast":J = D * (R / L);J = Math.min(Math.max(K, J), P);R = L * (J / D);break;case"north":var X = J;J = D * (R / L);J = Math.min(Math.max(K, J), P);R = L * (J / D);I += (X - J) / 2;break;case"southwest":R = L * (J / D);R = Math.min(Math.max(T, R), W);var X = J;J = D * (R / L);I += X - J;break;case"west":var E = R;R = L * (J / D);R = Math.min(Math.max(T, R), W);H += (E - R) / 2;var X = J;J = D * (R / L);I += X - J;break;case"northwest":var X = J;var E = R;R = L * (J / D);R = Math.min(Math.max(T, R), W);J = D * (R / L);H += E - R;I += X - J;break}
         }
         this.proxy.setBounds(I, H, J, R);
         if (this.dynamic)
         {
            this.resizeElement()
         }
      }
      catch(S)
      {
      }
   }
},handleOver:function()
{
   if (this.enabled)
   {
      this.el.addClass("x-resizable-over")
   }
},handleOut:function()
{
   if (!this.resizing)
   {
      this.el.removeClass("x-resizable-over")
   }
},getEl:function()
{
   return this.el
},getResizeChild:function()
{
   return this.resizeChild
},destroy:function(C)
{
   this.proxy.remove();
   if (this.overlay)
   {
      this.overlay.removeAllListeners();
      this.overlay.remove()
   }
   var D = Ext.Resizable.positions;
   for (var A in D)
   {
      if (typeof D[A] != "function" && this[D[A]])
      {
         var B = this[D[A]];
         B.el.removeAllListeners();
         B.el.remove()
      }
   }
   if (C)
   {
      this.el.update("");
      this.el.remove()
   }
},syncHandleHeight:function()
{
   var A = this.el.getHeight(true);
   if (this.west)
   {
      this.west.el.setHeight(A)
   }
   if (this.east)
   {
      this.east.el.setHeight(A)
   }
}});
Ext.Resizable.positions = {n:"north",s:"south",e:"east",w:"west",se:"southeast",sw:"southwest",nw:"northwest",ne:"northeast"};
Ext.Resizable.Handle = function(C, E, B, D)
{
   if (!this.tpl)
   {
      var A = Ext.DomHelper.createTemplate({tag:"div",cls:"x-resizable-handle x-resizable-handle-{0}"});
      A.compile();
      Ext.Resizable.Handle.prototype.tpl = A
   }
   this.position = E;
   this.rz = C;
   this.el = this.tpl.append(C.el.dom, [this.position], true);
   this.el.unselectable();
   if (D)
   {
      this.el.setOpacity(0)
   }
   this.el.on("mousedown", this.onMouseDown, this);
   if (!B)
   {
      this.el.on("mouseover", this.onMouseOver, this);
      this.el.on("mouseout", this.onMouseOut, this)
   }
};
Ext.Resizable.Handle.prototype = {afterResize:function(A)
{
},onMouseDown:function(A)
{
   this.rz.onMouseDown(this, A)
},onMouseOver:function(A)
{
   this.rz.handleOver(this, A)
},onMouseOut:function(A)
{
   this.rz.handleOut(this, A)
}};
Ext.Editor = function(B, A)
{
   this.field = B;
   Ext.Editor.superclass.constructor.call(this, A)
};
Ext.extend(Ext.Editor, Ext.Component, {value:"",alignment:"c-c?",shadow:"frame",constrain:false,swallowKeys:true,completeOnEnter:false,cancelOnEsc:false,updateEl:false,initComponent:function()
{
   Ext.Editor.superclass.initComponent.call(this);
   this.addEvents("beforestartedit", "startedit", "beforecomplete", "complete", "canceledit", "specialkey")
},onRender:function(B, A)
{
   this.el = new Ext.Layer({shadow:this.shadow,cls:"x-editor",parentEl:B,shim:this.shim,shadowOffset:4,id:this.id,constrain:this.constrain});
   this.el.setStyle("overflow", Ext.isGecko ? "auto" : "hidden");
   if (this.field.msgTarget != "title")
   {
      this.field.msgTarget = "qtip"
   }
   this.field.inEditor = true;
   this.field.render(this.el);
   if (Ext.isGecko)
   {
      this.field.el.dom.setAttribute("autocomplete", "off")
   }
   this.field.on("specialkey", this.onSpecialKey, this);
   if (this.swallowKeys)
   {
      this.field.el.swallowEvent(["keydown","keypress"])
   }
   this.field.show();
   this.field.on("blur", this.onBlur, this);
   if (this.field.grow)
   {
      this.field.on("autosize", this.el.sync, this.el, {delay:1})
   }
},onSpecialKey:function(C, B)
{
   var A = B.getKey();
   if (this.completeOnEnter && A == B.ENTER)
   {
      B.stopEvent();
      this.completeEdit()
   }
   else
   {
      if (this.cancelOnEsc && A == B.ESC)
      {
         this.cancelEdit()
      }
      else
      {
         this.fireEvent("specialkey", C, B)
      }
   }
   if (this.field.triggerBlur && (A == B.ENTER || A == B.ESC || A == B.TAB))
   {
      this.field.triggerBlur()
   }
},startEdit:function(B, C)
{
   if (this.editing)
   {
      this.completeEdit()
   }
   this.boundEl = Ext.get(B);
   var A = C !== undefined ? C : this.boundEl.dom.innerHTML;
   if (!this.rendered)
   {
      this.render(this.parentEl || document.body)
   }
   if (this.fireEvent("beforestartedit", this, this.boundEl, A) === false)
   {
      return
   }
   this.startValue = A;
   this.field.setValue(A);
   this.doAutoSize();
   this.el.alignTo(this.boundEl, this.alignment);
   this.editing = true;
   this.show()
},doAutoSize:function()
{
   if (this.autoSize)
   {
      var A = this.boundEl.getSize();
      switch (this.autoSize)
         {case"width":this.setSize(A.width, "");break;case"height":this.setSize("", A.height);break;default:this.setSize(A.width, A.height)}
   }
},setSize:function(A, B)
{
   delete this.field.lastSize;
   this.field.setSize(A, B);
   if (this.el)
   {
      if (Ext.isGecko2 || Ext.isOpera)
      {
         this.el.setSize(A, B)
      }
      this.el.sync()
   }
},realign:function()
{
   this.el.alignTo(this.boundEl, this.alignment)
},completeEdit:function(A)
{
   if (!this.editing)
   {
      return
   }
   var B = this.getValue();
   if (this.revertInvalid !== false && !this.field.isValid())
   {
      B = this.startValue;
      this.cancelEdit(true)
   }
   if (String(B) === String(this.startValue) && this.ignoreNoChange)
   {
      this.editing = false;
      this.hide();
      return
   }
   if (this.fireEvent("beforecomplete", this, B, this.startValue) !== false)
   {
      this.editing = false;
      if (this.updateEl && this.boundEl)
      {
         this.boundEl.update(B)
      }
      if (A !== true)
      {
         this.hide()
      }
      this.fireEvent("complete", this, B, this.startValue)
   }
},onShow:function()
{
   this.el.show();
   if (this.hideEl !== false)
   {
      this.boundEl.hide()
   }
   this.field.show();
   if (Ext.isIE && !this.fixIEFocus)
   {
      this.fixIEFocus = true;
      this.deferredFocus.defer(50, this)
   }
   else
   {
      this.field.focus()
   }
   this.fireEvent("startedit", this.boundEl, this.startValue)
},deferredFocus:function()
{
   if (this.editing)
   {
      this.field.focus()
   }
},cancelEdit:function(A)
{
   if (this.editing)
   {
      var B = this.getValue();
      this.setValue(this.startValue);
      if (A !== true)
      {
         this.hide()
      }
      this.fireEvent("canceledit", this, B, this.startValue)
   }
},onBlur:function()
{
   if (this.allowBlur !== true && this.editing)
   {
      this.completeEdit()
   }
},onHide:function()
{
   if (this.editing)
   {
      this.completeEdit();
      return
   }
   this.field.blur();
   if (this.field.collapse)
   {
      this.field.collapse()
   }
   this.el.hide();
   if (this.hideEl !== false)
   {
      this.boundEl.show()
   }
},setValue:function(A)
{
   this.field.setValue(A)
},getValue:function()
{
   return this.field.getValue()
},beforeDestroy:function()
{
   this.field.destroy();
   this.field = null
}});
Ext.reg("editor", Ext.Editor);
Ext.MessageBox = function()
{
   var R,B,N,Q;
   var G,J,P,A,K,M,H,F;
   var O,S,L,C = "";
   var D = function(U)
   {
      if (R.isVisible())
      {
         R.hide();
         Ext.callback(B.fn, B.scope || window, [U,S.dom.value], 1)
      }
   };
   var T = function()
   {
      if (B && B.cls)
      {
         R.el.removeClass(B.cls)
      }
      K.reset()
   };
   var E = function(W, U, V)
   {
      if (B && B.closable !== false)
      {
         R.hide()
      }
      if (V)
      {
         V.stopEvent()
      }
   };
   var I = function(U)
   {
      var W = 0;
      if (!U)
      {
         O["ok"].hide();
         O["cancel"].hide();
         O["yes"].hide();
         O["no"].hide();
         return W
      }
      R.footer.dom.style.display = "";
      for (var V in O)
      {
         if (typeof O[V] != "function")
         {
            if (U[V])
            {
               O[V].show();
               O[V].setText(typeof U[V] == "string" ? U[V] : Ext.MessageBox.buttonText[V]);
               W += O[V].el.getWidth() + 15
            }
            else
            {
               O[V].hide()
            }
         }
      }
      return W
   };
   return{getDialog:function(U)
   {
      if (!R)
      {
         R = new Ext.Window({autoCreate:true,title:U,resizable:false,constrain:true,constrainHeader:true,minimizable:false,maximizable:false,stateful:false,modal:true,shim:true,buttonAlign:"center",width:400,height:100,minHeight:80,plain:true,footer:true,closable:true,close:function()
         {
            if (B && B.buttons && B.buttons.no && !B.buttons.cancel)
            {
               D("no")
            }
            else
            {
               D("cancel")
            }
         }});
         O = {};
         var V = this.buttonText;
         O["ok"] = R.addButton(V["ok"], D.createCallback("ok"));
         O["yes"] = R.addButton(V["yes"], D.createCallback("yes"));
         O["no"] = R.addButton(V["no"], D.createCallback("no"));
         O["cancel"] = R.addButton(V["cancel"], D.createCallback("cancel"));
         O["ok"].hideMode = O["yes"].hideMode = O["no"].hideMode = O["cancel"].hideMode = "offsets";
         R.render(document.body);
         R.getEl().addClass("x-window-dlg");
         N = R.mask;
         G = R.body.createChild({html:"<div class=\"ext-mb-icon\"></div><div class=\"ext-mb-content\"><span class=\"ext-mb-text\"></span><br /><div class=\"ext-mb-fix-cursor\"><input type=\"text\" class=\"ext-mb-input\" /><textarea class=\"ext-mb-textarea\"></textarea></div></div>"});
         H = Ext.get(G.dom.firstChild);
         var W = G.dom.childNodes[1];
         J = Ext.get(W.firstChild);
         P = Ext.get(W.childNodes[2].firstChild);
         P.enableDisplayMode();
         P.addKeyListener([10,13], function()
         {
            if (R.isVisible() && B && B.buttons)
            {
               if (B.buttons.ok)
               {
                  D("ok")
               }
               else
               {
                  if (B.buttons.yes)
                  {
                     D("yes")
                  }
               }
            }
         });
         A = Ext.get(W.childNodes[2].childNodes[1]);
         A.enableDisplayMode();
         K = new Ext.ProgressBar({renderTo:G});
         G.createChild({cls:"x-clear"})
      }
      return R
   },updateText:function(X)
   {
      if (!R.isVisible() && !B.width)
      {
         R.setSize(this.maxWidth, 100)
      }
      J.update(X || "&#160;");
      var V = C != "" ? (H.getWidth() + H.getMargins("lr")) : 0;
      var Z = J.getWidth() + J.getMargins("lr");
      var W = R.getFrameWidth("lr");
      var Y = R.body.getFrameWidth("lr");
      if (Ext.isIE && V > 0)
      {
         V += 3
      }
      var U = Math.max(Math.min(B.width || V + Z + W + Y, this.maxWidth), Math.max(B.minWidth || this.minWidth, L || 0));
      if (B.prompt === true)
      {
         S.setWidth(U - V - W - Y)
      }
      if (B.progress === true || B.wait === true)
      {
         K.setSize(U - V - W - Y)
      }
      R.setSize(U, "auto").center();
      return this
   },updateProgress:function(V, U, W)
   {
      K.updateProgress(V, U);
      if (W)
      {
         this.updateText(W)
      }
      return this
   },isVisible:function()
   {
      return R && R.isVisible()
   },hide:function()
   {
      if (this.isVisible())
      {
         R.hide();
         T()
      }
      return this
   },show:function(X)
   {
      if (this.isVisible())
      {
         this.hide()
      }
      B = X;
      var Y = this.getDialog(B.title || "&#160;");
      Y.setTitle(B.title || "&#160;");
      var U = (B.closable !== false && B.progress !== true && B.wait !== true);
      Y.tools.close.setDisplayed(U);
      S = P;
      B.prompt = B.prompt || (B.multiline ? true : false);
      if (B.prompt)
      {
         if (B.multiline)
         {
            P.hide();
            A.show();
            A.setHeight(typeof B.multiline == "number" ? B.multiline : this.defaultTextHeight);
            S = A
         }
         else
         {
            P.show();
            A.hide()
         }
      }
      else
      {
         P.hide();
         A.hide()
      }
      S.dom.value = B.value || "";
      if (B.prompt)
      {
         Y.focusEl = S
      }
      else
      {
         var W = B.buttons;
         var V = null;
         if (W && W.ok)
         {
            V = O["ok"]
         }
         else
         {
            if (W && W.yes)
            {
               V = O["yes"]
            }
         }
         if (V)
         {
            Y.focusEl = V
         }
      }
      if (B.iconCls)
      {
         Y.setIconClass(B.iconCls)
      }
      this.setIcon(B.icon);
      L = I(B.buttons);
      K.setVisible(B.progress === true || B.wait === true);
      this.updateProgress(0, B.progressText);
      this.updateText(B.msg);
      if (B.cls)
      {
         Y.el.addClass(B.cls)
      }
      Y.proxyDrag = B.proxyDrag === true;
      Y.modal = B.modal !== false;
      Y.mask = B.modal !== false ? N : false;
      if (!Y.isVisible())
      {
         document.body.appendChild(R.el.dom);
         Y.setAnimateTarget(B.animEl);
         Y.show(B.animEl)
      }
      Y.on("show", function()
      {
         if (U === true)
         {
            Y.keyMap.enable()
         }
         else
         {
            Y.keyMap.disable()
         }
      }, this, {single:true});
      if (B.wait === true)
      {
         K.wait(B.waitConfig)
      }
      return this
   },setIcon:function(U)
   {
      if (U && U != "")
      {
         H.removeClass("x-hidden");
         H.replaceClass(C, U);
         C = U
      }
      else
      {
         H.replaceClass(C, "x-hidden");
         C = ""
      }
      return this
   },progress:function(W, V, U)
   {
      this.show({title:W,msg:V,buttons:false,progress:true,closable:false,minWidth:this.minProgressWidth,progressText:U});
      return this
   },wait:function(W, V, U)
   {
      this.show({title:V,msg:W,buttons:false,closable:false,wait:true,modal:true,minWidth:this.minProgressWidth,waitConfig:U});
      return this
   },alert:function(X, W, V, U)
   {
      this.show({title:X,msg:W,buttons:this.OK,fn:V,scope:U});
      return this
   },confirm:function(X, W, V, U)
   {
      this.show({title:X,msg:W,buttons:this.YESNO,fn:V,scope:U,icon:this.QUESTION});
      return this
   },prompt:function(Z, Y, W, V, U, X)
   {
      this.show({title:Z,msg:Y,buttons:this.OKCANCEL,fn:W,minWidth:250,scope:V,prompt:true,multiline:U,value:X});
      return this
   },OK:{ok:true},CANCEL:{cancel:true},OKCANCEL:{ok:true,cancel:true},YESNO:{yes:true,no:true},YESNOCANCEL:{yes:true,no:true,cancel:true},INFO:"ext-mb-info",WARNING:"ext-mb-warning",QUESTION:"ext-mb-question",ERROR:"ext-mb-error",defaultTextHeight:75,maxWidth:600,minWidth:100,minProgressWidth:250,buttonText:{ok:"OK",cancel:"Cancel",yes:"Yes",no:"No"}}
}();
Ext.Msg = Ext.MessageBox;
Ext.Tip = Ext.extend(Ext.Panel, {minWidth:40,maxWidth:300,shadow:"sides",defaultAlign:"tl-bl?",autoRender:true,quickShowInterval:250,frame:true,hidden:true,baseCls:"x-tip",floating:{shadow:true,shim:true,useDisplay:true,constrain:false},autoHeight:true,initComponent:function()
{
   Ext.Tip.superclass.initComponent.call(this);
   if (this.closable && !this.title)
   {
      this.elements += ",header"
   }
},afterRender:function()
{
   Ext.Tip.superclass.afterRender.call(this);
   if (this.closable)
   {
      this.addTool({id:"close",handler:this.hide,scope:this})
   }
},showAt:function(A)
{
   Ext.Tip.superclass.show.call(this);
   if (this.measureWidth !== false && (!this.initialConfig || typeof this.initialConfig.width != "number"))
   {
      this.doAutoWidth()
   }
   if (this.constrainPosition)
   {
      A = this.el.adjustForConstraints(A)
   }
   this.setPagePosition(A[0], A[1])
},doAutoWidth:function()
{
   var A = this.body.getTextWidth();
   if (this.title)
   {
      A = Math.max(A, this.header.child("span").getTextWidth(this.title))
   }
   A += this.getFrameWidth() + (this.closable ? 20 : 0) + this.body.getPadding("lr");
   this.setWidth(A.constrain(this.minWidth, this.maxWidth));
   if (Ext.isIE7 && !this.repainted)
   {
      this.el.repaint();
      this.repainted = true
   }
},showBy:function(A, B)
{
   if (!this.rendered)
   {
      this.render(Ext.getBody())
   }
   this.showAt(this.el.getAlignToXY(A, B || this.defaultAlign))
},initDraggable:function()
{
   this.dd = new Ext.Tip.DD(this, typeof this.draggable == "boolean" ? null : this.draggable);
   this.header.addClass("x-tip-draggable")
}});
Ext.Tip.DD = function(B, A)
{
   Ext.apply(this, A);
   this.tip = B;
   Ext.Tip.DD.superclass.constructor.call(this, B.el.id, "WindowDD-" + B.id);
   this.setHandleElId(B.header.id);
   this.scroll = false
};
Ext.extend(Ext.Tip.DD, Ext.dd.DD, {moveOnly:true,scroll:false,headerOffsets:[100,25],startDrag:function()
{
   this.tip.el.disableShadow()
},endDrag:function(A)
{
   this.tip.el.enableShadow(true)
}});
Ext.ToolTip = Ext.extend(Ext.Tip, {showDelay:500,hideDelay:200,dismissDelay:5000,mouseOffset:[15,18],trackMouse:false,constrainPosition:true,initComponent:function()
{
   Ext.ToolTip.superclass.initComponent.call(this);
   this.lastActive = new Date();
   this.initTarget()
},initTarget:function()
{
   if (this.target)
   {
      this.target = Ext.get(this.target);
      this.target.on("mouseover", this.onTargetOver, this);
      this.target.on("mouseout", this.onTargetOut, this);
      this.target.on("mousemove", this.onMouseMove, this)
   }
},onMouseMove:function(A)
{
   this.targetXY = A.getXY();
   if (!this.hidden && this.trackMouse)
   {
      this.setPagePosition(this.getTargetXY())
   }
},getTargetXY:function()
{
   return[this.targetXY[0] + this.mouseOffset[0],this.targetXY[1] + this.mouseOffset[1]]
},onTargetOver:function(A)
{
   if (this.disabled || A.within(this.target.dom, true))
   {
      return
   }
   this.clearTimer("hide");
   this.targetXY = A.getXY();
   this.delayShow()
},delayShow:function()
{
   if (this.hidden && !this.showTimer)
   {
      if (this.lastActive.getElapsed() < this.quickShowInterval)
      {
         this.show()
      }
      else
      {
         this.showTimer = this.show.defer(this.showDelay, this)
      }
   }
   else
   {
      if (!this.hidden && this.autoHide !== false)
      {
         this.show()
      }
   }
},onTargetOut:function(A)
{
   if (this.disabled || A.within(this.target.dom, true))
   {
      return
   }
   this.clearTimer("show");
   if (this.autoHide !== false)
   {
      this.delayHide()
   }
},delayHide:function()
{
   if (!this.hidden && !this.hideTimer)
   {
      this.hideTimer = this.hide.defer(this.hideDelay, this)
   }
},hide:function()
{
   this.clearTimer("dismiss");
   this.lastActive = new Date();
   Ext.ToolTip.superclass.hide.call(this)
},show:function()
{
   this.showAt(this.getTargetXY())
},showAt:function(A)
{
   this.lastActive = new Date();
   this.clearTimers();
   Ext.ToolTip.superclass.showAt.call(this, A);
   if (this.dismissDelay && this.autoHide !== false)
   {
      this.dismissTimer = this.hide.defer(this.dismissDelay, this)
   }
},clearTimer:function(A)
{
   A = A + "Timer";
   clearTimeout(this[A]);
   delete this[A]
},clearTimers:function()
{
   this.clearTimer("show");
   this.clearTimer("dismiss");
   this.clearTimer("hide")
},onShow:function()
{
   Ext.ToolTip.superclass.onShow.call(this);
   Ext.getDoc().on("mousedown", this.onDocMouseDown, this)
},onHide:function()
{
   Ext.ToolTip.superclass.onHide.call(this);
   Ext.getDoc().un("mousedown", this.onDocMouseDown, this)
},onDocMouseDown:function(A)
{
   if (this.autoHide !== false && !A.within(this.el.dom))
   {
      this.disable();
      this.enable.defer(100, this)
   }
},onDisable:function()
{
   this.clearTimers();
   this.hide()
},adjustPosition:function(A, D)
{
   var C = this.targetXY[1],B = this.getSize().height;
   if (this.constrainPosition && D <= C && (D + B) >= C)
   {
      D = C - B - 5
   }
   return{x:A,y:D}
},onDestroy:function()
{
   Ext.ToolTip.superclass.onDestroy.call(this);
   if (this.target)
   {
      this.target.un("mouseover", this.onTargetOver, this);
      this.target.un("mouseout", this.onTargetOut, this);
      this.target.un("mousemove", this.onMouseMove, this)
   }
}});
Ext.QuickTip = Ext.extend(Ext.ToolTip, {interceptTitles:false,tagConfig:{namespace:"ext",attribute:"qtip",width:"qwidth",target:"target",title:"qtitle",hide:"hide",cls:"qclass",align:"qalign"},initComponent:function()
{
   this.target = this.target || Ext.getDoc();
   this.targets = this.targets || {};
   Ext.QuickTip.superclass.initComponent.call(this)
},register:function(D)
{
   var F = Ext.isArray(D) ? D : arguments;
   for (var E = 0,A = F.length; E < A; E++)
   {
      var H = F[E];
      var G = H.target;
      if (G)
      {
         if (Ext.isArray(G))
         {
            for (var C = 0,B = G.length; C < B; C++)
            {
               this.targets[Ext.id(G[C])] = H
            }
         }
         else
         {
            this.targets[Ext.id(G)] = H
         }
      }
   }
},unregister:function(A)
{
   delete this.targets[Ext.id(A)]
},onTargetOver:function(G)
{
   if (this.disabled)
   {
      return
   }
   this.targetXY = G.getXY();
   var C = G.getTarget();
   if (!C || C.nodeType !== 1 || C == document || C == document.body)
   {
      return
   }
   if (this.activeTarget && C == this.activeTarget.el)
   {
      this.clearTimer("hide");
      this.show();
      return
   }
   if (C && this.targets[C.id])
   {
      this.activeTarget = this.targets[C.id];
      this.activeTarget.el = C;
      this.delayShow();
      return
   }
   var E,F = Ext.fly(C),B = this.tagConfig;
   var D = B.namespace;
   if (this.interceptTitles && C.title)
   {
      E = C.title;
      C.qtip = E;
      C.removeAttribute("title");
      G.preventDefault()
   }
   else
   {
      E = C.qtip || F.getAttributeNS(D, B.attribute)
   }
   if (E)
   {
      var A = F.getAttributeNS(D, B.hide);
      this.activeTarget = {el:C,text:E,width:F.getAttributeNS(D, B.width),autoHide:A != "user" && A !== "false",title:F.getAttributeNS(D, B.title),cls:F.getAttributeNS(D, B.cls),align:F.getAttributeNS(D, B.align)};
      this.delayShow()
   }
},onTargetOut:function(A)
{
   this.clearTimer("show");
   if (this.autoHide !== false)
   {
      this.delayHide()
   }
},showAt:function(B)
{
   var A = this.activeTarget;
   if (A)
   {
      if (!this.rendered)
      {
         this.render(Ext.getBody());
         this.activeTarget = A
      }
      if (A.width)
      {
         this.setWidth(A.width);
         this.body.setWidth(this.adjustBodyWidth(A.width - this.getFrameWidth()));
         this.measureWidth = false
      }
      else
      {
         this.measureWidth = true
      }
      this.setTitle(A.title || "");
      this.body.update(A.text);
      this.autoHide = A.autoHide;
      this.dismissDelay = A.dismissDelay || this.dismissDelay;
      if (this.lastCls)
      {
         this.el.removeClass(this.lastCls);
         delete this.lastCls
      }
      if (A.cls)
      {
         this.el.addClass(A.cls);
         this.lastCls = A.cls
      }
      if (A.align)
      {
         B = this.el.getAlignToXY(A.el, A.align);
         this.constrainPosition = false
      }
      else
      {
         this.constrainPosition = true
      }
   }
   Ext.QuickTip.superclass.showAt.call(this, B)
},hide:function()
{
   delete this.activeTarget;
   Ext.QuickTip.superclass.hide.call(this)
}});
Ext.QuickTips = function()
{
   var B,A = [];
   return{init:function(C)
   {
      if (!B)
      {
         if (!Ext.isReady)
         {
            Ext.onReady(function()
            {
               Ext.QuickTips.init(C)
            });
            return
         }
         B = new Ext.QuickTip({elements:"header,body"});
         if (C !== false)
         {
            B.render(Ext.getBody())
         }
      }
   },enable:function()
   {
      if (B)
      {
         A.pop();
         if (A.length < 1)
         {
            B.enable()
         }
      }
   },disable:function()
   {
      if (B)
      {
         B.disable()
      }
      A.push(1)
   },isEnabled:function()
   {
      return B !== undefined && !B.disabled
   },getQuickTip:function()
   {
      return B
   },register:function()
   {
      B.register.apply(B, arguments)
   },unregister:function()
   {
      B.unregister.apply(B, arguments)
   },tips:function()
   {
      B.register.apply(B, arguments)
   }}
}();
Ext.tree.TreePanel = Ext.extend(Ext.Panel, {rootVisible:true,animate:Ext.enableFx,lines:true,enableDD:false,hlDrop:Ext.enableFx,pathSeparator:"/",initComponent:function()
{
   Ext.tree.TreePanel.superclass.initComponent.call(this);
   if (!this.eventModel)
   {
      this.eventModel = new Ext.tree.TreeEventModel(this)
   }
   var A = this.loader;
   if (!A)
   {
      A = new Ext.tree.TreeLoader({dataUrl:this.dataUrl})
   }
   else
   {
      if (typeof A == "object" && !A.load)
      {
         A = new Ext.tree.TreeLoader(A)
      }
   }
   this.loader = A;
   this.nodeHash = {};
   if (this.root)
   {
      this.setRootNode(this.root)
   }
   this.addEvents("append", "remove", "movenode", "insert", "beforeappend", "beforeremove", "beforemovenode", "beforeinsert", "beforeload", "load", "textchange", "beforeexpandnode", "beforecollapsenode", "expandnode", "disabledchange", "collapsenode", "beforeclick", "click", "checkchange", "dblclick", "contextmenu", "beforechildrenrendered", "startdrag", "enddrag", "dragdrop", "beforenodedrop", "nodedrop", "nodedragover");
   if (this.singleExpand)
   {
      this.on("beforeexpandnode", this.restrictExpand, this)
   }
},proxyNodeEvent:function(C, B, A, G, F, E, D)
{
   if (C == "collapse" || C == "expand" || C == "beforecollapse" || C == "beforeexpand" || C == "move" || C == "beforemove")
   {
      C = C + "node"
   }
   return this.fireEvent(C, B, A, G, F, E, D)
},getRootNode:function()
{
   return this.root
},setRootNode:function(B)
{
   if (!B.render)
   {
      B = this.loader.createNode(B)
   }
   this.root = B;
   B.ownerTree = this;
   B.isRoot = true;
   this.registerNode(B);
   if (!this.rootVisible)
   {
      var A = B.attributes.uiProvider;
      B.ui = A ? new A(B) : new Ext.tree.RootTreeNodeUI(B)
   }
   return B
},getNodeById:function(A)
{
   return this.nodeHash[A]
},registerNode:function(A)
{
   this.nodeHash[A.id] = A
},unregisterNode:function(A)
{
   delete this.nodeHash[A.id]
},toString:function()
{
   return"[Tree" + (this.id ? " " + this.id : "") + "]"
},restrictExpand:function(A)
{
   var B = A.parentNode;
   if (B)
   {
      if (B.expandedChild && B.expandedChild.parentNode == B)
      {
         B.expandedChild.collapse()
      }
      B.expandedChild = A
   }
},getChecked:function(A, B)
{
   B = B || this.root;
   var C = [];
   var D = function()
   {
      if (this.attributes.checked)
      {
         C.push(!A ? this : (A == "id" ? this.id : this.attributes[A]))
      }
   };
   B.cascade(D);
   return C
},getEl:function()
{
   return this.el
},getLoader:function()
{
   return this.loader
},expandAll:function()
{
   this.root.expand(true)
},collapseAll:function()
{
   this.root.collapse(true)
},getSelectionModel:function()
{
   if (!this.selModel)
   {
      this.selModel = new Ext.tree.DefaultSelectionModel()
   }
   return this.selModel
},expandPath:function(F, A, G)
{
   A = A || "id";
   var D = F.split(this.pathSeparator);
   var C = this.root;
   if (C.attributes[A] != D[1])
   {
      if (G)
      {
         G(false, null)
      }
      return
   }
   var B = 1;
   var E = function()
   {
      if (++B == D.length)
      {
         if (G)
         {
            G(true, C)
         }
         return
      }
      var H = C.findChild(A, D[B]);
      if (!H)
      {
         if (G)
         {
            G(false, C)
         }
         return
      }
      C = H;
      H.expand(false, false, E)
   };
   C.expand(false, false, E)
},selectPath:function(E, A, F)
{
   A = A || "id";
   var C = E.split(this.pathSeparator);
   var B = C.pop();
   if (C.length > 0)
   {
      var D = function(H, G)
      {
         if (H && G)
         {
            var I = G.findChild(A, B);
            if (I)
            {
               I.select();
               if (F)
               {
                  F(true, I)
               }
            }
            else
            {
               if (F)
               {
                  F(false, I)
               }
            }
         }
         else
         {
            if (F)
            {
               F(false, I)
            }
         }
      };
      this.expandPath(C.join(this.pathSeparator), A, D)
   }
   else
   {
      this.root.select();
      if (F)
      {
         F(true, this.root)
      }
   }
},getTreeEl:function()
{
   return this.body
},onRender:function(B, A)
{
   Ext.tree.TreePanel.superclass.onRender.call(this, B, A);
   this.el.addClass("x-tree");
   this.innerCt = this.body.createChild({tag:"ul",cls:"x-tree-root-ct " + (this.useArrows ? "x-tree-arrows" :
                                                                           this.lines ? "x-tree-lines" :
                                                                           "x-tree-no-lines")})
},initEvents:function()
{
   Ext.tree.TreePanel.superclass.initEvents.call(this);
   if (this.containerScroll)
   {
      Ext.dd.ScrollManager.register(this.body)
   }
   if ((this.enableDD || this.enableDrop) && !this.dropZone)
   {
      this.dropZone = new Ext.tree.TreeDropZone(this, this.dropConfig || {ddGroup:this.ddGroup || "TreeDD",appendOnly:this.ddAppendOnly === true})
   }
   if ((this.enableDD || this.enableDrag) && !this.dragZone)
   {
      this.dragZone = new Ext.tree.TreeDragZone(this, this.dragConfig || {ddGroup:this.ddGroup || "TreeDD",scroll:this.ddScroll})
   }
   this.getSelectionModel().init(this)
},afterRender:function()
{
   Ext.tree.TreePanel.superclass.afterRender.call(this);
   this.root.render();
   if (!this.rootVisible)
   {
      this.root.renderChildren()
   }
},onDestroy:function()
{
   if (this.rendered)
   {
      this.body.removeAllListeners();
      Ext.dd.ScrollManager.unregister(this.body);
      if (this.dropZone)
      {
         this.dropZone.unreg()
      }
      if (this.dragZone)
      {
         this.dragZone.unreg()
      }
   }
   this.root.destroy();
   this.nodeHash = null;
   Ext.tree.TreePanel.superclass.onDestroy.call(this)
}});
Ext.tree.TreePanel.nodeTypes = {};
Ext.reg("treepanel", Ext.tree.TreePanel);
Ext.tree.TreeEventModel = function(A)
{
   this.tree = A;
   this.tree.on("render", this.initEvents, this)
};
Ext.tree.TreeEventModel.prototype = {initEvents:function()
{
   var A = this.tree.getTreeEl();
   A.on("click", this.delegateClick, this);
   if (this.tree.trackMouseOver !== false)
   {
      A.on("mouseover", this.delegateOver, this);
      A.on("mouseout", this.delegateOut, this)
   }
   A.on("dblclick", this.delegateDblClick, this);
   A.on("contextmenu", this.delegateContextMenu, this)
},getNode:function(B)
{
   var A;
   if (A = B.getTarget(".x-tree-node-el", 10))
   {
      var C = Ext.fly(A, "_treeEvents").getAttributeNS("ext", "tree-node-id");
      if (C)
      {
         return this.tree.getNodeById(C)
      }
   }
   return null
},getNodeTarget:function(B)
{
   var A = B.getTarget(".x-tree-node-icon", 1);
   if (!A)
   {
      A = B.getTarget(".x-tree-node-el", 6)
   }
   return A
},delegateOut:function(B, A)
{
   if (!this.beforeEvent(B))
   {
      return
   }
   if (B.getTarget(".x-tree-ec-icon", 1))
   {
      var C = this.getNode(B);
      this.onIconOut(B, C);
      if (C == this.lastEcOver)
      {
         delete this.lastEcOver
      }
   }
   if ((A = this.getNodeTarget(B)) && !B.within(A, true))
   {
      this.onNodeOut(B, this.getNode(B))
   }
},delegateOver:function(B, A)
{
   if (!this.beforeEvent(B))
   {
      return
   }
   if (this.lastEcOver)
   {
      this.onIconOut(B, this.lastEcOver);
      delete this.lastEcOver
   }
   if (B.getTarget(".x-tree-ec-icon", 1))
   {
      this.lastEcOver = this.getNode(B);
      this.onIconOver(B, this.lastEcOver)
   }
   if (A = this.getNodeTarget(B))
   {
      this.onNodeOver(B, this.getNode(B))
   }
},delegateClick:function(B, A)
{
   if (!this.beforeEvent(B))
   {
      return
   }
   if (B.getTarget("input[type=checkbox]", 1))
   {
      this.onCheckboxClick(B, this.getNode(B))
   }
   else
   {
      if (B.getTarget(".x-tree-ec-icon", 1))
      {
         this.onIconClick(B, this.getNode(B))
      }
      else
      {
         if (this.getNodeTarget(B))
         {
            this.onNodeClick(B, this.getNode(B))
         }
      }
   }
},delegateDblClick:function(B, A)
{
   if (this.beforeEvent(B) && this.getNodeTarget(B))
   {
      this.onNodeDblClick(B, this.getNode(B))
   }
},delegateContextMenu:function(B, A)
{
   if (this.beforeEvent(B) && this.getNodeTarget(B))
   {
      this.onNodeContextMenu(B, this.getNode(B))
   }
},onNodeClick:function(B, A)
{
   A.ui.onClick(B)
},onNodeOver:function(B, A)
{
   A.ui.onOver(B)
},onNodeOut:function(B, A)
{
   A.ui.onOut(B)
},onIconOver:function(B, A)
{
   A.ui.addClass("x-tree-ec-over")
},onIconOut:function(B, A)
{
   A.ui.removeClass("x-tree-ec-over")
},onIconClick:function(B, A)
{
   A.ui.ecClick(B)
},onCheckboxClick:function(B, A)
{
   A.ui.onCheckChange(B)
},onNodeDblClick:function(B, A)
{
   A.ui.onDblClick(B)
},onNodeContextMenu:function(B, A)
{
   A.ui.onContextMenu(B)
},beforeEvent:function(A)
{
   if (this.disabled)
   {
      A.stopEvent();
      return false
   }
   return true
},disable:function()
{
   this.disabled = true
},enable:function()
{
   this.disabled = false
}};
Ext.tree.DefaultSelectionModel = function(A)
{
   this.selNode = null;
   this.addEvents("selectionchange", "beforeselect");
   Ext.apply(this, A);
   Ext.tree.DefaultSelectionModel.superclass.constructor.call(this)
};
Ext.extend(Ext.tree.DefaultSelectionModel, Ext.util.Observable, {init:function(A)
{
   this.tree = A;
   A.getTreeEl().on("keydown", this.onKeyDown, this);
   A.on("click", this.onNodeClick, this)
},onNodeClick:function(A, B)
{
   this.select(A)
},select:function(B)
{
   var A = this.selNode;
   if (A != B && this.fireEvent("beforeselect", this, B, A) !== false)
   {
      if (A)
      {
         A.ui.onSelectedChange(false)
      }
      this.selNode = B;
      B.ui.onSelectedChange(true);
      this.fireEvent("selectionchange", this, B, A)
   }
   return B
},unselect:function(A)
{
   if (this.selNode == A)
   {
      this.clearSelections()
   }
},clearSelections:function()
{
   var A = this.selNode;
   if (A)
   {
      A.ui.onSelectedChange(false);
      this.selNode = null;
      this.fireEvent("selectionchange", this, null)
   }
   return A
},getSelectedNode:function()
{
   return this.selNode
},isSelected:function(A)
{
   return this.selNode == A
},selectPrevious:function()
{
   var A = this.selNode || this.lastSelNode;
   if (!A)
   {
      return null
   }
   var C = A.previousSibling;
   if (C)
   {
      if (!C.isExpanded() || C.childNodes.length < 1)
      {
         return this.select(C)
      }
      else
      {
         var B = C.lastChild;
         while (B && B.isExpanded() && B.childNodes.length > 0)
         {
            B = B.lastChild
         }
         return this.select(B)
      }
   }
   else
   {
      if (A.parentNode && (this.tree.rootVisible || !A.parentNode.isRoot))
      {
         return this.select(A.parentNode)
      }
   }
   return null
},selectNext:function()
{
   var B = this.selNode || this.lastSelNode;
   if (!B)
   {
      return null
   }
   if (B.firstChild && B.isExpanded())
   {
      return this.select(B.firstChild)
   }
   else
   {
      if (B.nextSibling)
      {
         return this.select(B.nextSibling)
      }
      else
      {
         if (B.parentNode)
         {
            var A = null;
            B.parentNode.bubble(function()
            {
               if (this.nextSibling)
               {
                  A = this.getOwnerTree().selModel.select(this.nextSibling);
                  return false
               }
            });
            return A
         }
      }
   }
   return null
},onKeyDown:function(C)
{
   var B = this.selNode || this.lastSelNode;
   var D = this;
   if (!B)
   {
      return
   }
   var A = C.getKey();
   switch (A)
      {case C.DOWN:C.stopEvent();this.selectNext();break;case C.UP:C.stopEvent();this.selectPrevious();break;case C.RIGHT:C.preventDefault();if (B.hasChildNodes())
   {
      if (!B.isExpanded())
      {
         B.expand()
      }
      else
      {
         if (B.firstChild)
         {
            this.select(B.firstChild, C)
         }
      }
   }break;case C.LEFT:C.preventDefault();if (B.hasChildNodes() && B.isExpanded())
   {
      B.collapse()
   }
   else
   {
      if (B.parentNode && (this.tree.rootVisible || B.parentNode != this.tree.getRootNode()))
      {
         this.select(B.parentNode, C)
      }
   }break}
}});
Ext.tree.MultiSelectionModel = function(A)
{
   this.selNodes = [];
   this.selMap = {};
   this.addEvents("selectionchange");
   Ext.apply(this, A);
   Ext.tree.MultiSelectionModel.superclass.constructor.call(this)
};
Ext.extend(Ext.tree.MultiSelectionModel, Ext.util.Observable, {init:function(A)
{
   this.tree = A;
   A.getTreeEl().on("keydown", this.onKeyDown, this);
   A.on("click", this.onNodeClick, this)
},onNodeClick:function(A, B)
{
   this.select(A, B, B.ctrlKey)
},select:function(A, C, B)
{
   if (B !== true)
   {
      this.clearSelections(true)
   }
   if (this.isSelected(A))
   {
      this.lastSelNode = A;
      return A
   }
   this.selNodes.push(A);
   this.selMap[A.id] = A;
   this.lastSelNode = A;
   A.ui.onSelectedChange(true);
   this.fireEvent("selectionchange", this, this.selNodes);
   return A
},unselect:function(B)
{
   if (this.selMap[B.id])
   {
      B.ui.onSelectedChange(false);
      var C = this.selNodes;
      var A = C.indexOf(B);
      if (A != -1)
      {
         this.selNodes.splice(A, 1)
      }
      delete this.selMap[B.id];
      this.fireEvent("selectionchange", this, this.selNodes)
   }
},clearSelections:function(B)
{
   var D = this.selNodes;
   if (D.length > 0)
   {
      for (var C = 0,A = D.length; C < A; C++)
      {
         D[C].ui.onSelectedChange(false)
      }
      this.selNodes = [];
      this.selMap = {};
      if (B !== true)
      {
         this.fireEvent("selectionchange", this, this.selNodes)
      }
   }
},isSelected:function(A)
{
   return this.selMap[A.id] ? true : false
},getSelectedNodes:function()
{
   return this.selNodes
},onKeyDown:Ext.tree.DefaultSelectionModel.prototype.onKeyDown,selectNext:Ext.tree.DefaultSelectionModel.prototype.selectNext,selectPrevious:Ext.tree.DefaultSelectionModel.prototype.selectPrevious});
Ext.tree.TreeNode = function(A)
{
   A = A || {};
   if (typeof A == "string")
   {
      A = {text:A}
   }
   this.childrenRendered = false;
   this.rendered = false;
   Ext.tree.TreeNode.superclass.constructor.call(this, A);
   this.expanded = A.expanded === true;
   this.isTarget = A.isTarget !== false;
   this.draggable = A.draggable !== false && A.allowDrag !== false;
   this.allowChildren = A.allowChildren !== false && A.allowDrop !== false;
   this.text = A.text;
   this.disabled = A.disabled === true;
   this.addEvents("textchange", "beforeexpand", "beforecollapse", "expand", "disabledchange", "collapse", "beforeclick", "click", "checkchange", "dblclick", "contextmenu", "beforechildrenrendered");
   var B = this.attributes.uiProvider || this.defaultUI || Ext.tree.TreeNodeUI;
   this.ui = new B(this)
};
Ext.extend(Ext.tree.TreeNode, Ext.data.Node, {preventHScroll:true,isExpanded:function()
{
   return this.expanded
},getUI:function()
{
   return this.ui
},getLoader:function()
{
   var A;
   return this.loader || ((A = this.getOwnerTree()) && A.loader ? A.loader : new Ext.tree.TreeLoader())
},setFirstChild:function(A)
{
   var B = this.firstChild;
   Ext.tree.TreeNode.superclass.setFirstChild.call(this, A);
   if (this.childrenRendered && B && A != B)
   {
      B.renderIndent(true, true)
   }
   if (this.rendered)
   {
      this.renderIndent(true, true)
   }
},setLastChild:function(B)
{
   var A = this.lastChild;
   Ext.tree.TreeNode.superclass.setLastChild.call(this, B);
   if (this.childrenRendered && A && B != A)
   {
      A.renderIndent(true, true)
   }
   if (this.rendered)
   {
      this.renderIndent(true, true)
   }
},appendChild:function(B)
{
   if (!B.render && !Ext.isArray(B))
   {
      B = this.getLoader().createNode(B)
   }
   var A = Ext.tree.TreeNode.superclass.appendChild.call(this, B);
   if (A && this.childrenRendered)
   {
      A.render()
   }
   this.ui.updateExpandIcon();
   return A
},removeChild:function(A)
{
   this.ownerTree.getSelectionModel().unselect(A);
   Ext.tree.TreeNode.superclass.removeChild.apply(this, arguments);
   if (this.childrenRendered)
   {
      A.ui.remove()
   }
   if (this.childNodes.length < 1)
   {
      this.collapse(false, false)
   }
   else
   {
      this.ui.updateExpandIcon()
   }
   if (!this.firstChild && !this.isHiddenRoot())
   {
      this.childrenRendered = false
   }
   return A
},insertBefore:function(C, A)
{
   if (!C.render)
   {
      C = this.getLoader().createNode(C)
   }
   var B = Ext.tree.TreeNode.superclass.insertBefore.apply(this, arguments);
   if (B && A && this.childrenRendered)
   {
      C.render()
   }
   this.ui.updateExpandIcon();
   return B
},setText:function(B)
{
   var A = this.text;
   this.text = B;
   this.attributes.text = B;
   if (this.rendered)
   {
      this.ui.onTextChange(this, B, A)
   }
   this.fireEvent("textchange", this, B, A)
},select:function()
{
   this.getOwnerTree().getSelectionModel().select(this)
},unselect:function()
{
   this.getOwnerTree().getSelectionModel().unselect(this)
},isSelected:function()
{
   return this.getOwnerTree().getSelectionModel().isSelected(this)
},expand:function(A, B, C)
{
   if (!this.expanded)
   {
      if (this.fireEvent("beforeexpand", this, A, B) === false)
      {
         return
      }
      if (!this.childrenRendered)
      {
         this.renderChildren()
      }
      this.expanded = true;
      if (!this.isHiddenRoot() && (this.getOwnerTree().animate && B !== false) || B)
      {
         this.ui.animExpand(function()
         {
            this.fireEvent("expand", this);
            if (typeof C == "function")
            {
               C(this)
            }
            if (A === true)
            {
               this.expandChildNodes(true)
            }
         }.createDelegate(this));
         return
      }
      else
      {
         this.ui.expand();
         this.fireEvent("expand", this);
         if (typeof C == "function")
         {
            C(this)
         }
      }
   }
   else
   {
      if (typeof C == "function")
      {
         C(this)
      }
   }
   if (A === true)
   {
      this.expandChildNodes(true)
   }
},isHiddenRoot:function()
{
   return this.isRoot && !this.getOwnerTree().rootVisible
},collapse:function(B, E)
{
   if (this.expanded && !this.isHiddenRoot())
   {
      if (this.fireEvent("beforecollapse", this, B, E) === false)
      {
         return
      }
      this.expanded = false;
      if ((this.getOwnerTree().animate && E !== false) || E)
      {
         this.ui.animCollapse(function()
         {
            this.fireEvent("collapse", this);
            if (B === true)
            {
               this.collapseChildNodes(true)
            }
         }.createDelegate(this));
         return
      }
      else
      {
         this.ui.collapse();
         this.fireEvent("collapse", this)
      }
   }
   if (B === true)
   {
      var D = this.childNodes;
      for (var C = 0,A = D.length; C < A; C++)
      {
         D[C].collapse(true, false)
      }
   }
},delayedExpand:function(A)
{
   if (!this.expandProcId)
   {
      this.expandProcId = this.expand.defer(A, this)
   }
},cancelExpand:function()
{
   if (this.expandProcId)
   {
      clearTimeout(this.expandProcId)
   }
   this.expandProcId = false
},toggle:function()
{
   if (this.expanded)
   {
      this.collapse()
   }
   else
   {
      this.expand()
   }
},ensureVisible:function(B)
{
   var A = this.getOwnerTree();
   A.expandPath(this.parentNode.getPath(), false, function()
   {
      var C = A.getNodeById(this.id);
      A.getTreeEl().scrollChildIntoView(C.ui.anchor);
      Ext.callback(B)
   }.createDelegate(this))
},expandChildNodes:function(B)
{
   var D = this.childNodes;
   for (var C = 0,A = D.length; C < A; C++)
   {
      D[C].expand(B)
   }
},collapseChildNodes:function(B)
{
   var D = this.childNodes;
   for (var C = 0,A = D.length; C < A; C++)
   {
      D[C].collapse(B)
   }
},disable:function()
{
   this.disabled = true;
   this.unselect();
   if (this.rendered && this.ui.onDisableChange)
   {
      this.ui.onDisableChange(this, true)
   }
   this.fireEvent("disabledchange", this, true)
},enable:function()
{
   this.disabled = false;
   if (this.rendered && this.ui.onDisableChange)
   {
      this.ui.onDisableChange(this, false)
   }
   this.fireEvent("disabledchange", this, false)
},renderChildren:function(B)
{
   if (B !== false)
   {
      this.fireEvent("beforechildrenrendered", this)
   }
   var D = this.childNodes;
   for (var C = 0,A = D.length; C < A; C++)
   {
      D[C].render(true)
   }
   this.childrenRendered = true
},sort:function(E, D)
{
   Ext.tree.TreeNode.superclass.sort.apply(this, arguments);
   if (this.childrenRendered)
   {
      var C = this.childNodes;
      for (var B = 0,A = C.length; B < A; B++)
      {
         C[B].render(true)
      }
   }
},render:function(A)
{
   this.ui.render(A);
   if (!this.rendered)
   {
      this.getOwnerTree().registerNode(this);
      this.rendered = true;
      if (this.expanded)
      {
         this.expanded = false;
         this.expand(false, false)
      }
   }
},renderIndent:function(B, E)
{
   if (E)
   {
      this.ui.childIndent = null
   }
   this.ui.renderIndent();
   if (B === true && this.childrenRendered)
   {
      var D = this.childNodes;
      for (var C = 0,A = D.length; C < A; C++)
      {
         D[C].renderIndent(true, E)
      }
   }
},beginUpdate:function()
{
   this.childrenRendered = false
},endUpdate:function()
{
   if (this.expanded && this.rendered)
   {
      this.renderChildren()
   }
},destroy:function()
{
   if (this.childNodes)
   {
      for (var B = 0,A = this.childNodes.length; B < A; B++)
      {
         this.childNodes[B].destroy()
      }
      this.childNodes = null
   }
   if (this.ui.destroy)
   {
      this.ui.destroy()
   }
}});
Ext.tree.TreePanel.nodeTypes.node = Ext.tree.TreeNode;
Ext.tree.AsyncTreeNode = function(A)
{
   this.loaded = A && A.loaded === true;
   this.loading = false;
   Ext.tree.AsyncTreeNode.superclass.constructor.apply(this, arguments);
   this.addEvents("beforeload", "load")
};
Ext.extend(Ext.tree.AsyncTreeNode, Ext.tree.TreeNode, {expand:function(B, D, F)
{
   if (this.loading)
   {
      var E;
      var C = function()
      {
         if (!this.loading)
         {
            clearInterval(E);
            this.expand(B, D, F)
         }
      }.createDelegate(this);
      E = setInterval(C, 200);
      return
   }
   if (!this.loaded)
   {
      if (this.fireEvent("beforeload", this) === false)
      {
         return
      }
      this.loading = true;
      this.ui.beforeLoad(this);
      var A = this.loader || this.attributes.loader || this.getOwnerTree().getLoader();
      if (A)
      {
         A.load(this, this.loadComplete.createDelegate(this, [B,D,F]));
         return
      }
   }
   Ext.tree.AsyncTreeNode.superclass.expand.call(this, B, D, F)
},isLoading:function()
{
   return this.loading
},loadComplete:function(A, B, C)
{
   this.loading = false;
   this.loaded = true;
   this.ui.afterLoad(this);
   this.fireEvent("load", this);
   this.expand(A, B, C)
},isLoaded:function()
{
   return this.loaded
},hasChildNodes:function()
{
   if (!this.isLeaf() && !this.loaded)
   {
      return true
   }
   else
   {
      return Ext.tree.AsyncTreeNode.superclass.hasChildNodes.call(this)
   }
},reload:function(A)
{
   this.collapse(false, false);
   while (this.firstChild)
   {
      this.removeChild(this.firstChild)
   }
   this.childrenRendered = false;
   this.loaded = false;
   if (this.isHiddenRoot())
   {
      this.expanded = false
   }
   this.expand(false, false, A)
}});
Ext.tree.TreePanel.nodeTypes.async = Ext.tree.AsyncTreeNode;
Ext.tree.TreeNodeUI = function(A)
{
   this.node = A;
   this.rendered = false;
   this.animating = false;
   this.wasLeaf = true;
   this.ecc = "x-tree-ec-icon x-tree-elbow";
   this.emptyIcon = Ext.BLANK_IMAGE_URL
};
Ext.tree.TreeNodeUI.prototype = {removeChild:function(A)
{
   if (this.rendered)
   {
      this.ctNode.removeChild(A.ui.getEl())
   }
},beforeLoad:function()
{
   this.addClass("x-tree-node-loading")
},afterLoad:function()
{
   this.removeClass("x-tree-node-loading")
},onTextChange:function(B, C, A)
{
   if (this.rendered)
   {
      this.textNode.innerHTML = C
   }
},onDisableChange:function(A, B)
{
   this.disabled = B;
   if (this.checkbox)
   {
      this.checkbox.disabled = B
   }
   if (B)
   {
      this.addClass("x-tree-node-disabled")
   }
   else
   {
      this.removeClass("x-tree-node-disabled")
   }
},onSelectedChange:function(A)
{
   if (A)
   {
      this.focus();
      this.addClass("x-tree-selected")
   }
   else
   {
      this.removeClass("x-tree-selected")
   }
},onMove:function(A, G, E, F, D, B)
{
   this.childIndent = null;
   if (this.rendered)
   {
      var H = F.ui.getContainer();
      if (!H)
      {
         this.holder = document.createElement("div");
         this.holder.appendChild(this.wrap);
         return
      }
      var C = B ? B.ui.getEl() : null;
      if (C)
      {
         H.insertBefore(this.wrap, C)
      }
      else
      {
         H.appendChild(this.wrap)
      }
      this.node.renderIndent(true)
   }
},addClass:function(A)
{
   if (this.elNode)
   {
      Ext.fly(this.elNode).addClass(A)
   }
},removeClass:function(A)
{
   if (this.elNode)
   {
      Ext.fly(this.elNode).removeClass(A)
   }
},remove:function()
{
   if (this.rendered)
   {
      this.holder = document.createElement("div");
      this.holder.appendChild(this.wrap)
   }
},fireEvent:function()
{
   return this.node.fireEvent.apply(this.node, arguments)
},initEvents:function()
{
   this.node.on("move", this.onMove, this);
   if (this.node.disabled)
   {
      this.addClass("x-tree-node-disabled");
      if (this.checkbox)
      {
         this.checkbox.disabled = true
      }
   }
   if (this.node.hidden)
   {
      this.hide()
   }
   var B = this.node.getOwnerTree();
   var A = B.enableDD || B.enableDrag || B.enableDrop;
   if (A && (!this.node.isRoot || B.rootVisible))
   {
      Ext.dd.Registry.register(this.elNode, {node:this.node,handles:this.getDDHandles(),isHandle:false})
   }
},getDDHandles:function()
{
   return[this.iconNode,this.textNode,this.elNode]
},hide:function()
{
   this.node.hidden = true;
   if (this.wrap)
   {
      this.wrap.style.display = "none"
   }
},show:function()
{
   this.node.hidden = false;
   if (this.wrap)
   {
      this.wrap.style.display = ""
   }
},onContextMenu:function(A)
{
   if (this.node.hasListener("contextmenu") || this.node.getOwnerTree().hasListener("contextmenu"))
   {
      A.preventDefault();
      this.focus();
      this.fireEvent("contextmenu", this.node, A)
   }
},onClick:function(B)
{
   if (this.dropping)
   {
      B.stopEvent();
      return
   }
   if (this.fireEvent("beforeclick", this.node, B) !== false)
   {
      var A = B.getTarget("a");
      if (!this.disabled && this.node.attributes.href && A)
      {
         this.fireEvent("click", this.node, B);
         return
      }
      else
      {
         if (A && B.ctrlKey)
         {
            B.stopEvent()
         }
      }
      B.preventDefault();
      if (this.disabled)
      {
         return
      }
      if (this.node.attributes.singleClickExpand && !this.animating && this.node.isExpandable())
      {
         this.node.toggle()
      }
      this.fireEvent("click", this.node, B)
   }
   else
   {
      B.stopEvent()
   }
},onDblClick:function(A)
{
   A.preventDefault();
   if (this.disabled)
   {
      return
   }
   if (this.checkbox)
   {
      this.toggleCheck()
   }
   if (!this.animating && this.node.isExpandable())
   {
      this.node.toggle()
   }
   this.fireEvent("dblclick", this.node, A)
},onOver:function(A)
{
   this.addClass("x-tree-node-over")
},onOut:function(A)
{
   this.removeClass("x-tree-node-over")
},onCheckChange:function()
{
   var A = this.checkbox.checked;
   this.checkbox.defaultChecked = A;
   this.node.attributes.checked = A;
   this.fireEvent("checkchange", this.node, A)
},ecClick:function(A)
{
   if (!this.animating && this.node.isExpandable())
   {
      this.node.toggle()
   }
},startDrop:function()
{
   this.dropping = true
},endDrop:function()
{
   setTimeout(function()
   {
      this.dropping = false
   }.createDelegate(this), 50)
},expand:function()
{
   this.updateExpandIcon();
   this.ctNode.style.display = ""
},focus:function()
{
   if (!this.node.preventHScroll)
   {
      try
      {
         this.anchor.focus()
      }
      catch(C)
      {
      }
   }
   else
   {
      if (!Ext.isIE)
      {
         try
         {
            var B = this.node.getOwnerTree().getTreeEl().dom;
            var A = B.scrollLeft;
            this.anchor.focus();
            B.scrollLeft = A
         }
         catch(C)
         {
         }
      }
   }
},toggleCheck:function(B)
{
   var A = this.checkbox;
   if (A)
   {
      A.checked = (B === undefined ? !A.checked : B);
      this.onCheckChange()
   }
},blur:function()
{
   try
   {
      this.anchor.blur()
   }
   catch(A)
   {
   }
},animExpand:function(B)
{
   var A = Ext.get(this.ctNode);
   A.stopFx();
   if (!this.node.isExpandable())
   {
      this.updateExpandIcon();
      this.ctNode.style.display = "";
      Ext.callback(B);
      return
   }
   this.animating = true;
   this.updateExpandIcon();
   A.slideIn("t", {callback:function()
   {
      this.animating = false;
      Ext.callback(B)
   },scope:this,duration:this.node.ownerTree.duration || 0.25})
},highlight:function()
{
   var A = this.node.getOwnerTree();
   Ext.fly(this.wrap).highlight(A.hlColor || "C3DAF9", {endColor:A.hlBaseColor})
},collapse:function()
{
   this.updateExpandIcon();
   this.ctNode.style.display = "none"
},animCollapse:function(B)
{
   var A = Ext.get(this.ctNode);
   A.enableDisplayMode("block");
   A.stopFx();
   this.animating = true;
   this.updateExpandIcon();
   A.slideOut("t", {callback:function()
   {
      this.animating = false;
      Ext.callback(B)
   },scope:this,duration:this.node.ownerTree.duration || 0.25})
},getContainer:function()
{
   return this.ctNode
},getEl:function()
{
   return this.wrap
},appendDDGhost:function(A)
{
   A.appendChild(this.elNode.cloneNode(true))
},getDDRepairXY:function()
{
   return Ext.lib.Dom.getXY(this.iconNode)
},onRender:function()
{
   this.render()
},render:function(B)
{
   var D = this.node,A = D.attributes;
   var C = D.parentNode ? D.parentNode.ui.getContainer() : D.ownerTree.innerCt.dom;
   if (!this.rendered)
   {
      this.rendered = true;
      this.renderElements(D, A, C, B);
      if (A.qtip)
      {
         if (this.textNode.setAttributeNS)
         {
            this.textNode.setAttributeNS("ext", "qtip", A.qtip);
            if (A.qtipTitle)
            {
               this.textNode.setAttributeNS("ext", "qtitle", A.qtipTitle)
            }
         }
         else
         {
            this.textNode.setAttribute("ext:qtip", A.qtip);
            if (A.qtipTitle)
            {
               this.textNode.setAttribute("ext:qtitle", A.qtipTitle)
            }
         }
      }
      else
      {
         if (A.qtipCfg)
         {
            A.qtipCfg.target = Ext.id(this.textNode);
            Ext.QuickTips.register(A.qtipCfg)
         }
      }
      this.initEvents();
      if (!this.node.expanded)
      {
         this.updateExpandIcon(true)
      }
   }
   else
   {
      if (B === true)
      {
         C.appendChild(this.wrap)
      }
   }
},renderElements:function(D, I, H, J)
{
   this.indentMarkup = D.parentNode ? D.parentNode.ui.getChildIndent() : "";
   var E = typeof I.checked == "boolean";
   var B = I.href ? I.href : Ext.isGecko ? "" : "#";
   var C = ["<li class=\"x-tree-node\"><div ext:tree-node-id=\"",D.id,"\" class=\"x-tree-node-el x-tree-node-leaf x-unselectable ",I.cls,"\" unselectable=\"on\">","<span class=\"x-tree-node-indent\">",this.indentMarkup,"</span>","<img src=\"",this.emptyIcon,"\" class=\"x-tree-ec-icon x-tree-elbow\" />","<img src=\"",I.icon || this.emptyIcon,"\" class=\"x-tree-node-icon",(
      I.icon ? " x-tree-node-inline-icon" : ""),(I.iconCls ? " " + I.iconCls : ""),"\" unselectable=\"on\" />",E ?
                                                                                                               ("<input class=\"x-tree-node-cb\" type=\"checkbox\" " + (
                                                                                                                  I.checked ?
                                                                                                                  "checked=\"checked\" />" :
                                                                                                                  "/>")) :
                                                                                                               "","<a hidefocus=\"on\" class=\"x-tree-node-anchor\" href=\"",B,"\" tabIndex=\"1\" ",
      I.hrefTarget ? " target=\"" + I.hrefTarget + "\"" :
      "","><span unselectable=\"on\">",D.text,"</span></a></div>","<ul class=\"x-tree-node-ct\" style=\"display:none;\"></ul>","</li>"].join("");
   var A;
   if (J !== true && D.nextSibling && (A = D.nextSibling.ui.getEl()))
   {
      this.wrap = Ext.DomHelper.insertHtml("beforeBegin", A, C)
   }
   else
   {
      this.wrap = Ext.DomHelper.insertHtml("beforeEnd", H, C)
   }
   this.elNode = this.wrap.childNodes[0];
   this.ctNode = this.wrap.childNodes[1];
   var G = this.elNode.childNodes;
   this.indentNode = G[0];
   this.ecNode = G[1];
   this.iconNode = G[2];
   var F = 3;
   if (E)
   {
      this.checkbox = G[3];
      this.checkbox.defaultChecked = this.checkbox.checked;
      F++
   }
   this.anchor = G[F];
   this.textNode = G[F].firstChild
},getAnchor:function()
{
   return this.anchor
},getTextEl:function()
{
   return this.textNode
},getIconEl:function()
{
   return this.iconNode
},isChecked:function()
{
   return this.checkbox ? this.checkbox.checked : false
},updateExpandIcon:function()
{
   if (this.rendered)
   {
      var E = this.node,D,C;
      var A = E.isLast() ? "x-tree-elbow-end" : "x-tree-elbow";
      if (E.isExpandable())
      {
         if (E.expanded)
         {
            A += "-minus";
            D = "x-tree-node-collapsed";
            C = "x-tree-node-expanded"
         }
         else
         {
            A += "-plus";
            D = "x-tree-node-expanded";
            C = "x-tree-node-collapsed"
         }
         if (this.wasLeaf)
         {
            this.removeClass("x-tree-node-leaf");
            this.wasLeaf = false
         }
         if (this.c1 != D || this.c2 != C)
         {
            Ext.fly(this.elNode).replaceClass(D, C);
            this.c1 = D;
            this.c2 = C
         }
      }
      else
      {
         if (!this.wasLeaf)
         {
            Ext.fly(this.elNode).replaceClass("x-tree-node-expanded", "x-tree-node-leaf");
            delete this.c1;
            delete this.c2;
            this.wasLeaf = true
         }
      }
      var B = "x-tree-ec-icon " + A;
      if (this.ecc != B)
      {
         this.ecNode.className = B;
         this.ecc = B
      }
   }
},getChildIndent:function()
{
   if (!this.childIndent)
   {
      var A = [];
      var B = this.node;
      while (B)
      {
         if (!B.isRoot || (B.isRoot && B.ownerTree.rootVisible))
         {
            if (!B.isLast())
            {
               A.unshift("<img src=\"" + this.emptyIcon + "\" class=\"x-tree-elbow-line\" />")
            }
            else
            {
               A.unshift("<img src=\"" + this.emptyIcon + "\" class=\"x-tree-icon\" />")
            }
         }
         B = B.parentNode
      }
      this.childIndent = A.join("")
   }
   return this.childIndent
},renderIndent:function()
{
   if (this.rendered)
   {
      var A = "";
      var B = this.node.parentNode;
      if (B)
      {
         A = B.ui.getChildIndent()
      }
      if (this.indentMarkup != A)
      {
         this.indentNode.innerHTML = A;
         this.indentMarkup = A
      }
      this.updateExpandIcon()
   }
},destroy:function()
{
   if (this.elNode)
   {
      Ext.dd.Registry.unregister(this.elNode.id)
   }
   delete this.elNode;
   delete this.ctNode;
   delete this.indentNode;
   delete this.ecNode;
   delete this.iconNode;
   delete this.checkbox;
   delete this.anchor;
  
