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

Ext = {version: '2.2'};

// for old browsers
window["undefined"] = window["undefined"];

/**
 * @class Ext
 * Ext core utilities and functions.
 * @singleton
 */

/**
 * Copies all the properties of config to obj.
 * @param {Object} obj The receiver of the properties
 * @param {Object} config The source of the properties
 * @param {Object} defaults A different object that will also be applied for default values
 * @return {Object} returns obj
 * @member Ext apply
 */
Ext.apply = function(o, c, defaults){
    if(defaults){
        // no "this" reference for friendly out of scope calls
        Ext.apply(o, defaults);
    }
    if(o && c && typeof c == 'object'){
        for(var p in c){
            o[p] = c[p];
        }
    }
    return o;
};

(function(){
    var idSeed = 0;
    var ua = navigator.userAgent.toLowerCase();

    var isStrict = document.compatMode == "CSS1Compat",
        isOpera = ua.indexOf("opera") > -1,
        isSafari = (/webkit|khtml/).test(ua),
        isSafari3 = isSafari && ua.indexOf('webkit/5') != -1,
        isIE = !isOpera && ua.indexOf("msie") > -1,
        isIE7 = !isOpera && ua.indexOf("msie 7") > -1,
        isGecko = !isSafari && ua.indexOf("gecko") > -1,
        isGecko3 = !isSafari && ua.indexOf("rv:1.9") > -1,
        isBorderBox = isIE && !isStrict,
        isWindows = (ua.indexOf("windows") != -1 || ua.indexOf("win32") != -1),
        isMac = (ua.indexOf("macintosh") != -1 || ua.indexOf("mac os x") != -1),
        isAir = (ua.indexOf("adobeair") != -1),
        isLinux = (ua.indexOf("linux") != -1),
        isSecure = window.location.href.toLowerCase().indexOf("https") === 0;

    // remove css image flicker
	if(isIE && !isIE7){
        try{
            document.execCommand("BackgroundImageCache", false, true);
        }catch(e){}
    }

    Ext.apply(Ext, {
        /**
         * True if the browser is in strict (standards-compliant) mode, as opposed to quirks mode
         * @type Boolean
         */
        isStrict : isStrict,
        /**
         * True if the page is running over SSL
         * @type Boolean
         */
        isSecure : isSecure,
        /**
         * True when the document is fully initialized and ready for action
         * @type Boolean
         */
        isReady : false,

        /**
         * True to automatically uncache orphaned Ext.Elements periodically (defaults to true)
         * @type Boolean
         */
        enableGarbageCollector : true,

        /**
         * True to automatically purge event listeners after uncaching an element (defaults to false).
         * Note: this only happens if enableGarbageCollector is true.
         * @type Boolean
         */
        enableListenerCollection:false,


        /**
         * URL to a blank file used by Ext when in secure mode for iframe src and onReady src to prevent
         * the IE insecure content warning (defaults to javascript:false).
         * @type String
         */
        SSL_SECURE_URL : "javascript:false",

        /**
         * URL to a 1x1 transparent gif image used by Ext to create inline icons with CSS background images. (Defaults to
         * "http://extjs.com/s.gif" and you should change this to a URL on your server).
         * @type String
         */
        BLANK_IMAGE_URL : "http:/"+"/extjs.com/s.gif",

        /**
        * A reusable empty function
        * @property
         * @type Function
        */
        emptyFn : function(){},

        /**
         * Copies all the properties of config to obj if they don't already exist.
         * @param {Object} obj The receiver of the properties
         * @param {Object} config The source of the properties
         * @return {Object} returns obj
         */
        applyIf : function(o, c){
            if(o && c){
                for(var p in c){
                    if(typeof o[p] == "undefined"){ o[p] = c[p]; }
                }
            }
            return o;
        },

        /**
         * Applies event listeners to elements by selectors when the document is ready.
         * The event name is specified with an @ suffix.
<pre><code>
Ext.addBehaviors({
   // add a listener for click on all anchors in element with id foo
   '#foo a@click' : function(e, t){
       // do something
   },

   // add the same listener to multiple selectors (separated by comma BEFORE the @)
   '#foo a, #bar span.some-class@mouseover' : function(){
       // do something
   }
});
</code></pre>
         * @param {Object} obj The list of behaviors to apply
         */
        addBehaviors : function(o){
            if(!Ext.isReady){
                Ext.onReady(function(){
                    Ext.addBehaviors(o);
                });
                return;
            }
            var cache = {}; // simple cache for applying multiple behaviors to same selector does query multiple times
            for(var b in o){
                var parts = b.split('@');
                if(parts[1]){ // for Object prototype breakers
                    var s = parts[0];
                    if(!cache[s]){
                        cache[s] = Ext.select(s);
                    }
                    cache[s].on(parts[1], o[b]);
                }
            }
            cache = null;
        },

        /**
         * Generates unique ids. If the element already has an id, it is unchanged
         * @param {Mixed} el (optional) The element to generate an id for
         * @param {String} prefix (optional) Id prefix (defaults "ext-gen")
         * @return {String} The generated Id.
         */
        id : function(el, prefix){
            prefix = prefix || "ext-gen";
            el = Ext.getDom(el);
            var id = prefix + (++idSeed);
            return el ? (el.id ? el.id : (el.id = id)) : id;
        },

        /**
         * Extends one class with another class and optionally overrides members with the passed literal. This class
         * also adds the function "override()" to the class that can be used to override
         * members on an instance.
         * * <p>
         * This function also supports a 2-argument call in which the subclass's constructor is
         * not passed as an argument. In this form, the parameters are as follows:</p><p>
         * <div class="mdetail-params"><ul>
         * <li><code>superclass</code>
         * <div class="sub-desc">The class being extended</div></li>
         * <li><code>overrides</code>
         * <div class="sub-desc">A literal with members which are copied into the subclass's
         * prototype, and are therefore shared among all instances of the new class.<p>
         * This may contain a special member named <tt><b>constructor</b></tt>. This is used
         * to define the constructor of the new class, and is returned. If this property is
         * <i>not</i> specified, a constructor is generated and returned which just calls the
         * superclass's constructor passing on its parameters.</p></div></li>
         * </ul></div></p><p>
         * For example, to create a subclass of the Ext GridPanel:
         * <pre><code>
    MyGridPanel = Ext.extend(Ext.grid.GridPanel, {
        constructor: function(config) {
            // Your preprocessing here
        	MyGridPanel.superclass.constructor.apply(this, arguments);
            // Your postprocessing here
        },

        yourMethod: function() {
            // etc.
        }
    });
</code></pre>
         * </p>
         * @param {Function} subclass The class inheriting the functionality
         * @param {Function} superclass The class being extended
         * @param {Object} overrides (optional) A literal with members which are copied into the subclass's
         * prototype, and are therefore shared between all instances of the new class.
         * @return {Function} The subclass constructor.
         * @method extend
         */
        extend : function(){
            // inline overrides
            var io = function(o){
                for(var m in o){
                    this[m] = o[m];
                }
            };
            var oc = Object.prototype.constructor;

            return function(sb, sp, overrides){
                if(typeof sp == 'object'){
                    overrides = sp;
                    sp = sb;
                    sb = overrides.constructor != oc ? overrides.constructor : function(){sp.apply(this, arguments);};
                }
                var F = function(){}, sbp, spp = sp.prototype;
                F.prototype = spp;
                sbp = sb.prototype = new F();
                sbp.constructor=sb;
                sb.superclass=spp;
                if(spp.constructor == oc){
                    spp.constructor=sp;
                }
                sb.override = function(o){
                    Ext.override(sb, o);
                };
                sbp.override = io;
                Ext.override(sb, overrides);
                sb.extend = function(o){Ext.extend(sb, o);};
                return sb;
            };
        }(),

        /**
         * Adds a list of functions to the prototype of an existing class, overwriting any existing methods with the same name.
         * Usage:<pre><code>
Ext.override(MyClass, {
    newMethod1: function(){
        // etc.
    },
    newMethod2: function(foo){
        // etc.
    }
});
 </code></pre>
         * @param {Object} origclass The class to override
         * @param {Object} overrides The list of functions to add to origClass.  This should be specified as an object literal
         * containing one or more methods.
         * @method override
         */
        override : function(origclass, overrides){
            if(overrides){
                var p = origclass.prototype;
                for(var method in overrides){
                    p[method] = overrides[method];
                }
            }
        },

        /**
         * Creates namespaces to be used for scoping variables and classes so that they are not global.  Usage:
         * <pre><code>
Ext.namespace('Company', 'Company.data');
Company.Widget = function() { ... }
Company.data.CustomStore = function(config) { ... }
</code></pre>
         * @param {String} namespace1
         * @param {String} namespace2
         * @param {String} etc
         * @method namespace
         */
        namespace : function(){
            var a=arguments, o=null, i, j, d, rt;
            for (i=0; i<a.length; ++i) {
                d=a[i].split(".");
                rt = d[0];
                eval('if (typeof ' + rt + ' == "undefined"){' + rt + ' = {};} o = ' + rt + ';');
                for (j=1; j<d.length; ++j) {
                    o[d[j]]=o[d[j]] || {};
                    o=o[d[j]];
                }
            }
        },

        /**
         * Takes an object and converts it to an encoded URL. e.g. Ext.urlEncode({foo: 1, bar: 2}); would return "foo=1&bar=2".  Optionally, property values can be arrays, instead of keys and the resulting string that's returned will contain a name/value pair for each array value.
         * @param {Object} o
         * @return {String}
         */
        urlEncode : function(o){
            if(!o){
                return "";
            }
            var buf = [];
            for(var key in o){
                var ov = o[key], k = encodeURIComponent(key);
                var type = typeof ov;
                if(type == 'undefined'){
                    buf.push(k, "=&");
                }else if(type != "function" && type != "object"){
                    buf.push(k, "=", encodeURIComponent(ov), "&");
                }else if(Ext.isArray(ov)){
                    if (ov.length) {
	                    for(var i = 0, len = ov.length; i < len; i++) {
	                        buf.push(k, "=", encodeURIComponent(ov[i] === undefined ? '' : ov[i]), "&");
	                    }
	                } else {
	                    buf.push(k, "=&");
	                }
                }
            }
            buf.pop();
            return buf.join("");
        },

        /**
         * Takes an encoded URL and and converts it to an object. e.g. Ext.urlDecode("foo=1&bar=2"); would return {foo: 1, bar: 2} or Ext.urlDecode("foo=1&bar=2&bar=3&bar=4", true); would return {foo: 1, bar: [2, 3, 4]}.
         * @param {String} string
         * @param {Boolean} overwrite (optional) Items of the same name will overwrite previous values instead of creating an an array (Defaults to false).
         * @return {Object} A literal with members
         */
        urlDecode : function(string, overwrite){
            if(!string || !string.length){
                return {};
            }
            var obj = {};
            var pairs = string.split('&');
            var pair, name, value;
            for(var i = 0, len = pairs.length; i < len; i++){
                pair = pairs[i].split('=');
                name = decodeURIComponent(pair[0]);
                value = decodeURIComponent(pair[1]);
                if(overwrite !== true){
                    if(typeof obj[name] == "undefined"){
                        obj[name] = value;
                    }else if(typeof obj[name] == "string"){
                        obj[name] = [obj[name]];
                        obj[name].push(value);
                    }else{
                        obj[name].push(value);
                    }
                }else{
                    obj[name] = value;
                }
            }
            return obj;
        },

        /**
         * Iterates an array calling the passed function with each item, stopping if your function returns false. If the
         * passed array is not really an array, your function is called once with it.
         * The supplied function is called with (Object item, Number index, Array allItems).
         * @param {Array/NodeList/Mixed} array
         * @param {Function} fn
         * @param {Object} scope
         */
        each : function(array, fn, scope){
            if(typeof array.length == "undefined" || typeof array == "string"){
                array = [array];
            }
            for(var i = 0, len = array.length; i < len; i++){
                if(fn.call(scope || array[i], array[i], i, array) === false){ return i; };
            }
        },

        // deprecated
        combine : function(){
            var as = arguments, l = as.length, r = [];
            for(var i = 0; i < l; i++){
                var a = as[i];
                if(Ext.isArray(a)){
                    r = r.concat(a);
                }else if(a.length !== undefined && !a.substr){
                    r = r.concat(Array.prototype.slice.call(a, 0));
                }else{
                    r.push(a);
                }
            }
            return r;
        },

        /**
         * Escapes the passed string for use in a regular expression
         * @param {String} str
         * @return {String}
         */
        escapeRe : function(s) {
            return s.replace(/([.*+?^${}()|[\]\/\\])/g, "\\$1");
        },

        // internal
        callback : function(cb, scope, args, delay){
            if(typeof cb == "function"){
                if(delay){
                    cb.defer(delay, scope, args || []);
                }else{
                    cb.apply(scope, args || []);
                }
            }
        },

        /**
         * Return the dom node for the passed string (id), dom node, or Ext.Element
         * @param {Mixed} el
         * @return HTMLElement
         */
        getDom : function(el){
            if(!el || !document){
                return null;
            }
            return el.dom ? el.dom : (typeof el == 'string' ? document.getElementById(el) : el);
        },

        /**
        * Returns the current HTML document object as an {@link Ext.Element}.
        * @return Ext.Element The document
        */
        getDoc : function(){
            return Ext.get(document);
        },

        /**
        * Returns the current document body as an {@link Ext.Element}.
        * @return Ext.Element The document body
        */
        getBody : function(){
            return Ext.get(document.body || document.documentElement);
        },

        /**
        * Shorthand for {@link Ext.ComponentMgr#get}
        * @param {String} id
        * @return Ext.Component
        */
        getCmp : function(id){
            return Ext.ComponentMgr.get(id);
        },

        /**
         * Utility method for validating that a value is numeric, returning the specified default value if it is not.
         * @param {Mixed} value Should be a number, but any type will be handled appropriately
         * @param {Number} defaultValue The value to return if the original value is non-numeric
         * @return {Number} Value, if numeric, else defaultValue
         */
        num : function(v, defaultValue){
            if(typeof v != 'number'){
                return defaultValue;
            }
            return v;
        },

        /**
         * Attempts to destroy any objects passed to it by removing all event listeners, removing them from the
         * DOM (if applicable) and calling their destroy functions (if available).  This method is primarily
         * intended for arguments of type {@link Ext.Element} and {@link Ext.Component}, but any subclass of
         * {@link Ext.util.Observable} can be passed in.  Any number of elements and/or components can be
         * passed into this function in a single call as separate arguments.
         * @param {Mixed} arg1 An {@link Ext.Element} or {@link Ext.Component} to destroy
         * @param {Mixed} arg2 (optional)
         * @param {Mixed} etc... (optional)
         */
        destroy : function(){
            for(var i = 0, a = arguments, len = a.length; i < len; i++) {
                var as = a[i];
                if(as){
		            if(typeof as.destroy == 'function'){
		                as.destroy();
		            }
		            else if(as.dom){
		                as.removeAllListeners();
		                as.remove();
		            }
                }
            }
        },

        /**
         * Removes a DOM node from the document.  The body node will be ignored if passed in.
         * @param {HTMLElement} node The node to remove
         */
        removeNode : isIE ? function(){
            var d;
            return function(n){
                if(n && n.tagName != 'BODY'){
                    d = d || document.createElement('div');
                    d.appendChild(n);
                    d.innerHTML = '';
                }
            }
        }() : function(n){
            if(n && n.parentNode && n.tagName != 'BODY'){
                n.parentNode.removeChild(n);
            }
        },

        // inpired by a similar function in mootools library
        /**
         * Returns the type of object that is passed in. If the object passed in is null or undefined it
         * return false otherwise it returns one of the following values:<ul>
         * <li><b>string</b>: If the object passed is a string</li>
         * <li><b>number</b>: If the object passed is a number</li>
         * <li><b>boolean</b>: If the object passed is a boolean value</li>
         * <li><b>function</b>: If the object passed is a function reference</li>
         * <li><b>object</b>: If the object passed is an object</li>
         * <li><b>array</b>: If the object passed is an array</li>
         * <li><b>regexp</b>: If the object passed is a regular expression</li>
         * <li><b>element</b>: If the object passed is a DOM Element</li>
         * <li><b>nodelist</b>: If the object passed is a DOM NodeList</li>
         * <li><b>textnode</b>: If the object passed is a DOM text node and contains something other than whitespace</li>
         * <li><b>whitespace</b>: If the object passed is a DOM text node and contains only whitespace</li>
         * @param {Mixed} object
         * @return {String}
         */
        type : function(o){
            if(o === undefined || o === null){
                return false;
            }
            if(o.htmlElement){
                return 'element';
            }
            var t = typeof o;
            if(t == 'object' && o.nodeName) {
                switch(o.nodeType) {
                    case 1: return 'element';
                    case 3: return (/\S/).test(o.nodeValue) ? 'textnode' : 'whitespace';
                }
            }
            if(t == 'object' || t == 'function') {
                switch(o.constructor) {
                    case Array: return 'array';
                    case RegExp: return 'regexp';
                }
                if(typeof o.length == 'number' && typeof o.item == 'function') {
                    return 'nodelist';
                }
            }
            return t;
        },

        /**
         * Returns true if the passed value is null, undefined or an empty string (optional).
         * @param {Mixed} value The value to test
         * @param {Boolean} allowBlank (optional) Pass true if an empty string is not considered empty
         * @return {Boolean}
         */
        isEmpty : function(v, allowBlank){
            return v === null || v === undefined || (!allowBlank ? v === '' : false);
        },

        value : function(v, defaultValue, allowBlank){
            return Ext.isEmpty(v, allowBlank) ? defaultValue : v;
        },

        /**
         * Returns true if the passed object is a JavaScript array, otherwise false.
         * @param {Object} The object to test
         * @return {Boolean}
         */
		isArray : function(v){
			return v && typeof v.length == 'number' && typeof v.splice == 'function';
		},

		/**
         * Returns true if the passed object is a JavaScript date object, otherwise false.
         * @param {Object} The object to test
         * @return {Boolean}
         */
		isDate : function(v){
			return v && typeof v.getFullYear == 'function';
		},

        /**
         * True if the detected browser is Opera.
         * @type Boolean
         */
        isOpera : isOpera,
        /**
         * True if the detected browser is Safari.
         * @type Boolean
         */
        isSafari : isSafari,
        /**
         * True if the detected browser is Safari 3.x.
         * @type Boolean
         */
        isSafari3 : isSafari3,
        /**
         * True if the detected browser is Safari 2.x.
         * @type Boolean
         */
        isSafari2 : isSafari && !isSafari3,
        /**
         * True if the detected browser is Internet Explorer.
         * @type Boolean
         */
        isIE : isIE,
        /**
         * True if the detected browser is Internet Explorer 6.x.
         * @type Boolean
         */
        isIE6 : isIE && !isIE7,
        /**
         * True if the detected browser is Internet Explorer 7.x.
         * @type Boolean
         */
        isIE7 : isIE7,
        /**
         * True if the detected browser uses the Gecko layout engine (e.g. Mozilla, Firefox).
         * @type Boolean
         */
        isGecko : isGecko,
        /**
         * True if the detected browser uses a pre-Gecko 1.9 layout engine (e.g. Firefox 2.x).
         * @type Boolean
         */
        isGecko2 : isGecko && !isGecko3,
        /**
         * True if the detected browser uses a Gecko 1.9+ layout engine (e.g. Firefox 3.x).
         * @type Boolean
         */
        isGecko3 : isGecko3,
        /**
         * True if the detected browser is Internet Explorer running in non-strict mode.
         * @type Boolean
         */
        isBorderBox : isBorderBox,
        /**
         * True if the detected platform is Linux.
         * @type Boolean
         */
        isLinux : isLinux,
        /**
         * True if the detected platform is Windows.
         * @type Boolean
         */
        isWindows : isWindows,
        /**
         * True if the detected platform is Mac OS.
         * @type Boolean
         */
        isMac : isMac,
        /**
         * True if the detected platform is Adobe Air.
         * @type Boolean
         */
        isAir : isAir,

	    /**
	     * By default, Ext intelligently decides whether floating elements should be shimmed. If you are using flash,
	     * you may want to set this to true.
	     * @type Boolean
	     */
        useShims : ((isIE && !isIE7) || (isMac && isGecko && !isGecko3))
    });

    // in intellij using keyword "namespace" causes parsing errors
    Ext.ns = Ext.namespace;
})();

Ext.ns("Ext", "Ext.util", "Ext.grid", "Ext.dd", "Ext.tree", "Ext.data",
                "Ext.form", "Ext.menu", "Ext.state", "Ext.lib", "Ext.layout", "Ext.app", "Ext.ux");


/**
 * @class Function
 * These functions are available on every Function object (any JavaScript function).
 */
Ext.apply(Function.prototype, {
     /**
     * Creates a callback that passes arguments[0], arguments[1], arguments[2], ...
     * Call directly on any function. Example: <code>myFunction.createCallback(arg1, arg2)</code>
     * Will create a function that is bound to those 2 args. <b>If a specific scope is required in the
     * callback, use {@link #createDelegate} instead.</b> The function returned by createCallback always
     * executes in the window scope.
     * <p>This method is required when you want to pass arguments to a callback function.  If no arguments
     * are needed, you can simply pass a reference to the function as a callback (e.g., callback: myFn).
     * However, if you tried to pass a function with arguments (e.g., callback: myFn(arg1, arg2)) the function
     * would simply execute immediately when the code is parsed. Example usage:
     * <pre><code>
var sayHi = function(name){
    alert('Hi, ' + name);
}

// clicking the button alerts "Hi, Fred"
new Ext.Button({
    text: 'Say Hi',
    renderTo: Ext.getBody(),
    handler: sayHi.createCallback('Fred')
});
</code></pre>
     * @return {Function} The new function
    */
    createCallback : function(/*args...*/){
        // make args available, in function below
        var args = arguments;
        var method = this;
        return function() {
            return method.apply(window, args);
        };
    },

    /**
     * Creates a delegate (callback) that sets the scope to obj.
     * Call directly on any function. Example: <code>this.myFunction.createDelegate(this, [arg1, arg2])</code>
     * Will create a function that is automatically scoped to obj so that the <tt>this</tt> variable inside the
     * callback points to obj. Example usage:
     * <pre><code>
var sayHi = function(name){
    // Note this use of "this.text" here.  This function expects to
    // execute within a scope that contains a text property.  In this
    // example, the "this" variable is pointing to the btn object that
    // was passed in createDelegate below.
    alert('Hi, ' + name + '. You clicked the "' + this.text + '" button.');
}

var btn = new Ext.Button({
    text: 'Say Hi',
    renderTo: Ext.getBody()
});

// This callback will execute in the scope of the
// button instance. Clicking the button alerts
// "Hi, Fred. You clicked the "Say Hi" button."
btn.on('click', sayHi.createDelegate(btn, ['Fred']));
</code></pre>
     * @param {Object} obj (optional) The object for which the scope is set
     * @param {Array} args (optional) Overrides arguments for the call. (Defaults to the arguments passed by the caller)
     * @param {Boolean/Number} appendArgs (optional) if True args are appended to call args instead of overriding,
     *                                             if a number the args are inserted at the specified position
     * @return {Function} The new function
     */
    createDelegate : function(obj, args, appendArgs){
        var method = this;
        return function() {
            var callArgs = args || arguments;
            if(appendArgs === true){
                callArgs = Array.prototype.slice.call(arguments, 0);
                callArgs = callArgs.concat(args);
            }else if(typeof appendArgs == "number"){
                callArgs = Array.prototype.slice.call(arguments, 0); // copy arguments first
                var applyArgs = [appendArgs, 0].concat(args); // create method call params
                Array.prototype.splice.apply(callArgs, applyArgs); // splice them in
            }
            return method.apply(obj || window, callArgs);
        };
    },

    /**
     * Calls this function after the number of millseconds specified, optionally in a specific scope. Example usage:
     * <pre><code>
var sayHi = function(name){
    alert('Hi, ' + name);
}

// executes immediately:
sayHi('Fred');

// executes after 2 seconds:
sayHi.defer(2000, this, ['Fred']);

// this syntax is sometimes useful for deferring
// execution of an anonymous function:
(function(){
    alert('Anonymous');
}).defer(100);
</code></pre>
     * @param {Number} millis The number of milliseconds for the setTimeout call (if 0 the function is executed immediately)
     * @param {Object} obj (optional) The object for which the scope is set
     * @param {Array} args (optional) Overrides arguments for the call. (Defaults to the arguments passed by the caller)
     * @param {Boolean/Number} appendArgs (optional) if True args are appended to call args instead of overriding,
     *                                             if a number the args are inserted at the specified position
     * @return {Number} The timeout id that can be used with clearTimeout
     */
    defer : function(millis, obj, args, appendArgs){
        var fn = this.createDelegate(obj, args, appendArgs);
        if(millis){
            return setTimeout(fn, millis);
        }
        fn();
        return 0;
    },

    /**
     * Create a combined function call sequence of the original function + the passed function.
     * The resulting function returns the results of the original function.
     * The passed fcn is called with the parameters of the original function. Example usage:
     * <pre><code>
var sayHi = function(name){
    alert('Hi, ' + name);
}

sayHi('Fred'); // alerts "Hi, Fred"

var sayGoodbye = sayHi.createSequence(function(name){
    alert('Bye, ' + name);
});

sayGoodbye('Fred'); // both alerts show
</code></pre>
     * @param {Function} fcn The function to sequence
     * @param {Object} scope (optional) The scope of the passed fcn (Defaults to scope of original function or window)
     * @return {Function} The new function
     */
    createSequence : function(fcn, scope){
        if(typeof fcn != "function"){
            return this;
        }
        var method = this;
        return function() {
            var retval = method.apply(this || window, arguments);
            fcn.apply(scope || this || window, arguments);
            return retval;
        };
    },

    /**
     * Creates an interceptor function. The passed fcn is called before the original one. If it returns false,
     * the original one is not called. The resulting function returns the results of the original function.
     * The passed fcn is called with the parameters of the original function. Example usage:
     * <pre><code>
var sayHi = function(name){
    alert('Hi, ' + name);
}

sayHi('Fred'); // alerts "Hi, Fred"

// create a new function that validates input without
// directly modifying the original function:
var sayHiToFriend = sayHi.createInterceptor(function(name){
    return name == 'Brian';
});

sayHiToFriend('Fred');  // no alert
sayHiToFriend('Brian'); // alerts "Hi, Brian"
</code></pre>
     * @param {Function} fcn The function to call before the original
     * @param {Object} scope (optional) The scope of the passed fcn (Defaults to scope of original function or window)
     * @return {Function} The new function
     */
    createInterceptor : function(fcn, scope){
        if(typeof fcn != "function"){
            return this;
        }
        var method = this;
        return function() {
            fcn.target = this;
            fcn.method = method;
            if(fcn.apply(scope || this || window, arguments) === false){
                return;
            }
            return method.apply(this || window, arguments);
        };
    }
});

/**
 * @class String
 * These functions are available as static methods on the JavaScript String object.
 */
Ext.applyIf(String, {

    /**
     * Escapes the passed string for ' and \
     * @param {String} string The string to escape
     * @return {String} The escaped string
     * @static
     */
    escape : function(string) {
        return string.replace(/('|\\)/g, "\\$1");
    },

    /**
     * Pads the left side of a string with a specified character.  This is especially useful
     * for normalizing number and date strings.  Example usage:
     * <pre><code>
var s = String.leftPad('123', 5, '0');
// s now contains the string: '00123'
</code></pre>
     * @param {String} string The original string
     * @param {Number} size The total length of the output string
     * @param {String} char (optional) The character with which to pad the original string (defaults to empty string " ")
     * @return {String} The padded string
     * @static
     */
    leftPad : function (val, size, ch) {
        var result = new String(val);
        if(!ch) {
            ch = " ";
        }
        while (result.length < size) {
            result = ch + result;
        }
        return result.toString();
    },

    /**
     * Allows you to define a tokenized string and pass an arbitrary number of arguments to replace the tokens.  Each
     * token must be unique, and must increment in the format {0}, {1}, etc.  Example usage:
     * <pre><code>
var cls = 'my-class', text = 'Some text';
var s = String.format('&lt;div class="{0}">{1}&lt;/div>', cls, text);
// s now contains the string: '&lt;div class="my-class">Some text&lt;/div>'
</code></pre>
     * @param {String} string The tokenized string to be formatted
     * @param {String} value1 The value to replace token {0}
     * @param {String} value2 Etc...
     * @return {String} The formatted string
     * @static
     */
    format : function(format){
        var args = Array.prototype.slice.call(arguments, 1);
        return format.replace(/\{(\d+)\}/g, function(m, i){
            return args[i];
        });
    }
});

/**
 * Utility function that allows you to easily switch a string between two alternating values.  The passed value
 * is compared to the current string, and if they are equal, the other value that was passed in is returned.  If
 * they are already different, the first value passed in is returned.  Note that this method returns the new value
 * but does not change the current string.
 * <pre><code>
// alternate sort directions
sort = sort.toggle('ASC', 'DESC');

// instead of conditional logic:
sort = (sort == 'ASC' ? 'DESC' : 'ASC');
</code></pre>
 * @param {String} value The value to compare to the current string
 * @param {String} other The new value to use if the string already equals the first value passed in
 * @return {String} The new value
 */
String.prototype.toggle = function(value, other){
    return this == value ? other : value;
};

/**
 * Trims whitespace from either end of a string, leaving spaces within the string intact.  Example:
 * <pre><code>
var s = '  foo bar  ';
alert('-' + s + '-');         //alerts "- foo bar -"
alert('-' + s.trim() + '-');  //alerts "-foo bar-"
</code></pre>
 * @return {String} The trimmed string
 */
String.prototype.trim = function(){
    var re = /^\s+|\s+$/g;
    return function(){ return this.replace(re, ""); };
}();
/**
 * @class Number
 */
Ext.applyIf(Number.prototype, {
    /**
     * Checks whether or not the current number is within a desired range.  If the number is already within the
     * range it is returned, otherwise the min or max value is returned depending on which side of the range is
     * exceeded.  Note that this method returns the constrained value but does not change the current number.
     * @param {Number} min The minimum number in the range
     * @param {Number} max The maximum number in the range
     * @return {Number} The constrained value if outside the range, otherwise the current value
     */
    constrain : function(min, max){
        return Math.min(Math.max(this, min), max);
    }
});
/**
 * @class Array
 */
Ext.applyIf(Array.prototype, {
    /**
     * Checks whether or not the specified object exists in the array.
     * @param {Object} o The object to check for
     * @return {Number} The index of o in the array (or -1 if it is not found)
     */
    indexOf : function(o){
       for (var i = 0, len = this.length; i < len; i++){
 	      if(this[i] == o) return i;
       }
 	   return -1;
    },

    /**
     * Removes the specified object from the array.  If the object is not found nothing happens.
     * @param {Object} o The object to remove
     * @return {Array} this array
     */
    remove : function(o){
       var index = this.indexOf(o);
       if(index != -1){
           this.splice(index, 1);
       }
       return this;
    }
});

/**
 Returns the number of milliseconds between this date and date
 @param {Date} date (optional) Defaults to now
 @return {Number} The diff in milliseconds
 @member Date getElapsed
 */
Date.prototype.getElapsed = function(date) {
	return Math.abs((date || new Date()).getTime()-this.getTime());
};


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

    Ext.lib.Dom = {
        getViewWidth : function(full) {
            return full ? this.getDocumentWidth() : this.getViewportWidth();
        },

        getViewHeight : function(full) {
            return full ? this.getDocumentHeight() : this.getViewportHeight();
        },

        getDocumentHeight: function() {
            var scrollHeight = (document.compatMode != "CSS1Compat") ? document.body.scrollHeight : document.documentElement.scrollHeight;
            return Math.max(scrollHeight, this.getViewportHeight());
        },

        getDocumentWidth: function() {
            var scrollWidth = (document.compatMode != "CSS1Compat") ? document.body.scrollWidth : document.documentElement.scrollWidth;
            return Math.max(scrollWidth, this.getViewportWidth());
        },

        getViewportHeight: function(){
            if(Ext.isIE){
                return Ext.isStrict ? document.documentElement.clientHeight :
                         document.body.clientHeight;
            }else{
                return self.innerHeight;
            }
        },

        getViewportWidth: function() {
            if(Ext.isIE){
                return Ext.isStrict ? document.documentElement.clientWidth :
                         document.body.clientWidth;
            }else{
                return self.innerWidth;
            }
        },

        isAncestor : function(p, c) {
            p = Ext.getDom(p);
            c = Ext.getDom(c);
            if (!p || !c) {
                return false;
            }

            if (p.contains && !Ext.isSafari) {
                return p.contains(c);
            } else if (p.compareDocumentPosition) {
                return !!(p.compareDocumentPosition(c) & 16);
            } else {
                var parent = c.parentNode;
                while (parent) {
                    if (parent == p) {
                        return true;
                    }
                    else if (!parent.tagName || parent.tagName.toUpperCase() == "HTML") {
                        return false;
                    }
                    parent = parent.parentNode;
                }
                return false;
            }
        },

        getRegion : function(el) {
            return Ext.lib.Region.getRegion(el);
        },

        getY : function(el) {
            return this.getXY(el)[1];
        },

        getX : function(el) {
            return this.getXY(el)[0];
        },


        getXY : function(el) {
            var p, pe, b, scroll, bd = (document.body || document.documentElement);
            el = Ext.getDom(el);

            if(el == bd){
                return [0, 0];
            }

            if (el.getBoundingClientRect) {
                b = el.getBoundingClientRect();
                scroll = fly(document).getScroll();
                return [b.left + scroll.left, b.top + scroll.top];
            }
            var x = 0, y = 0;

            p = el;

            var hasAbsolute = fly(el).getStyle("position") == "absolute";

            while (p) {

                x += p.offsetLeft;
                y += p.offsetTop;

                if (!hasAbsolute && fly(p).getStyle("position") == "absolute") {
                    hasAbsolute = true;
                }

                if (Ext.isGecko) {
                    pe = fly(p);

                    var bt = parseInt(pe.getStyle("borderTopWidth"), 10) || 0;
                    var bl = parseInt(pe.getStyle("borderLeftWidth"), 10) || 0;


                    x += bl;
                    y += bt;


                    if (p != el && pe.getStyle('overflow') != 'visible') {
                        x += bl;
                        y += bt;
                    }
                }
                p = p.offsetParent;
            }

            if (Ext.isSafari && hasAbsolute) {
                x -= bd.offsetLeft;
                y -= bd.offsetTop;
            }

            if (Ext.isGecko && !hasAbsolute) {
                var dbd = fly(bd);
                x += parseInt(dbd.getStyle("borderLeftWidth"), 10) || 0;
                y += parseInt(dbd.getStyle("borderTopWidth"), 10) || 0;
            }

            p = el.parentNode;
            while (p && p != bd) {
                if (!Ext.isOpera || (p.tagName != 'TR' && fly(p).getStyle("display") != "inline")) {
                    x -= p.scrollLeft;
                    y -= p.scrollTop;
                }
                p = p.parentNode;
            }
            return [x, y];
        },

        setXY : function(el, xy) {
            el = Ext.fly(el, '_setXY');
            el.position();
            var pts = el.translatePoints(xy);
            if (xy[0] !== false) {
                el.dom.style.left = pts.left + "px";
            }
            if (xy[1] !== false) {
                el.dom.style.top = pts.top + "px";
            }
        },

        setX : function(el, x) {
            this.setXY(el, [x, false]);
        },

        setY : function(el, y) {
            this.setXY(el, [false, y]);
        }
    };

/*
 * Portions of this file are based on pieces of Yahoo User Interface Library
 * Copyright (c) 2007, Yahoo! Inc. All rights reserved.
 * YUI licensed under the BSD License:
 * http://developer.yahoo.net/yui/license.txt
 */
    Ext.lib.Event = function() {
        var loadComplete = false;
        var listeners = [];
        var unloadListeners = [];
        var retryCount = 0;
        var onAvailStack = [];
        var counter = 0;
        var lastError = null;

        return {
            POLL_RETRYS: 200,
            POLL_INTERVAL: 20,
            EL: 0,
            TYPE: 1,
            FN: 2,
            WFN: 3,
            OBJ: 3,
            ADJ_SCOPE: 4,
            _interval: null,

            startInterval: function() {
                if (!this._interval) {
                    var self = this;
                    var callback = function() {
                        self._tryPreloadAttach();
                    };
                    this._interval = setInterval(callback, this.POLL_INTERVAL);

                }
            },

            onAvailable: function(p_id, p_fn, p_obj, p_override) {
                onAvailStack.push({ id:         p_id,
                    fn:         p_fn,
                    obj:        p_obj,
                    override:   p_override,
                    checkReady: false    });

                retryCount = this.POLL_RETRYS;
                this.startInterval();
            },


            addListener: function(el, eventName, fn) {
                el = Ext.getDom(el);
                if (!el || !fn) {
                    return false;
                }

                if ("unload" == eventName) {
                    unloadListeners[unloadListeners.length] =
                    [el, eventName, fn];
                    return true;
                }

                // prevent unload errors with simple check
                var wrappedFn = function(e) {
                    return typeof Ext != 'undefined' ? fn(Ext.lib.Event.getEvent(e)) : false;
                };

                var li = [el, eventName, fn, wrappedFn];

                var index = listeners.length;
                listeners[index] = li;

                this.doAdd(el, eventName, wrappedFn, false);
                return true;

            },


            removeListener: function(el, eventName, fn) {
                var i, len;

                el = Ext.getDom(el);

                if(!fn) {
                    return this.purgeElement(el, false, eventName);
                }


                if ("unload" == eventName) {

                    for (i = 0,len = unloadListeners.length; i < len; i++) {
                        var li = unloadListeners[i];
                        if (li &&
                            li[0] == el &&
                            li[1] == eventName &&
                            li[2] == fn) {
                            unloadListeners.splice(i, 1);
                            return true;
                        }
                    }

                    return false;
                }

                var cacheItem = null;


                var index = arguments[3];

                if ("undefined" == typeof index) {
                    index = this._getCacheIndex(el, eventName, fn);
                }

                if (index >= 0) {
                    cacheItem = listeners[index];
                }

                if (!el || !cacheItem) {
                    return false;
                }

                this.doRemove(el, eventName, cacheItem[this.WFN], false);

                delete listeners[index][this.WFN];
                delete listeners[index][this.FN];
                listeners.splice(index, 1);

                return true;

            },


            getTarget: function(ev, resolveTextNode) {
                ev = ev.browserEvent || ev;
                var t = ev.target || ev.srcElement;
                return this.resolveTextNode(t);
            },


            resolveTextNode: function(node) {
                if (Ext.isSafari && node && 3 == node.nodeType) {
                    return node.parentNode;
                } else {
                    return node;
                }
            },


            getPageX: function(ev) {
                ev = ev.browserEvent || ev;
                var x = ev.pageX;
                if (!x && 0 !== x) {
                    x = ev.clientX || 0;

                    if (Ext.isIE) {
                        x += this.getScroll()[1];
                    }
                }

                return x;
            },


            getPageY: function(ev) {
                ev = ev.browserEvent || ev;
                var y = ev.pageY;
                if (!y && 0 !== y) {
                    y = ev.clientY || 0;

                    if (Ext.isIE) {
                        y += this.getScroll()[0];
                    }
                }


                return y;
            },


            getXY: function(ev) {
                ev = ev.browserEvent || ev;
                return [this.getPageX(ev), this.getPageY(ev)];
            },


            getRelatedTarget: function(ev) {
                ev = ev.browserEvent || ev;
                var t = ev.relatedTarget;
                if (!t) {
                    if (ev.type == "mouseout") {
                        t = ev.toElement;
                    } else if (ev.type == "mouseover") {
                        t = ev.fromElement;
                    }
                }

                return this.resolveTextNode(t);
            },


            getTime: function(ev) {
                ev = ev.browserEvent || ev;
                if (!ev.time) {
                    var t = new Date().getTime();
                    try {
                        ev.time = t;
                    } catch(ex) {
                        this.lastError = ex;
                        return t;
                    }
                }

                return ev.time;
            },


            stopEvent: function(ev) {
                this.stopPropagation(ev);
                this.preventDefault(ev);
            },


            stopPropagation: function(ev) {
                ev = ev.browserEvent || ev;
                if (ev.stopPropagation) {
                    ev.stopPropagation();
                } else {
                    ev.cancelBubble = true;
                }
            },


            preventDefault: function(ev) {
                ev = ev.browserEvent || ev;
                if(ev.preventDefault) {
                    ev.preventDefault();
                } else {
                    ev.returnValue = false;
                }
            },


            getEvent: function(e) {
                var ev = e || window.event;
                if (!ev) {
                    var c = this.getEvent.caller;
                    while (c) {
                        ev = c.arguments[0];
                        if (ev && Event == ev.constructor) {
                            break;
                        }
                        c = c.caller;
                    }
                }
                return ev;
            },


            getCharCode: function(ev) {
                ev = ev.browserEvent || ev;
                return ev.charCode || ev.keyCode || 0;
            },


            _getCacheIndex: function(el, eventName, fn) {
                for (var i = 0,len = listeners.length; i < len; ++i) {
                    var li = listeners[i];
                    if (li &&
                        li[this.FN] == fn &&
                        li[this.EL] == el &&
                        li[this.TYPE] == eventName) {
                        return i;
                    }
                }

                return -1;
            },


            elCache: {},


            getEl: function(id) {
                return document.getElementById(id);
            },


            clearCache: function() {
            },


            _load: function(e) {
                loadComplete = true;
                var EU = Ext.lib.Event;


                if (Ext.isIE) {
                    EU.doRemove(window, "load", EU._load);
                }
            },


            _tryPreloadAttach: function() {

                if (this.locked) {
                    return false;
                }

                this.locked = true;


                var tryAgain = !loadComplete;
                if (!tryAgain) {
                    tryAgain = (retryCount > 0);
                }


                var notAvail = [];
                for (var i = 0,len = onAvailStack.length; i < len; ++i) {
                    var item = onAvailStack[i];
                    if (item) {
                        var el = this.getEl(item.id);

                        if (el) {
                            if (!item.checkReady ||
                                loadComplete ||
                                el.nextSibling ||
                                (document && document.body)) {

                                var scope = el;
                                if (item.override) {
                                    if (item.override === true) {
                                        scope = item.obj;
                                    } else {
                                        scope = item.override;
                                    }
                                }
                                item.fn.call(scope, item.obj);
                                onAvailStack[i] = null;
                            }
                        } else {
                            notAvail.push(item);
                        }
                    }
                }

                retryCount = (notAvail.length === 0) ? 0 : retryCount - 1;

                if (tryAgain) {

                    this.startInterval();
                } else {
                    clearInterval(this._interval);
                    this._interval = null;
                }

                this.locked = false;

                return true;

            },


            purgeElement: function(el, recurse, eventName) {
                var elListeners = this.getListeners(el, eventName);
                if (elListeners) {
                    for (var i = 0,len = elListeners.length; i < len; ++i) {
                        var l = elListeners[i];
                        this.removeListener(el, l.type, l.fn);
                    }
                }

                if (recurse && el && el.childNodes) {
                    for (i = 0,len = el.childNodes.length; i < len; ++i) {
                        this.purgeElement(el.childNodes[i], recurse, eventName);
                    }
                }
            },


            getListeners: function(el, eventName) {
                var results = [], searchLists;
                if (!eventName) {
                    searchLists = [listeners, unloadListeners];
                } else if (eventName == "unload") {
                    searchLists = [unloadListeners];
                } else {
                    searchLists = [listeners];
                }

                for (var j = 0; j < searchLists.length; ++j) {
                    var searchList = searchLists[j];
                    if (searchList && searchList.length > 0) {
                        for (var i = 0,len = searchList.length; i < len; ++i) {
                            var l = searchList[i];
                            if (l && l[this.EL] === el &&
                                (!eventName || eventName === l[this.TYPE])) {
                                results.push({
                                    type:   l[this.TYPE],
                                    fn:     l[this.FN],
                                    obj:    l[this.OBJ],
                                    adjust: l[this.ADJ_SCOPE],
                                    index:  i
                                });
                            }
                        }
                    }
                }

                return (results.length) ? results : null;
            },


            _unload: function(e) {

                var EU = Ext.lib.Event, i, j, l, len, index;

                for (i = 0,len = unloadListeners.length; i < len; ++i) {
                    l = unloadListeners[i];
                    if (l) {
                        var scope = window;
                        if (l[EU.ADJ_SCOPE]) {
                            if (l[EU.ADJ_SCOPE] === true) {
                                scope = l[EU.OBJ];
                            } else {
                                scope = l[EU.ADJ_SCOPE];
                            }
                        }
                        l[EU.FN].call(scope, EU.getEvent(e), l[EU.OBJ]);
                        unloadListeners[i] = null;
                        l = null;
                        scope = null;
                    }
                }

                unloadListeners = null;

                if (listeners && listeners.length > 0) {
                    j = listeners.length;
                    while (j) {
                        index = j - 1;
                        l = listeners[index];
                        if (l) {
                            EU.removeListener(l[EU.EL], l[EU.TYPE],
                                    l[EU.FN], index);
                        }
                        j = j - 1;
                    }
                    l = null;

                    EU.clearCache();
                }

                EU.doRemove(window, "unload", EU._unload);

            },


            getScroll: function() {
                var dd = document.documentElement, db = document.body;
                if (dd && (dd.scrollTop || dd.scrollLeft)) {
                    return [dd.scrollTop, dd.scrollLeft];
                } else if (db) {
                    return [db.scrollTop, db.scrollLeft];
                } else {
                    return [0, 0];
                }
            },


            doAdd: function () {
                if (window.addEventListener) {
                    return function(el, eventName, fn, capture) {
                        el.addEventListener(eventName, fn, (capture));
                    };
                } else if (window.attachEvent) {
                    return function(el, eventName, fn, capture) {
                        el.attachEvent("on" + eventName, fn);
                    };
                } else {
                    return function() {
                    };
                }
            }(),


            doRemove: function() {
                if (window.removeEventListener) {
                    return function (el, eventName, fn, capture) {
                        el.removeEventListener(eventName, fn, (capture));
                    };
                } else if (window.detachEvent) {
                    return function (el, eventName, fn) {
                        el.detachEvent("on" + eventName, fn);
                    };
                } else {
                    return function() {
                    };
                }
            }()
        };

    }();

    var E = Ext.lib.Event;
    E.on = E.addListener;
    E.un = E.removeListener;
    if(document && document.body) {
        E._load();
    } else {
        E.doAdd(window, "load", E._load);
    }
    E.doAdd(window, "unload", E._unload);
    E._tryPreloadAttach();

    Ext.lib.Ajax = {
        request : function(method, uri, cb, data, options) {
            if(options){
                var hs = options.headers;
                if(hs){
                    for(var h in hs){
                        if(hs.hasOwnProperty(h)){
                            this.initHeader(h, hs[h], false);
                        }
                    }
                }
                if(options.xmlData){
                    if (!hs || !hs['Content-Type']){
                        this.initHeader('Content-Type', 'text/xml', false);
                    }
                    method = (method ? method : (options.method ? options.method : 'POST'));
                    data = options.xmlData;
                }else if(options.jsonData){
                    if (!hs || !hs['Content-Type']){
                        this.initHeader('Content-Type', 'application/json', false);
                    }
                    method = (method ? method : (options.method ? options.method : 'POST'));
                    data = typeof options.jsonData == 'object' ? Ext.encode(options.jsonData) : options.jsonData;
                }
            }

            return this.asyncRequest(method, uri, cb, data);
        },

        serializeForm : function(form) {
            if(typeof form == 'string') {
                form = (document.getElementById(form) || document.forms[form]);
            }

            var el, name, val, disabled, data = '', hasSubmit = false;
            for (var i = 0; i < form.elements.length; i++) {
                el = form.elements[i];
                disabled = form.elements[i].disabled;
                name = form.elements[i].name;
                val = form.elements[i].value;

                if (!disabled && name){
                    switch (el.type)
                            {
                        case 'select-one':
                        case 'select-multiple':
                            for (var j = 0; j < el.options.length; j++) {
                                if (el.options[j].selected) {
                                    if (Ext.isIE) {
                                        data += encodeURIComponent(name) + '=' + encodeURIComponent(el.options[j].attributes['value'].specified ? el.options[j].value : el.options[j].text) + '&';
                                    }
                                    else {
                                        data += encodeURIComponent(name) + '=' + encodeURIComponent(el.options[j].hasAttribute('value') ? el.options[j].value : el.options[j].text) + '&';
                                    }
                                }
                            }
                            break;
                        case 'radio':
                        case 'checkbox':
                            if (el.checked) {
                                data += encodeURIComponent(name) + '=' + encodeURIComponent(val) + '&';
                            }
                            break;
                        case 'file':

                        case undefined:

                        case 'reset':

                        case 'button':

                            break;
                        case 'submit':
                            if(hasSubmit == false) {
                                data += encodeURIComponent(name) + '=' + encodeURIComponent(val) + '&';
                                hasSubmit = true;
                            }
                            break;
                        default:
                            data += encodeURIComponent(name) + '=' + encodeURIComponent(val) + '&';
                            break;
                    }
                }
            }
            data = data.substr(0, data.length - 1);
            return data;
        },

        headers:{},

        hasHeaders:false,

        useDefaultHeader:true,

        defaultPostHeader:'application/x-www-form-urlencoded; charset=UTF-8',

        useDefaultXhrHeader:true,

        defaultXhrHeader:'XMLHttpRequest',

        hasDefaultHeaders:true,

        defaultHeaders:{},

        poll:{},

        timeout:{},

        pollInterval:50,

        transactionId:0,

        setProgId:function(id)
        {
            this.activeX.unshift(id);
        },

        setDefaultPostHeader:function(b)
        {
            this.useDefaultHeader = b;
        },

        setDefaultXhrHeader:function(b)
        {
            this.useDefaultXhrHeader = b;
        },

        setPollingInterval:function(i)
        {
            if (typeof i == 'number' && isFinite(i)) {
                this.pollInterval = i;
            }
        },

        createXhrObject:function(transactionId)
        {
            var obj,http;
            try
            {

                http = new XMLHttpRequest();

                obj = { conn:http, tId:transactionId };
            }
            catch(e)
            {
                for (var i = 0; i < this.activeX.length; ++i) {
                    try
                    {

                        http = new ActiveXObject(this.activeX[i]);

                        obj = { conn:http, tId:transactionId };
                        break;
                    }
                    catch(e) {
                    }
                }
            }
            finally
            {
                return obj;
            }
        },

        getConnectionObject:function()
        {
            var o;
            var tId = this.transactionId;

            try
            {
                o = this.createXhrObject(tId);
                if (o) {
                    this.transactionId++;
                }
            }
            catch(e) {
            }
            finally
            {
                return o;
            }
        },

        asyncRequest:function(method, uri, callback, postData)
        {
            var o = this.getConnectionObject();

            if (!o) {
                return null;
            }
            else {
                o.conn.open(method, uri, true);

                if (this.useDefaultXhrHeader) {
                    if (!this.defaultHeaders['X-Requested-With']) {
                        this.initHeader('X-Requested-With', this.defaultXhrHeader, true);
                    }
                }

                if(postData && this.useDefaultHeader && (!this.hasHeaders || !this.headers['Content-Type'])){
                    this.initHeader('Content-Type', this.defaultPostHeader);
                }

                 if (this.hasDefaultHeaders || this.hasHeaders) {
                    this.setHeader(o);
                }

                this.handleReadyState(o, callback);
                o.conn.send(postData || null);

                return o;
            }
        },

        handleReadyState:function(o, callback)
        {
            var oConn = this;

            if (callback && callback.timeout) {
                this.timeout[o.tId] = window.setTimeout(function() {
                    oConn.abort(o, callback, true);
                }, callback.timeout);
            }

            this.poll[o.tId] = window.setInterval(
                    function() {
                        if (o.conn && o.conn.readyState == 4) {
                            window.clearInterval(oConn.poll[o.tId]);
                            delete oConn.poll[o.tId];

                            if (callback && callback.timeout) {
                                window.clearTimeout(oConn.timeout[o.tId]);
                                delete oConn.timeout[o.tId];
                            }

                            oConn.handleTransactionResponse(o, callback);
                        }
                    }
                    , this.pollInterval);
        },

        handleTransactionResponse:function(o, callback, isAbort)
        {

            if (!callback) {
                this.releaseObject(o);
                return;
            }

            var httpStatus, responseObject;

            try
            {
                if (o.conn.status !== undefined && o.conn.status != 0) {
                    httpStatus = o.conn.status;
                }
                else {
                    httpStatus = 13030;
                }
            }
            catch(e) {


                httpStatus = 13030;
            }

            if (httpStatus >= 200 && httpStatus < 300) {
                responseObject = this.createResponseObject(o, callback.argument);
                if (callback.success) {
                    if (!callback.scope) {
                        callback.success(responseObject);
                    }
                    else {


                        callback.success.apply(callback.scope, [responseObject]);
                    }
                }
            }
            else {
                switch (httpStatus) {

                    case 12002:
                    case 12029:
                    case 12030:
                    case 12031:
                    case 12152:
                    case 13030:
                        responseObject = this.createExceptionObject(o.tId, callback.argument, (isAbort ? isAbort : false));
                        if (callback.failure) {
                            if (!callback.scope) {
                                callback.failure(responseObject);
                            }
                            else {
                                callback.failure.apply(callback.scope, [responseObject]);
                            }
                        }
                        break;
                    default:
                        responseObject = this.createResponseObject(o, callback.argument);
                        if (callback.failure) {
                            if (!callback.scope) {
                                callback.failure(responseObject);
                            }
                            else {
                                callback.failure.apply(callback.scope, [responseObject]);
                            }
                        }
                }
            }

            this.releaseObject(o);
            responseObject = null;
        },

        createResponseObject:function(o, callbackArg)
        {
            var obj = {};
            var headerObj = {};

            try
            {
                var headerStr = o.conn.getAllResponseHeaders();
                var header = headerStr.split('\n');
                for (var i = 0; i < header.length; i++) {
                    var delimitPos = header[i].indexOf(':');
                    if (delimitPos != -1) {
                        headerObj[header[i].substring(0, delimitPos)] = header[i].substring(delimitPos + 2);
                    }
                }
            }
            catch(e) {
            }

            obj.tId = o.tId;
            obj.status = o.conn.status;
            obj.statusText = o.conn.statusText;
            obj.getResponseHeader = headerObj;
            obj.getAllResponseHeaders = headerStr;
            obj.responseText = o.conn.responseText;
            obj.responseXML = o.conn.responseXML;

            if (typeof callbackArg !== undefined) {
                obj.argument = callbackArg;
            }

            return obj;
        },

        createExceptionObject:function(tId, callbackArg, isAbort)
        {
            var COMM_CODE = 0;
            var COMM_ERROR = 'communication failure';
            var ABORT_CODE = -1;
            var ABORT_ERROR = 'transaction aborted';

            var obj = {};

            obj.tId = tId;
            if (isAbort) {
                obj.status = ABORT_CODE;
                obj.statusText = ABORT_ERROR;
            }
            else {
                obj.status = COMM_CODE;
                obj.statusText = COMM_ERROR;
            }

            if (callbackArg) {
                obj.argument = callbackArg;
            }

            return obj;
        },

        initHeader:function(label, value, isDefault)
        {
            var headerObj = (isDefault) ? this.defaultHeaders : this.headers;

            if (headerObj[label] === undefined) {
                headerObj[label] = value;
            }
            else {


                headerObj[label] = value + "," + headerObj[label];
            }

            if (isDefault) {
                this.hasDefaultHeaders = true;
            }
            else {
                this.hasHeaders = true;
            }
        },


        setHeader:function(o)
        {
            if (this.hasDefaultHeaders) {
                for (var prop in this.defaultHeaders) {
                    if (this.defaultHeaders.hasOwnProperty(prop)) {
                        o.conn.setRequestHeader(prop, this.defaultHeaders[prop]);
                    }
                }
            }

            if (this.hasHeaders) {
                for (var prop in this.headers) {
                    if (this.headers.hasOwnProperty(prop)) {
                        o.conn.setRequestHeader(prop, this.headers[prop]);
                    }
                }
                this.headers = {};
                this.hasHeaders = false;
            }
        },

        resetDefaultHeaders:function() {
            delete this.defaultHeaders;
            this.defaultHeaders = {};
            this.hasDefaultHeaders = false;
        },

        abort:function(o, callback, isTimeout)
        {
            if (this.isCallInProgress(o)) {
                o.conn.abort();
                window.clearInterval(this.poll[o.tId]);
                delete this.poll[o.tId];
                if (isTimeout) {
                    delete this.timeout[o.tId];
                }

                this.handleTransactionResponse(o, callback, true);

                return true;
            }
            else {
                return false;
            }
        },


        isCallInProgress:function(o)
        {


            if (o.conn) {
                return o.conn.readyState != 4 && o.conn.readyState != 0;
            }
            else {

                return false;
            }
        },


        releaseObject:function(o)
        {

            o.conn = null;

            o = null;
        },

        activeX:[
        'MSXML2.XMLHTTP.3.0',
        'MSXML2.XMLHTTP',
        'Microsoft.XMLHTTP'
        ]


    };


    Ext.lib.Region = function(t, r, b, l) {
        this.top = t;
        this[1] = t;
        this.right = r;
        this.bottom = b;
        this.left = l;
        this[0] = l;
    };

    Ext.lib.Region.prototype = {
        contains : function(region) {
            return ( region.left >= this.left &&
                     region.right <= this.right &&
                     region.top >= this.top &&
                     region.bottom <= this.bottom    );

        },

        getArea : function() {
            return ( (this.bottom - this.top) * (this.right - this.left) );
        },

        intersect : function(region) {
            var t = Math.max(this.top, region.top);
            var r = Math.min(this.right, region.right);
            var b = Math.min(this.bottom, region.bottom);
            var l = Math.max(this.left, region.left);

            if (b >= t && r >= l) {
                return new Ext.lib.Region(t, r, b, l);
            } else {
                return null;
            }
        },
        union : function(region) {
            var t = Math.min(this.top, region.top);
            var r = Math.max(this.right, region.right);
            var b = Math.max(this.bottom, region.bottom);
            var l = Math.min(this.left, region.left);

            return new Ext.lib.Region(t, r, b, l);
        },

        constrainTo : function(r) {
            this.top = this.top.constrain(r.top, r.bottom);
            this.bottom = this.bottom.constrain(r.top, r.bottom);
            this.left = this.left.constrain(r.left, r.right);
            this.right = this.right.constrain(r.left, r.right);
            return this;
        },

        adjust : function(t, l, b, r) {
            this.top += t;
            this.left += l;
            this.right += r;
            this.bottom += b;
            return this;
        }
    };

    Ext.lib.Region.getRegion = function(el) {
        var p = Ext.lib.Dom.getXY(el);

        var t = p[1];
        var r = p[0] + el.offsetWidth;
        var b = p[1] + el.offsetHeight;
        var l = p[0];

        return new Ext.lib.Region(t, r, b, l);
    };

    Ext.lib.Point = function(x, y) {
        if (Ext.isArray(x)) {
            y = x[1];
            x = x[0];
        }
        this.x = this.right = this.left = this[0] = x;
        this.y = this.top = this.bottom = this[1] = y;
    };

    Ext.lib.Point.prototype = new Ext.lib.Region();


    Ext.lib.Anim = {
        scroll : function(el, args, duration, easing, cb, scope) {
            return this.run(el, args, duration, easing, cb, scope, Ext.lib.Scroll);
        },

        motion : function(el, args, duration, easing, cb, scope) {
            return this.run(el, args, duration, easing, cb, scope, Ext.lib.Motion);
        },

        color : function(el, args, duration, easing, cb, scope) {
            return this.run(el, args, duration, easing, cb, scope, Ext.lib.ColorAnim);
        },

        run : function(el, args, duration, easing, cb, scope, type) {
            type = type || Ext.lib.AnimBase;
            if (typeof easing == "string") {
                easing = Ext.lib.Easing[easing];
            }
            var anim = new type(el, args, duration, easing);
            anim.animateX(function() {
                Ext.callback(cb, scope);
            });
            return anim;
        }
    };


    function fly(el) {
        if (!libFlyweight) {
            libFlyweight = new Ext.Element.Flyweight();
        }
        libFlyweight.dom = el;
        return libFlyweight;
    }


    if(Ext.isIE) {
        function fnCleanUp() {
            var p = Function.prototype;
            delete p.createSequence;
            delete p.defer;
            delete p.createDelegate;
            delete p.createCallback;
            delete p.createInterceptor;

            window.detachEvent("onunload", fnCleanUp);
        }
        window.attachEvent("onunload", fnCleanUp);
    }

    Ext.lib.AnimBase = function(el, attributes, duration, method) {
        if (el) {
            this.init(el, attributes, duration, method);
        }
    };

    Ext.lib.AnimBase.prototype = {

        toString: function() {
            var el = this.getEl();
            var id = el.id || el.tagName;
            return ("Anim " + id);
        },

        patterns: {
            noNegatives:        /width|height|opacity|padding/i,
            offsetAttribute:  /^((width|height)|(top|left))$/,
            defaultUnit:        /width|height|top$|bottom$|left$|right$/i,
            offsetUnit:         /\d+(em|%|en|ex|pt|in|cm|mm|pc)$/i
        },


        doMethod: function(attr, start, end) {
            return this.method(this.currentFrame, start, end - start, this.totalFrames);
        },


        setAttribute: function(attr, val, unit) {
            if (this.patterns.noNegatives.test(attr)) {
                val = (val > 0) ? val : 0;
            }

            Ext.fly(this.getEl(), '_anim').setStyle(attr, val + unit);
        },


        getAttribute: function(attr) {
            var el = this.getEl();
            var val = fly(el).getStyle(attr);

            if (val !== 'auto' && !this.patterns.offsetUnit.test(val)) {
                return parseFloat(val);
            }

            var a = this.patterns.offsetAttribute.exec(attr) || [];
            var pos = !!( a[3] );
            var box = !!( a[2] );


            if (box || (fly(el).getStyle('position') == 'absolute' && pos)) {
                val = el['offset' + a[0].charAt(0).toUpperCase() + a[0].substr(1)];
            } else {
                val = 0;
            }

            return val;
        },


        getDefaultUnit: function(attr) {
            if (this.patterns.defaultUnit.test(attr)) {
                return 'px';
            }

            return '';
        },

        animateX : function(callback, scope) {
            var f = function() {
                this.onComplete.removeListener(f);
                if (typeof callback == "function") {
                    callback.call(scope || this, this);
                }
            };
            this.onComplete.addListener(f, this);
            this.animate();
        },


        setRuntimeAttribute: function(attr) {
            var start;
            var end;
            var attributes = this.attributes;

            this.runtimeAttributes[attr] = {};

            var isset = function(prop) {
                return (typeof prop !== 'undefined');
            };

            if (!isset(attributes[attr]['to']) && !isset(attributes[attr]['by'])) {
                return false;
            }

            start = ( isset(attributes[attr]['from']) ) ? attributes[attr]['from'] : this.getAttribute(attr);


            if (isset(attributes[attr]['to'])) {
                end = attributes[attr]['to'];
            } else if (isset(attributes[attr]['by'])) {
                if (start.constructor == Array) {
                    end = [];
                    for (var i = 0, len = start.length; i < len; ++i) {
                        end[i] = start[i] + attributes[attr]['by'][i];
                    }
                } else {
                    end = start + attributes[attr]['by'];
                }
            }

            this.runtimeAttributes[attr].start = start;
            this.runtimeAttributes[attr].end = end;


            this.runtimeAttributes[attr].unit = ( isset(attributes[attr].unit) ) ? attributes[attr]['unit'] : this.getDefaultUnit(attr);
        },


        init: function(el, attributes, duration, method) {

            var isAnimated = false;


            var startTime = null;


            var actualFrames = 0;


            el = Ext.getDom(el);


            this.attributes = attributes || {};


            this.duration = duration || 1;


            this.method = method || Ext.lib.Easing.easeNone;


            this.useSeconds = true;


            this.currentFrame = 0;


            this.totalFrames = Ext.lib.AnimMgr.fps;


            this.getEl = function() {
                return el;
            };


            this.isAnimated = function() {
                return isAnimated;
            };


            this.getStartTime = function() {
                return startTime;
            };

            this.runtimeAttributes = {};


            this.animate = function() {
                if (this.isAnimated()) {
                    return false;
                }

                this.currentFrame = 0;

                this.totalFrames = ( this.useSeconds ) ? Math.ceil(Ext.lib.AnimMgr.fps * this.duration) : this.duration;

                Ext.lib.AnimMgr.registerElement(this);
            };


            this.stop = function(finish) {
                if (finish) {
                    this.currentFrame = this.totalFrames;
                    this._onTween.fire();
                }
                Ext.lib.AnimMgr.stop(this);
            };

            var onStart = function() {
                this.onStart.fire();

                this.runtimeAttributes = {};
                for (var attr in this.attributes) {
                    this.setRuntimeAttribute(attr);
                }

                isAnimated = true;
                actualFrames = 0;
                startTime = new Date();
            };


            var onTween = function() {
                var data = {
                    duration: new Date() - this.getStartTime(),
                    currentFrame: this.currentFrame
                };

                data.toString = function() {
                    return (
                            'duration: ' + data.duration +
                            ', currentFrame: ' + data.currentFrame
                            );
                };

                this.onTween.fire(data);

                var runtimeAttributes = this.runtimeAttributes;

                for (var attr in runtimeAttributes) {
                    this.setAttribute(attr, this.doMethod(attr, runtimeAttributes[attr].start, runtimeAttributes[attr].end), runtimeAttributes[attr].unit);
                }

                actualFrames += 1;
            };

            var onComplete = function() {
                var actual_duration = (new Date() - startTime) / 1000 ;

                var data = {
                    duration: actual_duration,
                    frames: actualFrames,
                    fps: actualFrames / actual_duration
                };

                data.toString = function() {
                    return (
                            'duration: ' + data.duration +
                            ', frames: ' + data.frames +
                            ', fps: ' + data.fps
                            );
                };

                isAnimated = false;
                actualFrames = 0;
                this.onComplete.fire(data);
            };


            this._onStart = new Ext.util.Event(this);
            this.onStart = new Ext.util.Event(this);
            this.onTween = new Ext.util.Event(this);
            this._onTween = new Ext.util.Event(this);
            this.onComplete = new Ext.util.Event(this);
            this._onComplete = new Ext.util.Event(this);
            this._onStart.addListener(onStart);
            this._onTween.addListener(onTween);
            this._onComplete.addListener(onComplete);
        }
    };


    Ext.lib.AnimMgr = new function() {

        var thread = null;


        var queue = [];


        var tweenCount = 0;


        this.fps = 1000;


        this.delay = 1;


        this.registerElement = function(tween) {
            queue[queue.length] = tween;
            tweenCount += 1;
            tween._onStart.fire();
            this.start();
        };


        this.unRegister = function(tween, index) {
            tween._onComplete.fire();
            index = index || getIndex(tween);
            if (index != -1) {
                queue.splice(index, 1);
            }

            tweenCount -= 1;
            if (tweenCount <= 0) {
                this.stop();
            }
        };


        this.start = function() {
            if (thread === null) {
                thread = setInterval(this.run, this.delay);
            }
        };


        this.stop = function(tween) {
            if (!tween) {
                clearInterval(thread);

                for (var i = 0, len = queue.length; i < len; ++i) {
                    if (queue[0].isAnimated()) {
                        this.unRegister(queue[0], 0);
                    }
                }

                queue = [];
                thread = null;
                tweenCount = 0;
            }
            else {
                this.unRegister(tween);
            }
        };


        this.run = function() {
            for (var i = 0, len = queue.length; i < len; ++i) {
                var tween = queue[i];
                if (!tween || !tween.isAnimated()) {
                    continue;
                }

                if (tween.currentFrame < tween.totalFrames || tween.totalFrames === null)
                {
                    tween.currentFrame += 1;

                    if (tween.useSeconds) {
                        correctFrame(tween);
                    }
                    tween._onTween.fire();
                }
                else {
                    Ext.lib.AnimMgr.stop(tween, i);
                }
            }
        };

        var getIndex = function(anim) {
            for (var i = 0, len = queue.length; i < len; ++i) {
                if (queue[i] == anim) {
                    return i;
                }
            }
            return -1;
        };


        var correctFrame = function(tween) {
            var frames = tween.totalFrames;
            var frame = tween.currentFrame;
            var expected = (tween.currentFrame * tween.duration * 1000 / tween.totalFrames);
            var elapsed = (new Date() - tween.getStartTime());
            var tweak = 0;

            if (elapsed < tween.duration * 1000) {
                tweak = Math.round((elapsed / expected - 1) * tween.currentFrame);
            } else {
                tweak = frames - (frame + 1);
            }
            if (tweak > 0 && isFinite(tweak)) {
                if (tween.currentFrame + tweak >= frames) {
                    tweak = frames - (frame + 1);
                }

                tween.currentFrame += tweak;
            }
        };
    };

    Ext.lib.Bezier = new function() {

        this.getPosition = function(points, t) {
            var n = points.length;
            var tmp = [];

            for (var i = 0; i < n; ++i) {
                tmp[i] = [points[i][0], points[i][1]];
            }

            for (var j = 1; j < n; ++j) {
                for (i = 0; i < n - j; ++i) {
                    tmp[i][0] = (1 - t) * tmp[i][0] + t * tmp[parseInt(i + 1, 10)][0];
                    tmp[i][1] = (1 - t) * tmp[i][1] + t * tmp[parseInt(i + 1, 10)][1];
                }
            }

            return [ tmp[0][0], tmp[0][1] ];

        };
    };
    (function() {

        Ext.lib.ColorAnim = function(el, attributes, duration, method) {
            Ext.lib.ColorAnim.superclass.constructor.call(this, el, attributes, duration, method);
        };

        Ext.extend(Ext.lib.ColorAnim, Ext.lib.AnimBase);


        var Y = Ext.lib;
        var superclass = Y.ColorAnim.superclass;
        var proto = Y.ColorAnim.prototype;

        proto.toString = function() {
            var el = this.getEl();
            var id = el.id || el.tagName;
            return ("ColorAnim " + id);
        };

        proto.patterns.color = /color$/i;
        proto.patterns.rgb = /^rgb\(([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\)$/i;
        proto.patterns.hex = /^#?([0-9A-F]{2})([0-9A-F]{2})([0-9A-F]{2})$/i;
        proto.patterns.hex3 = /^#?([0-9A-F]{1})([0-9A-F]{1})([0-9A-F]{1})$/i;
        proto.patterns.transparent = /^transparent|rgba\(0, 0, 0, 0\)$/;


        proto.parseColor = function(s) {
            if (s.length == 3) {
                return s;
            }

            var c = this.patterns.hex.exec(s);
            if (c && c.length == 4) {
                return [ parseInt(c[1], 16), parseInt(c[2], 16), parseInt(c[3], 16) ];
            }

            c = this.patterns.rgb.exec(s);
            if (c && c.length == 4) {
                return [ parseInt(c[1], 10), parseInt(c[2], 10), parseInt(c[3], 10) ];
            }

            c = this.patterns.hex3.exec(s);
            if (c && c.length == 4) {
                return [ parseInt(c[1] + c[1], 16), parseInt(c[2] + c[2], 16), parseInt(c[3] + c[3], 16) ];
            }

            return null;
        };

        proto.getAttribute = function(attr) {
            var el = this.getEl();
            if (this.patterns.color.test(attr)) {
                var val = fly(el).getStyle(attr);

                if (this.patterns.transparent.test(val)) {
                    var parent = el.parentNode;
                    val = fly(parent).getStyle(attr);

                    while (parent && this.patterns.transparent.test(val)) {
                        parent = parent.parentNode;
                        val = fly(parent).getStyle(attr);
                        if (parent.tagName.toUpperCase() == 'HTML') {
                            val = '#fff';
                        }
                    }
                }
            } else {
                val = superclass.getAttribute.call(this, attr);
            }

            return val;
        };

        proto.doMethod = function(attr, start, end) {
            var val;

            if (this.patterns.color.test(attr)) {
                val = [];
                for (var i = 0, len = start.length; i < len; ++i) {
                    val[i] = superclass.doMethod.call(this, attr, start[i], end[i]);
                }

                val = 'rgb(' + Math.floor(val[0]) + ',' + Math.floor(val[1]) + ',' + Math.floor(val[2]) + ')';
            }
            else {
                val = superclass.doMethod.call(this, attr, start, end);
            }

            return val;
        };

        proto.setRuntimeAttribute = function(attr) {
            superclass.setRuntimeAttribute.call(this, attr);

            if (this.patterns.color.test(attr)) {
                var attributes = this.attributes;
                var start = this.parseColor(this.runtimeAttributes[attr].start);
                var end = this.parseColor(this.runtimeAttributes[attr].end);

                if (typeof attributes[attr]['to'] === 'undefined' && typeof attributes[attr]['by'] !== 'undefined') {
                    end = this.parseColor(attributes[attr].by);

                    for (var i = 0, len = start.length; i < len; ++i) {
                        end[i] = start[i] + end[i];
                    }
                }

                this.runtimeAttributes[attr].start = start;
                this.runtimeAttributes[attr].end = end;
            }
        };
    })();


    Ext.lib.Easing = {


        easeNone: function (t, b, c, d) {
            return c * t / d + b;
        },


        easeIn: function (t, b, c, d) {
            return c * (t /= d) * t + b;
        },


        easeOut: function (t, b, c, d) {
            return -c * (t /= d) * (t - 2) + b;
        },


        easeBoth: function (t, b, c, d) {
            if ((t /= d / 2) < 1) {
                return c / 2 * t * t + b;
            }

            return -c / 2 * ((--t) * (t - 2) - 1) + b;
        },


        easeInStrong: function (t, b, c, d) {
            return c * (t /= d) * t * t * t + b;
        },


        easeOutStrong: function (t, b, c, d) {
            return -c * ((t = t / d - 1) * t * t * t - 1) + b;
        },


        easeBothStrong: function (t, b, c, d) {
            if ((t /= d / 2) < 1) {
                return c / 2 * t * t * t * t + b;
            }

            return -c / 2 * ((t -= 2) * t * t * t - 2) + b;
        },



        elasticIn: function (t, b, c, d, a, p) {
            if (t == 0) {
                return b;
            }
            if ((t /= d) == 1) {
                return b + c;
            }
            if (!p) {
                p = d * .3;
            }

            if (!a || a < Math.abs(c)) {
                a = c;
                var s = p / 4;
            }
            else {
                var s = p / (2 * Math.PI) * Math.asin(c / a);
            }

            return -(a * Math.pow(2, 10 * (t -= 1)) * Math.sin((t * d - s) * (2 * Math.PI) / p)) + b;
        },


        elasticOut: function (t, b, c, d, a, p) {
            if (t == 0) {
                return b;
            }
            if ((t /= d) == 1) {
                return b + c;
            }
            if (!p) {
                p = d * .3;
            }

            if (!a || a < Math.abs(c)) {
                a = c;
                var s = p / 4;
            }
            else {
                var s = p / (2 * Math.PI) * Math.asin(c / a);
            }

            return a * Math.pow(2, -10 * t) * Math.sin((t * d - s) * (2 * Math.PI) / p) + c + b;
        },


        elasticBoth: function (t, b, c, d, a, p) {
            if (t == 0) {
                return b;
            }

            if ((t /= d / 2) == 2) {
                return b + c;
            }

            if (!p) {
                p = d * (.3 * 1.5);
            }

            if (!a || a < Math.abs(c)) {
                a = c;
                var s = p / 4;
            }
            else {
                var s = p / (2 * Math.PI) * Math.asin(c / a);
            }

            if (t < 1) {
                return -.5 * (a * Math.pow(2, 10 * (t -= 1)) *
                              Math.sin((t * d - s) * (2 * Math.PI) / p)) + b;
            }
            return a * Math.pow(2, -10 * (t -= 1)) *
                   Math.sin((t * d - s) * (2 * Math.PI) / p) * .5 + c + b;
        },



        backIn: function (t, b, c, d, s) {
            if (typeof s == 'undefined') {
                s = 1.70158;
            }
            return c * (t /= d) * t * ((s + 1) * t - s) + b;
        },


        backOut: function (t, b, c, d, s) {
            if (typeof s == 'undefined') {
                s = 1.70158;
            }
            return c * ((t = t / d - 1) * t * ((s + 1) * t + s) + 1) + b;
        },


        backBoth: function (t, b, c, d, s) {
            if (typeof s == 'undefined') {
                s = 1.70158;
            }

            if ((t /= d / 2 ) < 1) {
                return c / 2 * (t * t * (((s *= (1.525)) + 1) * t - s)) + b;
            }
            return c / 2 * ((t -= 2) * t * (((s *= (1.525)) + 1) * t + s) + 2) + b;
        },


        bounceIn: function (t, b, c, d) {
            return c - Ext.lib.Easing.bounceOut(d - t, 0, c, d) + b;
        },


        bounceOut: function (t, b, c, d) {
            if ((t /= d) < (1 / 2.75)) {
                return c * (7.5625 * t * t) + b;
            } else if (t < (2 / 2.75)) {
                return c * (7.5625 * (t -= (1.5 / 2.75)) * t + .75) + b;
            } else if (t < (2.5 / 2.75)) {
                return c * (7.5625 * (t -= (2.25 / 2.75)) * t + .9375) + b;
            }
            return c * (7.5625 * (t -= (2.625 / 2.75)) * t + .984375) + b;
        },


        bounceBoth: function (t, b, c, d) {
            if (t < d / 2) {
                return Ext.lib.Easing.bounceIn(t * 2, 0, c, d) * .5 + b;
            }
            return Ext.lib.Easing.bounceOut(t * 2 - d, 0, c, d) * .5 + c * .5 + b;
        }
    };

    (function() {
        Ext.lib.Motion = function(el, attributes, duration, method) {
            if (el) {
                Ext.lib.Motion.superclass.constructor.call(this, el, attributes, duration, method);
            }
        };

        Ext.extend(Ext.lib.Motion, Ext.lib.ColorAnim);


        var Y = Ext.lib;
        var superclass = Y.Motion.superclass;
        var proto = Y.Motion.prototype;

        proto.toString = function() {
            var el = this.getEl();
            var id = el.id || el.tagName;
            return ("Motion " + id);
        };

        proto.patterns.points = /^points$/i;

        proto.setAttribute = function(attr, val, unit) {
            if (this.patterns.points.test(attr)) {
                unit = unit || 'px';
                superclass.setAttribute.call(this, 'left', val[0], unit);
                superclass.setAttribute.call(this, 'top', val[1], unit);
            } else {
                superclass.setAttribute.call(this, attr, val, unit);
            }
        };

        proto.getAttribute = function(attr) {
            if (this.patterns.points.test(attr)) {
                var val = [
                        superclass.getAttribute.call(this, 'left'),
                        superclass.getAttribute.call(this, 'top')
                        ];
            } else {
                val = superclass.getAttribute.call(this, attr);
            }

            return val;
        };

        proto.doMethod = function(attr, start, end) {
            var val = null;

            if (this.patterns.points.test(attr)) {
                var t = this.method(this.currentFrame, 0, 100, this.totalFrames) / 100;
                val = Y.Bezier.getPosition(this.runtimeAttributes[attr], t);
            } else {
                val = superclass.doMethod.call(this, attr, start, end);
            }
            return val;
        };

        proto.setRuntimeAttribute = function(attr) {
            if (this.patterns.points.test(attr)) {
                var el = this.getEl();
                var attributes = this.attributes;
                var start;
                var control = attributes['points']['control'] || [];
                var end;
                var i, len;

                if (control.length > 0 && !Ext.isArray(control[0])) {
                    control = [control];
                } else {
                    var tmp = [];
                    for (i = 0,len = control.length; i < len; ++i) {
                        tmp[i] = control[i];
                    }
                    control = tmp;
                }

                Ext.fly(el, '_anim').position();

                if (isset(attributes['points']['from'])) {
                    Ext.lib.Dom.setXY(el, attributes['points']['from']);
                }
                else {
                    Ext.lib.Dom.setXY(el, Ext.lib.Dom.getXY(el));
                }

                start = this.getAttribute('points');


                if (isset(attributes['points']['to'])) {
                    end = translateValues.call(this, attributes['points']['to'], start);

                    var pageXY = Ext.lib.Dom.getXY(this.getEl());
                    for (i = 0,len = control.length; i < len; ++i) {
                        control[i] = translateValues.call(this, control[i], start);
                    }


                } else if (isset(attributes['points']['by'])) {
                    end = [ start[0] + attributes['points']['by'][0], start[1] + attributes['points']['by'][1] ];

                    for (i = 0,len = control.length; i < len; ++i) {
                        control[i] = [ start[0] + control[i][0], start[1] + control[i][1] ];
                    }
                }

                this.runtimeAttributes[attr] = [start];

                if (control.length > 0) {
                    this.runtimeAttributes[attr] = this.runtimeAttributes[attr].concat(control);
                }

                this.runtimeAttributes[attr][this.runtimeAttributes[attr].length] = end;
            }
            else {
                superclass.setRuntimeAttribute.call(this, attr);
            }
        };

        var translateValues = function(val, start) {
            var pageXY = Ext.lib.Dom.getXY(this.getEl());
            val = [ val[0] - pageXY[0] + start[0], val[1] - pageXY[1] + start[1] ];

            return val;
        };

        var isset = function(prop) {
            return (typeof prop !== 'undefined');
        };
    })();


    (function() {
        Ext.lib.Scroll = function(el, attributes, duration, method) {
            if (el) {
                Ext.lib.Scroll.superclass.constructor.call(this, el, attributes, duration, method);
            }
        };

        Ext.extend(Ext.lib.Scroll, Ext.lib.ColorAnim);


        var Y = Ext.lib;
        var superclass = Y.Scroll.superclass;
        var proto = Y.Scroll.prototype;

        proto.toString = function() {
            var el = this.getEl();
            var id = el.id || el.tagName;
            return ("Scroll " + id);
        };

        proto.doMethod = function(attr, start, end) {
            var val = null;

            if (attr == 'scroll') {
                val = [
                        this.method(this.currentFrame, start[0], end[0] - start[0], this.totalFrames),
                        this.method(this.currentFrame, start[1], end[1] - start[1], this.totalFrames)
                        ];

            } else {
                val = superclass.doMethod.call(this, attr, start, end);
            }
            return val;
        };

        proto.getAttribute = function(attr) {
            var val = null;
            var el = this.getEl();

            if (attr == 'scroll') {
                val = [ el.scrollLeft, el.scrollTop ];
            } else {
                val = superclass.getAttribute.call(this, attr);
            }

            return val;
        };

        proto.setAttribute = function(attr, val, unit) {
            var el = this.getEl();

            if (attr == 'scroll') {
                el.scrollLeft = val[0];
                el.scrollTop = val[1];
            } else {
                superclass.setAttribute.call(this, attr, val, unit);
            }
        };
    })();


})();

/**
 * SWFObject v1.5: Flash Player detection and embed - http://blog.deconcept.com/swfobject/
 *
 * SWFObject is (c) 2007 Geoff Stearns and is released under the MIT License:
 * http://www.opensource.org/licenses/mit-license.php
 *
 */
if(typeof deconcept=="undefined"){var deconcept=new Object();}if(typeof deconcept.util=="undefined"){deconcept.util=new Object();}if(typeof deconcept.SWFObjectUtil=="undefined"){deconcept.SWFObjectUtil=new Object();}deconcept.SWFObject=function(_1,id,w,h,_5,c,_7,_8,_9,_a){if(!document.getElementById){return;}this.DETECT_KEY=_a?_a:"detectflash";this.skipDetect=deconcept.util.getRequestParameter(this.DETECT_KEY);this.params=new Object();this.variables=new Object();this.attributes=new Array();if(_1){this.setAttribute("swf",_1);}if(id){this.setAttribute("id",id);}if(w){this.setAttribute("width",w);}if(h){this.setAttribute("height",h);}if(_5){this.setAttribute("version",new deconcept.PlayerVersion(_5.toString().split(".")));}this.installedVer=deconcept.SWFObjectUtil.getPlayerVersion();if(!window.opera&&document.all&&this.installedVer.major>7){deconcept.SWFObject.doPrepUnload=true;}if(c){this.addParam("bgcolor",c);}var q=_7?_7:"high";this.addParam("quality",q);this.setAttribute("useExpressInstall",false);this.setAttribute("doExpressInstall",false);var _c=(_8)?_8:window.location;this.setAttribute("xiRedirectUrl",_c);this.setAttribute("redirectUrl","");if(_9){this.setAttribute("redirectUrl",_9);}};deconcept.SWFObject.prototype={useExpressInstall:function(_d){this.xiSWFPath=!_d?"expressinstall.swf":_d;this.setAttribute("useExpressInstall",true);},setAttribute:function(_e,_f){this.attributes[_e]=_f;},getAttribute:function(_10){return this.attributes[_10];},addParam:function(_11,_12){this.params[_11]=_12;},getParams:function(){return this.params;},addVariable:function(_13,_14){this.variables[_13]=_14;},getVariable:function(_15){return this.variables[_15];},getVariables:function(){return this.variables;},getVariablePairs:function(){var _16=new Array();var key;var _18=this.getVariables();for(key in _18){_16[_16.length]=key+"="+_18[key];}return _16;},getSWFHTML:function(){var _19="";if(navigator.plugins&&navigator.mimeTypes&&navigator.mimeTypes.length){if(this.getAttribute("doExpressInstall")){this.addVariable("MMplayerType","PlugIn");this.setAttribute("swf",this.xiSWFPath);}_19="<embed type=\"application/x-shockwave-flash\" src=\""+this.getAttribute("swf")+"\" width=\""+this.getAttribute("width")+"\" height=\""+this.getAttribute("height")+"\" style=\""+this.getAttribute("style")+"\"";_19+=" id=\""+this.getAttribute("id")+"\" name=\""+this.getAttribute("id")+"\" ";var _1a=this.getParams();for(var key in _1a){_19+=[key]+"=\""+_1a[key]+"\" ";}var _1c=this.getVariablePairs().join("&");if(_1c.length>0){_19+="flashvars=\""+_1c+"\"";}_19+="/>";}else{if(this.getAttribute("doExpressInstall")){this.addVariable("MMplayerType","ActiveX");this.setAttribute("swf",this.xiSWFPath);}_19="<object id=\""+this.getAttribute("id")+"\" classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" width=\""+this.getAttribute("width")+"\" height=\""+this.getAttribute("height")+"\" style=\""+this.getAttribute("style")+"\">";_19+="<param name=\"movie\" value=\""+this.getAttribute("swf")+"\" />";var _1d=this.getParams();for(var key in _1d){_19+="<param name=\""+key+"\" value=\""+_1d[key]+"\" />";}var _1f=this.getVariablePairs().join("&");if(_1f.length>0){_19+="<param name=\"flashvars\" value=\""+_1f+"\" />";}_19+="</object>";}return _19;},write:function(_20){if(this.getAttribute("useExpressInstall")){var _21=new deconcept.PlayerVersion([6,0,65]);if(this.installedVer.versionIsValid(_21)&&!this.installedVer.versionIsValid(this.getAttribute("version"))){this.setAttribute("doExpressInstall",true);this.addVariable("MMredirectURL",escape(this.getAttribute("xiRedirectUrl")));document.title=document.title.slice(0,47)+" - Flash Player Installation";this.addVariable("MMdoctitle",document.title);}}if(this.skipDetect||this.getAttribute("doExpressInstall")||this.installedVer.versionIsValid(this.getAttribute("version"))){var n=(typeof _20=="string")?document.getElementById(_20):_20;n.innerHTML=this.getSWFHTML();return true;}else{if(this.getAttribute("redirectUrl")!=""){document.location.replace(this.getAttribute("redirectUrl"));}}return false;}};deconcept.SWFObjectUtil.getPlayerVersion=function(){var _23=new deconcept.PlayerVersion([0,0,0]);if(navigator.plugins&&navigator.mimeTypes.length){var x=navigator.plugins["Shockwave Flash"];if(x&&x.description){_23=new deconcept.PlayerVersion(x.description.replace(/([a-zA-Z]|\s)+/,"").replace(/(\s+r|\s+b[0-9]+)/,".").split("."));}}else{if(navigator.userAgent&&navigator.userAgent.indexOf("Windows CE")>=0){var axo=1;var _26=3;while(axo){try{_26++;axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash."+_26);_23=new deconcept.PlayerVersion([_26,0,0]);}catch(e){axo=null;}}}else{try{var axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7");}catch(e){try{var axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");_23=new deconcept.PlayerVersion([6,0,21]);axo.AllowScriptAccess="always";}catch(e){if(_23.major==6){return _23;}}try{axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash");}catch(e){}}if(axo!=null){_23=new deconcept.PlayerVersion(axo.GetVariable("$version").split(" ")[1].split(","));}}}return _23;};deconcept.PlayerVersion=function(_29){this.major=_29[0]!=null?parseInt(_29[0]):0;this.minor=_29[1]!=null?parseInt(_29[1]):0;this.rev=_29[2]!=null?parseInt(_29[2]):0;};deconcept.PlayerVersion.prototype.versionIsValid=function(fv){if(this.major<fv.major){return false;}if(this.major>fv.major){return true;}if(this.minor<fv.minor){return false;}if(this.minor>fv.minor){return true;}if(this.rev<fv.rev){return false;}return true;};deconcept.util={getRequestParameter:function(_2b){var q=document.location.search||document.location.hash;if(_2b==null){return q;}if(q){var _2d=q.substring(1).split("&");for(var i=0;i<_2d.length;i++){if(_2d[i].substring(0,_2d[i].indexOf("="))==_2b){return _2d[i].substring((_2d[i].indexOf("=")+1));}}}return "";}};deconcept.SWFObjectUtil.cleanupSWFs=function(){var _2f=document.getElementsByTagName("OBJECT");for(var i=_2f.length-1;i>=0;i--){_2f[i].style.display="none";for(var x in _2f[i]){if(typeof _2f[i][x]=="function"){_2f[i][x]=function(){};}}}};if(deconcept.SWFObject.doPrepUnload){if(!deconcept.unloadSet){deconcept.SWFObjectUtil.prepUnload=function(){__flash_unloadHandler=function(){};__flash_savedUnloadHandler=function(){};window.attachEvent("onunload",deconcept.SWFObjectUtil.cleanupSWFs);};window.attachEvent("onbeforeunload",deconcept.SWFObjectUtil.prepUnload);deconcept.unloadSet=true;}}if(!document.getElementById&&document.all){document.getElementById=function(id){return document.all[id];};}var getQueryParamValue=deconcept.util.getRequestParameter;var FlashObject=deconcept.SWFObject;var SWFObject=deconcept.SWFObject;

Ext.DomHelper=function(){var o=null;var h=/^(?:br|frame|hr|img|input|link|meta|range|spacer|wbr|area|param|col)$/i;var b=/^table|tbody|tr|td$/i;var a=function(x){if(typeof x=="string"){return x}var r="";if(Ext.isArray(x)){for(var v=0,t=x.length;v<t;v++){r+=a(x[v])}return r}if(!x.tag){x.tag="div"}r+="<"+x.tag;for(var q in x){if(q=="tag"||q=="children"||q=="cn"||q=="html"||typeof x[q]=="function"){continue}if(q=="style"){var w=x.style;if(typeof w=="function"){w=w.call()}if(typeof w=="string"){r+=' style="'+w+'"'}else{if(typeof w=="object"){r+=' style="';for(var u in w){if(typeof w[u]!="function"){r+=u+":"+w[u]+";"}}r+='"'}}}else{if(q=="cls"){r+=' class="'+x.cls+'"'}else{if(q=="htmlFor"){r+=' for="'+x.htmlFor+'"'}else{r+=" "+q+'="'+x[q]+'"'}}}}if(h.test(x.tag)){r+="/>"}else{r+=">";var y=x.children||x.cn;if(y){r+=a(y)}else{if(x.html){r+=x.html}}r+="</"+x.tag+">"}return r};var p=function(w,r){var v;if(Ext.isArray(w)){v=document.createDocumentFragment();for(var u=0,s=w.length;u<s;u++){p(w[u],v)}}else{if(typeof w=="string"){v=document.createTextNode(w)}else{v=document.createElement(w.tag||"div");var t=!!v.setAttribute;for(var q in w){if(q=="tag"||q=="children"||q=="cn"||q=="html"||q=="style"||typeof w[q]=="function"){continue}if(q=="cls"){v.className=w.cls}else{if(t){v.setAttribute(q,w[q])}else{v[q]=w[q]}}}Ext.DomHelper.applyStyles(v,w.style);var x=w.children||w.cn;if(x){p(x,v)}else{if(w.html){v.innerHTML=w.html}}}}if(r){r.appendChild(v)}return v};var l=function(w,u,t,v){o.innerHTML=[u,t,v].join("");var q=-1,r=o;while(++q<w){r=r.firstChild}return r};var m="<table>",g="</table>",c=m+"<tbody>",n="</tbody>"+g,k=c+"<tr>",e="</tr>"+n;var i=function(q,r,t,s){if(!o){o=document.createElement("div")}var u;var v=null;if(q=="td"){if(r=="afterbegin"||r=="beforeend"){return}if(r=="beforebegin"){v=t;t=t.parentNode}else{v=t.nextSibling;t=t.parentNode}u=l(4,k,s,e)}else{if(q=="tr"){if(r=="beforebegin"){v=t;t=t.parentNode;u=l(3,c,s,n)}else{if(r=="afterend"){v=t.nextSibling;t=t.parentNode;u=l(3,c,s,n)}else{if(r=="afterbegin"){v=t.firstChild}u=l(4,k,s,e)}}}else{if(q=="tbody"){if(r=="beforebegin"){v=t;t=t.parentNode;u=l(2,m,s,g)}else{if(r=="afterend"){v=t.nextSibling;t=t.parentNode;u=l(2,m,s,g)}else{if(r=="afterbegin"){v=t.firstChild}u=l(3,c,s,n)}}}else{if(r=="beforebegin"||r=="afterend"){return}if(r=="afterbegin"){v=t.firstChild}u=l(2,m,s,g)}}}t.insertBefore(u,v);return u};return{useDom:false,markup:function(q){return a(q)},applyStyles:function(s,t){if(t){s=Ext.fly(s);if(typeof t=="string"){var r=/\s?([a-z\-]*)\:\s?([^;]*);?/gi;var u;while((u=r.exec(t))!=null){s.setStyle(u[1],u[2])}}else{if(typeof t=="object"){for(var q in t){s.setStyle(q,t[q])}}else{if(typeof t=="function"){Ext.DomHelper.applyStyles(s,t.call())}}}}},insertHtml:function(s,u,t){s=s.toLowerCase();if(u.insertAdjacentHTML){if(b.test(u.tagName)){var r;if(r=i(u.tagName.toLowerCase(),s,u,t)){return r}}switch(s){case"beforebegin":u.insertAdjacentHTML("BeforeBegin",t);return u.previousSibling;case"afterbegin":u.insertAdjacentHTML("AfterBegin",t);return u.firstChild;case"beforeend":u.insertAdjacentHTML("BeforeEnd",t);return u.lastChild;case"afterend":u.insertAdjacentHTML("AfterEnd",t);return u.nextSibling}throw'Illegal insertion point -> "'+s+'"'}var q=u.ownerDocument.createRange();var v;switch(s){case"beforebegin":q.setStartBefore(u);v=q.createContextualFragment(t);u.parentNode.insertBefore(v,u);return u.previousSibling;case"afterbegin":if(u.firstChild){q.setStartBefore(u.firstChild);v=q.createContextualFragment(t);u.insertBefore(v,u.firstChild);return u.firstChild}else{u.innerHTML=t;return u.firstChild}case"beforeend":if(u.lastChild){q.setStartAfter(u.lastChild);v=q.createContextualFragment(t);u.appendChild(v);return u.lastChild}else{u.innerHTML=t;return u.lastChild}case"afterend":q.setStartAfter(u);v=q.createContextualFragment(t);u.parentNode.insertBefore(v,u.nextSibling);return u.nextSibling}throw'Illegal insertion point -> "'+s+'"'},insertBefore:function(q,s,r){return this.doInsert(q,s,r,"beforeBegin")},insertAfter:function(q,s,r){return this.doInsert(q,s,r,"afterEnd","nextSibling")},insertFirst:function(q,s,r){return this.doInsert(q,s,r,"afterBegin","firstChild")},doInsert:function(t,v,u,w,s){t=Ext.getDom(t);var r;if(this.useDom){r=p(v,null);(s==="firstChild"?t:t.parentNode).insertBefore(r,s?t[s]:t)}else{var q=a(v);r=this.insertHtml(w,t,q)}return u?Ext.get(r,true):r},append:function(s,u,t){s=Ext.getDom(s);var r;if(this.useDom){r=p(u,null);s.appendChild(r)}else{var q=a(u);r=this.insertHtml("beforeEnd",s,q)}return t?Ext.get(r,true):r},overwrite:function(q,s,r){q=Ext.getDom(q);q.innerHTML=a(s);return r?Ext.get(q.firstChild,true):q.firstChild},createTemplate:function(r){var q=a(r);return new Ext.Template(q)}}}();Ext.Template=function(h){var c=arguments;if(Ext.isArray(h)){h=h.join("")}else{if(c.length>1){var e=[];for(var g=0,b=c.length;g<b;g++){if(typeof c[g]=="object"){Ext.apply(this,c[g])}else{e[e.length]=c[g]}}h=e.join("")}}this.html=h;if(this.compiled){this.compile()}};Ext.Template.prototype={applyTemplate:function(b){if(this.compiled){return this.compiled(b)}var a=this.disableFormats!==true;var g=Ext.util.Format,c=this;var e=function(k,n,q,l){if(q&&a){if(q.substr(0,5)=="this."){return c.call(q.substr(5),b[n],b)}else{if(l){var p=/^\s*['"](.*)["']\s*$/;l=l.split(",");for(var o=0,h=l.length;o<h;o++){l[o]=l[o].replace(p,"$1")}l=[b[n]].concat(l)}else{l=[b[n]]}return g[q].apply(g,l)}}else{return b[n]!==undefined?b[n]:""}};return this.html.replace(this.re,e)},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,g,b,a){g=Ext.getDom(g);var e=Ext.DomHelper.insertHtml(c,g,this.applyTemplate(b));return a?Ext.get(e,true):e},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,i){if(typeof a=="object"){i=a;for(var h in i){if(this.filterOptRe.test(h)){continue}if(typeof i[h]=="function"){this.addListener(h,i[h],i.scope,i)}else{this.addListener(h,i[h].fn,i[h].scope,i[h])}}return}i=(!i||typeof i=="boolean")?{}:i;a=a.toLowerCase();var g=this.events[a]||true;if(typeof g=="boolean"){g=new Ext.util.Event(this,a);this.events[a]=g}g.addListener(c,b,i)},removeListener:function(a,c,b){var e=this.events[a.toLowerCase()];if(typeof e=="object"){e.removeListener(c,b)}},purgeListeners:function(){for(var a in this.events){if(typeof this.events[a]=="object"){this.events[a].clearListeners()}}},relayEvents:function(h,e){var g=function(i){return function(){return this.fireEvent.apply(this,Ext.combine(i,Array.prototype.slice.call(arguments,0)))}};for(var c=0,a=e.length;c<a;c++){var b=e[c];if(!this.events[b]){this.events[b]=true}h.on(b,g(b),this)}},addEvents:function(g){if(!this.events){this.events={}}if(typeof g=="string"){for(var e=0,b=arguments,c;c=b[e];e++){if(!this.events[b[e]]){this.events[b[e]]=true}}}else{Ext.applyIf(this.events,g)}},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(k){if(!this.methodEvents){this.methodEvents={}}var i=this.methodEvents[k];if(!i){i={};this.methodEvents[k]=i;i.originalFn=this[k];i.methodName=k;i.before=[];i.after=[];var c,b,g;var h=this;var a=function(m,l,e){if((b=m.apply(l||h,e))!==undefined){if(typeof b==="object"){if(b.returnValue!==undefined){c=b.returnValue}else{c=b}if(b.cancel===true){g=true}}else{if(b===false){g=true}else{c=b}}}};this[k]=function(){c=b=undefined;g=false;var l=Array.prototype.slice.call(arguments,0);for(var m=0,e=i.before.length;m<e;m++){a(i.before[m].fn,i.before[m].scope,l);if(g){return c}}if((b=i.originalFn.apply(h,l))!==undefined){c=b}for(var m=0,e=i.after.length;m<e;m++){a(i.after[m].fn,i.after[m].scope,l);if(g){return c}}return c}}return i},beforeMethod:function(g,b,a){var c=this.getMethodEvent(g);c.before.push({fn:b,scope:a})},afterMethod:function(g,b,a){var c=this.getMethodEvent(g);c.after.push({fn:b,scope:a})},removeMethodListener:function(k,g,c){var h=this.getMethodEvent(k);for(var b=0,a=h.before.length;b<a;b++){if(h.before[b].fn==g&&h.before[b].scope==c){h.before.splice(b,1);return}}for(var b=0,a=h.after.length;b<a;b++){if(h.after[b].fn==g&&h.after[b].scope==c){h.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(i,k,g){var e=new Ext.util.DelayedTask();return function(){e.delay(k.buffer,i,g,Array.prototype.slice.call(arguments,0))}};var c=function(k,l,i,g){return function(){l.removeListener(i,g);return k.apply(g,arguments)}};var a=function(g,i,e){return function(){var h=Array.prototype.slice.call(arguments,0);setTimeout(function(){g.apply(e,h)},i.delay||10)}};Ext.util.Event=function(g,e){this.name=e;this.obj=g;this.listeners=[]};Ext.util.Event.prototype={addListener:function(i,h,g){h=h||this.obj;if(!this.isListening(i,h)){var e=this.createListener(i,h,g);if(!this.firing){this.listeners.push(e)}else{this.listeners=this.listeners.slice(0);this.listeners.push(e)}}},createListener:function(k,i,m){m=m||{};i=i||this.obj;var e={fn:k,scope:i,options:m};var g=k;if(m.delay){g=a(g,m,i)}if(m.single){g=c(g,this,k,i)}if(m.buffer){g=b(g,m,i)}e.fireFn=g;return e},findListener:function(n,m){m=m||this.obj;var h=this.listeners;for(var k=0,e=h.length;k<e;k++){var g=h[k];if(g.fn==n&&g.scope==m){return k}}return -1},isListening:function(g,e){return this.findListener(g,e)!=-1},removeListener:function(h,g){var e;if((e=this.findListener(h,g))!=-1){if(!this.firing){this.listeners.splice(e,1)}else{this.listeners=this.listeners.slice(0);this.listeners.splice(e,1)}return true}return false},clearListeners:function(){this.listeners=[]},fire:function(){var h=this.listeners,n,e=h.length;if(e>0){this.firing=true;var k=Array.prototype.slice.call(arguments,0);for(var m=0;m<e;m++){var g=h[m];if(g.fireFn.apply(g.scope||this.obj||window,arguments)===false){this.firing=false;return false}}this.firing=false}return true}}})();Ext.EventManager=function(){var y,r,n=false;var o,x,h,t;var q=Ext.lib.Event;var s=Ext.lib.Dom;var a="Ext";var k={};var p=function(E,A,D,C,B){var G=Ext.id(E);if(!k[G]){k[G]={}}var F=k[G];if(!F[A]){F[A]=[]}var z=F[A];z.push({id:G,ename:A,fn:D,wrap:C,scope:B});q.on(E,A,C);if(A=="mousewheel"&&E.addEventListener){E.addEventListener("DOMMouseScroll",C,false);q.on(window,"unload",function(){E.removeEventListener("DOMMouseScroll",C,false)})}if(A=="mousedown"&&E==document){Ext.EventManager.stoppedMouseDownEvent.addListener(C)}};var i=function(B,D,H,J){B=Ext.getDom(B);var z=Ext.id(B),I=k[z],A;if(I){var F=I[D],C;if(F){for(var E=0,G=F.length;E<G;E++){C=F[E];if(C.fn==H&&(!J||C.scope==J)){A=C.wrap;q.un(B,D,A);F.splice(E,1);break}}}}if(D=="mousewheel"&&B.addEventListener&&A){B.removeEventListener("DOMMouseScroll",A,false)}if(D=="mousedown"&&B==document&&A){Ext.EventManager.stoppedMouseDownEvent.removeListener(A)}};var e=function(D){D=Ext.getDom(D);var F=Ext.id(D),E=k[F],A;if(E){for(var C in E){if(E.hasOwnProperty(C)){A=E[C];for(var B=0,z=A.length;B<z;B++){q.un(D,C,A[B].wrap);A[B]=null}}E[C]=null}delete k[F]}};var c=function(){if(!n){n=Ext.isReady=true;if(Ext.isGecko||Ext.isOpera){document.removeEventListener("DOMContentLoaded",c,false)}}if(r){clearInterval(r);r=null}if(y){y.fire();y.clearListeners()}};var b=function(){y=new Ext.util.Event();if(Ext.isReady){return}q.on(window,"load",c);if(Ext.isGecko||Ext.isOpera){document.addEventListener("DOMContentLoaded",c,false)}else{if(Ext.isIE){r=setInterval(function(){try{Ext.isReady||(document.documentElement.doScroll("left"))}catch(z){return}c()},5);document.onreadystatechange=function(){if(document.readyState=="complete"){document.onreadystatechange=null;c()}}}else{if(Ext.isSafari){r=setInterval(function(){var z=document.readyState;if(z=="complete"){c()}},10)}}}};var w=function(A,B){var z=new Ext.util.DelayedTask(A);return function(C){C=new Ext.EventObjectImpl(C);z.delay(B.buffer,A,null,[C])}};var u=function(D,C,z,B,A){return function(E){Ext.EventManager.removeListener(C,z,B,A);D(E)}};var g=function(z,A){return function(B){B=new Ext.EventObjectImpl(B);setTimeout(function(){z(B)},A.delay||10)}};var m=function(B,A,z,F,E){var G=(!z||typeof z=="boolean")?{}:z;F=F||G.fn;E=E||G.scope;var D=Ext.getDom(B);if(!D){throw'Error listening for "'+A+'". Element "'+B+"\" doesn't exist."}var C=function(I){if(!window[a]){return}I=Ext.EventObject.setEvent(I);var H;if(G.delegate){H=I.getTarget(G.delegate,D);if(!H){return}}else{H=I.target}if(G.stopEvent===true){I.stopEvent()}if(G.preventDefault===true){I.preventDefault()}if(G.stopPropagation===true){I.stopPropagation()}if(G.normalized===false){I=I.browserEvent}F.call(E||D,I,H,G)};if(G.delay){C=g(C,G)}if(G.single){C=u(C,D,A,F,E)}if(G.buffer){C=w(C,G)}p(D,A,F,C,E);return C};var l=/^(?:scope|delay|buffer|single|stopEvent|preventDefault|stopPropagation|normalized|args|delegate)$/;var v={addListener:function(B,z,D,C,A){if(typeof z=="object"){var F=z;for(var E in F){if(l.test(E)){continue}if(typeof F[E]=="function"){m(B,E,F,F[E],F.scope)}else{m(B,E,F[E])}}return}return m(B,z,A,D,C)},removeListener:function(A,z,C,B){return i(A,z,C,B)},removeAll:function(z){return e(z)},onDocumentReady:function(B,A,z){if(!y){b()}if(n||Ext.isReady){z||(z={});B.defer(z.delay||0,A)}else{y.addListener(B,A,z)}},onWindowResize:function(B,A,z){if(!o){o=new Ext.util.Event();x=new Ext.util.DelayedTask(function(){o.fire(s.getViewWidth(),s.getViewHeight())});q.on(window,"resize",this.fireWindowResize,this)}o.addListener(B,A,z)},fireWindowResize:function(){if(o){if((Ext.isIE||Ext.isAir)&&x){x.delay(50)}else{o.fire(s.getViewWidth(),s.getViewHeight())}}},onTextResize:function(C,B,z){if(!h){h=new Ext.util.Event();var A=new Ext.Element(document.createElement("div"));A.dom.className="x-text-resize";A.dom.innerHTML="X";A.appendTo(document.body);t=A.dom.offsetHeight;setInterval(function(){if(A.dom.offsetHeight!=t){h.fire(t,t=A.dom.offsetHeight)}},this.textResizeInterval)}h.addListener(C,B,z)},removeResizeListener:function(A,z){if(o){o.removeListener(A,z)}},fireResize:function(){if(o){o.fire(s.getViewWidth(),s.getViewHeight())}},ieDeferSrc:false,textResizeInterval:50};v.on=v.addListener;v.un=v.removeListener;v.stoppedMouseDownEvent=new Ext.util.Event();return v}();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 e=c.parentNode;if(e){e.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(g){if(g){this.setEvent(g.browserEvent||g)}};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(g){if(g==this||(g&&g.browserEvent)){return g}this.browserEvent=g;if(g){this.button=g.button?c[g.button]:(g.which?g.which-1:-1);if(g.type=="click"&&this.button==-1){this.button=0}this.type=g.type;this.shiftKey=g.shiftKey;this.ctrlKey=g.ctrlKey||g.metaKey;this.altKey=g.altKey;this.keyCode=g.keyCode;this.charCode=g.charCode;this.target=b.getTarget(g);this.xy=b.getXY(g)}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 e=this.keyCode;e=Ext.isSafari?(a[e]||e):e;return(e>=33&&e<=40)||e==this.RETURN||e==this.TAB||e==this.ESC},isSpecialKey:function(){var e=this.keyCode;return(this.type=="keypress"&&this.ctrlKey)||e==9||e==13||e==40||e==27||(e==16)||(e==17)||(e>=18&&e<=20)||(e>=33&&e<=35)||(e>=36&&e<=39)||(e>=44&&e<=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 e=this.keyCode||this.charCode;return Ext.isSafari?(a[e]||e):e},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(g,h,e){return g?Ext.fly(this.target).findParent(g,h,e):(e?Ext.get(this.target):this.target)},getRelatedTarget:function(){if(this.browserEvent){return b.getRelatedTarget(this.browserEvent)}return null},getWheelDelta:function(){var g=this.browserEvent;var h=0;if(g.wheelDelta){h=g.wheelDelta/120}else{if(g.detail){h=-g.detail/3}}return h},hasModifier:function(){return((this.ctrlKey||this.altKey)||this.shiftKey)?true:false},within:function(g,h){var e=this[h?"getRelatedTarget":"getTarget"]();return e&&Ext.fly(g).contains(e)},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 e=this.getFxRestore();var l=this.getBox();this.setSize(l);var h=this.fxWrap(e.pos,c,"hidden");var n=this.dom.style;n.visibility="visible";n.position="absolute";var g=function(){b.fxUnwrap(h,e.pos,c);n.width=e.width;n.height=e.height;b.afterFx(c)};var m,o={to:[l.x,l.y]},k={to:l.width},i={to:l.height};switch(a.toLowerCase()){case"t":h.setSize(l.width,0);n.left=n.bottom="0";m={height:i};break;case"l":h.setSize(0,l.height);n.right=n.top="0";m={width:k};break;case"r":h.setSize(0,l.height);h.setX(l.right);n.left=n.top="0";m={width:k,points:o};break;case"b":h.setSize(l.width,0);h.setY(l.bottom);n.left=n.top="0";m={height:i,points:o};break;case"tl":h.setSize(0,0);n.right=n.bottom="0";m={width:k,height:i};break;case"bl":h.setSize(0,0);h.setY(l.y+l.height);n.right=n.top="0";m={width:k,height:i,points:o};break;case"br":h.setSize(0,0);h.setXY([l.right,l.bottom]);n.left=n.top="0";m={width:k,height:i,points:o};break;case"tr":h.setSize(0,0);h.setX(l.x+l.width);n.left=n.bottom="0";m={width:k,height:i,points:o};break}this.dom.style.visibility="visible";h.show();arguments.callee.anim=h.fxanim(m,c,"motion",0.5,"easeOut",g)});return this},slideOut:function(a,c){var b=this.getFxEl();c=c||{};b.queueFx(c,function(){a=a||"t";var l=this.getFxRestore();var e=this.getBox();this.setSize(e);var i=this.fxWrap(l.pos,c,"visible");var h=this.dom.style;h.visibility="visible";h.position="absolute";i.setSize(e);var m=function(){if(c.useDisplay){b.setDisplayed(false)}else{b.hide()}b.fxUnwrap(i,l.pos,c);h.width=l.width;h.height=l.height;b.afterFx(c)};var g,k={to:0};switch(a.toLowerCase()){case"t":h.left=h.bottom="0";g={height:k};break;case"l":h.right=h.top="0";g={width:k};break;case"r":h.left=h.top="0";g={width:k,points:{to:[e.right,e.y]}};break;case"b":h.left=h.top="0";g={height:k,points:{to:[e.x,e.bottom]}};break;case"tl":h.right=h.bottom="0";g={width:k,height:k};break;case"bl":h.right=h.top="0";g={width:k,height:k,points:{to:[e.x,e.bottom]}};break;case"br":h.left=h.top="0";g={width:k,height:k,points:{to:[e.x+e.width,e.bottom]}};break;case"tr":h.left=h.bottom="0";g={width:k,height:k,points:{to:[e.right,e.y]}};break}arguments.callee.anim=i.fxanim(g,c,"motion",0.5,"easeOut",m)});return this},puff:function(b){var a=this.getFxEl();b=b||{};a.queueFx(b,function(){this.clearOpacity();this.show();var h=this.getFxRestore();var e=this.dom.style;var i=function(){if(b.useDisplay){a.setDisplayed(false)}else{a.hide()}a.clearOpacity();a.setPositioning(h.pos);e.width=h.width;e.height=h.height;e.fontSize="";a.afterFx(b)};var g=this.getWidth();var c=this.getHeight();arguments.callee.anim=this.fxanim({width:{to:this.adjustWidth(g*2)},height:{to:this.adjustHeight(c*2)},points:{by:[-(g*0.5),-(c*0.5)]},opacity:{to:0},fontSize:{to:200,unit:"%"}},b,"motion",0.5,"easeOut",i)});return this},switchOff:function(b){var a=this.getFxEl();b=b||{};a.queueFx(b,function(){this.clearOpacity();this.clip();var e=this.getFxRestore();var c=this.dom.style;var g=function(){if(b.useDisplay){a.setDisplayed(false)}else{a.hide()}a.clearOpacity();a.setPositioning(e.pos);c.width=e.width;c.height=e.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",g)}).defer(100,this)})});return this},highlight:function(a,c){var b=this.getFxEl();c=c||{};b.queueFx(c,function(){a=a||"ffff9c";var e=c.attr||"backgroundColor";this.clearOpacity();this.show();var i=this.getColor(e);var k=this.dom.style[e];var h=(c.endColor||i)||"ffffff";var l=function(){b.dom.style[e]=k;b.afterFx(c)};var g={};g[e]={from:a,to:h};arguments.callee.anim=this.fxanim(g,c,"color",1,"easeIn",l)});return this},frame:function(a,c,e){var b=this.getFxEl();e=e||{};b.queueFx(e,function(){a=a||"#C3DAF9";if(a.length==6){a="#"+a}c=c||1;var i=e.duration||1;this.show();var g=this.getBox();var h=function(){var k=Ext.getBody().createChild({style:{visbility:"hidden",position:"absolute","z-index":"35000",border:"0px solid "+a}});var l=Ext.isBorderBox?2:1;k.animate({top:{from:g.y,to:g.y-20},left:{from:g.x,to:g.x-20},borderWidth:{from:0,to:10},opacity:{from:1,to:0},height:{from:g.height,to:(g.height+(20*l))},width:{from:g.width,to:(g.width+(20*l))}},i,function(){k.remove();if(--c>0){h()}else{b.afterFx(e)}})};h.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 g={},e=b.width,i=b.height,c=b.x,l=b.y,k=b.opacity;if(e!==undefined){g.width={to:this.adjustWidth(e)}}if(i!==undefined){g.height={to:this.adjustHeight(i)}}if(b.left!==undefined){g.left={to:b.left}}if(b.top!==undefined){g.top={to:b.top}}if(b.right!==undefined){g.right={to:b.right}}if(b.bottom!==undefined){g.bottom={to:b.bottom}}if(c!==undefined||l!==undefined){g.points={to:[c!==undefined?c:this.getX(),l!==undefined?l:this.getY()]}}if(k!==undefined){g.opacity={to:k}}if(b.xy!==undefined){g.points={to:b.xy}}arguments.callee.anim=this.fxanim(g,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 l=this.getFxRestore();var g=this.getWidth(),k=this.getHeight();var i=this.dom.style;var n=function(){if(c.useDisplay){b.setDisplayed(false)}else{b.hide()}b.clearOpacity();b.setPositioning(l.pos);i.width=l.width;i.height=l.height;b.afterFx(c)};var e={opacity:{to:0},points:{}},m=e.points;switch(a.toLowerCase()){case"t":m.by=[0,-k];break;case"l":m.by=[-g,0];break;case"r":m.by=[g,0];break;case"b":m.by=[0,k];break;case"tl":m.by=[-g,-k];break;case"bl":m.by=[-g,k];break;case"br":m.by=[g,k];break;case"tr":m.by=[g,-k];break}arguments.callee.anim=this.fxanim(e,c,"motion",0.5,"easeOut",n)});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(h,e,c){var b;if(!e.wrap||!(b=Ext.get(e.wrap))){var a;if(e.fixPosition){a=this.getXY()}var g=document.createElement("div");g.style.visibility=c;b=Ext.get(this.dom.parentNode.insertBefore(g,this.dom));b.setPositioning(h);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(e,g,b,h,c,a){b=b||"run";g=g||{};var i=Ext.lib.Anim[b](this.dom,e,(g.duration||h)||0.35,(g.easing||c)||"easeOut",function(){Ext.callback(a,this)},this);g.anim=i;return i}};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(g){if(!g){return this}if(typeof g=="string"){g=Ext.Element.selectorFunction(g)}var e=this.elements;var b=e.length-1;for(var c=0,a=g.length;c<a;c++){e[++b]=Ext.get(g[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(g,b){var e=this.elements;for(var c=0,a=e.length;c<a;c++){Ext.Element.prototype[g].apply(e[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(g,e){var c=this.elements;for(var b=0,a=c.length;b<a;b++){if(g.call(e||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(e,h){if(Ext.isArray(e)){for(var c=0,a=e.length;c<a;c++){this.removeElement(e[c])}return this}var b=typeof e=="number"?e:this.indexOf(e);if(b!==-1&&this.elements[b]){if(h){var g=this.elements[b];if(g.dom){g.remove()}else{Ext.removeNode(g)}}this.elements.splice(b,1)}return this},replaceElement:function(e,c,a){var b=typeof e=="number"?e:this.indexOf(e);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(g){if(g){if(Ext.isArray(g)){this.elements=this.elements.concat(g)}else{var e=this.elements;var b=e.length-1;for(var c=0,a=g.length;c<a;c++){e[++b]=g[c]}}}return this},invoke:function(h,b){var e=this.elements;var g=this.el;for(var c=0,a=e.length;c<a;c++){g.dom=e[c];Ext.Element.prototype[h].apply(g,b)}return this},item:function(a){if(!this.elements[a]){return null}this.el.dom=this.elements[a];return this.el},addListener:function(b,k,h,g){var e=this.elements;for(var c=0,a=e.length;c<a;c++){Ext.EventManager.on(e[c],b,k,h||e[c],g)}return this},each:function(h,g){var c=this.elements;var e=this.el;for(var b=0,a=c.length;b<a;b++){e.dom=c[b];if(h.call(g||e,e,this,b)===false){break}}return this},indexOf:function(a){return this.elements.indexOf(Ext.getDom(a))},replaceElement:function(e,c,a){var b=typeof e=="number"?e:this.indexOf(e);if(b!==-1){c=Ext.getDom(c);if(a){var g=this.elements[b];g.parentNode.insertBefore(c,g);Ext.removeNode(g)}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,e,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(e===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(g){if(this.fireEvent("beforerequest",this,g)!==false){var c=g.params;if(typeof c=="function"){c=c.call(g.scope||window,g)}if(typeof c=="object"){c=Ext.urlEncode(c)}if(this.extraParams){var i=Ext.urlEncode(this.extraParams);c=c?(c+"&"+i):i}var b=g.url||this.url;if(typeof b=="function"){b=b.call(g.scope||window,g)}if(g.form){var e=Ext.getDom(g.form);b=b||e.action;var m=e.getAttribute("enctype");if(g.isUpload||(m&&m.toLowerCase()=="multipart/form-data")){return this.doFormUpload(g,c,b)}var l=Ext.lib.Ajax.serializeForm(e);c=c?(c+"&"+l):l}var n=g.headers;if(this.defaultHeaders){n=Ext.apply(n||{},this.defaultHeaders);if(!g.headers){g.headers=n}}var h={success:this.handleResponse,failure:this.handleFailure,scope:this,argument:{options:g},timeout:g.timeout||this.timeout};var a=g.method||this.method||((c||g.xmlData||g.jsonData)?"POST":"GET");if(a=="GET"&&(this.disableCaching&&g.disableCaching!==false)||g.disableCaching===true){var k=g.disableCachingParam||this.disableCachingParam;b+=(b.indexOf("?")!=-1?"&":"?")+k+"="+(new Date().getTime())}if(typeof g.autoAbort=="boolean"){if(g.autoAbort){this.abort()}}else{if(this.autoAbort!==false){this.abort()}}if((a=="GET"||g.xmlData||g.jsonData)&&c){b+=(b.indexOf("?")!=-1?"&":"?")+c;c=""}this.transId=Ext.lib.Ajax.request(a,b,h,c,g);return this.transId}else{Ext.callback(g.callback,g.scope,[g,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(g,a,b){var c=Ext.id();var h=document.createElement("iframe");h.id=c;h.name=c;h.className="x-hidden";if(Ext.isIE){h.src=Ext.SSL_SECURE_URL}document.body.appendChild(h);if(Ext.isIE){document.frames[c].name=c}var e=Ext.getDom(g.form);e.target=c;e.method="POST";e.enctype=e.encoding="multipart/form-data";if(b){e.action=b}var r,p;if(a){r=[];a=Ext.urlDecode(a,false);for(var m in a){if(a.hasOwnProperty(m)){p=document.createElement("input");p.type="hidden";p.name=m;p.value=a[m];e.appendChild(p);r.push(p)}}}function l(){var i={responseText:"",responseXML:null};i.argument=g?g.argument:null;try{var o;if(Ext.isIE){o=h.contentWindow.document}else{o=(h.contentDocument||window.frames[c].document)}if(o&&o.body){i.responseText=o.body.innerHTML}if(o&&o.XMLDocument){i.responseXML=o.XMLDocument}else{i.responseXML=o}}catch(k){}Ext.EventManager.removeListener(h,"load",l,this);this.fireEvent("requestcomplete",this,i,g);Ext.callback(g.success,g.scope,[i,g]);Ext.callback(g.callback,g.scope,[g,true,i]);setTimeout(function(){Ext.removeNode(h)},100)}Ext.EventManager.on(h,"load",l,this);e.submit();if(r){for(var n=0,q=r.length;n<q;n++){Ext.removeNode(r[n])}}}});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,h,i,e){if(this.fireEvent("beforeupdate",this.el,b,h)!==false){var a,c;if(typeof b=="object"){a=b;b=a.url;h=h||a.params;i=i||a.callback;e=e||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(!e){this.defaultUrl=b}if(typeof b=="function"){b=b.call(this)}var g=Ext.apply({},{url:b,params:(typeof h=="function"&&c)?h.createDelegate(c):h,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:i,scope:c||window,params:h}},a);this.transaction=Ext.Ajax.request(g)}},formUpdate:function(c,a,b,e){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:e,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,e,g,a){if(a){this.update(c||this.defaultUrl,e,g,true)}if(this.autoRefreshProcId){clearInterval(this.autoRefreshProcId)}this.autoRefreshProcId=setInterval(this.update.createDelegate(this,[c||this.defaultUrl,e,g,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(e,c,g,b){var a=Ext.get(e).getUpdater();Ext.apply(a,b);a.update(c,g,b?b.callback:null)};Ext.Updater.BasicRenderer=function(){};Ext.Updater.BasicRenderer.prototype={render:function(c,a,b,e){c.update(a.responseText,b.loadScripts,e)}};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){\nvar y, m, d, h = 0, i = 0, s = 0, ms = 0, o, z, u, v;\ninput = String(input);\nd = new Date();\ny = d.getFullYear();\nm = d.getMonth();\nd = d.getDate();\nvar results = input.match(Date.parseRegexes["+regexNum+"]);\nif (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){\nv = new Date(u * 1000);\n}else if (y >= 0 && m >= 0 && d > 0 && h >= 0 && i >= 0 && s >= 0 && ms >= 0){\nv = new Date(y, m, d, h, i, s, ms);\n}else if (y >= 0 && m >= 0 && d > 0 && h >= 0 && i >= 0 && s >= 0){\nv = new Date(y, m, d, h, i, s);\n}else if (y >= 0 && m >= 0 && d > 0 && h >= 0 && i >= 0){\nv = new Date(y, m, d, h, i);\n}else if (y >= 0 && m >= 0 && d > 0 && h >= 0){\nv = new Date(y, m, d, h);\n}else if (y >= 0 && m >= 0 && d > 0){\nv = new Date(y, m, d);\n}else if (y >= 0 && m >= 0){\nv = new Date(y, m);\n}else if (y >= 0){\nv = 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);\ny = ty > Date.y2kYear ? 1900 + ty : 2000 + ty;\n",s:"(\\d{1,2})"},a:{g:1,c:"if (results[{0}] == 'am') {\nif (h == 12) { h = 0; }\n} else { if (h < 12) { h += 12; }}",s:"(am|pm)"},A:{g:1,c:"if (results[{0}] == 'AM') {\nif (h == 12) { h = 0; }\n} else { if (h < 12) { h += 12; }}",s:"(AM|PM)"},g:function(){return $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;\nz = (-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 e=Date.UTC(this.getFullYear(),this.getMonth(),this.getDate()+3)/b;var a=Math.floor(e/7);var g=new Date(a*c).getUTCFullYear();return a-Math.floor(Date.UTC(g,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 e=this.clone();if(!b||c===0){return e}switch(b.toLowerCase()){case Date.MILLI:e.setMilliseconds(this.getMilliseconds()+c);break;case Date.SECOND:e.setSeconds(this.getSeconds()+c);break;case Date.MINUTE:e.setMinutes(this.getMinutes()+c);break;case Date.HOUR:e.setHours(this.getHours()+c);break;case Date.DAY:e.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())}e.setDate(a);e.setMonth(this.getMonth()+c);break;case Date.YEAR:e.setFullYear(this.getFullYear()+c);break}return e},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 e=Math.ceil(-a);var c=Math.ceil(e/12);var b=(e%12)?12-e%12:0;this.setFullYear(this.getFullYear()-c);return Date.brokenSetMonth.call(this,b)}else{return Date.brokenSetMonth.apply(this,arguments)}}}Ext.util.DelayedTask=function(g,e,a){var i=null,h,b;var c=function(){var k=new Date().getTime();if(k-b>=h){clearInterval(i);i=null;g.apply(e,a||[])}};this.delay=function(l,n,m,k){if(i&&l!=h){this.cancel()}h=l;b=new Date().getTime();g=n||g;e=m||e;a=k||a;if(!i){i=setInterval(c,h)}};this.cancel=function(){if(i){clearInterval(i);i=null}}};Ext.util.TaskRunner=function(g){g=g||10;var h=[],a=[];var b=0;var i=false;var e=function(){i=false;clearInterval(b);b=0};var k=function(){if(!i){i=true;b=setInterval(l,g)}};var c=function(m){a.push(m);if(m.onStop){m.onStop.apply(m.scope||m)}};var l=function(){if(a.length>0){for(var r=0,n=a.length;r<n;r++){h.remove(a[r])}a=[];if(h.length<1){e();return}}var p=new Date().getTime();for(var r=0,n=h.length;r<n;++r){var q=h[r];var m=p-q.taskRunTime;if(q.interval<=m){var o=q.run.apply(q.scope||q,q.args||[++q.taskRunCount]);q.taskRunTime=p;if(o===false||q.taskRunCount===q.repeat){c(q);return}}if(q.duration&&q.duration<=(p-q.taskStartTime)){c(q)}}};this.start=function(m){h.push(m);m.taskStartTime=new Date().getTime();m.taskRunTime=0;m.taskRunCount=0;k();return m};this.stop=function(m){c(m);return m};this.stopAll=function(){e();for(var n=0,m=h.length;n<m;n++){if(h[n].onStop){h[n].onStop()}}h=[];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,e){if(arguments.length==1){e=arguments[0];c=this.getKey(e)}var a=this.item(c);if(typeof c=="undefined"||c===null||typeof a=="undefined"){return this.add(c,e)}var b=this.indexOfKey(c);this.items[b]=e;this.map[c]=e;this.fireEvent("replace",c,a,e);return e},addAll:function(g){if(arguments.length>1||Ext.isArray(g)){var b=arguments.length>1?arguments:g;for(var e=0,a=b.length;e<a;e++){this.add(b[e])}}else{for(var c in g){if(this.allowFunctions||typeof g[c]!="function"){this.add(c,g[c])}}}},each:function(g,e){var b=[].concat(this.items);for(var c=0,a=b.length;c<a;c++){if(g.call(e||b[c],b[c],c,a)===false){break}}},eachKey:function(e,c){for(var b=0,a=this.keys.length;b<a;b++){e.call(c||window,this.keys[b],this.items[b],b,a)}},find:function(e,c){for(var b=0,a=this.items.length;b<a;b++){if(e.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(o,a,n){var e=String(a).toUpperCase()=="DESC"?-1:1;n=n||function(i,c){return i-c};var m=[],b=this.keys,l=this.items;for(var g=0,h=l.length;g<h;g++){m[m.length]={key:b[g],value:l[g],index:g}}m.sort(function(i,c){var k=n(i[o],c[o])*e;if(k==0){k=(i.index<c.index?-1:1)}return k});for(var g=0,h=m.length;g<h;g++){l[g]=m[g].value;b[g]=m[g].key}this.fireEvent("sort",this)},sort:function(a,b){this._sort("value",a,b)},keySort:function(a,b){this._sort("key",a,b||function(e,c){return String(e).toUpperCase()-String(c).toUpperCase()})},getRange:function(g,a){var b=this.items;if(b.length<1){return[]}g=g||0;a=Math.min(typeof a=="undefined"?this.length-1:a,this.length-1);var e=[];if(g<=a){for(var c=g;c<=a;c++){e[e.length]=b[c]}}else{for(var c=g;c>=a;c--){e[e.length]=b[c]}}return e},filter:function(c,b,e,a){if(Ext.isEmpty(b,false)){return this.clone()}b=this.createValueMatcher(b,e,a);return this.filterBy(function(g){return g&&b.test(g[c])})},filterBy:function(h,g){var l=new Ext.util.MixedCollection();l.getKey=this.getKey;var b=this.keys,e=this.items;for(var c=0,a=e.length;c<a;c++){if(h.call(g||this,e[c],b[c])){l.add(b[c],e[c])}}return l},findIndex:function(c,b,g,e,a){if(Ext.isEmpty(b,false)){return -1}b=this.createValueMatcher(b,e,a);return this.findIndexBy(function(h){return h&&b.test(h[c])},null,g)},findIndexBy:function(h,g,l){var b=this.keys,e=this.items;for(var c=(l||0),a=e.length;c<a;c++){if(h.call(g||this,e[c],b[c])){return c}}if(typeof l=="number"&&l>0){for(var c=0;c<l;c++){if(h.call(g||this,e[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 g=new Ext.util.MixedCollection();var b=this.keys,e=this.items;for(var c=0,a=e.length;c<a;c++){g.add(b[c],e[c])}g.getKey=this.getKey;return g}});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 v=this.html;v=["<tpl>",v,"</tpl>"].join("");var u=/<tpl\b[^>]*>((?:(?=([^<]+))\2|<(?!tpl\b[^>]*>))*?)<\/tpl>/;var t=/^<tpl\b[^>]*?for="(.*?)"/;var q=/^<tpl\b[^>]*?if="(.*?)"/;var o=/^<tpl\b[^>]*?exec="(.*?)"/;var c,b=0;var k=[];while(c=v.match(u)){var r=c[0].match(t);var p=c[0].match(q);var n=c[0].match(o);var g=null,l=null,e=null;var a=r&&r[1]?r[1]:"";if(p){g=p&&p[1]?p[1]:null;if(g){l=new Function("values","parent","xindex","xcount","with(values){ return "+(Ext.util.Format.htmlDecode(g))+"; }")}}if(n){g=n&&n[1]?n[1]:null;if(g){e=new Function("values","parent","xindex","xcount","with(values){ "+(Ext.util.Format.htmlDecode(g))+"; }")}}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+"; }")}}k.push({id:b,target:a,exec:e,test:l,body:c[1]||""});v=v.replace(c[0],"{xtpl"+b+"}");++b}for(var h=k.length-1;h>=0;--h){this.compileTpl(k[h])}this.master=k[k.length-1];this.tpls=k};Ext.extend(Ext.XTemplate,Ext.Template,{re:/\{([\w-\.\#]+)(?:\:([\w\.]*)(?:\((.*?)?\))?)?(\s?[\+\-\*\\]\s?[\d\.\+\-\*\\\(\)]+)?\}/g,codeRe:/\{\[((?:\\\]|.|\n)*?)\]\}/g,applySubTemplate:function(a,l,k,e,c){var n=this.tpls[a];if(n.test&&!n.test.call(this,l,k,e,c)){return""}if(n.exec&&n.exec.call(this,l,k,e,c)){return""}var m=n.target?n.target.call(this,l,k):l;k=n.target?l:k;if(n.target&&Ext.isArray(m)){var b=[];for(var g=0,h=m.length;g<h;g++){b[b.length]=n.compiled.call(this,m[g],k,g+1,h)}return b.join("")}return n.compiled.call(this,m,k,e,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 e=null;var c=document;var b=/(-[a-z])/gi;var a=function(g,h){return h.charAt(1).toUpperCase()};return{createStyleSheet:function(i,m){var h;var g=c.getElementsByTagName("head")[0];var l=c.createElement("style");l.setAttribute("type","text/css");if(m){l.setAttribute("id",m)}if(Ext.isIE){g.appendChild(l);h=l.styleSheet;h.cssText=i}else{try{l.appendChild(c.createTextNode(i))}catch(k){l.cssText=i}g.appendChild(l);h=l.styleSheet?l.styleSheet:(l.sheet||c.styleSheets[c.styleSheets.length-1])}this.cacheStyleSheet(h);return h},removeStyleSheet:function(h){var g=c.getElementById(h);if(g){g.parentNode.removeChild(g)}},swapStyleSheet:function(i,g){this.removeStyleSheet(i);var h=c.createElement("link");h.setAttribute("rel","stylesheet");h.setAttribute("type","text/css");h.setAttribute("id",i);h.setAttribute("href",g);c.getElementsByTagName("head")[0].appendChild(h)},refreshCache:function(){return this.getRules(true)},cacheStyleSheet:function(h){if(!e){e={}}try{var k=h.cssRules||h.rules;for(var g=k.length-1;g>=0;--g){e[k[g].selectorText]=k[g]}}catch(i){}},getRules:function(h){if(e==null||h){e={};var l=c.styleSheets;for(var k=0,g=l.length;k<g;k++){try{this.cacheStyleSheet(l[k])}catch(m){}}}return e},getRule:function(g,k){var h=this.getRules(k);if(!Ext.isArray(g)){return h[g]}for(var l=0;l<g.length;l++){if(h[g[l]]){return h[g[l]]}}return null},updateRule:function(g,l,k){if(!Ext.isArray(g)){var m=this.getRule(g);if(m){m.style[l.replace(b,a)]=k;return true}}else{for(var h=0;h<g.length;h++){if(this.updateRule(g[h],l,k)){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(e,a,h,g){return(e==g)?a+h:h*(-Math.pow(2,-10*e/g)+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(e){if(Ext.isArray(e)){for(var h=0,l=e.length;h<l;h++){this.addBinding(e[h])}return}var r=e.key,c=e.shift,a=e.ctrl,k=e.alt,n=e.fn||e.handler,q=e.scope;if(e.stopEvent){this.stopEvent=e.stopEvent}if(typeof r=="string"){var o=[];var m=r.toUpperCase();for(var g=0,l=m.length;g<l;g++){o.push(m.charCodeAt(g))}r=o}var b=Ext.isArray(r);var p=function(v){if((!c||v.shiftKey)&&(!a||v.ctrlKey)&&(!k||v.altKey)){var t=v.getKey();if(b){for(var u=0,s=r.length;u<s;u++){if(r[u]==t){if(this.stopEvent){v.stopEvent()}n.call(q||window,t,v);return}}}else{if(t==r){if(this.stopEvent){v.stopEvent()}n.call(q||window,t,v)}}}};this.bindings.push(p)},on:function(b,e,c){var i,a,g,h;if(typeof b=="object"&&!Ext.isArray(b)){i=b.key;a=b.shift;g=b.ctrl;h=b.alt}else{i=b}this.addBinding({key:i,shift:a,ctrl:g,alt:h,fn:e,scope:c})},handleKeyDown:function(h){if(this.enabled){var c=this.bindings;for(var g=0,a=c.length;g<a;g++){c[g].call(this,h)}}},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,e){if(!a){a=Ext.util.TextMetrics.Instance(b,e)}a.bind(b);a.setFixedWidth(e||"auto");return a.getSize(c)},createInstance:function(b,c){return Ext.util.TextMetrics.Instance(b,c)}}}();Ext.util.TextMetrics.Instance=function(b,e){var c=new Ext.Element(document.createElement("div"));document.body.appendChild(c.dom);c.position("absolute");c.setLeftTop(-1000,-1000);c.hide();if(e){c.setWidth(e)}var a={getSize:function(h){c.update(h);var g=c.getSize();c.update("");return g},bind:function(g){c.setStyle(Ext.fly(g).getStyles("font-size","font-style","font-weight","font-family","line-height","text-transform","letter-spacing"))},setFixedWidth:function(g){c.setWidth(g)},getWidth:function(g){c.dom.style.width="auto";return this.getSize(g).width},getHeight:function(g){return this.getSize(g).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(g,c,e){if(g){this.init(g,c,e)}};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,e){},startDrag:function(c,e){},b4Drag:function(c){},onDrag:function(c){},onDragEnter:function(c,g){},b4DragOver:function(c){},onDragOver:function(c,g){},b4DragOut:function(c){},onDragOut:function(c,g){},b4DragDrop:function(c){},onDragDrop:function(c,g){},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(l,i,q){if(typeof i=="number"){i={left:i,right:i,top:i,bottom:i}}i=i||this.defaultPadding;var n=Ext.get(this.getEl()).getBox();var e=Ext.get(l);var p=e.getScroll();var m,g=e.dom;if(g==document.body){m={x:p.left,y:p.top,width:Ext.lib.Dom.getViewWidth(),height:Ext.lib.Dom.getViewHeight()}}else{var o=e.getXY();m={x:o[0]+p.left,y:o[1]+p.top,width:g.clientWidth,height:g.clientHeight}}var k=n.y-m.y;var h=n.x-m.x;this.resetConstraints();this.setXConstraint(h-(i.left||0),m.width-h-n.width-(i.right||0),this.xTickSize);this.setYConstraint(k-(i.top||0),m.height-k-n.height-(i.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(g,c,e){this.initTarget(g,c,e);a.on(this.id,"mousedown",this.handleMouseDown,this)},initTarget:function(g,c,e){this.config=e||{};this.DDM=Ext.dd.DDM;this.groups={};if(typeof g!=="string"){g=Ext.id(g)}this.id=g;this.addToGroup((c)?c:"default");this.handleElId=g;this.setDragElId(g);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(g,c,h,e){if(!c&&0!==c){this.padding=[g,g,g,g]}else{if(!h&&0!==h){this.padding=[g,c,g,c]}else{this.padding=[g,c,h,e]}}},setInitPosition:function(h,g){var i=this.getEl();if(!this.DDM.verifyEl(i)){return}var e=h||0;var c=g||0;var k=b.getXY(i);this.initPageX=k[0]-e;this.initPageY=k[1]-c;this.lastPageX=k[0];this.lastPageY=k[1];this.setStartPosition(k)},setStartPosition:function(e){var c=e||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(h,g){if(this.primaryButtonOnly&&h.button!=0){return}if(this.isLocked()){return}this.DDM.refreshCache(this.groups);var c=new Ext.lib.Point(Ext.lib.Event.getPageX(h),Ext.lib.Event.getPageY(h));if(!this.hasOuterHandles&&!this.DDM.isOverTarget(c,this)){}else{if(this.clickValidator(h)){this.setStartPosition();this.b4MouseDown(h);this.onMouseDown(h);this.DDM.handleMouseDown(h,this);this.DDM.stopEvent(h)}else{}}},clickValidator:function(g){var c=g.getTarget();return(this.isValidHandleChild(c)&&(this.id==this.handleElId||this.DDM.handleWasClicked(c,this.id)))},addInvalidHandleType:function(c){var e=c.toUpperCase();this.invalidHandleTypes[e]=e},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 e=c.toUpperCase();delete this.invalidHandleTypes[e]},removeInvalidHandleId:function(c){if(typeof c!=="string"){c=Ext.id(c)}delete this.invalidHandleIds[c]},removeInvalidHandleClass:function(e){for(var g=0,c=this.invalidHandleClasses.length;g<c;++g){if(this.invalidHandleClasses[g]==e){delete this.invalidHandleClasses[g]}}},isValidHandleChild:function(k){var h=true;var m;try{m=k.nodeName.toUpperCase()}catch(l){m=k.nodeName}h=h&&!this.invalidHandleTypes[m];h=h&&!this.invalidHandleIds[k.id];for(var g=0,c=this.invalidHandleClasses.length;h&&g<c;++g){h=!Ext.fly(k).hasClass(this.invalidHandleClasses[g])}return h},setXTicks:function(h,c){this.xTicks=[];this.xTickSize=c;var g={};for(var e=this.initPageX;e>=this.minX;e=e-c){if(!g[e]){this.xTicks[this.xTicks.length]=e;g[e]=true}}for(e=this.initPageX;e<=this.maxX;e=e+c){if(!g[e]){this.xTicks[this.xTicks.length]=e;g[e]=true}}this.xTicks.sort(this.DDM.numericSort)},setYTicks:function(h,c){this.yTicks=[];this.yTickSize=c;var g={};for(var e=this.initPageY;e>=this.minY;e=e-c){if(!g[e]){this.yTicks[this.yTicks.length]=e;g[e]=true}}for(e=this.initPageY;e<=this.maxY;e=e+c){if(!g[e]){this.yTicks[this.yTicks.length]=e;g[e]=true}}this.yTicks.sort(this.DDM.numericSort)},setXConstraint:function(g,e,c){this.leftConstraint=g;this.rightConstraint=e;this.minX=this.initPageX-g;this.maxX=this.initPageX+e;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,g,e){this.topConstraint=c;this.bottomConstraint=g;this.minY=this.initPageY-c;this.maxY=this.initPageY+g;if(e){this.setYTicks(this.initPageY,e)}this.constrainY=true},resetConstraints:function(){if(this.initPageX||this.initPageX===0){var e=(this.maintainOffset)?this.lastPageX-this.initPageX:0;var c=(this.maintainOffset)?this.lastPageY-this.initPageY:0;this.setInitPosition(e,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(m,h){if(!h){return m}else{if(h[0]>=m){return h[0]}else{for(var e=0,c=h.length;e<c;++e){var g=e+1;if(h[g]&&h[g]>=m){var l=m-h[e];var k=h[g]-m;return(k>l)?h[e]:h[g]}}return h[h.length-1]}}},toString:function(){return("DragDrop "+this.id)}}})();if(!Ext.dd.DragDropMgr){Ext.dd.DragDropMgr=function(){var a=Ext.EventManager;return{ids:{},handleIds:{},dragCurrent:null,dragOvers:{},deltaX:0,deltaY:0,preventDefault:true,stopPropagation:true,initialized:false,locked:false,init:function(){this.initialized=true},POINT:0,INTERSECT:1,mode:0,_execOnAll:function(e,c){for(var g in this.ids){for(var b in this.ids[g]){var h=this.ids[g][b];if(!this.isTypeOfDD(h)){continue}h[e].apply(h,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(e,b){if(!this.ids[b]){this.ids[b]={}}var c=this.ids[b];if(c&&c[e.id]){delete c[e.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(h,c){var g=[];for(var e in h.groups){for(j in this.ids[e]){var b=this.ids[e][j];if(!this.isTypeOfDD(b)){continue}if(!c||b.isTarget){g[g.length]=b}}}return g},isLegalTarget:function(h,g){var c=this.getRelated(h,true);for(var e=0,b=c.length;e<b;++e){if(c[e].id==g.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(g,c){if(Ext.QuickTips){Ext.QuickTips.disable()}this.currentTarget=g.getTarget();this.dragCurrent=c;var b=c.getEl();this.startX=g.getPageX();this.startY=g.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(g){if(!this.dragCurrent){return true}if(Ext.isIE&&(g.button!==0&&g.button!==1&&g.button!==2)){this.stopEvent(g);return this.handleMouseUp(g)}if(!this.dragThreshMet){var c=Math.abs(this.startX-g.getPageX());var b=Math.abs(this.startY-g.getPageY());if(c>this.clickPixelThresh||b>this.clickPixelThresh){this.startDrag(this.startX,this.startY)}}if(this.dragThreshMet){this.dragCurrent.b4Drag(g);this.dragCurrent.onDrag(g);if(!this.dragCurrent.moveOnly){this.fireEvents(g,false)}}this.stopEvent(g);return true},fireEvents:function(p,q){var s=this.dragCurrent;if(!s||s.isLocked()){return}var t=p.getPoint();var b=[];var h=[];var n=[];var l=[];var g=[];for(var k in this.dragOvers){var c=this.dragOvers[k];if(!this.isTypeOfDD(c)){continue}if(!this.isOverTarget(t,c,this.mode)){h.push(c)}b[k]=true;delete this.dragOvers[k]}for(var r in s.groups){if("string"!=typeof r){continue}for(k in this.ids[r]){var m=this.ids[r][k];if(!this.isTypeOfDD(m)){continue}if(m.isTarget&&!m.isLocked()&&m!=s){if(this.isOverTarget(t,m,this.mode)){if(q){l.push(m)}else{if(!b[m.id]){g.push(m)}else{n.push(m)}this.dragOvers[m.id]=m}}}}}if(this.mode){if(h.length){s.b4DragOut(p,h);s.onDragOut(p,h)}if(g.length){s.onDragEnter(p,g)}if(n.length){s.b4DragOver(p,n);s.onDragOver(p,n)}if(l.length){s.b4DragDrop(p,l);s.onDragDrop(p,l)}}else{var o=0;for(k=0,o=h.length;k<o;++k){s.b4DragOut(p,h[k].id);s.onDragOut(p,h[k].id)}for(k=0,o=g.length;k<o;++k){s.onDragEnter(p,g[k].id)}for(k=0,o=n.length;k<o;++k){s.b4DragOver(p,n[k].id);s.onDragOver(p,n[k].id)}for(k=0,o=l.length;k<o;++k){s.b4DragDrop(p,l[k].id);s.onDragDrop(p,l[k].id)}}if(q&&!l.length){s.onInvalidDrop(p)}},getBestMatch:function(e){var h=null;var c=e.length;if(c==1){h=e[0]}else{for(var g=0;g<c;++g){var b=e[g];if(b.cursorIsOver){h=b;break}else{if(!h||h.overlap.getArea()<b.overlap.getArea()){h=b}}}}return h},refreshCache:function(c){for(var b in c){if("string"!=typeof b){continue}for(var e in this.ids[b]){var g=this.ids[b][e];if(this.isTypeOfDD(g)){var h=this.getLocation(g);if(h){this.locationCache[g.id]=h}else{delete this.locationCache[g.id]}}}}},verifyEl:function(c){if(c){var b;if(Ext.isIE){try{b=c.offsetParent}catch(g){}}else{b=c.offsetParent}if(b){return true}}return false},getLocation:function(m){if(!this.isTypeOfDD(m)){return null}var i=m.getEl(),p,h,g,s,q,u,c,o,k;try{p=Ext.lib.Dom.getXY(i)}catch(n){}if(!p){return null}h=p[0];g=h+i.offsetWidth;s=p[1];q=s+i.offsetHeight;u=s-m.padding[0];c=g+m.padding[1];o=q+m.padding[2];k=h-m.padding[3];return new Ext.lib.Region(u,c,o,k)},isOverTarget:function(m,b,e){var h=this.locationCache[b.id];if(!h||!this.useCache){h=this.getLocation(b);this.locationCache[b.id]=h}if(!h){return false}b.cursorIsOver=h.contains(m);var l=this.dragCurrent;if(!l||!l.getTargetCoord||(!e&&!l.constrainX&&!l.constrainY)){return b.cursorIsOver}b.overlap=null;var i=l.getTargetCoord(m.x,m.y);var c=l.getDragEl();var g=new Ext.lib.Region(i.y,i.x+c.offsetWidth,i.y+c.offsetHeight,i.x);var k=g.intersect(h);if(k){b.overlap=k;return(e)?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(e,b){if(e.swapNode){e.swapNode(b)}else{var g=b.parentNode;var c=b.nextSibling;if(c==e){g.insertBefore(e,b)}else{if(b==e.nextSibling){g.insertBefore(b,e)}else{e.parentNode.replaceChild(b,e);g.insertBefore(e,c)}}}},getScroll:function(){var e,b,g=document.documentElement,c=document.body;if(g&&(g.scrollTop||g.scrollLeft)){e=g.scrollTop;b=g.scrollLeft}else{if(c){e=c.scrollTop;b=c.scrollLeft}else{}}return{top:e,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,e){var c=Ext.lib.Dom.getXY(e);Ext.lib.Dom.setXY(b,c)},numericSort:function(e,c){return(e-c)},_timeoutCount:0,_addListeners:function(){var b=Ext.dd.DDM;if(Ext.lib.Event&&document){b._onLoad()}else{if(b._timeoutCount>2000){}else{setTimeout(b._addListeners,10);if(document&&document.body){b._timeoutCount+=1}}}},handleWasClicked:function(b,e){if(this.isHandle(e,b.id)){return true}else{var c=b.parentNode;while(c){if(this.isHandle(e,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 e=b-this.startPageY;this.setDelta(a,e)},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,i,h){var g=this.getTargetCoord(i,h);var b=c.dom?c:Ext.fly(c,"_dd");if(!this.deltaSetXY){var k=[g.x,g.y];b.setXY(k);var e=b.getLeft(true);var a=b.getTop(true);this.deltaSetXY=[e-g.x,a-g.y]}else{b.setLeftTop(g.x+this.deltaSetXY[0],g.y+this.deltaSetXY[1])}this.cachePosition(g.x,g.y);this.autoScroll(g.x,g.y,c.offsetHeight,c.offsetWidth);return g},cachePosition:function(b,a){if(b){this.lastPageX=b;this.lastPageY=a}else{var c=Ext.lib.Dom.getXY(this.getEl());this.lastPageX=c[0];this.lastPageY=c[1]}},autoScroll:function(n,m,g,o){if(this.scroll){var p=Ext.lib.Dom.getViewHeight();var b=Ext.lib.Dom.getViewWidth();var r=this.DDM.getScrollTop();var e=this.DDM.getScrollLeft();var l=g+m;var q=o+n;var k=(p+r-m-this.deltaY);var i=(b+e-n-this.deltaX);var c=40;var a=(document.all)?80:30;if(l>p&&k<c){window.scrollTo(e,r+a)}if(m<r&&r>0&&m-r<c){window.scrollTo(e,r-a)}if(q>b&&i<c){window.scrollTo(e+a,r)}if(n<e&&e>0&&n-e<c){window.scrollTo(e-a,r)}}},getTargetCoord:function(c,b){var a=c-this.deltaX;var e=b-this.deltaY;if(this.constrainX){if(a<this.minX){a=this.minX}if(a>this.maxX){a=this.maxX}}if(this.constrainY){if(e<this.minY){e=this.minY}if(e>this.maxY){e=this.maxY}}a=this.getTick(a,this.xTicks);e=this.getTick(e,this.yTicks);return{x:a,y:e}},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 e=this.getDragEl();if(!e){e=document.createElement("div");e.id=this.dragElId;var c=e.style;c.position="absolute";c.visibility="hidden";c.cursor="move";c.border="2px solid #aaa";c.zIndex=999;a.insertBefore(e,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(g,e){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(g,e);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(g,c){g.preventDefault();var b=g.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,g);this.onDrag(g);this.fireEvent("drag",this,g)},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 g={};var b=null;var k={};var i=function(n){b=null;a()};var l=function(){if(c.dragCurrent){c.refreshCache(c.dragCurrent.groups)}};var e=function(){if(c.dragCurrent){var n=Ext.dd.ScrollManager;var o=k.el.ddScrollConfig?k.el.ddScrollConfig.increment:n.increment;if(!n.animate){if(k.el.scroll(k.dir,o)){l()}}else{k.el.scroll(k.dir,o,true,n.animDuration,l)}}};var a=function(){if(k.id){clearInterval(k.id)}k.id=0;k.el=null;k.dir=""};var h=function(o,n){a();k.el=o;k.dir=n;var p=(o.ddScrollConfig&&o.ddScrollConfig.frequency)?o.ddScrollConfig.frequency:Ext.dd.ScrollManager.frequency;k.id=setInterval(e,p)};var m=function(q,t){if(t||!c.dragCurrent){return}var u=Ext.dd.ScrollManager;if(!b||b!=c.dragCurrent){b=c.dragCurrent;u.refreshCache()}var v=Ext.lib.Event.getXY(q);var w=new Ext.lib.Point(v[0],v[1]);for(var o in g){var p=g[o],n=p._region;var s=p.ddScrollConfig?p.ddScrollConfig:u;if(n&&n.contains(w)&&p.isScrollable()){if(n.bottom-w.y<=s.vthresh){if(k.el!=p){h(p,"down")}return}else{if(n.right-w.x<=s.hthresh){if(k.el!=p){h(p,"left")}return}else{if(w.y-n.top<=s.vthresh){if(k.el!=p){h(p,"up")}return}else{if(w.x-n.left<=s.hthresh){if(k.el!=p){h(p,"right")}return}}}}}}a()};c.fireEvents=c.fireEvents.createSequence(m,c);c.stopDrag=c.stopDrag.createSequence(i,c);return{register:function(p){if(Ext.isArray(p)){for(var o=0,n=p.length;o<n;o++){this.register(p[o])}}else{p=Ext.get(p);g[p.id]=p}},unregister:function(p){if(Ext.isArray(p)){for(var o=0,n=p.length;o<n;o++){this.unregister(p[o])}}else{p=Ext.get(p);delete g[p.id]}},vthresh:25,hthresh:25,increment:100,frequency:500,animate:true,animDuration:0.4,refreshCache:function(){for(var n in g){if(typeof g[n]=="object"){g[n]._region=g[n].getRegion()}}}}}();Ext.dd.Registry=function(){var e={};var b={};var a=0;var c=function(h,g){if(typeof h=="string"){return h}var i=h.id;if(!i&&g!==false){i="extdd-"+(++a);h.id=i}return i};return{register:function(l,m){m=m||{};if(typeof l=="string"){l=document.getElementById(l)}m.ddel=l;e[c(l)]=m;if(m.isHandle!==false){b[m.ddel.id]=m}if(m.handles){var k=m.handles;for(var h=0,g=k.length;h<g;h++){b[c(k[h])]=m}}},unregister:function(l){var n=c(l,false);var m=e[n];if(m){delete e[n];if(m.handles){var k=m.handles;for(var h=0,g=k.length;h<g;h++){delete b[c(k[h],false)]}}}},getHandle:function(g){if(typeof g!="string"){g=g.id}return b[g]},getHandleFromEvent:function(h){var g=Ext.lib.Event.getTarget(h);return g?b[g.id]:null},getTarget:function(g){if(typeof g!="string"){g=g.id}return e[g]},getTargetFromEvent:function(h){var g=Ext.lib.Event.getTarget(h);return g?e[g.id]||b[g.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,g){var b=Ext.dd.DragDropMgr.getDDById(g);this.cachedTarget=b;if(this.beforeDragEnter(b,c,g)!==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,g)}}},beforeDragEnter:function(b,a,c){return true},alignElWithMouse:function(){Ext.dd.DragSource.superclass.alignElWithMouse.apply(this,arguments);this.proxy.sync()},onDragOver:function(c,g){var b=this.cachedTarget||Ext.dd.DragDropMgr.getDDById(g);if(this.beforeDragOver(b,c,g)!==false){if(b.isNotifyTarget){var a=b.notifyOver(this,c,this.dragData);this.proxy.setStatus(a)}if(this.afterDragOver){this.afterDragOver(b,c,g)}}},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(g,a,c,b){},onNodeOver:function(g,a,c,b){return this.dropAllowed},onNodeOut:function(g,a,c,b){},onNodeDrop:function(g,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 g=this.getTargetFromEvent(c);if(!g){if(this.lastOverNode){this.onNodeOut(this.lastOverNode,a,c,b);this.lastOverNode=null}return this.onContainerOver(a,c,b)}if(this.lastOverNode!=g){if(this.lastOverNode){this.onNodeOut(this.lastOverNode,a,c,b)}this.onNodeEnter(g,a,c,b);this.lastOverNode=g}return this.onNodeOver(g,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 g=this.getTargetFromEvent(c);return g?this.onNodeDrop(g,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(g){var c=Ext.extend(Ext.data.Record,{});var e=c.prototype;e.fields=new Ext.util.MixedCollection(false,function(h){return h.name});for(var b=0,a=g.length;b<a;b++){e.fields.add(new Ext.data.Field(g[b]))}c.getField=function(h){return e.fields.get(h)};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 e=0,a=b.length;e<a;e++){b[e].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 e=0,a=b.length;e<a;e++){this.data.insert(c,b[e]);b[e].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(k,b,h){if(!k||h===false){if(h!==false){this.fireEvent("load",this,[],b)}if(b.callback){b.callback.call(b.scope||this,[],b,false)}return}var g=k.records,e=k.totalRecords||g.length;if(!b||b.add!==true){if(this.pruneModifiedRecords){this.modified=[]}for(var c=0,a=g.length;c<a;c++){g[c].join(this)}if(this.snapshot){this.data=this.snapshot;delete this.snapshot}this.data.clear();this.data.addAll(g);this.totalLength=e;this.applySort();this.fireEvent("datachanged",this)}else{this.totalLength=Math.max(e,this.data.length+g.length);this.add(g)}this.fireEvent("load",this,g,b);if(b.callback){b.callback.call(b.scope||this,g,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,e){e=e||"ASC";var a=this.fields.get(c).sortType;var b=function(h,g){var k=a(h.data[c]),i=a(g.data[c]);return k>i?1:(k<i?-1:0)};this.data.sort(e,b);if(this.snapshot&&this.snapshot!=this.data){this.snapshot.sort(e,b)}},setDefaultSort:function(b,a){a=a?a.toUpperCase():"ASC";this.sortInfo={field:b,direction:a};this.sortToggle[b]=a},sort:function(g,c){var e=this.fields.get(g);if(!e){return false}if(!c){if(this.sortInfo&&this.sortInfo.field==e.name){c=(this.sortToggle[e.name]||"ASC").toggle("ASC","DESC")}else{c=e.sortDir}}var b=(this.sortToggle)?this.sortToggle[e.name]:null;var a=(this.sortInfo)?this.sortInfo:null;this.sortToggle[e.name]=c;this.sortInfo={field:e.name,direction:c};if(!this.remoteSort){this.applySort();this.fireEvent("datachanged",this)}else{if(!this.load(this.lastOptions)){if(b){this.sortToggle[e.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,e,a){if(Ext.isEmpty(b,false)){return false}b=this.data.createValueMatcher(b,e,a);return function(g){return b.test(g.data[c])}},sum:function(g,h,a){var c=this.data.items,b=0;h=h||0;a=(a||a===0)?a:c.length-1;for(var e=h;e<=a;e++){b+=(c[e].data[g]||0)}return b},filter:function(e,c,g,a){var b=this.createFilterFn(e,c,g,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(e,c,g,a){var b=this.createFilterFn(e,c,g,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(e,c,h,g,a){var b=this.createFilterFn(e,c,g,a);return b?this.data.findIndexBy(b,null,h):-1},findBy:function(b,a,c){return this.data.findIndexBy(b,a,c)},collect:function(k,m,b){var h=(b===true&&this.snapshot)?this.snapshot.items:this.data.items;var n,o,a=[],c={};for(var e=0,g=h.length;e<g;e++){n=h[e].data[k];o=String(n);if((m||!Ext.isEmpty(n))&&!c[o]){c[o]=true;a[a.length]=n}}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(g,b){if(this.expandData===true){var e=[];for(var c=0,a=g.length;c<a;c++){e[e.length]=[g[c]]}g=e}Ext.data.SimpleStore.superclass.loadData.call(this,g,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(e){if(typeof e=="string"){e={name:e}}Ext.apply(this,e);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 g=/[\$,%]/g;if(!this.convert){var b,a=this.dateFormat;switch(this.type){case"":case"auto":case undefined:b=function(h){return h};break;case"string":b=function(h){return(h===undefined||h===null)?"":String(h)};break;case"int":b=function(h){return h!==undefined&&h!==null&&h!==""?parseInt(String(h).replace(g,""),10):""};break;case"float":b=function(h){return h!==undefined&&h!==null&&h!==""?parseFloat(String(h).replace(g,""),10):""};break;case"bool":case"boolean":b=function(h){return h===true||h==="true"||h==1};break;case"date":b=function(i){if(!i){return""}if(Ext.isDate(i)){return i}if(a){if(a=="timestamp"){return new Date(i*1000)}if(a=="time"){return new Date(parseInt(i,10))}return Date.parseDate(i,a)}var h=Date.parse(i);return h?new Date(h):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(i,c,k,g,b){i=i||{};var a;try{a=c.readRecords(this.data)}catch(h){this.fireEvent("loadexception",this,b,null,h);k.call(g,null,b,false);return}k.call(g,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(g,b,h,c,a){if(this.fireEvent("beforeload",this,g)!==false){var e={params:g||{},request:{callback:h,scope:c,arg:a},reader:b,callback:this.loadResponse,scope:this};if(this.useAjax){Ext.applyIf(e,this.conn);if(this.activeRequest){Ext.Ajax.abort(this.activeRequest)}this.activeRequest=Ext.Ajax.request(e)}else{this.conn.request(e)}}else{h.call(c||this,null,a,false)}},loadResponse:function(h,g,b){delete this.activeRequest;if(!g){this.fireEvent("loadexception",this,h,b);h.request.callback.call(h.request.scope,null,h.request.arg,false);return}var a;try{a=h.reader.read(b)}catch(c){this.fireEvent("loadexception",this,h,b,c);h.request.callback.call(h.request.scope,null,h.request.arg,false);return}this.fireEvent("load",this,h,h.request.arg);h.request.callback.call(h.request.scope,a,h.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(g,h,k,l,m){if(this.fireEvent("beforeload",this,g)!==false){var c=Ext.urlEncode(Ext.apply(g,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 n={id:a,cb:"stcCallback"+a,scriptId:"stcScript"+a,params:g,arg:m,url:b,callback:k,scope:l,reader:h};var e=this;window[n.cb]=function(p){e.handleResponse(p,n)};b+=String.format("&{0}={1}",this.callbackParam,n.cb);if(this.autoAbort!==false){this.abort()}n.timeoutId=this.handleFailure.defer(this.timeout,this,[n]);var i=document.createElement("script");i.setAttribute("src",b);i.setAttribute("type","text/javascript");i.setAttribute("id",n.scriptId);this.head.appendChild(i);this.trans=n}else{k.call(l||this,null,m,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(g){}}}},handleResponse:function(g,b){this.trans=false;this.destroyTrans(b,true);var a;try{a=b.reader.readRecords(g)}catch(c){this.fireEvent("loadexception",this,g,b.arg,c);b.callback.call(b.scope||window,null,b.arg,false);return}this.fireEvent("load",this,g,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(e){return e[c]}}catch(b){}return Ext.emptyFn}}(),readRecords:function(t){this.jsonData=t;if(t.metaData){delete this.ef;this.meta=t.metaData;this.recordType=Ext.data.Record.create(t.metaData.fields);this.onMetaChange(this.meta,this.recordType,t)}var p=this.meta,a=this.recordType,B=a.prototype.fields,l=B.items,k=B.length;if(!this.ef){if(p.totalProperty){this.getTotal=this.getJsonAccessor(p.totalProperty)}if(p.successProperty){this.getSuccess=this.getJsonAccessor(p.successProperty)}this.getRoot=p.root?this.getJsonAccessor(p.root):function(c){return c};if(p.id){var A=this.getJsonAccessor(p.id);this.getId=function(g){var c=A(g);return(c===undefined||c==="")?null:c}}else{this.getId=function(){return null}}this.ef=[];for(var y=0;y<k;y++){B=l[y];var D=(B.mapping!==undefined&&B.mapping!==null)?B.mapping:B.name;this.ef[y]=this.getJsonAccessor(D)}}var w=this.getRoot(t),C=w.length,q=C,h=true;if(p.totalProperty){var m=parseInt(this.getTotal(t),10);if(!isNaN(m)){q=m}}if(p.successProperty){var m=this.getSuccess(t);if(m===false||m==="false"){h=false}}var z=[];for(var y=0;y<C;y++){var u=w[y];var b={};var r=this.getId(u);for(var x=0;x<k;x++){B=l[x];var m=this.ef[x](u);b[B.name]=B.convert((m!==undefined)?m:B.defaultValue,u)}var e=new a(b,r);e.json=u;z[y]=e}return{success:h,records:z,totalRecords:q}}});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(A){this.xmlData=A;var t=A.documentElement||A;var m=Ext.DomQuery;var b=this.recordType,r=b.prototype.fields;var e=this.meta.id;var k=0,g=true;if(this.meta.totalRecords){k=m.selectNumber(this.meta.totalRecords,t,0)}if(this.meta.success){var p=m.selectValue(this.meta.success,t,true);g=p!==false&&p!=="false"}var x=[];var B=m.select(this.meta.record,t);for(var w=0,y=B.length;w<y;w++){var s=B[w];var a={};var o=e?m.selectValue(e,s):undefined;for(var u=0,l=r.length;u<l;u++){var z=r.items[u];var h=m.selectValue(z.mapping||z.name,s,z.defaultValue);h=z.convert(h,s);a[z.name]=h}var c=new b(a,o);c.node=s;x[x.length]=c}return{success:g,records:x,totalRecords:k||x.length}}});Ext.data.ArrayReader=Ext.extend(Ext.data.JsonReader,{readRecords:function(c){var b=this.meta?this.meta.id:null;var l=this.recordType,r=l.prototype.fields;var g=[];var t=c;for(var p=0;p<t.length;p++){var e=t[p];var w={};var a=((b||b===0)&&e[b]!==undefined&&e[b]!==""?e[b]:null);for(var m=0,x=r.length;m<x;m++){var s=r.items[m];var h=s.mapping!==undefined&&s.mapping!==null?s.mapping:m;var u=e[h]!==undefined?e[h]:s.defaultValue;u=s.convert(u,e);w[s.name]=u}var q=new l(w,a);q.json=e;g[g.length]=q}return{records:g,totalRecords:g.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(e){for(var c=0,b=this.length;c<b;c++){if(this[c]==e){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(g){var h=false;if(Ext.isArray(g)){h=g}else{if(arguments.length>1){h=arguments}}if(h){for(var e=0,a=h.length;e<a;e++){this.appendChild(h[e])}}else{if(this.fireEvent("beforeappend",this.ownerTree,this,g)===false){return false}var b=this.childNodes.length;var c=g.parentNode;if(c){if(g.fireEvent("beforemove",g.getOwnerTree(),g,c,this,b)===false){return false}c.removeChild(g)}b=this.childNodes.length;if(b==0){this.setFirstChild(g)}this.childNodes.push(g);g.parentNode=this;var k=this.childNodes[b-1];if(k){g.previousSibling=k;k.nextSibling=g}else{g.previousSibling=null}g.nextSibling=null;this.setLastChild(g);g.setOwnerTree(this.getOwnerTree());this.fireEvent("append",this.ownerTree,this,g,b);if(c){g.fireEvent("move",this.ownerTree,g,c,this,b)}return g}},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(e,a){if(!a){return this.appendChild(e)}if(e==a){return false}if(this.fireEvent("beforeinsert",this.ownerTree,this,e,a)===false){return false}var b=this.childNodes.indexOf(a);var c=e.parentNode;var g=b;if(c==this&&this.childNodes.indexOf(e)<b){g--}if(c){if(e.fireEvent("beforemove",e.getOwnerTree(),e,c,this,b,a)===false){return false}c.removeChild(e)}if(g==0){this.setFirstChild(e)}this.childNodes.splice(g,0,e);e.parentNode=this;var h=this.childNodes[g-1];if(h){e.previousSibling=h;h.nextSibling=e}else{e.previousSibling=null}e.nextSibling=a;a.previousSibling=e;e.setOwnerTree(this.getOwnerTree());this.fireEvent("insert",this.ownerTree,this,e,a);if(c){e.fireEvent("move",this.ownerTree,e,c,this,g,a)}return e},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 e=this.childNodes;for(var c=0,a=e.length;c<a;c++){e[c].setOwnerTree(b)}if(b){b.registerNode(this)}}},getPath:function(c){c=c||"id";var g=this.parentNode;var a=[this.attributes[c]];while(g){a.unshift(g.attributes[c]);g=g.parentNode}var e=this.getOwnerTree().pathSeparator;return e+a.join(e)},bubble:function(c,b,a){var e=this;while(e){if(c.apply(b||e,a||[e])===false){break}e=e.parentNode}},cascade:function(h,g,b){if(h.apply(g||this,b||[this])!==false){var e=this.childNodes;for(var c=0,a=e.length;c<a;c++){e[c].cascade(h,g,b)}}},eachChild:function(h,g,b){var e=this.childNodes;for(var c=0,a=e.length;c<a;c++){if(h.apply(g||this,b||[e[c]])===false){break}}},findChild:function(e,g){var c=this.childNodes;for(var b=0,a=c.length;b<a;b++){if(c[b].attributes[e]==g){return c[b]}}return null},findChildBy:function(g,e){var c=this.childNodes;for(var b=0,a=c.length;b<a;b++){if(g.call(e||c[b],c[b])===true){return c[b]}}return null},sort:function(g,e){var c=this.childNodes;var a=c.length;if(a>0){var h=e?function(){g.apply(e,arguments)}:g;c.sort(h);for(var b=0;b<a;b++){var k=c[b];k.previousSibling=c[b-1];k.nextSibling=c[b+1];if(b==0){this.setFirstChild(k)}if(b==a-1){this.setLastChild(k)}}}},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(e){b.add(e)},unregister:function(e){b.remove(e)},get:function(c){return b.get(c)},onAvailable:function(g,e,c){b.on("add",function(h,i){if(i.id==g){e.call(c||i,i);b.un("add",e,c)}})},all:b,registerType:function(e,c){a[e]=c;c.xtype=e},create:function(c,e){return new a[c.xtype||e](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 e=[],b=this;while(b&&b.constructor.xtype){e.unshift(b.constructor.xtype);b=b.constructor.superclass}a.xtypeChain=e;a.xtypes=e.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(g,b,e,c,a){if(!this.mons){this.mons=[];this.on("beforedestroy",function(){for(var l=0,k=this.mons.length;l<k;l++){var h=this.mons[l];h.item.un(h.ename,h.fn,h.scope)}},this)}this.mons.push({item:g,ename:b,fn:e,scope:c});g.on(b,e,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(g,b){var e=this.items;for(var c=0,a=e.length;c<a;c++){e[c][g].apply(e[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(e,c){e=e||{};var g=Ext.DomHelper;var i=e.parentEl,h=i?Ext.getDom(i):document.body;if(c){this.dom=Ext.getDom(c)}if(!this.dom){var k=e.dh||{tag:"div",cls:"x-layer"};this.dom=g.append(h,k)}if(e.cls){this.addClass(e.cls)}this.constrain=e.constrain!==false;this.visibilityMode=Ext.Element.VISIBILITY;if(e.id){this.id=this.dom.id=e.id}else{this.id=Ext.id(this.dom)}this.zindex=e.zindex||this.getZIndex();this.position("absolute",this.zindex);if(e.shadow){this.shadowOffset=e.shadowOffset||4;this.shadow=new Ext.Shadow({offset:this.shadowOffset,mode:e.shadow})}else{this.shadowOffset=0}this.useShim=e.shim!==false&&Ext.useShims;this.useDisplay=e.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 e=b.shift();if(!e){e=this.createShim();e.enableDisplayMode("block");e.dom.style.display="none";e.dom.style.visibility="visible"}var c=this.dom.parentNode;if(e.dom.parentNode!=c){c.insertBefore(e.dom,this.dom)}e.setStyle("z-index",this.getZIndex()-2);this.shim=e;return e},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 n=this.shadow;if(!this.updating&&this.isVisible()&&(n||this.useShim)){var i=this.getShim();var m=this.getWidth(),g=this.getHeight();var e=this.getLeft(true),o=this.getTop(true);if(n&&!this.shadowDisabled){if(c&&!n.isVisible()){n.show(this)}else{n.realign(e,o,m,g)}if(i){if(c){i.show()}var k=n.adjusts,p=i.dom.style;p.left=(Math.min(e,e+k.l))+"px";p.top=(Math.min(o,o+k.t))+"px";p.width=(m+k.w)+"px";p.height=(g+k.h)+"px"}}else{if(i){if(c){i.show()}i.setSize(m,g);i.setLeftTop(e,o)}}}},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 k=Ext.lib.Dom.getViewWidth(),c=Ext.lib.Dom.getViewHeight();var p=Ext.getDoc().getScroll();var o=this.getXY();var l=o[0],i=o[1];var m=this.dom.offsetWidth+this.shadowOffset,e=this.dom.offsetHeight+this.shadowOffset;var g=false;if((l+m)>k+p.left){l=k-m-this.shadowOffset;g=true}if((i+e)>c+p.top){i=c-e-this.shadowOffset;g=true}if(l<p.left){l=p.left;g=true}if(i<p.top){i=p.top;g=true}if(g){if(this.avoidY){var n=this.avoidY;if(i<=n&&(i+e)>=n){i=n-e-5}}o=[l,i];this.storeXY(o);a.setXY.call(this,o);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(i,h,l,m,k){if(i){this.showAction()}if(h&&i){var g=function(){this.sync(true);if(m){m()}}.createDelegate(this);a.setVisible.call(this,true,true,l,g,k)}else{if(!i){this.hideUnders(true)}var g=m;if(h){g=function(){this.hideAction();if(m){m()}}.createDelegate(this)}a.setVisible.call(this,i,h,l,g,k);if(i){this.sync(true)}else{if(!h){this.hideAction()}}}},storeXY:function(c){delete this.lastLT;this.lastXY=c},storeLeftTop:function(e,c){delete this.lastXY;this.lastLT=[e,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(e,c){this.storeLeftTop(e,c);a.setLeftTop.apply(this,arguments);this.sync()},setXY:function(k,h,l,m,i){this.fixDisplay();this.beforeAction();this.storeXY(k);var g=this.createCB(m);a.setXY.call(this,k,h,l,g,i);if(!h){g()}},createCB:function(g){var e=this;return function(){e.constrainXY();e.sync(true);if(g){g()}}},setX:function(g,h,k,l,i){this.setXY([g,this.getY()],h,k,l,i)},setY:function(l,g,i,k,h){this.setXY([this.getX(),l],g,i,k,h)},setSize:function(k,l,i,n,o,m){this.beforeAction();var g=this.createCB(o);a.setSize.call(this,k,l,i,n,g,m);if(!i){g()}},setWidth:function(i,h,l,m,k){this.beforeAction();var g=this.createCB(m);a.setWidth.call(this,i,h,l,g,k);if(!h){g()}},setHeight:function(k,i,m,n,l){this.beforeAction();var g=this.createCB(n);a.setHeight.call(this,k,i,m,g,l);if(!i){g()}},setBounds:function(p,n,q,i,o,l,m,k){this.beforeAction();var g=this.createCB(m);if(!o){this.storeXY([p,n]);a.setXY.call(this,[p,n]);a.setSize.call(this,q,i,o,l,g,k);g()}else{a.setBounds.call(this,p,n,q,i,o,l,g,k)}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(e){Ext.apply(this,e);if(typeof this.mode!="string"){this.mode=this.defaultMode}var g=this.offset,c={h:0};var b=Math.floor(this.offset/2);switch(this.mode.toLowerCase()){case"drop":c.w=0;c.l=c.t=g;c.t-=1;if(Ext.isIE){c.l-=this.offset+b;c.t-=this.offset+b;c.w-=b;c.h-=b;c.t+=1}break;case"sides":c.w=(g*2);c.l=-g;c.t=g-1;if(Ext.isIE){c.l-=(this.offset-b);c.t-=this.offset+b;c.l+=1;c.w-=(this.offset-b)*2;c.w-=b+1;c.h-=1}break;case"frame":c.w=c.h=(g*2);c.l=c.t=-g;c.t+=1;c.h-=2;if(Ext.isIE){c.l-=(this.offset-b);c.t-=(this.offset-b);c.l+=1;c.w-=(this.offset+b+1);c.h-=(this.offset+b);c.h+=1}break}this.adjusts=c};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(b,u,r,g){if(!this.el){return}var o=this.adjusts,m=this.el.dom,v=m.style;var i=0;v.left=(b+o.l)+"px";v.top=(u+o.t)+"px";var q=(r+o.w),e=(g+o.h),k=q+"px",p=e+"px";if(v.width!=k||v.height!=p){v.width=k;v.height=p;if(!Ext.isIE){var n=m.childNodes;var c=Math.max(0,(q-12))+"px";n[0].childNodes[1].style.width=c;n[1].childNodes[1].style.width=c;n[2].childNodes[1].style.width=c;n[1].style.height=Math.max(0,(e-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,e){if(typeof b=="object"){e=b.height;b=b.width}if(!this.boxReady){this.width=b;this.height=e;return this}if(this.lastSize&&this.lastSize.width==b&&this.lastSize.height==e){return this}this.lastSize={width:b,height:e};var c=this.adjustSize(b,e);var i=c.width,a=c.height;if(i!==undefined||a!==undefined){var g=this.getResizeEl();if(!this.deferHeight&&i!==undefined&&a!==undefined){g.setSize(i,a)}else{if(!this.deferHeight&&a!==undefined){g.setHeight(a)}else{if(i!==undefined){g.setWidth(i)}}}this.onResize(i,a,b,e);this.fireEvent("resize",this,i,a,b,e)}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,h){if(a&&typeof a[1]=="number"){h=a[1];a=a[0]}this.x=a;this.y=h;if(!this.boxReady){return this}var b=this.adjustPosition(a,h);var g=b.x,e=b.y;var c=this.getPositionEl();if(g!==undefined||e!==undefined){if(g!==undefined&&e!==undefined){c.setLeftTop(g,e)}else{if(g!==undefined){c.setLeft(g)}else{if(e!==undefined){c.setTop(e)}}}this.onPosition(g,e);this.fireEvent("move",this,g,e)}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(e,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,g,b,e,a){this.el=Ext.get(c,true);this.el.dom.unselectable="on";this.resizingEl=Ext.get(g,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=e||(this.el.getX()>this.resizingEl.getX()?Ext.SplitBar.LEFT:Ext.SplitBar.RIGHT);this.el.addClass("x-splitbar-h")}else{this.placement=e||(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,g){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 e=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?e:b,this.placement==Ext.SplitBar.LEFT?b:e);this.dd.setYConstraint(0,0)}else{this.dd.resetConstraints();this.dd.setXConstraint(0,0);this.dd.setYConstraint(this.placement==Ext.SplitBar.TOP?e:b,this.placement==Ext.SplitBar.TOP?b:e)}this.dragSpecs.startSize=c;this.dragSpecs.startPoint=[a,g];Ext.dd.DDProxy.prototype.b4StartDrag.call(this.dd,a,g)},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(g){if(!this.items){this.initItems()}var e=arguments,b=e.length;if(b>1){for(var h=0;h<b;h++){this.add(e[h])}return}var l=this.lookupComponent(this.applyDefaults(g));var k=this.items.length;if(this.fireEvent("beforeadd",this,l,k)!==false&&this.onBeforeAdd(l)!==false){this.items.add(l);l.ownerCt=this;this.fireEvent("add",this,l,k)}return l},insert:function(h,g){if(!this.items){this.initItems()}var e=arguments,b=e.length;if(b>2){for(var k=b-1;k>=1;--k){this.insert(h,e[k])}return}var l=this.lookupComponent(this.applyDefaults(g));if(l.ownerCt==this&&this.items.indexOf(l)<h){--h}if(this.fireEvent("beforeadd",this,l,h)!==false&&this.onBeforeAdd(l)!==false){this.items.insert(h,l);l.ownerCt=this;this.fireEvent("add",this,l,h)}return l},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 e=this.getComponent(a);if(e&&this.fireEvent("beforeremove",this,e)!==false){this.items.remove(e);delete e.ownerCt;if(b===true||(b!==false&&this.autoDestroy)){e.destroy()}if(this.layout&&this.layout.activeItem==e){delete this.layout.activeItem}this.fireEvent("remove",this,e)}return e},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(g){if(this.rendered&&this.layout){this.layout.layout()}if(g!==false&&this.items){var e=this.items.items;for(var b=0,a=e.length;b<a;b++){var h=e[b];if(h.doLayout){h.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 e=this;while(e){if(c.apply(b||e,a||[e])===false){break}e=e.ownerCt}},cascade:function(h,g,b){if(h.apply(g||this,b||[this])!==false){if(this.items){var e=this.items.items;for(var c=0,a=e.length;c<a;c++){if(e[c].cascade){e[c].cascade(h,g,b)}else{h.apply(g||e[c],b||[e[c]])}}}}},findById:function(c){var a,b=this;this.cascade(function(e){if(b!=e&&e.id===c){a=e;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(e){return e[b]===a})},findBy:function(e,c){var a=[],b=this;this.cascade(function(g){if(b!=g&&e.call(c||g,g,b)===true){a.push(g)}});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(e,b){var a=e.getPositionEl?e.getPositionEl():e.getEl();return a.dom.parentNode==b.dom},renderAll:function(g,h){var b=g.items.items;for(var e=0,a=b.length;e<a;e++){var k=b[e];if(k&&(!k.rendered||!this.isValidParent(k,h))){this.renderItem(k,e,h)}}},renderItem:function(g,a,e){if(g&&!g.rendered){g.render(e,a);if(this.extraCls){var b=g.getPositionEl?g.getPositionEl():g;b.addClass(this.extraCls)}if(this.renderHidden&&g!=this.activeItem){g.hide()}}else{if(g&&!this.isValidParent(g,e)){if(this.extraCls){g.addClass(this.extraCls)}if(typeof a=="number"){a=e.dom.childNodes[a]}e.dom.insertBefore(g.getEl().dom,a||null);if(this.renderHidden&&g!=this.activeItem){g.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(m,p){Ext.layout.AnchorLayout.superclass.onLayout.call(this,m,p);var v=this.getAnchorViewSize(m,p);var t=v.width,l=v.height;if(t<20||l<20){return}var e,r;if(m.anchorSize){if(typeof m.anchorSize=="number"){e=m.anchorSize}else{e=m.anchorSize.width;r=m.anchorSize.height}}else{e=m.initialConfig.width;r=m.initialConfig.height}var o=m.items.items,n=o.length,k,q,s,g,b;for(k=0;k<n;k++){q=o[k];if(q.anchor){s=q.anchorSpec;if(!s){var u=q.anchor.split(" ");q.anchorSpec=s={right:this.parseAnchor(u[0],q.initialConfig.width,e),bottom:this.parseAnchor(u[1],q.initialConfig.height,r)}}g=s.right?this.adjustWidthAnchor(s.right(t),q):undefined;b=s.bottom?this.adjustHeightAnchor(s.bottom(l),q):undefined;if(g||b){q.setSize(g||undefined,b||undefined)}}}},parseAnchor:function(c,i,b){if(c&&c!="none"){var g;if(/^(r|right|b|bottom)$/i.test(c)){var h=b-i;return function(a){if(a!==g){g=a;return a-h}}}else{if(c.indexOf("%")!=-1){var e=parseFloat(c.replace("%",""))*0.01;return function(a){if(a!==g){g=a;return Math.floor(a*e)}}}else{c=parseInt(c,10);if(!isNaN(c)){return function(a){if(a!==g){g=a;return a+c}}}}}}return false},adjustWidthAnchor:function(b,a){return b},adjustHeightAnchor:function(b,a){return b}});Ext.Container.LAYOUTS.anchor=Ext.layout.AnchorLayout;Ext.layout.ColumnLayout=Ext.extend(Ext.layout.ContainerLayout,{monitorResize:true,extraCls:"x-column",scrollOffset:0,isValidParent:function(b,a){return b.getEl().dom.parentNode==this.innerCt.dom},onLayout:function(e,l){var g=e.items.items,k=g.length,m,a;if(!this.innerCt){l.addClass("x-column-layout-ct");this.innerCt=l.createChild({cls:"x-column-inner"});this.innerCt.createChild({cls:"x-clear"})}this.renderAll(e,this.innerCt);var p=Ext.isIE&&l.dom!=Ext.getBody().dom?l.getStyleSize():l.getViewSize();if(p.width<1&&p.height<1){return}var n=p.width-l.getPadding("lr")-this.scrollOffset,b=p.height-l.getPadding("tb"),o=n;this.innerCt.setWidth(n);for(a=0;a<k;a++){m=g[a];if(!m.columnWidth){o-=(m.getSize().width+m.getEl().getMargins("lr"))}}o=o<0?0:o;for(a=0;a<k;a++){m=g[a];if(m.columnWidth){m.setSize(Math.floor(m.columnWidth*o)-m.getEl().getMargins("lr"))}}}});Ext.Container.LAYOUTS.column=Ext.layout.ColumnLayout;Ext.layout.BorderLayout=Ext.extend(Ext.layout.ContainerLayout,{monitorResize:true,rendered:false,onLayout:function(g,J){var k;if(!this.rendered){J.position();J.addClass("x-border-layout-ct");var y=g.items.items;k=[];for(var C=0,D=y.length;C<D;C++){var G=y[C];var p=G.region;if(G.collapsed){k.push(G)}G.collapsed=false;if(!G.rendered){G.cls=G.cls?G.cls+" x-border-panel":"x-border-panel";G.render(J,C)}this[p]=p!="center"&&G.split?new Ext.layout.BorderLayout.SplitRegion(this,G.initialConfig,p):new Ext.layout.BorderLayout.Region(this,G.initialConfig,p);this[p].render(J,G)}this.rendered=true}var x=J.getViewSize();if(x.width<20||x.height<20){if(k){this.restoreCollapsed=k}return}else{if(this.restoreCollapsed){k=this.restoreCollapsed;delete this.restoreCollapsed}}var u=x.width,E=x.height;var t=u,B=E,q=0,r=0;var z=this.north,v=this.south,o=this.west,F=this.east,G=this.center;if(!G){throw"No center region defined in BorderLayout "+g.id}if(z&&z.isVisible()){var I=z.getSize();var A=z.getMargins();I.width=u-(A.left+A.right);I.x=A.left;I.y=A.top;q=I.height+I.y+A.bottom;B-=q;z.applyLayout(I)}if(v&&v.isVisible()){var I=v.getSize();var A=v.getMargins();I.width=u-(A.left+A.right);I.x=A.left;var H=(I.height+A.top+A.bottom);I.y=E-H+A.top;B-=H;v.applyLayout(I)}if(o&&o.isVisible()){var I=o.getSize();var A=o.getMargins();I.height=B-(A.top+A.bottom);I.x=A.left;I.y=q+A.top;var a=(I.width+A.left+A.right);r+=a;t-=a;o.applyLayout(I)}if(F&&F.isVisible()){var I=F.getSize();var A=F.getMargins();I.height=B-(A.top+A.bottom);var a=(I.width+A.left+A.right);I.x=u-a+A.left;I.y=q+A.top;t-=a;F.applyLayout(I)}var A=G.getMargins();var l={x:r+A.left,y:q+A.top,width:t-(A.left+A.right),height:B-(A.top+A.bottom)};G.applyLayout(l);if(k){for(var C=0,D=k.length;C<D;C++){k[C].collapse(false)}}if(Ext.isIE&&Ext.isStrict){J.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,e=this.position;c.getState=function(){return Ext.apply(a.call(c)||{},this.state)}.createDelegate(this);if(e!="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-"+e);c.tools.toggle.addClassOnOver("x-tool-collapse-"+e+"-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 e=this.splitEl.dom,b=e.style;this.panel.setPosition(c.x,c.y);var a=e.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 e=this.splitEl.dom,b=e.style;var a=e.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 e=this.splitEl.dom,b=e.style;var a=e.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 e=this.splitEl.dom,b=e.style;var a=e.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 e=this.position;this.splitEl=a.createChild({cls:"x-layout-split x-layout-split-"+e,html:"&#160;",id:this.panel.id+"-xsplit"});if(this.collapseMode=="mini"){this.miniSplitEl=this.splitEl.createChild({cls:"x-layout-mini x-layout-mini-"+e,html:"&#160;"});this.miniSplitEl.addClassOnOver("x-layout-mini-over");this.miniSplitEl.on("click",this.onCollapseClick,this,{stopEvent:true})}var b=this.splitSettings[e];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(g,a,e){if(g&&!g.rendered&&g.isFormField&&g.inputType!="hidden"){var b=[g.id,g.fieldLabel,g.labelStyle||this.labelStyle||"",this.elementStyle||"",typeof g.labelSeparator=="undefined"?this.labelSeparator:g.labelSeparator,(g.itemCls||this.container.itemCls||"")+(g.hideLabel?" x-hide-label":""),g.clearCls||"x-form-clear-left"];if(typeof a=="number"){a=e.dom.childNodes[a]||null}if(a){this.fieldTpl.insertBefore(a,b)}else{this.fieldTpl.append(e,b)}g.render("x-form-el-"+g.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(h,g){if(this.fill&&h){var b=this.container.items.items;var e=0;for(var c=0,a=b.length;c<a;c++){var k=b[c];if(k!=h){e+=(k.getSize().height-k.bwrap.getHeight())}}g.height-=e;h.setSize(g)}}});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(e,h){var g=e.items.items,a=g.length,k,b;if(!this.table){h.addClass("x-table-layout-ct");this.table=h.createChild({tag:"table",cls:"x-table-layout",cellspacing:0,cn:{tag:"tbody"}},null,true);this.renderAll(e,h)}},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(l){var a=this.getNextNonSpan(this.currentColumn,this.currentRow);var h=this.currentColumn=a[0],g=this.currentRow=a[1];for(var k=g;k<g+(l.rowspan||1);k++){if(!this.cells[k]){this.cells[k]=[]}for(var e=h;e<h+(l.colspan||1);e++){this.cells[k][e]=true}}var i=document.createElement("td");if(l.cellId){i.id=l.cellId}var b="x-table-layout-cell";if(l.cellCls){b+=" "+l.cellCls}i.className=b;if(l.colspan){i.colSpan=l.colspan}if(l.rowspan){i.rowSpan=l.rowspan}this.getRow(g).appendChild(i);return i},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(e,a,b){if(e&&!e.rendered){e.render(this.getNextCell(e))}},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(m,l){Ext.Panel.superclass.onRender.call(this,m,l);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 r=this.bwrap?this.bwrap:this.el;this.tbar=r.down("."+this.tbarCls);this.body=r.down("."+this.bodyCls);this.bbar=r.down("."+this.bbarCls);this.footer=r.down("."+this.footerCls);this.fromMarkup=true}else{this.el=m.createChild({id:this.id,cls:this.baseCls},l)}var a=this.el,p=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",p.firstChild.firstChild.firstChild);this.createElement("bwrap",p);var t=this.bwrap.dom;var h=p.childNodes[1],c=p.childNodes[2];t.appendChild(h);t.appendChild(c);var u=t.firstChild.firstChild.firstChild;this.createElement("tbar",u);this.createElement("body",u);this.createElement("bbar",u);this.createElement("footer",t.lastChild.firstChild.firstChild);if(!this.footer){this.bwrap.dom.lastChild.className+=" x-panel-nofooter"}}else{this.createElement("header",p);this.createElement("bwrap",p);var t=this.bwrap.dom;this.createElement("tbar",t);this.createElement("body",t);this.createElement("bbar",t);this.createElement("footer",t);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 o=this.tools;this.tools={};this.addTool.apply(this,o)}else{this.tools={}}if(this.buttons&&this.buttons.length>0){var g=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 q=g.getElementsByTagName("tr")[0];for(var k=0,n=this.buttons.length;k<n;k++){var s=this.buttons[k];var e=document.createElement("td");e.className="x-panel-btn-td";s.render(q.appendChild(e))}}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 e=this.header.dom;var c=e.firstChild&&String(e.firstChild.tagName).toLowerCase()=="img"?e.firstChild:null;if(c){Ext.fly(c).replaceClass(a,this.iconCls)}else{Ext.DomHelper.insertBefore(e.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,e,c){var g={handler:e,scope:c,minWidth:this.minButtonWidth,hideParent:true};if(typeof a=="string"){g.text=a}else{Ext.apply(g,a)}var b=new Ext.Button(g);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 k=new Ext.Template('<div class="x-tool x-tool-{id}">&#160;</div>');k.disableFormats=true;k.compile();Ext.Panel.prototype.toolTemplate=k}for(var h=0,e=arguments,c=e.length;h<c;h++){var b=e[h],l="x-tool-"+b.id+"-over";var g=this.toolTemplate.insertFirst((b.align!=="left")?this[this.toolTarget]:this[this.toolTarget].child("span"),b,true);this.tools[b.id]=g;g.enableDisplayMode("block");g.on("click",this.createToolHandler(g,b,l,this));if(b.on){g.on(b.on)}if(b.hidden){g.hide()}if(b.qtip){if(typeof b.qtip=="object"){Ext.QuickTips.register(Ext.apply({target:g.id},b.qtip))}else{g.dom.qtip=b.qtip}}g.addClassOnOver(l)}},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,e,b){return function(g){c.removeClass(e);g.stopEvent();if(a.handler){a.handler.call(a.scope||c,g,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(c,b,e){var g={scope:e,block:true};if(c===true){g.callback=b;return g}else{if(!c.callback){g.callback=b}else{g.callback=function(){b.call(e);Ext.callback(c.callback,c.scope)}}}return Ext.applyIf(g,c)},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 e=this.bwrap.dom.lastChild;a+=(c.offsetHeight+e.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 c in this.tools){Ext.destroy(this.tools[c])}}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,g,b){var e=document.createElement("div");e.className="x-panel-ghost "+(a?a:"");if(this.header){e.appendChild(this.el.dom.firstChild.cloneNode(true))}Ext.fly(e.appendChild(document.createElement("ul"))).setHeight(this.bwrap.getHeight());e.style.width=this.el.dom.offsetWidth+"px";if(!b){this.container.dom.appendChild(e)}else{Ext.getDom(b).appendChild(e)}if(g!==false&&this.el.useShim!==false){var c=new Ext.Layer({shadow:false,useDisplay:true,constrain:false},e);c.show();return c}else{return new Ext.Element(e)}},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 c=this.getBox(false);this.proxy.setBox(c);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 e=this.el.getAlignToXY(b,a,c);this.setPagePosition(e[0],e[1]);return this},anchorTo:function(c,i,e,b,h){var g=function(){this.alignTo(c,i,e)};Ext.EventManager.onWindowResize(g,this);var a=typeof b;if(a!="undefined"){Ext.EventManager.on(window,"scroll",g,this,{buffer:a=="number"?b:50})}g.call(this);this[h]=g;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 h={};var e=[];var g=null;var c=function(l,k){return(!l._lastAccess||l._lastAccess<k._lastAccess)?-1:1};var i=function(){var m=e,k=m.length;if(k>0){m.sort(c);var l=m[0].manager.zseed;for(var n=0;n<k;n++){var o=m[n];if(o&&!o.hidden){o.setZIndex(l+(n*10))}}}a()};var b=function(k){if(k!=g){if(g){g.setActive(false)}g=k;if(k){k.setActive(true)}}};var a=function(){for(var k=e.length-1;k>=0;--k){if(!e[k].hidden){b(e[k]);return}}b(null)};return{zseed:9000,register:function(k){h[k.id]=k;e.push(k);k.on("hide",a)},unregister:function(k){delete h[k.id];k.un("hide",a);e.remove(k)},get:function(k){return typeof k=="object"?k:h[k]},bringToFront:function(k){k=this.get(k);if(k!=g){k._lastAccess=new Date().getTime();i();return true}return false},sendToBack:function(k){k=this.get(k);k._lastAccess=-(new Date().getTime());i();return k},hideAll:function(){for(var k in h){if(h[k]&&typeof h[k]!="function"&&h[k].isVisible()){h[k].hide()}}},getActive:function(){return g},getBy:function(m,l){var n=[];for(var k=e.length-1;k>=0;--k){var o=e[k];if(m.call(l||o,o)!==false){n.push(o)}}return n},each:function(l,k){for(var m in h){if(h[m]&&typeof h[m]!="function"){if(l.call(k||h[m],h[m])===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 n=/^(a|n|d|b|s|o)\:(.*)$/;var c=n.exec(unescape(a));if(!c||!c[1]){return}var h=c[1];var l=c[2];switch(h){case"n":return parseFloat(l);case"d":return new Date(Date.parse(l));case"b":return(l=="1");case"a":var k=[];var m=l.split("^");for(var b=0,e=m.length;b<e;b++){k.push(this.decodeValue(m[b]))}return k;case"o":var k={};var m=l.split("^");for(var b=0,e=m.length;b<e;b++){var g=m[b].split("=");k[g[0]]=this.decodeValue(g[1])}return k;default:return l}},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 h="";for(var g=0,a=c.length;g<a;g++){h+=this.encodeValue(c[g]);if(g!=a-1){h+="^"}}b="a:"+h}else{if(typeof c=="object"){var h="";for(var e in c){if(typeof c[e]!="function"&&c[e]!==undefined){h+=e+"="+this.encodeValue(c[e])+"^"}}b="o:"+h.substring(0,h.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 e={};var i=document.cookie+";";var b=/\s?(.*?)=(.*?);/g;var h;while((h=b.exec(i))!=null){var a=h[1];var g=h[2];if(a&&a.substring(0,3)=="ys-"){e[a.substr(3)]=this.decodeValue(g)}}return e},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,g){var e=[];for(var c=0,a=b.length;c<a;c++){e[e.length]=this.prepareData(b[c].data,g+c,b[c])}return e},bufferRender:function(a){var b=document.createElement("div");this.tpl.overwrite(b,this.collectData(a));return Ext.query(this.itemSelector,b)},onUpdate:function(h,a){var b=this.store.indexOf(a);var g=this.isSelected(b);var c=this.all.elements[b];var e=this.bufferRender([a],b)[0];this.all.replaceElement(b,e,true);if(g){this.selected.replaceElement(c,e);this.all.item(b).addClass(this.selectedClass)}this.updateIndexes(b,b)},onAdd:function(h,e,g){if(this.all.getCount()==0){this.refresh();return}var c=this.bufferRender(e,g),i,b=this.all.elements;if(g<this.all.getCount()){i=this.all.item(g).insertSibling(c,"before",true);b.splice.apply(b,[g,0].concat(c))}else{i=this.all.last().insertSibling(c,"after",true);b.push.apply(b,c)}this.updateIndexes(g)},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(e,c){var b=this.all.elements;e=e||0;c=c||((c===0)?0:(b.length-1));for(var a=e;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,g){if(g.shiftKey&&this.last!==false){var b=this.last;this.selectRange(b,a,g.ctrlKey);this.last=b}else{if((g.ctrlKey||this.simpleSelect)&&this.isSelected(a)){this.deselect(a)}else{this.select(a,g.ctrlKey||g.shiftKey||this.simpleSelect)}}},getSelectionCount:function(){return this.selected.getCount()},getSelectedNodes:function(){return this.selected.elements},getSelectedIndexes:function(){var b=[],e=this.selected.elements;for(var c=0,a=e.length;c<a;c++){b.push(e[c].viewIndex)}return b},getSelectedRecords:function(){var e=[],c=this.selected.elements;for(var b=0,a=c.length;b<a;b++){e[e.length]=this.store.getAt(c[b].viewIndex)}return e},getRecords:function(b){var g=[],e=b;for(var c=0,a=e.length;c<a;c++){g[g.length]=this.store.getAt(e[c].viewIndex)}return g},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(e,h,b){if(Ext.isArray(e)){if(!h){this.clearSelections(true)}for(var c=0,a=e.length;c<a;c++){this.select(e[c],true,true)}if(!b){this.fireEvent("selectionchange",this,this.selected.elements)}}else{var g=this.getNode(e);if(!h){this.clearSelections(true)}if(g&&!this.isSelected(g)){if(this.fireEvent("beforeselect",this,g,this.selected.elements)!==false){Ext.fly(g).addClass(this.selectedClass);this.selected.add(g);this.last=g.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(g,a){var e=this.all.elements;g=g||0;a=typeof a=="undefined"?Math.max(e.length-1,0):a;var b=[],c;if(g<=a){for(c=g;c<=a&&e[c];c++){b.push(e[c])}}else{for(c=g;c>=a&&e[c];c--){b.push(e[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 e=document.createElement("div");e.className=this.itemCls;c.overwrite(e,this.colors);b.dom.insertBefore(e,a);this.el=Ext.get(e);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 g=a.className.match(/(?:^|\s)color-(.{6})(?:\s|$)/)[1];this.select(g.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,h){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 g=this.dayNames;for(var e=0;e<7;e++){var k=this.startDay+e;if(k>6){k=k-7}c.push("<th><span>",g[k].substr(0,1),"</span></th>")}c[c.length]="</tr></thead><tbody><tr>";for(var e=0;e<42;e++){if(e%7==0&&e!=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,h);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 n=new Ext.KeyNav(this.eventEl,{left:function(i){i.ctrlKey?this.showPrevMonth():this.update(this.activeDate.add("d",-1))},right:function(i){i.ctrlKey?this.showNextMonth():this.update(this.activeDate.add("d",1))},up:function(i){i.ctrlKey?this.showNextYear():this.update(this.activeDate.add("d",-7))},down:function(i){i.ctrlKey?this.showPrevYear():this.update(this.activeDate.add("d",7))},pageUp:function(i){this.showNextMonth()},pageDown:function(i){this.showPrevMonth()},enter:function(i){i.stopPropagation();return true},scope:this});this.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 l=(new Date()).dateFormat(this.format);this.todayBtn=new Ext.Button({renderTo:this.el.child("td.x-date-bottom",true),text:String.format(this.todayText,l),tooltip:String.format(this.todayTip,l),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,e,g){g+=1;if((g%2)==0){c.dom.xmonth=5+Math.round(g*0.5)}else{c.dom.xmonth=Math.round((g-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(g){this.mpyear=g;var c=this.mpYears.elements;for(var b=1;b<=10;b++){var e=c[b-1],a;if((b%2)==0){a=g+Math.round(b*0.5);e.firstChild.innerHTML=a;e.xyear=a}else{a=g-(5-Math.round(b*0.5));e.firstChild.innerHTML=a;e.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,e){b[b.dom.xmonth==a?"addClass":"removeClass"]("x-date-mp-sel")})},selectMPMonth:function(a){},onMonthClick:function(g,b){g.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 h=new Date(this.mpSelYear,this.mpSelMonth,(this.activeDate||this.value).getDate());if(h.getMonth()!=this.mpSelMonth){h=new Date(this.mpSelYear,this.mpSelMonth,1).getLastDateOfMonth()}this.update(h);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(g,b){g.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(G,A){var a=this.activeDate;this.activeDate=G;if(!A&&a&&this.el){var o=G.getTime();if(a.getMonth()==G.getMonth()&&a.getFullYear()==G.getFullYear()){this.cells.removeClass("x-date-selected");this.cells.each(function(i){if(i.dom.firstChild.dateValue==o){i.addClass("x-date-selected");setTimeout(function(){try{i.dom.firstChild.focus()}catch(t){}},50);return false}});return}}var k=G.getDaysInMonth();var p=G.getFirstDateOfMonth();var e=p.getDay()-this.startDay;if(e<=this.startDay){e+=7}var B=G.add("mo",-1);var g=B.getDaysInMonth()-e;var c=this.cells.elements;var q=this.textNodes;k+=e;var x=86400000;var D=(new Date(B.getFullYear(),B.getMonth(),g)).clearTime();var C=new Date().clearTime().getTime();var u=G.clearTime().getTime();var s=this.minDate?this.minDate.clearTime():Number.NEGATIVE_INFINITY;var y=this.maxDate?this.maxDate.clearTime():Number.POSITIVE_INFINITY;var F=this.disabledDatesRE;var r=this.disabledDatesText;var I=this.disabledDays?this.disabledDays.join(""):false;var E=this.disabledDaysText;var z=this.format;if(this.showToday){var m=new Date().clearTime();var b=(m<s||m>y||(F&&z&&F.test(m.dateFormat(z)))||(I&&I.indexOf(m.getDay())!=-1));this.todayBtn.setDisabled(b);this.todayKeyListener[b?"disable":"enable"]()}var l=function(K,i){i.title="";var w=D.getTime();i.firstChild.dateValue=w;if(w==C){i.className+=" x-date-today";i.title=K.todayText}if(w==u){i.className+=" x-date-selected";setTimeout(function(){try{i.firstChild.focus()}catch(t){}},50)}if(w<s){i.className=" x-date-disabled";i.title=K.minText;return}if(w>y){i.className=" x-date-disabled";i.title=K.maxText;return}if(I){if(I.indexOf(D.getDay())!=-1){i.title=E;i.className=" x-date-disabled"}}if(F&&z){var J=D.dateFormat(z);if(F.test(J)){i.title=r.replace("%0",J);i.className=" x-date-disabled"}}};var v=0;for(;v<e;v++){q[v].innerHTML=(++g);D.setDate(D.getDate()+1);c[v].className="x-date-prevday";l(this,c[v])}for(;v<k;v++){intDay=v-e+1;q[v].innerHTML=(intDay);D.setDate(D.getDate()+1);c[v].className="x-date-active";l(this,c[v])}var H=0;for(;v<42;v++){q[v].innerHTML=(++H);D.setDate(D.getDate()+1);c[v].className="x-date-nextday";l(this,c[v])}this.mbtn.setText(this.monthNames[G.getMonth()]+" "+G.getFullYear());if(!this.internalRender){var h=this.el.dom.firstChild;var n=h.offsetWidth;this.el.setWidth(n+this.el.getBorderWidth("lr"));Ext.fly(h).setWidth(n);this.internalRender=true;if(Ext.isOpera&&!this.secondPass){h.rows[0].cells[1].style.width=(n-(h.rows[0].cells[0].offsetWidth+h.rows[0].cells[2].offsetWidth))+"px";this.secondPass=true;this.update.defer(10,this,[G])}}},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 h=this.tabPosition=="top"?"header":"footer";this[h].addClass("x-tab-panel-"+h+"-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 g=(this.tabPosition=="bottom"?this.stripWrap:null);this.stripSpacer=b.createChild({cls:"x-tab-strip-spacer"},g);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 e=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>");e.disableFormats=true;e.compile();Ext.TabPanel.prototype.itemTpl=e}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(e){if(e===true){this.items.each(function(i){this.remove(i)},this)}var c=this.el.query(this.autoTabSelector);for(var b=0,a=c.length;b<a;b++){var g=c[b];var h=g.getAttribute("title");g.removeAttribute("title");this.add({title:h,el:g})}},initTab:function(e,b){var g=this.strip.dom.childNodes[b];var a=e.closable?"x-tab-strip-closable":"";if(e.disabled){a+=" x-item-disabled"}if(e.iconCls){a+=" x-tab-with-icon"}if(e.tabCls){a+=" "+e.tabCls}var h={id:this.id+this.idDelimiter+e.getItemId(),text:e.title,cls:a,iconCls:e.iconCls||""};var c=g?this.itemTpl.insertBefore(g,h):this.itemTpl.append(this.strip,h);Ext.fly(c).addClassOnOver("x-tab-strip-over");if(e.tabTip){Ext.fly(c).child("span.x-tab-strip-text",true).qtip=e.tabTip}e.on("disable",this.onItemDisabled,this);e.on("enable",this.onItemEnabled,this);e.on("titlechange",this.onItemTitleChanged,this);e.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 k=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||k<1||!a){return}var m=Math.max(Math.min(Math.floor((a-4)/k)-this.tabMargin,this.tabWidth),this.minTabWidth);this.lastTabWidth=m;var o=this.stripWrap.dom.getElementsByTagName("li");for(var g=0,l=o.length-1;g<l;g++){var n=o[g];var p=n.childNodes[1].firstChild.firstChild;var h=n.offsetWidth;var e=p.offsetWidth;p.style.width=(m-(h-e))+"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 i=this.items.length;var e=this.header.dom.offsetWidth;var c=this.header.dom.clientWidth;var h=this.stripWrap;var g=h.dom;var b=g.offsetWidth;var k=this.getScrollPos();var a=this.edge.getOffsetsTo(this.stripWrap)[0]+k;if(!this.enableTabScroll||i<1||b<20){return}if(a<=c){g.scrollLeft=0;h.setWidth(c);if(this.scrolling){this.scrolling=false;this.header.removeClass("x-tab-scrolling");this.scrollLeft.hide();this.scrollRight.hide();if(Ext.isAir){g.style.marginLeft="";g.style.marginRight=""}}}else{if(!this.scrolling){this.header.addClass("x-tab-scrolling");if(Ext.isAir){g.style.marginLeft="18px";g.style.marginRight="18px"}}c-=h.getMargins("lr");h.setWidth(c>20?c:20);if(!this.scrolling){if(!this.scrollLeft){this.createScrollers()}else{this.scrollLeft.show();this.scrollRight.show()}}this.scrolling=true;if(k>(a-c)){g.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(g,a){if(!g){return}var c=this.getTabEl(g);var i=this.getScrollPos(),e=this.getScrollArea();var h=Ext.fly(c).getOffsetsTo(this.stripWrap)[0]+i;var b=h+c.offsetWidth;if(h<i){this.scrollTo(h,a)}else{if(b>(i+e)){this.scrollTo(b-e,a)}}},scrollTo:function(b,a){this.stripWrap.scrollTo("left",b,a?this.getScrollAnim():false);if(!a){this.updateScrollButtons()}},onWheel:function(g){var h=g.getWheelDelta()*this.wheelIncrement*-1;g.stopEvent();var i=this.getScrollPos();var c=i+h;var a=this.getScrollWidth()-this.getScrollArea();var b=Math.max(0,Math.min(a,c));if(b!=i){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(g){var e=[];for(var c=0,b=a.length;c<b;c++){if(a[c]!=g){e.push(a[c])}}a=e},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,g=[this.text||"&#160;",this.type];if(a){b=this.template.insertBefore(a,g,true)}else{b=this.template.append(c,g,true)}var e=b.child(this.buttonSelector);e.on("focus",this.onFocus,this);e.on("blur",this.onBlur,this);this.initButtonEl(b,e);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(h,m){if(m){var k=a[h.toggleGroup];for(var e=0,c=k.length;e<c;e++){if(k[e]!=h){k[e].toggle(false)}}}}return{register:function(c){if(!c.toggleGroup){return}var e=a[c.toggleGroup];if(!e){e=a[c.toggleGroup]=[]}e.push(c);c.on("toggle",b)},unregister:function(c){if(!c.toggleGroup){return}var e=a[c.toggleGroup];if(e){e.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(e,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,h=[this.text||"&#160;",this.type];if(a){c=b.insertBefore(a,h,true)}else{c=b.append(e,h,true)}var g=c.child(this.buttonSelector);this.initButtonEl(c,g);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 e;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){e=c}}this.setActiveItem(e,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 e=0;e<b;e++){var g=c[e];if(g.isFormField){this.addField(g)}else{if(g.render){this.addItem(g)}else{if(typeof g=="string"){if(g=="separator"||g=="-"){this.addSeparator()}else{if(g==" "){this.addSpacer()}else{if(g=="->"){this.addFill()}else{this.addText(g)}}}}else{if(g.tagName){this.addElement(g)}else{if(typeof g=="object"){if(g.xtype){this.addField(Ext.ComponentMgr.create(g,"button"))}else{this.addButton(g)}}}}}}}},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(g){if(Ext.isArray(g)){var k=[];for(var h=0,e=g.length;h<e;h++){k.push(this.addButton(g[h]))}return k}var c=g;if(!(g instanceof a.Button)){c=g.split?new a.SplitButton(g):new a.Button(g)}var l=this.nextBlock();this.initMenuTracking(c);c.render(l);this.items.add(c);return c},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,h){if(Ext.isArray(h)){var g=[];for(var e=0,b=h.length;e<b;e++){g.push(this.insertButton(c+e,h[e]))}return g}if(!(h instanceof a.Button)){h=new a.Button(h)}var k=document.createElement("td");this.tr.insertBefore(k,this.tr.childNodes[c]);this.initMenuTracking(h);h.render(k);this.items.insert(c,h);return h},addDom:function(c,b){var g=this.nextBlock();Ext.DomHelper.overwrite(g,c);var e=new a.Item(g.firstChild);e.render(g);this.items.add(e);return e},addField:function(c){var e=this.nextBlock();c.render(e);var b=new a.Item(e.firstChild);b.render(e);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,h){if(!this.rendered){this.dsLoaded=[a,c,h];return}this.cursor=h.params?h.params[this.paramNames.start]:0;var g=this.getPageData(),b=g.activePage,e=g.pages;this.afterTextEl.el.innerHTML=String.format(this.afterPageText,g.pages);this.field.dom.value=b;this.first.setDisabled(b==1);this.prev.setDisabled(b==1);this.next.setDisabled(b==e);this.last.setDisabled(b==e);this.loading.enable();this.updateInfo();this.fireEvent("change",this,g)},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(g){var b=g.getKey(),h=this.getPageData(),c;if(b==g.RETURN){g.stopEvent();c=this.readPage(h);if(c!==false){c=Math.min(Math.max(1,c),h.pages)-1;this.doLoad(c*this.pageSize)}}else{if(b==g.HOME||b==g.END){g.stopEvent();c=b==g.HOME?1:h.pages;this.field.dom.value=c}else{if(b==g.UP||b==g.PAGEUP||b==g.DOWN||b==g.PAGEDOWN){g.stopEvent();if(c=this.readPage(h)){var a=g.shiftKey?10:1;if(b==g.DOWN||b==g.PAGEDOWN){a*=-1}c+=a;if(c>=1&c<=h.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(g){var b=this.store;switch(g){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 e=b.getTotalCount();var a=e%this.pageSize;var c=a?(e-a):e-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(e,g){this.el=Ext.get(e);if(g&&g.wrap){g.resizeChild=this.el;this.el=this.el.wrap(typeof g.wrap=="object"?g.wrap:{cls:"xresizable-wrap"});this.el.id=this.el.dom.id=g.resizeChild.id+"-rzwrap";this.el.setStyle("overflow","hidden");this.el.setPositioning(g.resizeChild.getPositioning());g.resizeChild.clearPositioning();if(!g.width||!g.height){var h=g.resizeChild.getSize();this.el.setSize(h.width,h.height)}if(g.pinned&&!g.adjustments){g.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,g);if(this.pinned){this.disableTrackOver=true;this.el.addClass("x-resizable-pinned")}var m=this.el.getStyle("position");if(m!="absolute"&&m!="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 q=this.handles.split(/\s*?[,;]\s*?| /);var c=Ext.Resizable.positions;for(var l=0,n=q.length;l<n;l++){if(q[l]&&c[q[l]]){var p=c[q[l]];this[p]=new Ext.Resizable.Handle(this,p,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 o=this.west,k=this.east,a=this.north,q=this.south;if(b&&(o||a)){b.position("relative");b.setLeft(o?o.el.getWidth():0);b.setTop(a?a.el.getHeight():0)}this.adjustments=[(k?-k.el.getWidth():0)+(o?-o.el.getWidth():0),(a?-a.el.getHeight():0)+(q?-q.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 e=this.el;var g=this.resizeChild;var c=this.adjustments;if(e.dom.offsetWidth){var a=e.getSize(true);g.setSize(a.width+c[0],a.height+c[1])}if(Ext.isIE){setTimeout(function(){if(e.dom.offsetWidth){var h=e.getSize(true);g.setSize(h.width+c[0],h.height+c[1])}},10)}}},snap:function(c,g,b){if(!g||!c){return c}var e=c;var a=c%g;if(a>0){if(a>(g/2)){e=c+(g-a)}else{e=c-a}}return Math.max(b,e)},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,e){if(b-c<a){c=b-a}else{if(b-c>e){c=e-b}}return c},onMouseMove:function(A){if(this.enabled){try{if(this.resizeRegion&&!this.resizeRegion.contains(A.getPoint())){return}var v=this.curSize||this.startBox;var n=this.startBox.x,m=this.startBox.y;var c=n,b=m;var o=v.width,z=v.height;var g=o,q=z;var p=this.minWidth,B=this.minHeight;var u=this.maxWidth,E=this.maxHeight;var k=this.widthIncrement;var a=this.heightIncrement;var C=A.getXY();var t=-(this.startPoint[0]-Math.max(this.minX,C[0]));var r=-(this.startPoint[1]-Math.max(this.minY,C[1]));var l=this.activeHandle.position;switch(l){case"east":o+=t;o=Math.min(Math.max(p,o),u);break;case"south":z+=r;z=Math.min(Math.max(B,z),E);break;case"southeast":o+=t;z+=r;o=Math.min(Math.max(p,o),u);z=Math.min(Math.max(B,z),E);break;case"north":r=this.constrain(z,r,B,E);m+=r;z-=r;break;case"west":t=this.constrain(o,t,p,u);n+=t;o-=t;break;case"northeast":o+=t;o=Math.min(Math.max(p,o),u);r=this.constrain(z,r,B,E);m+=r;z-=r;break;case"northwest":t=this.constrain(o,t,p,u);r=this.constrain(z,r,B,E);m+=r;z-=r;n+=t;o-=t;break;case"southwest":t=this.constrain(o,t,p,u);z+=r;z=Math.min(Math.max(B,z),E);n+=t;o-=t;break}var s=this.snap(o,k,p);var D=this.snap(z,a,B);if(s!=o||D!=z){switch(l){case"northeast":m-=D-z;break;case"north":m-=D-z;break;case"southwest":n-=s-o;break;case"west":n-=s-o;break;case"northwest":n-=s-o;m-=D-z;break}o=s;z=D}if(this.preserveRatio){switch(l){case"southeast":case"east":z=q*(o/g);z=Math.min(Math.max(B,z),E);o=g*(z/q);break;case"south":o=g*(z/q);o=Math.min(Math.max(p,o),u);z=q*(o/g);break;case"northeast":o=g*(z/q);o=Math.min(Math.max(p,o),u);z=q*(o/g);break;case"north":var F=o;o=g*(z/q);o=Math.min(Math.max(p,o),u);z=q*(o/g);n+=(F-o)/2;break;case"southwest":z=q*(o/g);z=Math.min(Math.max(B,z),E);var F=o;o=g*(z/q);n+=F-o;break;case"west":var i=z;z=q*(o/g);z=Math.min(Math.max(B,z),E);m+=(i-z)/2;var F=o;o=g*(z/q);n+=F-o;break;case"northwest":var F=o;var i=z;z=q*(o/g);z=Math.min(Math.max(B,z),E);o=g*(z/q);m+=i-z;n+=F-o;break}}this.proxy.setBounds(n,m,o,z);if(this.dynamic){this.resizeElement()}}catch(A){}}},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 e=Ext.Resizable.positions;for(var a in e){if(typeof e[a]!="function"&&this[e[a]]){var b=this[e[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,g,b,e){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=g;this.rz=c;this.el=this.tpl.append(c.el.dom,[this.position],true);this.el.unselectable();if(e){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 u,b,q,t;var i,m,s,a,n,p,k,h;var r,v,o,c="";var e=function(x){if(u.isVisible()){u.hide();Ext.callback(b.fn,b.scope||window,[x,v.dom.value],1)}};var w=function(){if(b&&b.cls){u.el.removeClass(b.cls)}n.reset()};var g=function(z,x,y){if(b&&b.closable!==false){u.hide()}if(y){y.stopEvent()}};var l=function(x){var z=0;if(!x){r.ok.hide();r.cancel.hide();r.yes.hide();r.no.hide();return z}u.footer.dom.style.display="";for(var y in r){if(typeof r[y]!="function"){if(x[y]){r[y].show();r[y].setText(typeof x[y]=="string"?x[y]:Ext.MessageBox.buttonText[y]);z+=r[y].el.getWidth()+15}else{r[y].hide()}}}return z};return{getDialog:function(x){if(!u){u=new Ext.Window({autoCreate:true,title:x,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){e("no")}else{e("cancel")}}});r={};var y=this.buttonText;r.ok=u.addButton(y.ok,e.createCallback("ok"));r.yes=u.addButton(y.yes,e.createCallback("yes"));r.no=u.addButton(y.no,e.createCallback("no"));r.cancel=u.addButton(y.cancel,e.createCallback("cancel"));r.ok.hideMode=r.yes.hideMode=r.no.hideMode=r.cancel.hideMode="offsets";u.render(document.body);u.getEl().addClass("x-window-dlg");q=u.mask;i=u.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>'});k=Ext.get(i.dom.firstChild);var z=i.dom.childNodes[1];m=Ext.get(z.firstChild);s=Ext.get(z.childNodes[2].firstChild);s.enableDisplayMode();s.addKeyListener([10,13],function(){if(u.isVisible()&&b&&b.buttons){if(b.buttons.ok){e("ok")}else{if(b.buttons.yes){e("yes")}}}});a=Ext.get(z.childNodes[2].childNodes[1]);a.enableDisplayMode();n=new Ext.ProgressBar({renderTo:i});i.createChild({cls:"x-clear"})}return u},updateText:function(A){if(!u.isVisible()&&!b.width){u.setSize(this.maxWidth,100)}m.update(A||"&#160;");var y=c!=""?(k.getWidth()+k.getMargins("lr")):0;var C=m.getWidth()+m.getMargins("lr");var z=u.getFrameWidth("lr");var B=u.body.getFrameWidth("lr");if(Ext.isIE&&y>0){y+=3}var x=Math.max(Math.min(b.width||y+C+z+B,this.maxWidth),Math.max(b.minWidth||this.minWidth,o||0));if(b.prompt===true){v.setWidth(x-y-z-B)}if(b.progress===true||b.wait===true){n.setSize(x-y-z-B)}u.setSize(x,"auto").center();return this},updateProgress:function(y,x,z){n.updateProgress(y,x);if(z){this.updateText(z)}return this},isVisible:function(){return u&&u.isVisible()},hide:function(){if(this.isVisible()){u.hide();w()}return this},show:function(A){if(this.isVisible()){this.hide()}b=A;var B=this.getDialog(b.title||"&#160;");B.setTitle(b.title||"&#160;");var x=(b.closable!==false&&b.progress!==true&&b.wait!==true);B.tools.close.setDisplayed(x);v=s;b.prompt=b.prompt||(b.multiline?true:false);if(b.prompt){if(b.multiline){s.hide();a.show();a.setHeight(typeof b.multiline=="number"?b.multiline:this.defaultTextHeight);v=a}else{s.show();a.hide()}}else{s.hide();a.hide()}v.dom.value=b.value||"";if(b.prompt){B.focusEl=v}else{var z=b.buttons;var y=null;if(z&&z.ok){y=r.ok}else{if(z&&z.yes){y=r.yes}}if(y){B.focusEl=y}}if(b.iconCls){B.setIconClass(b.iconCls)}this.setIcon(b.icon);o=l(b.buttons);n.setVisible(b.progress===true||b.wait===true);this.updateProgress(0,b.progressText);this.updateText(b.msg);if(b.cls){B.el.addClass(b.cls)}B.proxyDrag=b.proxyDrag===true;B.modal=b.modal!==false;B.mask=b.modal!==false?q:false;if(!B.isVisible()){document.body.appendChild(u.el.dom);B.setAnimateTarget(b.animEl);B.show(b.animEl)}B.on("show",function(){if(x===true){B.keyMap.enable()}else{B.keyMap.disable()}},this,{single:true});if(b.wait===true){n.wait(b.waitConfig)}return this},setIcon:function(x){if(x&&x!=""){k.removeClass("x-hidden");k.replaceClass(c,x);c=x}else{k.replaceClass(c,"x-hidden");c=""}return this},progress:function(z,y,x){this.show({title:z,msg:y,buttons:false,progress:true,closable:false,minWidth:this.minProgressWidth,progressText:x});return this},wait:function(z,y,x){this.show({title:y,msg:z,buttons:false,closable:false,wait:true,modal:true,minWidth:this.minProgressWidth,waitConfig:x});return this},alert:function(A,z,y,x){this.show({title:A,msg:z,buttons:this.OK,fn:y,scope:x});return this},confirm:function(A,z,y,x){this.show({title:A,msg:z,buttons:this.YESNO,fn:y,scope:x,icon:this.QUESTION});return this},prompt:function(C,B,z,y,x,A){this.show({title:C,msg:B,buttons:this.OKCANCEL,fn:z,minWidth:250,scope:y,prompt:true,multiline:x,value:A});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,e){var c=this.targetXY[1],b=this.getSize().height;if(this.constrainPosition&&e<=c&&(e+b)>=c){e=c-b-5}return{x:a,y:e}},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(g){var k=Ext.isArray(g)?g:arguments;for(var h=0,a=k.length;h<a;h++){var m=k[h];var l=m.target;if(l){if(Ext.isArray(l)){for(var e=0,b=l.length;e<b;e++){this.targets[Ext.id(l[e])]=m}}else{this.targets[Ext.id(l)]=m}}}},unregister:function(a){delete this.targets[Ext.id(a)]},onTargetOver:function(k){if(this.disabled){return}this.targetXY=k.getXY();var c=k.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 h,i=Ext.fly(c),b=this.tagConfig;var g=b.namespace;if(this.interceptTitles&&c.title){h=c.title;c.qtip=h;c.removeAttribute("title");k.preventDefault()}else{h=c.qtip||i.getAttributeNS(g,b.attribute)}if(h){var a=i.getAttributeNS(g,b.hide);this.activeTarget={el:c,text:h,width:i.getAttributeNS(g,b.width),autoHide:a!="user"&&a!=="false",title:i.getAttributeNS(g,b.title),cls:i.getAttributeNS(g,b.cls),align:i.getAttributeNS(g,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,i,h,g,e){if(c=="collapse"||c=="expand"||c=="beforecollapse"||c=="beforeexpand"||c=="move"||c=="beforemove"){c=c+"node"}return this.fireEvent(c,b,a,i,h,g,e)},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(b,c){c=c||this.root;var e=[];var g=function(){if(this.attributes.checked){e.push(!b?this:(b=="id"?this.id:this.attributes[b]))}};c.cascade(g);return e},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(h,a,i){a=a||"id";var e=h.split(this.pathSeparator);var c=this.root;if(c.attributes[a]!=e[1]){if(i){i(false,null)}return}var b=1;var g=function(){if(++b==e.length){if(i){i(true,c)}return}var k=c.findChild(a,e[b]);if(!k){if(i){i(false,c)}return}c=k;k.expand(false,false,g)};c.expand(false,false,g)},selectPath:function(g,a,h){a=a||"id";var c=g.split(this.pathSeparator);var b=c.pop();if(c.length>0){var e=function(k,i){if(k&&i){var l=i.findChild(a,b);if(l){l.select();if(h){h(true,l)}}else{if(h){h(false,l)}}}else{if(h){h(false,l)}}};this.expandPath(c.join(this.pathSeparator),a,e)}else{this.root.select();if(h){h(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 g=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 e=this.selNodes;if(e.length>0){for(var c=0,a=e.length;c<a;c++){e[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,g){if(this.expanded&&!this.isHiddenRoot()){if(this.fireEvent("beforecollapse",this,b,g)===false){return}this.expanded=false;if((this.getOwnerTree().animate&&g!==false)||g){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 e=this.childNodes;for(var c=0,a=e.length;c<a;c++){e[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 e=this.childNodes;for(var c=0,a=e.length;c<a;c++){e[c].expand(b)}},collapseChildNodes:function(b){var e=this.childNodes;for(var c=0,a=e.length;c<a;c++){e[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 e=this.childNodes;for(var c=0,a=e.length;c<a;c++){e[c].render(true)}this.childrenRendered=true},sort:function(g,e){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,g){if(g){this.ui.childIndent=null}this.ui.renderIndent();if(b===true&&this.childrenRendered){var e=this.childNodes;for(var c=0,a=e.length;c<a;c++){e[c].renderIndent(true,g)}}},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,e,h){if(this.loading){var g;var c=function(){if(!this.loading){clearInterval(g);this.expand(b,e,h)}}.createDelegate(this);g=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,e,h]));return}}Ext.tree.AsyncTreeNode.superclass.expand.call(this,b,e,h)},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,i,g,h,e,b){this.childIndent=null;if(this.rendered){var k=h.ui.getContainer();if(!k){this.holder=document.createElement("div");this.holder.appendChild(this.wrap);return}var c=b?b.ui.getEl():null;if(c){k.insertBefore(this.wrap,c)}else{k.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(c){if(this.dropping){c.stopEvent();return}if(this.fireEvent("beforeclick",this.node,c)!==false){var b=c.getTarget("a");if(!this.disabled&&this.node.attributes.href&&b){this.fireEvent("click",this.node,c);return}else{if(b&&c.ctrlKey){c.stopEvent()}}c.preventDefault();if(this.disabled){return}if(this.node.attributes.singleClickExpand&&!this.animating&&this.node.isExpandable()){this.node.toggle()}this.fireEvent("click",this.node,c)}else{c.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(c){var g=this.node,b=g.attributes;var e=g.parentNode?g.parentNode.ui.getContainer():g.ownerTree.innerCt.dom;if(!this.rendered){this.rendered=true;this.renderElements(g,b,e,c);if(b.qtip){if(this.textNode.setAttributeNS){this.textNode.setAttributeNS("ext","qtip",b.qtip);if(b.qtipTitle){this.textNode.setAttributeNS("ext","qtitle",b.qtipTitle)}}else{this.textNode.setAttribute("ext:qtip",b.qtip);if(b.qtipTitle){this.textNode.setAttribute("ext:qtitle",b.qtipTitle)}}}else{if(b.qtipCfg){b.qtipCfg.target=Ext.id(this.textNode);Ext.QuickTips.register(b.qtipCfg)}}this.initEvents();if(!this.node.expanded){this.updateExpandIcon(true)}}else{if(c===true){e.appendChild(this.wrap)}}},renderElements:function(g,m,l,o){this.indentMarkup=g.parentNode?g.parentNode.ui.getChildIndent():"";var h=typeof m.checked=="boolean";var c=m.href?m.href:Ext.isGecko?"":"#";var e=['<li class="x-tree-node"><div ext:tree-node-id="',g.id,'" class="x-tree-node-el x-tree-node-leaf x-unselectable ',m.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="',m.icon||this.emptyIcon,'" class="x-tree-node-icon',(m.icon?" x-tree-node-inline-icon":""),(m.iconCls?" "+m.iconCls:""),'" unselectable="on" />',h?('<input class="x-tree-node-cb" type="checkbox" '+(m.checked?'checked="checked" />':"/>")):"",'<a hidefocus="on" class="x-tree-node-anchor" href="',c,'" tabIndex="1" ',m.hrefTarget?' target="'+m.hrefTarget+'"':"",'><span unselectable="on">',g.text,"</span></a></div>",'<ul class="x-tree-node-ct" style="display:none;"></ul>',"</li>"].join("");var b;if(o!==true&&g.nextSibling&&(b=g.nextSibling.ui.getEl())){this.wrap=Ext.DomHelper.insertHtml("beforeBegin",b,e)}else{this.wrap=Ext.DomHelper.insertHtml("beforeEnd",l,e)}this.elNode=this.wrap.childNodes[0];this.ctNode=this.wrap.childNodes[1];var k=this.elNode.childNodes;this.indentNode=k[0];this.ecNode=k[1];this.iconNode=k[2];var i=3;if(h){this.checkbox=k[3];this.checkbox.defaultChecked=this.checkbox.checked;i++}this.anchor=k[i];this.textNode=k[i].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 g=this.node,e,c;var a=g.isLast()?"x-tree-elbow-end":"x-tree-elbow";if(g.isExpandable()){if(g.expanded){a+="-minus";e="x-tree-node-collapsed";c="x-tree-node-expanded"}else{a+="-plus";e="x-tree-node-expanded";c="x-tree-node-collapsed"}if(this.wasLeaf){this.removeClass("x-tree-node-leaf");this.wasLeaf=false}if(this.c1!=e||this.c2!=c){Ext.fly(this.elNode).replaceClass(e,c);this.c1=e;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;delete this.textNode;Ext.removeNode(this.ctNode)}};Ext.tree.RootTreeNodeUI=Ext.extend(Ext.tree.TreeNodeUI,{render:function(){if(!this.rendered){var a=this.node.ownerTree.innerCt.dom;this.node.expanded=true;a.innerHTML='<div class="x-tree-root-node"></div>';this.wrap=this.ctNode=a.firstChild}},collapse:Ext.emptyFn,expand:Ext.emptyFn});Ext.tree.TreeLoader=function(a){this.baseParams={};Ext.apply(this,a);this.addEvents("beforeload","load","loadexception");Ext.tree.TreeLoader.superclass.constructor.call(this)};Ext.extend(Ext.tree.TreeLoader,Ext.util.Observable,{uiProviders:{},clearOnLoad:true,load:function(a,b){if(this.clearOnLoad){while(a.firstChild){a.removeChild(a.firstChild)}}if(this.doPreload(a)){if(typeof b=="function"){b()}}else{if(this.dataUrl||this.url){this.requestData(a,b)}}},doPreload:function(e){if(e.attributes.children){if(e.childNodes.length<1){var c=e.attributes.children;e.beginUpdate();for(var b=0,a=c.length;b<a;b++){var g=e.appendChild(this.createNode(c[b]));if(this.preloadChildren){this.doPreload(g)}}e.endUpdate()}return true}else{return false}},getParams:function(e){var a=[],c=this.baseParams;for(var b in c){if(typeof c[b]!="function"){a.push(encodeURIComponent(b),"=",encodeURIComponent(c[b]),"&")}}a.push("node=",encodeURIComponent(e.id));return a.join("")},requestData:function(a,b){if(this.fireEvent("beforeload",this,a,b)!==false){this.transId=Ext.Ajax.request({method:this.requestMethod,url:this.dataUrl||this.url,success:this.handleResponse,failure:this.handleFailure,scope:this,argument:{callback:b,node:a},params:this.getParams(a)})}else{if(typeof b=="function"){b()}}},isLoading:function(){return !!this.transId},abort:function(){if(this.isLoading()){Ext.Ajax.abort(this.transId)}},createNode:function(attr){if(this.baseAttrs){Ext.applyIf(attr,this.baseAttrs)}if(this.applyLoader!==false){attr.loader=this}if(typeof attr.uiProvider=="string"){attr.uiProvider=this.uiProviders[attr.uiProvider]||eval(attr.uiProvider)}if(attr.nodeType){return new Ext.tree.TreePanel.nodeTypes[attr.nodeType](attr)}else{return attr.leaf?new Ext.tree.TreeNode(attr):new Ext.tree.AsyncTreeNode(attr)}},processResponse:function(response,node,callback){var json=response.responseText;try{var o=eval("("+json+")");node.beginUpdate();for(var i=0,len=o.length;i<len;i++){var n=this.createNode(o[i]);if(n){node.appendChild(n)}}node.endUpdate();if(typeof callback=="function"){callback(this,node)}}catch(e){this.handleFailure(response)}},handleResponse:function(c){this.transId=false;var b=c.argument;this.processResponse(c,b.node,b.callback);this.fireEvent("load",this,b.node,c)},handleFailure:function(c){this.transId=false;var b=c.argument;this.fireEvent("loadexception",this,b.node,c);if(typeof b.callback=="function"){b.callback(this,b.node)}}});Ext.tree.TreeFilter=function(a,b){this.tree=a;this.filtered={};Ext.apply(this,b)};Ext.tree.TreeFilter.prototype={clearBlank:false,reverse:false,autoClear:false,remove:false,filter:function(e,a,b){a=a||"text";var c;if(typeof e=="string"){var g=e.length;if(g==0&&this.clearBlank){this.clear();return}e=e.toLowerCase();c=function(h){return h.attributes[a].substr(0,g).toLowerCase()==e}}else{if(e.exec){c=function(h){return e.test(h.attributes[a])}}else{throw"Illegal filter type, must be string or regex"}}this.filterBy(c,null,b)},filterBy:function(e,c,b){b=b||this.tree.root;if(this.autoClear){this.clear()}var a=this.filtered,k=this.reverse;var g=function(o){if(o==b){return true}if(a[o.id]){return false}var l=e.call(c||o,o);if(!l||k){a[o.id]=o;o.ui.hide();return false}return true};b.cascade(g);if(this.remove){for(var i in a){if(typeof i!="function"){var h=a[i];if(h&&h.parentNode){h.parentNode.removeChild(h)}}}}},clear:function(){var b=this.tree;var a=this.filtered;for(var e in a){if(typeof e!="function"){var c=a[e];if(c){c.ui.show()}}}this.filtered={}}};Ext.tree.TreeSorter=function(b,c){Ext.apply(this,c);b.on("beforechildrenrendered",this.doSort,this);b.on("append",this.updateSort,this);b.on("insert",this.updateSort,this);b.on("textchange",this.updateSortParent,this);var g=this.dir&&this.dir.toLowerCase()=="desc";var h=this.property||"text";var i=this.sortType;var a=this.folderSort;var e=this.caseSensitive===true;var k=this.leafAttr||"leaf";this.sortFn=function(m,l){if(a){if(m.attributes[k]&&!l.attributes[k]){return 1}if(!m.attributes[k]&&l.attributes[k]){return -1}}var o=i?i(m):(e?m.attributes[h]:m.attributes[h].toUpperCase());var n=i?i(l):(e?l.attributes[h]:l.attributes[h].toUpperCase());if(o<n){return g?+1:-1}else{if(o>n){return g?-1:+1}else{return 0}}}};Ext.tree.TreeSorter.prototype={doSort:function(a){a.sort(this.sortFn)},compareNodes:function(b,a){return(b.text.toUpperCase()>a.text.toUpperCase()?1:-1)},updateSort:function(a,b){if(b.childrenRendered){this.doSort.defer(1,this,[b])}},updateSortParent:function(a){var b=a.parentNode;if(b&&b.childrenRendered){this.doSort.defer(1,this,[b])}}};if(Ext.dd.DropZone){Ext.tree.TreeDropZone=function(a,b){this.allowParentInsert=false;this.allowContainerDrop=false;this.appendOnly=false;Ext.tree.TreeDropZone.superclass.constructor.call(this,a.innerCt,b);this.tree=a;this.dragOverData={};this.lastInsertClass="x-tree-no-status"};Ext.extend(Ext.tree.TreeDropZone,Ext.dd.DropZone,{ddGroup:"TreeDD",expandDelay:1000,expandNode:function(a){if(a.hasChildNodes()&&!a.isExpanded()){a.expand(false,null,this.triggerCacheRefresh.createDelegate(this))}},queueExpand:function(a){this.expandProcId=this.expandNode.defer(this.expandDelay,this,[a])},cancelExpand:function(){if(this.expandProcId){clearTimeout(this.expandProcId);this.expandProcId=false}},isValidDropPoint:function(a,m,k,g,c){if(!a||!c){return false}var h=a.node;var i=c.node;if(!(h&&h.isTarget&&m)){return false}if(m=="append"&&h.allowChildren===false){return false}if((m=="above"||m=="below")&&(h.parentNode&&h.parentNode.allowChildren===false)){return false}if(i&&(h==i||i.contains(h))){return false}var b=this.dragOverData;b.tree=this.tree;b.target=h;b.data=c;b.point=m;b.source=k;b.rawEvent=g;b.dropNode=i;b.cancel=false;var l=this.tree.fireEvent("nodedragover",b);return b.cancel===false&&l!==false},getDropPoint:function(i,h,o){var p=h.node;if(p.isRoot){return p.allowChildren!==false?"append":false}var c=h.ddel;var r=Ext.lib.Dom.getY(c),l=r+c.offsetHeight;var k=Ext.lib.Event.getPageY(i);var m=p.allowChildren===false||p.isLeaf();if(this.appendOnly||p.parentNode.allowChildren===false){return m?false:"append"}var g=false;if(!this.allowParentInsert){g=p.hasChildNodes()&&p.isExpanded()}var a=(l-r)/(m?2:3);if(k>=r&&k<(r+a)){return"above"}else{if(!g&&(m||k>=l-a&&k<=l)){return"below"}else{return"append"}}},onNodeEnter:function(g,a,c,b){this.cancelExpand()},onNodeOver:function(b,k,i,h){var m=this.getDropPoint(i,b,k);var c=b.node;if(!this.expandProcId&&m=="append"&&c.hasChildNodes()&&!b.node.isExpanded()){this.queueExpand(c)}else{if(m!="append"){this.cancelExpand()}}var g=this.dropNotAllowed;if(this.isValidDropPoint(b,m,k,i,h)){if(m){var a=b.ddel;var l;if(m=="above"){g=b.node.isFirst()?"x-tree-drop-ok-above":"x-tree-drop-ok-between";l="x-tree-drag-insert-above"}else{if(m=="below"){g=b.node.isLast()?"x-tree-drop-ok-below":"x-tree-drop-ok-between";l="x-tree-drag-insert-below"}else{g="x-tree-drop-ok-append";l="x-tree-drag-append"}}if(this.lastInsertClass!=l){Ext.fly(a).replaceClass(this.lastInsertClass,l);this.lastInsertClass=l}}}return g},onNodeOut:function(g,a,c,b){this.cancelExpand();this.removeDropIndicators(g)},onNodeDrop:function(c,m,h,g){var l=this.getDropPoint(h,c,m);var i=c.node;i.ui.startDrop();if(!this.isValidDropPoint(c,l,m,h,g)){i.ui.endDrop();return false}var k=g.node||(m.getTreeNode?m.getTreeNode(g,i,l,h):null);var b={tree:this.tree,target:i,data:g,point:l,source:m,rawEvent:h,dropNode:k,cancel:!k,dropStatus:false};var a=this.tree.fireEvent("beforenodedrop",b);if(a===false||b.cancel===true||!b.dropNode){i.ui.endDrop();return b.dropStatus}i=b.target;if(l=="append"&&!i.isExpanded()){i.expand(false,null,function(){this.completeDrop(b)}.createDelegate(this))}else{this.completeDrop(b)}return true},completeDrop:function(k){var e=k.dropNode,g=k.point,c=k.target;if(!Ext.isArray(e)){e=[e]}var h;for(var b=0,a=e.length;b<a;b++){h=e[b];if(g=="above"){c.parentNode.insertBefore(h,c)}else{if(g=="below"){c.parentNode.insertBefore(h,c.nextSibling)}else{c.appendChild(h)}}}h.ui.focus();if(Ext.enableFx&&this.tree.hlDrop){h.ui.highlight()}c.ui.endDrop();this.tree.fireEvent("nodedrop",k)},afterNodeMoved:function(a,c,h,g,b){if(Ext.enableFx&&this.tree.hlDrop){b.ui.focus();b.ui.highlight()}this.tree.fireEvent("nodedrop",this.tree,g,c,a,h)},getTree:function(){return this.tree},removeDropIndicators:function(b){if(b&&b.ddel){var a=b.ddel;Ext.fly(a).removeClass(["x-tree-drag-insert-above","x-tree-drag-insert-below","x-tree-drag-append"]);this.lastInsertClass="_noclass"}},beforeDragDrop:function(b,a,c){this.cancelExpand();return true},afterRepair:function(a){if(a&&Ext.enableFx){a.node.ui.highlight()}this.hideProxy()}})}if(Ext.dd.DragZone){Ext.tree.TreeDragZone=function(a,b){Ext.tree.TreeDragZone.superclass.constructor.call(this,a.getTreeEl(),b);this.tree=a};Ext.extend(Ext.tree.TreeDragZone,Ext.dd.DragZone,{ddGroup:"TreeDD",onBeforeDrag:function(a,b){var c=a.node;return c&&c.draggable&&!c.disabled},onInitDrag:function(b){var a=this.dragData;this.tree.getSelectionModel().select(a.node);this.tree.eventModel.disable();this.proxy.update("");a.node.ui.appendDDGhost(this.proxy.ghost.dom);this.tree.fireEvent("startdrag",this.tree,a.node,b)},getRepairXY:function(b,a){return a.node.ui.getDDRepairXY()},onEndDrag:function(a,b){this.tree.eventModel.enable.defer(100,this.tree.eventModel);this.tree.fireEvent("enddrag",this.tree,a.node,b)},onValidDrop:function(a,b,c){this.tree.fireEvent("dragdrop",this.tree,this.dragData.node,a,b);this.hideProxy()},beforeInvalidDrop:function(a,c){var b=this.tree.getSelectionModel();b.clearSelections();b.select(this.dragData.node)},afterRepair:function(){if(Ext.enableFx&&this.tree.hlDrop){Ext.Element.fly(this.dragData.ddel).highlight(this.hlColor||"c3daf9")}this.dragging=false}})}Ext.tree.TreeEditor=function(a,c,b){c=c||{};var e=c.events?c:new Ext.form.TextField(c);Ext.tree.TreeEditor.superclass.constructor.call(this,e,b);this.tree=a;if(!a.rendered){a.on("render",this.initEditor,this)}else{this.initEditor(a)}};Ext.extend(Ext.tree.TreeEditor,Ext.Editor,{alignment:"l-l",autoSize:false,hideEl:false,cls:"x-small-editor x-tree-editor",shim:false,shadow:"frame",maxWidth:250,editDelay:350,initEditor:function(a){a.on("beforeclick",this.beforeNodeClick,this);a.on("dblclick",this.onNodeDblClick,this);this.on("complete",this.updateNode,this);this.on("beforestartedit",this.fitToTree,this);this.on("startedit",this.bindScroll,this,{delay:10});this.on("specialkey",this.onSpecialKey,this)},fitToTree:function(b,c){var g=this.tree.getTreeEl().dom,e=c.dom;if(g.scrollLeft>e.offsetLeft){g.scrollLeft=e.offsetLeft}var a=Math.min(this.maxWidth,(g.clientWidth>20?g.clientWidth:g.offsetWidth)-Math.max(0,e.offsetLeft-g.scrollLeft)-5);this.setSize(a,"")},triggerEdit:function(a,b){this.completeEdit();if(a.attributes.editable!==false){this.editNode=a;if(this.tree.autoScroll){a.ui.getEl().scrollIntoView(this.tree.body)}this.autoEditTimer=this.startEdit.defer(this.editDelay,this,[a.ui.textNode,a.text]);return false}},bindScroll:function(){this.tree.getTreeEl().on("scroll",this.cancelEdit,this)},beforeNodeClick:function(a,b){clearTimeout(this.autoEditTimer);if(this.tree.getSelectionModel().isSelected(a)){b.stopEvent();return this.triggerEdit(a)}},onNodeDblClick:function(a,b){clearTimeout(this.autoEditTimer)},updateNode:function(a,b){this.tree.getTreeEl().un("scroll",this.cancelEdit,this);this.editNode.setText(b)},onHide:function(){Ext.tree.TreeEditor.superclass.onHide.call(this);if(this.editNode){this.editNode.ui.focus.defer(50,this.editNode.ui)}},onSpecialKey:function(c,b){var a=b.getKey();if(a==b.ESC){b.stopEvent();this.cancelEdit()}else{if(a==b.ENTER&&!b.hasModifier()){b.stopEvent();this.completeEdit()}}}});Ext.menu.Menu=function(a){if(Ext.isArray(a)){a={items:a}}Ext.apply(this,a);this.id=this.id||Ext.id();this.addEvents("beforeshow","beforehide","show","hide","click","mouseover","mouseout","itemclick");Ext.menu.MenuMgr.register(this);Ext.menu.Menu.superclass.constructor.call(this);var b=this.items;this.items=new Ext.util.MixedCollection();if(b){this.add.apply(this,b)}};Ext.extend(Ext.menu.Menu,Ext.util.Observable,{minWidth:120,shadow:"sides",subMenuAlign:"tl-tr?",defaultAlign:"tl-bl?",allowOtherMenus:false,ignoreParentClicks:false,hidden:true,createEl:function(){return new Ext.Layer({cls:"x-menu",shadow:this.shadow,constrain:false,parentEl:this.parentEl||document.body,zindex:15000})},render:function(){if(this.el){return}var b=this.el=this.createEl();if(!this.keyNav){this.keyNav=new Ext.menu.MenuNav(this)}if(this.plain){b.addClass("x-menu-plain")}if(this.cls){b.addClass(this.cls)}this.focusEl=b.createChild({tag:"a",cls:"x-menu-focus",href:"#",onclick:"return false;",tabIndex:"-1"});var a=b.createChild({tag:"ul",cls:"x-menu-list"});a.on("click",this.onClick,this);a.on("mouseover",this.onMouseOver,this);a.on("mouseout",this.onMouseOut,this);this.items.each(function(e){var c=document.createElement("li");c.className="x-menu-list-item";a.dom.appendChild(c);e.render(c,this)},this);this.ul=a;this.autoWidth()},autoWidth:function(){var e=this.el,c=this.ul;if(!e){return}var a=this.width;if(a){e.setWidth(a)}else{if(Ext.isIE){e.setWidth(this.minWidth);var b=e.dom.offsetWidth;e.setWidth(c.getWidth()+e.getFrameWidth("lr"))}}},delayAutoWidth:function(){if(this.el){if(!this.awTask){this.awTask=new Ext.util.DelayedTask(this.autoWidth,this)}this.awTask.delay(20)}},findTargetItem:function(b){var a=b.getTarget(".x-menu-list-item",this.ul,true);if(a&&a.menuItemId){return this.items.get(a.menuItemId)}},onClick:function(b){var a;if(a=this.findTargetItem(b)){if(a.menu&&this.ignoreParentClicks){a.expandMenu()}else{a.onClick(b);this.fireEvent("click",this,a,b)}}},setActiveItem:function(a,b){if(a!=this.activeItem){if(this.activeItem){this.activeItem.deactivate()}this.activeItem=a;a.activate(b)}else{if(b){a.expandMenu()}}},tryActivate:function(h,g){var b=this.items;for(var c=h,a=b.length;c>=0&&c<a;c+=g){var e=b.get(c);if(!e.disabled&&e.canActivate){this.setActiveItem(e,false);return e}}return false},onMouseOver:function(b){var a;if(a=this.findTargetItem(b)){if(a.canActivate&&!a.disabled){this.setActiveItem(a,true)}}this.over=true;this.fireEvent("mouseover",this,b,a)},onMouseOut:function(b){var a;if(a=this.findTargetItem(b)){if(a==this.activeItem&&a.shouldDeactivate(b)){this.activeItem.deactivate();delete this.activeItem}}this.over=false;this.fireEvent("mouseout",this,b,a)},isVisible:function(){return this.el&&!this.hidden},show:function(b,c,a){this.parentMenu=a;if(!this.el){this.render()}this.fireEvent("beforeshow",this);this.showAt(this.el.getAlignToXY(b,c||this.defaultAlign),a,false)},showAt:function(c,b,a){this.parentMenu=b;if(!this.el){this.render()}if(a!==false){this.fireEvent("beforeshow",this);c=this.el.adjustForConstraints(c)}this.el.setXY(c);this.el.show();this.hidden=false;this.focus();this.fireEvent("show",this)},focus:function(){if(!this.hidden){this.doFocus.defer(50,this)}},doFocus:function(){if(!this.hidden){this.focusEl.focus()}},hide:function(a){if(this.el&&this.isVisible()){this.fireEvent("beforehide",this);if(this.activeItem){this.activeItem.deactivate();this.activeItem=null}this.el.hide();this.hidden=true;this.fireEvent("hide",this)}if(a===true&&this.parentMenu){this.parentMenu.hide(true)}},add:function(){var c=arguments,b=c.length,h;for(var e=0;e<b;e++){var g=c[e];if(g.render){h=this.addItem(g)}else{if(typeof g=="string"){if(g=="separator"||g=="-"){h=this.addSeparator()}else{h=this.addText(g)}}else{if(g.tagName||g.el){h=this.addElement(g)}else{if(typeof g=="object"){Ext.applyIf(g,this.defaults);h=this.addMenuItem(g)}}}}}return h},getEl:function(){if(!this.el){this.render()}return this.el},addSeparator:function(){return this.addItem(new Ext.menu.Separator())},addElement:function(a){return this.addItem(new Ext.menu.BaseItem(a))},addItem:function(b){this.items.add(b);if(this.ul){var a=document.createElement("li");a.className="x-menu-list-item";this.ul.dom.appendChild(a);b.render(a,this);this.delayAutoWidth()}return b},addMenuItem:function(a){if(!(a instanceof Ext.menu.Item)){if(typeof a.checked=="boolean"){a=new Ext.menu.CheckItem(a)}else{a=new Ext.menu.Item(a)}}return this.addItem(a)},addText:function(a){return this.addItem(new Ext.menu.TextItem(a))},insert:function(b,c){this.items.insert(b,c);if(this.ul){var a=document.createElement("li");a.className="x-menu-list-item";this.ul.dom.insertBefore(a,this.ul.dom.childNodes[b]);c.render(a,this);this.delayAutoWidth()}return c},remove:function(a){this.items.removeKey(a.id);a.destroy()},removeAll:function(){if(this.items){var a;while(a=this.items.first()){this.remove(a)}}},destroy:function(){this.beforeDestroy();Ext.menu.MenuMgr.unregister(this);if(this.keyNav){this.keyNav.disable()}this.removeAll();if(this.ul){this.ul.removeAllListeners()}if(this.el){this.el.destroy()}},beforeDestroy:Ext.emptyFn});Ext.menu.MenuNav=function(a){Ext.menu.MenuNav.superclass.constructor.call(this,a.el);this.scope=this.menu=a};Ext.extend(Ext.menu.MenuNav,Ext.KeyNav,{doRelay:function(c,b){var a=c.getKey();if(!this.menu.activeItem&&c.isNavKeyPress()&&a!=c.SPACE&&a!=c.RETURN){this.menu.tryActivate(0,1);return false}return b.call(this.scope||this,c,this.menu)},up:function(b,a){if(!a.tryActivate(a.items.indexOf(a.activeItem)-1,-1)){a.tryActivate(a.items.length-1,-1)}},down:function(b,a){if(!a.tryActivate(a.items.indexOf(a.activeItem)+1,1)){a.tryActivate(0,1)}},right:function(b,a){if(a.activeItem){a.activeItem.expandMenu(true)}},left:function(b,a){a.hide();if(a.parentMenu&&a.parentMenu.activeItem){a.parentMenu.activeItem.activate()}},enter:function(b,a){if(a.activeItem){b.stopPropagation();a.activeItem.onClick(b);a.fireEvent("click",this,a.activeItem);return true}}});Ext.menu.MenuMgr=function(){var h,e,c={},a=false,n=new Date();function p(){h={};e=new Ext.util.MixedCollection();Ext.getDoc().addKeyListener(27,function(){if(e.length>0){k()}})}function k(){if(e&&e.length>0){var q=e.clone();q.each(function(r){r.hide()})}}function g(q){e.remove(q);if(e.length<1){Ext.getDoc().un("mousedown",o);a=false}}function m(q){var r=e.last();n=new Date();e.add(q);if(!a){Ext.getDoc().on("mousedown",o);a=true}if(q.parentMenu){q.getEl().setZIndex(parseInt(q.parentMenu.getEl().getStyle("z-index"),10)+3);q.parentMenu.activeChild=q}else{if(r&&r.isVisible()){q.getEl().setZIndex(parseInt(r.getEl().getStyle("z-index"),10)+3)}}}function b(q){if(q.activeChild){q.activeChild.hide()}if(q.autoHideTimer){clearTimeout(q.autoHideTimer);delete q.autoHideTimer}}function i(q){var r=q.parentMenu;if(!r&&!q.allowOtherMenus){k()}else{if(r&&r.activeChild){r.activeChild.hide()}}}function o(q){if(n.getElapsed()>50&&e.length>0&&!q.getTarget(".x-menu")){k()}}function l(r,u){if(u){var t=c[r.group];for(var s=0,q=t.length;s<q;s++){if(t[s]!=r){t[s].setChecked(false)}}}}return{hideAll:function(){k()},register:function(r){if(!h){p()}h[r.id]=r;r.on("beforehide",b);r.on("hide",g);r.on("beforeshow",i);r.on("show",m);var q=r.group;if(q&&r.events.checkchange){if(!c[q]){c[q]=[]}c[q].push(r);r.on("checkchange",onCheck)}},get:function(q){if(typeof q=="string"){if(!h){return null}return h[q]}else{if(q.events){return q}else{if(typeof q.length=="number"){return new Ext.menu.Menu({items:q})}else{return new Ext.menu.Menu(q)}}}},unregister:function(r){delete h[r.id];r.un("beforehide",b);r.un("hide",g);r.un("beforeshow",i);r.un("show",m);var q=r.group;if(q&&r.events.checkchange){c[q].remove(r);r.un("checkchange",onCheck)}},registerCheckable:function(q){var r=q.group;if(r){if(!c[r]){c[r]=[]}c[r].push(q);q.on("beforecheckchange",l)}},unregisterCheckable:function(q){var r=q.group;if(r){c[r].remove(q);q.un("beforecheckchange",l)}},getCheckedItem:function(s){var t=c[s];if(t){for(var r=0,q=t.length;r<q;r++){if(t[r].checked){return t[r]}}}return null},setCheckedItem:function(s,u){var t=c[s];if(t){for(var r=0,q=t.length;r<q;r++){if(t[r].id==u){t[r].setChecked(true)}}}return null}}}();Ext.menu.BaseItem=function(a){Ext.menu.BaseItem.superclass.constructor.call(this,a);this.addEvents("click","activate","deactivate");if(this.handler){this.on("click",this.handler,this.scope)}};Ext.extend(Ext.menu.BaseItem,Ext.Component,{canActivate:false,activeClass:"x-menu-item-active",hideOnClick:true,hideDelay:100,ctype:"Ext.menu.BaseItem",actionMode:"container",render:function(a,b){this.parentMenu=b;Ext.menu.BaseItem.superclass.render.call(this,a);this.container.menuItemId=this.id},onRender:function(b,a){this.el=Ext.get(this.el);b.dom.appendChild(this.el.dom)},setHandler:function(b,a){if(this.handler){this.un("click",this.handler,this.scope)}this.on("click",this.handler=b,this.scope=a)},onClick:function(a){if(!this.disabled&&this.fireEvent("click",this,a)!==false&&this.parentMenu.fireEvent("itemclick",this,a)!==false){this.handleClick(a)}else{a.stopEvent()}},activate:function(){if(this.disabled){return false}var a=this.container;a.addClass(this.activeClass);this.region=a.getRegion().adjust(2,2,-2,-2);this.fireEvent("activate",this);return true},deactivate:function(){this.container.removeClass(this.activeClass);this.fireEvent("deactivate",this)},shouldDeactivate:function(a){return !this.region||!this.region.contains(a.getPoint())},handleClick:function(a){if(this.hideOnClick){this.parentMenu.hide.defer(this.hideDelay,this.parentMenu,[true])}},expandMenu:function(a){},hideMenu:function(){}});Ext.menu.TextItem=function(a){if(typeof a=="string"){a={text:a}}Ext.menu.TextItem.superclass.constructor.call(this,a)};Ext.extend(Ext.menu.TextItem,Ext.menu.BaseItem,{hideOnClick:false,itemCls:"x-menu-text",onRender:function(){var a=document.createElement("span");a.className=this.itemCls;a.innerHTML=this.text;this.el=a;Ext.menu.TextItem.superclass.onRender.apply(this,arguments)}});Ext.menu.Separator=function(a){Ext.menu.Separator.superclass.constructor.call(this,a)};Ext.extend(Ext.menu.Separator,Ext.menu.BaseItem,{itemCls:"x-menu-sep",hideOnClick:false,onRender:function(a){var b=document.createElement("span");b.className=this.itemCls;b.innerHTML="&#160;";this.el=b;a.addClass("x-menu-sep-li");Ext.menu.Separator.superclass.onRender.apply(this,arguments)}});Ext.menu.Item=function(a){Ext.menu.Item.superclass.constructor.call(this,a);if(this.menu){this.menu=Ext.menu.MenuMgr.get(this.menu)}};Ext.extend(Ext.menu.Item,Ext.menu.BaseItem,{itemCls:"x-menu-item",canActivate:true,showDelay:200,hideDelay:200,ctype:"Ext.menu.Item",onRender:function(b,a){var c=document.createElement("a");c.hideFocus=true;c.unselectable="on";c.href=this.href||"#";if(this.hrefTarget){c.target=this.hrefTarget}c.className=this.itemCls+(this.menu?" x-menu-item-arrow":"")+(this.cls?" "+this.cls:"");c.innerHTML=String.format('<img src="{0}" class="x-menu-item-icon {2}" />{1}',this.icon||Ext.BLANK_IMAGE_URL,this.itemText||this.text,this.iconCls||"");this.el=c;Ext.menu.Item.superclass.onRender.call(this,b,a)},setText:function(a){this.text=a;if(this.rendered){this.el.update(String.format('<img src="{0}" class="x-menu-item-icon {2}">{1}',this.icon||Ext.BLANK_IMAGE_URL,this.text,this.iconCls||""));this.parentMenu.autoWidth()}},setIconClass:function(a){var b=this.iconCls;this.iconCls=a;if(this.rendered){this.el.child("img.x-menu-item-icon").replaceClass(b,this.iconCls)}},handleClick:function(a){if(!this.href){a.stopEvent()}Ext.menu.Item.superclass.handleClick.apply(this,arguments)},activate:function(a){if(Ext.menu.Item.superclass.activate.apply(this,arguments)){this.focus();if(a){this.expandMenu()}}return true},shouldDeactivate:function(a){if(Ext.menu.Item.superclass.shouldDeactivate.call(this,a)){if(this.menu&&this.menu.isVisible()){return !this.menu.getEl().getRegion().contains(a.getPoint())}return true}return false},deactivate:function(){Ext.menu.Item.superclass.deactivate.apply(this,arguments);this.hideMenu()},expandMenu:function(a){if(!this.disabled&&this.menu){clearTimeout(this.hideTimer);delete this.hideTimer;if(!this.menu.isVisible()&&!this.showTimer){this.showTimer=this.deferExpand.defer(this.showDelay,this,[a])}else{if(this.menu.isVisible()&&a){this.menu.tryActivate(0,1)}}}},deferExpand:function(a){delete this.showTimer;this.menu.show(this.container,this.parentMenu.subMenuAlign||"tl-tr?",this.parentMenu);if(a){this.menu.tryActivate(0,1)}},hideMenu:function(){clearTimeout(this.showTimer);delete this.showTimer;if(!this.hideTimer&&this.menu&&this.menu.isVisible()){this.hideTimer=this.deferHide.defer(this.hideDelay,this)}},deferHide:function(){delete this.hideTimer;if(this.menu.over){this.parentMenu.setActiveItem(this,false)}else{this.menu.hide()}}});Ext.menu.CheckItem=function(a){Ext.menu.CheckItem.superclass.constructor.call(this,a);this.addEvents("beforecheckchange","checkchange");if(this.checkHandler){this.on("checkchange",this.checkHandler,this.scope)}Ext.menu.MenuMgr.registerCheckable(this)};Ext.extend(Ext.menu.CheckItem,Ext.menu.Item,{itemCls:"x-menu-item x-menu-check-item",groupClass:"x-menu-group-item",checked:false,ctype:"Ext.menu.CheckItem",onRender:function(a){Ext.menu.CheckItem.superclass.onRender.apply(this,arguments);if(this.group){this.el.addClass(this.groupClass)}if(this.checked){this.checked=false;this.setChecked(true,true)}},destroy:function(){Ext.menu.MenuMgr.unregisterCheckable(this);Ext.menu.CheckItem.superclass.destroy.apply(this,arguments)},setChecked:function(b,a){if(this.checked!=b&&this.fireEvent("beforecheckchange",this,b)!==false){if(this.container){this.container[b?"addClass":"removeClass"]("x-menu-item-checked")}this.checked=b;if(a!==true){this.fireEvent("checkchange",this,b)}}},handleClick:function(a){if(!this.disabled&&!(this.checked&&this.group)){this.setChecked(!this.checked)}Ext.menu.CheckItem.superclass.handleClick.apply(this,arguments)}});Ext.menu.Adapter=function(b,a){Ext.menu.Adapter.superclass.constructor.call(this,a);this.component=b};Ext.extend(Ext.menu.Adapter,Ext.menu.BaseItem,{canActivate:true,onRender:function(b,a){this.component.render(b);this.el=this.component.getEl()},activate:function(){if(this.disabled){return false}this.component.focus();this.fireEvent("activate",this);return true},deactivate:function(){this.fireEvent("deactivate",this)},disable:function(){this.component.disable();Ext.menu.Adapter.superclass.disable.call(this)},enable:function(){this.component.enable();Ext.menu.Adapter.superclass.enable.call(this)}});Ext.menu.DateItem=function(a){Ext.menu.DateItem.superclass.constructor.call(this,new Ext.DatePicker(a),a);this.picker=this.component;this.addEvents("select");this.picker.on("render",function(b){b.getEl().swallowEvent("click");b.container.addClass("x-menu-date-item")});this.picker.on("select",this.onSelect,this)};Ext.extend(Ext.menu.DateItem,Ext.menu.Adapter,{onSelect:function(b,a){this.fireEvent("select",this,a,b);Ext.menu.DateItem.superclass.handleClick.call(this)}});Ext.menu.ColorItem=function(a){Ext.menu.ColorItem.superclass.constructor.call(this,new Ext.ColorPalette(a),a);this.palette=this.component;this.relayEvents(this.palette,["select"]);if(this.selectHandler){this.on("select",this.selectHandler,this.scope)}};Ext.extend(Ext.menu.ColorItem,Ext.menu.Adapter);Ext.menu.DateMenu=function(a){Ext.menu.DateMenu.superclass.constructor.call(this,a);this.plain=true;var b=new Ext.menu.DateItem(a);this.add(b);this.picker=b.picker;this.relayEvents(b,["select"]);this.on("beforeshow",function(){if(this.picker){this.picker.hideMonthPicker(true)}},this)};Ext.extend(Ext.menu.DateMenu,Ext.menu.Menu,{cls:"x-date-menu",beforeDestroy:function(){this.picker.destroy()}});Ext.menu.ColorMenu=function(a){Ext.menu.ColorMenu.superclass.constructor.call(this,a);this.plain=true;var b=new Ext.menu.ColorItem(a);this.add(b);this.palette=b.palette;this.relayEvents(b,["select"])};Ext.extend(Ext.menu.ColorMenu,Ext.menu.Menu);Ext.form.Field=Ext.extend(Ext.BoxComponent,{invalidClass:"x-form-invalid",invalidText:"The value in this field is invalid",focusClass:"x-form-focus",validationEvent:"keyup",validateOnBlur:true,validationDelay:250,defaultAutoCreate:{tag:"input",type:"text",size:"20",autocomplete:"off"},fieldClass:"x-form-field",msgTarget:"qtip",msgFx:"normal",readOnly:false,disabled:false,isFormField:true,hasFocus:false,initComponent:function(){Ext.form.Field.superclass.initComponent.call(this);this.addEvents("focus","blur","specialkey","change","invalid","valid")},getName:function(){return this.rendered&&this.el.dom.name?this.el.dom.name:(this.hiddenName||"")},onRender:function(c,a){Ext.form.Field.superclass.onRender.call(this,c,a);if(!this.el){var b=this.getAutoCreate();if(!b.name){b.name=this.name||this.id}if(this.inputType){b.type=this.inputType}this.el=c.createChild(b,a)}var e=this.el.dom.type;if(e){if(e=="password"){e="text"}this.el.addClass("x-form-"+e)}if(this.readOnly){this.el.dom.readOnly=true}if(this.tabIndex!==undefined){this.el.dom.setAttribute("tabIndex",this.tabIndex)}this.el.addClass([this.fieldClass,this.cls])},initValue:function(){if(this.value!==undefined){this.setValue(this.value)}else{if(this.el.dom.value.length>0&&this.el.dom.value!=this.emptyText){this.setValue(this.el.dom.value)}}this.originalValue=this.getValue()},isDirty:function(){if(this.disabled){return false}return String(this.getValue())!==String(this.originalValue)},afterRender:function(){Ext.form.Field.superclass.afterRender.call(this);this.initEvents();this.initValue()},fireKey:function(a){if(a.isSpecialKey()){this.fireEvent("specialkey",this,a)}},reset:function(){this.setValue(this.originalValue);this.clearInvalid()},initEvents:function(){this.el.on(Ext.isIE||Ext.isSafari3?"keydown":"keypress",this.fireKey,this);this.el.on("focus",this.onFocus,this);var a=this.inEditor&&Ext.isWindows&&Ext.isGecko?{buffer:10}:null;this.el.on("blur",this.onBlur,this,a);this.originalValue=this.getValue()},onFocus:function(){if(!Ext.isOpera&&this.focusClass){this.el.addClass(this.focusClass)}if(!this.hasFocus){this.hasFocus=true;this.startValue=this.getValue();this.fireEvent("focus",this)}},beforeBlur:Ext.emptyFn,onBlur:function(){this.beforeBlur();if(!Ext.isOpera&&this.focusClass){this.el.removeClass(this.focusClass)}this.hasFocus=false;if(this.validationEvent!==false&&this.validateOnBlur&&this.validationEvent!="blur"){this.validate()}var a=this.getValue();if(String(a)!==String(this.startValue)){this.fireEvent("change",this,a,this.startValue)}this.fireEvent("blur",this)},isValid:function(a){if(this.disabled){return true}var c=this.preventMark;this.preventMark=a===true;var b=this.validateValue(this.processValue(this.getRawValue()));this.preventMark=c;return b},validate:function(){if(this.disabled||this.validateValue(this.processValue(this.getRawValue()))){this.clearInvalid();return true}return false},processValue:function(a){return a},validateValue:function(a){return true},markInvalid:function(c){if(!this.rendered||this.preventMark){return}this.el.addClass(this.invalidClass);c=c||this.invalidText;switch(this.msgTarget){case"qtip":this.el.dom.qtip=c;this.el.dom.qclass="x-form-invalid-tip";if(Ext.QuickTips){Ext.QuickTips.enable()}break;case"title":this.el.dom.title=c;break;case"under":if(!this.errorEl){var b=this.getErrorCt();if(!b){this.el.dom.title=c;break}this.errorEl=b.createChild({cls:"x-form-invalid-msg"});this.errorEl.setWidth(b.getWidth(true)-20)}this.errorEl.update(c);Ext.form.Field.msgFx[this.msgFx].show(this.errorEl,this);break;case"side":if(!this.errorIcon){var b=this.getErrorCt();if(!b){this.el.dom.title=c;break}this.errorIcon=b.createChild({cls:"x-form-invalid-icon"})}this.alignErrorIcon();this.errorIcon.dom.qtip=c;this.errorIcon.dom.qclass="x-form-invalid-tip";this.errorIcon.show();this.on("resize",this.alignErrorIcon,this);break;default:var a=Ext.getDom(this.msgTarget);a.innerHTML=c;a.style.display=this.msgDisplay;break}this.fireEvent("invalid",this,c)},getErrorCt:function(){return this.el.findParent(".x-form-element",5,true)||this.el.findParent(".x-form-field-wrap",5,true)},alignErrorIcon:function(){this.errorIcon.alignTo(this.el,"tl-tr",[2,0])},clearInvalid:function(){if(!this.rendered||this.preventMark){return}this.el.removeClass(this.invalidClass);switch(this.msgTarget){case"qtip":this.el.dom.qtip="";break;case"title":this.el.dom.title="";break;case"under":if(this.errorEl){Ext.form.Field.msgFx[this.msgFx].hide(this.errorEl,this)}break;case"side":if(this.errorIcon){this.errorIcon.dom.qtip="";this.errorIcon.hide();this.un("resize",this.alignErrorIcon,this)}break;default:var a=Ext.getDom(this.msgTarget);a.innerHTML="";a.style.display="none";break}this.fireEvent("valid",this)},getRawValue:function(){var a=this.rendered?this.el.getValue():Ext.value(this.value,"");if(a===this.emptyText){a=""}return a},getValue:function(){if(!this.rendered){return this.value}var a=this.el.getValue();if(a===this.emptyText||a===undefined){a=""}return a},setRawValue:function(a){return this.el.dom.value=(a===null||a===undefined?"":a)},setValue:function(a){this.value=a;if(this.rendered){this.el.dom.value=(a===null||a===undefined?"":a);this.validate()}},adjustSize:function(a,c){var b=Ext.form.Field.superclass.adjustSize.call(this,a,c);b.width=this.adjustWidth(this.el.dom.tagName,b.width);return b},adjustWidth:function(a,b){a=a.toLowerCase();if(typeof b=="number"&&!Ext.isSafari){if(Ext.isIE&&(a=="input"||a=="textarea")){if(a=="input"&&!Ext.isStrict){return this.inEditor?b:b-3}if(a=="input"&&Ext.isStrict){return b-(Ext.isIE6?4:1)}if(a=="textarea"&&Ext.isStrict){return b-2}}else{if(Ext.isOpera&&Ext.isStrict){if(a=="input"){return b+2}if(a=="textarea"){return b-2}}}}return b}});Ext.form.MessageTargets={qtip:{mark:function(a){this.el.dom.qtip=msg;this.el.dom.qclass="x-form-invalid-tip";if(Ext.QuickTips){Ext.QuickTips.enable()}},clear:function(a){this.el.dom.qtip=""}},title:{mark:function(a){this.el.dom.title=msg},clear:function(a){this.el.dom.title=""}},under:{mark:function(b){if(!this.errorEl){var a=this.getErrorCt();if(!a){this.el.dom.title=msg;return}this.errorEl=a.createChild({cls:"x-form-invalid-msg"});this.errorEl.setWidth(a.getWidth(true)-20)}this.errorEl.update(msg);Ext.form.Field.msgFx[this.msgFx].show(this.errorEl,this)},clear:function(a){if(this.errorEl){Ext.form.Field.msgFx[this.msgFx].hide(this.errorEl,this)}else{this.el.dom.title=""}}},side:{mark:function(b){if(!this.errorIcon){var a=this.getErrorCt();if(!a){this.el.dom.title=msg;return}this.errorIcon=a.createChild({cls:"x-form-invalid-icon"})}this.alignErrorIcon();this.errorIcon.dom.qtip=msg;this.errorIcon.dom.qclass="x-form-invalid-tip";this.errorIcon.show();this.on("resize",this.alignErrorIcon,this)},clear:function(a){if(this.errorIcon){this.errorIcon.dom.qtip="";this.errorIcon.hide();this.un("resize",this.alignErrorIcon,this)}else{this.el.dom.title=""}}},around:{mark:function(a){},clear:function(a){}}};Ext.form.Field.msgFx={normal:{show:function(a,b){a.setDisplayed("block")},hide:function(a,b){a.setDisplayed(false).update("")}},slide:{show:function(a,b){a.slideIn("t",{stopFx:true})},hide:function(a,b){a.slideOut("t",{stopFx:true,useDisplay:true})}},slideRight:{show:function(a,b){a.fixDisplay();a.alignTo(b.el,"tl-tr");a.slideIn("l",{stopFx:true})},hide:function(a,b){a.slideOut("l",{stopFx:true,useDisplay:true})}}};Ext.reg("field",Ext.form.Field);Ext.form.TextField=Ext.extend(Ext.form.Field,{grow:false,growMin:30,growMax:800,vtype:null,maskRe:null,disableKeyFilter:false,allowBlank:true,minLength:0,maxLength:Number.MAX_VALUE,minLengthText:"The minimum length for this field is {0}",maxLengthText:"The maximum length for this field is {0}",selectOnFocus:false,blankText:"This field is required",validator:null,regex:null,regexText:"",emptyText:null,emptyClass:"x-form-empty-field",initComponent:function(){Ext.form.TextField.superclass.initComponent.call(this);this.addEvents("autosize","keydown","keyup","keypress")},initEvents:function(){Ext.form.TextField.superclass.initEvents.call(this);if(this.validationEvent=="keyup"){this.validationTask=new Ext.util.DelayedTask(this.validate,this);this.el.on("keyup",this.filterValidation,this)}else{if(this.validationEvent!==false){this.el.on(this.validationEvent,this.validate,this,{buffer:this.validationDelay})}}if(this.selectOnFocus||this.emptyText){this.on("focus",this.preFocus,this);this.el.on("mousedown",function(){if(!this.hasFocus){this.el.on("mouseup",function(a){a.preventDefault()},this,{single:true})}},this);if(this.emptyText){this.on("blur",this.postBlur,this);this.applyEmptyText()}}if(this.maskRe||(this.vtype&&this.disableKeyFilter!==true&&(this.maskRe=Ext.form.VTypes[this.vtype+"Mask"]))){this.el.on("keypress",this.filterKeys,this)}if(this.grow){this.el.on("keyup",this.onKeyUpBuffered,this,{buffer:50});this.el.on("click",this.autoSize,this)}if(this.enableKeyEvents){this.el.on("keyup",this.onKeyUp,this);this.el.on("keydown",this.onKeyDown,this);this.el.on("keypress",this.onKeyPress,this)}},processValue:function(a){if(this.stripCharsRe){var b=a.replace(this.stripCharsRe,"");if(b!==a){this.setRawValue(b);return b}}return a},filterValidation:function(a){if(!a.isNavKeyPress()){this.validationTask.delay(this.validationDelay)}},onKeyUpBuffered:function(a){if(!a.isNavKeyPress()){this.autoSize()}},onKeyUp:function(a){this.fireEvent("keyup",this,a)},onKeyDown:function(a){this.fireEvent("keydown",this,a)},onKeyPress:function(a){this.fireEvent("keypress",this,a)},reset:function(){Ext.form.TextField.superclass.reset.call(this);this.applyEmptyText()},applyEmptyText:function(){if(this.rendered&&this.emptyText&&this.getRawValue().length<1){this.setRawValue(this.emptyText);this.el.addClass(this.emptyClass)}},preFocus:function(){if(this.emptyText){if(this.el.dom.value==this.emptyText){this.setRawValue("")}this.el.removeClass(this.emptyClass)}if(this.selectOnFocus){this.el.dom.select()}},postBlur:function(){this.applyEmptyText()},filterKeys:function(b){if(b.ctrlKey){return}var a=b.getKey();if(Ext.isGecko&&(b.isNavKeyPress()||a==b.BACKSPACE||(a==b.DELETE&&b.button==-1))){return}var h=b.getCharCode(),g=String.fromCharCode(h);if(!Ext.isGecko&&b.isSpecialKey()&&!g){return}if(!this.maskRe.test(g)){b.stopEvent()}},setValue:function(a){if(this.emptyText&&this.el&&a!==undefined&&a!==null&&a!==""){this.el.removeClass(this.emptyClass)}Ext.form.TextField.superclass.setValue.apply(this,arguments);this.applyEmptyText();this.autoSize()},validateValue:function(a){if(a.length<1||a===this.emptyText){if(this.allowBlank){this.clearInvalid();return true}else{this.markInvalid(this.blankText);return false}}if(a.length<this.minLength){this.markInvalid(String.format(this.minLengthText,this.minLength));return false}if(a.length>this.maxLength){this.markInvalid(String.format(this.maxLengthText,this.maxLength));return false}if(this.vtype){var c=Ext.form.VTypes;if(!c[this.vtype](a,this)){this.markInvalid(this.vtypeText||c[this.vtype+"Text"]);return false}}if(typeof this.validator=="function"){var b=this.validator(a);if(b!==true){this.markInvalid(b);return false}}if(this.regex&&!this.regex.test(a)){this.markInvalid(this.regexText);return false}return true},selectText:function(g,a){var c=this.getRawValue();if(c.length>0){g=g===undefined?0:g;a=a===undefined?c.length:a;var e=this.el.dom;if(e.setSelectionRange){e.setSelectionRange(g,a)}else{if(e.createTextRange){var b=e.createTextRange();b.moveStart("character",g);b.moveEnd("character",a-c.length);b.select()}}}},autoSize:function(){if(!this.grow||!this.rendered){return}if(!this.metrics){this.metrics=Ext.util.TextMetrics.createInstance(this.el)}var c=this.el;var b=c.dom.value;var e=document.createElement("div");e.appendChild(document.createTextNode(b));b=e.innerHTML;e=null;b+="&#160;";var a=Math.min(this.growMax,Math.max(this.metrics.getWidth(b)+10,this.growMin));this.el.setWidth(a);this.fireEvent("autosize",this,a)}});Ext.reg("textfield",Ext.form.TextField);Ext.form.TriggerField=Ext.extend(Ext.form.TextField,{defaultAutoCreate:{tag:"input",type:"text",size:"16",autocomplete:"off"},hideTrigger:false,autoSize:Ext.emptyFn,monitorTab:true,deferHeight:true,mimicing:false,onResize:function(a,b){Ext.form.TriggerField.superclass.onResize.call(this,a,b);if(typeof a=="number"){this.el.setWidth(this.adjustWidth("input",a-this.trigger.getWidth()))}this.wrap.setWidth(this.el.getWidth()+this.trigger.getWidth())},adjustSize:Ext.BoxComponent.prototype.adjustSize,getResizeEl:function(){return this.wrap},getPositionEl:function(){return this.wrap},alignErrorIcon:function(){if(this.wrap){this.errorIcon.alignTo(this.wrap,"tl-tr",[2,0])}},onRender:function(b,a){Ext.form.TriggerField.superclass.onRender.call(this,b,a);this.wrap=this.el.wrap({cls:"x-form-field-wrap"});this.trigger=this.wrap.createChild(this.triggerConfig||{tag:"img",src:Ext.BLANK_IMAGE_URL,cls:"x-form-trigger "+this.triggerClass});if(this.hideTrigger){this.trigger.setDisplayed(false)}this.initTrigger();if(!this.width){this.wrap.setWidth(this.el.getWidth()+this.trigger.getWidth())}},afterRender:function(){Ext.form.TriggerField.superclass.afterRender.call(this);var a;if(Ext.isIE&&this.el.getY()!=(a=this.trigger.getY())){this.el.position();this.el.setY(a)}},initTrigger:function(){this.trigger.on("click",this.onTriggerClick,this,{preventDefault:true});this.trigger.addClassOnOver("x-form-trigger-over");this.trigger.addClassOnClick("x-form-trigger-click")},onDestroy:function(){if(this.trigger){this.trigger.removeAllListeners();this.trigger.remove()}if(this.wrap){this.wrap.remove()}Ext.form.TriggerField.superclass.onDestroy.call(this)},onFocus:function(){Ext.form.TriggerField.superclass.onFocus.call(this);if(!this.mimicing){this.wrap.addClass("x-trigger-wrap-focus");this.mimicing=true;Ext.get(Ext.isIE?document.body:document).on("mousedown",this.mimicBlur,this,{delay:10});if(this.monitorTab){this.el.on("keydown",this.checkTab,this)}}},checkTab:function(a){if(a.getKey()==a.TAB){this.triggerBlur()}},onBlur:function(){},mimicBlur:function(a){if(!this.wrap.contains(a.target)&&this.validateBlur(a)){this.triggerBlur()}},triggerBlur:function(){this.mimicing=false;Ext.get(Ext.isIE?document.body:document).un("mousedown",this.mimicBlur,this);if(this.monitorTab){this.el.un("keydown",this.checkTab,this)}this.beforeBlur();this.wrap.removeClass("x-trigger-wrap-focus");Ext.form.TriggerField.superclass.onBlur.call(this)},beforeBlur:Ext.emptyFn,validateBlur:function(a){return true},onDisable:function(){Ext.form.TriggerField.superclass.onDisable.call(this);if(this.wrap){this.wrap.addClass(this.disabledClass);this.el.removeClass(this.disabledClass)}},onEnable:function(){Ext.form.TriggerField.superclass.onEnable.call(this);if(this.wrap){this.wrap.removeClass(this.disabledClass)}},onShow:function(){if(this.wrap){this.wrap.dom.style.display="";this.wrap.dom.style.visibility="visible"}},onHide:function(){this.wrap.dom.style.display="none"},onTriggerClick:Ext.emptyFn});Ext.form.TwinTriggerField=Ext.extend(Ext.form.TriggerField,{initComponent:function(){Ext.form.TwinTriggerField.superclass.initComponent.call(this);this.triggerConfig={tag:"span",cls:"x-form-twin-triggers",cn:[{tag:"img",src:Ext.BLANK_IMAGE_URL,cls:"x-form-trigger "+this.trigger1Class},{tag:"img",src:Ext.BLANK_IMAGE_URL,cls:"x-form-trigger "+this.trigger2Class}]}},getTrigger:function(a){return this.triggers[a]},initTrigger:function(){var a=this.trigger.select(".x-form-trigger",true);this.wrap.setStyle("overflow","hidden");var b=this;a.each(function(e,h,c){e.hide=function(){var i=b.wrap.getWidth();this.dom.style.display="none";b.el.setWidth(i-b.trigger.getWidth())};e.show=function(){var i=b.wrap.getWidth();this.dom.style.display="";b.el.setWidth(i-b.trigger.getWidth())};var g="Trigger"+(c+1);if(this["hide"+g]){e.dom.style.display="none"}e.on("click",this["on"+g+"Click"],this,{preventDefault:true});e.addClassOnOver("x-form-trigger-over");e.addClassOnClick("x-form-trigger-click")},this);this.triggers=a.elements},onTrigger1Click:Ext.emptyFn,onTrigger2Click:Ext.emptyFn});Ext.reg("trigger",Ext.form.TriggerField);Ext.form.TextArea=Ext.extend(Ext.form.TextField,{growMin:60,growMax:1000,growAppend:"&#160;\n&#160;",growPad:0,enterIsSpecial:false,preventScrollbars:false,onRender:function(b,a){if(!this.el){this.defaultAutoCreate={tag:"textarea",style:"width:100px;height:60px;",autocomplete:"off"}}Ext.form.TextArea.superclass.onRender.call(this,b,a);if(this.grow){this.textSizeEl=Ext.DomHelper.append(document.body,{tag:"pre",cls:"x-form-grow-sizer"});if(this.preventScrollbars){this.el.setStyle("overflow","hidden")}this.el.setHeight(this.growMin)}},onDestroy:function(){if(this.textSizeEl){Ext.removeNode(this.textSizeEl)}Ext.form.TextArea.superclass.onDestroy.call(this)},fireKey:function(a){if(a.isSpecialKey()&&(this.enterIsSpecial||(a.getKey()!=a.ENTER||a.hasModifier()))){this.fireEvent("specialkey",this,a)}},onKeyUp:function(a){if(!a.isNavKeyPress()||a.getKey()==a.ENTER){this.autoSize()}Ext.form.TextArea.superclass.onKeyUp.call(this,a)},autoSize:function(){if(!this.grow||!this.textSizeEl){return}var c=this.el;var a=c.dom.value;var e=this.textSizeEl;e.innerHTML="";e.appendChild(document.createTextNode(a));a=e.innerHTML;Ext.fly(e).setWidth(this.el.getWidth());if(a.length<1){a="&#160;&#160;"}else{if(Ext.isIE){a=a.replace(/\n/g,"<p>&#160;</p>")}a+=this.growAppend}e.innerHTML=a;var b=Math.min(this.growMax,Math.max(e.offsetHeight,this.growMin)+this.growPad);if(b!=this.lastHeight){this.lastHeight=b;this.el.setHeight(b);this.fireEvent("autosize",this,b)}}});Ext.reg("textarea",Ext.form.TextArea);Ext.form.NumberField=Ext.extend(Ext.form.TextField,{fieldClass:"x-form-field x-form-num-field",allowDecimals:true,decimalSeparator:".",decimalPrecision:2,allowNegative:true,minValue:Number.NEGATIVE_INFINITY,maxValue:Number.MAX_VALUE,minText:"The minimum value for this field is {0}",maxText:"The maximum value for this field is {0}",nanText:"{0} is not a valid number",baseChars:"0123456789",initEvents:function(){Ext.form.NumberField.superclass.initEvents.call(this);var b=this.baseChars+"";if(this.allowDecimals){b+=this.decimalSeparator}if(this.allowNegative){b+="-"}this.stripCharsRe=new RegExp("[^"+b+"]","gi");var a=function(h){var g=h.getKey();if(!Ext.isIE&&(h.isSpecialKey()||g==h.BACKSPACE||g==h.DELETE)){return}var i=h.getCharCode();if(b.indexOf(String.fromCharCode(i))===-1){h.stopEvent()}};this.el.on("keypress",a,this)},validateValue:function(b){if(!Ext.form.NumberField.superclass.validateValue.call(this,b)){return false}if(b.length<1){return true}b=String(b).replace(this.decimalSeparator,".");if(isNaN(b)){this.markInvalid(String.format(this.nanText,b));return false}var a=this.parseValue(b);if(a<this.minValue){this.markInvalid(String.format(this.minText,this.minValue));return false}if(a>this.maxValue){this.markInvalid(String.format(this.maxText,this.maxValue));return false}return true},getValue:function(){return this.fixPrecision(this.parseValue(Ext.form.NumberField.superclass.getValue.call(this)))},setValue:function(a){a=typeof a=="number"?a:parseFloat(String(a).replace(this.decimalSeparator,"."));a=isNaN(a)?"":String(a).replace(".",this.decimalSeparator);Ext.form.NumberField.superclass.setValue.call(this,a)},parseValue:function(a){a=parseFloat(String(a).replace(this.decimalSeparator,"."));return isNaN(a)?"":a},fixPrecision:function(b){var a=isNaN(b);if(!this.allowDecimals||this.decimalPrecision==-1||a||!b){return a?"":b}return parseFloat(parseFloat(b).toFixed(this.decimalPrecision))},beforeBlur:function(){var a=this.parseValue(this.getRawValue());if(a){this.setValue(this.fixPrecision(a))}}});Ext.reg("numberfield",Ext.form.NumberField);Ext.form.DateField=Ext.extend(Ext.form.TriggerField,{format:"m/d/Y",altFormats:"m/d/Y|n/j/Y|n/j/y|m/j/y|n/d/y|m/j/Y|n/d/Y|m-d-y|m-d-Y|m/d|m-d|md|mdy|mdY|d|Y-m-d",disabledDaysText:"Disabled",disabledDatesText:"Disabled",minText:"The date in this field must be equal to or after {0}",maxText:"The date in this field must be equal to or before {0}",invalidText:"{0} is not a valid date - it must be in the format {1}",triggerClass:"x-form-date-trigger",showToday:true,defaultAutoCreate:{tag:"input",type:"text",size:"10",autocomplete:"off"},initComponent:function(){Ext.form.DateField.superclass.initComponent.call(this);if(typeof this.minValue=="string"){this.minValue=this.parseDate(this.minValue)}if(typeof this.maxValue=="string"){this.maxValue=this.parseDate(this.maxValue)}this.ddMatch=null;this.initDisabledDays()},initDisabledDays:function(){if(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){this.disabledDates=a;this.initDisabledDays();if(this.menu){this.menu.picker.setDisabledDates(this.disabledDatesRE)}},setDisabledDays:function(a){this.disabledDays=a;if(this.menu){this.menu.picker.setDisabledDays(a)}},setMinValue:function(a){this.minValue=(typeof a=="string"?this.parseDate(a):a);if(this.menu){this.menu.picker.setMinDate(this.minValue)}},setMaxValue:function(a){this.maxValue=(typeof a=="string"?this.parseDate(a):a);if(this.menu){this.menu.picker.setMaxDate(this.maxValue)}},validateValue:function(g){g=this.formatDate(g);if(!Ext.form.DateField.superclass.validateValue.call(this,g)){return false}if(g.length<1){return true}var c=g;g=this.parseDate(g);if(!g){this.markInvalid(String.format(this.invalidText,c,this.format));return false}var h=g.getTime();if(this.minValue&&h<this.minValue.getTime()){this.markInvalid(String.format(this.minText,this.formatDate(this.minValue)));return false}if(this.maxValue&&h>this.maxValue.getTime()){this.markInvalid(String.format(this.maxText,this.formatDate(this.maxValue)));return false}if(this.disabledDays){var a=g.getDay();for(var b=0;b<this.disabledDays.length;b++){if(a===this.disabledDays[b]){this.markInvalid(this.disabledDaysText);return false}}}var e=this.formatDate(g);if(this.ddMatch&&this.ddMatch.test(e)){this.markInvalid(String.format(this.disabledDatesText,e));return false}return true},validateBlur:function(){return !this.menu||!this.menu.isVisible()},getValue:function(){return this.parseDate(Ext.form.DateField.superclass.getValue.call(this))||""},setValue:function(a){Ext.form.DateField.superclass.setValue.call(this,this.formatDate(this.parseDate(a)))},parseDate:function(e){if(!e||Ext.isDate(e)){return e}var b=Date.parseDate(e,this.format);if(!b&&this.altFormats){if(!this.altFormatsArray){this.altFormatsArray=this.altFormats.split("|")}for(var c=0,a=this.altFormatsArray.length;c<a&&!b;c++){b=Date.parseDate(e,this.altFormatsArray[c])}}return b},onDestroy:function(){if(this.menu){this.menu.destroy()}if(this.wrap){this.wrap.remove()}Ext.form.DateField.superclass.onDestroy.call(this)},formatDate:function(a){return Ext.isDate(a)?a.dateFormat(this.format):a},menuListeners:{select:function(a,b){this.setValue(b)},show:function(){this.onFocus()},hide:function(){this.focus.defer(10,this);var a=this.menuListeners;this.menu.un("select",a.select,this);this.menu.un("show",a.show,this);this.menu.un("hide",a.hide,this)}},onTriggerClick:function(){if(this.disabled){return}if(this.menu==null){this.menu=new Ext.menu.DateMenu()}Ext.apply(this.menu.picker,{minDate:this.minValue,maxDate:this.maxValue,disabledDatesRE:this.ddMatch,disabledDatesText:this.disabledDatesText,disabledDays:this.disabledDays,disabledDaysText:this.disabledDaysText,format:this.format,showToday:this.showToday,minText:String.format(this.minText,this.formatDate(this.minValue)),maxText:String.format(this.maxText,this.formatDate(this.maxValue))});this.menu.on(Ext.apply({},this.menuListeners,{scope:this}));this.menu.picker.setValue(this.getValue()||new Date());this.menu.show(this.el,"tl-bl?")},beforeBlur:function(){var a=this.parseDate(this.getRawValue());if(a){this.setValue(a)}}});Ext.reg("datefield",Ext.form.DateField);Ext.form.ComboBox=Ext.extend(Ext.form.TriggerField,{defaultAutoCreate:{tag:"input",type:"text",size:"24",autocomplete:"off"},listClass:"",selectedClass:"x-combo-selected",triggerClass:"x-form-arrow-trigger",shadow:"sides",listAlign:"tl-bl?",maxHeight:300,minHeight:90,triggerAction:"query",minChars:4,typeAhead:false,queryDelay:500,pageSize:0,selectOnFocus:false,queryParam:"query",loadingText:"Loading...",resizable:false,handleHeight:8,editable:true,allQuery:"",mode:"remote",minListWidth:70,forceSelection:false,typeAheadDelay:250,lazyInit:true,initComponent:function(){Ext.form.ComboBox.superclass.initComponent.call(this);this.addEvents("expand","collapse","beforeselect","select","beforequery");if(this.transform){this.allowDomMove=false;var c=Ext.getDom(this.transf